diff --git a/.cspell.json b/.cspell.json index 893018af04..2f0c2ea27a 100644 --- a/.cspell.json +++ b/.cspell.json @@ -69,6 +69,7 @@ "JORDI", "jsrsa", "jsrsasign", + "keccak", "Keychain", "Keycloak", "KEYUTIL", @@ -103,6 +104,7 @@ "openethereum", "organisation", "Orgs", + "ossp", "parameterizable", "Postgres", "proto", @@ -139,11 +141,7 @@ "uuidv", "vscc", "wasm", - "Xdai", - "goquorum", - "hada", - "undici", - "ossp" + "Xdai" ], "dictionaries": [ "typescript,node,npm,go,rust" diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 6e08505a62..75a3e2f319 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1279,6 +1279,13 @@ jobs: restore-keys: | ${{ runner.os }}-yarn- - run: ./tools/ci.sh + + - name: Install Foundry + uses: foundry-rs/foundry-toolchain@v1 + + - name: Run solidity tests + run: cd packages/cactus-plugin-htlc-eth-besu && forge test -vvvvv + cactus-test-plugin-htlc-eth-besu-erc20: continue-on-error: false env: diff --git a/packages/cactus-plugin-htlc-eth-besu/.gitignore b/packages/cactus-plugin-htlc-eth-besu/.gitignore new file mode 100644 index 0000000000..58b9aa0736 --- /dev/null +++ b/packages/cactus-plugin-htlc-eth-besu/.gitignore @@ -0,0 +1,5 @@ +.env +cache +lib +vendor +.gas-snapshot \ No newline at end of file diff --git a/packages/cactus-plugin-htlc-eth-besu/README.md b/packages/cactus-plugin-htlc-eth-besu/README.md index b269171574..51b67eb709 100644 --- a/packages/cactus-plugin-htlc-eth-besu/README.md +++ b/packages/cactus-plugin-htlc-eth-besu/README.md @@ -1,32 +1,31 @@ # @hyperledger/cactus-plugin-htlc-eth-besu -Allows `Cactus` to interact with HTLC contract +Allows `Cacti` to interact with HTLC contract manager. ## Summary - [Getting Started](#getting-started) - - [Prerequisites](#prerequisites) - [Installing](#installing) - [Runing the tests](#running-the-tests) - [Contributing](#contributing) - [License](#license) + ## Getting Started +The smart contracts and rationalle ane explained in detail in this Medium article . These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. -### Prerequisites - ### Installing -Steps to compile the project: +Install Foundry: https://book.getfoundry.sh/getting-started/installation + +Steps to compile the project: `forge build`. + + -In a `Cactus` root directory execute: -```sh -npm run configure -``` ## Running the tests The tests can be found in @hyperledger/cactus-test-htlc-eth-besu. To run this, in the root project execute: @@ -35,11 +34,35 @@ The tests can be found in @hyperledger/cactus-test-htlc-eth-besu. To run this, i npm run test:plugin-htlc-besu ``` +To run the solidity tests (within the root directory of this package): +`forge test --match-contract PrivateHashTimeLockTest` + +To run a specific function: +`forge test --match-contract PrivateHashTimeLockTest --match-test testDeployment` + +Run ALL the solidity tests: `forge test -vvvv` + + ## Contributing We welcome contributions to Hyperledger Cactus in many forms, and there’s always plenty to do! Please review [CONTIRBUTING.md](../../CONTRIBUTING.md) to get started. + +## Nohoist configuration +Foundry uses ``forge-std``and ``ds-test``modules for testing purposes. Given that Foundry cannot access files outside of the project, we use nohoist to force lerna to download the packages within the Forge project directory: + +`` + "nohoist": [ + "**/iroha-helpers", + "**/forge-std", + "**/forge-std/**" + ] + }, +`` + +If in the future Forge supports importing Solidity files from outside the project, the imports/re-mappings can be updated and the nohoist configuration removed. + ## License This distribution is published under the Apache License Version 2.0 found in the [LICENSE](../../LICENSE) file. \ No newline at end of file diff --git a/packages/cactus-plugin-htlc-eth-besu/foundry.toml b/packages/cactus-plugin-htlc-eth-besu/foundry.toml new file mode 100644 index 0000000000..3a402ba52a --- /dev/null +++ b/packages/cactus-plugin-htlc-eth-besu/foundry.toml @@ -0,0 +1,45 @@ +# Foundry Configuration File +# Default definitions: https://github.com/gakonst/foundry/blob/b7917fa8491aedda4dd6db53fbb206ea233cd531/config/src/lib.rs#L782 + +[profile.default] +# The source directory +src = './src/main/solidity/contracts' +# The test directory +test = 'src/test/solidity/integration' +# The script directory +script = './src/main/solidity/contracts/scripts' +# The artifact directory +out = 'build' +solc_version = '0.8.19' +auto_detect_solc = false +optimizer_runs = 1_000 +sender = '0x00a329c0648769a73afac7f9381e08fb43dbea72' # the address of `msg.sender` in tests +tx_origin = '0x00a329c0648769a73afac7f9381e08fb43dbea72' # the address of `tx.origin` in tests +block_number = 0 # the block number we are at in tests +chain_id = 99 # the chain id we are on in tests +gas_limit = 9223372036854775807 # the gas limit in tests +gas_reports = ['*'] +gas_price = 0 # the gas price (in wei) in tests +block_base_fee_per_gas = 0 # the base fee (in wei) in tests +block_coinbase = '0x0000000000000000000000000000000000000000' # the address of `block.coinbase` in tests +block_timestamp = 0 # the value of `block.timestamp` in tests +block_difficulty = 0 +fuzz = { runs = 256 } # the number of fuzz runs for tests +libs = ["../../node_modules"] +remappings = [ + "ds-test/=../../node_modules/ds-test/src/", + "forge-std/=../../node_modules/forge-std/src/", +] + +# Fuzzing CI +[profile.ci] +fuzz_runs = 100_00 +verbosity = 4 + +[rpc_endpoints] +goerli = "${RPC_URL_GOERLI}" +mainnet = "${RPC_URL_MAINNET}" + +[etherscan] +goerli = {key = "${ETHERSCAN_KEY}", url = "https://api-goerli.etherscan.io/api"} +mainnet = {key = "${ETHERSCAN_KEY}"} \ No newline at end of file diff --git a/packages/cactus-plugin-htlc-eth-besu/package.json b/packages/cactus-plugin-htlc-eth-besu/package.json index 79a592ec3f..019ee61d91 100644 --- a/packages/cactus-plugin-htlc-eth-besu/package.json +++ b/packages/cactus-plugin-htlc-eth-besu/package.json @@ -38,6 +38,11 @@ "name": "Azahara Castaño", "email": "a.castano.benito@accenture.com", "url": "https://accenture.com" + }, + { + "name": "Rafael Belchior", + "email": "rafael.belchior@tecnico.ulisboa.pt", + "url": "https://rafaelapb.github.io/" } ], "main": "dist/lib/main/typescript/index.js", @@ -52,11 +57,13 @@ "codegen:openapi": "npm run generate-sdk", "generate-sdk": "run-p generate-sdk:*", "generate-sdk:typescript-axios": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios/ --reserved-words-mappings protected=protected", + "lint": "solhint --fix", "watch": "npm-watch", "webpack": "npm-run-all webpack:dev", "webpack:dev": "npm-run-all webpack:dev:node webpack:dev:web", "webpack:dev:node": "webpack --env=dev --target=node --config ../../webpack.config.js", - "webpack:dev:web": "webpack --env=dev --target=web --config ../../webpack.config.js" + "webpack:dev:web": "webpack --env=dev --target=web --config ../../webpack.config.js", + "compile-contracts": "forge build" }, "dependencies": { "@hyperledger/cactus-common": "2.0.0-alpha.1", @@ -66,17 +73,21 @@ "@hyperledger/cactus-plugin-ledger-connector-besu": "2.0.0-alpha.1", "@hyperledger/cactus-test-tooling": "2.0.0-alpha.1", "axios": "0.21.4", + "bn.js": "5.2.1", + "dotenv": "16.0.3", + "ethers": "6.3.0", "express": "4.17.1", "joi": "17.9.1", "openapi-types": "9.1.0", "typescript-optional": "2.0.1", - "web3": "1.5.2", "web3js-quorum": "21.7.0-rc1" }, "devDependencies": { "@hyperledger/cactus-plugin-keychain-memory": "2.0.0-alpha.1", "@hyperledger/cactus-test-tooling": "2.0.0-alpha.1", - "@types/express": "4.17.13" + "@types/express": "4.17.13", + "forge-std": "https://github.com/foundry-rs/forge-std.git#66bf4e2c92cf507531599845e8d5a08cc2e3b5bb", + "ds-test": "https://github.com/dapphub/ds-test.git#e282159d5170298eb2455a6c05280ab5a73a4ef0" }, "engines": { "node": ">=10", diff --git a/packages/cactus-plugin-htlc-eth-besu/src/main/solidity/contracts/HashTimeLock.json b/packages/cactus-plugin-htlc-eth-besu/src/main/solidity/contracts/HashTimeLock.json index 928082b196..52dbdce722 100644 --- a/packages/cactus-plugin-htlc-eth-besu/src/main/solidity/contracts/HashTimeLock.json +++ b/packages/cactus-plugin-htlc-eth-besu/src/main/solidity/contracts/HashTimeLock.json @@ -1,18295 +1,5827 @@ { - "contractName": "HashTimeLock", - "abi": [ - { - "anonymous": false, - "inputs": [ + "contractName": "HashTimeLock", + "abi": [ { - "indexed": false, - "internalType": "uint256", - "name": "inputAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "outputAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "expiration", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "id", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "hashLock", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "string", - "name": "outputNetwork", - "type": "string" - }, - { - "indexed": false, - "internalType": "string", - "name": "outputAddress", - "type": "string" - } - ], - "name": "NewContract", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "id", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "hashLock", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "receiver", - "type": "address" - } - ], - "name": "Refund", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "id", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "secret", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "hashLock", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "receiver", - "type": "address" - } - ], - "name": "Withdraw", - "type": "event" - }, - { - "inputs": [], - "name": "ACTIVE", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "EXPIRED", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "INVALID", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "REFUNDED", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "WITHDRAWN", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "name": "contracts", - "outputs": [ - { - "internalType": "uint256", - "name": "inputAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "outputAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "expiration", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "status", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "hashLock", - "type": "bytes32" - }, - { - "internalType": "address payable", - "name": "sender", - "type": "address" - }, - { - "internalType": "address payable", - "name": "receiver", - "type": "address" - }, - { - "internalType": "string", - "name": "outputNetwork", - "type": "string" - }, - { - "internalType": "string", - "name": "outputAddress", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "outputAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "expiration", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "hashLock", - "type": "bytes32" - }, - { - "internalType": "address payable", - "name": "receiver", - "type": "address" - }, - { - "internalType": "string", - "name": "outputNetwork", - "type": "string" - }, - { - "internalType": "string", - "name": "outputAddress", - "type": "string" - } - ], - "name": "newContract", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "id", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "secret", - "type": "bytes32" - } - ], - "name": "withdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "id", - "type": "bytes32" - } - ], - "name": "refund", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32[]", - "name": "ids", - "type": "bytes32[]" - } - ], - "name": "getStatus", - "outputs": [ - { - "internalType": "uint256[]", - "name": "", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "id", - "type": "bytes32" - } - ], - "name": "getSingleStatus", - "outputs": [ - { - "internalType": "uint256", - "name": "result", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "id", - "type": "bytes32" - } - ], - "name": "contractExists", - "outputs": [ - { - "internalType": "bool", - "name": "result", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "metadata": "{\"compiler\":{\"version\":\"0.7.3+commit.9bfce1f6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"inputAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"outputAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"expiration\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"id\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"hashLock\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"outputNetwork\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"outputAddress\",\"type\":\"string\"}],\"name\":\"NewContract\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"id\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"hashLock\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"Refund\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"id\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"secret\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"hashLock\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"Withdraw\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"ACTIVE\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"EXPIRED\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"INVALID\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"REFUNDED\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"WITHDRAWN\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"id\",\"type\":\"bytes32\"}],\"name\":\"contractExists\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"result\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"contracts\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"inputAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"outputAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiration\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"status\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"hashLock\",\"type\":\"bytes32\"},{\"internalType\":\"address payable\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address payable\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"outputNetwork\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"outputAddress\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"id\",\"type\":\"bytes32\"}],\"name\":\"getSingleStatus\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"result\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"ids\",\"type\":\"bytes32[]\"}],\"name\":\"getStatus\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"outputAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiration\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"hashLock\",\"type\":\"bytes32\"},{\"internalType\":\"address payable\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"outputNetwork\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"outputAddress\",\"type\":\"string\"}],\"name\":\"newContract\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"id\",\"type\":\"bytes32\"}],\"name\":\"refund\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"id\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"secret\",\"type\":\"bytes32\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/Users/jordigironamezcua/Workspace/src/github.com/fork/cactus/extensions/cactus-plugin-htlc-eth-besu/src/main/contracts/contracts/HashTimeLock.sol\":\"HashTimeLock\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/jordigironamezcua/Workspace/src/github.com/fork/cactus/extensions/cactus-plugin-htlc-eth-besu/src/main/contracts/contracts/HashTimeLock.sol\":{\"keccak256\":\"0x78dad30c656159c21055ce3183ff2f65f1f89b7a6296df5cd10e94b682293a36\",\"urls\":[\"bzz-raw://1095dcd1ba8c25fb04484492fb3599d11059e6531d411555da499956910f20a4\",\"dweb:/ipfs/QmYBHvRbGRzv5VtKaX6RALjxdTiGJ5USdhfRh3HSWRJCN4\"]}},\"version\":1}", - "bytecode": "608060405234801561001057600080fd5b5061130e806100206000396000f3fe6080604052600436106100a75760003560e01c806394e15c8f1161006457806394e15c8f14610188578063af78feef1461019d578063c90bd047146101b2578063d3632095146101c7578063ec56a373146101da578063fbdf3b431461020f576100a7565b80632f21a663146100ac578063414ac85b146100e257806363615149146101045780636c8244b8146101265780637249fbb6146101535780637fcce2a914610173575b600080fd5b3480156100b857600080fd5b506100cc6100c7366004610e57565b61022f565b6040516100d991906110a6565b60405180910390f35b3480156100ee57600080fd5b506100f76102c7565b6040516100d99190611081565b34801561011057600080fd5b5061012461011f366004610f28565b6102cc565b005b34801561013257600080fd5b50610146610141366004610ef8565b61045b565b6040516100d991906110ea565b34801561015f57600080fd5b5061012461016e366004610ef8565b61061d565b34801561017f57600080fd5b506100f7610714565b34801561019457600080fd5b506100f7610719565b3480156101a957600080fd5b506100f761071e565b3480156101be57600080fd5b506100f7610723565b6101246101d5366004610f49565b610728565b3480156101e657600080fd5b506101fa6101f5366004610ef8565b6109e5565b6040516100d999989796959493929190611215565b34801561021b57600080fd5b506100f761022a366004610ef8565b610b52565b606080825167ffffffffffffffff8111801561024a57600080fd5b50604051908082528060200260200182016040528015610274578160200160208202803683370190505b50905060005b83518110156102be5761029f84828151811061029257fe5b6020026020010151610b52565b8282815181106102ab57fe5b602090810291909101015260010161027a565b5090505b919050565b600481565b600082815260208190526040902060038101546001146103075760405162461bcd60e51b81526004016102fe90611150565b60405180910390fd5b4281600201541161032a5760405162461bcd60e51b81526004016102fe90611179565b60028260405160200161033d9190611081565b60408051601f19818403018152908290526103579161108a565b602060405180830381855afa158015610374573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052508101906103979190610f10565b8160040154146103b95760405162461bcd60e51b81526004016102fe90611128565b600381810155600681015481546040516001600160a01b039092169181156108fc0291906000818181858888f193505050501580156103fc573d6000803e3d6000fd5b506006810154600582015460048301546040516001600160a01b03938416939092169186917f2d3a5ed13d0553389b4078e01264416362e34d23520fda797fbc17f3905ed1319161044e9188916110f5565b60405180910390a4505050565b6000610465610d1c565b60008381526020818152604091829020825161012081018452815481526001808301548285015260028084015483870152600384015460608401526004840154608084015260058401546001600160a01b0390811660a085015260068501541660c084015260078401805487516101009482161594909402600019011691909104601f81018690048602830186019096528582529194929360e0860193919291908301828280156105575780601f1061052c57610100808354040283529160200191610557565b820191906000526020600020905b81548152906001019060200180831161053a57829003601f168201915b505050918352505060088201805460408051602060026001851615610100026000190190941693909304601f81018490048402820184019092528181529382019392918301828280156105eb5780601f106105c0576101008083540402835291602001916105eb565b820191906000526020600020905b8154815290600101906020018083116105ce57829003601f168201915b505050505081525050905060008160600151141561060d5760009150506102c2565b60019150506102c2565b50919050565b6000818152602081905260409020600381015460011461064f5760405162461bcd60e51b81526004016102fe90611150565b42816002015411156106735760405162461bcd60e51b81526004016102fe90611179565b60026003820155600581015481546040516001600160a01b039092169181156108fc0291906000818181858888f193505050501580156106b7573d6000803e3d6000fd5b506006810154600582015460048301546040516001600160a01b03938416939092169185917f6fa50d56c31f3efe0cb6ff06232bffce8fe8c4155e3cbb6f2d79dd12631c2522916107089190611081565b60405180910390a45050565b600081565b600281565b600381565b600181565b33344289116107495760405162461bcd60e51b81526004016102fe90611179565b600081116107695760405162461bcd60e51b81526004016102fe9061119f565b600060028389848c8e604051602001610786959493929190611046565b60408051601f19818403018152908290526107a09161108a565b602060405180830381855afa1580156107bd573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052508101906107e09190610f10565b600081815260208190526040902060030154909150156108125760405162461bcd60e51b81526004016102fe90611103565b6040518061012001604052808381526020018c81526020018b8152602001600181526020018a8152602001846001600160a01b03168152602001896001600160a01b0316815260200188888080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250505090825250604080516020601f8901819004810282018101909252878152918101919088908890819084018382808284376000920182905250939094525050838152602081815260409182902084518155848201516001820155918401516002830155606084015160038301556080840151600483015560a08401516005830180546001600160a01b039283166001600160a01b03199182161790915560c086015160068501805491909316911617905560e0840151805192935061095d9260078501929190910190610d7d565b50610100820151805161097a916008840191602090910190610d7d565b50905050876001600160a01b0316836001600160a01b0316827f767d0ffbc3d16cc51fc05770a22976e4b0fda9198e37878b76979429b2d5d88c858f8f8f8e8e8e8e6040516109d09897969594939291906111c7565b60405180910390a45050505050505050505050565b600060208181529181526040908190208054600180830154600280850154600386015460048701546005880154600689015460078a0180548c51601f6000199b831615610100029b909b01909116979097049889018d90048d0287018d01909b52878652979a95999398929791966001600160a01b03918216969290911694929391830182828015610ab85780601f10610a8d57610100808354040283529160200191610ab8565b820191906000526020600020905b815481529060010190602001808311610a9b57829003601f168201915b5050505060088301805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152949594935090830182828015610b485780601f10610b1d57610100808354040283529160200191610b48565b820191906000526020600020905b815481529060010190602001808311610b2b57829003601f168201915b5050505050905089565b6000610b5c610d1c565b60008381526020818152604091829020825161012081018452815481526001808301548285015260028084015483870152600384015460608401526004840154608084015260058401546001600160a01b0390811660a085015260068501541660c084015260078401805487516101009482161594909402600019011691909104601f81018690048602830186019096528582529194929360e086019391929190830182828015610c4e5780601f10610c2357610100808354040283529160200191610c4e565b820191906000526020600020905b815481529060010190602001808311610c3157829003601f168201915b505050918352505060088201805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152938201939291830182828015610ce25780601f10610cb757610100808354040283529160200191610ce2565b820191906000526020600020905b815481529060010190602001808311610cc557829003601f168201915b505050505081525050905060018160600151148015610d045750428160400151105b15610d125760049150610617565b6060015192915050565b604051806101200160405280600081526020016000815260200160008152602001600081526020016000801916815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160608152602001606081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10610dbe57805160ff1916838001178555610deb565b82800160010185558215610deb579182015b82811115610deb578251825591602001919060010190610dd0565b50610df7929150610dfb565b5090565b5b80821115610df75760008155600101610dfc565b60008083601f840112610e21578182fd5b50813567ffffffffffffffff811115610e38578182fd5b602083019150836020828501011115610e5057600080fd5b9250929050565b60006020808385031215610e69578182fd5b823567ffffffffffffffff80821115610e80578384fd5b818501915085601f830112610e93578384fd5b813581811115610e9f57fe5b8381029150610eaf848301611284565b8181528481019084860184860187018a1015610ec9578788fd5b8795505b83861015610eeb578035835260019590950194918601918601610ecd565b5098975050505050505050565b600060208284031215610f09578081fd5b5035919050565b600060208284031215610f21578081fd5b5051919050565b60008060408385031215610f3a578081fd5b50508035926020909101359150565b60008060008060008060008060c0898b031215610f64578384fd5b88359750602089013596506040890135955060608901356001600160a01b0381168114610f8f578485fd5b9450608089013567ffffffffffffffff80821115610fab578586fd5b610fb78c838d01610e10565b909650945060a08b0135915080821115610fcf578384fd5b50610fdc8b828c01610e10565b999c989b5096995094979396929594505050565b60008284528282602086013780602084860101526020601f19601f85011685010190509392505050565b600081518084526110328160208601602086016112a8565b601f01601f19169290920160200192915050565b6bffffffffffffffffffffffff19606096871b811682529490951b909316601485015260288401919091526048830152606882015260880190565b90815260200190565b6000825161109c8184602087016112a8565b9190910192915050565b6020808252825182820181905260009190848201906040850190845b818110156110de578351835292840192918401916001016110c2565b50909695505050505050565b901515815260200190565b918252602082015260400190565b6020808252600b908201526a535741505f45584953545360a81b604082015260600190565b6020808252600e908201526d1253959053125117d4d150d4915560921b604082015260600190565b6020808252600f908201526e535741505f4e4f545f41435449564560881b604082015260600190565b6020808252600c908201526b494e56414c49445f54494d4560a01b604082015260600190565b6020808252600e908201526d1253959053125117d05353d5539560921b604082015260600190565b600089825288602083015287604083015286606083015260c060808301526111f360c083018688610ff0565b82810360a0840152611206818587610ff0565b9b9a5050505050505050505050565b60006101208b83528a602084015289604084015288606084015287608084015260018060a01b0380881660a085015280871660c0850152508060e084015261125f8184018661101a565b9050828103610100840152611274818561101a565b9c9b505050505050505050505050565b60405181810167ffffffffffffffff811182821017156112a057fe5b604052919050565b60005b838110156112c35781810151838201526020016112ab565b838111156112d2576000848401525b5050505056fea2646970667358221220f45fcebb51fe0bb2f5eebdfc22644001de72db0c3650561269787579053629dc64736f6c63430007030033", - "deployedBytecode": "6080604052600436106100a75760003560e01c806394e15c8f1161006457806394e15c8f14610188578063af78feef1461019d578063c90bd047146101b2578063d3632095146101c7578063ec56a373146101da578063fbdf3b431461020f576100a7565b80632f21a663146100ac578063414ac85b146100e257806363615149146101045780636c8244b8146101265780637249fbb6146101535780637fcce2a914610173575b600080fd5b3480156100b857600080fd5b506100cc6100c7366004610e57565b61022f565b6040516100d991906110a6565b60405180910390f35b3480156100ee57600080fd5b506100f76102c7565b6040516100d99190611081565b34801561011057600080fd5b5061012461011f366004610f28565b6102cc565b005b34801561013257600080fd5b50610146610141366004610ef8565b61045b565b6040516100d991906110ea565b34801561015f57600080fd5b5061012461016e366004610ef8565b61061d565b34801561017f57600080fd5b506100f7610714565b34801561019457600080fd5b506100f7610719565b3480156101a957600080fd5b506100f761071e565b3480156101be57600080fd5b506100f7610723565b6101246101d5366004610f49565b610728565b3480156101e657600080fd5b506101fa6101f5366004610ef8565b6109e5565b6040516100d999989796959493929190611215565b34801561021b57600080fd5b506100f761022a366004610ef8565b610b52565b606080825167ffffffffffffffff8111801561024a57600080fd5b50604051908082528060200260200182016040528015610274578160200160208202803683370190505b50905060005b83518110156102be5761029f84828151811061029257fe5b6020026020010151610b52565b8282815181106102ab57fe5b602090810291909101015260010161027a565b5090505b919050565b600481565b600082815260208190526040902060038101546001146103075760405162461bcd60e51b81526004016102fe90611150565b60405180910390fd5b4281600201541161032a5760405162461bcd60e51b81526004016102fe90611179565b60028260405160200161033d9190611081565b60408051601f19818403018152908290526103579161108a565b602060405180830381855afa158015610374573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052508101906103979190610f10565b8160040154146103b95760405162461bcd60e51b81526004016102fe90611128565b600381810155600681015481546040516001600160a01b039092169181156108fc0291906000818181858888f193505050501580156103fc573d6000803e3d6000fd5b506006810154600582015460048301546040516001600160a01b03938416939092169186917f2d3a5ed13d0553389b4078e01264416362e34d23520fda797fbc17f3905ed1319161044e9188916110f5565b60405180910390a4505050565b6000610465610d1c565b60008381526020818152604091829020825161012081018452815481526001808301548285015260028084015483870152600384015460608401526004840154608084015260058401546001600160a01b0390811660a085015260068501541660c084015260078401805487516101009482161594909402600019011691909104601f81018690048602830186019096528582529194929360e0860193919291908301828280156105575780601f1061052c57610100808354040283529160200191610557565b820191906000526020600020905b81548152906001019060200180831161053a57829003601f168201915b505050918352505060088201805460408051602060026001851615610100026000190190941693909304601f81018490048402820184019092528181529382019392918301828280156105eb5780601f106105c0576101008083540402835291602001916105eb565b820191906000526020600020905b8154815290600101906020018083116105ce57829003601f168201915b505050505081525050905060008160600151141561060d5760009150506102c2565b60019150506102c2565b50919050565b6000818152602081905260409020600381015460011461064f5760405162461bcd60e51b81526004016102fe90611150565b42816002015411156106735760405162461bcd60e51b81526004016102fe90611179565b60026003820155600581015481546040516001600160a01b039092169181156108fc0291906000818181858888f193505050501580156106b7573d6000803e3d6000fd5b506006810154600582015460048301546040516001600160a01b03938416939092169185917f6fa50d56c31f3efe0cb6ff06232bffce8fe8c4155e3cbb6f2d79dd12631c2522916107089190611081565b60405180910390a45050565b600081565b600281565b600381565b600181565b33344289116107495760405162461bcd60e51b81526004016102fe90611179565b600081116107695760405162461bcd60e51b81526004016102fe9061119f565b600060028389848c8e604051602001610786959493929190611046565b60408051601f19818403018152908290526107a09161108a565b602060405180830381855afa1580156107bd573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052508101906107e09190610f10565b600081815260208190526040902060030154909150156108125760405162461bcd60e51b81526004016102fe90611103565b6040518061012001604052808381526020018c81526020018b8152602001600181526020018a8152602001846001600160a01b03168152602001896001600160a01b0316815260200188888080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250505090825250604080516020601f8901819004810282018101909252878152918101919088908890819084018382808284376000920182905250939094525050838152602081815260409182902084518155848201516001820155918401516002830155606084015160038301556080840151600483015560a08401516005830180546001600160a01b039283166001600160a01b03199182161790915560c086015160068501805491909316911617905560e0840151805192935061095d9260078501929190910190610d7d565b50610100820151805161097a916008840191602090910190610d7d565b50905050876001600160a01b0316836001600160a01b0316827f767d0ffbc3d16cc51fc05770a22976e4b0fda9198e37878b76979429b2d5d88c858f8f8f8e8e8e8e6040516109d09897969594939291906111c7565b60405180910390a45050505050505050505050565b600060208181529181526040908190208054600180830154600280850154600386015460048701546005880154600689015460078a0180548c51601f6000199b831615610100029b909b01909116979097049889018d90048d0287018d01909b52878652979a95999398929791966001600160a01b03918216969290911694929391830182828015610ab85780601f10610a8d57610100808354040283529160200191610ab8565b820191906000526020600020905b815481529060010190602001808311610a9b57829003601f168201915b5050505060088301805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152949594935090830182828015610b485780601f10610b1d57610100808354040283529160200191610b48565b820191906000526020600020905b815481529060010190602001808311610b2b57829003601f168201915b5050505050905089565b6000610b5c610d1c565b60008381526020818152604091829020825161012081018452815481526001808301548285015260028084015483870152600384015460608401526004840154608084015260058401546001600160a01b0390811660a085015260068501541660c084015260078401805487516101009482161594909402600019011691909104601f81018690048602830186019096528582529194929360e086019391929190830182828015610c4e5780601f10610c2357610100808354040283529160200191610c4e565b820191906000526020600020905b815481529060010190602001808311610c3157829003601f168201915b505050918352505060088201805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152938201939291830182828015610ce25780601f10610cb757610100808354040283529160200191610ce2565b820191906000526020600020905b815481529060010190602001808311610cc557829003601f168201915b505050505081525050905060018160600151148015610d045750428160400151105b15610d125760049150610617565b6060015192915050565b604051806101200160405280600081526020016000815260200160008152602001600081526020016000801916815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160608152602001606081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10610dbe57805160ff1916838001178555610deb565b82800160010185558215610deb579182015b82811115610deb578251825591602001919060010190610dd0565b50610df7929150610dfb565b5090565b5b80821115610df75760008155600101610dfc565b60008083601f840112610e21578182fd5b50813567ffffffffffffffff811115610e38578182fd5b602083019150836020828501011115610e5057600080fd5b9250929050565b60006020808385031215610e69578182fd5b823567ffffffffffffffff80821115610e80578384fd5b818501915085601f830112610e93578384fd5b813581811115610e9f57fe5b8381029150610eaf848301611284565b8181528481019084860184860187018a1015610ec9578788fd5b8795505b83861015610eeb578035835260019590950194918601918601610ecd565b5098975050505050505050565b600060208284031215610f09578081fd5b5035919050565b600060208284031215610f21578081fd5b5051919050565b60008060408385031215610f3a578081fd5b50508035926020909101359150565b60008060008060008060008060c0898b031215610f64578384fd5b88359750602089013596506040890135955060608901356001600160a01b0381168114610f8f578485fd5b9450608089013567ffffffffffffffff80821115610fab578586fd5b610fb78c838d01610e10565b909650945060a08b0135915080821115610fcf578384fd5b50610fdc8b828c01610e10565b999c989b5096995094979396929594505050565b60008284528282602086013780602084860101526020601f19601f85011685010190509392505050565b600081518084526110328160208601602086016112a8565b601f01601f19169290920160200192915050565b6bffffffffffffffffffffffff19606096871b811682529490951b909316601485015260288401919091526048830152606882015260880190565b90815260200190565b6000825161109c8184602087016112a8565b9190910192915050565b6020808252825182820181905260009190848201906040850190845b818110156110de578351835292840192918401916001016110c2565b50909695505050505050565b901515815260200190565b918252602082015260400190565b6020808252600b908201526a535741505f45584953545360a81b604082015260600190565b6020808252600e908201526d1253959053125117d4d150d4915560921b604082015260600190565b6020808252600f908201526e535741505f4e4f545f41435449564560881b604082015260600190565b6020808252600c908201526b494e56414c49445f54494d4560a01b604082015260600190565b6020808252600e908201526d1253959053125117d05353d5539560921b604082015260600190565b600089825288602083015287604083015286606083015260c060808301526111f360c083018688610ff0565b82810360a0840152611206818587610ff0565b9b9a5050505050505050505050565b60006101208b83528a602084015289604084015288606084015287608084015260018060a01b0380881660a085015280871660c0850152508060e084015261125f8184018661101a565b9050828103610100840152611274818561101a565b9c9b505050505050505050505050565b60405181810167ffffffffffffffff811182821017156112a057fe5b604052919050565b60005b838110156112c35781810151838201526020016112ab565b838111156112d2576000848401525b5050505056fea2646970667358221220f45fcebb51fe0bb2f5eebdfc22644001de72db0c3650561269787579053629dc64736f6c63430007030033", - "immutableReferences": {}, - "generatedSources": [], - "deployedGeneratedSources": [ - { - "ast": { - "nodeType": "YulBlock", - "src": "0:10210:3", - "statements": [ - { - "nodeType": "YulBlock", - "src": "6:3:3", - "statements": [] - }, - { - "body": { - "nodeType": "YulBlock", - "src": "89:303:3", - "statements": [ + "anonymous": false, + "inputs": [ { - "body": { - "nodeType": "YulBlock", - "src": "138:30:3", - "statements": [ - { - "expression": { - "arguments": [ - { - "name": "arrayPos", - "nodeType": "YulIdentifier", - "src": "147:8:3" - }, - { - "name": "arrayPos", - "nodeType": "YulIdentifier", - "src": "157:8:3" - } - ], - "functionName": { - "name": "revert", - "nodeType": "YulIdentifier", - "src": "140:6:3" - }, - "nodeType": "YulFunctionCall", - "src": "140:26:3" - }, - "nodeType": "YulExpressionStatement", - "src": "140:26:3" - } - ] - }, - "condition": { - "arguments": [ - { - "arguments": [ - { - "arguments": [ - { - "name": "offset", - "nodeType": "YulIdentifier", - "src": "117:6:3" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "125:4:3", - "type": "", - "value": "0x1f" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "113:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "113:17:3" - }, - { - "name": "end", - "nodeType": "YulIdentifier", - "src": "132:3:3" - } - ], - "functionName": { - "name": "slt", - "nodeType": "YulIdentifier", - "src": "109:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "109:27:3" - } - ], - "functionName": { - "name": "iszero", - "nodeType": "YulIdentifier", - "src": "102:6:3" - }, - "nodeType": "YulFunctionCall", - "src": "102:35:3" - }, - "nodeType": "YulIf", - "src": "99:2:3" + "indexed": false, + "internalType": "uint256", + "name": "inputAmount", + "type": "uint256" }, { - "nodeType": "YulAssignment", - "src": "177:30:3", - "value": { - "arguments": [ - { - "name": "offset", - "nodeType": "YulIdentifier", - "src": "200:6:3" - } - ], - "functionName": { - "name": "calldataload", - "nodeType": "YulIdentifier", - "src": "187:12:3" - }, - "nodeType": "YulFunctionCall", - "src": "187:20:3" - }, - "variableNames": [ - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "177:6:3" - } - ] + "indexed": false, + "internalType": "uint256", + "name": "outputAmount", + "type": "uint256" }, { - "body": { - "nodeType": "YulBlock", - "src": "250:30:3", - "statements": [ - { - "expression": { - "arguments": [ - { - "name": "arrayPos", - "nodeType": "YulIdentifier", - "src": "259:8:3" - }, - { - "name": "arrayPos", - "nodeType": "YulIdentifier", - "src": "269:8:3" - } - ], - "functionName": { - "name": "revert", - "nodeType": "YulIdentifier", - "src": "252:6:3" - }, - "nodeType": "YulFunctionCall", - "src": "252:26:3" - }, - "nodeType": "YulExpressionStatement", - "src": "252:26:3" - } - ] - }, - "condition": { - "arguments": [ - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "222:6:3" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "230:18:3", - "type": "", - "value": "0xffffffffffffffff" - } - ], - "functionName": { - "name": "gt", - "nodeType": "YulIdentifier", - "src": "219:2:3" - }, - "nodeType": "YulFunctionCall", - "src": "219:30:3" - }, - "nodeType": "YulIf", - "src": "216:2:3" + "indexed": false, + "internalType": "uint256", + "name": "expiration", + "type": "uint256" }, { - "nodeType": "YulAssignment", - "src": "289:29:3", - "value": { - "arguments": [ - { - "name": "offset", - "nodeType": "YulIdentifier", - "src": "305:6:3" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "313:4:3", - "type": "", - "value": "0x20" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "301:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "301:17:3" - }, - "variableNames": [ - { - "name": "arrayPos", - "nodeType": "YulIdentifier", - "src": "289:8:3" - } - ] + "indexed": true, + "internalType": "bytes32", + "name": "id", + "type": "bytes32" }, { - "body": { - "nodeType": "YulBlock", - "src": "370:16:3", - "statements": [ - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "379:1:3", - "type": "", - "value": "0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "382:1:3", - "type": "", - "value": "0" - } - ], - "functionName": { - "name": "revert", - "nodeType": "YulIdentifier", - "src": "372:6:3" - }, - "nodeType": "YulFunctionCall", - "src": "372:12:3" - }, - "nodeType": "YulExpressionStatement", - "src": "372:12:3" - } - ] - }, - "condition": { - "arguments": [ - { - "arguments": [ - { - "arguments": [ - { - "name": "offset", - "nodeType": "YulIdentifier", - "src": "341:6:3" - }, - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "349:6:3" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "337:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "337:19:3" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "358:4:3", - "type": "", - "value": "0x20" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "333:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "333:30:3" - }, - { - "name": "end", - "nodeType": "YulIdentifier", - "src": "365:3:3" - } - ], - "functionName": { - "name": "gt", - "nodeType": "YulIdentifier", - "src": "330:2:3" - }, - "nodeType": "YulFunctionCall", - "src": "330:39:3" - }, - "nodeType": "YulIf", - "src": "327:2:3" - } - ] - }, - "name": "abi_decode_t_string_calldata", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "offset", - "nodeType": "YulTypedName", - "src": "52:6:3", - "type": "" - }, - { - "name": "end", - "nodeType": "YulTypedName", - "src": "60:3:3", - "type": "" - } - ], - "returnVariables": [ - { - "name": "arrayPos", - "nodeType": "YulTypedName", - "src": "68:8:3", - "type": "" - }, - { - "name": "length", - "nodeType": "YulTypedName", - "src": "78:6:3", - "type": "" - } - ], - "src": "14:378:3" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "492:918:3", - "statements": [ + "indexed": false, + "internalType": "bytes32", + "name": "hashLock", + "type": "bytes32" + }, { - "nodeType": "YulVariableDeclaration", - "src": "502:12:3", - "value": { - "kind": "number", - "nodeType": "YulLiteral", - "src": "512:2:3", - "type": "", - "value": "32" - }, - "variables": [ - { - "name": "_1", - "nodeType": "YulTypedName", - "src": "506:2:3", - "type": "" - } - ] + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" }, { - "body": { - "nodeType": "YulBlock", - "src": "559:26:3", - "statements": [ - { - "expression": { - "arguments": [ - { - "name": "value0", - "nodeType": "YulIdentifier", - "src": "568:6:3" - }, - { - "name": "value0", - "nodeType": "YulIdentifier", - "src": "576:6:3" - } - ], - "functionName": { - "name": "revert", - "nodeType": "YulIdentifier", - "src": "561:6:3" - }, - "nodeType": "YulFunctionCall", - "src": "561:22:3" - }, - "nodeType": "YulExpressionStatement", - "src": "561:22:3" - } - ] - }, - "condition": { - "arguments": [ - { - "arguments": [ - { - "name": "dataEnd", - "nodeType": "YulIdentifier", - "src": "534:7:3" - }, - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "543:9:3" - } - ], - "functionName": { - "name": "sub", - "nodeType": "YulIdentifier", - "src": "530:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "530:23:3" - }, - { - "name": "_1", - "nodeType": "YulIdentifier", - "src": "555:2:3" - } - ], - "functionName": { - "name": "slt", - "nodeType": "YulIdentifier", - "src": "526:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "526:32:3" - }, - "nodeType": "YulIf", - "src": "523:2:3" + "indexed": true, + "internalType": "address", + "name": "receiver", + "type": "address" }, { - "nodeType": "YulVariableDeclaration", - "src": "594:37:3", - "value": { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "621:9:3" - } - ], - "functionName": { - "name": "calldataload", - "nodeType": "YulIdentifier", - "src": "608:12:3" - }, - "nodeType": "YulFunctionCall", - "src": "608:23:3" - }, - "variables": [ - { - "name": "offset", - "nodeType": "YulTypedName", - "src": "598:6:3", - "type": "" - } - ] + "indexed": false, + "internalType": "string", + "name": "outputNetwork", + "type": "string" }, { - "nodeType": "YulVariableDeclaration", - "src": "640:28:3", - "value": { - "kind": "number", - "nodeType": "YulLiteral", - "src": "650:18:3", - "type": "", - "value": "0xffffffffffffffff" - }, - "variables": [ - { - "name": "_2", - "nodeType": "YulTypedName", - "src": "644:2:3", - "type": "" - } - ] + "indexed": false, + "internalType": "string", + "name": "outputAddress", + "type": "string" + } + ], + "name": "NewContract", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "id", + "type": "bytes32" }, { - "body": { - "nodeType": "YulBlock", - "src": "695:26:3", - "statements": [ - { - "expression": { - "arguments": [ - { - "name": "value0", - "nodeType": "YulIdentifier", - "src": "704:6:3" - }, - { - "name": "value0", - "nodeType": "YulIdentifier", - "src": "712:6:3" - } - ], - "functionName": { - "name": "revert", - "nodeType": "YulIdentifier", - "src": "697:6:3" - }, - "nodeType": "YulFunctionCall", - "src": "697:22:3" - }, - "nodeType": "YulExpressionStatement", - "src": "697:22:3" - } - ] - }, - "condition": { - "arguments": [ - { - "name": "offset", - "nodeType": "YulIdentifier", - "src": "683:6:3" - }, - { - "name": "_2", - "nodeType": "YulIdentifier", - "src": "691:2:3" - } - ], - "functionName": { - "name": "gt", - "nodeType": "YulIdentifier", - "src": "680:2:3" - }, - "nodeType": "YulFunctionCall", - "src": "680:14:3" - }, - "nodeType": "YulIf", - "src": "677:2:3" + "indexed": false, + "internalType": "bytes32", + "name": "hashLock", + "type": "bytes32" }, { - "nodeType": "YulVariableDeclaration", - "src": "730:32:3", - "value": { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "744:9:3" - }, - { - "name": "offset", - "nodeType": "YulIdentifier", - "src": "755:6:3" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "740:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "740:22:3" - }, - "variables": [ - { - "name": "_3", - "nodeType": "YulTypedName", - "src": "734:2:3", - "type": "" - } - ] + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" }, { - "body": { - "nodeType": "YulBlock", - "src": "810:26:3", - "statements": [ - { - "expression": { - "arguments": [ - { - "name": "value0", - "nodeType": "YulIdentifier", - "src": "819:6:3" - }, - { - "name": "value0", - "nodeType": "YulIdentifier", - "src": "827:6:3" - } - ], - "functionName": { - "name": "revert", - "nodeType": "YulIdentifier", - "src": "812:6:3" - }, - "nodeType": "YulFunctionCall", - "src": "812:22:3" - }, - "nodeType": "YulExpressionStatement", - "src": "812:22:3" - } - ] - }, - "condition": { - "arguments": [ - { - "arguments": [ - { - "arguments": [ - { - "name": "_3", - "nodeType": "YulIdentifier", - "src": "789:2:3" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "793:4:3", - "type": "", - "value": "0x1f" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "785:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "785:13:3" - }, - { - "name": "dataEnd", - "nodeType": "YulIdentifier", - "src": "800:7:3" - } - ], - "functionName": { - "name": "slt", - "nodeType": "YulIdentifier", - "src": "781:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "781:27:3" - } - ], - "functionName": { - "name": "iszero", - "nodeType": "YulIdentifier", - "src": "774:6:3" - }, - "nodeType": "YulFunctionCall", - "src": "774:35:3" - }, - "nodeType": "YulIf", - "src": "771:2:3" + "indexed": true, + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "Refund", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "id", + "type": "bytes32" }, { - "nodeType": "YulVariableDeclaration", - "src": "845:30:3", - "value": { - "arguments": [ - { - "name": "_3", - "nodeType": "YulIdentifier", - "src": "872:2:3" - } - ], - "functionName": { - "name": "calldataload", - "nodeType": "YulIdentifier", - "src": "859:12:3" - }, - "nodeType": "YulFunctionCall", - "src": "859:16:3" - }, - "variables": [ - { - "name": "length", - "nodeType": "YulTypedName", - "src": "849:6:3", - "type": "" - } - ] + "indexed": false, + "internalType": "bytes32", + "name": "secret", + "type": "bytes32" }, { - "body": { - "nodeType": "YulBlock", - "src": "902:13:3", - "statements": [ - { - "expression": { - "arguments": [], - "functionName": { - "name": "invalid", - "nodeType": "YulIdentifier", - "src": "904:7:3" - }, - "nodeType": "YulFunctionCall", - "src": "904:9:3" - }, - "nodeType": "YulExpressionStatement", - "src": "904:9:3" - } - ] - }, - "condition": { - "arguments": [ - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "890:6:3" - }, - { - "name": "_2", - "nodeType": "YulIdentifier", - "src": "898:2:3" - } - ], - "functionName": { - "name": "gt", - "nodeType": "YulIdentifier", - "src": "887:2:3" - }, - "nodeType": "YulFunctionCall", - "src": "887:14:3" - }, - "nodeType": "YulIf", - "src": "884:2:3" + "indexed": false, + "internalType": "bytes32", + "name": "hashLock", + "type": "bytes32" }, { - "nodeType": "YulVariableDeclaration", - "src": "924:25:3", - "value": { - "arguments": [ - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "938:6:3" - }, - { - "name": "_1", - "nodeType": "YulIdentifier", - "src": "946:2:3" - } - ], - "functionName": { - "name": "mul", - "nodeType": "YulIdentifier", - "src": "934:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "934:15:3" - }, - "variables": [ - { - "name": "_4", - "nodeType": "YulTypedName", - "src": "928:2:3", - "type": "" - } - ] + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" }, { - "nodeType": "YulVariableDeclaration", - "src": "958:38:3", - "value": { - "arguments": [ - { - "arguments": [ - { - "name": "_4", - "nodeType": "YulIdentifier", - "src": "988:2:3" - }, - { - "name": "_1", - "nodeType": "YulIdentifier", - "src": "992:2:3" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "984:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "984:11:3" - } - ], - "functionName": { - "name": "allocateMemory", - "nodeType": "YulIdentifier", - "src": "969:14:3" - }, - "nodeType": "YulFunctionCall", - "src": "969:27:3" - }, - "variables": [ - { - "name": "dst", - "nodeType": "YulTypedName", - "src": "962:3:3", - "type": "" - } - ] + "indexed": true, + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "Withdraw", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "id", + "type": "bytes32" + } + ], + "name": "contractExists", + "outputs": [ + { + "internalType": "bool", + "name": "result", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "contracts", + "outputs": [ + { + "internalType": "uint256", + "name": "inputAmount", + "type": "uint256" }, { - "nodeType": "YulVariableDeclaration", - "src": "1005:16:3", - "value": { - "name": "dst", - "nodeType": "YulIdentifier", - "src": "1018:3:3" - }, - "variables": [ - { - "name": "dst_1", - "nodeType": "YulTypedName", - "src": "1009:5:3", - "type": "" - } - ] + "internalType": "uint256", + "name": "outputAmount", + "type": "uint256" }, { - "expression": { - "arguments": [ - { - "name": "dst", - "nodeType": "YulIdentifier", - "src": "1037:3:3" - }, - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "1042:6:3" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "1030:6:3" - }, - "nodeType": "YulFunctionCall", - "src": "1030:19:3" - }, - "nodeType": "YulExpressionStatement", - "src": "1030:19:3" + "internalType": "uint256", + "name": "expiration", + "type": "uint256" }, { - "nodeType": "YulAssignment", - "src": "1058:19:3", - "value": { - "arguments": [ - { - "name": "dst", - "nodeType": "YulIdentifier", - "src": "1069:3:3" - }, - { - "name": "_1", - "nodeType": "YulIdentifier", - "src": "1074:2:3" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "1065:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "1065:12:3" - }, - "variableNames": [ - { - "name": "dst", - "nodeType": "YulIdentifier", - "src": "1058:3:3" - } - ] + "internalType": "uint256", + "name": "status", + "type": "uint256" }, { - "nodeType": "YulVariableDeclaration", - "src": "1086:22:3", - "value": { - "arguments": [ - { - "name": "_3", - "nodeType": "YulIdentifier", - "src": "1101:2:3" - }, - { - "name": "_1", - "nodeType": "YulIdentifier", - "src": "1105:2:3" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "1097:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "1097:11:3" - }, - "variables": [ - { - "name": "src", - "nodeType": "YulTypedName", - "src": "1090:3:3", - "type": "" - } - ] + "internalType": "bytes32", + "name": "hashLock", + "type": "bytes32" }, { - "body": { - "nodeType": "YulBlock", - "src": "1154:26:3", - "statements": [ - { - "expression": { - "arguments": [ - { - "name": "value0", - "nodeType": "YulIdentifier", - "src": "1163:6:3" - }, - { - "name": "value0", - "nodeType": "YulIdentifier", - "src": "1171:6:3" - } - ], - "functionName": { - "name": "revert", - "nodeType": "YulIdentifier", - "src": "1156:6:3" - }, - "nodeType": "YulFunctionCall", - "src": "1156:22:3" - }, - "nodeType": "YulExpressionStatement", - "src": "1156:22:3" - } - ] - }, - "condition": { - "arguments": [ - { - "arguments": [ - { - "arguments": [ - { - "name": "_3", - "nodeType": "YulIdentifier", - "src": "1131:2:3" - }, - { - "name": "_4", - "nodeType": "YulIdentifier", - "src": "1135:2:3" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "1127:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "1127:11:3" - }, - { - "name": "_1", - "nodeType": "YulIdentifier", - "src": "1140:2:3" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "1123:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "1123:20:3" - }, - { - "name": "dataEnd", - "nodeType": "YulIdentifier", - "src": "1145:7:3" - } - ], - "functionName": { - "name": "gt", - "nodeType": "YulIdentifier", - "src": "1120:2:3" - }, - "nodeType": "YulFunctionCall", - "src": "1120:33:3" - }, - "nodeType": "YulIf", - "src": "1117:2:3" + "internalType": "address payable", + "name": "sender", + "type": "address" }, { - "nodeType": "YulVariableDeclaration", - "src": "1189:15:3", - "value": { - "name": "value0", - "nodeType": "YulIdentifier", - "src": "1198:6:3" - }, - "variables": [ - { - "name": "i", - "nodeType": "YulTypedName", - "src": "1193:1:3", - "type": "" - } - ] + "internalType": "address payable", + "name": "receiver", + "type": "address" }, { - "body": { - "nodeType": "YulBlock", - "src": "1262:118:3", - "statements": [ - { - "expression": { - "arguments": [ - { - "name": "dst", - "nodeType": "YulIdentifier", - "src": "1283:3:3" - }, - { - "arguments": [ - { - "name": "src", - "nodeType": "YulIdentifier", - "src": "1301:3:3" - } - ], - "functionName": { - "name": "calldataload", - "nodeType": "YulIdentifier", - "src": "1288:12:3" - }, - "nodeType": "YulFunctionCall", - "src": "1288:17:3" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "1276:6:3" - }, - "nodeType": "YulFunctionCall", - "src": "1276:30:3" - }, - "nodeType": "YulExpressionStatement", - "src": "1276:30:3" - }, - { - "nodeType": "YulAssignment", - "src": "1319:19:3", - "value": { - "arguments": [ - { - "name": "dst", - "nodeType": "YulIdentifier", - "src": "1330:3:3" - }, - { - "name": "_1", - "nodeType": "YulIdentifier", - "src": "1335:2:3" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "1326:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "1326:12:3" - }, - "variableNames": [ - { - "name": "dst", - "nodeType": "YulIdentifier", - "src": "1319:3:3" - } - ] - }, - { - "nodeType": "YulAssignment", - "src": "1351:19:3", - "value": { - "arguments": [ - { - "name": "src", - "nodeType": "YulIdentifier", - "src": "1362:3:3" - }, - { - "name": "_1", - "nodeType": "YulIdentifier", - "src": "1367:2:3" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "1358:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "1358:12:3" - }, - "variableNames": [ - { - "name": "src", - "nodeType": "YulIdentifier", - "src": "1351:3:3" - } - ] - } - ] - }, - "condition": { - "arguments": [ - { - "name": "i", - "nodeType": "YulIdentifier", - "src": "1224:1:3" - }, - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "1227:6:3" - } - ], - "functionName": { - "name": "lt", - "nodeType": "YulIdentifier", - "src": "1221:2:3" - }, - "nodeType": "YulFunctionCall", - "src": "1221:13:3" - }, - "nodeType": "YulForLoop", - "post": { - "nodeType": "YulBlock", - "src": "1235:18:3", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "1237:14:3", - "value": { - "arguments": [ - { - "name": "i", - "nodeType": "YulIdentifier", - "src": "1246:1:3" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "1249:1:3", - "type": "", - "value": "1" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "1242:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "1242:9:3" - }, - "variableNames": [ - { - "name": "i", - "nodeType": "YulIdentifier", - "src": "1237:1:3" - } - ] - } - ] - }, - "pre": { - "nodeType": "YulBlock", - "src": "1217:3:3", - "statements": [] - }, - "src": "1213:167:3" + "internalType": "string", + "name": "outputNetwork", + "type": "string" }, { - "nodeType": "YulAssignment", - "src": "1389:15:3", - "value": { - "name": "dst_1", - "nodeType": "YulIdentifier", - "src": "1399:5:3" - }, - "variableNames": [ - { - "name": "value0", - "nodeType": "YulIdentifier", - "src": "1389:6:3" - } - ] + "internalType": "string", + "name": "outputAddress", + "type": "string" } - ] - }, - "name": "abi_decode_tuple_t_array$_t_bytes32_$dyn_memory_ptr", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "headStart", - "nodeType": "YulTypedName", - "src": "458:9:3", - "type": "" - }, - { - "name": "dataEnd", - "nodeType": "YulTypedName", - "src": "469:7:3", - "type": "" - } ], - "returnVariables": [ - { - "name": "value0", - "nodeType": "YulTypedName", - "src": "481:6:3", - "type": "" - } + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "id", + "type": "bytes32" + } ], - "src": "397:1013:3" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "1485:120:3", - "statements": [ + "name": "getSingleStatus", + "outputs": [ { - "body": { - "nodeType": "YulBlock", - "src": "1531:26:3", - "statements": [ - { - "expression": { - "arguments": [ - { - "name": "value0", - "nodeType": "YulIdentifier", - "src": "1540:6:3" - }, - { - "name": "value0", - "nodeType": "YulIdentifier", - "src": "1548:6:3" - } - ], - "functionName": { - "name": "revert", - "nodeType": "YulIdentifier", - "src": "1533:6:3" - }, - "nodeType": "YulFunctionCall", - "src": "1533:22:3" - }, - "nodeType": "YulExpressionStatement", - "src": "1533:22:3" - } - ] - }, - "condition": { - "arguments": [ - { - "arguments": [ - { - "name": "dataEnd", - "nodeType": "YulIdentifier", - "src": "1506:7:3" - }, - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "1515:9:3" - } - ], - "functionName": { - "name": "sub", - "nodeType": "YulIdentifier", - "src": "1502:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "1502:23:3" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "1527:2:3", - "type": "", - "value": "32" - } - ], - "functionName": { - "name": "slt", - "nodeType": "YulIdentifier", - "src": "1498:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "1498:32:3" - }, - "nodeType": "YulIf", - "src": "1495:2:3" - }, + "internalType": "uint256", + "name": "result", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ { - "nodeType": "YulAssignment", - "src": "1566:33:3", - "value": { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "1589:9:3" - } - ], - "functionName": { - "name": "calldataload", - "nodeType": "YulIdentifier", - "src": "1576:12:3" - }, - "nodeType": "YulFunctionCall", - "src": "1576:23:3" - }, - "variableNames": [ - { - "name": "value0", - "nodeType": "YulIdentifier", - "src": "1566:6:3" - } - ] + "internalType": "bytes32[]", + "name": "ids", + "type": "bytes32[]" } - ] - }, - "name": "abi_decode_tuple_t_bytes32", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "headStart", - "nodeType": "YulTypedName", - "src": "1451:9:3", - "type": "" - }, - { - "name": "dataEnd", - "nodeType": "YulTypedName", - "src": "1462:7:3", - "type": "" - } ], - "returnVariables": [ - { - "name": "value0", - "nodeType": "YulTypedName", - "src": "1474:6:3", - "type": "" - } + "name": "getStatus", + "outputs": [ + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + } ], - "src": "1415:190:3" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "1691:113:3", - "statements": [ + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ { - "body": { - "nodeType": "YulBlock", - "src": "1737:26:3", - "statements": [ - { - "expression": { - "arguments": [ - { - "name": "value0", - "nodeType": "YulIdentifier", - "src": "1746:6:3" - }, - { - "name": "value0", - "nodeType": "YulIdentifier", - "src": "1754:6:3" - } - ], - "functionName": { - "name": "revert", - "nodeType": "YulIdentifier", - "src": "1739:6:3" - }, - "nodeType": "YulFunctionCall", - "src": "1739:22:3" - }, - "nodeType": "YulExpressionStatement", - "src": "1739:22:3" - } - ] - }, - "condition": { - "arguments": [ - { - "arguments": [ - { - "name": "dataEnd", - "nodeType": "YulIdentifier", - "src": "1712:7:3" - }, - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "1721:9:3" - } - ], - "functionName": { - "name": "sub", - "nodeType": "YulIdentifier", - "src": "1708:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "1708:23:3" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "1733:2:3", - "type": "", - "value": "32" - } - ], - "functionName": { - "name": "slt", - "nodeType": "YulIdentifier", - "src": "1704:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "1704:32:3" - }, - "nodeType": "YulIf", - "src": "1701:2:3" + "internalType": "uint256", + "name": "outputAmount", + "type": "uint256" }, { - "nodeType": "YulAssignment", - "src": "1772:26:3", - "value": { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "1788:9:3" - } - ], - "functionName": { - "name": "mload", - "nodeType": "YulIdentifier", - "src": "1782:5:3" - }, - "nodeType": "YulFunctionCall", - "src": "1782:16:3" - }, - "variableNames": [ - { - "name": "value0", - "nodeType": "YulIdentifier", - "src": "1772:6:3" - } - ] - } - ] - }, - "name": "abi_decode_tuple_t_bytes32_fromMemory", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "headStart", - "nodeType": "YulTypedName", - "src": "1657:9:3", - "type": "" - }, - { - "name": "dataEnd", - "nodeType": "YulTypedName", - "src": "1668:7:3", - "type": "" - } - ], - "returnVariables": [ - { - "name": "value0", - "nodeType": "YulTypedName", - "src": "1680:6:3", - "type": "" - } - ], - "src": "1610:194:3" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "1896:171:3", - "statements": [ + "internalType": "uint256", + "name": "expiration", + "type": "uint256" + }, { - "body": { - "nodeType": "YulBlock", - "src": "1942:26:3", - "statements": [ - { - "expression": { - "arguments": [ - { - "name": "value1", - "nodeType": "YulIdentifier", - "src": "1951:6:3" - }, - { - "name": "value1", - "nodeType": "YulIdentifier", - "src": "1959:6:3" - } - ], - "functionName": { - "name": "revert", - "nodeType": "YulIdentifier", - "src": "1944:6:3" - }, - "nodeType": "YulFunctionCall", - "src": "1944:22:3" - }, - "nodeType": "YulExpressionStatement", - "src": "1944:22:3" - } - ] - }, - "condition": { - "arguments": [ - { - "arguments": [ - { - "name": "dataEnd", - "nodeType": "YulIdentifier", - "src": "1917:7:3" - }, - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "1926:9:3" - } - ], - "functionName": { - "name": "sub", - "nodeType": "YulIdentifier", - "src": "1913:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "1913:23:3" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "1938:2:3", - "type": "", - "value": "64" - } - ], - "functionName": { - "name": "slt", - "nodeType": "YulIdentifier", - "src": "1909:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "1909:32:3" - }, - "nodeType": "YulIf", - "src": "1906:2:3" + "internalType": "bytes32", + "name": "hashLock", + "type": "bytes32" }, { - "nodeType": "YulAssignment", - "src": "1977:33:3", - "value": { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "2000:9:3" - } - ], - "functionName": { - "name": "calldataload", - "nodeType": "YulIdentifier", - "src": "1987:12:3" - }, - "nodeType": "YulFunctionCall", - "src": "1987:23:3" - }, - "variableNames": [ - { - "name": "value0", - "nodeType": "YulIdentifier", - "src": "1977:6:3" - } - ] + "internalType": "address payable", + "name": "receiver", + "type": "address" }, { - "nodeType": "YulAssignment", - "src": "2019:42:3", - "value": { - "arguments": [ - { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "2046:9:3" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "2057:2:3", - "type": "", - "value": "32" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "2042:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "2042:18:3" - } - ], - "functionName": { - "name": "calldataload", - "nodeType": "YulIdentifier", - "src": "2029:12:3" - }, - "nodeType": "YulFunctionCall", - "src": "2029:32:3" - }, - "variableNames": [ - { - "name": "value1", - "nodeType": "YulIdentifier", - "src": "2019:6:3" - } - ] + "internalType": "string", + "name": "outputNetwork", + "type": "string" + }, + { + "internalType": "string", + "name": "outputAddress", + "type": "string" } - ] - }, - "name": "abi_decode_tuple_t_bytes32t_bytes32", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "headStart", - "nodeType": "YulTypedName", - "src": "1854:9:3", - "type": "" - }, - { - "name": "dataEnd", - "nodeType": "YulTypedName", - "src": "1865:7:3", - "type": "" - } ], - "returnVariables": [ - { - "name": "value0", - "nodeType": "YulTypedName", - "src": "1877:6:3", - "type": "" - }, - { - "name": "value1", - "nodeType": "YulTypedName", - "src": "1885:6:3", - "type": "" - } + "name": "newContract", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "id", + "type": "bytes32" + } ], - "src": "1809:258:3" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "2275:951:3", - "statements": [ + "name": "refund", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ { - "body": { - "nodeType": "YulBlock", - "src": "2322:26:3", - "statements": [ - { - "expression": { - "arguments": [ - { - "name": "value4", - "nodeType": "YulIdentifier", - "src": "2331:6:3" - }, - { - "name": "value4", - "nodeType": "YulIdentifier", - "src": "2339:6:3" - } - ], - "functionName": { - "name": "revert", - "nodeType": "YulIdentifier", - "src": "2324:6:3" - }, - "nodeType": "YulFunctionCall", - "src": "2324:22:3" - }, - "nodeType": "YulExpressionStatement", - "src": "2324:22:3" - } - ] - }, - "condition": { - "arguments": [ - { - "arguments": [ - { - "name": "dataEnd", - "nodeType": "YulIdentifier", - "src": "2296:7:3" - }, - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "2305:9:3" - } - ], - "functionName": { - "name": "sub", - "nodeType": "YulIdentifier", - "src": "2292:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "2292:23:3" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "2317:3:3", - "type": "", - "value": "192" - } - ], - "functionName": { - "name": "slt", - "nodeType": "YulIdentifier", - "src": "2288:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "2288:33:3" - }, - "nodeType": "YulIf", - "src": "2285:2:3" + "internalType": "bytes32", + "name": "id", + "type": "bytes32" }, { - "nodeType": "YulAssignment", - "src": "2357:33:3", - "value": { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "2380:9:3" - } - ], - "functionName": { - "name": "calldataload", - "nodeType": "YulIdentifier", - "src": "2367:12:3" - }, - "nodeType": "YulFunctionCall", - "src": "2367:23:3" - }, - "variableNames": [ + "internalType": "bytes32", + "name": "secret", + "type": "bytes32" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"inputAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"outputAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"expiration\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"id\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"hashLock\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"outputNetwork\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"outputAddress\",\"type\":\"string\"}],\"name\":\"NewContract\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"id\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"hashLock\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"Refund\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"id\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"secret\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"hashLock\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"Withdraw\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"id\",\"type\":\"bytes32\"}],\"name\":\"contractExists\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"result\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"contracts\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"inputAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"outputAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiration\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"status\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"hashLock\",\"type\":\"bytes32\"},{\"internalType\":\"address payable\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address payable\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"outputNetwork\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"outputAddress\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"id\",\"type\":\"bytes32\"}],\"name\":\"getSingleStatus\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"result\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"ids\",\"type\":\"bytes32[]\"}],\"name\":\"getStatus\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"outputAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiration\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"hashLock\",\"type\":\"bytes32\"},{\"internalType\":\"address payable\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"outputNetwork\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"outputAddress\",\"type\":\"string\"}],\"name\":\"newContract\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"id\",\"type\":\"bytes32\"}],\"name\":\"refund\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"id\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"secret\",\"type\":\"bytes32\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/workspaces/cacti/packages/cactus-plugin-htlc-eth-besu/src/main/solidity/contracts/HashTimeLock.sol\":\"HashTimeLock\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/workspaces/cacti/packages/cactus-plugin-htlc-eth-besu/src/main/solidity/contracts/HashTimeLock.sol\":{\"keccak256\":\"0xabc77fd57fdaad6467113b890ae9b1e4ce97226c5a0ee0c3b622804ccb0d98b6\",\"urls\":[\"bzz-raw://4977d711b4ecac65823fd08b61578df079d5e17b673f5d94fdd9d870d1fd9398\",\"dweb:/ipfs/QmYNgu9H2qmeoG6gqtTPgEpcB4hxpQwbopBeQNRioELZX4\"]}},\"version\":1}", + "bytecode": "608060405234801561001057600080fd5b5061126d806100206000396000f3fe6080604052600436106100705760003560e01c80637249fbb61161004e5780637249fbb6146100fd578063d36320951461011d578063ec56a37314610130578063fbdf3b431461016557600080fd5b80632f21a6631461007557806363615149146100ab5780636c8244b8146100cd575b600080fd5b34801561008157600080fd5b50610095610090366004610cf5565b610193565b6040516100a29190610db3565b60405180910390f35b3480156100b757600080fd5b506100cb6100c6366004610df7565b610241565b005b3480156100d957600080fd5b506100ed6100e8366004610e19565b6103cc565b60405190151581526020016100a2565b34801561010957600080fd5b506100cb610118366004610e19565b610586565b6100cb61012b366004610e7b565b61069b565b34801561013c57600080fd5b5061015061014b366004610e19565b6109b1565b6040516100a299989796959493929190610f76565b34801561017157600080fd5b50610185610180366004610e19565b610b1a565b6040519081526020016100a2565b60606000825167ffffffffffffffff8111156101b1576101b1610cdf565b6040519080825280602002602001820160405280156101da578160200160208202803683370190505b50905060005b835181101561023a5761020b8482815181106101fe576101fe610fe5565b6020026020010151610b1a565b82828151811061021d5761021d610fe5565b60209081029190910101528061023281610ffb565b9150506101e0565b5092915050565b6000828152602081905260409020600381015460011461029a5760405162461bcd60e51b815260206004820152600f60248201526e535741505f4e4f545f41435449564560881b60448201526064015b60405180910390fd5b428160020154116102bd5760405162461bcd60e51b815260040161029190611022565b604080516020810184905201604051602081830303815290604052805190602001208160040154146103225760405162461bcd60e51b815260206004820152600e60248201526d1253959053125117d4d150d4915560921b6044820152606401610291565b600381810155600681015481546040516001600160a01b039092169181156108fc0291906000818181858888f19350505050158015610365573d6000803e3d6000fd5b506006810154600582015460048301546040516001600160a01b0393841693929092169186917f2d3a5ed13d0553389b4078e01264416362e34d23520fda797fbc17f3905ed131916103bf91888252602082015260400190565b60405180910390a4505050565b60008181526020818152604080832081516101208101835281548152600182015493810193909352600281015491830191909152600381015460608301526004810154608083015260058101546001600160a01b0390811660a084015260068201541660c08301526007810180548493929160e084019161044c90611048565b80601f016020809104026020016040519081016040528092919081815260200182805461047890611048565b80156104c55780601f1061049a576101008083540402835291602001916104c5565b820191906000526020600020905b8154815290600101906020018083116104a857829003601f168201915b505050505081526020016008820180546104de90611048565b80601f016020809104026020016040519081016040528092919081815260200182805461050a90611048565b80156105575780601f1061052c57610100808354040283529160200191610557565b820191906000526020600020905b81548152906001019060200180831161053a57829003601f168201915b505050505081525050905060008160600151036105775750600092915050565b50600192915050565b50919050565b600081815260208190526040902060038101546001146105da5760405162461bcd60e51b815260206004820152600f60248201526e535741505f4e4f545f41435449564560881b6044820152606401610291565b42816002015411156105fe5760405162461bcd60e51b815260040161029190611022565b60026003820155600581015481546040516001600160a01b039092169181156108fc0291906000818181858888f19350505050158015610642573d6000803e3d6000fd5b506006810154600582015460048301546040519081526001600160a01b03928316929091169084907f6fa50d56c31f3efe0cb6ff06232bffce8fe8c4155e3cbb6f2d79dd12631c25229060200160405180910390a45050565b33344289116106bc5760405162461bcd60e51b815260040161029190611022565b600081116106fd5760405162461bcd60e51b815260206004820152600e60248201526d1253959053125117d05353d5539560921b6044820152606401610291565b6040516bffffffffffffffffffffffff19606084811b8216602084015289901b1660348201526048810182905260688101899052608881018a905260009060029060a80160408051601f198184030181529082905261075b9161107c565b602060405180830381855afa158015610778573d6000803e3d6000fd5b5050506040513d601f19601f8201168201806040525081019061079b9190611098565b600081815260208190526040902060030154909150156107eb5760405162461bcd60e51b815260206004820152600b60248201526a535741505f45584953545360a81b6044820152606401610291565b6040518061012001604052808381526020018c81526020018b8152602001600181526020018a8152602001846001600160a01b03168152602001896001600160a01b0316815260200188888080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250505090825250604080516020601f8901819004810282018101909252878152918101919088908890819084018382808284376000920182905250939094525050838152602081815260409182902084518155908401516001820155908301516002820155606083015160038201556080830151600482015560a08301516005820180546001600160a01b039283166001600160a01b03199182161790915560c085015160068401805491909316911617905560e083015190915060078201906109309082611100565b5061010082015160088201906109469082611100565b50905050876001600160a01b0316836001600160a01b0316827f767d0ffbc3d16cc51fc05770a22976e4b0fda9198e37878b76979429b2d5d88c858f8f8f8e8e8e8e60405161099c9897969594939291906111e9565b60405180910390a45050505050505050505050565b60006020819052908152604090208054600182015460028301546003840154600485015460058601546006870154600788018054979896979596949593946001600160a01b03938416949390921692610a0990611048565b80601f0160208091040260200160405190810160405280929190818152602001828054610a3590611048565b8015610a825780601f10610a5757610100808354040283529160200191610a82565b820191906000526020600020905b815481529060010190602001808311610a6557829003601f168201915b505050505090806008018054610a9790611048565b80601f0160208091040260200160405190810160405280929190818152602001828054610ac390611048565b8015610b105780601f10610ae557610100808354040283529160200191610b10565b820191906000526020600020905b815481529060010190602001808311610af357829003601f168201915b5050505050905089565b60008181526020818152604080832081516101208101835281548152600182015493810193909352600281015491830191909152600381015460608301526004810154608083015260058101546001600160a01b0390811660a084015260068201541660c08301526007810180548493929160e0840191610b9a90611048565b80601f0160208091040260200160405190810160405280929190818152602001828054610bc690611048565b8015610c135780601f10610be857610100808354040283529160200191610c13565b820191906000526020600020905b815481529060010190602001808311610bf657829003601f168201915b50505050508152602001600882018054610c2c90611048565b80601f0160208091040260200160405190810160405280929190818152602001828054610c5890611048565b8015610ca55780601f10610c7a57610100808354040283529160200191610ca5565b820191906000526020600020905b815481529060010190602001808311610c8857829003601f168201915b505050505081525050905060018160600151148015610cc75750428160400151105b15610cd55760049150610580565b6060015192915050565b634e487b7160e01b600052604160045260246000fd5b60006020808385031215610d0857600080fd5b823567ffffffffffffffff80821115610d2057600080fd5b818501915085601f830112610d3457600080fd5b813581811115610d4657610d46610cdf565b8060051b604051601f19603f83011681018181108582111715610d6b57610d6b610cdf565b604052918252848201925083810185019188831115610d8957600080fd5b938501935b82851015610da757843584529385019392850192610d8e565b98975050505050505050565b6020808252825182820181905260009190848201906040850190845b81811015610deb57835183529284019291840191600101610dcf565b50909695505050505050565b60008060408385031215610e0a57600080fd5b50508035926020909101359150565b600060208284031215610e2b57600080fd5b5035919050565b60008083601f840112610e4457600080fd5b50813567ffffffffffffffff811115610e5c57600080fd5b602083019150836020828501011115610e7457600080fd5b9250929050565b60008060008060008060008060c0898b031215610e9757600080fd5b88359750602089013596506040890135955060608901356001600160a01b0381168114610ec357600080fd5b9450608089013567ffffffffffffffff80821115610ee057600080fd5b610eec8c838d01610e32565b909650945060a08b0135915080821115610f0557600080fd5b50610f128b828c01610e32565b999c989b5096995094979396929594505050565b60005b83811015610f41578181015183820152602001610f29565b50506000910152565b60008151808452610f62816020860160208601610f26565b601f01601f19169290920160200192915050565b60006101208b83528a602084015289604084015288606084015287608084015260018060a01b0380881660a085015280871660c0850152508060e0840152610fc081840186610f4a565b9050828103610100840152610fd58185610f4a565b9c9b505050505050505050505050565b634e487b7160e01b600052603260045260246000fd5b60006001820161101b57634e487b7160e01b600052601160045260246000fd5b5060010190565b6020808252600c908201526b494e56414c49445f54494d4560a01b604082015260600190565b600181811c9082168061105c57607f821691505b60208210810361058057634e487b7160e01b600052602260045260246000fd5b6000825161108e818460208701610f26565b9190910192915050565b6000602082840312156110aa57600080fd5b5051919050565b601f8211156110fb57600081815260208120601f850160051c810160208610156110d85750805b601f850160051c820191505b818110156110f7578281556001016110e4565b5050505b505050565b815167ffffffffffffffff81111561111a5761111a610cdf565b61112e816111288454611048565b846110b1565b602080601f831160018114611163576000841561114b5750858301515b600019600386901b1c1916600185901b1785556110f7565b600085815260208120601f198616915b8281101561119257888601518255948401946001909101908401611173565b50858210156111b05787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b88815287602082015286604082015285606082015260c06080820152600061121560c0830186886111c0565b82810360a08401526112288185876111c0565b9b9a505050505050505050505056fea2646970667358221220c627a3bba4baa947ef5e6c36a4506e0dd9730e5317965ee38ec3030fbe154cf264736f6c63430008130033", + "deployedBytecode": "6080604052600436106100705760003560e01c80637249fbb61161004e5780637249fbb6146100fd578063d36320951461011d578063ec56a37314610130578063fbdf3b431461016557600080fd5b80632f21a6631461007557806363615149146100ab5780636c8244b8146100cd575b600080fd5b34801561008157600080fd5b50610095610090366004610cf5565b610193565b6040516100a29190610db3565b60405180910390f35b3480156100b757600080fd5b506100cb6100c6366004610df7565b610241565b005b3480156100d957600080fd5b506100ed6100e8366004610e19565b6103cc565b60405190151581526020016100a2565b34801561010957600080fd5b506100cb610118366004610e19565b610586565b6100cb61012b366004610e7b565b61069b565b34801561013c57600080fd5b5061015061014b366004610e19565b6109b1565b6040516100a299989796959493929190610f76565b34801561017157600080fd5b50610185610180366004610e19565b610b1a565b6040519081526020016100a2565b60606000825167ffffffffffffffff8111156101b1576101b1610cdf565b6040519080825280602002602001820160405280156101da578160200160208202803683370190505b50905060005b835181101561023a5761020b8482815181106101fe576101fe610fe5565b6020026020010151610b1a565b82828151811061021d5761021d610fe5565b60209081029190910101528061023281610ffb565b9150506101e0565b5092915050565b6000828152602081905260409020600381015460011461029a5760405162461bcd60e51b815260206004820152600f60248201526e535741505f4e4f545f41435449564560881b60448201526064015b60405180910390fd5b428160020154116102bd5760405162461bcd60e51b815260040161029190611022565b604080516020810184905201604051602081830303815290604052805190602001208160040154146103225760405162461bcd60e51b815260206004820152600e60248201526d1253959053125117d4d150d4915560921b6044820152606401610291565b600381810155600681015481546040516001600160a01b039092169181156108fc0291906000818181858888f19350505050158015610365573d6000803e3d6000fd5b506006810154600582015460048301546040516001600160a01b0393841693929092169186917f2d3a5ed13d0553389b4078e01264416362e34d23520fda797fbc17f3905ed131916103bf91888252602082015260400190565b60405180910390a4505050565b60008181526020818152604080832081516101208101835281548152600182015493810193909352600281015491830191909152600381015460608301526004810154608083015260058101546001600160a01b0390811660a084015260068201541660c08301526007810180548493929160e084019161044c90611048565b80601f016020809104026020016040519081016040528092919081815260200182805461047890611048565b80156104c55780601f1061049a576101008083540402835291602001916104c5565b820191906000526020600020905b8154815290600101906020018083116104a857829003601f168201915b505050505081526020016008820180546104de90611048565b80601f016020809104026020016040519081016040528092919081815260200182805461050a90611048565b80156105575780601f1061052c57610100808354040283529160200191610557565b820191906000526020600020905b81548152906001019060200180831161053a57829003601f168201915b505050505081525050905060008160600151036105775750600092915050565b50600192915050565b50919050565b600081815260208190526040902060038101546001146105da5760405162461bcd60e51b815260206004820152600f60248201526e535741505f4e4f545f41435449564560881b6044820152606401610291565b42816002015411156105fe5760405162461bcd60e51b815260040161029190611022565b60026003820155600581015481546040516001600160a01b039092169181156108fc0291906000818181858888f19350505050158015610642573d6000803e3d6000fd5b506006810154600582015460048301546040519081526001600160a01b03928316929091169084907f6fa50d56c31f3efe0cb6ff06232bffce8fe8c4155e3cbb6f2d79dd12631c25229060200160405180910390a45050565b33344289116106bc5760405162461bcd60e51b815260040161029190611022565b600081116106fd5760405162461bcd60e51b815260206004820152600e60248201526d1253959053125117d05353d5539560921b6044820152606401610291565b6040516bffffffffffffffffffffffff19606084811b8216602084015289901b1660348201526048810182905260688101899052608881018a905260009060029060a80160408051601f198184030181529082905261075b9161107c565b602060405180830381855afa158015610778573d6000803e3d6000fd5b5050506040513d601f19601f8201168201806040525081019061079b9190611098565b600081815260208190526040902060030154909150156107eb5760405162461bcd60e51b815260206004820152600b60248201526a535741505f45584953545360a81b6044820152606401610291565b6040518061012001604052808381526020018c81526020018b8152602001600181526020018a8152602001846001600160a01b03168152602001896001600160a01b0316815260200188888080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250505090825250604080516020601f8901819004810282018101909252878152918101919088908890819084018382808284376000920182905250939094525050838152602081815260409182902084518155908401516001820155908301516002820155606083015160038201556080830151600482015560a08301516005820180546001600160a01b039283166001600160a01b03199182161790915560c085015160068401805491909316911617905560e083015190915060078201906109309082611100565b5061010082015160088201906109469082611100565b50905050876001600160a01b0316836001600160a01b0316827f767d0ffbc3d16cc51fc05770a22976e4b0fda9198e37878b76979429b2d5d88c858f8f8f8e8e8e8e60405161099c9897969594939291906111e9565b60405180910390a45050505050505050505050565b60006020819052908152604090208054600182015460028301546003840154600485015460058601546006870154600788018054979896979596949593946001600160a01b03938416949390921692610a0990611048565b80601f0160208091040260200160405190810160405280929190818152602001828054610a3590611048565b8015610a825780601f10610a5757610100808354040283529160200191610a82565b820191906000526020600020905b815481529060010190602001808311610a6557829003601f168201915b505050505090806008018054610a9790611048565b80601f0160208091040260200160405190810160405280929190818152602001828054610ac390611048565b8015610b105780601f10610ae557610100808354040283529160200191610b10565b820191906000526020600020905b815481529060010190602001808311610af357829003601f168201915b5050505050905089565b60008181526020818152604080832081516101208101835281548152600182015493810193909352600281015491830191909152600381015460608301526004810154608083015260058101546001600160a01b0390811660a084015260068201541660c08301526007810180548493929160e0840191610b9a90611048565b80601f0160208091040260200160405190810160405280929190818152602001828054610bc690611048565b8015610c135780601f10610be857610100808354040283529160200191610c13565b820191906000526020600020905b815481529060010190602001808311610bf657829003601f168201915b50505050508152602001600882018054610c2c90611048565b80601f0160208091040260200160405190810160405280929190818152602001828054610c5890611048565b8015610ca55780601f10610c7a57610100808354040283529160200191610ca5565b820191906000526020600020905b815481529060010190602001808311610c8857829003601f168201915b505050505081525050905060018160600151148015610cc75750428160400151105b15610cd55760049150610580565b6060015192915050565b634e487b7160e01b600052604160045260246000fd5b60006020808385031215610d0857600080fd5b823567ffffffffffffffff80821115610d2057600080fd5b818501915085601f830112610d3457600080fd5b813581811115610d4657610d46610cdf565b8060051b604051601f19603f83011681018181108582111715610d6b57610d6b610cdf565b604052918252848201925083810185019188831115610d8957600080fd5b938501935b82851015610da757843584529385019392850192610d8e565b98975050505050505050565b6020808252825182820181905260009190848201906040850190845b81811015610deb57835183529284019291840191600101610dcf565b50909695505050505050565b60008060408385031215610e0a57600080fd5b50508035926020909101359150565b600060208284031215610e2b57600080fd5b5035919050565b60008083601f840112610e4457600080fd5b50813567ffffffffffffffff811115610e5c57600080fd5b602083019150836020828501011115610e7457600080fd5b9250929050565b60008060008060008060008060c0898b031215610e9757600080fd5b88359750602089013596506040890135955060608901356001600160a01b0381168114610ec357600080fd5b9450608089013567ffffffffffffffff80821115610ee057600080fd5b610eec8c838d01610e32565b909650945060a08b0135915080821115610f0557600080fd5b50610f128b828c01610e32565b999c989b5096995094979396929594505050565b60005b83811015610f41578181015183820152602001610f29565b50506000910152565b60008151808452610f62816020860160208601610f26565b601f01601f19169290920160200192915050565b60006101208b83528a602084015289604084015288606084015287608084015260018060a01b0380881660a085015280871660c0850152508060e0840152610fc081840186610f4a565b9050828103610100840152610fd58185610f4a565b9c9b505050505050505050505050565b634e487b7160e01b600052603260045260246000fd5b60006001820161101b57634e487b7160e01b600052601160045260246000fd5b5060010190565b6020808252600c908201526b494e56414c49445f54494d4560a01b604082015260600190565b600181811c9082168061105c57607f821691505b60208210810361058057634e487b7160e01b600052602260045260246000fd5b6000825161108e818460208701610f26565b9190910192915050565b6000602082840312156110aa57600080fd5b5051919050565b601f8211156110fb57600081815260208120601f850160051c810160208610156110d85750805b601f850160051c820191505b818110156110f7578281556001016110e4565b5050505b505050565b815167ffffffffffffffff81111561111a5761111a610cdf565b61112e816111288454611048565b846110b1565b602080601f831160018114611163576000841561114b5750858301515b600019600386901b1c1916600185901b1785556110f7565b600085815260208120601f198616915b8281101561119257888601518255948401946001909101908401611173565b50858210156111b05787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b88815287602082015286604082015285606082015260c06080820152600061121560c0830186886111c0565b82810360a08401526112288185876111c0565b9b9a505050505050505050505056fea2646970667358221220c627a3bba4baa947ef5e6c36a4506e0dd9730e5317965ee38ec3030fbe154cf264736f6c63430008130033", + "sourceMap": "25:4088:0:-:0;;;;;;;;;;;;;;;;;;;", + "deployedSourceMap": "25:4088:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3210:303;;;;;;;;;;-1:-1:-1;3210:303:0;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;2383:466;;;;;;;;;;-1:-1:-1;2383:466:0;;;;;:::i;:::-;;:::i;:::-;;3854:257;;;;;;;;;;-1:-1:-1;3854:257:0;;;;;:::i;:::-;;:::i;:::-;;;2506:14:1;;2499:22;2481:41;;2469:2;2454:18;3854:257:0;2341:187:1;2855:349:0;;;;;;;;;;-1:-1:-1;2855:349:0;;;;;:::i;:::-;;:::i;1438:939::-;;;;;;:::i;:::-;;:::i;53:49::-;;;;;;;;;;-1:-1:-1;53:49:0;;;;;:::i;:::-;;:::i;:::-;;;;;;;;;;;;;;;:::i;3519:329::-;;;;;;;;;;-1:-1:-1;3519:329:0;;;;;:::i;:::-;;:::i;:::-;;;5678:25:1;;;5666:2;5651:18;3519:329:0;5532:177:1;3210:303:0;3272:16;3300:23;3340:3;:10;3326:25;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3326:25:0;;3300:51;;3367:13;3362:121;3394:3;:10;3386:5;:18;3362:121;;;3445:27;3461:3;3465:5;3461:10;;;;;;;;:::i;:::-;;;;;;;3445:15;:27::i;:::-;3429:6;3436:5;3429:13;;;;;;;;:::i;:::-;;;;;;;;;;:43;3406:7;;;;:::i;:::-;;;;3362:121;;;-1:-1:-1;3500:6:0;3210:303;-1:-1:-1;;3210:303:0:o;2383:466::-;2448:22;2473:13;;;;;;;;;;2505:8;;;;323:1;2505:18;2497:46;;;;-1:-1:-1;;;2497:46:0;;6285:2:1;2497:46:0;;;6267:21:1;6324:2;6304:18;;;6297:30;-1:-1:-1;;;6343:18:1;;;6336:45;6398:18;;2497:46:0;;;;;;;;;2577:15;2562:1;:12;;;:30;2554:55;;;;-1:-1:-1;;;2554:55:0;;;;;;;:::i;:::-;2652:24;;;;;;6897:19:1;;;6932:12;2652:24:0;;;;;;;;;;;;2642:35;;;;;;2628:1;:10;;;:49;2620:76;;;;-1:-1:-1;;;2620:76:0;;7157:2:1;2620:76:0;;;7139:21:1;7196:2;7176:18;;;7169:30;-1:-1:-1;;;7215:18:1;;;7208:44;7269:18;;2620:76:0;6955:338:1;2620:76:0;479:1;2707:8;;;:20;2738:10;;;;2758:13;;2738:34;;-1:-1:-1;;;;;2738:10:0;;;;:34;;;;;2758:13;2738:10;:34;:10;:34;2758:13;2738:10;:34;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2831:10:0;;;;2821:8;;;;2809:10;;;;2788:54;;-1:-1:-1;;;;;2831:10:0;;;;2821:8;;;;;2797:2;;2788:54;;;;2801:6;7472:25:1;;7528:2;7513:18;;7506:34;7460:2;7445:18;;7298:248;2788:54:0;;;;;;;;2438:411;2383:466;;:::o;3854:257::-;3911:11;3969:13;;;;;;;;;;;3934:48;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;3934:48:0;;;;;;;;;;;;;;;;;;;;;3911:11;;3934:48;3969:13;3934:48;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;247:1;3997:12;:19;;;:27;3993:112;;-1:-1:-1;4047:5:0;;3854:257;-1:-1:-1;;3854:257:0:o;3993:112::-;-1:-1:-1;4090:4:0;;3854:257;-1:-1:-1;;3854:257:0:o;3993:112::-;3924:187;3854:257;;;:::o;2855:349::-;2902:22;2927:13;;;;;;;;;;2959:8;;;;323:1;2959:18;2951:46;;;;-1:-1:-1;;;2951:46:0;;6285:2:1;2951:46:0;;;6267:21:1;6324:2;6304:18;;;6297:30;-1:-1:-1;;;6343:18:1;;;6336:45;6398:18;;2951:46:0;6083:339:1;2951:46:0;3032:15;3016:1;:12;;;:31;;3008:56;;;;-1:-1:-1;;;3008:56:0;;;;;;;:::i;:::-;407:1;3075:8;;;:19;3105:8;;;;3123:13;;3105:32;;-1:-1:-1;;;;;3105:8:0;;;;:32;;;;;3123:13;3105:8;:32;:8;:32;3123:13;3105:8;:32;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3186:10:0;;;;3176:8;;;;3164:10;;;;3153:44;;5678:25:1;;;-1:-1:-1;;;;;3186:10:0;;;;3176:8;;;;3160:2;;3153:44;;5666:2:1;5651:18;3153:44:0;;;;;;;2892:312;2855:349;:::o;1438:939::-;1721:10;1764:9;1805:15;1792:28;;1784:53;;;;-1:-1:-1;;;1784:53:0;;;;;;;:::i;:::-;1870:1;1856:11;:15;1848:42;;;;-1:-1:-1;;;1848:42:0;;8320:2:1;1848:42:0;;;8302:21:1;8359:2;8339:18;;;8332:30;-1:-1:-1;;;8378:18:1;;;8371:44;8432:18;;1848:42:0;8118:338:1;1848:42:0;1921:69;;-1:-1:-1;;8804:2:1;8800:15;;;8796:24;;1921:69:0;;;8784:37:1;8855:15;;;8851:24;8837:12;;;8830:46;8892:12;;;8885:28;;;8929:12;;;8922:28;;;8966:13;;;8959:29;;;1901:10:0;;1914:77;;9004:13:1;;1921:69:0;;;-1:-1:-1;;1921:69:0;;;;;;;;;;1914:77;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;247:1;2010:13;;;;;;;;;;:20;;;1901:90;;-1:-1:-1;2010:28:0;2002:52;;;;-1:-1:-1;;;2002:52:0;;9711:2:1;2002:52:0;;;9693:21:1;9750:2;9730:18;;;9723:30;-1:-1:-1;;;9769:18:1;;;9762:41;9820:18;;2002:52:0;9509:335:1;2002:52:0;2081:139;;;;;;;;2107:11;2081:139;;;;2120:12;2081:139;;;;2134:10;2081:139;;;;323:1;2081:139;;;;2154:8;2081:139;;;;2164:6;-1:-1:-1;;;;;2081:139:0;;;;;2172:8;-1:-1:-1;;;;;2081:139:0;;;;;2182:13;;2081:139;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;2081:139:0;;;-1:-1:-1;2081:139:0;;;;;;;;;;;;;;;;;;;;;;;;;;;2197:13;;;;;;2081:139;;2197:13;;;;2081:139;;;;;;;;-1:-1:-1;2081:139:0;;;;-1:-1:-1;;2065:13:0;;;;;;;;;;;;:155;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2065:155:0;;;-1:-1:-1;;;;;;2065:155:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:13;;-1:-1:-1;2065:155:0;;;;;;;;:::i;:::-;-1:-1:-1;2065:155:0;;;;;;;;;;;;:::i;:::-;;;;;2322:8;-1:-1:-1;;;;;2236:134:0;2314:6;-1:-1:-1;;;;;2236:134:0;2300:2;2236:134;2261:11;2274:12;2288:10;2304:8;2332:13;;2347;;2236:134;;;;;;;;;;;;;:::i;:::-;;;;;;;;1678:699;;;1438:939;;;;;;;;:::o;53:49::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;53:49:0;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;3519:329::-;3577:14;3638:13;;;;;;;;;;;3603:48;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;3603:48:0;;;;;;;;;;;;;;;;;;;;;3577:14;;3603:48;3638:13;3603:48;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;323:1;3666:12;:19;;;:29;:74;;;;;3725:15;3699:12;:23;;;:41;3666:74;3662:180;;;550:1;3756:16;;3662:180;;;3812:19;;;;3519:329;-1:-1:-1;;3519:329:0:o;14:127:1:-;75:10;70:3;66:20;63:1;56:31;106:4;103:1;96:15;130:4;127:1;120:15;146:1115;230:6;261:2;304;292:9;283:7;279:23;275:32;272:52;;;320:1;317;310:12;272:52;360:9;347:23;389:18;430:2;422:6;419:14;416:34;;;446:1;443;436:12;416:34;484:6;473:9;469:22;459:32;;529:7;522:4;518:2;514:13;510:27;500:55;;551:1;548;541:12;500:55;587:2;574:16;609:2;605;602:10;599:36;;;615:18;;:::i;:::-;661:2;658:1;654:10;693:2;687:9;756:2;752:7;747:2;743;739:11;735:25;727:6;723:38;811:6;799:10;796:22;791:2;779:10;776:18;773:46;770:72;;;822:18;;:::i;:::-;858:2;851:22;908:18;;;942:15;;;;-1:-1:-1;984:11:1;;;980:20;;;1012:19;;;1009:39;;;1044:1;1041;1034:12;1009:39;1068:11;;;;1088:142;1104:6;1099:3;1096:15;1088:142;;;1170:17;;1158:30;;1121:12;;;;1208;;;;1088:142;;;1249:6;146:1115;-1:-1:-1;;;;;;;;146:1115:1:o;1266:632::-;1437:2;1489:21;;;1559:13;;1462:18;;;1581:22;;;1408:4;;1437:2;1660:15;;;;1634:2;1619:18;;;1408:4;1703:169;1717:6;1714:1;1711:13;1703:169;;;1778:13;;1766:26;;1847:15;;;;1812:12;;;;1739:1;1732:9;1703:169;;;-1:-1:-1;1889:3:1;;1266:632;-1:-1:-1;;;;;;1266:632:1:o;1903:248::-;1971:6;1979;2032:2;2020:9;2011:7;2007:23;2003:32;2000:52;;;2048:1;2045;2038:12;2000:52;-1:-1:-1;;2071:23:1;;;2141:2;2126:18;;;2113:32;;-1:-1:-1;1903:248:1:o;2156:180::-;2215:6;2268:2;2256:9;2247:7;2243:23;2239:32;2236:52;;;2284:1;2281;2274:12;2236:52;-1:-1:-1;2307:23:1;;2156:180;-1:-1:-1;2156:180:1:o;2533:348::-;2585:8;2595:6;2649:3;2642:4;2634:6;2630:17;2626:27;2616:55;;2667:1;2664;2657:12;2616:55;-1:-1:-1;2690:20:1;;2733:18;2722:30;;2719:50;;;2765:1;2762;2755:12;2719:50;2802:4;2794:6;2790:17;2778:29;;2854:3;2847:4;2838:6;2830;2826:19;2822:30;2819:39;2816:59;;;2871:1;2868;2861:12;2816:59;2533:348;;;;;:::o;2886:1110::-;3022:6;3030;3038;3046;3054;3062;3070;3078;3131:3;3119:9;3110:7;3106:23;3102:33;3099:53;;;3148:1;3145;3138:12;3099:53;3171:23;;;-1:-1:-1;3241:2:1;3226:18;;3213:32;;-1:-1:-1;3292:2:1;3277:18;;3264:32;;-1:-1:-1;3346:2:1;3331:18;;3318:32;-1:-1:-1;;;;;3379:31:1;;3369:42;;3359:70;;3425:1;3422;3415:12;3359:70;3448:5;-1:-1:-1;3504:3:1;3489:19;;3476:33;3528:18;3558:14;;;3555:34;;;3585:1;3582;3575:12;3555:34;3624:59;3675:7;3666:6;3655:9;3651:22;3624:59;:::i;:::-;3702:8;;-1:-1:-1;3598:85:1;-1:-1:-1;3790:3:1;3775:19;;3762:33;;-1:-1:-1;3807:16:1;;;3804:36;;;3836:1;3833;3826:12;3804:36;;3875:61;3928:7;3917:8;3906:9;3902:24;3875:61;:::i;:::-;2886:1110;;;;-1:-1:-1;2886:1110:1;;-1:-1:-1;2886:1110:1;;;;;;3955:8;-1:-1:-1;;;2886:1110:1:o;4001:250::-;4086:1;4096:113;4110:6;4107:1;4104:13;4096:113;;;4186:11;;;4180:18;4167:11;;;4160:39;4132:2;4125:10;4096:113;;;-1:-1:-1;;4243:1:1;4225:16;;4218:27;4001:250::o;4256:271::-;4298:3;4336:5;4330:12;4363:6;4358:3;4351:19;4379:76;4448:6;4441:4;4436:3;4432:14;4425:4;4418:5;4414:16;4379:76;:::i;:::-;4509:2;4488:15;-1:-1:-1;;4484:29:1;4475:39;;;;4516:4;4471:50;;4256:271;-1:-1:-1;;4256:271:1:o;4532:995::-;4920:4;4949:3;4979:6;4968:9;4961:25;5022:6;5017:2;5006:9;5002:18;4995:34;5065:6;5060:2;5049:9;5045:18;5038:34;5108:6;5103:2;5092:9;5088:18;5081:34;5152:6;5146:3;5135:9;5131:19;5124:35;5195:1;5191;5186:3;5182:11;5178:19;5246:2;5238:6;5234:15;5228:3;5217:9;5213:19;5206:44;5299:2;5291:6;5287:15;5281:3;5270:9;5266:19;5259:44;;5340:2;5334:3;5323:9;5319:19;5312:31;5366:45;5407:2;5396:9;5392:18;5384:6;5366:45;:::i;:::-;5352:59;;5460:9;5452:6;5448:22;5442:3;5431:9;5427:19;5420:51;5488:33;5514:6;5506;5488:33;:::i;:::-;5480:41;4532:995;-1:-1:-1;;;;;;;;;;;;4532:995:1:o;5714:127::-;5775:10;5770:3;5766:20;5763:1;5756:31;5806:4;5803:1;5796:15;5830:4;5827:1;5820:15;5846:232;5885:3;5906:17;;;5903:140;;5965:10;5960:3;5956:20;5953:1;5946:31;6000:4;5997:1;5990:15;6028:4;6025:1;6018:15;5903:140;-1:-1:-1;6070:1:1;6059:13;;5846:232::o;6427:336::-;6629:2;6611:21;;;6668:2;6648:18;;;6641:30;-1:-1:-1;;;6702:2:1;6687:18;;6680:42;6754:2;6739:18;;6427:336::o;7551:380::-;7630:1;7626:12;;;;7673;;;7694:61;;7748:4;7740:6;7736:17;7726:27;;7694:61;7801:2;7793:6;7790:14;7770:18;7767:38;7764:161;;7847:10;7842:3;7838:20;7835:1;7828:31;7882:4;7879:1;7872:15;7910:4;7907:1;7900:15;9028:287;9157:3;9195:6;9189:13;9211:66;9270:6;9265:3;9258:4;9250:6;9246:17;9211:66;:::i;:::-;9293:16;;;;;9028:287;-1:-1:-1;;9028:287:1:o;9320:184::-;9390:6;9443:2;9431:9;9422:7;9418:23;9414:32;9411:52;;;9459:1;9456;9449:12;9411:52;-1:-1:-1;9482:16:1;;9320:184;-1:-1:-1;9320:184:1:o;9975:545::-;10077:2;10072:3;10069:11;10066:448;;;10113:1;10138:5;10134:2;10127:17;10183:4;10179:2;10169:19;10253:2;10241:10;10237:19;10234:1;10230:27;10224:4;10220:38;10289:4;10277:10;10274:20;10271:47;;;-1:-1:-1;10312:4:1;10271:47;10367:2;10362:3;10358:12;10355:1;10351:20;10345:4;10341:31;10331:41;;10422:82;10440:2;10433:5;10430:13;10422:82;;;10485:17;;;10466:1;10455:13;10422:82;;;10426:3;;;10066:448;9975:545;;;:::o;10696:1352::-;10822:3;10816:10;10849:18;10841:6;10838:30;10835:56;;;10871:18;;:::i;:::-;10900:97;10990:6;10950:38;10982:4;10976:11;10950:38;:::i;:::-;10944:4;10900:97;:::i;:::-;11052:4;;11116:2;11105:14;;11133:1;11128:663;;;;11835:1;11852:6;11849:89;;;-1:-1:-1;11904:19:1;;;11898:26;11849:89;-1:-1:-1;;10653:1:1;10649:11;;;10645:24;10641:29;10631:40;10677:1;10673:11;;;10628:57;11951:81;;11098:944;;11128:663;9922:1;9915:14;;;9959:4;9946:18;;-1:-1:-1;;11164:20:1;;;11282:236;11296:7;11293:1;11290:14;11282:236;;;11385:19;;;11379:26;11364:42;;11477:27;;;;11445:1;11433:14;;;;11312:19;;11282:236;;;11286:3;11546:6;11537:7;11534:19;11531:201;;;11607:19;;;11601:26;-1:-1:-1;;11690:1:1;11686:14;;;11702:3;11682:24;11678:37;11674:42;11659:58;11644:74;;11531:201;-1:-1:-1;;;;;11778:1:1;11762:14;;;11758:22;11745:36;;-1:-1:-1;10696:1352:1:o;12053:267::-;12142:6;12137:3;12130:19;12194:6;12187:5;12180:4;12175:3;12171:14;12158:43;-1:-1:-1;12246:1:1;12221:16;;;12239:4;12217:27;;;12210:38;;;;12302:2;12281:15;;;-1:-1:-1;;12277:29:1;12268:39;;;12264:50;;12053:267::o;12325:725::-;12654:6;12643:9;12636:25;12697:6;12692:2;12681:9;12677:18;12670:34;12740:6;12735:2;12724:9;12720:18;12713:34;12783:6;12778:2;12767:9;12763:18;12756:34;12827:3;12821;12810:9;12806:19;12799:32;12617:4;12854:63;12912:3;12901:9;12897:19;12889:6;12881;12854:63;:::i;:::-;12966:9;12958:6;12954:22;12948:3;12937:9;12933:19;12926:51;12994:50;13037:6;13029;13021;12994:50;:::i;:::-;12986:58;12325:725;-1:-1:-1;;;;;;;;;;;12325:725:1:o", + "sourcePath": "/workspaces/cacti/packages/cactus-plugin-htlc-eth-besu/src/main/solidity/contracts/HashTimeLock.sol", + "compiler": { + "name": "solc", + "version": "0.8.19+commit.7dd6d404" + }, + "ast": { + "absolutePath": "/workspaces/cacti/packages/cactus-plugin-htlc-eth-besu/src/main/solidity/contracts/HashTimeLock.sol", + "exportedSymbols": { + "HashTimeLock": [ + 414 + ] + }, + "id": 415, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1, + "literals": [ + "solidity", + "0.8", + ".19" + ], + "nodeType": "PragmaDirective", + "src": "0:23:0" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "HashTimeLock", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 414, + "linearizedBaseContracts": [ + 414 + ], + "name": "HashTimeLock", + "nameLocation": "34:12:0", + "nodeType": "ContractDefinition", + "nodes": [ { - "name": "value0", - "nodeType": "YulIdentifier", - "src": "2357:6:3" - } - ] - }, - { - "nodeType": "YulAssignment", - "src": "2399:42:3", - "value": { - "arguments": [ - { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "2426:9:3" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "2437:2:3", - "type": "", - "value": "32" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "2422:3:3" + "constant": false, + "functionSelector": "ec56a373", + "id": 6, + "mutability": "mutable", + "name": "contracts", + "nameLocation": "93:9:0", + "nodeType": "VariableDeclaration", + "scope": 414, + "src": "53:49:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_LockContract_$40_storage_$", + "typeString": "mapping(bytes32 => struct HashTimeLock.LockContract)" + }, + "typeName": { + "id": 5, + "keyName": "", + "keyNameLocation": "-1:-1:-1", + "keyType": { + "id": 2, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "61:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Mapping", + "src": "53:32:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_LockContract_$40_storage_$", + "typeString": "mapping(bytes32 => struct HashTimeLock.LockContract)" + }, + "valueName": "", + "valueNameLocation": "-1:-1:-1", + "valueType": { + "id": 4, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3, + "name": "LockContract", + "nameLocations": [ + "72:12:0" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 40, + "src": "72:12:0" + }, + "referencedDeclaration": 40, + "src": "72:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_LockContract_$40_storage_ptr", + "typeString": "struct HashTimeLock.LockContract" + } + } }, - "nodeType": "YulFunctionCall", - "src": "2422:18:3" - } - ], - "functionName": { - "name": "calldataload", - "nodeType": "YulIdentifier", - "src": "2409:12:3" + "visibility": "public" }, - "nodeType": "YulFunctionCall", - "src": "2409:32:3" - }, - "variableNames": [ { - "name": "value1", - "nodeType": "YulIdentifier", - "src": "2399:6:3" - } - ] - }, - { - "nodeType": "YulAssignment", - "src": "2450:42:3", - "value": { - "arguments": [ - { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "2477:9:3" - }, - { + "constant": true, + "id": 9, + "mutability": "constant", + "name": "INIT", + "nameLocation": "240:4:0", + "nodeType": "VariableDeclaration", + "scope": 414, + "src": "223:25:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "223:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "hexValue": "30", + "id": 8, + "isConstant": false, + "isLValue": false, + "isPure": true, "kind": "number", - "nodeType": "YulLiteral", - "src": "2488:2:3", - "type": "", - "value": "64" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "2473:3:3" + "lValueRequested": false, + "nodeType": "Literal", + "src": "247:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" }, - "nodeType": "YulFunctionCall", - "src": "2473:18:3" - } - ], - "functionName": { - "name": "calldataload", - "nodeType": "YulIdentifier", - "src": "2460:12:3" + "visibility": "internal" }, - "nodeType": "YulFunctionCall", - "src": "2460:32:3" - }, - "variableNames": [ { - "name": "value2", - "nodeType": "YulIdentifier", - "src": "2450:6:3" - } - ] - }, - { - "nodeType": "YulVariableDeclaration", - "src": "2501:45:3", - "value": { - "arguments": [ - { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "2531:9:3" - }, - { + "constant": true, + "id": 12, + "mutability": "constant", + "name": "ACTIVE", + "nameLocation": "314:6:0", + "nodeType": "VariableDeclaration", + "scope": 414, + "src": "297:27:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 10, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "297:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "hexValue": "31", + "id": 11, + "isConstant": false, + "isLValue": false, + "isPure": true, "kind": "number", - "nodeType": "YulLiteral", - "src": "2542:2:3", - "type": "", - "value": "96" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "2527:3:3" + "lValueRequested": false, + "nodeType": "Literal", + "src": "323:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" }, - "nodeType": "YulFunctionCall", - "src": "2527:18:3" - } - ], - "functionName": { - "name": "calldataload", - "nodeType": "YulIdentifier", - "src": "2514:12:3" + "visibility": "internal" }, - "nodeType": "YulFunctionCall", - "src": "2514:32:3" - }, - "variables": [ { - "name": "value", - "nodeType": "YulTypedName", - "src": "2505:5:3", - "type": "" - } - ] - }, - { - "body": { - "nodeType": "YulBlock", - "src": "2609:26:3", - "statements": [ - { - "expression": { - "arguments": [ - { - "name": "value4", - "nodeType": "YulIdentifier", - "src": "2618:6:3" - }, - { - "name": "value4", - "nodeType": "YulIdentifier", - "src": "2626:6:3" + "constant": true, + "id": 15, + "mutability": "constant", + "name": "REFUNDED", + "nameLocation": "396:8:0", + "nodeType": "VariableDeclaration", + "scope": 414, + "src": "379:29:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "379:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" } - ], - "functionName": { - "name": "revert", - "nodeType": "YulIdentifier", - "src": "2611:6:3" - }, - "nodeType": "YulFunctionCall", - "src": "2611:22:3" }, - "nodeType": "YulExpressionStatement", - "src": "2611:22:3" - } - ] - }, - "condition": { - "arguments": [ - { - "arguments": [ - { - "name": "value", - "nodeType": "YulIdentifier", - "src": "2568:5:3" - }, - { - "arguments": [ - { - "name": "value", - "nodeType": "YulIdentifier", - "src": "2579:5:3" - }, - { - "arguments": [ - { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "2594:3:3", - "type": "", - "value": "160" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "2599:1:3", - "type": "", - "value": "1" - } - ], - "functionName": { - "name": "shl", - "nodeType": "YulIdentifier", - "src": "2590:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "2590:11:3" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "2603:1:3", - "type": "", - "value": "1" - } - ], - "functionName": { - "name": "sub", - "nodeType": "YulIdentifier", - "src": "2586:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "2586:19:3" - } - ], - "functionName": { - "name": "and", - "nodeType": "YulIdentifier", - "src": "2575:3:3" + "value": { + "hexValue": "32", + "id": 14, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "407:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" }, - "nodeType": "YulFunctionCall", - "src": "2575:31:3" - } - ], - "functionName": { - "name": "eq", - "nodeType": "YulIdentifier", - "src": "2565:2:3" + "value": "2" }, - "nodeType": "YulFunctionCall", - "src": "2565:42:3" - } - ], - "functionName": { - "name": "iszero", - "nodeType": "YulIdentifier", - "src": "2558:6:3" + "visibility": "internal" }, - "nodeType": "YulFunctionCall", - "src": "2558:50:3" - }, - "nodeType": "YulIf", - "src": "2555:2:3" - }, - { - "nodeType": "YulAssignment", - "src": "2644:15:3", - "value": { - "name": "value", - "nodeType": "YulIdentifier", - "src": "2654:5:3" - }, - "variableNames": [ { - "name": "value3", - "nodeType": "YulIdentifier", - "src": "2644:6:3" - } - ] - }, - { - "nodeType": "YulVariableDeclaration", - "src": "2668:47:3", - "value": { - "arguments": [ - { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "2699:9:3" - }, - { + "constant": true, + "id": 18, + "mutability": "constant", + "name": "WITHDRAWN", + "nameLocation": "467:9:0", + "nodeType": "VariableDeclaration", + "scope": 414, + "src": "450:30:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "450:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "hexValue": "33", + "id": 17, + "isConstant": false, + "isLValue": false, + "isPure": true, "kind": "number", - "nodeType": "YulLiteral", - "src": "2710:3:3", - "type": "", - "value": "128" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "2695:3:3" + "lValueRequested": false, + "nodeType": "Literal", + "src": "479:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" }, - "nodeType": "YulFunctionCall", - "src": "2695:19:3" - } - ], - "functionName": { - "name": "calldataload", - "nodeType": "YulIdentifier", - "src": "2682:12:3" + "visibility": "internal" }, - "nodeType": "YulFunctionCall", - "src": "2682:33:3" - }, - "variables": [ { - "name": "offset", - "nodeType": "YulTypedName", - "src": "2672:6:3", - "type": "" - } - ] - }, - { - "nodeType": "YulVariableDeclaration", - "src": "2724:28:3", - "value": { - "kind": "number", - "nodeType": "YulLiteral", - "src": "2734:18:3", - "type": "", - "value": "0xffffffffffffffff" - }, - "variables": [ - { - "name": "_1", - "nodeType": "YulTypedName", - "src": "2728:2:3", - "type": "" - } - ] - }, - { - "body": { - "nodeType": "YulBlock", - "src": "2779:26:3", - "statements": [ - { - "expression": { - "arguments": [ - { - "name": "value4", - "nodeType": "YulIdentifier", - "src": "2788:6:3" - }, - { - "name": "value4", - "nodeType": "YulIdentifier", - "src": "2796:6:3" - } - ], - "functionName": { - "name": "revert", - "nodeType": "YulIdentifier", - "src": "2781:6:3" - }, - "nodeType": "YulFunctionCall", - "src": "2781:22:3" - }, - "nodeType": "YulExpressionStatement", - "src": "2781:22:3" - } - ] - }, - "condition": { - "arguments": [ - { - "name": "offset", - "nodeType": "YulIdentifier", - "src": "2767:6:3" - }, - { - "name": "_1", - "nodeType": "YulIdentifier", - "src": "2775:2:3" - } - ], - "functionName": { - "name": "gt", - "nodeType": "YulIdentifier", - "src": "2764:2:3" - }, - "nodeType": "YulFunctionCall", - "src": "2764:14:3" - }, - "nodeType": "YulIf", - "src": "2761:2:3" - }, - { - "nodeType": "YulVariableDeclaration", - "src": "2814:87:3", - "value": { - "arguments": [ - { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "2873:9:3" - }, - { - "name": "offset", - "nodeType": "YulIdentifier", - "src": "2884:6:3" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "2869:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "2869:22:3" - }, - { - "name": "dataEnd", - "nodeType": "YulIdentifier", - "src": "2893:7:3" - } - ], - "functionName": { - "name": "abi_decode_t_string_calldata", - "nodeType": "YulIdentifier", - "src": "2840:28:3" - }, - "nodeType": "YulFunctionCall", - "src": "2840:61:3" - }, - "variables": [ - { - "name": "value4_1", - "nodeType": "YulTypedName", - "src": "2818:8:3", - "type": "" - }, - { - "name": "value5_1", - "nodeType": "YulTypedName", - "src": "2828:8:3", - "type": "" - } - ] - }, - { - "nodeType": "YulAssignment", - "src": "2910:18:3", - "value": { - "name": "value4_1", - "nodeType": "YulIdentifier", - "src": "2920:8:3" - }, - "variableNames": [ - { - "name": "value4", - "nodeType": "YulIdentifier", - "src": "2910:6:3" - } - ] - }, - { - "nodeType": "YulAssignment", - "src": "2937:18:3", - "value": { - "name": "value5_1", - "nodeType": "YulIdentifier", - "src": "2947:8:3" - }, - "variableNames": [ - { - "name": "value5", - "nodeType": "YulIdentifier", - "src": "2937:6:3" - } - ] - }, - { - "nodeType": "YulVariableDeclaration", - "src": "2964:49:3", - "value": { - "arguments": [ - { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "2997:9:3" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "3008:3:3", - "type": "", - "value": "160" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "2993:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "2993:19:3" - } - ], - "functionName": { - "name": "calldataload", - "nodeType": "YulIdentifier", - "src": "2980:12:3" - }, - "nodeType": "YulFunctionCall", - "src": "2980:33:3" - }, - "variables": [ - { - "name": "offset_1", - "nodeType": "YulTypedName", - "src": "2968:8:3", - "type": "" - } - ] - }, - { - "body": { - "nodeType": "YulBlock", - "src": "3042:26:3", - "statements": [ - { - "expression": { - "arguments": [ - { - "name": "value6", - "nodeType": "YulIdentifier", - "src": "3051:6:3" - }, - { - "name": "value6", - "nodeType": "YulIdentifier", - "src": "3059:6:3" - } - ], - "functionName": { - "name": "revert", - "nodeType": "YulIdentifier", - "src": "3044:6:3" - }, - "nodeType": "YulFunctionCall", - "src": "3044:22:3" - }, - "nodeType": "YulExpressionStatement", - "src": "3044:22:3" - } - ] - }, - "condition": { - "arguments": [ - { - "name": "offset_1", - "nodeType": "YulIdentifier", - "src": "3028:8:3" - }, - { - "name": "_1", - "nodeType": "YulIdentifier", - "src": "3038:2:3" - } - ], - "functionName": { - "name": "gt", - "nodeType": "YulIdentifier", - "src": "3025:2:3" - }, - "nodeType": "YulFunctionCall", - "src": "3025:16:3" - }, - "nodeType": "YulIf", - "src": "3022:2:3" - }, - { - "nodeType": "YulVariableDeclaration", - "src": "3077:89:3", - "value": { - "arguments": [ - { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "3136:9:3" - }, - { - "name": "offset_1", - "nodeType": "YulIdentifier", - "src": "3147:8:3" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "3132:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "3132:24:3" - }, - { - "name": "dataEnd", - "nodeType": "YulIdentifier", - "src": "3158:7:3" - } - ], - "functionName": { - "name": "abi_decode_t_string_calldata", - "nodeType": "YulIdentifier", - "src": "3103:28:3" - }, - "nodeType": "YulFunctionCall", - "src": "3103:63:3" - }, - "variables": [ - { - "name": "value6_1", - "nodeType": "YulTypedName", - "src": "3081:8:3", - "type": "" - }, - { - "name": "value7_1", - "nodeType": "YulTypedName", - "src": "3091:8:3", - "type": "" - } - ] - }, - { - "nodeType": "YulAssignment", - "src": "3175:18:3", - "value": { - "name": "value6_1", - "nodeType": "YulIdentifier", - "src": "3185:8:3" - }, - "variableNames": [ - { - "name": "value6", - "nodeType": "YulIdentifier", - "src": "3175:6:3" - } - ] - }, - { - "nodeType": "YulAssignment", - "src": "3202:18:3", - "value": { - "name": "value7_1", - "nodeType": "YulIdentifier", - "src": "3212:8:3" - }, - "variableNames": [ - { - "name": "value7", - "nodeType": "YulIdentifier", - "src": "3202:6:3" - } - ] - } - ] - }, - "name": "abi_decode_tuple_t_uint256t_uint256t_bytes32t_address_payablet_string_calldata_ptrt_string_calldata_ptr", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "headStart", - "nodeType": "YulTypedName", - "src": "2185:9:3", - "type": "" - }, - { - "name": "dataEnd", - "nodeType": "YulTypedName", - "src": "2196:7:3", - "type": "" - } - ], - "returnVariables": [ - { - "name": "value0", - "nodeType": "YulTypedName", - "src": "2208:6:3", - "type": "" - }, - { - "name": "value1", - "nodeType": "YulTypedName", - "src": "2216:6:3", - "type": "" - }, - { - "name": "value2", - "nodeType": "YulTypedName", - "src": "2224:6:3", - "type": "" - }, - { - "name": "value3", - "nodeType": "YulTypedName", - "src": "2232:6:3", - "type": "" - }, - { - "name": "value4", - "nodeType": "YulTypedName", - "src": "2240:6:3", - "type": "" - }, - { - "name": "value5", - "nodeType": "YulTypedName", - "src": "2248:6:3", - "type": "" - }, - { - "name": "value6", - "nodeType": "YulTypedName", - "src": "2256:6:3", - "type": "" - }, - { - "name": "value7", - "nodeType": "YulTypedName", - "src": "2264:6:3", - "type": "" - } - ], - "src": "2072:1154:3" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "3300:202:3", - "statements": [ - { - "expression": { - "arguments": [ - { - "name": "pos", - "nodeType": "YulIdentifier", - "src": "3317:3:3" - }, - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "3322:6:3" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "3310:6:3" - }, - "nodeType": "YulFunctionCall", - "src": "3310:19:3" - }, - "nodeType": "YulExpressionStatement", - "src": "3310:19:3" - }, - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "name": "pos", - "nodeType": "YulIdentifier", - "src": "3355:3:3" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "3360:4:3", - "type": "", - "value": "0x20" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "3351:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "3351:14:3" - }, - { - "name": "start", - "nodeType": "YulIdentifier", - "src": "3367:5:3" - }, - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "3374:6:3" - } - ], - "functionName": { - "name": "calldatacopy", - "nodeType": "YulIdentifier", - "src": "3338:12:3" - }, - "nodeType": "YulFunctionCall", - "src": "3338:43:3" - }, - "nodeType": "YulExpressionStatement", - "src": "3338:43:3" - }, - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "arguments": [ - { - "name": "pos", - "nodeType": "YulIdentifier", - "src": "3405:3:3" - }, - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "3410:6:3" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "3401:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "3401:16:3" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "3419:4:3", - "type": "", - "value": "0x20" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "3397:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "3397:27:3" - }, - { - "name": "end", - "nodeType": "YulIdentifier", - "src": "3426:3:3" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "3390:6:3" - }, - "nodeType": "YulFunctionCall", - "src": "3390:40:3" - }, - "nodeType": "YulExpressionStatement", - "src": "3390:40:3" - }, - { - "nodeType": "YulAssignment", - "src": "3439:57:3", - "value": { - "arguments": [ - { - "arguments": [ - { - "name": "pos", - "nodeType": "YulIdentifier", - "src": "3454:3:3" - }, - { - "arguments": [ - { - "arguments": [ - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "3467:6:3" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "3475:2:3", - "type": "", - "value": "31" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "3463:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "3463:15:3" - }, - { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "3484:2:3", - "type": "", - "value": "31" - } - ], - "functionName": { - "name": "not", - "nodeType": "YulIdentifier", - "src": "3480:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "3480:7:3" - } - ], - "functionName": { - "name": "and", - "nodeType": "YulIdentifier", - "src": "3459:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "3459:29:3" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "3450:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "3450:39:3" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "3491:4:3", - "type": "", - "value": "0x20" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "3446:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "3446:50:3" - }, - "variableNames": [ - { - "name": "end", - "nodeType": "YulIdentifier", - "src": "3439:3:3" - } - ] - } - ] - }, - "name": "abi_encode_t_string_calldata", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "start", - "nodeType": "YulTypedName", - "src": "3269:5:3", - "type": "" - }, - { - "name": "length", - "nodeType": "YulTypedName", - "src": "3276:6:3", - "type": "" - }, - { - "name": "pos", - "nodeType": "YulTypedName", - "src": "3284:3:3", - "type": "" - } - ], - "returnVariables": [ - { - "name": "end", - "nodeType": "YulTypedName", - "src": "3292:3:3", - "type": "" - } - ], - "src": "3231:271:3" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "3559:208:3", - "statements": [ - { - "nodeType": "YulVariableDeclaration", - "src": "3569:26:3", - "value": { - "arguments": [ - { - "name": "value", - "nodeType": "YulIdentifier", - "src": "3589:5:3" - } - ], - "functionName": { - "name": "mload", - "nodeType": "YulIdentifier", - "src": "3583:5:3" - }, - "nodeType": "YulFunctionCall", - "src": "3583:12:3" - }, - "variables": [ - { - "name": "length", - "nodeType": "YulTypedName", - "src": "3573:6:3", - "type": "" - } - ] - }, - { - "expression": { - "arguments": [ - { - "name": "pos", - "nodeType": "YulIdentifier", - "src": "3611:3:3" - }, - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "3616:6:3" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "3604:6:3" - }, - "nodeType": "YulFunctionCall", - "src": "3604:19:3" - }, - "nodeType": "YulExpressionStatement", - "src": "3604:19:3" - }, - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "name": "value", - "nodeType": "YulIdentifier", - "src": "3658:5:3" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "3665:4:3", - "type": "", - "value": "0x20" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "3654:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "3654:16:3" - }, - { - "arguments": [ - { - "name": "pos", - "nodeType": "YulIdentifier", - "src": "3676:3:3" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "3681:4:3", - "type": "", - "value": "0x20" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "3672:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "3672:14:3" - }, - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "3688:6:3" - } - ], - "functionName": { - "name": "copy_memory_to_memory", - "nodeType": "YulIdentifier", - "src": "3632:21:3" - }, - "nodeType": "YulFunctionCall", - "src": "3632:63:3" - }, - "nodeType": "YulExpressionStatement", - "src": "3632:63:3" - }, - { - "nodeType": "YulAssignment", - "src": "3704:57:3", - "value": { - "arguments": [ - { - "arguments": [ - { - "name": "pos", - "nodeType": "YulIdentifier", - "src": "3719:3:3" - }, - { - "arguments": [ - { - "arguments": [ - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "3732:6:3" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "3740:2:3", - "type": "", - "value": "31" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "3728:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "3728:15:3" - }, - { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "3749:2:3", - "type": "", - "value": "31" - } - ], - "functionName": { - "name": "not", - "nodeType": "YulIdentifier", - "src": "3745:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "3745:7:3" - } - ], - "functionName": { - "name": "and", - "nodeType": "YulIdentifier", - "src": "3724:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "3724:29:3" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "3715:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "3715:39:3" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "3756:4:3", - "type": "", - "value": "0x20" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "3711:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "3711:50:3" - }, - "variableNames": [ - { - "name": "end", - "nodeType": "YulIdentifier", - "src": "3704:3:3" - } - ] - } - ] - }, - "name": "abi_encode_t_string", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "value", - "nodeType": "YulTypedName", - "src": "3536:5:3", - "type": "" - }, - { - "name": "pos", - "nodeType": "YulTypedName", - "src": "3543:3:3", - "type": "" - } - ], - "returnVariables": [ - { - "name": "end", - "nodeType": "YulTypedName", - "src": "3551:3:3", - "type": "" - } - ], - "src": "3507:260:3" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "4035:299:3", - "statements": [ - { - "nodeType": "YulVariableDeclaration", - "src": "4045:41:3", - "value": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "4059:26:3", - "type": "", - "value": "0xffffffffffffffffffffffff" - } - ], - "functionName": { - "name": "not", - "nodeType": "YulIdentifier", - "src": "4055:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "4055:31:3" - }, - "variables": [ - { - "name": "_1", - "nodeType": "YulTypedName", - "src": "4049:2:3", - "type": "" - } - ] - }, - { - "expression": { - "arguments": [ - { - "name": "pos", - "nodeType": "YulIdentifier", - "src": "4102:3:3" - }, - { - "arguments": [ - { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "4115:2:3", - "type": "", - "value": "96" - }, - { - "name": "value0", - "nodeType": "YulIdentifier", - "src": "4119:6:3" - } - ], - "functionName": { - "name": "shl", - "nodeType": "YulIdentifier", - "src": "4111:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "4111:15:3" - }, - { - "name": "_1", - "nodeType": "YulIdentifier", - "src": "4128:2:3" - } - ], - "functionName": { - "name": "and", - "nodeType": "YulIdentifier", - "src": "4107:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "4107:24:3" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "4095:6:3" - }, - "nodeType": "YulFunctionCall", - "src": "4095:37:3" - }, - "nodeType": "YulExpressionStatement", - "src": "4095:37:3" - }, - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "name": "pos", - "nodeType": "YulIdentifier", - "src": "4152:3:3" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "4157:2:3", - "type": "", - "value": "20" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "4148:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "4148:12:3" - }, - { - "arguments": [ - { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "4170:2:3", - "type": "", - "value": "96" - }, - { - "name": "value1", - "nodeType": "YulIdentifier", - "src": "4174:6:3" - } - ], - "functionName": { - "name": "shl", - "nodeType": "YulIdentifier", - "src": "4166:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "4166:15:3" - }, - { - "name": "_1", - "nodeType": "YulIdentifier", - "src": "4183:2:3" - } - ], - "functionName": { - "name": "and", - "nodeType": "YulIdentifier", - "src": "4162:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "4162:24:3" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "4141:6:3" - }, - "nodeType": "YulFunctionCall", - "src": "4141:46:3" - }, - "nodeType": "YulExpressionStatement", - "src": "4141:46:3" - }, - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "name": "pos", - "nodeType": "YulIdentifier", - "src": "4207:3:3" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "4212:2:3", - "type": "", - "value": "40" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "4203:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "4203:12:3" - }, - { - "name": "value2", - "nodeType": "YulIdentifier", - "src": "4217:6:3" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "4196:6:3" - }, - "nodeType": "YulFunctionCall", - "src": "4196:28:3" - }, - "nodeType": "YulExpressionStatement", - "src": "4196:28:3" - }, - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "name": "pos", - "nodeType": "YulIdentifier", - "src": "4244:3:3" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "4249:2:3", - "type": "", - "value": "72" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "4240:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "4240:12:3" - }, - { - "name": "value3", - "nodeType": "YulIdentifier", - "src": "4254:6:3" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "4233:6:3" - }, - "nodeType": "YulFunctionCall", - "src": "4233:28:3" - }, - "nodeType": "YulExpressionStatement", - "src": "4233:28:3" - }, - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "name": "pos", - "nodeType": "YulIdentifier", - "src": "4281:3:3" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "4286:3:3", - "type": "", - "value": "104" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "4277:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "4277:13:3" - }, - { - "name": "value4", - "nodeType": "YulIdentifier", - "src": "4292:6:3" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "4270:6:3" - }, - "nodeType": "YulFunctionCall", - "src": "4270:29:3" - }, - "nodeType": "YulExpressionStatement", - "src": "4270:29:3" - }, - { - "nodeType": "YulAssignment", - "src": "4308:20:3", - "value": { - "arguments": [ - { - "name": "pos", - "nodeType": "YulIdentifier", - "src": "4319:3:3" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "4324:3:3", - "type": "", - "value": "136" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "4315:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "4315:13:3" - }, - "variableNames": [ - { - "name": "end", - "nodeType": "YulIdentifier", - "src": "4308:3:3" - } - ] - } - ] - }, - "name": "abi_encode_tuple_packed_t_address_payable_t_address_payable_t_uint256_t_bytes32_t_uint256__to_t_address_payable_t_address_payable_t_uint256_t_bytes32_t_uint256__nonPadded_inplace_fromStack_reversed", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "pos", - "nodeType": "YulTypedName", - "src": "3979:3:3", - "type": "" - }, - { - "name": "value4", - "nodeType": "YulTypedName", - "src": "3984:6:3", - "type": "" - }, - { - "name": "value3", - "nodeType": "YulTypedName", - "src": "3992:6:3", - "type": "" - }, - { - "name": "value2", - "nodeType": "YulTypedName", - "src": "4000:6:3", - "type": "" - }, - { - "name": "value1", - "nodeType": "YulTypedName", - "src": "4008:6:3", - "type": "" - }, - { - "name": "value0", - "nodeType": "YulTypedName", - "src": "4016:6:3", - "type": "" - } - ], - "returnVariables": [ - { - "name": "end", - "nodeType": "YulTypedName", - "src": "4027:3:3", - "type": "" - } - ], - "src": "3772:562:3" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "4458:63:3", - "statements": [ - { - "expression": { - "arguments": [ - { - "name": "pos", - "nodeType": "YulIdentifier", - "src": "4475:3:3" - }, - { - "name": "value0", - "nodeType": "YulIdentifier", - "src": "4480:6:3" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "4468:6:3" - }, - "nodeType": "YulFunctionCall", - "src": "4468:19:3" - }, - "nodeType": "YulExpressionStatement", - "src": "4468:19:3" - }, - { - "nodeType": "YulAssignment", - "src": "4496:19:3", - "value": { - "arguments": [ - { - "name": "pos", - "nodeType": "YulIdentifier", - "src": "4507:3:3" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "4512:2:3", - "type": "", - "value": "32" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "4503:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "4503:12:3" - }, - "variableNames": [ - { - "name": "end", - "nodeType": "YulIdentifier", - "src": "4496:3:3" - } - ] - } - ] - }, - "name": "abi_encode_tuple_packed_t_bytes32__to_t_bytes32__nonPadded_inplace_fromStack_reversed", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "pos", - "nodeType": "YulTypedName", - "src": "4434:3:3", - "type": "" - }, - { - "name": "value0", - "nodeType": "YulTypedName", - "src": "4439:6:3", - "type": "" - } - ], - "returnVariables": [ - { - "name": "end", - "nodeType": "YulTypedName", - "src": "4450:3:3", - "type": "" - } - ], - "src": "4339:182:3" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "4663:137:3", - "statements": [ - { - "nodeType": "YulVariableDeclaration", - "src": "4673:27:3", - "value": { - "arguments": [ - { - "name": "value0", - "nodeType": "YulIdentifier", - "src": "4693:6:3" - } - ], - "functionName": { - "name": "mload", - "nodeType": "YulIdentifier", - "src": "4687:5:3" - }, - "nodeType": "YulFunctionCall", - "src": "4687:13:3" - }, - "variables": [ - { - "name": "length", - "nodeType": "YulTypedName", - "src": "4677:6:3", - "type": "" - } - ] - }, - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "name": "value0", - "nodeType": "YulIdentifier", - "src": "4735:6:3" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "4743:4:3", - "type": "", - "value": "0x20" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "4731:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "4731:17:3" - }, - { - "name": "pos", - "nodeType": "YulIdentifier", - "src": "4750:3:3" - }, - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "4755:6:3" - } - ], - "functionName": { - "name": "copy_memory_to_memory", - "nodeType": "YulIdentifier", - "src": "4709:21:3" - }, - "nodeType": "YulFunctionCall", - "src": "4709:53:3" - }, - "nodeType": "YulExpressionStatement", - "src": "4709:53:3" - }, - { - "nodeType": "YulAssignment", - "src": "4771:23:3", - "value": { - "arguments": [ - { - "name": "pos", - "nodeType": "YulIdentifier", - "src": "4782:3:3" - }, - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "4787:6:3" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "4778:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "4778:16:3" - }, - "variableNames": [ - { - "name": "end", - "nodeType": "YulIdentifier", - "src": "4771:3:3" - } - ] - } - ] - }, - "name": "abi_encode_tuple_packed_t_bytes_memory_ptr__to_t_bytes_memory_ptr__nonPadded_inplace_fromStack_reversed", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "pos", - "nodeType": "YulTypedName", - "src": "4639:3:3", - "type": "" - }, - { - "name": "value0", - "nodeType": "YulTypedName", - "src": "4644:6:3", - "type": "" - } - ], - "returnVariables": [ - { - "name": "end", - "nodeType": "YulTypedName", - "src": "4655:3:3", - "type": "" - } - ], - "src": "4526:274:3" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "4956:484:3", - "statements": [ - { - "nodeType": "YulVariableDeclaration", - "src": "4966:12:3", - "value": { - "kind": "number", - "nodeType": "YulLiteral", - "src": "4976:2:3", - "type": "", - "value": "32" - }, - "variables": [ - { - "name": "_1", - "nodeType": "YulTypedName", - "src": "4970:2:3", - "type": "" - } - ] - }, - { - "nodeType": "YulVariableDeclaration", - "src": "4987:32:3", - "value": { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "5005:9:3" - }, - { - "name": "_1", - "nodeType": "YulIdentifier", - "src": "5016:2:3" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "5001:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "5001:18:3" - }, - "variables": [ - { - "name": "tail_1", - "nodeType": "YulTypedName", - "src": "4991:6:3", - "type": "" - } - ] - }, - { - "expression": { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "5035:9:3" - }, - { - "name": "_1", - "nodeType": "YulIdentifier", - "src": "5046:2:3" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "5028:6:3" - }, - "nodeType": "YulFunctionCall", - "src": "5028:21:3" - }, - "nodeType": "YulExpressionStatement", - "src": "5028:21:3" - }, - { - "nodeType": "YulVariableDeclaration", - "src": "5058:17:3", - "value": { - "name": "tail_1", - "nodeType": "YulIdentifier", - "src": "5069:6:3" - }, - "variables": [ - { - "name": "pos", - "nodeType": "YulTypedName", - "src": "5062:3:3", - "type": "" - } - ] - }, - { - "nodeType": "YulVariableDeclaration", - "src": "5084:27:3", - "value": { - "arguments": [ - { - "name": "value0", - "nodeType": "YulIdentifier", - "src": "5104:6:3" - } - ], - "functionName": { - "name": "mload", - "nodeType": "YulIdentifier", - "src": "5098:5:3" - }, - "nodeType": "YulFunctionCall", - "src": "5098:13:3" - }, - "variables": [ - { - "name": "length", - "nodeType": "YulTypedName", - "src": "5088:6:3", - "type": "" - } - ] - }, - { - "expression": { - "arguments": [ - { - "name": "tail_1", - "nodeType": "YulIdentifier", - "src": "5127:6:3" - }, - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "5135:6:3" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "5120:6:3" - }, - "nodeType": "YulFunctionCall", - "src": "5120:22:3" - }, - "nodeType": "YulExpressionStatement", - "src": "5120:22:3" - }, - { - "nodeType": "YulAssignment", - "src": "5151:25:3", - "value": { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "5162:9:3" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "5173:2:3", - "type": "", - "value": "64" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "5158:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "5158:18:3" - }, - "variableNames": [ - { - "name": "pos", - "nodeType": "YulIdentifier", - "src": "5151:3:3" - } - ] - }, - { - "nodeType": "YulVariableDeclaration", - "src": "5185:29:3", - "value": { - "arguments": [ - { - "name": "value0", - "nodeType": "YulIdentifier", - "src": "5203:6:3" - }, - { - "name": "_1", - "nodeType": "YulIdentifier", - "src": "5211:2:3" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "5199:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "5199:15:3" - }, - "variables": [ - { - "name": "srcPtr", - "nodeType": "YulTypedName", - "src": "5189:6:3", - "type": "" - } - ] - }, - { - "nodeType": "YulVariableDeclaration", - "src": "5223:13:3", - "value": { - "name": "tail", - "nodeType": "YulIdentifier", - "src": "5232:4:3" - }, - "variables": [ - { - "name": "i", - "nodeType": "YulTypedName", - "src": "5227:1:3", - "type": "" - } - ] - }, - { - "body": { - "nodeType": "YulBlock", - "src": "5294:120:3", - "statements": [ - { - "expression": { - "arguments": [ - { - "name": "pos", - "nodeType": "YulIdentifier", - "src": "5315:3:3" - }, - { - "arguments": [ - { - "name": "srcPtr", - "nodeType": "YulIdentifier", - "src": "5326:6:3" - } - ], - "functionName": { - "name": "mload", - "nodeType": "YulIdentifier", - "src": "5320:5:3" - }, - "nodeType": "YulFunctionCall", - "src": "5320:13:3" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "5308:6:3" - }, - "nodeType": "YulFunctionCall", - "src": "5308:26:3" - }, - "nodeType": "YulExpressionStatement", - "src": "5308:26:3" - }, - { - "nodeType": "YulAssignment", - "src": "5347:19:3", - "value": { - "arguments": [ - { - "name": "pos", - "nodeType": "YulIdentifier", - "src": "5358:3:3" - }, - { - "name": "_1", - "nodeType": "YulIdentifier", - "src": "5363:2:3" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "5354:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "5354:12:3" - }, - "variableNames": [ - { - "name": "pos", - "nodeType": "YulIdentifier", - "src": "5347:3:3" - } - ] - }, - { - "nodeType": "YulAssignment", - "src": "5379:25:3", - "value": { - "arguments": [ - { - "name": "srcPtr", - "nodeType": "YulIdentifier", - "src": "5393:6:3" - }, - { - "name": "_1", - "nodeType": "YulIdentifier", - "src": "5401:2:3" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "5389:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "5389:15:3" - }, - "variableNames": [ - { - "name": "srcPtr", - "nodeType": "YulIdentifier", - "src": "5379:6:3" - } - ] - } - ] - }, - "condition": { - "arguments": [ - { - "name": "i", - "nodeType": "YulIdentifier", - "src": "5256:1:3" - }, - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "5259:6:3" - } - ], - "functionName": { - "name": "lt", - "nodeType": "YulIdentifier", - "src": "5253:2:3" - }, - "nodeType": "YulFunctionCall", - "src": "5253:13:3" - }, - "nodeType": "YulForLoop", - "post": { - "nodeType": "YulBlock", - "src": "5267:18:3", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "5269:14:3", - "value": { - "arguments": [ - { - "name": "i", - "nodeType": "YulIdentifier", - "src": "5278:1:3" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "5281:1:3", - "type": "", - "value": "1" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "5274:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "5274:9:3" - }, - "variableNames": [ - { - "name": "i", - "nodeType": "YulIdentifier", - "src": "5269:1:3" - } - ] - } - ] - }, - "pre": { - "nodeType": "YulBlock", - "src": "5249:3:3", - "statements": [] - }, - "src": "5245:169:3" - }, - { - "nodeType": "YulAssignment", - "src": "5423:11:3", - "value": { - "name": "pos", - "nodeType": "YulIdentifier", - "src": "5431:3:3" - }, - "variableNames": [ - { - "name": "tail", - "nodeType": "YulIdentifier", - "src": "5423:4:3" - } - ] - } - ] - }, - "name": "abi_encode_tuple_t_array$_t_uint256_$dyn_memory_ptr__to_t_array$_t_uint256_$dyn_memory_ptr__fromStack_reversed", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "headStart", - "nodeType": "YulTypedName", - "src": "4925:9:3", - "type": "" - }, - { - "name": "value0", - "nodeType": "YulTypedName", - "src": "4936:6:3", - "type": "" - } - ], - "returnVariables": [ - { - "name": "tail", - "nodeType": "YulTypedName", - "src": "4947:4:3", - "type": "" - } - ], - "src": "4805:635:3" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "5540:92:3", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "5550:26:3", - "value": { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "5562:9:3" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "5573:2:3", - "type": "", - "value": "32" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "5558:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "5558:18:3" - }, - "variableNames": [ - { - "name": "tail", - "nodeType": "YulIdentifier", - "src": "5550:4:3" - } - ] - }, - { - "expression": { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "5592:9:3" - }, - { - "arguments": [ - { - "arguments": [ - { - "name": "value0", - "nodeType": "YulIdentifier", - "src": "5617:6:3" - } - ], - "functionName": { - "name": "iszero", - "nodeType": "YulIdentifier", - "src": "5610:6:3" - }, - "nodeType": "YulFunctionCall", - "src": "5610:14:3" - } - ], - "functionName": { - "name": "iszero", - "nodeType": "YulIdentifier", - "src": "5603:6:3" - }, - "nodeType": "YulFunctionCall", - "src": "5603:22:3" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "5585:6:3" - }, - "nodeType": "YulFunctionCall", - "src": "5585:41:3" - }, - "nodeType": "YulExpressionStatement", - "src": "5585:41:3" - } - ] - }, - "name": "abi_encode_tuple_t_bool__to_t_bool__fromStack_reversed", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "headStart", - "nodeType": "YulTypedName", - "src": "5509:9:3", - "type": "" - }, - { - "name": "value0", - "nodeType": "YulTypedName", - "src": "5520:6:3", - "type": "" - } - ], - "returnVariables": [ - { - "name": "tail", - "nodeType": "YulTypedName", - "src": "5531:4:3", - "type": "" - } - ], - "src": "5445:187:3" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "5738:76:3", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "5748:26:3", - "value": { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "5760:9:3" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "5771:2:3", - "type": "", - "value": "32" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "5756:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "5756:18:3" - }, - "variableNames": [ - { - "name": "tail", - "nodeType": "YulIdentifier", - "src": "5748:4:3" - } - ] - }, - { - "expression": { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "5790:9:3" - }, - { - "name": "value0", - "nodeType": "YulIdentifier", - "src": "5801:6:3" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "5783:6:3" - }, - "nodeType": "YulFunctionCall", - "src": "5783:25:3" - }, - "nodeType": "YulExpressionStatement", - "src": "5783:25:3" - } - ] - }, - "name": "abi_encode_tuple_t_bytes32__to_t_bytes32__fromStack_reversed", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "headStart", - "nodeType": "YulTypedName", - "src": "5707:9:3", - "type": "" - }, - { - "name": "value0", - "nodeType": "YulTypedName", - "src": "5718:6:3", - "type": "" - } - ], - "returnVariables": [ - { - "name": "tail", - "nodeType": "YulTypedName", - "src": "5729:4:3", - "type": "" - } - ], - "src": "5637:177:3" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "5948:119:3", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "5958:26:3", - "value": { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "5970:9:3" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "5981:2:3", - "type": "", - "value": "64" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "5966:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "5966:18:3" - }, - "variableNames": [ - { - "name": "tail", - "nodeType": "YulIdentifier", - "src": "5958:4:3" - } - ] - }, - { - "expression": { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "6000:9:3" - }, - { - "name": "value0", - "nodeType": "YulIdentifier", - "src": "6011:6:3" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "5993:6:3" - }, - "nodeType": "YulFunctionCall", - "src": "5993:25:3" - }, - "nodeType": "YulExpressionStatement", - "src": "5993:25:3" - }, - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "6038:9:3" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "6049:2:3", - "type": "", - "value": "32" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "6034:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "6034:18:3" - }, - { - "name": "value1", - "nodeType": "YulIdentifier", - "src": "6054:6:3" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "6027:6:3" - }, - "nodeType": "YulFunctionCall", - "src": "6027:34:3" - }, - "nodeType": "YulExpressionStatement", - "src": "6027:34:3" - } - ] - }, - "name": "abi_encode_tuple_t_bytes32_t_bytes32__to_t_bytes32_t_bytes32__fromStack_reversed", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "headStart", - "nodeType": "YulTypedName", - "src": "5909:9:3", - "type": "" - }, - { - "name": "value1", - "nodeType": "YulTypedName", - "src": "5920:6:3", - "type": "" - }, - { - "name": "value0", - "nodeType": "YulTypedName", - "src": "5928:6:3", - "type": "" - } - ], - "returnVariables": [ - { - "name": "tail", - "nodeType": "YulTypedName", - "src": "5939:4:3", - "type": "" - } - ], - "src": "5819:248:3" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "6246:161:3", - "statements": [ - { - "expression": { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "6263:9:3" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "6274:2:3", - "type": "", - "value": "32" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "6256:6:3" - }, - "nodeType": "YulFunctionCall", - "src": "6256:21:3" - }, - "nodeType": "YulExpressionStatement", - "src": "6256:21:3" - }, - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "6297:9:3" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "6308:2:3", - "type": "", - "value": "32" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "6293:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "6293:18:3" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "6313:2:3", - "type": "", - "value": "11" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "6286:6:3" - }, - "nodeType": "YulFunctionCall", - "src": "6286:30:3" - }, - "nodeType": "YulExpressionStatement", - "src": "6286:30:3" - }, - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "6336:9:3" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "6347:2:3", - "type": "", - "value": "64" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "6332:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "6332:18:3" - }, - { - "kind": "string", - "nodeType": "YulLiteral", - "src": "6352:13:3", - "type": "", - "value": "SWAP_EXISTS" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "6325:6:3" - }, - "nodeType": "YulFunctionCall", - "src": "6325:41:3" - }, - "nodeType": "YulExpressionStatement", - "src": "6325:41:3" - }, - { - "nodeType": "YulAssignment", - "src": "6375:26:3", - "value": { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "6387:9:3" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "6398:2:3", - "type": "", - "value": "96" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "6383:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "6383:18:3" - }, - "variableNames": [ - { - "name": "tail", - "nodeType": "YulIdentifier", - "src": "6375:4:3" - } - ] - } - ] - }, - "name": "abi_encode_tuple_t_stringliteral_10858945dd31484ce6a77564821a1a6ff0e82939d9bea2b8e6caae50c7fc3750__to_t_string_memory_ptr__fromStack_reversed", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "headStart", - "nodeType": "YulTypedName", - "src": "6223:9:3", - "type": "" - } - ], - "returnVariables": [ - { - "name": "tail", - "nodeType": "YulTypedName", - "src": "6237:4:3", - "type": "" - } - ], - "src": "6072:335:3" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "6586:164:3", - "statements": [ - { - "expression": { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "6603:9:3" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "6614:2:3", - "type": "", - "value": "32" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "6596:6:3" - }, - "nodeType": "YulFunctionCall", - "src": "6596:21:3" - }, - "nodeType": "YulExpressionStatement", - "src": "6596:21:3" - }, - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "6637:9:3" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "6648:2:3", - "type": "", - "value": "32" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "6633:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "6633:18:3" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "6653:2:3", - "type": "", - "value": "14" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "6626:6:3" - }, - "nodeType": "YulFunctionCall", - "src": "6626:30:3" - }, - "nodeType": "YulExpressionStatement", - "src": "6626:30:3" - }, - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "6676:9:3" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "6687:2:3", - "type": "", - "value": "64" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "6672:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "6672:18:3" - }, - { - "kind": "string", - "nodeType": "YulLiteral", - "src": "6692:16:3", - "type": "", - "value": "INVALID_SECRET" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "6665:6:3" - }, - "nodeType": "YulFunctionCall", - "src": "6665:44:3" - }, - "nodeType": "YulExpressionStatement", - "src": "6665:44:3" - }, - { - "nodeType": "YulAssignment", - "src": "6718:26:3", - "value": { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "6730:9:3" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "6741:2:3", - "type": "", - "value": "96" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "6726:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "6726:18:3" - }, - "variableNames": [ - { - "name": "tail", - "nodeType": "YulIdentifier", - "src": "6718:4:3" - } - ] - } - ] - }, - "name": "abi_encode_tuple_t_stringliteral_20442b474b3561be70a7e12c2acf875277f59e68e7748337cd68bf5c8ada064b__to_t_string_memory_ptr__fromStack_reversed", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "headStart", - "nodeType": "YulTypedName", - "src": "6563:9:3", - "type": "" - } - ], - "returnVariables": [ - { - "name": "tail", - "nodeType": "YulTypedName", - "src": "6577:4:3", - "type": "" - } - ], - "src": "6412:338:3" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "6929:165:3", - "statements": [ - { - "expression": { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "6946:9:3" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "6957:2:3", - "type": "", - "value": "32" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "6939:6:3" - }, - "nodeType": "YulFunctionCall", - "src": "6939:21:3" - }, - "nodeType": "YulExpressionStatement", - "src": "6939:21:3" - }, - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "6980:9:3" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "6991:2:3", - "type": "", - "value": "32" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "6976:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "6976:18:3" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "6996:2:3", - "type": "", - "value": "15" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "6969:6:3" - }, - "nodeType": "YulFunctionCall", - "src": "6969:30:3" - }, - "nodeType": "YulExpressionStatement", - "src": "6969:30:3" - }, - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "7019:9:3" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "7030:2:3", - "type": "", - "value": "64" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "7015:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "7015:18:3" - }, - { - "kind": "string", - "nodeType": "YulLiteral", - "src": "7035:17:3", - "type": "", - "value": "SWAP_NOT_ACTIVE" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "7008:6:3" - }, - "nodeType": "YulFunctionCall", - "src": "7008:45:3" - }, - "nodeType": "YulExpressionStatement", - "src": "7008:45:3" - }, - { - "nodeType": "YulAssignment", - "src": "7062:26:3", - "value": { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "7074:9:3" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "7085:2:3", - "type": "", - "value": "96" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "7070:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "7070:18:3" - }, - "variableNames": [ - { - "name": "tail", - "nodeType": "YulIdentifier", - "src": "7062:4:3" - } - ] - } - ] - }, - "name": "abi_encode_tuple_t_stringliteral_afbfa7d3db262df0c92c413f0113503b1c1332dc5a4a874fcd8d6a6de57b74dd__to_t_string_memory_ptr__fromStack_reversed", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "headStart", - "nodeType": "YulTypedName", - "src": "6906:9:3", - "type": "" - } - ], - "returnVariables": [ - { - "name": "tail", - "nodeType": "YulTypedName", - "src": "6920:4:3", - "type": "" - } - ], - "src": "6755:339:3" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "7273:162:3", - "statements": [ - { - "expression": { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "7290:9:3" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "7301:2:3", - "type": "", - "value": "32" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "7283:6:3" - }, - "nodeType": "YulFunctionCall", - "src": "7283:21:3" - }, - "nodeType": "YulExpressionStatement", - "src": "7283:21:3" - }, - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "7324:9:3" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "7335:2:3", - "type": "", - "value": "32" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "7320:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "7320:18:3" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "7340:2:3", - "type": "", - "value": "12" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "7313:6:3" - }, - "nodeType": "YulFunctionCall", - "src": "7313:30:3" - }, - "nodeType": "YulExpressionStatement", - "src": "7313:30:3" - }, - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "7363:9:3" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "7374:2:3", - "type": "", - "value": "64" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "7359:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "7359:18:3" - }, - { - "kind": "string", - "nodeType": "YulLiteral", - "src": "7379:14:3", - "type": "", - "value": "INVALID_TIME" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "7352:6:3" - }, - "nodeType": "YulFunctionCall", - "src": "7352:42:3" - }, - "nodeType": "YulExpressionStatement", - "src": "7352:42:3" - }, - { - "nodeType": "YulAssignment", - "src": "7403:26:3", - "value": { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "7415:9:3" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "7426:2:3", - "type": "", - "value": "96" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "7411:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "7411:18:3" - }, - "variableNames": [ - { - "name": "tail", - "nodeType": "YulIdentifier", - "src": "7403:4:3" - } - ] - } - ] - }, - "name": "abi_encode_tuple_t_stringliteral_b98f3e47db5919a8c78ec10ff6bf7d1326066d3facdc164cf7441d38cae771df__to_t_string_memory_ptr__fromStack_reversed", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "headStart", - "nodeType": "YulTypedName", - "src": "7250:9:3", - "type": "" - } - ], - "returnVariables": [ - { - "name": "tail", - "nodeType": "YulTypedName", - "src": "7264:4:3", - "type": "" - } - ], - "src": "7099:336:3" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "7614:164:3", - "statements": [ - { - "expression": { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "7631:9:3" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "7642:2:3", - "type": "", - "value": "32" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "7624:6:3" - }, - "nodeType": "YulFunctionCall", - "src": "7624:21:3" - }, - "nodeType": "YulExpressionStatement", - "src": "7624:21:3" - }, - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "7665:9:3" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "7676:2:3", - "type": "", - "value": "32" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "7661:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "7661:18:3" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "7681:2:3", - "type": "", - "value": "14" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "7654:6:3" - }, - "nodeType": "YulFunctionCall", - "src": "7654:30:3" - }, - "nodeType": "YulExpressionStatement", - "src": "7654:30:3" - }, - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "7704:9:3" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "7715:2:3", - "type": "", - "value": "64" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "7700:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "7700:18:3" - }, - { - "kind": "string", - "nodeType": "YulLiteral", - "src": "7720:16:3", - "type": "", - "value": "INVALID_AMOUNT" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "7693:6:3" - }, - "nodeType": "YulFunctionCall", - "src": "7693:44:3" - }, - "nodeType": "YulExpressionStatement", - "src": "7693:44:3" - }, - { - "nodeType": "YulAssignment", - "src": "7746:26:3", - "value": { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "7758:9:3" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "7769:2:3", - "type": "", - "value": "96" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "7754:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "7754:18:3" - }, - "variableNames": [ - { - "name": "tail", - "nodeType": "YulIdentifier", - "src": "7746:4:3" - } - ] - } - ] - }, - "name": "abi_encode_tuple_t_stringliteral_eb6dbbf3194e9f4dd39c8dabe51ddb59ca6ad00c50b1bc74675ce4b263687722__to_t_string_memory_ptr__fromStack_reversed", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "headStart", - "nodeType": "YulTypedName", - "src": "7591:9:3", - "type": "" - } - ], - "returnVariables": [ - { - "name": "tail", - "nodeType": "YulTypedName", - "src": "7605:4:3", - "type": "" - } - ], - "src": "7440:338:3" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "7884:76:3", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "7894:26:3", - "value": { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "7906:9:3" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "7917:2:3", - "type": "", - "value": "32" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "7902:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "7902:18:3" - }, - "variableNames": [ - { - "name": "tail", - "nodeType": "YulIdentifier", - "src": "7894:4:3" - } - ] - }, - { - "expression": { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "7936:9:3" - }, - { - "name": "value0", - "nodeType": "YulIdentifier", - "src": "7947:6:3" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "7929:6:3" - }, - "nodeType": "YulFunctionCall", - "src": "7929:25:3" - }, - "nodeType": "YulExpressionStatement", - "src": "7929:25:3" - } - ] - }, - "name": "abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "headStart", - "nodeType": "YulTypedName", - "src": "7853:9:3", - "type": "" - }, - { - "name": "value0", - "nodeType": "YulTypedName", - "src": "7864:6:3", - "type": "" - } - ], - "returnVariables": [ - { - "name": "tail", - "nodeType": "YulTypedName", - "src": "7875:4:3", - "type": "" - } - ], - "src": "7783:177:3" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "8266:428:3", - "statements": [ - { - "expression": { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "8283:9:3" - }, - { - "name": "value0", - "nodeType": "YulIdentifier", - "src": "8294:6:3" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "8276:6:3" - }, - "nodeType": "YulFunctionCall", - "src": "8276:25:3" - }, - "nodeType": "YulExpressionStatement", - "src": "8276:25:3" - }, - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "8321:9:3" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "8332:2:3", - "type": "", - "value": "32" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "8317:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "8317:18:3" - }, - { - "name": "value1", - "nodeType": "YulIdentifier", - "src": "8337:6:3" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "8310:6:3" - }, - "nodeType": "YulFunctionCall", - "src": "8310:34:3" - }, - "nodeType": "YulExpressionStatement", - "src": "8310:34:3" - }, - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "8364:9:3" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "8375:2:3", - "type": "", - "value": "64" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "8360:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "8360:18:3" - }, - { - "name": "value2", - "nodeType": "YulIdentifier", - "src": "8380:6:3" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "8353:6:3" - }, - "nodeType": "YulFunctionCall", - "src": "8353:34:3" - }, - "nodeType": "YulExpressionStatement", - "src": "8353:34:3" - }, - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "8407:9:3" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "8418:2:3", - "type": "", - "value": "96" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "8403:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "8403:18:3" - }, - { - "name": "value3", - "nodeType": "YulIdentifier", - "src": "8423:6:3" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "8396:6:3" - }, - "nodeType": "YulFunctionCall", - "src": "8396:34:3" - }, - "nodeType": "YulExpressionStatement", - "src": "8396:34:3" - }, - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "8450:9:3" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "8461:3:3", - "type": "", - "value": "128" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "8446:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "8446:19:3" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "8467:3:3", - "type": "", - "value": "192" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "8439:6:3" - }, - "nodeType": "YulFunctionCall", - "src": "8439:32:3" - }, - "nodeType": "YulExpressionStatement", - "src": "8439:32:3" - }, - { - "nodeType": "YulVariableDeclaration", - "src": "8480:79:3", - "value": { - "arguments": [ - { - "name": "value4", - "nodeType": "YulIdentifier", - "src": "8523:6:3" - }, - { - "name": "value5", - "nodeType": "YulIdentifier", - "src": "8531:6:3" - }, - { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "8543:9:3" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "8554:3:3", - "type": "", - "value": "192" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "8539:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "8539:19:3" - } - ], - "functionName": { - "name": "abi_encode_t_string_calldata", - "nodeType": "YulIdentifier", - "src": "8494:28:3" - }, - "nodeType": "YulFunctionCall", - "src": "8494:65:3" - }, - "variables": [ - { - "name": "tail_1", - "nodeType": "YulTypedName", - "src": "8484:6:3", - "type": "" - } - ] - }, - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "8579:9:3" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "8590:3:3", - "type": "", - "value": "160" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "8575:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "8575:19:3" - }, - { - "arguments": [ - { - "name": "tail_1", - "nodeType": "YulIdentifier", - "src": "8600:6:3" - }, - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "8608:9:3" - } - ], - "functionName": { - "name": "sub", - "nodeType": "YulIdentifier", - "src": "8596:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "8596:22:3" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "8568:6:3" - }, - "nodeType": "YulFunctionCall", - "src": "8568:51:3" - }, - "nodeType": "YulExpressionStatement", - "src": "8568:51:3" - }, - { - "nodeType": "YulAssignment", - "src": "8628:60:3", - "value": { - "arguments": [ - { - "name": "value6", - "nodeType": "YulIdentifier", - "src": "8665:6:3" - }, - { - "name": "value7", - "nodeType": "YulIdentifier", - "src": "8673:6:3" - }, - { - "name": "tail_1", - "nodeType": "YulIdentifier", - "src": "8681:6:3" - } - ], - "functionName": { - "name": "abi_encode_t_string_calldata", - "nodeType": "YulIdentifier", - "src": "8636:28:3" - }, - "nodeType": "YulFunctionCall", - "src": "8636:52:3" - }, - "variableNames": [ - { - "name": "tail", - "nodeType": "YulIdentifier", - "src": "8628:4:3" - } - ] - } - ] - }, - "name": "abi_encode_tuple_t_uint256_t_uint256_t_uint256_t_bytes32_t_string_calldata_ptr_t_string_calldata_ptr__to_t_uint256_t_uint256_t_uint256_t_bytes32_t_string_memory_ptr_t_string_memory_ptr__fromStack_reversed", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "headStart", - "nodeType": "YulTypedName", - "src": "8179:9:3", - "type": "" - }, - { - "name": "value7", - "nodeType": "YulTypedName", - "src": "8190:6:3", - "type": "" - }, - { - "name": "value6", - "nodeType": "YulTypedName", - "src": "8198:6:3", - "type": "" - }, - { - "name": "value5", - "nodeType": "YulTypedName", - "src": "8206:6:3", - "type": "" - }, - { - "name": "value4", - "nodeType": "YulTypedName", - "src": "8214:6:3", - "type": "" - }, - { - "name": "value3", - "nodeType": "YulTypedName", - "src": "8222:6:3", - "type": "" - }, - { - "name": "value2", - "nodeType": "YulTypedName", - "src": "8230:6:3", - "type": "" - }, - { - "name": "value1", - "nodeType": "YulTypedName", - "src": "8238:6:3", - "type": "" - }, - { - "name": "value0", - "nodeType": "YulTypedName", - "src": "8246:6:3", - "type": "" - } - ], - "returnVariables": [ - { - "name": "tail", - "nodeType": "YulTypedName", - "src": "8257:4:3", - "type": "" - } - ], - "src": "7965:729:3" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "9096:602:3", - "statements": [ - { - "nodeType": "YulVariableDeclaration", - "src": "9106:13:3", - "value": { - "kind": "number", - "nodeType": "YulLiteral", - "src": "9116:3:3", - "type": "", - "value": "288" - }, - "variables": [ - { - "name": "_1", - "nodeType": "YulTypedName", - "src": "9110:2:3", - "type": "" - } - ] - }, - { - "expression": { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "9135:9:3" - }, - { - "name": "value0", - "nodeType": "YulIdentifier", - "src": "9146:6:3" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "9128:6:3" - }, - "nodeType": "YulFunctionCall", - "src": "9128:25:3" - }, - "nodeType": "YulExpressionStatement", - "src": "9128:25:3" - }, - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "9173:9:3" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "9184:2:3", - "type": "", - "value": "32" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "9169:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "9169:18:3" - }, - { - "name": "value1", - "nodeType": "YulIdentifier", - "src": "9189:6:3" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "9162:6:3" - }, - "nodeType": "YulFunctionCall", - "src": "9162:34:3" - }, - "nodeType": "YulExpressionStatement", - "src": "9162:34:3" - }, - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "9216:9:3" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "9227:2:3", - "type": "", - "value": "64" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "9212:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "9212:18:3" - }, - { - "name": "value2", - "nodeType": "YulIdentifier", - "src": "9232:6:3" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "9205:6:3" - }, - "nodeType": "YulFunctionCall", - "src": "9205:34:3" - }, - "nodeType": "YulExpressionStatement", - "src": "9205:34:3" - }, - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "9259:9:3" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "9270:2:3", - "type": "", - "value": "96" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "9255:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "9255:18:3" - }, - { - "name": "value3", - "nodeType": "YulIdentifier", - "src": "9275:6:3" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "9248:6:3" - }, - "nodeType": "YulFunctionCall", - "src": "9248:34:3" - }, - "nodeType": "YulExpressionStatement", - "src": "9248:34:3" - }, - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "9302:9:3" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "9313:3:3", - "type": "", - "value": "128" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "9298:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "9298:19:3" - }, - { - "name": "value4", - "nodeType": "YulIdentifier", - "src": "9319:6:3" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "9291:6:3" - }, - "nodeType": "YulFunctionCall", - "src": "9291:35:3" - }, - "nodeType": "YulExpressionStatement", - "src": "9291:35:3" - }, - { - "nodeType": "YulVariableDeclaration", - "src": "9335:29:3", - "value": { - "arguments": [ - { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "9353:3:3", - "type": "", - "value": "160" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "9358:1:3", - "type": "", - "value": "1" - } - ], - "functionName": { - "name": "shl", - "nodeType": "YulIdentifier", - "src": "9349:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "9349:11:3" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "9362:1:3", - "type": "", - "value": "1" - } - ], - "functionName": { - "name": "sub", - "nodeType": "YulIdentifier", - "src": "9345:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "9345:19:3" - }, - "variables": [ - { - "name": "_2", - "nodeType": "YulTypedName", - "src": "9339:2:3", - "type": "" - } - ] - }, - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "9384:9:3" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "9395:3:3", - "type": "", - "value": "160" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "9380:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "9380:19:3" - }, - { - "arguments": [ - { - "name": "value5", - "nodeType": "YulIdentifier", - "src": "9405:6:3" - }, - { - "name": "_2", - "nodeType": "YulIdentifier", - "src": "9413:2:3" - } - ], - "functionName": { - "name": "and", - "nodeType": "YulIdentifier", - "src": "9401:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "9401:15:3" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "9373:6:3" - }, - "nodeType": "YulFunctionCall", - "src": "9373:44:3" - }, - "nodeType": "YulExpressionStatement", - "src": "9373:44:3" - }, - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "9437:9:3" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "9448:3:3", - "type": "", - "value": "192" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "9433:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "9433:19:3" - }, - { - "arguments": [ - { - "name": "value6", - "nodeType": "YulIdentifier", - "src": "9458:6:3" - }, - { - "name": "_2", - "nodeType": "YulIdentifier", - "src": "9466:2:3" - } - ], - "functionName": { - "name": "and", - "nodeType": "YulIdentifier", - "src": "9454:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "9454:15:3" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "9426:6:3" - }, - "nodeType": "YulFunctionCall", - "src": "9426:44:3" - }, - "nodeType": "YulExpressionStatement", - "src": "9426:44:3" - }, - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "9490:9:3" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "9501:3:3", - "type": "", - "value": "224" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "9486:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "9486:19:3" - }, - { - "name": "_1", - "nodeType": "YulIdentifier", - "src": "9507:2:3" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "9479:6:3" - }, - "nodeType": "YulFunctionCall", - "src": "9479:31:3" - }, - "nodeType": "YulExpressionStatement", - "src": "9479:31:3" - }, - { - "nodeType": "YulVariableDeclaration", - "src": "9519:61:3", - "value": { - "arguments": [ - { - "name": "value7", - "nodeType": "YulIdentifier", - "src": "9553:6:3" - }, - { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "9565:9:3" - }, - { - "name": "_1", - "nodeType": "YulIdentifier", - "src": "9576:2:3" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "9561:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "9561:18:3" - } - ], - "functionName": { - "name": "abi_encode_t_string", - "nodeType": "YulIdentifier", - "src": "9533:19:3" - }, - "nodeType": "YulFunctionCall", - "src": "9533:47:3" - }, - "variables": [ - { - "name": "tail_1", - "nodeType": "YulTypedName", - "src": "9523:6:3", - "type": "" - } - ] - }, - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "9600:9:3" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "9611:3:3", - "type": "", - "value": "256" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "9596:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "9596:19:3" - }, - { - "arguments": [ - { - "name": "tail_1", - "nodeType": "YulIdentifier", - "src": "9621:6:3" - }, - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "9629:9:3" - } - ], - "functionName": { - "name": "sub", - "nodeType": "YulIdentifier", - "src": "9617:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "9617:22:3" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "9589:6:3" - }, - "nodeType": "YulFunctionCall", - "src": "9589:51:3" - }, - "nodeType": "YulExpressionStatement", - "src": "9589:51:3" - }, - { - "nodeType": "YulAssignment", - "src": "9649:43:3", - "value": { - "arguments": [ - { - "name": "value8", - "nodeType": "YulIdentifier", - "src": "9677:6:3" - }, - { - "name": "tail_1", - "nodeType": "YulIdentifier", - "src": "9685:6:3" - } - ], - "functionName": { - "name": "abi_encode_t_string", - "nodeType": "YulIdentifier", - "src": "9657:19:3" - }, - "nodeType": "YulFunctionCall", - "src": "9657:35:3" - }, - "variableNames": [ - { - "name": "tail", - "nodeType": "YulIdentifier", - "src": "9649:4:3" - } - ] - } - ] - }, - "name": "abi_encode_tuple_t_uint256_t_uint256_t_uint256_t_uint256_t_bytes32_t_address_payable_t_address_payable_t_string_memory_ptr_t_string_memory_ptr__to_t_uint256_t_uint256_t_uint256_t_uint256_t_bytes32_t_address_payable_t_address_payable_t_string_memory_ptr_t_string_memory_ptr__fromStack_reversed", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "headStart", - "nodeType": "YulTypedName", - "src": "9001:9:3", - "type": "" - }, - { - "name": "value8", - "nodeType": "YulTypedName", - "src": "9012:6:3", - "type": "" - }, - { - "name": "value7", - "nodeType": "YulTypedName", - "src": "9020:6:3", - "type": "" - }, - { - "name": "value6", - "nodeType": "YulTypedName", - "src": "9028:6:3", - "type": "" - }, - { - "name": "value5", - "nodeType": "YulTypedName", - "src": "9036:6:3", - "type": "" - }, - { - "name": "value4", - "nodeType": "YulTypedName", - "src": "9044:6:3", - "type": "" - }, - { - "name": "value3", - "nodeType": "YulTypedName", - "src": "9052:6:3", - "type": "" - }, - { - "name": "value2", - "nodeType": "YulTypedName", - "src": "9060:6:3", - "type": "" - }, - { - "name": "value1", - "nodeType": "YulTypedName", - "src": "9068:6:3", - "type": "" - }, - { - "name": "value0", - "nodeType": "YulTypedName", - "src": "9076:6:3", - "type": "" - } - ], - "returnVariables": [ - { - "name": "tail", - "nodeType": "YulTypedName", - "src": "9087:4:3", - "type": "" - } - ], - "src": "8699:999:3" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "9747:198:3", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "9757:19:3", - "value": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "9773:2:3", - "type": "", - "value": "64" - } - ], - "functionName": { - "name": "mload", - "nodeType": "YulIdentifier", - "src": "9767:5:3" - }, - "nodeType": "YulFunctionCall", - "src": "9767:9:3" - }, - "variableNames": [ - { - "name": "memPtr", - "nodeType": "YulIdentifier", - "src": "9757:6:3" - } - ] - }, - { - "nodeType": "YulVariableDeclaration", - "src": "9785:35:3", - "value": { - "arguments": [ - { - "name": "memPtr", - "nodeType": "YulIdentifier", - "src": "9807:6:3" - }, - { - "name": "size", - "nodeType": "YulIdentifier", - "src": "9815:4:3" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "9803:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "9803:17:3" - }, - "variables": [ - { - "name": "newFreePtr", - "nodeType": "YulTypedName", - "src": "9789:10:3", - "type": "" - } - ] - }, - { - "body": { - "nodeType": "YulBlock", - "src": "9895:13:3", - "statements": [ - { - "expression": { - "arguments": [], - "functionName": { - "name": "invalid", - "nodeType": "YulIdentifier", - "src": "9897:7:3" - }, - "nodeType": "YulFunctionCall", - "src": "9897:9:3" - }, - "nodeType": "YulExpressionStatement", - "src": "9897:9:3" - } - ] - }, - "condition": { - "arguments": [ - { - "arguments": [ - { - "name": "newFreePtr", - "nodeType": "YulIdentifier", - "src": "9838:10:3" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "9850:18:3", - "type": "", - "value": "0xffffffffffffffff" - } - ], - "functionName": { - "name": "gt", - "nodeType": "YulIdentifier", - "src": "9835:2:3" - }, - "nodeType": "YulFunctionCall", - "src": "9835:34:3" - }, - { - "arguments": [ - { - "name": "newFreePtr", - "nodeType": "YulIdentifier", - "src": "9874:10:3" - }, - { - "name": "memPtr", - "nodeType": "YulIdentifier", - "src": "9886:6:3" - } - ], - "functionName": { - "name": "lt", - "nodeType": "YulIdentifier", - "src": "9871:2:3" - }, - "nodeType": "YulFunctionCall", - "src": "9871:22:3" - } - ], - "functionName": { - "name": "or", - "nodeType": "YulIdentifier", - "src": "9832:2:3" - }, - "nodeType": "YulFunctionCall", - "src": "9832:62:3" - }, - "nodeType": "YulIf", - "src": "9829:2:3" - }, - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "9924:2:3", - "type": "", - "value": "64" - }, - { - "name": "newFreePtr", - "nodeType": "YulIdentifier", - "src": "9928:10:3" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "9917:6:3" - }, - "nodeType": "YulFunctionCall", - "src": "9917:22:3" - }, - "nodeType": "YulExpressionStatement", - "src": "9917:22:3" - } - ] - }, - "name": "allocateMemory", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "size", - "nodeType": "YulTypedName", - "src": "9727:4:3", - "type": "" - } - ], - "returnVariables": [ - { - "name": "memPtr", - "nodeType": "YulTypedName", - "src": "9736:6:3", - "type": "" - } - ], - "src": "9703:242:3" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "10003:205:3", - "statements": [ - { - "nodeType": "YulVariableDeclaration", - "src": "10013:10:3", - "value": { - "kind": "number", - "nodeType": "YulLiteral", - "src": "10022:1:3", - "type": "", - "value": "0" - }, - "variables": [ - { - "name": "i", - "nodeType": "YulTypedName", - "src": "10017:1:3", - "type": "" - } - ] - }, - { - "body": { - "nodeType": "YulBlock", - "src": "10082:63:3", - "statements": [ - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "name": "dst", - "nodeType": "YulIdentifier", - "src": "10107:3:3" - }, - { - "name": "i", - "nodeType": "YulIdentifier", - "src": "10112:1:3" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "10103:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "10103:11:3" - }, - { - "arguments": [ - { - "arguments": [ - { - "name": "src", - "nodeType": "YulIdentifier", - "src": "10126:3:3" - }, - { - "name": "i", - "nodeType": "YulIdentifier", - "src": "10131:1:3" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "10122:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "10122:11:3" - } - ], - "functionName": { - "name": "mload", - "nodeType": "YulIdentifier", - "src": "10116:5:3" - }, - "nodeType": "YulFunctionCall", - "src": "10116:18:3" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "10096:6:3" - }, - "nodeType": "YulFunctionCall", - "src": "10096:39:3" - }, - "nodeType": "YulExpressionStatement", - "src": "10096:39:3" - } - ] - }, - "condition": { - "arguments": [ - { - "name": "i", - "nodeType": "YulIdentifier", - "src": "10043:1:3" - }, - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "10046:6:3" - } - ], - "functionName": { - "name": "lt", - "nodeType": "YulIdentifier", - "src": "10040:2:3" - }, - "nodeType": "YulFunctionCall", - "src": "10040:13:3" - }, - "nodeType": "YulForLoop", - "post": { - "nodeType": "YulBlock", - "src": "10054:19:3", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "10056:15:3", - "value": { - "arguments": [ - { - "name": "i", - "nodeType": "YulIdentifier", - "src": "10065:1:3" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "10068:2:3", - "type": "", - "value": "32" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "10061:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "10061:10:3" - }, - "variableNames": [ - { - "name": "i", - "nodeType": "YulIdentifier", - "src": "10056:1:3" - } - ] - } - ] - }, - "pre": { - "nodeType": "YulBlock", - "src": "10036:3:3", - "statements": [] - }, - "src": "10032:113:3" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "10171:31:3", - "statements": [ - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "name": "dst", - "nodeType": "YulIdentifier", - "src": "10184:3:3" - }, - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "10189:6:3" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "10180:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "10180:16:3" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "10198:1:3", - "type": "", - "value": "0" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "10173:6:3" - }, - "nodeType": "YulFunctionCall", - "src": "10173:27:3" - }, - "nodeType": "YulExpressionStatement", - "src": "10173:27:3" - } - ] - }, - "condition": { - "arguments": [ - { - "name": "i", - "nodeType": "YulIdentifier", - "src": "10160:1:3" - }, - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "10163:6:3" - } - ], - "functionName": { - "name": "gt", - "nodeType": "YulIdentifier", - "src": "10157:2:3" - }, - "nodeType": "YulFunctionCall", - "src": "10157:13:3" - }, - "nodeType": "YulIf", - "src": "10154:2:3" - } - ] - }, - "name": "copy_memory_to_memory", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "src", - "nodeType": "YulTypedName", - "src": "9981:3:3", - "type": "" - }, - { - "name": "dst", - "nodeType": "YulTypedName", - "src": "9986:3:3", - "type": "" - }, - { - "name": "length", - "nodeType": "YulTypedName", - "src": "9991:6:3", - "type": "" - } - ], - "src": "9950:258:3" - } - ] - }, - "contents": "{\n { }\n function abi_decode_t_string_calldata(offset, end) -> arrayPos, length\n {\n if iszero(slt(add(offset, 0x1f), end)) { revert(arrayPos, arrayPos) }\n length := calldataload(offset)\n if gt(length, 0xffffffffffffffff) { revert(arrayPos, arrayPos) }\n arrayPos := add(offset, 0x20)\n if gt(add(add(offset, length), 0x20), end) { revert(0, 0) }\n }\n function abi_decode_tuple_t_array$_t_bytes32_$dyn_memory_ptr(headStart, dataEnd) -> value0\n {\n let _1 := 32\n if slt(sub(dataEnd, headStart), _1) { revert(value0, value0) }\n let offset := calldataload(headStart)\n let _2 := 0xffffffffffffffff\n if gt(offset, _2) { revert(value0, value0) }\n let _3 := add(headStart, offset)\n if iszero(slt(add(_3, 0x1f), dataEnd)) { revert(value0, value0) }\n let length := calldataload(_3)\n if gt(length, _2) { invalid() }\n let _4 := mul(length, _1)\n let dst := allocateMemory(add(_4, _1))\n let dst_1 := dst\n mstore(dst, length)\n dst := add(dst, _1)\n let src := add(_3, _1)\n if gt(add(add(_3, _4), _1), dataEnd) { revert(value0, value0) }\n let i := value0\n for { } lt(i, length) { i := add(i, 1) }\n {\n mstore(dst, calldataload(src))\n dst := add(dst, _1)\n src := add(src, _1)\n }\n value0 := dst_1\n }\n function abi_decode_tuple_t_bytes32(headStart, dataEnd) -> value0\n {\n if slt(sub(dataEnd, headStart), 32) { revert(value0, value0) }\n value0 := calldataload(headStart)\n }\n function abi_decode_tuple_t_bytes32_fromMemory(headStart, dataEnd) -> value0\n {\n if slt(sub(dataEnd, headStart), 32) { revert(value0, value0) }\n value0 := mload(headStart)\n }\n function abi_decode_tuple_t_bytes32t_bytes32(headStart, dataEnd) -> value0, value1\n {\n if slt(sub(dataEnd, headStart), 64) { revert(value1, value1) }\n value0 := calldataload(headStart)\n value1 := calldataload(add(headStart, 32))\n }\n function abi_decode_tuple_t_uint256t_uint256t_bytes32t_address_payablet_string_calldata_ptrt_string_calldata_ptr(headStart, dataEnd) -> value0, value1, value2, value3, value4, value5, value6, value7\n {\n if slt(sub(dataEnd, headStart), 192) { revert(value4, value4) }\n value0 := calldataload(headStart)\n value1 := calldataload(add(headStart, 32))\n value2 := calldataload(add(headStart, 64))\n let value := calldataload(add(headStart, 96))\n if iszero(eq(value, and(value, sub(shl(160, 1), 1)))) { revert(value4, value4) }\n value3 := value\n let offset := calldataload(add(headStart, 128))\n let _1 := 0xffffffffffffffff\n if gt(offset, _1) { revert(value4, value4) }\n let value4_1, value5_1 := abi_decode_t_string_calldata(add(headStart, offset), dataEnd)\n value4 := value4_1\n value5 := value5_1\n let offset_1 := calldataload(add(headStart, 160))\n if gt(offset_1, _1) { revert(value6, value6) }\n let value6_1, value7_1 := abi_decode_t_string_calldata(add(headStart, offset_1), dataEnd)\n value6 := value6_1\n value7 := value7_1\n }\n function abi_encode_t_string_calldata(start, length, pos) -> end\n {\n mstore(pos, length)\n calldatacopy(add(pos, 0x20), start, length)\n mstore(add(add(pos, length), 0x20), end)\n end := add(add(pos, and(add(length, 31), not(31))), 0x20)\n }\n function abi_encode_t_string(value, pos) -> end\n {\n let length := mload(value)\n mstore(pos, length)\n copy_memory_to_memory(add(value, 0x20), add(pos, 0x20), length)\n end := add(add(pos, and(add(length, 31), not(31))), 0x20)\n }\n function abi_encode_tuple_packed_t_address_payable_t_address_payable_t_uint256_t_bytes32_t_uint256__to_t_address_payable_t_address_payable_t_uint256_t_bytes32_t_uint256__nonPadded_inplace_fromStack_reversed(pos, value4, value3, value2, value1, value0) -> end\n {\n let _1 := not(0xffffffffffffffffffffffff)\n mstore(pos, and(shl(96, value0), _1))\n mstore(add(pos, 20), and(shl(96, value1), _1))\n mstore(add(pos, 40), value2)\n mstore(add(pos, 72), value3)\n mstore(add(pos, 104), value4)\n end := add(pos, 136)\n }\n function abi_encode_tuple_packed_t_bytes32__to_t_bytes32__nonPadded_inplace_fromStack_reversed(pos, value0) -> end\n {\n mstore(pos, value0)\n end := add(pos, 32)\n }\n function abi_encode_tuple_packed_t_bytes_memory_ptr__to_t_bytes_memory_ptr__nonPadded_inplace_fromStack_reversed(pos, value0) -> end\n {\n let length := mload(value0)\n copy_memory_to_memory(add(value0, 0x20), pos, length)\n end := add(pos, length)\n }\n function abi_encode_tuple_t_array$_t_uint256_$dyn_memory_ptr__to_t_array$_t_uint256_$dyn_memory_ptr__fromStack_reversed(headStart, value0) -> tail\n {\n let _1 := 32\n let tail_1 := add(headStart, _1)\n mstore(headStart, _1)\n let pos := tail_1\n let length := mload(value0)\n mstore(tail_1, length)\n pos := add(headStart, 64)\n let srcPtr := add(value0, _1)\n let i := tail\n for { } lt(i, length) { i := add(i, 1) }\n {\n mstore(pos, mload(srcPtr))\n pos := add(pos, _1)\n srcPtr := add(srcPtr, _1)\n }\n tail := pos\n }\n function abi_encode_tuple_t_bool__to_t_bool__fromStack_reversed(headStart, value0) -> tail\n {\n tail := add(headStart, 32)\n mstore(headStart, iszero(iszero(value0)))\n }\n function abi_encode_tuple_t_bytes32__to_t_bytes32__fromStack_reversed(headStart, value0) -> tail\n {\n tail := add(headStart, 32)\n mstore(headStart, value0)\n }\n function abi_encode_tuple_t_bytes32_t_bytes32__to_t_bytes32_t_bytes32__fromStack_reversed(headStart, value1, value0) -> tail\n {\n tail := add(headStart, 64)\n mstore(headStart, value0)\n mstore(add(headStart, 32), value1)\n }\n function abi_encode_tuple_t_stringliteral_10858945dd31484ce6a77564821a1a6ff0e82939d9bea2b8e6caae50c7fc3750__to_t_string_memory_ptr__fromStack_reversed(headStart) -> tail\n {\n mstore(headStart, 32)\n mstore(add(headStart, 32), 11)\n mstore(add(headStart, 64), \"SWAP_EXISTS\")\n tail := add(headStart, 96)\n }\n function abi_encode_tuple_t_stringliteral_20442b474b3561be70a7e12c2acf875277f59e68e7748337cd68bf5c8ada064b__to_t_string_memory_ptr__fromStack_reversed(headStart) -> tail\n {\n mstore(headStart, 32)\n mstore(add(headStart, 32), 14)\n mstore(add(headStart, 64), \"INVALID_SECRET\")\n tail := add(headStart, 96)\n }\n function abi_encode_tuple_t_stringliteral_afbfa7d3db262df0c92c413f0113503b1c1332dc5a4a874fcd8d6a6de57b74dd__to_t_string_memory_ptr__fromStack_reversed(headStart) -> tail\n {\n mstore(headStart, 32)\n mstore(add(headStart, 32), 15)\n mstore(add(headStart, 64), \"SWAP_NOT_ACTIVE\")\n tail := add(headStart, 96)\n }\n function abi_encode_tuple_t_stringliteral_b98f3e47db5919a8c78ec10ff6bf7d1326066d3facdc164cf7441d38cae771df__to_t_string_memory_ptr__fromStack_reversed(headStart) -> tail\n {\n mstore(headStart, 32)\n mstore(add(headStart, 32), 12)\n mstore(add(headStart, 64), \"INVALID_TIME\")\n tail := add(headStart, 96)\n }\n function abi_encode_tuple_t_stringliteral_eb6dbbf3194e9f4dd39c8dabe51ddb59ca6ad00c50b1bc74675ce4b263687722__to_t_string_memory_ptr__fromStack_reversed(headStart) -> tail\n {\n mstore(headStart, 32)\n mstore(add(headStart, 32), 14)\n mstore(add(headStart, 64), \"INVALID_AMOUNT\")\n tail := add(headStart, 96)\n }\n function abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed(headStart, value0) -> tail\n {\n tail := add(headStart, 32)\n mstore(headStart, value0)\n }\n function abi_encode_tuple_t_uint256_t_uint256_t_uint256_t_bytes32_t_string_calldata_ptr_t_string_calldata_ptr__to_t_uint256_t_uint256_t_uint256_t_bytes32_t_string_memory_ptr_t_string_memory_ptr__fromStack_reversed(headStart, value7, value6, value5, value4, value3, value2, value1, value0) -> tail\n {\n mstore(headStart, value0)\n mstore(add(headStart, 32), value1)\n mstore(add(headStart, 64), value2)\n mstore(add(headStart, 96), value3)\n mstore(add(headStart, 128), 192)\n let tail_1 := abi_encode_t_string_calldata(value4, value5, add(headStart, 192))\n mstore(add(headStart, 160), sub(tail_1, headStart))\n tail := abi_encode_t_string_calldata(value6, value7, tail_1)\n }\n function abi_encode_tuple_t_uint256_t_uint256_t_uint256_t_uint256_t_bytes32_t_address_payable_t_address_payable_t_string_memory_ptr_t_string_memory_ptr__to_t_uint256_t_uint256_t_uint256_t_uint256_t_bytes32_t_address_payable_t_address_payable_t_string_memory_ptr_t_string_memory_ptr__fromStack_reversed(headStart, value8, value7, value6, value5, value4, value3, value2, value1, value0) -> tail\n {\n let _1 := 288\n mstore(headStart, value0)\n mstore(add(headStart, 32), value1)\n mstore(add(headStart, 64), value2)\n mstore(add(headStart, 96), value3)\n mstore(add(headStart, 128), value4)\n let _2 := sub(shl(160, 1), 1)\n mstore(add(headStart, 160), and(value5, _2))\n mstore(add(headStart, 192), and(value6, _2))\n mstore(add(headStart, 224), _1)\n let tail_1 := abi_encode_t_string(value7, add(headStart, _1))\n mstore(add(headStart, 256), sub(tail_1, headStart))\n tail := abi_encode_t_string(value8, tail_1)\n }\n function allocateMemory(size) -> memPtr\n {\n memPtr := mload(64)\n let newFreePtr := add(memPtr, size)\n if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, memPtr)) { invalid() }\n mstore(64, newFreePtr)\n }\n function copy_memory_to_memory(src, dst, length)\n {\n let i := 0\n for { } lt(i, length) { i := add(i, 32) }\n {\n mstore(add(dst, i), mload(add(src, i)))\n }\n if gt(i, length) { mstore(add(dst, length), 0) }\n }\n}", - "id": 3, - "language": "Yul", - "name": "#utility.yul" - } - ], - "sourceMap": "59:4438:1:-:0;;;;;;;;;;;;;;;;;;;", - "deployedSourceMap": "59:4438:1:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3557:303;;;;;;;;;;-1:-1:-1;3557:303:1;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;589:35;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;2734:462::-;;;;;;;;;;-1:-1:-1;2734:462:1;;;;;:::i;:::-;;:::i;:::-;;4235:260;;;;;;;;;;-1:-1:-1;4235:260:1;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;3202:349::-;;;;;;;;;;-1:-1:-1;3202:349:1;;;;;:::i;:::-;;:::i;258:35::-;;;;;;;;;;;;;:::i;431:36::-;;;;;;;;;;;;;:::i;509:37::-;;;;;;;;;;;;;:::i;342:34::-;;;;;;;;;;;;;:::i;1581:1147::-;;;;;;:::i;:::-;;:::i;88:49::-;;;;;;;;;;-1:-1:-1;88:49:1;;;;;:::i;:::-;;:::i;:::-;;;;;;;;;;;;;;;:::i;3866:363::-;;;;;;;;;;-1:-1:-1;3866:363:1;;;;;:::i;:::-;;:::i;3557:303::-;3619:16;3647:23;3687:3;:10;3673:25;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3673:25:1;;3647:51;;3714:13;3709:121;3741:3;:10;3733:5;:18;3709:121;;;3792:27;3808:3;3812:5;3808:10;;;;;;;;;;;;;;3792:15;:27::i;:::-;3776:6;3783:5;3776:13;;;;;;;;;;;;;;;;;:43;3753:7;;3709:121;;;-1:-1:-1;3847:6:1;-1:-1:-1;3557:303:1;;;;:::o;589:35::-;623:1;589:35;:::o;2734:462::-;2799:22;2824:13;;;;;;;;;;2856:8;;;;375:1;2856:18;2848:46;;;;-1:-1:-1;;;2848:46:1;;;;;;;:::i;:::-;;;;;;;;;2928:15;2913:1;:12;;;:30;2905:55;;;;-1:-1:-1;;;2905:55:1;;;;;;;:::i;:::-;2993:32;3017:6;3000:24;;;;;;;;:::i;:::-;;;;-1:-1:-1;;3000:24:1;;;;;;;;;;2993:32;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2979:1;:10;;;:46;2971:72;;;;-1:-1:-1;;;2971:72:1;;;;;;;:::i;:::-;545:1;3054:8;;;:20;3085:10;;;;3105:13;;3085:34;;-1:-1:-1;;;;;3085:10:1;;;;:34;;;;;3105:13;3085:10;:34;:10;:34;3105:13;3085:10;:34;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3178:10:1;;;;3168:8;;;;3156:10;;;;3135:54;;-1:-1:-1;;;;;3178:10:1;;;;3168:8;;;;3144:2;;3135:54;;;;3148:6;;3135:54;:::i;:::-;;;;;;;;2734:462;;;:::o;4235:260::-;4292:11;4315:32;;:::i;:::-;4350:9;:13;;;;;;;;;;;;4315:48;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;4315:48:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;4315:48:1;;;;;;;;;;;;;;;;;;;;;;;;;;4350:13;;4315:48;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;4315:48:1;;;-1:-1:-1;;4315:48:1;;;;;;;;;;;;;;;;-1:-1:-1;;4315:48:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;292:1;4378:12;:19;;;:30;4374:115;;;4431:5;4424:12;;;;;4374:115;4474:4;4467:11;;;;;4374:115;4235:260;;;;:::o;3202:349::-;3249:22;3274:13;;;;;;;;;;3306:8;;;;375:1;3306:18;3298:46;;;;-1:-1:-1;;;3298:46:1;;;;;;;:::i;:::-;3379:15;3363:1;:12;;;:31;;3355:56;;;;-1:-1:-1;;;3355:56:1;;;;;;;:::i;:::-;466:1;3422:8;;;:19;3452:8;;;;3470:13;;3452:32;;-1:-1:-1;;;;;3452:8:1;;;;:32;;;;;3470:13;3452:8;:32;:8;:32;3470:13;3452:8;:32;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3533:10:1;;;;3523:8;;;;3511:10;;;;3500:44;;-1:-1:-1;;;;;3533:10:1;;;;3523:8;;;;3507:2;;3500:44;;;;3511:10;3500:44;:::i;:::-;;;;;;;;3202:349;;:::o;258:35::-;292:1;258:35;:::o;431:36::-;466:1;431:36;:::o;509:37::-;545:1;509:37;:::o;342:34::-;375:1;342:34;:::o;1581:1147::-;1856:10;1898:9;1939:15;1926:28;;1918:53;;;;-1:-1:-1;;;1918:53:1;;;;;;;:::i;:::-;2004:1;1990:11;:15;1982:42;;;;-1:-1:-1;;;1982:42:1;;;;;;;:::i;:::-;2035:10;2048:99;2085:6;2093:8;2103:11;2116:8;2126:10;2068:69;;;;;;;;;;;;:::i;:::-;;;;-1:-1:-1;;2068:69:1;;;;;;;;;;2048:99;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;292:1;2166:13;;;;;;;;;;:20;;;2035:112;;-1:-1:-1;2166:31:1;2158:55;;;;-1:-1:-1;;;2158:55:1;;;;;;;:::i;:::-;2240:235;;;;;;;;2266:11;2240:235;;;;2291:12;2240:235;;;;2317:10;2240:235;;;;375:1;2240:235;;;;2361:8;2240:235;;;;2383:6;-1:-1:-1;;;;;2240:235:1;;;;;2403:8;-1:-1:-1;;;;;2240:235:1;;;;;2425:13;;2240:235;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;2240:235:1;;;-1:-1:-1;2240:235:1;;;;;;;;;;;;;;;;;;;;;;;;;;;2452:13;;;;;;2240:235;;2452:13;;;;2240:235;;;;;;;;-1:-1:-1;2240:235:1;;;;-1:-1:-1;;2224:13:1;;;;;;;;;;;;:251;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2224:251:1;;;-1:-1:-1;;;;;;2224:251:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:13;;-1:-1:-1;2224:251:1;;;;;;;;;;;;:::i;:::-;-1:-1:-1;2224:251:1;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;2649:8;-1:-1:-1;;;;;2491:230:1;2629:6;-1:-1:-1;;;;;2491:230:1;2591:2;2491:230;2516:11;2541:12;2567:10;2607:8;2671:13;;2698;;2491:230;;;;;;;;;;;;;:::i;:::-;;;;;;;;1581:1147;;;;;;;;;;;:::o;88:49::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;88:49:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;88:49:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;88:49:1;;;;;;;;;;;;;;;;-1:-1:-1;;88:49:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;88:49:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;3866:363::-;3924:14;3950:32;;:::i;:::-;3985:9;:13;;;;;;;;;;;;3950:48;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;3950:48:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;3950:48:1;;;;;;;;;;;;;;;;;;;;;;;;;;3985:13;;3950:48;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;3950:48:1;;;-1:-1:-1;;3950:48:1;;;;;;;;;;;;;;;;-1:-1:-1;;3950:48:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;375:1;4026:12;:19;;;:29;:86;;;;;4097:15;4071:12;:23;;;:41;4026:86;4009:214;;;623:1;4137:16;;4009:214;;;4193:19;;;;3866:363;-1:-1:-1;;3866:363:1:o;-1:-1:-1:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;14:378:3;;;132:3;125:4;117:6;113:17;109:27;99:2;;157:8;147;140:26;99:2;-1:-1:-1;187:20:3;;230:18;219:30;;216:2;;;269:8;259;252:26;216:2;313:4;305:6;301:17;289:29;;365:3;358:4;349:6;341;337:19;333:30;330:39;327:2;;;382:1;379;372:12;327:2;89:303;;;;;:::o;397:1013::-;;512:2;555;543:9;534:7;530:23;526:32;523:2;;;576:6;568;561:22;523:2;621:9;608:23;650:18;691:2;683:6;680:14;677:2;;;712:6;704;697:22;677:2;755:6;744:9;740:22;730:32;;800:7;793:4;789:2;785:13;781:27;771:2;;827:6;819;812:22;771:2;872;859:16;898:2;890:6;887:14;884:2;;;904:9;884:2;946;938:6;934:15;924:25;;969:27;992:2;988;984:11;969:27;:::i;:::-;1030:19;;;1065:12;;;;1097:11;;;1127;;;1123:20;;1120:33;-1:-1:-1;1117:2:3;;;1171:6;1163;1156:22;1117:2;1198:6;1189:15;;1213:167;1227:6;1224:1;1221:13;1213:167;;;1288:17;;1276:30;;1249:1;1242:9;;;;;1326:12;;;;1358;;1213:167;;;-1:-1:-1;1399:5:3;492:918;-1:-1:-1;;;;;;;;492:918:3:o;1415:190::-;;1527:2;1515:9;1506:7;1502:23;1498:32;1495:2;;;1548:6;1540;1533:22;1495:2;-1:-1:-1;1576:23:3;;1485:120;-1:-1:-1;1485:120:3:o;1610:194::-;;1733:2;1721:9;1712:7;1708:23;1704:32;1701:2;;;1754:6;1746;1739:22;1701:2;-1:-1:-1;1782:16:3;;1691:113;-1:-1:-1;1691:113:3:o;1809:258::-;;;1938:2;1926:9;1917:7;1913:23;1909:32;1906:2;;;1959:6;1951;1944:22;1906:2;-1:-1:-1;;1987:23:3;;;2057:2;2042:18;;;2029:32;;-1:-1:-1;1896:171:3:o;2072:1154::-;;;;;;;;;2317:3;2305:9;2296:7;2292:23;2288:33;2285:2;;;2339:6;2331;2324:22;2285:2;2367:23;;;-1:-1:-1;2437:2:3;2422:18;;2409:32;;-1:-1:-1;2488:2:3;2473:18;;2460:32;;-1:-1:-1;2542:2:3;2527:18;;2514:32;-1:-1:-1;;;;;2575:31:3;;2565:42;;2555:2;;2626:6;2618;2611:22;2555:2;2654:5;-1:-1:-1;2710:3:3;2695:19;;2682:33;2734:18;2764:14;;;2761:2;;;2796:6;2788;2781:22;2761:2;2840:61;2893:7;2884:6;2873:9;2869:22;2840:61;:::i;:::-;2920:8;;-1:-1:-1;2814:87:3;-1:-1:-1;3008:3:3;2993:19;;2980:33;;-1:-1:-1;3025:16:3;;;3022:2;;;3059:6;3051;3044:22;3022:2;;3103:63;3158:7;3147:8;3136:9;3132:24;3103:63;:::i;:::-;2275:951;;;;-1:-1:-1;2275:951:3;;-1:-1:-1;2275:951:3;;;;;;3185:8;-1:-1:-1;;;2275:951:3:o;3231:271::-;;3322:6;3317:3;3310:19;3374:6;3367:5;3360:4;3355:3;3351:14;3338:43;3426:3;3419:4;3410:6;3405:3;3401:16;3397:27;3390:40;3491:4;3484:2;3480:7;3475:2;3467:6;3463:15;3459:29;3454:3;3450:39;3446:50;3439:57;;3300:202;;;;;:::o;3507:260::-;;3589:5;3583:12;3616:6;3611:3;3604:19;3632:63;3688:6;3681:4;3676:3;3672:14;3665:4;3658:5;3654:16;3632:63;:::i;:::-;3749:2;3728:15;-1:-1:-1;;3724:29:3;3715:39;;;;3756:4;3711:50;;3559:208;-1:-1:-1;;3559:208:3:o;3772:562::-;-1:-1:-1;;4115:2:3;4111:15;;;4107:24;;4095:37;;4166:15;;;;4162:24;;;4157:2;4148:12;;4141:46;4212:2;4203:12;;4196:28;;;;4249:2;4240:12;;4233:28;4286:3;4277:13;;4270:29;4324:3;4315:13;;4035:299::o;4339:182::-;4468:19;;;4512:2;4503:12;;4458:63::o;4526:274::-;;4693:6;4687:13;4709:53;4755:6;4750:3;4743:4;4735:6;4731:17;4709:53;:::i;:::-;4778:16;;;;;4663:137;-1:-1:-1;;4663:137:3:o;4805:635::-;4976:2;5028:21;;;5098:13;;5001:18;;;5120:22;;;4805:635;;4976:2;5199:15;;;;5173:2;5158:18;;;4805:635;5245:169;5259:6;5256:1;5253:13;5245:169;;;5320:13;;5308:26;;5389:15;;;;5354:12;;;;5281:1;5274:9;5245:169;;;-1:-1:-1;5431:3:3;;4956:484;-1:-1:-1;;;;;;4956:484:3:o;5445:187::-;5610:14;;5603:22;5585:41;;5573:2;5558:18;;5540:92::o;5819:248::-;5993:25;;;6049:2;6034:18;;6027:34;5981:2;5966:18;;5948:119::o;6072:335::-;6274:2;6256:21;;;6313:2;6293:18;;;6286:30;-1:-1:-1;;;6347:2:3;6332:18;;6325:41;6398:2;6383:18;;6246:161::o;6412:338::-;6614:2;6596:21;;;6653:2;6633:18;;;6626:30;-1:-1:-1;;;6687:2:3;6672:18;;6665:44;6741:2;6726:18;;6586:164::o;6755:339::-;6957:2;6939:21;;;6996:2;6976:18;;;6969:30;-1:-1:-1;;;7030:2:3;7015:18;;7008:45;7085:2;7070:18;;6929:165::o;7099:336::-;7301:2;7283:21;;;7340:2;7320:18;;;7313:30;-1:-1:-1;;;7374:2:3;7359:18;;7352:42;7426:2;7411:18;;7273:162::o;7440:338::-;7642:2;7624:21;;;7681:2;7661:18;;;7654:30;-1:-1:-1;;;7715:2:3;7700:18;;7693:44;7769:2;7754:18;;7614:164::o;7965:729::-;;8294:6;8283:9;8276:25;8337:6;8332:2;8321:9;8317:18;8310:34;8380:6;8375:2;8364:9;8360:18;8353:34;8423:6;8418:2;8407:9;8403:18;8396:34;8467:3;8461;8450:9;8446:19;8439:32;8494:65;8554:3;8543:9;8539:19;8531:6;8523;8494:65;:::i;:::-;8608:9;8600:6;8596:22;8590:3;8579:9;8575:19;8568:51;8636:52;8681:6;8673;8665;8636:52;:::i;:::-;8628:60;8266:428;-1:-1:-1;;;;;;;;;;;8266:428:3:o;8699:999::-;;9116:3;9146:6;9135:9;9128:25;9189:6;9184:2;9173:9;9169:18;9162:34;9232:6;9227:2;9216:9;9212:18;9205:34;9275:6;9270:2;9259:9;9255:18;9248:34;9319:6;9313:3;9302:9;9298:19;9291:35;9362:1;9358;9353:3;9349:11;9345:19;9413:2;9405:6;9401:15;9395:3;9384:9;9380:19;9373:44;9466:2;9458:6;9454:15;9448:3;9437:9;9433:19;9426:44;;9507:2;9501:3;9490:9;9486:19;9479:31;9533:47;9576:2;9565:9;9561:18;9553:6;9533:47;:::i;:::-;9519:61;;9629:9;9621:6;9617:22;9611:3;9600:9;9596:19;9589:51;9657:35;9685:6;9677;9657:35;:::i;:::-;9649:43;9096:602;-1:-1:-1;;;;;;;;;;;;9096:602:3:o;9703:242::-;9773:2;9767:9;9803:17;;;9850:18;9835:34;;9871:22;;;9832:62;9829:2;;;9897:9;9829:2;9924;9917:22;9747:198;;-1:-1:-1;9747:198:3:o;9950:258::-;10022:1;10032:113;10046:6;10043:1;10040:13;10032:113;;;10122:11;;;10116:18;10103:11;;;10096:39;10068:2;10061:10;10032:113;;;10163:6;10160:1;10157:13;10154:2;;;10198:1;10189:6;10184:3;10180:16;10173:27;10154:2;;10003:205;;;:::o", - "source": "pragma solidity ^0.7.3;\npragma experimental ABIEncoderV2;\n\ncontract HashTimeLock {\n\n mapping(bytes32 => LockContract) public contracts;\n\n // / - WITHDRAWN\n // INVALID - ACTIVE |\n // \\ - EXPIRED - REFUNDED\n\n uint256 public constant INVALID = 0; // Uninitialized swap -> can go to ACTIVE\n uint256 public constant ACTIVE = 1; // Active swap -> can go to WITHDRAWN or EXPIRED\n uint256 public constant REFUNDED = 2; // Swap is refunded -> final state.\n uint256 public constant WITHDRAWN = 3; // Swap is withdrawn -> final state.\n uint256 public constant EXPIRED = 4; // Swap is expired -> can go to REFUNDED\n\n struct LockContract {\n uint256 inputAmount;\n uint256 outputAmount;\n uint256 expiration;\n uint256 status;\n bytes32 hashLock;\n address payable sender;\n address payable receiver;\n string outputNetwork;\n string outputAddress;\n }\n\n event Withdraw(\n bytes32 indexed id,\n bytes32 secret,\n bytes32 hashLock,\n address indexed sender,\n address indexed receiver\n );\n\n event Refund(\n bytes32 indexed id,\n bytes32 hashLock,\n address indexed sender,\n address indexed receiver\n );\n\n event NewContract(\n uint256 inputAmount,\n uint256 outputAmount,\n uint256 expiration,\n bytes32 indexed id,\n bytes32 hashLock,\n address indexed sender,\n address indexed receiver,\n string outputNetwork,\n string outputAddress\n );\n\n function newContract(\n uint256 outputAmount,\n uint256 expiration,\n bytes32 hashLock,\n address payable receiver,\n string calldata outputNetwork,\n string calldata outputAddress\n ) external payable {\n address payable sender = msg.sender;\n uint256 inputAmount = msg.value;\n\n require(expiration > block.timestamp, 'INVALID_TIME');\n\n require(inputAmount > 0, 'INVALID_AMOUNT');\n\n bytes32 id = sha256(\n abi.encodePacked(sender, receiver, inputAmount, hashLock, expiration)\n );\n\n require(contracts[id].status == INVALID, \"SWAP_EXISTS\");\n\n contracts[id] = LockContract(\n inputAmount,\n outputAmount,\n expiration,\n ACTIVE,\n hashLock,\n sender,\n receiver,\n outputNetwork,\n outputAddress\n );\n\n emit NewContract(\n inputAmount,\n outputAmount,\n expiration,\n id,\n hashLock,\n sender,\n receiver,\n outputNetwork,\n outputAddress\n );\n }\n\n function withdraw(bytes32 id, bytes32 secret) external {\n LockContract storage c = contracts[id];\n\n require(c.status == ACTIVE, \"SWAP_NOT_ACTIVE\");\n\n require(c.expiration > block.timestamp, \"INVALID_TIME\");\n\n require(c.hashLock == sha256(abi.encodePacked(secret)),\"INVALID_SECRET\");\n\n c.status = WITHDRAWN;\n\n c.receiver.transfer(c.inputAmount);\n\n emit Withdraw(id, secret, c.hashLock, c.sender, c.receiver);\n }\n\n function refund(bytes32 id) external {\n LockContract storage c = contracts[id];\n\n require(c.status == ACTIVE, \"SWAP_NOT_ACTIVE\");\n\n require(c.expiration <= block.timestamp, \"INVALID_TIME\");\n\n c.status = REFUNDED;\n\n c.sender.transfer(c.inputAmount);\n\n emit Refund(id, c.hashLock, c.sender, c.receiver);\n }\n\n function getStatus(bytes32[] memory ids) public view returns (uint256[] memory) {\n uint256[] memory result = new uint256[](ids.length);\n\n for (uint256 index = 0; index < ids.length; index++) {\n result[index] = getSingleStatus(ids[index]);\n }\n\n return result;\n }\n\n function getSingleStatus(bytes32 id) public view returns (uint256 result) {\n LockContract memory tempContract = contracts[id];\n\n if (\n tempContract.status == ACTIVE &&\n tempContract.expiration < block.timestamp\n ) {\n result = EXPIRED;\n } else {\n result = tempContract.status;\n }\n }\n\n function contractExists(bytes32 id) public view returns (bool result) {\n LockContract memory tempContract = contracts[id];\n\n if (tempContract.status == INVALID) {\n return false;\n } else {\n return true;\n }\n }\n}\n", - "sourcePath": "/Users/jordigironamezcua/Workspace/src/github.com/fork/cactus/extensions/cactus-plugin-htlc-eth-besu/src/main/contracts/contracts/HashTimeLock.sol", - "ast": { - "absolutePath": "/Users/jordigironamezcua/Workspace/src/github.com/fork/cactus/extensions/cactus-plugin-htlc-eth-besu/src/main/contracts/contracts/HashTimeLock.sol", - "exportedSymbols": { - "HashTimeLock": [ - 462 - ] - }, - "id": 463, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 56, - "literals": [ - "solidity", - "^", - "0.7", - ".3" - ], - "nodeType": "PragmaDirective", - "src": "0:23:1" - }, - { - "id": 57, - "literals": [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "24:33:1" - }, - { - "abstract": false, - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 462, - "linearizedBaseContracts": [ - 462 - ], - "name": "HashTimeLock", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "functionSelector": "ec56a373", - "id": 61, - "mutability": "mutable", - "name": "contracts", - "nodeType": "VariableDeclaration", - "scope": 462, - "src": "88:49:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_LockContract_$95_storage_$", - "typeString": "mapping(bytes32 => struct HashTimeLock.LockContract)" - }, - "typeName": { - "id": 60, - "keyType": { - "id": 58, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "96:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "Mapping", - "src": "88:32:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_LockContract_$95_storage_$", - "typeString": "mapping(bytes32 => struct HashTimeLock.LockContract)" - }, - "valueType": { - "id": 59, - "name": "LockContract", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 95, - "src": "107:12:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$95_storage_ptr", - "typeString": "struct HashTimeLock.LockContract" - } - } - }, - "visibility": "public" - }, - { - "constant": true, - "functionSelector": "7fcce2a9", - "id": 64, - "mutability": "constant", - "name": "INVALID", - "nodeType": "VariableDeclaration", - "scope": 462, - "src": "258:35:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 62, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "258:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "hexValue": "30", - "id": 63, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "292:1:1", - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "visibility": "public" - }, - { - "constant": true, - "functionSelector": "c90bd047", - "id": 67, - "mutability": "constant", - "name": "ACTIVE", - "nodeType": "VariableDeclaration", - "scope": 462, - "src": "342:34:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 65, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "342:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "hexValue": "31", - "id": 66, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "375:1:1", - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "visibility": "public" - }, - { - "constant": true, - "functionSelector": "94e15c8f", - "id": 70, - "mutability": "constant", - "name": "REFUNDED", - "nodeType": "VariableDeclaration", - "scope": 462, - "src": "431:36:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 68, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "431:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "hexValue": "32", - "id": 69, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "466:1:1", - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "visibility": "public" - }, - { - "constant": true, - "functionSelector": "af78feef", - "id": 73, - "mutability": "constant", - "name": "WITHDRAWN", - "nodeType": "VariableDeclaration", - "scope": 462, - "src": "509:37:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 71, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "509:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "hexValue": "33", - "id": 72, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "545:1:1", - "typeDescriptions": { - "typeIdentifier": "t_rational_3_by_1", - "typeString": "int_const 3" - }, - "value": "3" - }, - "visibility": "public" - }, - { - "constant": true, - "functionSelector": "414ac85b", - "id": 76, - "mutability": "constant", - "name": "EXPIRED", - "nodeType": "VariableDeclaration", - "scope": 462, - "src": "589:35:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 74, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "589:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "hexValue": "34", - "id": 75, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "623:1:1", - "typeDescriptions": { - "typeIdentifier": "t_rational_4_by_1", - "typeString": "int_const 4" - }, - "value": "4" - }, - "visibility": "public" - }, - { - "canonicalName": "HashTimeLock.LockContract", - "id": 95, - "members": [ - { - "constant": false, - "id": 78, - "mutability": "mutable", - "name": "inputAmount", - "nodeType": "VariableDeclaration", - "scope": 95, - "src": "702:19:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 77, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "702:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 80, - "mutability": "mutable", - "name": "outputAmount", - "nodeType": "VariableDeclaration", - "scope": 95, - "src": "731:20:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 79, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "731:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 82, - "mutability": "mutable", - "name": "expiration", - "nodeType": "VariableDeclaration", - "scope": 95, - "src": "761:18:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 81, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "761:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 84, - "mutability": "mutable", - "name": "status", - "nodeType": "VariableDeclaration", - "scope": 95, - "src": "789:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 83, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "789:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 86, - "mutability": "mutable", - "name": "hashLock", - "nodeType": "VariableDeclaration", - "scope": 95, - "src": "813:16:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 85, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "813:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 88, - "mutability": "mutable", - "name": "sender", - "nodeType": "VariableDeclaration", - "scope": 95, - "src": "839:22:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 87, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "839:15:1", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 90, - "mutability": "mutable", - "name": "receiver", - "nodeType": "VariableDeclaration", - "scope": 95, - "src": "871:24:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 89, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "871:15:1", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 92, - "mutability": "mutable", - "name": "outputNetwork", - "nodeType": "VariableDeclaration", - "scope": 95, - "src": "905:20:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - }, - "typeName": { - "id": 91, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "905:6:1", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 94, - "mutability": "mutable", - "name": "outputAddress", - "nodeType": "VariableDeclaration", - "scope": 95, - "src": "935:20:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - }, - "typeName": { - "id": 93, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "935:6:1", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "name": "LockContract", - "nodeType": "StructDefinition", - "scope": 462, - "src": "672:290:1", - "visibility": "public" - }, - { - "anonymous": false, - "id": 107, - "name": "Withdraw", - "nodeType": "EventDefinition", - "parameters": { - "id": 106, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 97, - "indexed": true, - "mutability": "mutable", - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 107, - "src": "992:18:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 96, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "992:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 99, - "indexed": false, - "mutability": "mutable", - "name": "secret", - "nodeType": "VariableDeclaration", - "scope": 107, - "src": "1020:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 98, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1020:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 101, - "indexed": false, - "mutability": "mutable", - "name": "hashLock", - "nodeType": "VariableDeclaration", - "scope": 107, - "src": "1044:16:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 100, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1044:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 103, - "indexed": true, - "mutability": "mutable", - "name": "sender", - "nodeType": "VariableDeclaration", - "scope": 107, - "src": "1070:22:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 102, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1070:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 105, - "indexed": true, - "mutability": "mutable", - "name": "receiver", - "nodeType": "VariableDeclaration", - "scope": 107, - "src": "1102:24:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 104, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1102:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "982:150:1" - }, - "src": "968:165:1" - }, - { - "anonymous": false, - "id": 117, - "name": "Refund", - "nodeType": "EventDefinition", - "parameters": { - "id": 116, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 109, - "indexed": true, - "mutability": "mutable", - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 117, - "src": "1161:18:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 108, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1161:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 111, - "indexed": false, - "mutability": "mutable", - "name": "hashLock", - "nodeType": "VariableDeclaration", - "scope": 117, - "src": "1189:16:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 110, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1189:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 113, - "indexed": true, - "mutability": "mutable", - "name": "sender", - "nodeType": "VariableDeclaration", - "scope": 117, - "src": "1215:22:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 112, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1215:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 115, - "indexed": true, - "mutability": "mutable", - "name": "receiver", - "nodeType": "VariableDeclaration", - "scope": 117, - "src": "1247:24:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 114, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1247:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "1151:126:1" - }, - "src": "1139:139:1" - }, - { - "anonymous": false, - "id": 137, - "name": "NewContract", - "nodeType": "EventDefinition", - "parameters": { - "id": 136, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 119, - "indexed": false, - "mutability": "mutable", - "name": "inputAmount", - "nodeType": "VariableDeclaration", - "scope": 137, - "src": "1311:19:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 118, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1311:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 121, - "indexed": false, - "mutability": "mutable", - "name": "outputAmount", - "nodeType": "VariableDeclaration", - "scope": 137, - "src": "1340:20:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 120, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1340:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 123, - "indexed": false, - "mutability": "mutable", - "name": "expiration", - "nodeType": "VariableDeclaration", - "scope": 137, - "src": "1370:18:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 122, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1370:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 125, - "indexed": true, - "mutability": "mutable", - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 137, - "src": "1398:18:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 124, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1398:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 127, - "indexed": false, - "mutability": "mutable", - "name": "hashLock", - "nodeType": "VariableDeclaration", - "scope": 137, - "src": "1426:16:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 126, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1426:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 129, - "indexed": true, - "mutability": "mutable", - "name": "sender", - "nodeType": "VariableDeclaration", - "scope": 137, - "src": "1452:22:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 128, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1452:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 131, - "indexed": true, - "mutability": "mutable", - "name": "receiver", - "nodeType": "VariableDeclaration", - "scope": 137, - "src": "1484:24:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 130, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1484:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 133, - "indexed": false, - "mutability": "mutable", - "name": "outputNetwork", - "nodeType": "VariableDeclaration", - "scope": 137, - "src": "1518:20:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 132, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1518:6:1", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 135, - "indexed": false, - "mutability": "mutable", - "name": "outputAddress", - "nodeType": "VariableDeclaration", - "scope": 137, - "src": "1548:20:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 134, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1548:6:1", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "1301:273:1" - }, - "src": "1284:291:1" - }, - { - "body": { - "id": 228, - "nodeType": "Block", - "src": "1821:907:1", - "statements": [ - { - "assignments": [ - 153 - ], - "declarations": [ - { - "constant": false, - "id": 153, - "mutability": "mutable", - "name": "sender", - "nodeType": "VariableDeclaration", - "scope": 228, - "src": "1831:22:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 152, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1831:15:1", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "visibility": "internal" - } - ], - "id": 156, - "initialValue": { - "expression": { - "id": 154, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "1856:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 155, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "src": "1856:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "1831:35:1" - }, - { - "assignments": [ - 158 - ], - "declarations": [ - { - "constant": false, - "id": 158, - "mutability": "mutable", - "name": "inputAmount", - "nodeType": "VariableDeclaration", - "scope": 228, - "src": "1876:19:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 157, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1876:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 161, - "initialValue": { - "expression": { - "id": 159, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "1898:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 160, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "value", - "nodeType": "MemberAccess", - "src": "1898:9:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "1876:31:1" - }, - { - "expression": { - "arguments": [ - { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 166, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "id": 163, - "name": "expiration", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 141, - "src": "1926:10:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "expression": { - "id": 164, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -4, - "src": "1939:5:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 165, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "src": "1939:15:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1926:28:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "494e56414c49445f54494d45", - "id": 167, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1956:14:1", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_b98f3e47db5919a8c78ec10ff6bf7d1326066d3facdc164cf7441d38cae771df", - "typeString": "literal_string \"INVALID_TIME\"" - }, - "value": "INVALID_TIME" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_b98f3e47db5919a8c78ec10ff6bf7d1326066d3facdc164cf7441d38cae771df", - "typeString": "literal_string \"INVALID_TIME\"" - } - ], - "id": 162, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "1918:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 168, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1918:53:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 169, - "nodeType": "ExpressionStatement", - "src": "1918:53:1" - }, - { - "expression": { - "arguments": [ - { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 173, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "id": 171, - "name": "inputAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 158, - "src": "1990:11:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "hexValue": "30", - "id": 172, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2004:1:1", - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "1990:15:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "494e56414c49445f414d4f554e54", - "id": 174, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2007:16:1", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_eb6dbbf3194e9f4dd39c8dabe51ddb59ca6ad00c50b1bc74675ce4b263687722", - "typeString": "literal_string \"INVALID_AMOUNT\"" - }, - "value": "INVALID_AMOUNT" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_eb6dbbf3194e9f4dd39c8dabe51ddb59ca6ad00c50b1bc74675ce4b263687722", - "typeString": "literal_string \"INVALID_AMOUNT\"" - } - ], - "id": 170, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "1982:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 175, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1982:42:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 176, - "nodeType": "ExpressionStatement", - "src": "1982:42:1" - }, - { - "assignments": [ - 178 - ], - "declarations": [ - { - "constant": false, - "id": 178, - "mutability": "mutable", - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 228, - "src": "2035:10:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 177, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "2035:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "internal" - } - ], - "id": 189, - "initialValue": { - "arguments": [ - { - "arguments": [ - { - "id": 182, - "name": "sender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 153, - "src": "2085:6:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "id": 183, - "name": "receiver", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 145, - "src": "2093:8:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "id": 184, - "name": "inputAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 158, - "src": "2103:11:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "id": 185, - "name": "hashLock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 143, - "src": "2116:8:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "id": 186, - "name": "expiration", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 141, - "src": "2126:10:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "id": 180, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -1, - "src": "2068:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 181, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "src": "2068:16:1", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 187, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2068:69:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 179, - "name": "sha256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -22, - "src": "2048:6:1", - "typeDescriptions": { - "typeIdentifier": "t_function_sha256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 188, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2048:99:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "2035:112:1" - }, - { - "expression": { - "arguments": [ - { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 196, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "expression": { - "baseExpression": { - "id": 191, - "name": "contracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 61, - "src": "2166:9:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_LockContract_$95_storage_$", - "typeString": "mapping(bytes32 => struct HashTimeLock.LockContract storage ref)" - } - }, - "id": 193, - "indexExpression": { - "id": 192, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 178, - "src": "2176:2:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2166:13:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$95_storage", - "typeString": "struct HashTimeLock.LockContract storage ref" - } - }, - "id": 194, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 84, - "src": "2166:20:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "id": 195, - "name": "INVALID", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 64, - "src": "2190:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2166:31:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "535741505f455849535453", - "id": 197, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2199:13:1", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_10858945dd31484ce6a77564821a1a6ff0e82939d9bea2b8e6caae50c7fc3750", - "typeString": "literal_string \"SWAP_EXISTS\"" - }, - "value": "SWAP_EXISTS" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_10858945dd31484ce6a77564821a1a6ff0e82939d9bea2b8e6caae50c7fc3750", - "typeString": "literal_string \"SWAP_EXISTS\"" - } - ], - "id": 190, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "2158:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 198, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2158:55:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 199, - "nodeType": "ExpressionStatement", - "src": "2158:55:1" - }, - { - "expression": { - "id": 214, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "baseExpression": { - "id": 200, - "name": "contracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 61, - "src": "2224:9:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_LockContract_$95_storage_$", - "typeString": "mapping(bytes32 => struct HashTimeLock.LockContract storage ref)" - } - }, - "id": 202, - "indexExpression": { - "id": 201, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 178, - "src": "2234:2:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "2224:13:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$95_storage", - "typeString": "struct HashTimeLock.LockContract storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "arguments": [ - { - "id": 204, - "name": "inputAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 158, - "src": "2266:11:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "id": 205, - "name": "outputAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 139, - "src": "2291:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "id": 206, - "name": "expiration", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 141, - "src": "2317:10:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "id": 207, - "name": "ACTIVE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 67, - "src": "2341:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "id": 208, - "name": "hashLock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 143, - "src": "2361:8:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "id": 209, - "name": "sender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 153, - "src": "2383:6:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "id": 210, - "name": "receiver", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 145, - "src": "2403:8:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "id": 211, - "name": "outputNetwork", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 147, - "src": "2425:13:1", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - { - "id": 212, - "name": "outputAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 149, - "src": "2452:13:1", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - }, - { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - ], - "id": 203, - "name": "LockContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 95, - "src": "2240:12:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_struct$_LockContract_$95_storage_ptr_$", - "typeString": "type(struct HashTimeLock.LockContract storage pointer)" - } - }, - "id": 213, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "structConstructorCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2240:235:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$95_memory_ptr", - "typeString": "struct HashTimeLock.LockContract memory" - } - }, - "src": "2224:251:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$95_storage", - "typeString": "struct HashTimeLock.LockContract storage ref" - } - }, - "id": 215, - "nodeType": "ExpressionStatement", - "src": "2224:251:1" - }, - { - "eventCall": { - "arguments": [ - { - "id": 217, - "name": "inputAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 158, - "src": "2516:11:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "id": 218, - "name": "outputAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 139, - "src": "2541:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "id": 219, - "name": "expiration", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 141, - "src": "2567:10:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "id": 220, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 178, - "src": "2591:2:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "id": 221, - "name": "hashLock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 143, - "src": "2607:8:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "id": 222, - "name": "sender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 153, - "src": "2629:6:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "id": 223, - "name": "receiver", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 145, - "src": "2649:8:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "id": 224, - "name": "outputNetwork", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 147, - "src": "2671:13:1", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - { - "id": 225, - "name": "outputAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 149, - "src": "2698:13:1", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - }, - { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - ], - "id": 216, - "name": "NewContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 137, - "src": "2491:11:1", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$_t_uint256_$_t_bytes32_$_t_bytes32_$_t_address_$_t_address_$_t_string_memory_ptr_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (uint256,uint256,uint256,bytes32,bytes32,address,address,string memory,string memory)" - } - }, - "id": 226, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2491:230:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 227, - "nodeType": "EmitStatement", - "src": "2486:235:1" - } - ] - }, - "functionSelector": "d3632095", - "id": 229, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "newContract", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 150, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 139, - "mutability": "mutable", - "name": "outputAmount", - "nodeType": "VariableDeclaration", - "scope": 229, - "src": "1611:20:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 138, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1611:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 141, - "mutability": "mutable", - "name": "expiration", - "nodeType": "VariableDeclaration", - "scope": 229, - "src": "1641:18:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 140, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1641:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 143, - "mutability": "mutable", - "name": "hashLock", - "nodeType": "VariableDeclaration", - "scope": 229, - "src": "1669:16:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 142, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1669:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 145, - "mutability": "mutable", - "name": "receiver", - "nodeType": "VariableDeclaration", - "scope": 229, - "src": "1695:24:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 144, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1695:15:1", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 147, - "mutability": "mutable", - "name": "outputNetwork", - "nodeType": "VariableDeclaration", - "scope": 229, - "src": "1729:29:1", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string" - }, - "typeName": { - "id": 146, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1729:6:1", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 149, - "mutability": "mutable", - "name": "outputAddress", - "nodeType": "VariableDeclaration", - "scope": 229, - "src": "1768:29:1", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string" - }, - "typeName": { - "id": 148, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1768:6:1", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "1601:202:1" - }, - "returnParameters": { - "id": 151, - "nodeType": "ParameterList", - "parameters": [], - "src": "1821:0:1" - }, - "scope": 462, - "src": "1581:1147:1", - "stateMutability": "payable", - "virtual": false, - "visibility": "external" - }, - { - "body": { - "id": 298, - "nodeType": "Block", - "src": "2789:407:1", - "statements": [ - { - "assignments": [ - 237 - ], - "declarations": [ - { - "constant": false, - "id": 237, - "mutability": "mutable", - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 298, - "src": "2799:22:1", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$95_storage_ptr", - "typeString": "struct HashTimeLock.LockContract" - }, - "typeName": { - "id": 236, - "name": "LockContract", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 95, - "src": "2799:12:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$95_storage_ptr", - "typeString": "struct HashTimeLock.LockContract" - } - }, - "visibility": "internal" - } - ], - "id": 241, - "initialValue": { - "baseExpression": { - "id": 238, - "name": "contracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 61, - "src": "2824:9:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_LockContract_$95_storage_$", - "typeString": "mapping(bytes32 => struct HashTimeLock.LockContract storage ref)" - } - }, - "id": 240, - "indexExpression": { - "id": 239, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 231, - "src": "2834:2:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2824:13:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$95_storage", - "typeString": "struct HashTimeLock.LockContract storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "2799:38:1" - }, - { - "expression": { - "arguments": [ - { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 246, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "expression": { - "id": 243, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 237, - "src": "2856:1:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$95_storage_ptr", - "typeString": "struct HashTimeLock.LockContract storage pointer" - } - }, - "id": 244, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 84, - "src": "2856:8:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "id": 245, - "name": "ACTIVE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 67, - "src": "2868:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2856:18:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "535741505f4e4f545f414354495645", - "id": 247, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2876:17:1", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_afbfa7d3db262df0c92c413f0113503b1c1332dc5a4a874fcd8d6a6de57b74dd", - "typeString": "literal_string \"SWAP_NOT_ACTIVE\"" - }, - "value": "SWAP_NOT_ACTIVE" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_afbfa7d3db262df0c92c413f0113503b1c1332dc5a4a874fcd8d6a6de57b74dd", - "typeString": "literal_string \"SWAP_NOT_ACTIVE\"" - } - ], - "id": 242, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "2848:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 248, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2848:46:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 249, - "nodeType": "ExpressionStatement", - "src": "2848:46:1" - }, - { - "expression": { - "arguments": [ - { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 255, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "expression": { - "id": 251, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 237, - "src": "2913:1:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$95_storage_ptr", - "typeString": "struct HashTimeLock.LockContract storage pointer" - } - }, - "id": 252, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "expiration", - "nodeType": "MemberAccess", - "referencedDeclaration": 82, - "src": "2913:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "expression": { - "id": 253, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -4, - "src": "2928:5:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 254, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "src": "2928:15:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2913:30:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "494e56414c49445f54494d45", - "id": 256, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2945:14:1", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_b98f3e47db5919a8c78ec10ff6bf7d1326066d3facdc164cf7441d38cae771df", - "typeString": "literal_string \"INVALID_TIME\"" - }, - "value": "INVALID_TIME" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_b98f3e47db5919a8c78ec10ff6bf7d1326066d3facdc164cf7441d38cae771df", - "typeString": "literal_string \"INVALID_TIME\"" - } - ], - "id": 250, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "2905:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 257, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2905:55:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 258, - "nodeType": "ExpressionStatement", - "src": "2905:55:1" - }, - { - "expression": { - "arguments": [ - { - "commonType": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "id": 268, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "expression": { - "id": 260, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 237, - "src": "2979:1:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$95_storage_ptr", - "typeString": "struct HashTimeLock.LockContract storage pointer" - } - }, - "id": 261, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "hashLock", - "nodeType": "MemberAccess", - "referencedDeclaration": 86, - "src": "2979:10:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "arguments": [ - { - "arguments": [ - { - "id": 265, - "name": "secret", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 233, - "src": "3017:6:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "id": 263, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -1, - "src": "3000:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 264, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "src": "3000:16:1", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 266, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3000:24:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 262, - "name": "sha256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -22, - "src": "2993:6:1", - "typeDescriptions": { - "typeIdentifier": "t_function_sha256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 267, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2993:32:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "src": "2979:46:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "494e56414c49445f534543524554", - "id": 269, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3026:16:1", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_20442b474b3561be70a7e12c2acf875277f59e68e7748337cd68bf5c8ada064b", - "typeString": "literal_string \"INVALID_SECRET\"" - }, - "value": "INVALID_SECRET" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_20442b474b3561be70a7e12c2acf875277f59e68e7748337cd68bf5c8ada064b", - "typeString": "literal_string \"INVALID_SECRET\"" - } - ], - "id": 259, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "2971:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 270, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2971:72:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 271, - "nodeType": "ExpressionStatement", - "src": "2971:72:1" - }, - { - "expression": { - "id": 276, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "expression": { - "id": 272, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 237, - "src": "3054:1:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$95_storage_ptr", - "typeString": "struct HashTimeLock.LockContract storage pointer" - } - }, - "id": 274, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 84, - "src": "3054:8:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "id": 275, - "name": "WITHDRAWN", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 73, - "src": "3065:9:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3054:20:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 277, - "nodeType": "ExpressionStatement", - "src": "3054:20:1" - }, - { - "expression": { - "arguments": [ - { - "expression": { - "id": 283, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 237, - "src": "3105:1:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$95_storage_ptr", - "typeString": "struct HashTimeLock.LockContract storage pointer" - } - }, - "id": 284, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "inputAmount", - "nodeType": "MemberAccess", - "referencedDeclaration": 78, - "src": "3105:13:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "expression": { - "id": 278, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 237, - "src": "3085:1:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$95_storage_ptr", - "typeString": "struct HashTimeLock.LockContract storage pointer" - } - }, - "id": 281, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "receiver", - "nodeType": "MemberAccess", - "referencedDeclaration": 90, - "src": "3085:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "id": 282, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transfer", - "nodeType": "MemberAccess", - "src": "3085:19:1", - "typeDescriptions": { - "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 285, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3085:34:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 286, - "nodeType": "ExpressionStatement", - "src": "3085:34:1" - }, - { - "eventCall": { - "arguments": [ - { - "id": 288, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 231, - "src": "3144:2:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "id": 289, - "name": "secret", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 233, - "src": "3148:6:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "expression": { - "id": 290, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 237, - "src": "3156:1:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$95_storage_ptr", - "typeString": "struct HashTimeLock.LockContract storage pointer" - } - }, - "id": 291, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "hashLock", - "nodeType": "MemberAccess", - "referencedDeclaration": 86, - "src": "3156:10:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "expression": { - "id": 292, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 237, - "src": "3168:1:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$95_storage_ptr", - "typeString": "struct HashTimeLock.LockContract storage pointer" - } - }, - "id": 293, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": 88, - "src": "3168:8:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "expression": { - "id": 294, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 237, - "src": "3178:1:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$95_storage_ptr", - "typeString": "struct HashTimeLock.LockContract storage pointer" - } - }, - "id": 295, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "receiver", - "nodeType": "MemberAccess", - "referencedDeclaration": 90, - "src": "3178:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 287, - "name": "Withdraw", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 107, - "src": "3135:8:1", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_bytes32_$_t_bytes32_$_t_address_$_t_address_$returns$__$", - "typeString": "function (bytes32,bytes32,bytes32,address,address)" - } - }, - "id": 296, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3135:54:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 297, - "nodeType": "EmitStatement", - "src": "3130:59:1" - } - ] - }, - "functionSelector": "63615149", - "id": 299, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "withdraw", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 234, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 231, - "mutability": "mutable", - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 299, - "src": "2752:10:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 230, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "2752:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 233, - "mutability": "mutable", - "name": "secret", - "nodeType": "VariableDeclaration", - "scope": 299, - "src": "2764:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 232, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "2764:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "internal" - } - ], - "src": "2751:28:1" - }, - "returnParameters": { - "id": 235, - "nodeType": "ParameterList", - "parameters": [], - "src": "2789:0:1" - }, - "scope": 462, - "src": "2734:462:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - { - "body": { - "id": 352, - "nodeType": "Block", - "src": "3239:312:1", - "statements": [ - { - "assignments": [ - 305 - ], - "declarations": [ - { - "constant": false, - "id": 305, - "mutability": "mutable", - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 352, - "src": "3249:22:1", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$95_storage_ptr", - "typeString": "struct HashTimeLock.LockContract" - }, - "typeName": { - "id": 304, - "name": "LockContract", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 95, - "src": "3249:12:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$95_storage_ptr", - "typeString": "struct HashTimeLock.LockContract" - } - }, - "visibility": "internal" - } - ], - "id": 309, - "initialValue": { - "baseExpression": { - "id": 306, - "name": "contracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 61, - "src": "3274:9:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_LockContract_$95_storage_$", - "typeString": "mapping(bytes32 => struct HashTimeLock.LockContract storage ref)" - } - }, - "id": 308, - "indexExpression": { - "id": 307, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 301, - "src": "3284:2:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3274:13:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$95_storage", - "typeString": "struct HashTimeLock.LockContract storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "3249:38:1" - }, - { - "expression": { - "arguments": [ - { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 314, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "expression": { - "id": 311, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 305, - "src": "3306:1:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$95_storage_ptr", - "typeString": "struct HashTimeLock.LockContract storage pointer" - } - }, - "id": 312, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 84, - "src": "3306:8:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "id": 313, - "name": "ACTIVE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 67, - "src": "3318:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3306:18:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "535741505f4e4f545f414354495645", - "id": 315, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3326:17:1", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_afbfa7d3db262df0c92c413f0113503b1c1332dc5a4a874fcd8d6a6de57b74dd", - "typeString": "literal_string \"SWAP_NOT_ACTIVE\"" - }, - "value": "SWAP_NOT_ACTIVE" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_afbfa7d3db262df0c92c413f0113503b1c1332dc5a4a874fcd8d6a6de57b74dd", - "typeString": "literal_string \"SWAP_NOT_ACTIVE\"" - } - ], - "id": 310, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "3298:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 316, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3298:46:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 317, - "nodeType": "ExpressionStatement", - "src": "3298:46:1" - }, - { - "expression": { - "arguments": [ - { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 323, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "expression": { - "id": 319, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 305, - "src": "3363:1:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$95_storage_ptr", - "typeString": "struct HashTimeLock.LockContract storage pointer" - } - }, - "id": 320, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "expiration", - "nodeType": "MemberAccess", - "referencedDeclaration": 82, - "src": "3363:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "expression": { - "id": 321, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -4, - "src": "3379:5:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 322, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "src": "3379:15:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3363:31:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "494e56414c49445f54494d45", - "id": 324, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3396:14:1", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_b98f3e47db5919a8c78ec10ff6bf7d1326066d3facdc164cf7441d38cae771df", - "typeString": "literal_string \"INVALID_TIME\"" - }, - "value": "INVALID_TIME" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_b98f3e47db5919a8c78ec10ff6bf7d1326066d3facdc164cf7441d38cae771df", - "typeString": "literal_string \"INVALID_TIME\"" - } - ], - "id": 318, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "3355:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 325, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3355:56:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 326, - "nodeType": "ExpressionStatement", - "src": "3355:56:1" - }, - { - "expression": { - "id": 331, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "expression": { - "id": 327, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 305, - "src": "3422:1:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$95_storage_ptr", - "typeString": "struct HashTimeLock.LockContract storage pointer" - } - }, - "id": 329, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 84, - "src": "3422:8:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "id": 330, - "name": "REFUNDED", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 70, - "src": "3433:8:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3422:19:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 332, - "nodeType": "ExpressionStatement", - "src": "3422:19:1" - }, - { - "expression": { - "arguments": [ - { - "expression": { - "id": 338, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 305, - "src": "3470:1:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$95_storage_ptr", - "typeString": "struct HashTimeLock.LockContract storage pointer" - } - }, - "id": 339, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "inputAmount", - "nodeType": "MemberAccess", - "referencedDeclaration": 78, - "src": "3470:13:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "expression": { - "id": 333, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 305, - "src": "3452:1:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$95_storage_ptr", - "typeString": "struct HashTimeLock.LockContract storage pointer" - } - }, - "id": 336, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": 88, - "src": "3452:8:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "id": 337, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transfer", - "nodeType": "MemberAccess", - "src": "3452:17:1", - "typeDescriptions": { - "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 340, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3452:32:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 341, - "nodeType": "ExpressionStatement", - "src": "3452:32:1" - }, - { - "eventCall": { - "arguments": [ - { - "id": 343, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 301, - "src": "3507:2:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "expression": { - "id": 344, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 305, - "src": "3511:1:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$95_storage_ptr", - "typeString": "struct HashTimeLock.LockContract storage pointer" - } - }, - "id": 345, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "hashLock", - "nodeType": "MemberAccess", - "referencedDeclaration": 86, - "src": "3511:10:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "expression": { - "id": 346, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 305, - "src": "3523:1:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$95_storage_ptr", - "typeString": "struct HashTimeLock.LockContract storage pointer" - } - }, - "id": 347, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": 88, - "src": "3523:8:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "expression": { - "id": 348, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 305, - "src": "3533:1:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$95_storage_ptr", - "typeString": "struct HashTimeLock.LockContract storage pointer" - } - }, - "id": 349, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "receiver", - "nodeType": "MemberAccess", - "referencedDeclaration": 90, - "src": "3533:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 342, - "name": "Refund", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 117, - "src": "3500:6:1", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_bytes32_$_t_address_$_t_address_$returns$__$", - "typeString": "function (bytes32,bytes32,address,address)" - } - }, - "id": 350, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3500:44:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 351, - "nodeType": "EmitStatement", - "src": "3495:49:1" - } - ] - }, - "functionSelector": "7249fbb6", - "id": 353, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "refund", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 302, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 301, - "mutability": "mutable", - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 353, - "src": "3218:10:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 300, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "3218:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "internal" - } - ], - "src": "3217:12:1" - }, - "returnParameters": { - "id": 303, - "nodeType": "ParameterList", - "parameters": [], - "src": "3239:0:1" - }, - "scope": 462, - "src": "3202:349:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - { - "body": { - "id": 399, - "nodeType": "Block", - "src": "3637:223:1", - "statements": [ - { - "assignments": [ - 366 - ], - "declarations": [ - { - "constant": false, - "id": 366, - "mutability": "mutable", - "name": "result", - "nodeType": "VariableDeclaration", - "scope": 399, - "src": "3647:23:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 364, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3647:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 365, - "nodeType": "ArrayTypeName", - "src": "3647:9:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "visibility": "internal" - } - ], - "id": 373, - "initialValue": { - "arguments": [ - { - "expression": { - "id": 370, - "name": "ids", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 356, - "src": "3687:3:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - "id": 371, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "src": "3687:10:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 369, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "NewExpression", - "src": "3673:13:1", - "typeDescriptions": { - "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$", - "typeString": "function (uint256) pure returns (uint256[] memory)" - }, - "typeName": { - "baseType": { - "id": 367, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3677:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 368, - "nodeType": "ArrayTypeName", - "src": "3677:9:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - } - }, - "id": 372, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3673:25:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "3647:51:1" - }, - { - "body": { - "id": 395, - "nodeType": "Block", - "src": "3762:68:1", - "statements": [ - { - "expression": { - "id": 393, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "baseExpression": { - "id": 385, - "name": "result", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 366, - "src": "3776:6:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - "id": 387, - "indexExpression": { - "id": 386, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 375, - "src": "3783:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "3776:13:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "arguments": [ - { - "baseExpression": { - "id": 389, - "name": "ids", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 356, - "src": "3808:3:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - "id": 391, - "indexExpression": { - "id": 390, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 375, - "src": "3812:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3808:10:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 388, - "name": "getSingleStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 436, - "src": "3792:15:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view returns (uint256)" - } - }, - "id": 392, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3792:27:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3776:43:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 394, - "nodeType": "ExpressionStatement", - "src": "3776:43:1" - } - ] - }, - "condition": { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 381, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "id": 378, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 375, - "src": "3733:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "expression": { - "id": 379, - "name": "ids", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 356, - "src": "3741:3:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - "id": 380, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "src": "3741:10:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3733:18:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 396, - "initializationExpression": { - "assignments": [ - 375 - ], - "declarations": [ - { - "constant": false, - "id": 375, - "mutability": "mutable", - "name": "index", - "nodeType": "VariableDeclaration", - "scope": 396, - "src": "3714:13:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 374, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3714:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 377, - "initialValue": { - "hexValue": "30", - "id": 376, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3730:1:1", - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "3714:17:1" - }, - "loopExpression": { - "expression": { - "id": 383, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "3753:7:1", - "subExpression": { - "id": 382, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 375, - "src": "3753:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 384, - "nodeType": "ExpressionStatement", - "src": "3753:7:1" - }, - "nodeType": "ForStatement", - "src": "3709:121:1" - }, - { - "expression": { - "id": 397, - "name": "result", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 366, - "src": "3847:6:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - "functionReturnParameters": 361, - "id": 398, - "nodeType": "Return", - "src": "3840:13:1" - } - ] - }, - "functionSelector": "2f21a663", - "id": 400, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getStatus", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 357, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 356, - "mutability": "mutable", - "name": "ids", - "nodeType": "VariableDeclaration", - "scope": 400, - "src": "3576:20:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[]" - }, - "typeName": { - "baseType": { - "id": 354, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "3576:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 355, - "nodeType": "ArrayTypeName", - "src": "3576:9:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", - "typeString": "bytes32[]" - } - }, - "visibility": "internal" - } - ], - "src": "3575:22:1" - }, - "returnParameters": { - "id": 361, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 360, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "scope": 400, - "src": "3619:16:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 358, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3619:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 359, - "nodeType": "ArrayTypeName", - "src": "3619:9:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "visibility": "internal" - } - ], - "src": "3618:18:1" - }, - "scope": 462, - "src": "3557:303:1", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 435, - "nodeType": "Block", - "src": "3940:289:1", - "statements": [ - { - "assignments": [ - 408 - ], - "declarations": [ - { - "constant": false, - "id": 408, - "mutability": "mutable", - "name": "tempContract", - "nodeType": "VariableDeclaration", - "scope": 435, - "src": "3950:32:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$95_memory_ptr", - "typeString": "struct HashTimeLock.LockContract" - }, - "typeName": { - "id": 407, - "name": "LockContract", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 95, - "src": "3950:12:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$95_storage_ptr", - "typeString": "struct HashTimeLock.LockContract" - } - }, - "visibility": "internal" - } - ], - "id": 412, - "initialValue": { - "baseExpression": { - "id": 409, - "name": "contracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 61, - "src": "3985:9:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_LockContract_$95_storage_$", - "typeString": "mapping(bytes32 => struct HashTimeLock.LockContract storage ref)" - } - }, - "id": 411, - "indexExpression": { - "id": 410, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 402, - "src": "3995:2:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3985:13:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$95_storage", - "typeString": "struct HashTimeLock.LockContract storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "3950:48:1" - }, - { - "condition": { - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 422, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 416, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "expression": { - "id": 413, - "name": "tempContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 408, - "src": "4026:12:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$95_memory_ptr", - "typeString": "struct HashTimeLock.LockContract memory" - } - }, - "id": 414, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 84, - "src": "4026:19:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "id": 415, - "name": "ACTIVE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 67, - "src": "4049:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4026:29:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 421, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "expression": { - "id": 417, - "name": "tempContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 408, - "src": "4071:12:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$95_memory_ptr", - "typeString": "struct HashTimeLock.LockContract memory" - } - }, - "id": 418, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "expiration", - "nodeType": "MemberAccess", - "referencedDeclaration": 82, - "src": "4071:23:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "expression": { - "id": 419, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -4, - "src": "4097:5:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 420, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "src": "4097:15:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4071:41:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "4026:86:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 433, - "nodeType": "Block", - "src": "4170:53:1", - "statements": [ - { - "expression": { - "id": 431, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "id": 428, - "name": "result", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 405, - "src": "4184:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "expression": { - "id": 429, - "name": "tempContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 408, - "src": "4193:12:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$95_memory_ptr", - "typeString": "struct HashTimeLock.LockContract memory" - } - }, - "id": 430, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 84, - "src": "4193:19:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4184:28:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 432, - "nodeType": "ExpressionStatement", - "src": "4184:28:1" - } - ] - }, - "id": 434, - "nodeType": "IfStatement", - "src": "4009:214:1", - "trueBody": { - "id": 427, - "nodeType": "Block", - "src": "4123:41:1", - "statements": [ - { - "expression": { - "id": 425, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "id": 423, - "name": "result", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 405, - "src": "4137:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "id": 424, - "name": "EXPIRED", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 76, - "src": "4146:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4137:16:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 426, - "nodeType": "ExpressionStatement", - "src": "4137:16:1" - } - ] - } - } - ] - }, - "functionSelector": "fbdf3b43", - "id": 436, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getSingleStatus", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 403, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 402, - "mutability": "mutable", - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 436, - "src": "3891:10:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 401, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "3891:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "internal" - } - ], - "src": "3890:12:1" - }, - "returnParameters": { - "id": 406, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 405, - "mutability": "mutable", - "name": "result", - "nodeType": "VariableDeclaration", - "scope": 436, - "src": "3924:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 404, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3924:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "3923:16:1" - }, - "scope": 462, - "src": "3866:363:1", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 460, - "nodeType": "Block", - "src": "4305:190:1", - "statements": [ - { - "assignments": [ - 444 - ], - "declarations": [ - { - "constant": false, - "id": 444, - "mutability": "mutable", - "name": "tempContract", - "nodeType": "VariableDeclaration", - "scope": 460, - "src": "4315:32:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$95_memory_ptr", - "typeString": "struct HashTimeLock.LockContract" - }, - "typeName": { - "id": 443, - "name": "LockContract", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 95, - "src": "4315:12:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$95_storage_ptr", - "typeString": "struct HashTimeLock.LockContract" - } - }, - "visibility": "internal" - } - ], - "id": 448, - "initialValue": { - "baseExpression": { - "id": 445, - "name": "contracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 61, - "src": "4350:9:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_LockContract_$95_storage_$", - "typeString": "mapping(bytes32 => struct HashTimeLock.LockContract storage ref)" - } - }, - "id": 447, - "indexExpression": { - "id": 446, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 438, - "src": "4360:2:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4350:13:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$95_storage", - "typeString": "struct HashTimeLock.LockContract storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4315:48:1" - }, - { - "condition": { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 452, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "expression": { - "id": 449, - "name": "tempContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 444, - "src": "4378:12:1", + "constant": true, + "id": 21, + "mutability": "constant", + "name": "EXPIRED", + "nameLocation": "540:7:0", + "nodeType": "VariableDeclaration", + "scope": 414, + "src": "523:28:0", + "stateVariable": true, + "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$95_memory_ptr", - "typeString": "struct HashTimeLock.LockContract memory" - } - }, - "id": 450, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 84, - "src": "4378:19:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "id": 451, - "name": "INVALID", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 64, - "src": "4401:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4378:30:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 458, - "nodeType": "Block", - "src": "4453:36:1", - "statements": [ - { - "expression": { - "hexValue": "74727565", - "id": 456, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4474:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 442, - "id": 457, - "nodeType": "Return", - "src": "4467:11:1" - } - ] - }, - "id": 459, - "nodeType": "IfStatement", - "src": "4374:115:1", - "trueBody": { - "id": 455, - "nodeType": "Block", - "src": "4410:37:1", - "statements": [ - { - "expression": { - "hexValue": "66616c7365", - "id": 453, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4431:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "functionReturnParameters": 442, - "id": 454, - "nodeType": "Return", - "src": "4424:12:1" - } - ] - } - } - ] - }, - "functionSelector": "6c8244b8", - "id": 461, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "contractExists", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 439, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 438, - "mutability": "mutable", - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 461, - "src": "4259:10:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 437, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "4259:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "internal" - } - ], - "src": "4258:12:1" - }, - "returnParameters": { - "id": 442, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 441, - "mutability": "mutable", - "name": "result", - "nodeType": "VariableDeclaration", - "scope": 461, - "src": "4292:11:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 440, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "4292:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "src": "4291:13:1" - }, - "scope": 462, - "src": "4235:260:1", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - } - ], - "scope": 463, - "src": "59:4438:1" - } - ], - "src": "0:4498:1" - }, - "legacyAST": { - "attributes": { - "absolutePath": "/Users/jordigironamezcua/Workspace/src/github.com/fork/cactus/extensions/cactus-plugin-htlc-eth-besu/src/main/contracts/contracts/HashTimeLock.sol", - "exportedSymbols": { - "HashTimeLock": [ - 462 - ] - } - }, - "children": [ - { - "attributes": { - "literals": [ - "solidity", - "^", - "0.7", - ".3" - ] - }, - "id": 56, - "name": "PragmaDirective", - "src": "0:23:1" - }, - { - "attributes": { - "literals": [ - "experimental", - "ABIEncoderV2" - ] - }, - "id": 57, - "name": "PragmaDirective", - "src": "24:33:1" - }, - { - "attributes": { - "abstract": false, - "baseContracts": [ - null - ], - "contractDependencies": [ - null - ], - "contractKind": "contract", - "fullyImplemented": true, - "linearizedBaseContracts": [ - 462 - ], - "name": "HashTimeLock", - "scope": 463 - }, - "children": [ - { - "attributes": { - "constant": false, - "functionSelector": "ec56a373", - "mutability": "mutable", - "name": "contracts", - "scope": 462, - "stateVariable": true, - "storageLocation": "default", - "type": "mapping(bytes32 => struct HashTimeLock.LockContract)", - "visibility": "public" - }, - "children": [ - { - "attributes": { - "type": "mapping(bytes32 => struct HashTimeLock.LockContract)" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 58, - "name": "ElementaryTypeName", - "src": "96:7:1" - }, - { - "attributes": { - "name": "LockContract", - "referencedDeclaration": 95, - "type": "struct HashTimeLock.LockContract" - }, - "id": 59, - "name": "UserDefinedTypeName", - "src": "107:12:1" - } - ], - "id": 60, - "name": "Mapping", - "src": "88:32:1" - } - ], - "id": 61, - "name": "VariableDeclaration", - "src": "88:49:1" - }, - { - "attributes": { - "constant": true, - "functionSelector": "7fcce2a9", - "mutability": "constant", - "name": "INVALID", - "scope": 462, - "stateVariable": true, - "storageLocation": "default", - "type": "uint256", - "visibility": "public" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 62, - "name": "ElementaryTypeName", - "src": "258:7:1" - }, - { - "attributes": { - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "token": "number", - "type": "int_const 0", - "value": "0" - }, - "id": 63, - "name": "Literal", - "src": "292:1:1" - } - ], - "id": 64, - "name": "VariableDeclaration", - "src": "258:35:1" - }, - { - "attributes": { - "constant": true, - "functionSelector": "c90bd047", - "mutability": "constant", - "name": "ACTIVE", - "scope": 462, - "stateVariable": true, - "storageLocation": "default", - "type": "uint256", - "visibility": "public" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 65, - "name": "ElementaryTypeName", - "src": "342:7:1" - }, - { - "attributes": { - "hexvalue": "31", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "token": "number", - "type": "int_const 1", - "value": "1" - }, - "id": 66, - "name": "Literal", - "src": "375:1:1" - } - ], - "id": 67, - "name": "VariableDeclaration", - "src": "342:34:1" - }, - { - "attributes": { - "constant": true, - "functionSelector": "94e15c8f", - "mutability": "constant", - "name": "REFUNDED", - "scope": 462, - "stateVariable": true, - "storageLocation": "default", - "type": "uint256", - "visibility": "public" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 68, - "name": "ElementaryTypeName", - "src": "431:7:1" - }, - { - "attributes": { - "hexvalue": "32", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "token": "number", - "type": "int_const 2", - "value": "2" - }, - "id": 69, - "name": "Literal", - "src": "466:1:1" - } - ], - "id": 70, - "name": "VariableDeclaration", - "src": "431:36:1" - }, - { - "attributes": { - "constant": true, - "functionSelector": "af78feef", - "mutability": "constant", - "name": "WITHDRAWN", - "scope": 462, - "stateVariable": true, - "storageLocation": "default", - "type": "uint256", - "visibility": "public" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 71, - "name": "ElementaryTypeName", - "src": "509:7:1" - }, - { - "attributes": { - "hexvalue": "33", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "token": "number", - "type": "int_const 3", - "value": "3" - }, - "id": 72, - "name": "Literal", - "src": "545:1:1" - } - ], - "id": 73, - "name": "VariableDeclaration", - "src": "509:37:1" - }, - { - "attributes": { - "constant": true, - "functionSelector": "414ac85b", - "mutability": "constant", - "name": "EXPIRED", - "scope": 462, - "stateVariable": true, - "storageLocation": "default", - "type": "uint256", - "visibility": "public" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 74, - "name": "ElementaryTypeName", - "src": "589:7:1" - }, - { - "attributes": { - "hexvalue": "34", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "token": "number", - "type": "int_const 4", - "value": "4" - }, - "id": 75, - "name": "Literal", - "src": "623:1:1" - } - ], - "id": 76, - "name": "VariableDeclaration", - "src": "589:35:1" - }, - { - "attributes": { - "canonicalName": "HashTimeLock.LockContract", - "name": "LockContract", - "scope": 462, - "visibility": "public" - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "inputAmount", - "scope": 95, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 77, - "name": "ElementaryTypeName", - "src": "702:7:1" - } - ], - "id": 78, - "name": "VariableDeclaration", - "src": "702:19:1" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "outputAmount", - "scope": 95, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 79, - "name": "ElementaryTypeName", - "src": "731:7:1" - } - ], - "id": 80, - "name": "VariableDeclaration", - "src": "731:20:1" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "expiration", - "scope": 95, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 81, - "name": "ElementaryTypeName", - "src": "761:7:1" - } - ], - "id": 82, - "name": "VariableDeclaration", - "src": "761:18:1" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "status", - "scope": 95, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 83, - "name": "ElementaryTypeName", - "src": "789:7:1" - } - ], - "id": 84, - "name": "VariableDeclaration", - "src": "789:14:1" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "hashLock", - "scope": 95, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 85, - "name": "ElementaryTypeName", - "src": "813:7:1" - } - ], - "id": 86, - "name": "VariableDeclaration", - "src": "813:16:1" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "sender", - "scope": 95, - "stateVariable": false, - "storageLocation": "default", - "type": "address payable", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "payable", - "type": "address payable" - }, - "id": 87, - "name": "ElementaryTypeName", - "src": "839:15:1" - } - ], - "id": 88, - "name": "VariableDeclaration", - "src": "839:22:1" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "receiver", - "scope": 95, - "stateVariable": false, - "storageLocation": "default", - "type": "address payable", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "payable", - "type": "address payable" - }, - "id": 89, - "name": "ElementaryTypeName", - "src": "871:15:1" - } - ], - "id": 90, - "name": "VariableDeclaration", - "src": "871:24:1" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "outputNetwork", - "scope": 95, - "stateVariable": false, - "storageLocation": "default", - "type": "string", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "string", - "type": "string" - }, - "id": 91, - "name": "ElementaryTypeName", - "src": "905:6:1" - } - ], - "id": 92, - "name": "VariableDeclaration", - "src": "905:20:1" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "outputAddress", - "scope": 95, - "stateVariable": false, - "storageLocation": "default", - "type": "string", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "string", - "type": "string" - }, - "id": 93, - "name": "ElementaryTypeName", - "src": "935:6:1" - } - ], - "id": 94, - "name": "VariableDeclaration", - "src": "935:20:1" - } - ], - "id": 95, - "name": "StructDefinition", - "src": "672:290:1" - }, - { - "attributes": { - "anonymous": false, - "name": "Withdraw" - }, - "children": [ - { - "children": [ - { - "attributes": { - "constant": false, - "indexed": true, - "mutability": "mutable", - "name": "id", - "scope": 107, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 96, - "name": "ElementaryTypeName", - "src": "992:7:1" - } - ], - "id": 97, - "name": "VariableDeclaration", - "src": "992:18:1" - }, - { - "attributes": { - "constant": false, - "indexed": false, - "mutability": "mutable", - "name": "secret", - "scope": 107, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 98, - "name": "ElementaryTypeName", - "src": "1020:7:1" - } - ], - "id": 99, - "name": "VariableDeclaration", - "src": "1020:14:1" - }, - { - "attributes": { - "constant": false, - "indexed": false, - "mutability": "mutable", - "name": "hashLock", - "scope": 107, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 100, - "name": "ElementaryTypeName", - "src": "1044:7:1" - } - ], - "id": 101, - "name": "VariableDeclaration", - "src": "1044:16:1" - }, - { - "attributes": { - "constant": false, - "indexed": true, - "mutability": "mutable", - "name": "sender", - "scope": 107, - "stateVariable": false, - "storageLocation": "default", - "type": "address", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 102, - "name": "ElementaryTypeName", - "src": "1070:7:1" - } - ], - "id": 103, - "name": "VariableDeclaration", - "src": "1070:22:1" - }, - { - "attributes": { - "constant": false, - "indexed": true, - "mutability": "mutable", - "name": "receiver", - "scope": 107, - "stateVariable": false, - "storageLocation": "default", - "type": "address", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 104, - "name": "ElementaryTypeName", - "src": "1102:7:1" - } - ], - "id": 105, - "name": "VariableDeclaration", - "src": "1102:24:1" - } - ], - "id": 106, - "name": "ParameterList", - "src": "982:150:1" - } - ], - "id": 107, - "name": "EventDefinition", - "src": "968:165:1" - }, - { - "attributes": { - "anonymous": false, - "name": "Refund" - }, - "children": [ - { - "children": [ - { - "attributes": { - "constant": false, - "indexed": true, - "mutability": "mutable", - "name": "id", - "scope": 117, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 108, - "name": "ElementaryTypeName", - "src": "1161:7:1" - } - ], - "id": 109, - "name": "VariableDeclaration", - "src": "1161:18:1" - }, - { - "attributes": { - "constant": false, - "indexed": false, - "mutability": "mutable", - "name": "hashLock", - "scope": 117, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 110, - "name": "ElementaryTypeName", - "src": "1189:7:1" - } - ], - "id": 111, - "name": "VariableDeclaration", - "src": "1189:16:1" - }, - { - "attributes": { - "constant": false, - "indexed": true, - "mutability": "mutable", - "name": "sender", - "scope": 117, - "stateVariable": false, - "storageLocation": "default", - "type": "address", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 112, - "name": "ElementaryTypeName", - "src": "1215:7:1" - } - ], - "id": 113, - "name": "VariableDeclaration", - "src": "1215:22:1" - }, - { - "attributes": { - "constant": false, - "indexed": true, - "mutability": "mutable", - "name": "receiver", - "scope": 117, - "stateVariable": false, - "storageLocation": "default", - "type": "address", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 114, - "name": "ElementaryTypeName", - "src": "1247:7:1" - } - ], - "id": 115, - "name": "VariableDeclaration", - "src": "1247:24:1" - } - ], - "id": 116, - "name": "ParameterList", - "src": "1151:126:1" - } - ], - "id": 117, - "name": "EventDefinition", - "src": "1139:139:1" - }, - { - "attributes": { - "anonymous": false, - "name": "NewContract" - }, - "children": [ - { - "children": [ - { - "attributes": { - "constant": false, - "indexed": false, - "mutability": "mutable", - "name": "inputAmount", - "scope": 137, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 118, - "name": "ElementaryTypeName", - "src": "1311:7:1" - } - ], - "id": 119, - "name": "VariableDeclaration", - "src": "1311:19:1" - }, - { - "attributes": { - "constant": false, - "indexed": false, - "mutability": "mutable", - "name": "outputAmount", - "scope": 137, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 120, - "name": "ElementaryTypeName", - "src": "1340:7:1" - } - ], - "id": 121, - "name": "VariableDeclaration", - "src": "1340:20:1" - }, - { - "attributes": { - "constant": false, - "indexed": false, - "mutability": "mutable", - "name": "expiration", - "scope": 137, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 122, - "name": "ElementaryTypeName", - "src": "1370:7:1" - } - ], - "id": 123, - "name": "VariableDeclaration", - "src": "1370:18:1" - }, - { - "attributes": { - "constant": false, - "indexed": true, - "mutability": "mutable", - "name": "id", - "scope": 137, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 124, - "name": "ElementaryTypeName", - "src": "1398:7:1" - } - ], - "id": 125, - "name": "VariableDeclaration", - "src": "1398:18:1" - }, - { - "attributes": { - "constant": false, - "indexed": false, - "mutability": "mutable", - "name": "hashLock", - "scope": 137, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 126, - "name": "ElementaryTypeName", - "src": "1426:7:1" - } - ], - "id": 127, - "name": "VariableDeclaration", - "src": "1426:16:1" - }, - { - "attributes": { - "constant": false, - "indexed": true, - "mutability": "mutable", - "name": "sender", - "scope": 137, - "stateVariable": false, - "storageLocation": "default", - "type": "address", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 128, - "name": "ElementaryTypeName", - "src": "1452:7:1" - } - ], - "id": 129, - "name": "VariableDeclaration", - "src": "1452:22:1" - }, - { - "attributes": { - "constant": false, - "indexed": true, - "mutability": "mutable", - "name": "receiver", - "scope": 137, - "stateVariable": false, - "storageLocation": "default", - "type": "address", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 130, - "name": "ElementaryTypeName", - "src": "1484:7:1" - } - ], - "id": 131, - "name": "VariableDeclaration", - "src": "1484:24:1" - }, - { - "attributes": { - "constant": false, - "indexed": false, - "mutability": "mutable", - "name": "outputNetwork", - "scope": 137, - "stateVariable": false, - "storageLocation": "default", - "type": "string", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "string", - "type": "string" - }, - "id": 132, - "name": "ElementaryTypeName", - "src": "1518:6:1" - } - ], - "id": 133, - "name": "VariableDeclaration", - "src": "1518:20:1" - }, - { - "attributes": { - "constant": false, - "indexed": false, - "mutability": "mutable", - "name": "outputAddress", - "scope": 137, - "stateVariable": false, - "storageLocation": "default", - "type": "string", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "string", - "type": "string" - }, - "id": 134, - "name": "ElementaryTypeName", - "src": "1548:6:1" - } - ], - "id": 135, - "name": "VariableDeclaration", - "src": "1548:20:1" - } - ], - "id": 136, - "name": "ParameterList", - "src": "1301:273:1" - } - ], - "id": 137, - "name": "EventDefinition", - "src": "1284:291:1" - }, - { - "attributes": { - "functionSelector": "d3632095", - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [ - null - ], - "name": "newContract", - "scope": 462, - "stateMutability": "payable", - "virtual": false, - "visibility": "external" - }, - "children": [ - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "outputAmount", - "scope": 229, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 138, - "name": "ElementaryTypeName", - "src": "1611:7:1" - } - ], - "id": 139, - "name": "VariableDeclaration", - "src": "1611:20:1" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "expiration", - "scope": 229, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 140, - "name": "ElementaryTypeName", - "src": "1641:7:1" - } - ], - "id": 141, - "name": "VariableDeclaration", - "src": "1641:18:1" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "hashLock", - "scope": 229, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 142, - "name": "ElementaryTypeName", - "src": "1669:7:1" - } - ], - "id": 143, - "name": "VariableDeclaration", - "src": "1669:16:1" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "receiver", - "scope": 229, - "stateVariable": false, - "storageLocation": "default", - "type": "address payable", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "payable", - "type": "address payable" - }, - "id": 144, - "name": "ElementaryTypeName", - "src": "1695:15:1" - } - ], - "id": 145, - "name": "VariableDeclaration", - "src": "1695:24:1" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "outputNetwork", - "scope": 229, - "stateVariable": false, - "storageLocation": "calldata", - "type": "string", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "string", - "type": "string" - }, - "id": 146, - "name": "ElementaryTypeName", - "src": "1729:6:1" - } - ], - "id": 147, - "name": "VariableDeclaration", - "src": "1729:29:1" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "outputAddress", - "scope": 229, - "stateVariable": false, - "storageLocation": "calldata", - "type": "string", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "string", - "type": "string" + "typeIdentifier": "t_uint256", + "typeString": "uint256" }, - "id": 148, - "name": "ElementaryTypeName", - "src": "1768:6:1" - } - ], - "id": 149, - "name": "VariableDeclaration", - "src": "1768:29:1" - } - ], - "id": 150, - "name": "ParameterList", - "src": "1601:202:1" - }, - { - "attributes": { - "parameters": [ - null - ] - }, - "children": [], - "id": 151, - "name": "ParameterList", - "src": "1821:0:1" - }, - { - "children": [ - { - "attributes": { - "assignments": [ - 153 - ] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "sender", - "scope": 228, - "stateVariable": false, - "storageLocation": "default", - "type": "address payable", - "visibility": "internal" + "typeName": { + "id": 19, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "523:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "payable", - "type": "address payable" + "value": { + "hexValue": "34", + "id": 20, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "550:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_4_by_1", + "typeString": "int_const 4" }, - "id": 152, - "name": "ElementaryTypeName", - "src": "1831:15:1" - } - ], - "id": 153, - "name": "VariableDeclaration", - "src": "1831:22:1" - }, - { - "attributes": { - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "sender", - "type": "address payable" + "value": "4" }, - "children": [ - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": -15, - "type": "msg", - "value": "msg" - }, - "id": 154, - "name": "Identifier", - "src": "1856:3:1" - } - ], - "id": 155, - "name": "MemberAccess", - "src": "1856:10:1" - } - ], - "id": 156, - "name": "VariableDeclarationStatement", - "src": "1831:35:1" - }, - { - "attributes": { - "assignments": [ - 158 - ] + "visibility": "internal" }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "inputAmount", - "scope": 228, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" + { + "canonicalName": "HashTimeLock.LockContract", + "id": 40, + "members": [ + { + "constant": false, + "id": 23, + "mutability": "mutable", + "name": "inputAmount", + "nameLocation": "637:11:0", + "nodeType": "VariableDeclaration", + "scope": 40, + "src": "629:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "629:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" }, - "id": 157, - "name": "ElementaryTypeName", - "src": "1876:7:1" - } - ], - "id": 158, - "name": "VariableDeclaration", - "src": "1876:19:1" - }, - { - "attributes": { - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "value", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": -15, - "type": "msg", - "value": "msg" + { + "constant": false, + "id": 25, + "mutability": "mutable", + "name": "outputAmount", + "nameLocation": "666:12:0", + "nodeType": "VariableDeclaration", + "scope": 40, + "src": "658:20:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 24, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "658:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" }, - "id": 159, - "name": "Identifier", - "src": "1898:3:1" - } - ], - "id": 160, - "name": "MemberAccess", - "src": "1898:9:1" - } - ], - "id": 161, - "name": "VariableDeclarationStatement", - "src": "1876:31:1" - }, - { - "children": [ - { - "attributes": { - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" + { + "constant": false, + "id": 27, + "mutability": "mutable", + "name": "expiration", + "nameLocation": "696:10:0", + "nodeType": "VariableDeclaration", + "scope": 40, + "src": "688:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" }, - { - "typeIdentifier": "t_stringliteral_b98f3e47db5919a8c78ec10ff6bf7d1326066d3facdc164cf7441d38cae771df", - "typeString": "literal_string \"INVALID_TIME\"" - } - ], - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" + "typeName": { + "id": 26, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "688:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" }, - "id": 162, - "name": "Identifier", - "src": "1918:7:1" - }, - { - "attributes": { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": ">", - "type": "bool" + { + "constant": false, + "id": 29, + "mutability": "mutable", + "name": "status", + "nameLocation": "724:6:0", + "nodeType": "VariableDeclaration", + "scope": 40, + "src": "716:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 28, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "716:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" }, - "children": [ - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 141, - "type": "uint256", - "value": "expiration" + { + "constant": false, + "id": 31, + "mutability": "mutable", + "name": "hashLock", + "nameLocation": "748:8:0", + "nodeType": "VariableDeclaration", + "scope": 40, + "src": "740:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" }, - "id": 163, - "name": "Identifier", - "src": "1926:10:1" - }, - { - "attributes": { - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "timestamp", - "type": "uint256" + "typeName": { + "id": 30, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "740:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } }, - "children": [ - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": -4, - "type": "block", - "value": "block" - }, - "id": 164, - "name": "Identifier", - "src": "1939:5:1" - } - ], - "id": 165, - "name": "MemberAccess", - "src": "1939:15:1" - } - ], - "id": 166, - "name": "BinaryOperation", - "src": "1926:28:1" - }, - { - "attributes": { - "hexvalue": "494e56414c49445f54494d45", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "token": "string", - "type": "literal_string \"INVALID_TIME\"", - "value": "INVALID_TIME" + "visibility": "internal" }, - "id": 167, - "name": "Literal", - "src": "1956:14:1" - } - ], - "id": 168, - "name": "FunctionCall", - "src": "1918:53:1" - } - ], - "id": 169, - "name": "ExpressionStatement", - "src": "1918:53:1" - }, - { - "children": [ - { - "attributes": { - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" + { + "constant": false, + "id": 33, + "mutability": "mutable", + "name": "sender", + "nameLocation": "782:6:0", + "nodeType": "VariableDeclaration", + "scope": 40, + "src": "766:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" }, - { - "typeIdentifier": "t_stringliteral_eb6dbbf3194e9f4dd39c8dabe51ddb59ca6ad00c50b1bc74675ce4b263687722", - "typeString": "literal_string \"INVALID_AMOUNT\"" - } - ], - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" + "typeName": { + "id": 32, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "766:15:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "visibility": "internal" }, - "id": 170, - "name": "Identifier", - "src": "1982:7:1" - }, - { - "attributes": { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": ">", - "type": "bool" + { + "constant": false, + "id": 35, + "mutability": "mutable", + "name": "receiver", + "nameLocation": "814:8:0", + "nodeType": "VariableDeclaration", + "scope": 40, + "src": "798:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 34, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "798:15:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "visibility": "internal" }, - "children": [ - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 158, - "type": "uint256", - "value": "inputAmount" + { + "constant": false, + "id": 37, + "mutability": "mutable", + "name": "outputNetwork", + "nameLocation": "839:13:0", + "nodeType": "VariableDeclaration", + "scope": 40, + "src": "832:20:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" }, - "id": 171, - "name": "Identifier", - "src": "1990:11:1" - }, - { - "attributes": { - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "token": "number", - "type": "int_const 0", - "value": "0" + "typeName": { + "id": 36, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "832:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } }, - "id": 172, - "name": "Literal", - "src": "2004:1:1" - } - ], - "id": 173, - "name": "BinaryOperation", - "src": "1990:15:1" - }, - { - "attributes": { - "hexvalue": "494e56414c49445f414d4f554e54", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "token": "string", - "type": "literal_string \"INVALID_AMOUNT\"", - "value": "INVALID_AMOUNT" + "visibility": "internal" }, - "id": 174, - "name": "Literal", - "src": "2007:16:1" - } + { + "constant": false, + "id": 39, + "mutability": "mutable", + "name": "outputAddress", + "nameLocation": "869:13:0", + "nodeType": "VariableDeclaration", + "scope": 40, + "src": "862:20:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + }, + "typeName": { + "id": 38, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "862:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } ], - "id": 175, - "name": "FunctionCall", - "src": "1982:42:1" - } - ], - "id": 176, - "name": "ExpressionStatement", - "src": "1982:42:1" - }, - { - "attributes": { - "assignments": [ - 178 - ] + "name": "LockContract", + "nameLocation": "606:12:0", + "nodeType": "StructDefinition", + "scope": 414, + "src": "599:290:0", + "visibility": "public" }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "id", - "scope": 228, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 177, - "name": "ElementaryTypeName", - "src": "2035:7:1" - } - ], - "id": 178, - "name": "VariableDeclaration", - "src": "2035:10:1" - }, - { - "attributes": { - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "bytes32", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ + { + "anonymous": false, + "eventSelector": "2d3a5ed13d0553389b4078e01264416362e34d23520fda797fbc17f3905ed131", + "id": 52, + "name": "Withdraw", + "nameLocation": "901:8:0", + "nodeType": "EventDefinition", + "parameters": { + "id": 51, + "nodeType": "ParameterList", + "parameters": [ { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": -22, - "type": "function (bytes memory) pure returns (bytes32)", - "value": "sha256" - }, - "id": 179, - "name": "Identifier", - "src": "2048:6:1" - }, - { - "attributes": { - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "bytes memory", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" + "constant": false, + "id": 42, + "indexed": true, + "mutability": "mutable", + "name": "id", + "nameLocation": "935:2:0", + "nodeType": "VariableDeclaration", + "scope": 52, + "src": "919:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 41, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "919:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 44, + "indexed": false, + "mutability": "mutable", + "name": "secret", + "nameLocation": "947:6:0", + "nodeType": "VariableDeclaration", + "scope": 52, + "src": "939:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" + "typeName": { + "id": 43, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "939:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 46, + "indexed": false, + "mutability": "mutable", + "name": "hashLock", + "nameLocation": "963:8:0", + "nodeType": "VariableDeclaration", + "scope": 52, + "src": "955:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeName": { + "id": 45, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "955:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 48, + "indexed": true, + "mutability": "mutable", + "name": "sender", + "nameLocation": "989:6:0", + "nodeType": "VariableDeclaration", + "scope": 52, + "src": "973:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" + "typeName": { + "id": 47, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "973:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "member_name": "encodePacked", - "type": "function () pure returns (bytes memory)" + "visibility": "internal" }, - "children": [ - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": -1, - "type": "abi", - "value": "abi" + { + "constant": false, + "id": 50, + "indexed": true, + "mutability": "mutable", + "name": "receiver", + "nameLocation": "1013:8:0", + "nodeType": "VariableDeclaration", + "scope": 52, + "src": "997:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" }, - "id": 180, - "name": "Identifier", - "src": "2068:3:1" - } - ], - "id": 181, - "name": "MemberAccess", - "src": "2068:16:1" - }, - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 153, - "type": "address payable", - "value": "sender" - }, - "id": 182, - "name": "Identifier", - "src": "2085:6:1" - }, - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 145, - "type": "address payable", - "value": "receiver" - }, - "id": 183, - "name": "Identifier", - "src": "2093:8:1" - }, - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 158, - "type": "uint256", - "value": "inputAmount" - }, - "id": 184, - "name": "Identifier", - "src": "2103:11:1" - }, - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 143, - "type": "bytes32", - "value": "hashLock" - }, - "id": 185, - "name": "Identifier", - "src": "2116:8:1" - }, - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 141, - "type": "uint256", - "value": "expiration" - }, - "id": 186, - "name": "Identifier", - "src": "2126:10:1" - } + "typeName": { + "id": 49, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "997:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } ], - "id": 187, - "name": "FunctionCall", - "src": "2068:69:1" - } - ], - "id": 188, - "name": "FunctionCall", - "src": "2048:99:1" - } - ], - "id": 189, - "name": "VariableDeclarationStatement", - "src": "2035:112:1" - }, - { - "children": [ - { - "attributes": { - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "tuple()", - "type_conversion": false + "src": "909:118:0" }, - "children": [ - { - "attributes": { - "argumentTypes": [ + "src": "895:133:0" + }, + { + "anonymous": false, + "eventSelector": "6fa50d56c31f3efe0cb6ff06232bffce8fe8c4155e3cbb6f2d79dd12631c2522", + "id": 62, + "name": "Refund", + "nameLocation": "1040:6:0", + "nodeType": "EventDefinition", + "parameters": { + "id": 61, + "nodeType": "ParameterList", + "parameters": [ { - "typeIdentifier": "t_bool", - "typeString": "bool" + "constant": false, + "id": 54, + "indexed": true, + "mutability": "mutable", + "name": "id", + "nameLocation": "1063:2:0", + "nodeType": "VariableDeclaration", + "scope": 62, + "src": "1047:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 53, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1047:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" }, { - "typeIdentifier": "t_stringliteral_10858945dd31484ce6a77564821a1a6ff0e82939d9bea2b8e6caae50c7fc3750", - "typeString": "literal_string \"SWAP_EXISTS\"" - } - ], - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 190, - "name": "Identifier", - "src": "2158:7:1" - }, - { - "attributes": { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "==", - "type": "bool" - }, - "children": [ - { - "attributes": { - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "member_name": "status", - "referencedDeclaration": 84, - "type": "uint256" + "constant": false, + "id": 56, + "indexed": false, + "mutability": "mutable", + "name": "hashLock", + "nameLocation": "1075:8:0", + "nodeType": "VariableDeclaration", + "scope": 62, + "src": "1067:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 55, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1067:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" }, - "children": [ - { - "attributes": { - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "struct HashTimeLock.LockContract storage ref" + { + "constant": false, + "id": 58, + "indexed": true, + "mutability": "mutable", + "name": "sender", + "nameLocation": "1101:6:0", + "nodeType": "VariableDeclaration", + "scope": 62, + "src": "1085:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" }, - "children": [ - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 61, - "type": "mapping(bytes32 => struct HashTimeLock.LockContract storage ref)", - "value": "contracts" - }, - "id": 191, - "name": "Identifier", - "src": "2166:9:1" - }, - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 178, - "type": "bytes32", - "value": "id" - }, - "id": 192, - "name": "Identifier", - "src": "2176:2:1" - } - ], - "id": 193, - "name": "IndexAccess", - "src": "2166:13:1" - } - ], - "id": 194, - "name": "MemberAccess", - "src": "2166:20:1" - }, - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 64, - "type": "uint256", - "value": "INVALID" + "typeName": { + "id": 57, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1085:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" }, - "id": 195, - "name": "Identifier", - "src": "2190:7:1" - } + { + "constant": false, + "id": 60, + "indexed": true, + "mutability": "mutable", + "name": "receiver", + "nameLocation": "1125:8:0", + "nodeType": "VariableDeclaration", + "scope": 62, + "src": "1109:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 59, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1109:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } ], - "id": 196, - "name": "BinaryOperation", - "src": "2166:31:1" - }, - { - "attributes": { - "hexvalue": "535741505f455849535453", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "token": "string", - "type": "literal_string \"SWAP_EXISTS\"", - "value": "SWAP_EXISTS" - }, - "id": 197, - "name": "Literal", - "src": "2199:13:1" - } - ], - "id": 198, - "name": "FunctionCall", - "src": "2158:55:1" - } - ], - "id": 199, - "name": "ExpressionStatement", - "src": "2158:55:1" - }, - { - "children": [ - { - "attributes": { - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "struct HashTimeLock.LockContract storage ref" + "src": "1046:88:0" }, - "children": [ - { - "attributes": { - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "type": "struct HashTimeLock.LockContract storage ref" - }, - "children": [ - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 61, - "type": "mapping(bytes32 => struct HashTimeLock.LockContract storage ref)", - "value": "contracts" - }, - "id": 200, - "name": "Identifier", - "src": "2224:9:1" - }, - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 178, - "type": "bytes32", - "value": "id" - }, - "id": 201, - "name": "Identifier", - "src": "2234:2:1" - } - ], - "id": 202, - "name": "IndexAccess", - "src": "2224:13:1" - }, - { - "attributes": { - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": true, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "struct HashTimeLock.LockContract memory", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "src": "1034:101:0" + }, + { + "anonymous": false, + "eventSelector": "767d0ffbc3d16cc51fc05770a22976e4b0fda9198e37878b76979429b2d5d88c", + "id": 82, + "name": "NewContract", + "nameLocation": "1147:11:0", + "nodeType": "EventDefinition", + "parameters": { + "id": 81, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 64, + "indexed": false, + "mutability": "mutable", + "name": "inputAmount", + "nameLocation": "1176:11:0", + "nodeType": "VariableDeclaration", + "scope": 82, + "src": "1168:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeName": { + "id": 63, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1168:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "visibility": "internal" + }, + { + "constant": false, + "id": 66, + "indexed": false, + "mutability": "mutable", + "name": "outputAmount", + "nameLocation": "1205:12:0", + "nodeType": "VariableDeclaration", + "scope": 82, + "src": "1197:20:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeName": { + "id": 65, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1197:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" + "visibility": "internal" + }, + { + "constant": false, + "id": 68, + "indexed": false, + "mutability": "mutable", + "name": "expiration", + "nameLocation": "1235:10:0", + "nodeType": "VariableDeclaration", + "scope": 82, + "src": "1227:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" + "typeName": { + "id": 67, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1227:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" + "visibility": "internal" + }, + { + "constant": false, + "id": 70, + "indexed": true, + "mutability": "mutable", + "name": "id", + "nameLocation": "1271:2:0", + "nodeType": "VariableDeclaration", + "scope": 82, + "src": "1255:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" }, - { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" + "typeName": { + "id": 69, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1255:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } }, - { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - ], - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 95, - "type": "type(struct HashTimeLock.LockContract storage pointer)", - "value": "LockContract" - }, - "id": 203, - "name": "Identifier", - "src": "2240:12:1" - }, - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 158, - "type": "uint256", - "value": "inputAmount" - }, - "id": 204, - "name": "Identifier", - "src": "2266:11:1" - }, - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 139, - "type": "uint256", - "value": "outputAmount" - }, - "id": 205, - "name": "Identifier", - "src": "2291:12:1" - }, - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 141, - "type": "uint256", - "value": "expiration" + "visibility": "internal" }, - "id": 206, - "name": "Identifier", - "src": "2317:10:1" - }, - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 67, - "type": "uint256", - "value": "ACTIVE" - }, - "id": 207, - "name": "Identifier", - "src": "2341:6:1" - }, - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 143, - "type": "bytes32", - "value": "hashLock" - }, - "id": 208, - "name": "Identifier", - "src": "2361:8:1" - }, - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 153, - "type": "address payable", - "value": "sender" + { + "constant": false, + "id": 72, + "indexed": false, + "mutability": "mutable", + "name": "hashLock", + "nameLocation": "1291:8:0", + "nodeType": "VariableDeclaration", + "scope": 82, + "src": "1283:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 71, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1283:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" }, - "id": 209, - "name": "Identifier", - "src": "2383:6:1" - }, - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 145, - "type": "address payable", - "value": "receiver" + { + "constant": false, + "id": 74, + "indexed": true, + "mutability": "mutable", + "name": "sender", + "nameLocation": "1325:6:0", + "nodeType": "VariableDeclaration", + "scope": 82, + "src": "1309:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 73, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1309:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" }, - "id": 210, - "name": "Identifier", - "src": "2403:8:1" - }, - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 147, - "type": "string calldata", - "value": "outputNetwork" + { + "constant": false, + "id": 76, + "indexed": true, + "mutability": "mutable", + "name": "receiver", + "nameLocation": "1357:8:0", + "nodeType": "VariableDeclaration", + "scope": 82, + "src": "1341:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 75, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1341:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" }, - "id": 211, - "name": "Identifier", - "src": "2425:13:1" - }, - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 149, - "type": "string calldata", - "value": "outputAddress" + { + "constant": false, + "id": 78, + "indexed": false, + "mutability": "mutable", + "name": "outputNetwork", + "nameLocation": "1382:13:0", + "nodeType": "VariableDeclaration", + "scope": 82, + "src": "1375:20:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 77, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1375:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" }, - "id": 212, - "name": "Identifier", - "src": "2452:13:1" - } + { + "constant": false, + "id": 80, + "indexed": false, + "mutability": "mutable", + "name": "outputAddress", + "nameLocation": "1412:13:0", + "nodeType": "VariableDeclaration", + "scope": 82, + "src": "1405:20:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 79, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1405:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } ], - "id": 213, - "name": "FunctionCall", - "src": "2240:235:1" - } - ], - "id": 214, - "name": "Assignment", - "src": "2224:251:1" - } - ], - "id": 215, - "name": "ExpressionStatement", - "src": "2224:251:1" - }, - { - "children": [ - { - "attributes": { - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "tuple()", - "type_conversion": false + "src": "1158:273:0" }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, + "src": "1141:291:0" + }, + { + "body": { + "id": 176, + "nodeType": "Block", + "src": "1678:699:0", + "statements": [ { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "assignments": [ + 98 + ], + "declarations": [ + { + "constant": false, + "id": 98, + "mutability": "mutable", + "name": "sender", + "nameLocation": "1704:6:0", + "nodeType": "VariableDeclaration", + "scope": 176, + "src": "1688:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 97, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1688:15:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "visibility": "internal" + } + ], + "id": 104, + "initialValue": { + "arguments": [ + { + "expression": { + "id": 101, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967281, + "src": "1721:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 102, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "1725:6:0", + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "1721:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 100, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1713:8:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_payable_$", + "typeString": "type(address payable)" + }, + "typeName": { + "id": 99, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1713:8:0", + "stateMutability": "payable", + "typeDescriptions": {} + } + }, + "id": 103, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1713:19:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1688:44:0" }, { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "assignments": [ + 106 + ], + "declarations": [ + { + "constant": false, + "id": 106, + "mutability": "mutable", + "name": "inputAmount", + "nameLocation": "1750:11:0", + "nodeType": "VariableDeclaration", + "scope": 176, + "src": "1742:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 105, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1742:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 109, + "initialValue": { + "expression": { + "id": 107, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967281, + "src": "1764:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 108, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "1768:5:0", + "memberName": "value", + "nodeType": "MemberAccess", + "src": "1764:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1742:31:0" }, { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 114, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 111, + "name": "expiration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 86, + "src": "1792:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "expression": { + "id": 112, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967292, + "src": "1805:5:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 113, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "1811:9:0", + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "1805:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1792:28:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "494e56414c49445f54494d45", + "id": 115, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1822:14:0", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b98f3e47db5919a8c78ec10ff6bf7d1326066d3facdc164cf7441d38cae771df", + "typeString": "literal_string \"INVALID_TIME\"" + }, + "value": "INVALID_TIME" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b98f3e47db5919a8c78ec10ff6bf7d1326066d3facdc164cf7441d38cae771df", + "typeString": "literal_string \"INVALID_TIME\"" + } + ], + "id": 110, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "1784:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 116, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1784:53:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 117, + "nodeType": "ExpressionStatement", + "src": "1784:53:0" }, { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 121, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 119, + "name": "inputAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 106, + "src": "1856:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 120, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1870:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1856:15:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "494e56414c49445f414d4f554e54", + "id": 122, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1873:16:0", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_eb6dbbf3194e9f4dd39c8dabe51ddb59ca6ad00c50b1bc74675ce4b263687722", + "typeString": "literal_string \"INVALID_AMOUNT\"" + }, + "value": "INVALID_AMOUNT" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_eb6dbbf3194e9f4dd39c8dabe51ddb59ca6ad00c50b1bc74675ce4b263687722", + "typeString": "literal_string \"INVALID_AMOUNT\"" + } + ], + "id": 118, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "1848:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 123, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1848:42:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 124, + "nodeType": "ExpressionStatement", + "src": "1848:42:0" }, { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" + "assignments": [ + 126 + ], + "declarations": [ + { + "constant": false, + "id": 126, + "mutability": "mutable", + "name": "id", + "nameLocation": "1909:2:0", + "nodeType": "VariableDeclaration", + "scope": 176, + "src": "1901:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 125, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1901:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 137, + "initialValue": { + "arguments": [ + { + "arguments": [ + { + "id": 130, + "name": "sender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 98, + "src": "1938:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "id": 131, + "name": "receiver", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 90, + "src": "1946:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "id": 132, + "name": "inputAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 106, + "src": "1956:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 133, + "name": "hashLock", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 88, + "src": "1969:8:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 134, + "name": "expiration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 86, + "src": "1979:10:0", + "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" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 128, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967295, + "src": "1921:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 129, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "1925:12:0", + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "src": "1921:16:0", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 135, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1921:69:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 127, + "name": "sha256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967274, + "src": "1914:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_sha256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 136, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1914:77:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1901:90:0" }, { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 144, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "id": 139, + "name": "contracts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6, + "src": "2010:9:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_LockContract_$40_storage_$", + "typeString": "mapping(bytes32 => struct HashTimeLock.LockContract storage ref)" + } + }, + "id": 141, + "indexExpression": { + "id": 140, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 126, + "src": "2020:2:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2010:13:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_LockContract_$40_storage", + "typeString": "struct HashTimeLock.LockContract storage ref" + } + }, + "id": 142, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "2024:6:0", + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 29, + "src": "2010:20:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 143, + "name": "INIT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9, + "src": "2034:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2010:28:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "535741505f455849535453", + "id": 145, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2040:13:0", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_10858945dd31484ce6a77564821a1a6ff0e82939d9bea2b8e6caae50c7fc3750", + "typeString": "literal_string \"SWAP_EXISTS\"" + }, + "value": "SWAP_EXISTS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_10858945dd31484ce6a77564821a1a6ff0e82939d9bea2b8e6caae50c7fc3750", + "typeString": "literal_string \"SWAP_EXISTS\"" + } + ], + "id": 138, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "2002:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 146, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2002:52:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 147, + "nodeType": "ExpressionStatement", + "src": "2002:52:0" }, { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" + "expression": { + "id": 162, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 148, + "name": "contracts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6, + "src": "2065:9:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_LockContract_$40_storage_$", + "typeString": "mapping(bytes32 => struct HashTimeLock.LockContract storage ref)" + } + }, + "id": 150, + "indexExpression": { + "id": 149, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 126, + "src": "2075:2:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2065:13:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_LockContract_$40_storage", + "typeString": "struct HashTimeLock.LockContract storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 152, + "name": "inputAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 106, + "src": "2107:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 153, + "name": "outputAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 84, + "src": "2120:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 154, + "name": "expiration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 86, + "src": "2134:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 155, + "name": "ACTIVE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12, + "src": "2146:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 156, + "name": "hashLock", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 88, + "src": "2154:8:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 157, + "name": "sender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 98, + "src": "2164:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "id": 158, + "name": "receiver", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 90, + "src": "2172:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "id": 159, + "name": "outputNetwork", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 92, + "src": "2182:13:0", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string calldata" + } + }, + { + "id": 160, + "name": "outputAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 94, + "src": "2197:13:0", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string calldata" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string calldata" + }, + { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string calldata" + } + ], + "id": 151, + "name": "LockContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 40, + "src": "2081:12:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_struct$_LockContract_$40_storage_ptr_$", + "typeString": "type(struct HashTimeLock.LockContract storage pointer)" + } + }, + "id": 161, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "structConstructorCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2081:139:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_LockContract_$40_memory_ptr", + "typeString": "struct HashTimeLock.LockContract memory" + } + }, + "src": "2065:155:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_LockContract_$40_storage", + "typeString": "struct HashTimeLock.LockContract storage ref" + } + }, + "id": 163, + "nodeType": "ExpressionStatement", + "src": "2065:155:0" }, { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" + "eventCall": { + "arguments": [ + { + "id": 165, + "name": "inputAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 106, + "src": "2261:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 166, + "name": "outputAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 84, + "src": "2274:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 167, + "name": "expiration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 86, + "src": "2288:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 168, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 126, + "src": "2300:2:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 169, + "name": "hashLock", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 88, + "src": "2304:8:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 170, + "name": "sender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 98, + "src": "2314:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "id": 171, + "name": "receiver", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 90, + "src": "2322:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "id": 172, + "name": "outputNetwork", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 92, + "src": "2332:13:0", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string calldata" + } + }, + { + "id": 173, + "name": "outputAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 94, + "src": "2347:13:0", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string calldata" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string calldata" + }, + { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string calldata" + } + ], + "id": 164, + "name": "NewContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 82, + "src": "2236:11:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$_t_uint256_$_t_bytes32_$_t_bytes32_$_t_address_$_t_address_$_t_string_memory_ptr_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (uint256,uint256,uint256,bytes32,bytes32,address,address,string memory,string memory)" + } + }, + "id": 174, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2236:134:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 175, + "nodeType": "EmitStatement", + "src": "2231:139:0" } - ], - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 137, - "type": "function (uint256,uint256,uint256,bytes32,bytes32,address,address,string memory,string memory)", - "value": "NewContract" - }, - "id": 216, - "name": "Identifier", - "src": "2491:11:1" - }, - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 158, - "type": "uint256", - "value": "inputAmount" - }, - "id": 217, - "name": "Identifier", - "src": "2516:11:1" - }, - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 139, - "type": "uint256", - "value": "outputAmount" - }, - "id": 218, - "name": "Identifier", - "src": "2541:12:1" - }, - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 141, - "type": "uint256", - "value": "expiration" - }, - "id": 219, - "name": "Identifier", - "src": "2567:10:1" - }, - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 178, - "type": "bytes32", - "value": "id" - }, - "id": 220, - "name": "Identifier", - "src": "2591:2:1" - }, - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 143, - "type": "bytes32", - "value": "hashLock" - }, - "id": 221, - "name": "Identifier", - "src": "2607:8:1" - }, - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 153, - "type": "address payable", - "value": "sender" - }, - "id": 222, - "name": "Identifier", - "src": "2629:6:1" - }, - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 145, - "type": "address payable", - "value": "receiver" - }, - "id": 223, - "name": "Identifier", - "src": "2649:8:1" - }, - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 147, - "type": "string calldata", - "value": "outputNetwork" - }, - "id": 224, - "name": "Identifier", - "src": "2671:13:1" - }, - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 149, - "type": "string calldata", - "value": "outputAddress" - }, - "id": 225, - "name": "Identifier", - "src": "2698:13:1" - } - ], - "id": 226, - "name": "FunctionCall", - "src": "2491:230:1" - } - ], - "id": 227, - "name": "EmitStatement", - "src": "2486:235:1" - } - ], - "id": 228, - "name": "Block", - "src": "1821:907:1" - } - ], - "id": 229, - "name": "FunctionDefinition", - "src": "1581:1147:1" - }, - { - "attributes": { - "functionSelector": "63615149", - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [ - null - ], - "name": "withdraw", - "scope": 462, - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - "children": [ - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "id", - "scope": 299, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 230, - "name": "ElementaryTypeName", - "src": "2752:7:1" - } - ], - "id": 231, - "name": "VariableDeclaration", - "src": "2752:10:1" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "secret", - "scope": 299, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 232, - "name": "ElementaryTypeName", - "src": "2764:7:1" - } - ], - "id": 233, - "name": "VariableDeclaration", - "src": "2764:14:1" - } - ], - "id": 234, - "name": "ParameterList", - "src": "2751:28:1" - }, - { - "attributes": { - "parameters": [ - null - ] - }, - "children": [], - "id": 235, - "name": "ParameterList", - "src": "2789:0:1" - }, - { - "children": [ - { - "attributes": { - "assignments": [ - 237 - ] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "c", - "scope": 298, - "stateVariable": false, - "storageLocation": "storage", - "type": "struct HashTimeLock.LockContract", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "LockContract", - "referencedDeclaration": 95, - "type": "struct HashTimeLock.LockContract" - }, - "id": 236, - "name": "UserDefinedTypeName", - "src": "2799:12:1" - } - ], - "id": 237, - "name": "VariableDeclaration", - "src": "2799:22:1" - }, - { - "attributes": { - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "struct HashTimeLock.LockContract storage ref" + ] }, - "children": [ - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 61, - "type": "mapping(bytes32 => struct HashTimeLock.LockContract storage ref)", - "value": "contracts" - }, - "id": 238, - "name": "Identifier", - "src": "2824:9:1" - }, - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 231, - "type": "bytes32", - "value": "id" - }, - "id": 239, - "name": "Identifier", - "src": "2834:2:1" - } - ], - "id": 240, - "name": "IndexAccess", - "src": "2824:13:1" - } - ], - "id": 241, - "name": "VariableDeclarationStatement", - "src": "2799:38:1" - }, - { - "children": [ - { - "attributes": { - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ + "functionSelector": "d3632095", + "id": 177, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "newContract", + "nameLocation": "1447:11:0", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 95, + "nodeType": "ParameterList", + "parameters": [ { - "typeIdentifier": "t_bool", - "typeString": "bool" + "constant": false, + "id": 84, + "mutability": "mutable", + "name": "outputAmount", + "nameLocation": "1476:12:0", + "nodeType": "VariableDeclaration", + "scope": 177, + "src": "1468:20:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 83, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1468:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" }, { - "typeIdentifier": "t_stringliteral_afbfa7d3db262df0c92c413f0113503b1c1332dc5a4a874fcd8d6a6de57b74dd", - "typeString": "literal_string \"SWAP_NOT_ACTIVE\"" - } - ], - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 242, - "name": "Identifier", - "src": "2848:7:1" - }, - { - "attributes": { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "==", - "type": "bool" - }, - "children": [ - { - "attributes": { - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "member_name": "status", - "referencedDeclaration": 84, - "type": "uint256" + "constant": false, + "id": 86, + "mutability": "mutable", + "name": "expiration", + "nameLocation": "1506:10:0", + "nodeType": "VariableDeclaration", + "scope": 177, + "src": "1498:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 85, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1498:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" }, - "children": [ - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 237, - "type": "struct HashTimeLock.LockContract storage pointer", - "value": "c" + { + "constant": false, + "id": 88, + "mutability": "mutable", + "name": "hashLock", + "nameLocation": "1534:8:0", + "nodeType": "VariableDeclaration", + "scope": 177, + "src": "1526:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 87, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1526:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 90, + "mutability": "mutable", + "name": "receiver", + "nameLocation": "1568:8:0", + "nodeType": "VariableDeclaration", + "scope": 177, + "src": "1552:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 89, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1552:15:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } }, - "id": 243, - "name": "Identifier", - "src": "2856:1:1" - } - ], - "id": 244, - "name": "MemberAccess", - "src": "2856:8:1" - }, - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 67, - "type": "uint256", - "value": "ACTIVE" + "visibility": "internal" }, - "id": 245, - "name": "Identifier", - "src": "2868:6:1" - } + { + "constant": false, + "id": 92, + "mutability": "mutable", + "name": "outputNetwork", + "nameLocation": "1602:13:0", + "nodeType": "VariableDeclaration", + "scope": 177, + "src": "1586:29:0", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string" + }, + "typeName": { + "id": 91, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1586:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 94, + "mutability": "mutable", + "name": "outputAddress", + "nameLocation": "1641:13:0", + "nodeType": "VariableDeclaration", + "scope": 177, + "src": "1625:29:0", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string" + }, + "typeName": { + "id": 93, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1625:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } ], - "id": 246, - "name": "BinaryOperation", - "src": "2856:18:1" - }, - { - "attributes": { - "hexvalue": "535741505f4e4f545f414354495645", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "token": "string", - "type": "literal_string \"SWAP_NOT_ACTIVE\"", - "value": "SWAP_NOT_ACTIVE" - }, - "id": 247, - "name": "Literal", - "src": "2876:17:1" - } - ], - "id": 248, - "name": "FunctionCall", - "src": "2848:46:1" - } - ], - "id": 249, - "name": "ExpressionStatement", - "src": "2848:46:1" - }, - { - "children": [ - { - "attributes": { - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "tuple()", - "type_conversion": false + "src": "1458:202:0" }, - "children": [ - { - "attributes": { - "argumentTypes": [ + "returnParameters": { + "id": 96, + "nodeType": "ParameterList", + "parameters": [], + "src": "1678:0:0" + }, + "scope": 414, + "src": "1438:939:0", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 247, + "nodeType": "Block", + "src": "2438:411:0", + "statements": [ { - "typeIdentifier": "t_bool", - "typeString": "bool" + "assignments": [ + 186 + ], + "declarations": [ + { + "constant": false, + "id": 186, + "mutability": "mutable", + "name": "c", + "nameLocation": "2469:1:0", + "nodeType": "VariableDeclaration", + "scope": 247, + "src": "2448:22:0", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_LockContract_$40_storage_ptr", + "typeString": "struct HashTimeLock.LockContract" + }, + "typeName": { + "id": 185, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 184, + "name": "LockContract", + "nameLocations": [ + "2448:12:0" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 40, + "src": "2448:12:0" + }, + "referencedDeclaration": 40, + "src": "2448:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_LockContract_$40_storage_ptr", + "typeString": "struct HashTimeLock.LockContract" + } + }, + "visibility": "internal" + } + ], + "id": 190, + "initialValue": { + "baseExpression": { + "id": 187, + "name": "contracts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6, + "src": "2473:9:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_LockContract_$40_storage_$", + "typeString": "mapping(bytes32 => struct HashTimeLock.LockContract storage ref)" + } + }, + "id": 189, + "indexExpression": { + "id": 188, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 179, + "src": "2483:2:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2473:13:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_LockContract_$40_storage", + "typeString": "struct HashTimeLock.LockContract storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2448:38:0" }, { - "typeIdentifier": "t_stringliteral_b98f3e47db5919a8c78ec10ff6bf7d1326066d3facdc164cf7441d38cae771df", - "typeString": "literal_string \"INVALID_TIME\"" - } - ], - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 250, - "name": "Identifier", - "src": "2905:7:1" - }, - { - "attributes": { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": ">", - "type": "bool" - }, - "children": [ - { - "attributes": { - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "member_name": "expiration", - "referencedDeclaration": 82, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 237, - "type": "struct HashTimeLock.LockContract storage pointer", - "value": "c" + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 195, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 192, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 186, + "src": "2505:1:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_LockContract_$40_storage_ptr", + "typeString": "struct HashTimeLock.LockContract storage pointer" + } + }, + "id": 193, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "2507:6:0", + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 29, + "src": "2505:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 194, + "name": "ACTIVE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12, + "src": "2517:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2505:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "535741505f4e4f545f414354495645", + "id": 196, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2525:17:0", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_afbfa7d3db262df0c92c413f0113503b1c1332dc5a4a874fcd8d6a6de57b74dd", + "typeString": "literal_string \"SWAP_NOT_ACTIVE\"" + }, + "value": "SWAP_NOT_ACTIVE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_afbfa7d3db262df0c92c413f0113503b1c1332dc5a4a874fcd8d6a6de57b74dd", + "typeString": "literal_string \"SWAP_NOT_ACTIVE\"" + } + ], + "id": 191, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "2497:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 197, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2497:46:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } }, - "id": 251, - "name": "Identifier", - "src": "2913:1:1" - } - ], - "id": 252, - "name": "MemberAccess", - "src": "2913:12:1" - }, - { - "attributes": { - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "timestamp", - "type": "uint256" + "id": 198, + "nodeType": "ExpressionStatement", + "src": "2497:46:0" }, - "children": [ - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": -4, - "type": "block", - "value": "block" - }, - "id": 253, - "name": "Identifier", - "src": "2928:5:1" - } - ], - "id": 254, - "name": "MemberAccess", - "src": "2928:15:1" - } - ], - "id": 255, - "name": "BinaryOperation", - "src": "2913:30:1" - }, - { - "attributes": { - "hexvalue": "494e56414c49445f54494d45", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "token": "string", - "type": "literal_string \"INVALID_TIME\"", - "value": "INVALID_TIME" - }, - "id": 256, - "name": "Literal", - "src": "2945:14:1" - } - ], - "id": 257, - "name": "FunctionCall", - "src": "2905:55:1" - } - ], - "id": 258, - "name": "ExpressionStatement", - "src": "2905:55:1" - }, - { - "children": [ - { - "attributes": { - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ { - "typeIdentifier": "t_bool", - "typeString": "bool" + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 204, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 200, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 186, + "src": "2562:1:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_LockContract_$40_storage_ptr", + "typeString": "struct HashTimeLock.LockContract storage pointer" + } + }, + "id": 201, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "2564:10:0", + "memberName": "expiration", + "nodeType": "MemberAccess", + "referencedDeclaration": 27, + "src": "2562:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "expression": { + "id": 202, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967292, + "src": "2577:5:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 203, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "2583:9:0", + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "2577:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2562:30:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "494e56414c49445f54494d45", + "id": 205, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2594:14:0", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b98f3e47db5919a8c78ec10ff6bf7d1326066d3facdc164cf7441d38cae771df", + "typeString": "literal_string \"INVALID_TIME\"" + }, + "value": "INVALID_TIME" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b98f3e47db5919a8c78ec10ff6bf7d1326066d3facdc164cf7441d38cae771df", + "typeString": "literal_string \"INVALID_TIME\"" + } + ], + "id": 199, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "2554:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 206, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2554:55:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 207, + "nodeType": "ExpressionStatement", + "src": "2554:55:0" }, { - "typeIdentifier": "t_stringliteral_20442b474b3561be70a7e12c2acf875277f59e68e7748337cd68bf5c8ada064b", - "typeString": "literal_string \"INVALID_SECRET\"" - } - ], - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 259, - "name": "Identifier", - "src": "2971:7:1" - }, - { - "attributes": { - "commonType": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "==", - "type": "bool" - }, - "children": [ - { - "attributes": { - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "member_name": "hashLock", - "referencedDeclaration": 86, - "type": "bytes32" - }, - "children": [ - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 237, - "type": "struct HashTimeLock.LockContract storage pointer", - "value": "c" + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 217, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 209, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 186, + "src": "2628:1:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_LockContract_$40_storage_ptr", + "typeString": "struct HashTimeLock.LockContract storage pointer" + } + }, + "id": 210, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "2630:8:0", + "memberName": "hashLock", + "nodeType": "MemberAccess", + "referencedDeclaration": 31, + "src": "2628:10:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "arguments": [ + { + "arguments": [ + { + "id": 214, + "name": "secret", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 181, + "src": "2669:6:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "id": 212, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967295, + "src": "2652:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 213, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "2656:12:0", + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "src": "2652:16:0", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 215, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2652:24:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 211, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967288, + "src": "2642:9:0", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 216, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2642:35:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "2628:49:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "494e56414c49445f534543524554", + "id": 218, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2679:16:0", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_20442b474b3561be70a7e12c2acf875277f59e68e7748337cd68bf5c8ada064b", + "typeString": "literal_string \"INVALID_SECRET\"" + }, + "value": "INVALID_SECRET" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_20442b474b3561be70a7e12c2acf875277f59e68e7748337cd68bf5c8ada064b", + "typeString": "literal_string \"INVALID_SECRET\"" + } + ], + "id": 208, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "2620:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 219, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2620:76:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } }, - "id": 260, - "name": "Identifier", - "src": "2979:1:1" - } - ], - "id": 261, - "name": "MemberAccess", - "src": "2979:10:1" - }, - { - "attributes": { - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "bytes32", - "type_conversion": false + "id": 220, + "nodeType": "ExpressionStatement", + "src": "2620:76:0" }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" + { + "expression": { + "id": 225, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 221, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 186, + "src": "2707:1:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_LockContract_$40_storage_ptr", + "typeString": "struct HashTimeLock.LockContract storage pointer" + } + }, + "id": 223, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberLocation": "2709:6:0", + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 29, + "src": "2707:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 224, + "name": "WITHDRAWN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18, + "src": "2718:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2707:20:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" } - ], - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": -22, - "type": "function (bytes memory) pure returns (bytes32)", - "value": "sha256" }, - "id": 262, - "name": "Identifier", - "src": "2993:6:1" - }, - { - "attributes": { - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "bytes memory", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ + "id": 226, + "nodeType": "ExpressionStatement", + "src": "2707:20:0" + }, + { + "expression": { + "arguments": [ { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" + "expression": { + "id": 232, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 186, + "src": "2758:1:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_LockContract_$40_storage_ptr", + "typeString": "struct HashTimeLock.LockContract storage pointer" + } + }, + "id": 233, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "2760:11:0", + "memberName": "inputAmount", + "nodeType": "MemberAccess", + "referencedDeclaration": 23, + "src": "2758:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "expression": { + "id": 227, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 186, + "src": "2738:1:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_LockContract_$40_storage_ptr", + "typeString": "struct HashTimeLock.LockContract storage pointer" + } + }, + "id": 230, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "2740:8:0", + "memberName": "receiver", + "nodeType": "MemberAccess", + "referencedDeclaration": 35, + "src": "2738:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 231, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "2749:8:0", + "memberName": "transfer", + "nodeType": "MemberAccess", + "src": "2738:19:0", + "typeDescriptions": { + "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "member_name": "encodePacked", - "type": "function () pure returns (bytes memory)" }, - "children": [ - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": -1, - "type": "abi", - "value": "abi" + "id": 234, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2738:34:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 235, + "nodeType": "ExpressionStatement", + "src": "2738:34:0" + }, + { + "eventCall": { + "arguments": [ + { + "id": 237, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 179, + "src": "2797:2:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 238, + "name": "secret", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 181, + "src": "2801:6:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "expression": { + "id": 239, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 186, + "src": "2809:1:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_LockContract_$40_storage_ptr", + "typeString": "struct HashTimeLock.LockContract storage pointer" + } + }, + "id": 240, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "2811:8:0", + "memberName": "hashLock", + "nodeType": "MemberAccess", + "referencedDeclaration": 31, + "src": "2809:10:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "expression": { + "id": 241, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 186, + "src": "2821:1:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_LockContract_$40_storage_ptr", + "typeString": "struct HashTimeLock.LockContract storage pointer" + } + }, + "id": 242, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "2823:6:0", + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": 33, + "src": "2821:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } }, - "id": 263, - "name": "Identifier", - "src": "3000:3:1" - } + { + "expression": { + "id": 243, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 186, + "src": "2831:1:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_LockContract_$40_storage_ptr", + "typeString": "struct HashTimeLock.LockContract storage pointer" + } + }, + "id": 244, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "2833:8:0", + "memberName": "receiver", + "nodeType": "MemberAccess", + "referencedDeclaration": 35, + "src": "2831:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } ], - "id": 264, - "name": "MemberAccess", - "src": "3000:16:1" - }, - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 233, - "type": "bytes32", - "value": "secret" + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 236, + "name": "Withdraw", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 52, + "src": "2788:8:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_bytes32_$_t_bytes32_$_t_address_$_t_address_$returns$__$", + "typeString": "function (bytes32,bytes32,bytes32,address,address)" + } }, - "id": 265, - "name": "Identifier", - "src": "3017:6:1" - } - ], - "id": 266, - "name": "FunctionCall", - "src": "3000:24:1" - } - ], - "id": 267, - "name": "FunctionCall", - "src": "2993:32:1" - } - ], - "id": 268, - "name": "BinaryOperation", - "src": "2979:46:1" - }, - { - "attributes": { - "hexvalue": "494e56414c49445f534543524554", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "token": "string", - "type": "literal_string \"INVALID_SECRET\"", - "value": "INVALID_SECRET" - }, - "id": 269, - "name": "Literal", - "src": "3026:16:1" - } - ], - "id": 270, - "name": "FunctionCall", - "src": "2971:72:1" - } - ], - "id": 271, - "name": "ExpressionStatement", - "src": "2971:72:1" - }, - { - "children": [ - { - "attributes": { - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "member_name": "status", - "referencedDeclaration": 84, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 237, - "type": "struct HashTimeLock.LockContract storage pointer", - "value": "c" - }, - "id": 272, - "name": "Identifier", - "src": "3054:1:1" - } - ], - "id": 274, - "name": "MemberAccess", - "src": "3054:8:1" - }, - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 73, - "type": "uint256", - "value": "WITHDRAWN" - }, - "id": 275, - "name": "Identifier", - "src": "3065:9:1" - } - ], - "id": 276, - "name": "Assignment", - "src": "3054:20:1" - } - ], - "id": 277, - "name": "ExpressionStatement", - "src": "3054:20:1" - }, - { - "children": [ - { - "attributes": { - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "tuple()", - "type_conversion": false + "id": 245, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2788:54:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 246, + "nodeType": "EmitStatement", + "src": "2783:59:0" + } + ] }, - "children": [ - { - "attributes": { - "argumentTypes": [ + "functionSelector": "63615149", + "id": 248, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "withdraw", + "nameLocation": "2392:8:0", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 182, + "nodeType": "ParameterList", + "parameters": [ { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "transfer", - "type": "function (uint256)" - }, - "children": [ - { - "attributes": { - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "member_name": "receiver", - "referencedDeclaration": 90, - "type": "address payable" - }, - "children": [ - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 237, - "type": "struct HashTimeLock.LockContract storage pointer", - "value": "c" + "constant": false, + "id": 179, + "mutability": "mutable", + "name": "id", + "nameLocation": "2409:2:0", + "nodeType": "VariableDeclaration", + "scope": 248, + "src": "2401:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" }, - "id": 278, - "name": "Identifier", - "src": "3085:1:1" - } - ], - "id": 281, - "name": "MemberAccess", - "src": "3085:10:1" - } - ], - "id": 282, - "name": "MemberAccess", - "src": "3085:19:1" - }, - { - "attributes": { - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "member_name": "inputAmount", - "referencedDeclaration": 78, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 237, - "type": "struct HashTimeLock.LockContract storage pointer", - "value": "c" + "typeName": { + "id": 178, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2401:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" }, - "id": 283, - "name": "Identifier", - "src": "3105:1:1" - } + { + "constant": false, + "id": 181, + "mutability": "mutable", + "name": "secret", + "nameLocation": "2421:6:0", + "nodeType": "VariableDeclaration", + "scope": 248, + "src": "2413:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 180, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2413:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } ], - "id": 284, - "name": "MemberAccess", - "src": "3105:13:1" - } - ], - "id": 285, - "name": "FunctionCall", - "src": "3085:34:1" - } - ], - "id": 286, - "name": "ExpressionStatement", - "src": "3085:34:1" - }, - { - "children": [ - { - "attributes": { - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "tuple()", - "type_conversion": false + "src": "2400:28:0" }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, + "returnParameters": { + "id": 183, + "nodeType": "ParameterList", + "parameters": [], + "src": "2438:0:0" + }, + "scope": 414, + "src": "2383:466:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 302, + "nodeType": "Block", + "src": "2892:312:0", + "statements": [ { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" + "assignments": [ + 255 + ], + "declarations": [ + { + "constant": false, + "id": 255, + "mutability": "mutable", + "name": "c", + "nameLocation": "2923:1:0", + "nodeType": "VariableDeclaration", + "scope": 302, + "src": "2902:22:0", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_LockContract_$40_storage_ptr", + "typeString": "struct HashTimeLock.LockContract" + }, + "typeName": { + "id": 254, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 253, + "name": "LockContract", + "nameLocations": [ + "2902:12:0" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 40, + "src": "2902:12:0" + }, + "referencedDeclaration": 40, + "src": "2902:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_LockContract_$40_storage_ptr", + "typeString": "struct HashTimeLock.LockContract" + } + }, + "visibility": "internal" + } + ], + "id": 259, + "initialValue": { + "baseExpression": { + "id": 256, + "name": "contracts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6, + "src": "2927:9:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_LockContract_$40_storage_$", + "typeString": "mapping(bytes32 => struct HashTimeLock.LockContract storage ref)" + } + }, + "id": 258, + "indexExpression": { + "id": 257, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 250, + "src": "2937:2:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2927:13:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_LockContract_$40_storage", + "typeString": "struct HashTimeLock.LockContract storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2902:38:0" }, { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 264, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 261, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 255, + "src": "2959:1:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_LockContract_$40_storage_ptr", + "typeString": "struct HashTimeLock.LockContract storage pointer" + } + }, + "id": 262, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "2961:6:0", + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 29, + "src": "2959:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 263, + "name": "ACTIVE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12, + "src": "2971:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2959:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "535741505f4e4f545f414354495645", + "id": 265, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2979:17:0", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_afbfa7d3db262df0c92c413f0113503b1c1332dc5a4a874fcd8d6a6de57b74dd", + "typeString": "literal_string \"SWAP_NOT_ACTIVE\"" + }, + "value": "SWAP_NOT_ACTIVE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_afbfa7d3db262df0c92c413f0113503b1c1332dc5a4a874fcd8d6a6de57b74dd", + "typeString": "literal_string \"SWAP_NOT_ACTIVE\"" + } + ], + "id": 260, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "2951:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 266, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2951:46:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 267, + "nodeType": "ExpressionStatement", + "src": "2951:46:0" }, { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 273, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 269, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 255, + "src": "3016:1:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_LockContract_$40_storage_ptr", + "typeString": "struct HashTimeLock.LockContract storage pointer" + } + }, + "id": 270, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3018:10:0", + "memberName": "expiration", + "nodeType": "MemberAccess", + "referencedDeclaration": 27, + "src": "3016:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "expression": { + "id": 271, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967292, + "src": "3032:5:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 272, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3038:9:0", + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "3032:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3016:31:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "494e56414c49445f54494d45", + "id": 274, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3049:14:0", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b98f3e47db5919a8c78ec10ff6bf7d1326066d3facdc164cf7441d38cae771df", + "typeString": "literal_string \"INVALID_TIME\"" + }, + "value": "INVALID_TIME" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b98f3e47db5919a8c78ec10ff6bf7d1326066d3facdc164cf7441d38cae771df", + "typeString": "literal_string \"INVALID_TIME\"" + } + ], + "id": 268, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "3008:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 275, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3008:56:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 276, + "nodeType": "ExpressionStatement", + "src": "3008:56:0" }, { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 107, - "type": "function (bytes32,bytes32,bytes32,address,address)", - "value": "Withdraw" - }, - "id": 287, - "name": "Identifier", - "src": "3135:8:1" - }, - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 231, - "type": "bytes32", - "value": "id" - }, - "id": 288, - "name": "Identifier", - "src": "3144:2:1" - }, - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 233, - "type": "bytes32", - "value": "secret" - }, - "id": 289, - "name": "Identifier", - "src": "3148:6:1" - }, - { - "attributes": { - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "member_name": "hashLock", - "referencedDeclaration": 86, - "type": "bytes32" - }, - "children": [ - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 237, - "type": "struct HashTimeLock.LockContract storage pointer", - "value": "c" - }, - "id": 290, - "name": "Identifier", - "src": "3156:1:1" - } - ], - "id": 291, - "name": "MemberAccess", - "src": "3156:10:1" - }, - { - "attributes": { - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "member_name": "sender", - "referencedDeclaration": 88, - "type": "address payable" - }, - "children": [ - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 237, - "type": "struct HashTimeLock.LockContract storage pointer", - "value": "c" - }, - "id": 292, - "name": "Identifier", - "src": "3168:1:1" - } - ], - "id": 293, - "name": "MemberAccess", - "src": "3168:8:1" - }, - { - "attributes": { - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "member_name": "receiver", - "referencedDeclaration": 90, - "type": "address payable" - }, - "children": [ - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 237, - "type": "struct HashTimeLock.LockContract storage pointer", - "value": "c" + "expression": { + "id": 281, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 277, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 255, + "src": "3075:1:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_LockContract_$40_storage_ptr", + "typeString": "struct HashTimeLock.LockContract storage pointer" + } + }, + "id": 279, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberLocation": "3077:6:0", + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 29, + "src": "3075:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 280, + "name": "REFUNDED", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15, + "src": "3086:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3075:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 282, + "nodeType": "ExpressionStatement", + "src": "3075:19:0" }, - "id": 294, - "name": "Identifier", - "src": "3178:1:1" - } - ], - "id": 295, - "name": "MemberAccess", - "src": "3178:10:1" - } - ], - "id": 296, - "name": "FunctionCall", - "src": "3135:54:1" - } - ], - "id": 297, - "name": "EmitStatement", - "src": "3130:59:1" - } - ], - "id": 298, - "name": "Block", - "src": "2789:407:1" - } - ], - "id": 299, - "name": "FunctionDefinition", - "src": "2734:462:1" - }, - { - "attributes": { - "functionSelector": "7249fbb6", - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [ - null - ], - "name": "refund", - "scope": 462, - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - "children": [ - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "id", - "scope": 353, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 300, - "name": "ElementaryTypeName", - "src": "3218:7:1" - } - ], - "id": 301, - "name": "VariableDeclaration", - "src": "3218:10:1" - } - ], - "id": 302, - "name": "ParameterList", - "src": "3217:12:1" - }, - { - "attributes": { - "parameters": [ - null - ] - }, - "children": [], - "id": 303, - "name": "ParameterList", - "src": "3239:0:1" - }, - { - "children": [ - { - "attributes": { - "assignments": [ - 305 - ] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "c", - "scope": 352, - "stateVariable": false, - "storageLocation": "storage", - "type": "struct HashTimeLock.LockContract", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "LockContract", - "referencedDeclaration": 95, - "type": "struct HashTimeLock.LockContract" - }, - "id": 304, - "name": "UserDefinedTypeName", - "src": "3249:12:1" - } - ], - "id": 305, - "name": "VariableDeclaration", - "src": "3249:22:1" - }, - { - "attributes": { - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "struct HashTimeLock.LockContract storage ref" - }, - "children": [ - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 61, - "type": "mapping(bytes32 => struct HashTimeLock.LockContract storage ref)", - "value": "contracts" - }, - "id": 306, - "name": "Identifier", - "src": "3274:9:1" - }, - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 301, - "type": "bytes32", - "value": "id" - }, - "id": 307, - "name": "Identifier", - "src": "3284:2:1" - } - ], - "id": 308, - "name": "IndexAccess", - "src": "3274:13:1" - } - ], - "id": 309, - "name": "VariableDeclarationStatement", - "src": "3249:38:1" - }, - { - "children": [ - { - "attributes": { - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ { - "typeIdentifier": "t_bool", - "typeString": "bool" + "expression": { + "arguments": [ + { + "expression": { + "id": 288, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 255, + "src": "3123:1:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_LockContract_$40_storage_ptr", + "typeString": "struct HashTimeLock.LockContract storage pointer" + } + }, + "id": 289, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3125:11:0", + "memberName": "inputAmount", + "nodeType": "MemberAccess", + "referencedDeclaration": 23, + "src": "3123:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "expression": { + "id": 283, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 255, + "src": "3105:1:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_LockContract_$40_storage_ptr", + "typeString": "struct HashTimeLock.LockContract storage pointer" + } + }, + "id": 286, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3107:6:0", + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": 33, + "src": "3105:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 287, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3114:8:0", + "memberName": "transfer", + "nodeType": "MemberAccess", + "src": "3105:17:0", + "typeDescriptions": { + "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 290, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3105:32:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 291, + "nodeType": "ExpressionStatement", + "src": "3105:32:0" }, { - "typeIdentifier": "t_stringliteral_afbfa7d3db262df0c92c413f0113503b1c1332dc5a4a874fcd8d6a6de57b74dd", - "typeString": "literal_string \"SWAP_NOT_ACTIVE\"" + "eventCall": { + "arguments": [ + { + "id": 293, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 250, + "src": "3160:2:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "expression": { + "id": 294, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 255, + "src": "3164:1:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_LockContract_$40_storage_ptr", + "typeString": "struct HashTimeLock.LockContract storage pointer" + } + }, + "id": 295, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3166:8:0", + "memberName": "hashLock", + "nodeType": "MemberAccess", + "referencedDeclaration": 31, + "src": "3164:10:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "expression": { + "id": 296, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 255, + "src": "3176:1:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_LockContract_$40_storage_ptr", + "typeString": "struct HashTimeLock.LockContract storage pointer" + } + }, + "id": 297, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3178:6:0", + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": 33, + "src": "3176:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "expression": { + "id": 298, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 255, + "src": "3186:1:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_LockContract_$40_storage_ptr", + "typeString": "struct HashTimeLock.LockContract storage pointer" + } + }, + "id": 299, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3188:8:0", + "memberName": "receiver", + "nodeType": "MemberAccess", + "referencedDeclaration": 35, + "src": "3186:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 292, + "name": "Refund", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62, + "src": "3153:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_bytes32_$_t_address_$_t_address_$returns$__$", + "typeString": "function (bytes32,bytes32,address,address)" + } + }, + "id": 300, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3153:44:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 301, + "nodeType": "EmitStatement", + "src": "3148:49:0" } - ], - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 310, - "name": "Identifier", - "src": "3298:7:1" - }, - { - "attributes": { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "==", - "type": "bool" - }, - "children": [ - { - "attributes": { - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "member_name": "status", - "referencedDeclaration": 84, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 305, - "type": "struct HashTimeLock.LockContract storage pointer", - "value": "c" + ] + }, + "functionSelector": "7249fbb6", + "id": 303, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "refund", + "nameLocation": "2864:6:0", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 251, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 250, + "mutability": "mutable", + "name": "id", + "nameLocation": "2879:2:0", + "nodeType": "VariableDeclaration", + "scope": 303, + "src": "2871:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" }, - "id": 311, - "name": "Identifier", - "src": "3306:1:1" - } - ], - "id": 312, - "name": "MemberAccess", - "src": "3306:8:1" - }, - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 67, - "type": "uint256", - "value": "ACTIVE" - }, - "id": 313, - "name": "Identifier", - "src": "3318:6:1" - } + "typeName": { + "id": 249, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2871:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } ], - "id": 314, - "name": "BinaryOperation", - "src": "3306:18:1" - }, - { - "attributes": { - "hexvalue": "535741505f4e4f545f414354495645", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "token": "string", - "type": "literal_string \"SWAP_NOT_ACTIVE\"", - "value": "SWAP_NOT_ACTIVE" - }, - "id": 315, - "name": "Literal", - "src": "3326:17:1" - } - ], - "id": 316, - "name": "FunctionCall", - "src": "3298:46:1" - } - ], - "id": 317, - "name": "ExpressionStatement", - "src": "3298:46:1" - }, - { - "children": [ - { - "attributes": { - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "tuple()", - "type_conversion": false + "src": "2870:12:0" + }, + "returnParameters": { + "id": 252, + "nodeType": "ParameterList", + "parameters": [], + "src": "2892:0:0" }, - "children": [ - { - "attributes": { - "argumentTypes": [ + "scope": 414, + "src": "2855:349:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 349, + "nodeType": "Block", + "src": "3290:223:0", + "statements": [ { - "typeIdentifier": "t_bool", - "typeString": "bool" + "assignments": [ + 316 + ], + "declarations": [ + { + "constant": false, + "id": 316, + "mutability": "mutable", + "name": "result", + "nameLocation": "3317:6:0", + "nodeType": "VariableDeclaration", + "scope": 349, + "src": "3300:23:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 314, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3300:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 315, + "nodeType": "ArrayTypeName", + "src": "3300:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "visibility": "internal" + } + ], + "id": 323, + "initialValue": { + "arguments": [ + { + "expression": { + "id": 320, + "name": "ids", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 306, + "src": "3340:3:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", + "typeString": "bytes32[] memory" + } + }, + "id": 321, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3344:6:0", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "3340:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 319, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "3326:13:0", + "typeDescriptions": { + "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$", + "typeString": "function (uint256) pure returns (uint256[] memory)" + }, + "typeName": { + "baseType": { + "id": 317, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3330:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 318, + "nodeType": "ArrayTypeName", + "src": "3330:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + } + }, + "id": 322, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3326:25:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3300:51:0" }, { - "typeIdentifier": "t_stringliteral_b98f3e47db5919a8c78ec10ff6bf7d1326066d3facdc164cf7441d38cae771df", - "typeString": "literal_string \"INVALID_TIME\"" - } - ], - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 318, - "name": "Identifier", - "src": "3355:7:1" - }, - { - "attributes": { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "<=", - "type": "bool" - }, - "children": [ - { - "attributes": { - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "member_name": "expiration", - "referencedDeclaration": 82, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 305, - "type": "struct HashTimeLock.LockContract storage pointer", - "value": "c" + "body": { + "id": 345, + "nodeType": "Block", + "src": "3415:68:0", + "statements": [ + { + "expression": { + "id": 343, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 335, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 316, + "src": "3429:6:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 337, + "indexExpression": { + "id": 336, + "name": "index", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 325, + "src": "3436:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "3429:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "baseExpression": { + "id": 339, + "name": "ids", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 306, + "src": "3461:3:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", + "typeString": "bytes32[] memory" + } + }, + "id": 341, + "indexExpression": { + "id": 340, + "name": "index", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 325, + "src": "3465:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3461:10:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 338, + "name": "getSingleStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 387, + "src": "3445:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view returns (uint256)" + } + }, + "id": 342, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3445:27:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3429:43:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 344, + "nodeType": "ExpressionStatement", + "src": "3429:43:0" + } + ] }, - "id": 319, - "name": "Identifier", - "src": "3363:1:1" - } - ], - "id": 320, - "name": "MemberAccess", - "src": "3363:12:1" - }, - { - "attributes": { - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "timestamp", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": -4, - "type": "block", - "value": "block" + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 331, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 328, + "name": "index", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 325, + "src": "3386:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "expression": { + "id": 329, + "name": "ids", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 306, + "src": "3394:3:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", + "typeString": "bytes32[] memory" + } + }, + "id": 330, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3398:6:0", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "3394:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3386:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } }, - "id": 321, - "name": "Identifier", - "src": "3379:5:1" - } - ], - "id": 322, - "name": "MemberAccess", - "src": "3379:15:1" - } - ], - "id": 323, - "name": "BinaryOperation", - "src": "3363:31:1" - }, - { - "attributes": { - "hexvalue": "494e56414c49445f54494d45", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "token": "string", - "type": "literal_string \"INVALID_TIME\"", - "value": "INVALID_TIME" - }, - "id": 324, - "name": "Literal", - "src": "3396:14:1" - } - ], - "id": 325, - "name": "FunctionCall", - "src": "3355:56:1" - } - ], - "id": 326, - "name": "ExpressionStatement", - "src": "3355:56:1" - }, - { - "children": [ - { - "attributes": { - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "member_name": "status", - "referencedDeclaration": 84, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 305, - "type": "struct HashTimeLock.LockContract storage pointer", - "value": "c" + "id": 346, + "initializationExpression": { + "assignments": [ + 325 + ], + "declarations": [ + { + "constant": false, + "id": 325, + "mutability": "mutable", + "name": "index", + "nameLocation": "3375:5:0", + "nodeType": "VariableDeclaration", + "scope": 346, + "src": "3367:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 324, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3367:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 327, + "initialValue": { + "hexValue": "30", + "id": 326, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3383:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "3367:17:0" + }, + "loopExpression": { + "expression": { + "id": 333, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "3406:7:0", + "subExpression": { + "id": 332, + "name": "index", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 325, + "src": "3406:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 334, + "nodeType": "ExpressionStatement", + "src": "3406:7:0" + }, + "nodeType": "ForStatement", + "src": "3362:121:0" }, - "id": 327, - "name": "Identifier", - "src": "3422:1:1" - } - ], - "id": 329, - "name": "MemberAccess", - "src": "3422:8:1" - }, - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 70, - "type": "uint256", - "value": "REFUNDED" - }, - "id": 330, - "name": "Identifier", - "src": "3433:8:1" - } - ], - "id": 331, - "name": "Assignment", - "src": "3422:19:1" - } - ], - "id": 332, - "name": "ExpressionStatement", - "src": "3422:19:1" - }, - { - "children": [ - { - "attributes": { - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "transfer", - "type": "function (uint256)" - }, - "children": [ - { - "attributes": { - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "member_name": "sender", - "referencedDeclaration": 88, - "type": "address payable" - }, - "children": [ - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 305, - "type": "struct HashTimeLock.LockContract storage pointer", - "value": "c" + "expression": { + "id": 347, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 316, + "src": "3500:6:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } }, - "id": 333, - "name": "Identifier", - "src": "3452:1:1" - } - ], - "id": 336, - "name": "MemberAccess", - "src": "3452:8:1" - } - ], - "id": 337, - "name": "MemberAccess", - "src": "3452:17:1" - }, - { - "attributes": { - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "member_name": "inputAmount", - "referencedDeclaration": 78, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 305, - "type": "struct HashTimeLock.LockContract storage pointer", - "value": "c" - }, - "id": 338, - "name": "Identifier", - "src": "3470:1:1" - } - ], - "id": 339, - "name": "MemberAccess", - "src": "3470:13:1" - } - ], - "id": 340, - "name": "FunctionCall", - "src": "3452:32:1" - } - ], - "id": 341, - "name": "ExpressionStatement", - "src": "3452:32:1" - }, - { - "children": [ - { - "attributes": { - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "tuple()", - "type_conversion": false + "functionReturnParameters": 311, + "id": 348, + "nodeType": "Return", + "src": "3493:13:0" + } + ] }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, + "functionSelector": "2f21a663", + "id": 350, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getStatus", + "nameLocation": "3219:9:0", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 307, + "nodeType": "ParameterList", + "parameters": [ { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" + "constant": false, + "id": 306, + "mutability": "mutable", + "name": "ids", + "nameLocation": "3246:3:0", + "nodeType": "VariableDeclaration", + "scope": 350, + "src": "3229:20:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", + "typeString": "bytes32[]" + }, + "typeName": { + "baseType": { + "id": 304, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3229:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 305, + "nodeType": "ArrayTypeName", + "src": "3229:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", + "typeString": "bytes32[]" + } + }, + "visibility": "internal" } - ], - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 117, - "type": "function (bytes32,bytes32,address,address)", - "value": "Refund" - }, - "id": 342, - "name": "Identifier", - "src": "3500:6:1" - }, - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 301, - "type": "bytes32", - "value": "id" - }, - "id": 343, - "name": "Identifier", - "src": "3507:2:1" - }, - { - "attributes": { - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "member_name": "hashLock", - "referencedDeclaration": 86, - "type": "bytes32" - }, - "children": [ - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 305, - "type": "struct HashTimeLock.LockContract storage pointer", - "value": "c" - }, - "id": 344, - "name": "Identifier", - "src": "3511:1:1" - } - ], - "id": 345, - "name": "MemberAccess", - "src": "3511:10:1" - }, - { - "attributes": { - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "member_name": "sender", - "referencedDeclaration": 88, - "type": "address payable" - }, - "children": [ - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 305, - "type": "struct HashTimeLock.LockContract storage pointer", - "value": "c" - }, - "id": 346, - "name": "Identifier", - "src": "3523:1:1" - } - ], - "id": 347, - "name": "MemberAccess", - "src": "3523:8:1" - }, - { - "attributes": { - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "member_name": "receiver", - "referencedDeclaration": 90, - "type": "address payable" - }, - "children": [ - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 305, - "type": "struct HashTimeLock.LockContract storage pointer", - "value": "c" - }, - "id": 348, - "name": "Identifier", - "src": "3533:1:1" - } - ], - "id": 349, - "name": "MemberAccess", - "src": "3533:10:1" - } - ], - "id": 350, - "name": "FunctionCall", - "src": "3500:44:1" - } - ], - "id": 351, - "name": "EmitStatement", - "src": "3495:49:1" - } - ], - "id": 352, - "name": "Block", - "src": "3239:312:1" - } - ], - "id": 353, - "name": "FunctionDefinition", - "src": "3202:349:1" - }, - { - "attributes": { - "functionSelector": "2f21a663", - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [ - null - ], - "name": "getStatus", - "scope": 462, - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - "children": [ - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "ids", - "scope": 400, - "stateVariable": false, - "storageLocation": "memory", - "type": "bytes32[]", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "type": "bytes32[]" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 354, - "name": "ElementaryTypeName", - "src": "3576:7:1" - } - ], - "id": 355, - "name": "ArrayTypeName", - "src": "3576:9:1" - } - ], - "id": 356, - "name": "VariableDeclaration", - "src": "3576:20:1" - } - ], - "id": 357, - "name": "ParameterList", - "src": "3575:22:1" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "", - "scope": 400, - "stateVariable": false, - "storageLocation": "memory", - "type": "uint256[]", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "type": "uint256[]" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 358, - "name": "ElementaryTypeName", - "src": "3619:7:1" - } - ], - "id": 359, - "name": "ArrayTypeName", - "src": "3619:9:1" - } - ], - "id": 360, - "name": "VariableDeclaration", - "src": "3619:16:1" - } - ], - "id": 361, - "name": "ParameterList", - "src": "3618:18:1" - }, - { - "children": [ - { - "attributes": { - "assignments": [ - 366 - ] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "result", - "scope": 399, - "stateVariable": false, - "storageLocation": "memory", - "type": "uint256[]", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "type": "uint256[]" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 364, - "name": "ElementaryTypeName", - "src": "3647:7:1" - } ], - "id": 365, - "name": "ArrayTypeName", - "src": "3647:9:1" - } - ], - "id": 366, - "name": "VariableDeclaration", - "src": "3647:23:1" - }, - { - "attributes": { - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "uint256[] memory", - "type_conversion": false + "src": "3228:22:0" }, - "children": [ - { - "attributes": { - "argumentTypes": [ + "returnParameters": { + "id": 311, + "nodeType": "ParameterList", + "parameters": [ { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "function (uint256) pure returns (uint256[] memory)" - }, - "children": [ - { - "attributes": { - "type": "uint256[]" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" + "constant": false, + "id": 310, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 350, + "src": "3272:16:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" }, - "id": 367, - "name": "ElementaryTypeName", - "src": "3677:7:1" - } - ], - "id": 368, - "name": "ArrayTypeName", - "src": "3677:9:1" - } - ], - "id": 369, - "name": "NewExpression", - "src": "3673:13:1" - }, - { - "attributes": { - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "length", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 356, - "type": "bytes32[] memory", - "value": "ids" - }, - "id": 370, - "name": "Identifier", - "src": "3687:3:1" - } - ], - "id": 371, - "name": "MemberAccess", - "src": "3687:10:1" - } - ], - "id": 372, - "name": "FunctionCall", - "src": "3673:25:1" - } - ], - "id": 373, - "name": "VariableDeclarationStatement", - "src": "3647:51:1" - }, - { - "children": [ - { - "attributes": { - "assignments": [ - 375 - ] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "index", - "scope": 396, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 374, - "name": "ElementaryTypeName", - "src": "3714:7:1" - } + "typeName": { + "baseType": { + "id": 308, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3272:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 309, + "nodeType": "ArrayTypeName", + "src": "3272:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "visibility": "internal" + } ], - "id": 375, - "name": "VariableDeclaration", - "src": "3714:13:1" - }, - { - "attributes": { - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "token": "number", - "type": "int_const 0", - "value": "0" - }, - "id": 376, - "name": "Literal", - "src": "3730:1:1" - } - ], - "id": 377, - "name": "VariableDeclarationStatement", - "src": "3714:17:1" - }, - { - "attributes": { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "<", - "type": "bool" + "src": "3271:18:0" }, - "children": [ - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 375, - "type": "uint256", - "value": "index" - }, - "id": 378, - "name": "Identifier", - "src": "3733:5:1" - }, - { - "attributes": { - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "length", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 356, - "type": "bytes32[] memory", - "value": "ids" - }, - "id": 379, - "name": "Identifier", - "src": "3741:3:1" - } - ], - "id": 380, - "name": "MemberAccess", - "src": "3741:10:1" - } - ], - "id": 381, - "name": "BinaryOperation", - "src": "3733:18:1" - }, - { - "children": [ - { - "attributes": { - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "++", - "prefix": false, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 375, - "type": "uint256", - "value": "index" - }, - "id": 382, - "name": "Identifier", - "src": "3753:5:1" - } - ], - "id": 383, - "name": "UnaryOperation", - "src": "3753:7:1" - } - ], - "id": 384, - "name": "ExpressionStatement", - "src": "3753:7:1" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 366, - "type": "uint256[] memory", - "value": "result" + "scope": 414, + "src": "3210:303:0", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 386, + "nodeType": "Block", + "src": "3593:255:0", + "statements": [ + { + "assignments": [ + 359 + ], + "declarations": [ + { + "constant": false, + "id": 359, + "mutability": "mutable", + "name": "tempContract", + "nameLocation": "3623:12:0", + "nodeType": "VariableDeclaration", + "scope": 386, + "src": "3603:32:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_LockContract_$40_memory_ptr", + "typeString": "struct HashTimeLock.LockContract" + }, + "typeName": { + "id": 358, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 357, + "name": "LockContract", + "nameLocations": [ + "3603:12:0" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 40, + "src": "3603:12:0" + }, + "referencedDeclaration": 40, + "src": "3603:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_LockContract_$40_storage_ptr", + "typeString": "struct HashTimeLock.LockContract" + } + }, + "visibility": "internal" + } + ], + "id": 363, + "initialValue": { + "baseExpression": { + "id": 360, + "name": "contracts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6, + "src": "3638:9:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_LockContract_$40_storage_$", + "typeString": "mapping(bytes32 => struct HashTimeLock.LockContract storage ref)" + } }, - "id": 385, - "name": "Identifier", - "src": "3776:6:1" - }, - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 375, - "type": "uint256", - "value": "index" + "id": 362, + "indexExpression": { + "id": 361, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 352, + "src": "3648:2:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } }, - "id": 386, - "name": "Identifier", - "src": "3783:5:1" - } - ], - "id": 387, - "name": "IndexAccess", - "src": "3776:13:1" - }, - { - "attributes": { - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "uint256", - "type_conversion": false + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3638:13:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_LockContract_$40_storage", + "typeString": "struct HashTimeLock.LockContract storage ref" + } }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 436, - "type": "function (bytes32) view returns (uint256)", - "value": "getSingleStatus" + "nodeType": "VariableDeclarationStatement", + "src": "3603:48:0" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" }, - "id": 388, - "name": "Identifier", - "src": "3792:15:1" - }, - { - "attributes": { - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "bytes32" + "id": 373, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 367, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 364, + "name": "tempContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 359, + "src": "3666:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_LockContract_$40_memory_ptr", + "typeString": "struct HashTimeLock.LockContract memory" + } + }, + "id": 365, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3679:6:0", + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 29, + "src": "3666:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 366, + "name": "ACTIVE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12, + "src": "3689:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3666:29:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } }, - "children": [ - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 356, - "type": "bytes32[] memory", - "value": "ids" + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" }, - "id": 389, - "name": "Identifier", - "src": "3808:3:1" - }, - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 375, - "type": "uint256", - "value": "index" + "id": 372, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 368, + "name": "tempContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 359, + "src": "3699:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_LockContract_$40_memory_ptr", + "typeString": "struct HashTimeLock.LockContract memory" + } + }, + "id": 369, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3712:10:0", + "memberName": "expiration", + "nodeType": "MemberAccess", + "referencedDeclaration": 27, + "src": "3699:23:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } }, - "id": 390, - "name": "Identifier", - "src": "3812:5:1" - } - ], - "id": 391, - "name": "IndexAccess", - "src": "3808:10:1" - } - ], - "id": 392, - "name": "FunctionCall", - "src": "3792:27:1" - } - ], - "id": 393, - "name": "Assignment", - "src": "3776:43:1" - } + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "expression": { + "id": 370, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967292, + "src": "3725:5:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 371, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3731:9:0", + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "3725:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3699:41:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "3666:74:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 384, + "nodeType": "Block", + "src": "3789:53:0", + "statements": [ + { + "expression": { + "id": 382, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 379, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 355, + "src": "3803:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "id": 380, + "name": "tempContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 359, + "src": "3812:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_LockContract_$40_memory_ptr", + "typeString": "struct HashTimeLock.LockContract memory" + } + }, + "id": 381, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3825:6:0", + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 29, + "src": "3812:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3803:28:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 383, + "nodeType": "ExpressionStatement", + "src": "3803:28:0" + } + ] + }, + "id": 385, + "nodeType": "IfStatement", + "src": "3662:180:0", + "trueBody": { + "id": 378, + "nodeType": "Block", + "src": "3742:41:0", + "statements": [ + { + "expression": { + "id": 376, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 374, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 355, + "src": "3756:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 375, + "name": "EXPIRED", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21, + "src": "3765:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3756:16:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 377, + "nodeType": "ExpressionStatement", + "src": "3756:16:0" + } + ] + } + } + ] + }, + "functionSelector": "fbdf3b43", + "id": 387, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getSingleStatus", + "nameLocation": "3528:15:0", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 353, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 352, + "mutability": "mutable", + "name": "id", + "nameLocation": "3552:2:0", + "nodeType": "VariableDeclaration", + "scope": 387, + "src": "3544:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 351, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3544:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } ], - "id": 394, - "name": "ExpressionStatement", - "src": "3776:43:1" - } - ], - "id": 395, - "name": "Block", - "src": "3762:68:1" - } - ], - "id": 396, - "name": "ForStatement", - "src": "3709:121:1" - }, - { - "attributes": { - "functionReturnParameters": 361 - }, - "children": [ - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 366, - "type": "uint256[] memory", - "value": "result" - }, - "id": 397, - "name": "Identifier", - "src": "3847:6:1" - } - ], - "id": 398, - "name": "Return", - "src": "3840:13:1" - } - ], - "id": 399, - "name": "Block", - "src": "3637:223:1" - } - ], - "id": 400, - "name": "FunctionDefinition", - "src": "3557:303:1" - }, - { - "attributes": { - "functionSelector": "fbdf3b43", - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [ - null - ], - "name": "getSingleStatus", - "scope": 462, - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - "children": [ - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "id", - "scope": 436, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" + "src": "3543:12:0" }, - "id": 401, - "name": "ElementaryTypeName", - "src": "3891:7:1" - } - ], - "id": 402, - "name": "VariableDeclaration", - "src": "3891:10:1" - } - ], - "id": 403, - "name": "ParameterList", - "src": "3890:12:1" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "result", - "scope": 436, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" + "returnParameters": { + "id": 356, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 355, + "mutability": "mutable", + "name": "result", + "nameLocation": "3585:6:0", + "nodeType": "VariableDeclaration", + "scope": 387, + "src": "3577:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 354, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3577:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "3576:16:0" }, - "id": 404, - "name": "ElementaryTypeName", - "src": "3924:7:1" - } - ], - "id": 405, - "name": "VariableDeclaration", - "src": "3924:14:1" - } - ], - "id": 406, - "name": "ParameterList", - "src": "3923:16:1" - }, - { - "children": [ - { - "attributes": { - "assignments": [ - 408 - ] + "scope": 414, + "src": "3519:329:0", + "stateMutability": "view", + "virtual": false, + "visibility": "public" }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "tempContract", - "scope": 435, - "stateVariable": false, - "storageLocation": "memory", - "type": "struct HashTimeLock.LockContract", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "LockContract", - "referencedDeclaration": 95, - "type": "struct HashTimeLock.LockContract" - }, - "id": 407, - "name": "UserDefinedTypeName", - "src": "3950:12:1" - } - ], - "id": 408, - "name": "VariableDeclaration", - "src": "3950:32:1" - }, - { - "attributes": { - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "struct HashTimeLock.LockContract storage ref" - }, - "children": [ - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 61, - "type": "mapping(bytes32 => struct HashTimeLock.LockContract storage ref)", - "value": "contracts" - }, - "id": 409, - "name": "Identifier", - "src": "3985:9:1" - }, - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 402, - "type": "bytes32", - "value": "id" - }, - "id": 410, - "name": "Identifier", - "src": "3995:2:1" - } - ], - "id": 411, - "name": "IndexAccess", - "src": "3985:13:1" - } - ], - "id": 412, - "name": "VariableDeclarationStatement", - "src": "3950:48:1" - }, - { - "children": [ - { - "attributes": { - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "&&", - "type": "bool" - }, - "children": [ - { - "attributes": { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "==", - "type": "bool" - }, - "children": [ - { - "attributes": { - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "member_name": "status", - "referencedDeclaration": 84, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 408, - "type": "struct HashTimeLock.LockContract memory", - "value": "tempContract" + { + "body": { + "id": 412, + "nodeType": "Block", + "src": "3924:187:0", + "statements": [ + { + "assignments": [ + 396 + ], + "declarations": [ + { + "constant": false, + "id": 396, + "mutability": "mutable", + "name": "tempContract", + "nameLocation": "3954:12:0", + "nodeType": "VariableDeclaration", + "scope": 412, + "src": "3934:32:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_LockContract_$40_memory_ptr", + "typeString": "struct HashTimeLock.LockContract" + }, + "typeName": { + "id": 395, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 394, + "name": "LockContract", + "nameLocations": [ + "3934:12:0" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 40, + "src": "3934:12:0" + }, + "referencedDeclaration": 40, + "src": "3934:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_LockContract_$40_storage_ptr", + "typeString": "struct HashTimeLock.LockContract" + } + }, + "visibility": "internal" + } + ], + "id": 400, + "initialValue": { + "baseExpression": { + "id": 397, + "name": "contracts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6, + "src": "3969:9:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_LockContract_$40_storage_$", + "typeString": "mapping(bytes32 => struct HashTimeLock.LockContract storage ref)" + } + }, + "id": 399, + "indexExpression": { + "id": 398, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 389, + "src": "3979:2:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3969:13:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_LockContract_$40_storage", + "typeString": "struct HashTimeLock.LockContract storage ref" + } }, - "id": 413, - "name": "Identifier", - "src": "4026:12:1" - } - ], - "id": 414, - "name": "MemberAccess", - "src": "4026:19:1" - }, - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 67, - "type": "uint256", - "value": "ACTIVE" - }, - "id": 415, - "name": "Identifier", - "src": "4049:6:1" - } - ], - "id": 416, - "name": "BinaryOperation", - "src": "4026:29:1" - }, - { - "attributes": { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "<", - "type": "bool" - }, - "children": [ - { - "attributes": { - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "member_name": "expiration", - "referencedDeclaration": 82, - "type": "uint256" + "nodeType": "VariableDeclarationStatement", + "src": "3934:48:0" }, - "children": [ - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 408, - "type": "struct HashTimeLock.LockContract memory", - "value": "tempContract" + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 404, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 401, + "name": "tempContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 396, + "src": "3997:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_LockContract_$40_memory_ptr", + "typeString": "struct HashTimeLock.LockContract memory" + } + }, + "id": 402, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4010:6:0", + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 29, + "src": "3997:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 403, + "name": "INIT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9, + "src": "4020:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3997:27:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } }, - "id": 417, - "name": "Identifier", - "src": "4071:12:1" - } - ], - "id": 418, - "name": "MemberAccess", - "src": "4071:23:1" - }, - { - "attributes": { - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "timestamp", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": -4, - "type": "block", - "value": "block" + "falseBody": { + "id": 410, + "nodeType": "Block", + "src": "4069:36:0", + "statements": [ + { + "expression": { + "hexValue": "74727565", + "id": 408, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4090:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 393, + "id": 409, + "nodeType": "Return", + "src": "4083:11:0" + } + ] }, - "id": 419, - "name": "Identifier", - "src": "4097:5:1" - } - ], - "id": 420, - "name": "MemberAccess", - "src": "4097:15:1" - } - ], - "id": 421, - "name": "BinaryOperation", - "src": "4071:41:1" - } - ], - "id": 422, - "name": "BinaryOperation", - "src": "4026:86:1" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 405, - "type": "uint256", - "value": "result" + "id": 411, + "nodeType": "IfStatement", + "src": "3993:112:0", + "trueBody": { + "id": 407, + "nodeType": "Block", + "src": "4026:37:0", + "statements": [ + { + "expression": { + "hexValue": "66616c7365", + "id": 405, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4047:5:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "functionReturnParameters": 393, + "id": 406, + "nodeType": "Return", + "src": "4040:12:0" + } + ] + } + } + ] + }, + "functionSelector": "6c8244b8", + "id": 413, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "contractExists", + "nameLocation": "3863:14:0", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 390, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 389, + "mutability": "mutable", + "name": "id", + "nameLocation": "3886:2:0", + "nodeType": "VariableDeclaration", + "scope": 413, + "src": "3878:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" }, - "id": 423, - "name": "Identifier", - "src": "4137:6:1" - }, - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 76, - "type": "uint256", - "value": "EXPIRED" + "typeName": { + "id": 388, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3878:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } }, - "id": 424, - "name": "Identifier", - "src": "4146:7:1" - } - ], - "id": 425, - "name": "Assignment", - "src": "4137:16:1" - } + "visibility": "internal" + } ], - "id": 426, - "name": "ExpressionStatement", - "src": "4137:16:1" - } - ], - "id": 427, - "name": "Block", - "src": "4123:41:1" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 405, - "type": "uint256", - "value": "result" + "src": "3877:12:0" + }, + "returnParameters": { + "id": 393, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 392, + "mutability": "mutable", + "name": "result", + "nameLocation": "3916:6:0", + "nodeType": "VariableDeclaration", + "scope": 413, + "src": "3911:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" }, - "id": 428, - "name": "Identifier", - "src": "4184:6:1" - }, - { - "attributes": { - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "member_name": "status", - "referencedDeclaration": 84, - "type": "uint256" + "typeName": { + "id": 391, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3911:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } }, - "children": [ - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 408, - "type": "struct HashTimeLock.LockContract memory", - "value": "tempContract" - }, - "id": 429, - "name": "Identifier", - "src": "4193:12:1" - } - ], - "id": 430, - "name": "MemberAccess", - "src": "4193:19:1" - } - ], - "id": 431, - "name": "Assignment", - "src": "4184:28:1" - } + "visibility": "internal" + } ], - "id": 432, - "name": "ExpressionStatement", - "src": "4184:28:1" - } - ], - "id": 433, - "name": "Block", - "src": "4170:53:1" - } - ], - "id": 434, - "name": "IfStatement", - "src": "4009:214:1" - } - ], - "id": 435, - "name": "Block", - "src": "3940:289:1" - } - ], - "id": 436, - "name": "FunctionDefinition", - "src": "3866:363:1" - }, - { - "attributes": { - "functionSelector": "6c8244b8", - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [ - null - ], - "name": "contractExists", - "scope": 462, - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - "children": [ - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "id", - "scope": 461, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 437, - "name": "ElementaryTypeName", - "src": "4259:7:1" - } - ], - "id": 438, - "name": "VariableDeclaration", - "src": "4259:10:1" - } - ], - "id": 439, - "name": "ParameterList", - "src": "4258:12:1" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "result", - "scope": 461, - "stateVariable": false, - "storageLocation": "default", - "type": "bool", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bool", - "type": "bool" - }, - "id": 440, - "name": "ElementaryTypeName", - "src": "4292:4:1" - } - ], - "id": 441, - "name": "VariableDeclaration", - "src": "4292:11:1" - } - ], - "id": 442, - "name": "ParameterList", - "src": "4291:13:1" - }, - { - "children": [ - { - "attributes": { - "assignments": [ - 444 - ] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "tempContract", - "scope": 460, - "stateVariable": false, - "storageLocation": "memory", - "type": "struct HashTimeLock.LockContract", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "LockContract", - "referencedDeclaration": 95, - "type": "struct HashTimeLock.LockContract" - }, - "id": 443, - "name": "UserDefinedTypeName", - "src": "4315:12:1" - } - ], - "id": 444, - "name": "VariableDeclaration", - "src": "4315:32:1" - }, - { - "attributes": { - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "struct HashTimeLock.LockContract storage ref" - }, - "children": [ - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 61, - "type": "mapping(bytes32 => struct HashTimeLock.LockContract storage ref)", - "value": "contracts" - }, - "id": 445, - "name": "Identifier", - "src": "4350:9:1" - }, - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 438, - "type": "bytes32", - "value": "id" - }, - "id": 446, - "name": "Identifier", - "src": "4360:2:1" - } - ], - "id": 447, - "name": "IndexAccess", - "src": "4350:13:1" - } - ], - "id": 448, - "name": "VariableDeclarationStatement", - "src": "4315:48:1" - }, - { - "children": [ - { - "attributes": { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "==", - "type": "bool" + "src": "3910:13:0" }, - "children": [ - { - "attributes": { - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "member_name": "status", - "referencedDeclaration": 84, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 444, - "type": "struct HashTimeLock.LockContract memory", - "value": "tempContract" - }, - "id": 449, - "name": "Identifier", - "src": "4378:12:1" - } - ], - "id": 450, - "name": "MemberAccess", - "src": "4378:19:1" - }, - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 64, - "type": "uint256", - "value": "INVALID" - }, - "id": 451, - "name": "Identifier", - "src": "4401:7:1" - } - ], - "id": 452, - "name": "BinaryOperation", - "src": "4378:30:1" - }, - { - "children": [ - { - "attributes": { - "functionReturnParameters": 442 - }, - "children": [ - { - "attributes": { - "hexvalue": "66616c7365", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "token": "bool", - "type": "bool", - "value": "false" - }, - "id": 453, - "name": "Literal", - "src": "4431:5:1" - } - ], - "id": 454, - "name": "Return", - "src": "4424:12:1" - } - ], - "id": 455, - "name": "Block", - "src": "4410:37:1" - }, - { - "children": [ - { - "attributes": { - "functionReturnParameters": 442 - }, - "children": [ - { - "attributes": { - "hexvalue": "74727565", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "token": "bool", - "type": "bool", - "value": "true" - }, - "id": 456, - "name": "Literal", - "src": "4474:4:1" - } - ], - "id": 457, - "name": "Return", - "src": "4467:11:1" - } - ], - "id": 458, - "name": "Block", - "src": "4453:36:1" - } - ], - "id": 459, - "name": "IfStatement", - "src": "4374:115:1" - } + "scope": 414, + "src": "3854:257:0", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + } ], - "id": 460, - "name": "Block", - "src": "4305:190:1" - } - ], - "id": 461, - "name": "FunctionDefinition", - "src": "4235:260:1" - } + "scope": 415, + "src": "25:4088:0", + "usedErrors": [] + } ], - "id": 462, - "name": "ContractDefinition", - "src": "59:4438:1" - } - ], - "id": 463, - "name": "SourceUnit", - "src": "0:4498:1" - }, - "compiler": { - "name": "solc", - "version": "0.7.3+commit.9bfce1f6.Emscripten.clang" - }, - "networks": {}, - "schemaVersion": "3.3.3", - "updatedAt": "2021-05-28T07:20:06.056Z", - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - } + "src": "0:4114:0" + }, + "functionHashes": { + "contractExists(bytes32)": "6c8244b8", + "contracts(bytes32)": "ec56a373", + "getSingleStatus(bytes32)": "fbdf3b43", + "getStatus(bytes32[])": "2f21a663", + "newContract(uint256,uint256,bytes32,address,string,string)": "d3632095", + "refund(bytes32)": "7249fbb6", + "withdraw(bytes32,bytes32)": "63615149" + }, + "gasEstimates": { + "creation": { + "codeDepositCost": "943400", + "executionCost": "981", + "totalCost": "944381" + }, + "external": { + "contractExists(bytes32)": "infinite", + "contracts(bytes32)": "infinite", + "getSingleStatus(bytes32)": "infinite", + "getStatus(bytes32[])": "infinite", + "newContract(uint256,uint256,bytes32,address,string,string)": "infinite", + "refund(bytes32)": "infinite", + "withdraw(bytes32,bytes32)": "infinite" + } + } } \ No newline at end of file diff --git a/packages/cactus-plugin-htlc-eth-besu/src/main/solidity/contracts/HashTimeLock.sol b/packages/cactus-plugin-htlc-eth-besu/src/main/solidity/contracts/HashTimeLock.sol index 33287ce7e1..0f5696259b 100644 --- a/packages/cactus-plugin-htlc-eth-besu/src/main/solidity/contracts/HashTimeLock.sol +++ b/packages/cactus-plugin-htlc-eth-besu/src/main/solidity/contracts/HashTimeLock.sol @@ -1,19 +1,17 @@ -pragma solidity ^0.7.3; -pragma experimental ABIEncoderV2; +pragma solidity 0.8.19; contract HashTimeLock { - mapping(bytes32 => LockContract) public contracts; // / - WITHDRAWN // INVALID - ACTIVE | // \ - EXPIRED - REFUNDED - uint256 public constant INVALID = 0; // Uninitialized swap -> can go to ACTIVE - uint256 public constant ACTIVE = 1; // Active swap -> can go to WITHDRAWN or EXPIRED - uint256 public constant REFUNDED = 2; // Swap is refunded -> final state. - uint256 public constant WITHDRAWN = 3; // Swap is withdrawn -> final state. - uint256 public constant EXPIRED = 4; // Swap is expired -> can go to REFUNDED + uint256 constant INIT = 0; // Uninitialized swap -> can go to ACTIVE + uint256 constant ACTIVE = 1; // Active swap -> can go to WITHDRAWN or EXPIRED + uint256 constant REFUNDED = 2; // Swap is refunded -> final state. + uint256 constant WITHDRAWN = 3; // Swap is withdrawn -> final state. + uint256 constant EXPIRED = 4; // Swap is expired -> can go to REFUNDED struct LockContract { uint256 inputAmount; @@ -28,19 +26,10 @@ contract HashTimeLock { } event Withdraw( - bytes32 indexed id, - bytes32 secret, - bytes32 hashLock, - address indexed sender, - address indexed receiver + bytes32 indexed id, bytes32 secret, bytes32 hashLock, address indexed sender, address indexed receiver ); - event Refund( - bytes32 indexed id, - bytes32 hashLock, - address indexed sender, - address indexed receiver - ); + event Refund(bytes32 indexed id, bytes32 hashLock, address indexed sender, address indexed receiver); event NewContract( uint256 inputAmount, @@ -62,41 +51,23 @@ contract HashTimeLock { string calldata outputNetwork, string calldata outputAddress ) external payable { - address payable sender = msg.sender; + address payable sender = payable(msg.sender); uint256 inputAmount = msg.value; - require(expiration > block.timestamp, 'INVALID_TIME'); + require(expiration > block.timestamp, "INVALID_TIME"); - require(inputAmount > 0, 'INVALID_AMOUNT'); + require(inputAmount > 0, "INVALID_AMOUNT"); - bytes32 id = sha256( - abi.encodePacked(sender, receiver, inputAmount, hashLock, expiration) - ); + bytes32 id = sha256(abi.encodePacked(sender, receiver, inputAmount, hashLock, expiration)); - require(contracts[id].status == INVALID, "SWAP_EXISTS"); + require(contracts[id].status == INIT, "SWAP_EXISTS"); contracts[id] = LockContract( - inputAmount, - outputAmount, - expiration, - ACTIVE, - hashLock, - sender, - receiver, - outputNetwork, - outputAddress + inputAmount, outputAmount, expiration, ACTIVE, hashLock, sender, receiver, outputNetwork, outputAddress ); emit NewContract( - inputAmount, - outputAmount, - expiration, - id, - hashLock, - sender, - receiver, - outputNetwork, - outputAddress + inputAmount, outputAmount, expiration, id, hashLock, sender, receiver, outputNetwork, outputAddress ); } @@ -107,7 +78,7 @@ contract HashTimeLock { require(c.expiration > block.timestamp, "INVALID_TIME"); - require(c.hashLock == sha256(abi.encodePacked(secret)),"INVALID_SECRET"); + require(c.hashLock == keccak256(abi.encodePacked(secret)), "INVALID_SECRET"); c.status = WITHDRAWN; @@ -143,10 +114,7 @@ contract HashTimeLock { function getSingleStatus(bytes32 id) public view returns (uint256 result) { LockContract memory tempContract = contracts[id]; - if ( - tempContract.status == ACTIVE && - tempContract.expiration < block.timestamp - ) { + if (tempContract.status == ACTIVE && tempContract.expiration < block.timestamp) { result = EXPIRED; } else { result = tempContract.status; @@ -156,7 +124,7 @@ contract HashTimeLock { function contractExists(bytes32 id) public view returns (bool result) { LockContract memory tempContract = contracts[id]; - if (tempContract.status == INVALID) { + if (tempContract.status == INIT) { return false; } else { return true; diff --git a/packages/cactus-plugin-htlc-eth-besu/src/main/solidity/contracts/PrivateHashTimeLock.sol b/packages/cactus-plugin-htlc-eth-besu/src/main/solidity/contracts/PrivateHashTimeLock.sol new file mode 100644 index 0000000000..f546919c37 --- /dev/null +++ b/packages/cactus-plugin-htlc-eth-besu/src/main/solidity/contracts/PrivateHashTimeLock.sol @@ -0,0 +1,176 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.19; + +contract PrivateHashTimeLock { + mapping(bytes32 => LockContract) private contracts; + + // / - WITHDRAWN + // INVALID - ACTIVE | + // \ - EXPIRED - REFUNDED + + uint256 private constant INIT = 0; // INIT swap -> can go to ACTIVE + uint256 private constant ACTIVE = 1; // Active swap -> can go to WITHDRAWN or EXPIRED + uint256 private constant REFUNDED = 2; // Swap is refunded -> final state. + uint256 private constant WITHDRAWN = 3; // Swap is withdrawn -> final state. + uint256 private constant EXPIRED = 4; // Swap is expired -> can go to REFUNDED + + struct PrivateEnhancing { + // should be large + uint256 generator; + // should be large + uint256 modulus; + } + + struct SwapDetails { + address payable sender; + address payable receiver; + uint256 inputAmount; + bytes32 hashSecret; + uint256 expiration; + } + + struct LockContract { + uint256 inputAmount; + uint256 outputAmount; + uint256 expiration; + uint256 status; + bytes32 hashSecret; + address payable sender; + address payable receiver; + string outputNetwork; + string outputAddress; + PrivateEnhancing priv; + } + + event Withdraw( + bytes32 indexed id, bytes32 secret, bytes32 hashSecret, address indexed sender, address indexed receiver + ); + + event Refund(bytes32 indexed id, bytes32 hashSecret, address indexed sender, address indexed receiver); + + event NewContract( + uint256 inputAmount, + uint256 outputAmount, + uint256 expiration, + bytes32 indexed id, + bytes32 hashSecret, + address indexed sender, + address indexed receiver, + string outputNetwork, + string outputAddress, + PrivateEnhancing priv + ); + + function newPrivateContract( + uint256 outputAmount, + uint256 expiration, + bytes32 hashLock, + address payable receiver, + string memory outputNetwork, + string memory outputAddress, + PrivateEnhancing memory priv + ) external payable { + address payable sender = payable(msg.sender); + uint256 inputAmount = msg.value; + + require(expiration > block.timestamp, "INVALID_TIME"); + + require(inputAmount > 0, "INVALID_AMOUNT"); + + bytes32 id = keccak256(abi.encodePacked(sender, receiver, inputAmount, hashLock, expiration)); + + require(contracts[id].status == INIT, "SWAP_EXISTS"); + require(priv.generator > 0); + require(priv.modulus > 0); + + contracts[id] = LockContract( + inputAmount, + outputAmount, + expiration, + ACTIVE, + hashLock, + sender, + receiver, + outputNetwork, + outputAddress, + priv + ); + + emit NewContract( + inputAmount, outputAmount, expiration, id, hashLock, sender, receiver, outputNetwork, outputAddress, priv + ); + } + + function withdraw(bytes32 id, bytes32 secret) external { + LockContract storage c = contracts[id]; + require(c.status == ACTIVE, "SWAP_NOT_ACTIVE"); + + require(c.expiration > block.timestamp, "INVALID_TIME"); + + require( + c.hashSecret == calculateHashSecret(c.priv.generator, uint256(secret), c.priv.modulus), "INVALID_SECRET" + ); + + c.status = WITHDRAWN; + + c.receiver.transfer(c.inputAmount); + + emit Withdraw(id, secret, c.hashSecret, c.sender, c.receiver); + } + + function calculateHashSecret(uint256 base, uint256 exponent, uint256 modulus) + internal + pure + returns (bytes32 result) + { + require(modulus > 0, "Modulus cannot be 0"); + require(base > 0, "base cannot be 0"); + require(exponent > 0, "exponent_1 cannot be 0"); + + return bytes32((base ** exponent) % modulus); + } + + function refund(bytes32 id) external { + LockContract storage c = contracts[id]; + + require(c.status == ACTIVE, "SWAP_NOT_ACTIVE"); + + require(c.expiration <= block.timestamp, "INVALID_TIME"); + + c.status = REFUNDED; + + c.sender.transfer(c.inputAmount); + + emit Refund(id, c.hashSecret, c.sender, c.receiver); + } + + function getStatus(bytes32[] memory ids) public view returns (uint256[] memory) { + uint256[] memory result = new uint256[](ids.length); + + for (uint256 index = 0; index < ids.length; index++) { + result[index] = getSingleStatus(ids[index]); + } + + return result; + } + + function getSingleStatus(bytes32 id) public view returns (uint256 result) { + LockContract memory tempContract = contracts[id]; + + if (tempContract.status == ACTIVE && tempContract.expiration < block.timestamp) { + result = EXPIRED; + } else { + result = tempContract.status; + } + } + + function contractExists(bytes32 id) public view returns (bool result) { + LockContract memory tempContract = contracts[id]; + + if (tempContract.status == INIT) { + return false; + } else { + return true; + } + } +} diff --git a/packages/cactus-plugin-htlc-eth-besu/src/main/typescript/plugin-htlc-eth-besu.ts b/packages/cactus-plugin-htlc-eth-besu/src/main/typescript/plugin-htlc-eth-besu.ts index ed56be7418..c83da099d4 100644 --- a/packages/cactus-plugin-htlc-eth-besu/src/main/typescript/plugin-htlc-eth-besu.ts +++ b/packages/cactus-plugin-htlc-eth-besu/src/main/typescript/plugin-htlc-eth-besu.ts @@ -24,6 +24,8 @@ import { } from "@hyperledger/cactus-plugin-ledger-connector-besu"; import HashTimeLockJSON from "../solidity/contracts/HashTimeLock.json"; +const contractName = HashTimeLockJSON.ast.nodes[1].canonicalName || "htlc"; + import { PluginRegistry } from "@hyperledger/cactus-core"; import { RefundReq, @@ -148,7 +150,7 @@ export class PluginHtlcEthBesu implements ICactusPlugin, IPluginWebService { ) as PluginLedgerConnectorBesu; const hashedTimeLockResponse = await connector.deployContract({ - contractName: HashTimeLockJSON.contractName, + contractName: contractName, contractAbi: HashTimeLockJSON.abi, bytecode: HashTimeLockJSON.bytecode, web3SigningCredential: initializeRequest.web3SigningCredential, @@ -176,7 +178,7 @@ export class PluginHtlcEthBesu implements ICactusPlugin, IPluginWebService { ) as PluginLedgerConnectorBesu; const result = await connector.invokeContract({ - contractName: HashTimeLockJSON.contractName, + contractName: contractName, keychainId: newContractRequest.keychainId, signingCredential: newContractRequest.web3SigningCredential, contractAddress: newContractRequest.contractAddress, @@ -197,7 +199,7 @@ export class PluginHtlcEthBesu implements ICactusPlugin, IPluginWebService { ) as PluginLedgerConnectorBesu; const result = await connector.invokeContract({ - contractName: HashTimeLockJSON.contractName, + contractName: contractName, signingCredential: req.web3SigningCredential, invocationType: EthContractInvocationType.Call, methodName: "getSingleStatus", @@ -215,7 +217,7 @@ export class PluginHtlcEthBesu implements ICactusPlugin, IPluginWebService { ) as PluginLedgerConnectorBesu; const result = await connector.invokeContract({ - contractName: HashTimeLockJSON.contractName, + contractName: contractName, signingCredential: req.web3SigningCredential, invocationType: EthContractInvocationType.Call, methodName: "getStatus", @@ -233,7 +235,7 @@ export class PluginHtlcEthBesu implements ICactusPlugin, IPluginWebService { ) as PluginLedgerConnectorBesu; const result = await connector.invokeContract({ - contractName: HashTimeLockJSON.contractName, + contractName: contractName, keychainId: refundRequest.keychainId, signingCredential: refundRequest.web3SigningCredential, invocationType: EthContractInvocationType.Send, @@ -252,7 +254,7 @@ export class PluginHtlcEthBesu implements ICactusPlugin, IPluginWebService { ) as PluginLedgerConnectorBesu; const params = [withdrawRequest.id, withdrawRequest.secret]; const result = await connector.invokeContract({ - contractName: HashTimeLockJSON.contractName, + contractName: contractName, keychainId: withdrawRequest.keychainId, signingCredential: withdrawRequest.web3SigningCredential, invocationType: EthContractInvocationType.Send, diff --git a/packages/cactus-plugin-htlc-eth-besu/src/main/typescript/private-htlc-helper.ts b/packages/cactus-plugin-htlc-eth-besu/src/main/typescript/private-htlc-helper.ts new file mode 100644 index 0000000000..5cedf6f762 --- /dev/null +++ b/packages/cactus-plugin-htlc-eth-besu/src/main/typescript/private-htlc-helper.ts @@ -0,0 +1,102 @@ +import * as ethers from "ethers"; +import BN from "bn.js"; +import * as dotenv from "dotenv"; +import path from "path"; + +const envPath = path.join(__dirname, "../../../.env"); +dotenv.config({ path: envPath }); +const providerURL = process.env.RPC; + +const main = async () => { + try { + if (!providerURL) { + throw new Error("no provider"); + } + + console.log("====== NON PRIVACY PRESERVING HTLC ======="); + const secret = "my_secret"; + const hashPair = newSecretHashPair(secret); + + const HASH_MY_SECRET_NOT_PRIVATE = hashPair.secretHash; + const BYTES32_SECRET_NOT_PRIVATE = hashPair.secretBytes; + const BYTES32_SECRET_NOT_PRIVATE_ENCODED = ethers.decodeBytes32String( + BYTES32_SECRET_NOT_PRIVATE, + ); + + console.log(`HASH_MY_SECRET_NOT_PRIVATE: ${HASH_MY_SECRET_NOT_PRIVATE}`); + console.log(`BYTES32_SECRET_NOT_PRIVATE: ${BYTES32_SECRET_NOT_PRIVATE}`); + console.log( + `BYTES32_SECRET_NOT_PRIVATE_ENCODED: ${BYTES32_SECRET_NOT_PRIVATE_ENCODED}`, + ); + + const timelockA = getEpochTimeWithHours(2); + console.log(`timelockA ${timelockA}`); + + const timelockB = getEpochTimeWithHours(1); + console.log(`timelockB ${timelockB}`); + + console.log("====== PRIVACY PRESERVING HTLC ======="); + const GENERATOR = new BN(11); + const MODULUS = new BN(109); + const SECRET_ALICE = new BN(3); + const BOB_INPUT_TO_Z = new BN(50); + + const exponentiationAliceHashLock = modExp( + GENERATOR, + MODULUS, + SECRET_ALICE, + ); + const HASH_SECRET_ALICE = toBytes32(exponentiationAliceHashLock); + console.log(`Ya: ${HASH_SECRET_ALICE}`); + console.log(`sa: ${toBytes32(SECRET_ALICE)}`); + + const Z = modExp(GENERATOR, MODULUS, SECRET_ALICE.mul(BOB_INPUT_TO_Z)); + const BYTES_32_Z = toBytes32(Z); + console.log(`Z: ${BYTES_32_Z}`); + + const YB = exponentiationAliceHashLock + .mul(modExp(GENERATOR, MODULUS, new BN(Z.toNumber()))) + .mod(MODULUS); + console.log(`Yb: ${YB}`); + console.log(`Yb: ${toBytes32(YB)}`); + + const sb = SECRET_ALICE.add(Z); + console.log(`sb: ${sb}`); + console.log(`sb: ${toBytes32(sb)}`); + } catch (error) { + console.log("There has been an error ", error); + throw new Error(); + } +}; + +main().catch((error) => { + console.log("Caught promise rejection (validation failed). Errors: ", error); + throw new Error(); +}); + +function modExp(base: BN, modulus: BN, exponent: BN): BN { + const result = base.toRed(BN.red(modulus)).redPow(exponent); + console.log(`Exponentiation is: ${result}`); + return result; +} + +function toBytes32(value: BN): string { + const hex = ethers.toBeHex(value.toString()); + return ethers.zeroPadValue(hex, 32); +} + +function getEpochTimeWithHours(hoursToAdd = 0) { + const now = new Date(); + now.setHours(now.getHours() + hoursToAdd); + + return Math.floor(now.getTime() / 1000); +} + +function newSecretHashPair(secret: string) { + const secretBytes = ethers.encodeBytes32String(secret); + const secretHash = ethers.keccak256(secretBytes); + return { + secretBytes: secretBytes, + secretHash: secretHash, + }; +} diff --git a/packages/cactus-plugin-htlc-eth-besu/src/test/solidity/integration/PrivateHashTimeLock.t.sol b/packages/cactus-plugin-htlc-eth-besu/src/test/solidity/integration/PrivateHashTimeLock.t.sol new file mode 100644 index 0000000000..7b7a003f88 --- /dev/null +++ b/packages/cactus-plugin-htlc-eth-besu/src/test/solidity/integration/PrivateHashTimeLock.t.sol @@ -0,0 +1,164 @@ +pragma solidity 0.8.19; + +import {PrivateHashTimeLock} from "../../../main/solidity/contracts/PrivateHashTimeLock.sol"; +import "forge-std/Test.sol"; +import "forge-std/console2.sol"; + +contract PrivateHashTimeLockTest is Test { + event newPrivateContract( + uint256 inputAmount, + uint256 outputAmount, + uint256 expiration, + bytes32 indexed id, + bytes32 hashSecret, + address indexed sender, + address indexed receiver, + string outputNetwork, + string outputAddress, + PrivateHashTimeLock.PrivateEnhancing priv + ); + + bytes32 AliceSecret; + bytes32 HashedAliceSecret; + bytes32 Z; + + function setUp() public { + AliceSecret = bytes32(0x0000000000000000000000000000000000000000000000000000000000000003); + HashedAliceSecret = bytes32(0x0000000000000000000000000000000000000000000000000000000000000017); + Z = bytes32(0x000000000000000000000000000000000000000000000000000000000000001a); + } + + function test_Deployment() public { + new PrivateHashTimeLock(); + } + + function test_initializeHTLC() public { + // 5 eth + uint256 inputAmountEth = 5; + uint256 outputAmount = 5000000000000000000; + // 1/1/2030 + uint256 expiration = 1893515539; + bytes32 hashLock = (0x0000000000000000000000000000000000000000000000000000000000000017); + // account # 1 of anvil -a 10 + address payable receiver = payable(0x70997970C51812dc3A010C7d01b50e0d17dc79C8); + string memory outputNetwork = "anvil"; + string memory outputAddress = vm.toString(msg.sender); + PrivateHashTimeLock.PrivateEnhancing memory priv = + PrivateHashTimeLock.PrivateEnhancing({generator: 11, modulus: 109}); + + PrivateHashTimeLock HtlcManager = new PrivateHashTimeLock(); + console.log("Deployed HTLC: ", address(HtlcManager)); + + vm.expectCall( + address(HtlcManager), + 5, + abi.encodeWithSelector( + HtlcManager.newPrivateContract.selector, + outputAmount, + expiration, + hashLock, + receiver, + outputNetwork, + outputAddress, + priv + ), + 1 + ); + //vm.expectEmit(true, true, false, true, address(HtlcManager)); + vm.recordLogs(); + + HtlcManager.newPrivateContract{value: inputAmountEth}( + outputAmount, expiration, hashLock, receiver, outputNetwork, outputAddress, priv + ); + + Vm.Log[] memory entries = vm.getRecordedLogs(); + + // get contract id from event + assertEq(entries.length, 1); + bytes32 id = entries[0].topics[1]; + + bool exists = HtlcManager.contractExists(id); + assert(exists); + + // state is active + assert(HtlcManager.getSingleStatus(id) == 1); + } + + function test_process_secret() public { + // 5 eth + uint256 inputAmountEth = 5; + uint256 outputAmount = 5000000000000000000; + // 1/1/2030 + uint256 expiration = 1893515539; + bytes32 hashLock = (0x0000000000000000000000000000000000000000000000000000000000000017); + // account # 1 of anvil -a 10 + address payable receiver = payable(0x70997970C51812dc3A010C7d01b50e0d17dc79C8); + string memory outputNetwork = "anvil"; + string memory outputAddress = vm.toString(msg.sender); + PrivateHashTimeLock.PrivateEnhancing memory priv = + PrivateHashTimeLock.PrivateEnhancing({generator: 11, modulus: 109}); + + PrivateHashTimeLock HtlcManager = new PrivateHashTimeLock(); + vm.expectCall( + address(HtlcManager), + 5, + abi.encodeWithSelector( + HtlcManager.newPrivateContract.selector, + outputAmount, + expiration, + hashLock, + receiver, + outputNetwork, + outputAddress, + priv + ), + 1 + ); + vm.recordLogs(); + + HtlcManager.newPrivateContract{value: inputAmountEth}( + outputAmount, expiration, hashLock, receiver, outputNetwork, outputAddress, priv + ); + + Vm.Log[] memory entries = vm.getRecordedLogs(); + + // get contract id from event + assertEq(entries.length, 1); + bytes32 id = entries[0].topics[1]; + + // secret is 3 decimal, hashes to 0x17 + bytes32 secret = 0x0000000000000000000000000000000000000000000000000000000000000003; + + emit log_bytes32(secret); + emit log_uint(uint256(secret)); + HtlcManager.withdraw(id, secret); + } + + function test_mod_exp() public { + uint256 base = 11; + uint256 exponent = 3; + uint256 modulus = 109; + uint256 result = calculateHashSecret(base, exponent, modulus); + emit log_uint(result); + assert(result == 23); + + bytes32 modulus_bytes = bytes32(modulus); + bytes32 base_bytes = bytes32(base); + bytes32 exponent_bytes = bytes32(exponent); + uint256 result2 = calculateHashSecret(uint256(base_bytes), uint256(exponent_bytes), uint256(modulus_bytes)); + emit log_uint(result2); + assert(result2 == 23); + } + + function calculateHashSecret(uint256 base, uint256 exponent, uint256 modulus) + internal + view + returns (uint256 result) + { + require(modulus > 0, "Modulus cannot be 0"); + require(base > 0, "base cannot be 0"); + require(exponent > 0, "exponent_1 cannot be 0"); + + return (base ** exponent) % modulus; + } +} diff --git a/packages/cactus-plugin-htlc-eth-besu/tsconfig.json b/packages/cactus-plugin-htlc-eth-besu/tsconfig.json index a053502a11..1eb1cd8efc 100644 --- a/packages/cactus-plugin-htlc-eth-besu/tsconfig.json +++ b/packages/cactus-plugin-htlc-eth-besu/tsconfig.json @@ -12,6 +12,7 @@ "./src", "src/**/*.json" ], + "exclude": ["./vendor"], "references": [ { "path": "../cactus-common/tsconfig.json" diff --git a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/openapi/openapi-validation.test.ts b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/openapi/openapi-validation.test.ts index 969c635b14..e0bcb228fa 100644 --- a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/openapi/openapi-validation.test.ts +++ b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/openapi/openapi-validation.test.ts @@ -45,6 +45,11 @@ import { PluginHtlcEthBesu } from "@hyperledger/cactus-plugin-htlc-eth-besu"; const connectorId = uuidv4(); const logLevel: LogLevelDesc = "INFO"; +const FORTY_TWO_AS_HEX_STRING = + "0x0000000000000000000000000000000000000000000000000000000000003432"; +const FORTY_TWO_KECCAK_256 = + "0xf0095bab87a78fd2afa113b903c90a72ba1fd22c44f55b66cf409390814dfb69"; + const testCase = "Test cactus-plugin-htlc-eth-besu openapi validation"; test("BEFORE " + testCase, async (t: Test) => { @@ -201,14 +206,14 @@ test(testCase, async (t: Test) => { }; try { - await api.initializeV1((parameters as any) as InitializeRequest); + await api.initializeV1((parameters as unknown) as InitializeRequest); } catch (e) { t2.equal( e.response.status, 400, `Endpoint ${fInitialize} without required connectorId: response.status === 400 OK`, ); - const fields = e.response.data.map((param: any) => + const fields = e.response.data.map((param: { path: string }) => param.path.replace(".body.", ""), ); t2.ok( @@ -231,14 +236,14 @@ test(testCase, async (t: Test) => { }; try { - await api.initializeV1((parameters as any) as InitializeRequest); + await api.initializeV1((parameters as unknown) as InitializeRequest); } catch (e) { t2.equal( e.response.status, 400, `Endpoint ${fInitialize} with fake=4: response.status === 400 OK`, ); - const fields = e.response.data.map((param: any) => + const fields = e.response.data.map((param: { path: string }) => param.path.replace(".body.", ""), ); t2.ok( @@ -278,7 +283,7 @@ test(testCase, async (t: Test) => { inputAmount: 10, outputAmount: 0x04, expiration: timestamp, - hashLock: DataTest.hashLock, + hashLock: FORTY_TWO_KECCAK_256, receiver: DataTest.receiver, outputNetwork: "BTC", outputAddress: "1AcVYm7M3kkJQH28FXAvyBFQzFRL6xPKu8", @@ -310,14 +315,14 @@ test(testCase, async (t: Test) => { gas: DataTest.estimated_gas, }; try { - await api.newContractV1((parameters as any) as NewContractObj); + await api.newContractV1((parameters as unknown) as NewContractObj); } catch (e) { t2.equal( e.response.status, 400, `Endpoint ${fNew} without required contractAddress: response.status === 400 OK`, ); - const fields = e.response.data.map((param: any) => + const fields = e.response.data.map((param: { path: string }) => param.path.replace(".body.", ""), ); t2.ok( @@ -335,7 +340,7 @@ test(testCase, async (t: Test) => { inputAmount: 10, outputAmount: 0x04, expiration: timestamp, - hashLock: DataTest.hashLock, + hashLock: FORTY_TWO_KECCAK_256, receiver: DataTest.receiver, outputNetwork: "BTC", outputAddress: "1AcVYm7M3kkJQH28FXAvyBFQzFRL6xPKu8", @@ -346,14 +351,14 @@ test(testCase, async (t: Test) => { fake: 4, }; try { - await api.newContractV1((parameters as any) as NewContractObj); + await api.newContractV1((parameters as unknown) as NewContractObj); } catch (e) { t2.equal( e.response.status, 400, `Endpoint ${fNew} with fake=4: response.status === 400 OK`, ); - const fields = e.response.data.map((param: any) => + const fields = e.response.data.map((param: { path: string }) => param.path.replace(".body.", ""), ); t2.ok( @@ -376,7 +381,7 @@ test(testCase, async (t: Test) => { firstHighNetWorthAccount, DataTest.receiver, 10, - DataTest.hashLock, + FORTY_TWO_KECCAK_256, timestamp, ], }); @@ -409,14 +414,14 @@ test(testCase, async (t: Test) => { keychainId, }; try { - await api.refundV1((parameters as any) as RefundReq); + await api.refundV1((parameters as unknown) as RefundReq); } catch (e) { t2.equal( e.response.status, 400, `Endpoint ${fRefund} without required id: response.status === 400 OK`, ); - const fields = e.response.data.map((param: any) => + const fields = e.response.data.map((param: { path: string }) => param.path.replace(".body.", ""), ); t2.ok(fields.includes("id"), "Rejected because id is required"); @@ -434,14 +439,14 @@ test(testCase, async (t: Test) => { fake: 4, }; try { - await api.refundV1((parameters as any) as RefundReq); + await api.refundV1((parameters as unknown) as RefundReq); } catch (e) { t2.equal( e.response.status, 400, `Endpoint ${fRefund} with fake=4: response.status === 400 OK`, ); - const fields = e.response.data.map((param: any) => + const fields = e.response.data.map((param: { path: string }) => param.path.replace(".body.", ""), ); t2.ok( @@ -459,7 +464,7 @@ test(testCase, async (t: Test) => { inputAmount: 10, outputAmount: 0x04, expiration: DataTest.expiration, - hashLock: DataTest.hashLock, + hashLock: FORTY_TWO_KECCAK_256, receiver: DataTest.receiver, outputNetwork: "BTC", outputAddress: "1AcVYm7M3kkJQH28FXAvyBFQzFRL6xPKu8", @@ -480,15 +485,14 @@ test(testCase, async (t: Test) => { firstHighNetWorthAccount, DataTest.receiver, 10, - DataTest.hashLock, + FORTY_TWO_KECCAK_256, DataTest.expiration, ], }); const parameters = { id: callOutput, - secret: - "0x3853485acd2bfc3c632026ee365279743af107a30492e3ceaa7aefc30c2a048a", + secret: FORTY_TWO_AS_HEX_STRING, web3SigningCredential, connectorId, keychainId, @@ -515,14 +519,14 @@ test(testCase, async (t: Test) => { }; try { - await api.withdrawV1((parameters as any) as WithdrawReq); + await api.withdrawV1((parameters as unknown) as WithdrawReq); } catch (e) { t2.equal( e.response.status, 400, `Endpoint ${fWithdraw} without required id: response.status === 400 OK`, ); - const fields = e.response.data.map((param: any) => + const fields = e.response.data.map((param: { path: string }) => param.path.replace(".body.", ""), ); t2.ok(fields.includes("id"), "Rejected because id is required"); @@ -543,14 +547,14 @@ test(testCase, async (t: Test) => { }; try { - await api.withdrawV1((parameters as any) as WithdrawReq); + await api.withdrawV1((parameters as unknown) as WithdrawReq); } catch (e) { t2.equal( e.response.status, 400, `Endpoint ${fWithdraw} with fake=4: response.status === 400 OK`, ); - const fields = e.response.data.map((param: any) => + const fields = e.response.data.map((param: { path: string }) => param.path.replace(".body.", ""), ); t2.ok( @@ -632,14 +636,14 @@ test(testCase, async (t: Test) => { }; try { - await api.getStatusV1((parameters as any) as GetStatusRequest); + await api.getStatusV1((parameters as unknown) as GetStatusRequest); } catch (e) { t2.equal( e.response.status, 400, `Endpoint ${fStatus} without required ids: response.status === 400 OK`, ); - const fields = e.response.data.map((param: any) => + const fields = e.response.data.map((param: { path: string }) => param.path.replace(".body.", ""), ); t2.ok(fields.includes("ids"), "Rejected because ids is required"); @@ -658,14 +662,14 @@ test(testCase, async (t: Test) => { }; try { - await api.getStatusV1((parameters as any) as GetStatusRequest); + await api.getStatusV1((parameters as unknown) as GetStatusRequest); } catch (e) { t2.equal( e.response.status, 400, `Endpoint ${fStatus} with fake=4: response.status === 400 OK`, ); - const fields = e.response.data.map((param: any) => + const fields = e.response.data.map((param: { path: string }) => param.path.replace(".body.", ""), ); t2.ok( @@ -746,7 +750,7 @@ test(testCase, async (t: Test) => { try { await api.getSingleStatusV1( - (parameters as any) as GetSingleStatusRequest, + (parameters as unknown) as GetSingleStatusRequest, ); } catch (e) { t2.equal( @@ -754,7 +758,7 @@ test(testCase, async (t: Test) => { 400, `Endpoint ${fSingleStatus} without required id: response.status === 400 OK`, ); - const fields = e.response.data.map((param: any) => + const fields = e.response.data.map((param: { path: string }) => param.path.replace(".body.", ""), ); t2.ok(fields.includes("id"), "Rejected because id is required"); @@ -774,7 +778,7 @@ test(testCase, async (t: Test) => { try { await api.getSingleStatusV1( - (parameters as any) as GetSingleStatusRequest, + (parameters as unknown) as GetSingleStatusRequest, ); } catch (e) { t2.equal( @@ -782,7 +786,7 @@ test(testCase, async (t: Test) => { 400, `Endpoint ${fSingleStatus} with fake=4: response.status === 400 OK`, ); - const fields = e.response.data.map((param: any) => + const fields = e.response.data.map((param: { path: string }) => param.path.replace(".body.", ""), ); t2.ok( diff --git a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/withdraw-endpoint.test.ts b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/withdraw-endpoint.test.ts index c73675c7b9..c8a825f125 100644 --- a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/withdraw-endpoint.test.ts +++ b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/withdraw-endpoint.test.ts @@ -40,6 +40,11 @@ import HashTimeLockJSON from "../../../../../../cactus-plugin-htlc-eth-besu/src/ const connectorId = uuidv4(); const logLevel: LogLevelDesc = "INFO"; +const FORTY_TWO_AS_HEX_STRING = + "0x0000000000000000000000000000000000000000000000000000000000003432"; +const FORTY_TWO_KECCAK_256 = + "0xf0095bab87a78fd2afa113b903c90a72ba1fd22c44f55b66cf409390814dfb69"; + const testCase = "Test withdraw"; describe(testCase, () => { @@ -172,7 +177,7 @@ describe(testCase, () => { inputAmount: 10, outputAmount: 0x04, expiration: DataTest.expiration, - hashLock: DataTest.hashLock, + hashLock: FORTY_TWO_KECCAK_256, receiver: DataTest.receiver, outputNetwork: "BTC", outputAddress: "1AcVYm7M3kkJQH28FXAvyBFQzFRL6xPKu8", @@ -195,7 +200,7 @@ describe(testCase, () => { firstHighNetWorthAccount, DataTest.receiver, 10, - DataTest.hashLock, + FORTY_TWO_KECCAK_256, DataTest.expiration, ], }); @@ -203,8 +208,7 @@ describe(testCase, () => { // Test for 200 valid response test case const bodyWithdraw: WithdrawReq = { id: callOutput, - secret: - "0x3853485acd2bfc3c632026ee365279743af107a30492e3ceaa7aefc30c2a048a", + secret: FORTY_TWO_AS_HEX_STRING, web3SigningCredential, connectorId, keychainId,