From 268dcc387ff65c0dbb5df41e7c21d3809d46de40 Mon Sep 17 00:00:00 2001 From: Rafael Belchior Date: Mon, 24 Apr 2023 22:44:19 +0000 Subject: [PATCH] feat(plugin-htlc-eth-besu): add private HTLCs and forge build & test Adds privacy-preserving HTLCs to the htlc-eth-besu package. Signed-off-by: Rafael Belchior feat: improve hash time lock base Signed-off-by: Rafael Belchior feat: add privacy helper offchain relayer Signed-off-by: Rafael Belchior feat: add private HTLC draft (wip) Signed-off-by: Rafael Belchior chore: add configuration files Signed-off-by: Rafael Belchior chore: recompile contracts Signed-off-by: Rafael Belchior test(wip): private htlc Signed-off-by: Rafael Belchior feat: private htlc verifications Signed-off-by: Rafael Belchior docs: update documentation and configs Signed-off-by: Rafael Belchior test: private HTLC (wip) Signed-off-by: Rafael Belchior chore: config files and artefacts Signed-off-by: Rafael Belchior feat: private htlc Signed-off-by: Rafael Belchior feat: fix bug in proof verification Signed-off-by: Rafael Belchior chore: lint contracts Signed-off-by: Rafael Belchior chore: use hardcoded variable for contract name Signed-off-by: Rafael Belchior feat: privacy enhancements Signed-off-by: Rafael Belchior feat: update offchain relayer Signed-off-by: Rafael Belchior feat(plugin-htlc-eth-besu): add private HTLCs and forge build & test Adds privacy-preserving HTLCs to the htlc-eth-besu package. Signed-off-by: Rafael Belchior docs(htlc): update README Signed-off-by: Rafael Belchior ci(htlc): add foundry setup and tests Signed-off-by: Rafael Belchior fix(htlc): remove magic strings Signed-off-by: Rafael Belchior fix(htlc): remove gitmodules from root Signed-off-by: Rafael Belchior fix(htlc): re-order ci Signed-off-by: Rafael Belchior fix(htlc): fix magic strings Signed-off-by: Rafael Belchior chore(htlc): update nohoist configuration Signed-off-by: Rafael Belchior build(package.json): removed global nohoist, add localized remappings 1. Applied the remappings in the foundry.toml file which is local to the package that's being changed. I figured out the parameters by reverse engineering the output of `foundry config` 2. Also removed the remappings.txt file because it is deprecated according to the foundry issue tracker on GitHub. Signed-off-by: Peter Somogyvari --- .cspell.json | 8 +- .github/workflows/ci.yaml | 7 + .../counterparty-htlc-endpoint.test.ts | 7 +- .../own-htlc-endpoint.test.ts | 7 +- .../plugin-htlc-coordinator/refund.test.ts | 7 +- .../withdraw-counterparty-endpoint.test.ts | 7 +- .../cactus-plugin-htlc-eth-besu/.gitignore | 5 + .../cactus-plugin-htlc-eth-besu/README.md | 41 +- .../cactus-plugin-htlc-eth-besu/foundry.toml | 45 + .../cactus-plugin-htlc-eth-besu/package.json | 17 +- .../main/solidity/contracts/HashTimeLock.json | 22919 ++++------------ .../main/solidity/contracts/HashTimeLock.sol | 68 +- .../contracts/PrivateHashTimeLock.sol | 176 + .../main/typescript/plugin-htlc-eth-besu.ts | 16 +- .../main/typescript/private-htlc-helper.ts | 102 + .../src/main/typescript/public-api.ts | 4 +- .../integration/PrivateHashTimeLock.t.sol | 164 + .../cactus-plugin-htlc-eth-besu/tsconfig.json | 1 + ...get-single-status-endpoint-invalid.test.ts | 8 +- .../get-single-status-endpoint.test.ts | 4 +- .../get-status-endpoint-invalid.test.ts | 4 +- .../get-status-endpoint.test.ts | 4 +- .../initialize-endpoint-invalid.test.ts | 4 +- .../initialize-endpoint.test.ts | 4 +- .../new-contract-endpoint-invalid.test.ts | 4 +- .../new-contract-endpoint.test.ts | 4 +- .../openapi/openapi-validation.test.ts | 4 +- .../refund-endpoint-invalid.test.ts | 4 +- .../refund-endpoint.test.ts | 4 +- .../withdraw-endpoint-invalid.test.ts | 4 +- .../withdraw-endpoint.test.ts | 4 +- 31 files changed, 6036 insertions(+), 17621 deletions(-) create mode 100644 packages/cactus-plugin-htlc-eth-besu/.gitignore create mode 100644 packages/cactus-plugin-htlc-eth-besu/foundry.toml create mode 100644 packages/cactus-plugin-htlc-eth-besu/src/main/solidity/contracts/PrivateHashTimeLock.sol create mode 100644 packages/cactus-plugin-htlc-eth-besu/src/main/typescript/private-htlc-helper.ts create mode 100644 packages/cactus-plugin-htlc-eth-besu/src/test/solidity/integration/PrivateHashTimeLock.t.sol diff --git a/.cspell.json b/.cspell.json index 893018af04b..2f0c2ea27ae 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 bbfc947ead7..13acb774dbb 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1156,6 +1156,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/extensions/cactus-plugin-htlc-coordinator-besu/src/test/typescript/integration/plugin-htlc-coordinator/counterparty-htlc-endpoint.test.ts b/extensions/cactus-plugin-htlc-coordinator-besu/src/test/typescript/integration/plugin-htlc-coordinator/counterparty-htlc-endpoint.test.ts index f4d34f0c0cd..aac2bd39ec1 100644 --- a/extensions/cactus-plugin-htlc-coordinator-besu/src/test/typescript/integration/plugin-htlc-coordinator/counterparty-htlc-endpoint.test.ts +++ b/extensions/cactus-plugin-htlc-coordinator-besu/src/test/typescript/integration/plugin-htlc-coordinator/counterparty-htlc-endpoint.test.ts @@ -58,7 +58,7 @@ const web3SigningCredential: Web3SigningCredential = { type: Web3SigningCredentialType.PrivateKeyHex, } as Web3SigningCredential; const contractAddress = "0xCfEB869F69431e42cdB54A4F4f105C19C080A601"; - +const contractName = HashTimeLockJSON.contractName; const testCase = "Test own htlc endpoint"; test("BEFORE " + testCase, async (t: Test) => { @@ -95,10 +95,7 @@ test(testCase, async (t: Test) => { DemoHelperJSON.contractName, JSON.stringify(DemoHelperJSON), ); - keychainPlugin.set( - HashTimeLockJSON.contractName, - JSON.stringify(HashTimeLockJSON), - ); + keychainPlugin.set(contractName, JSON.stringify(HashTimeLockJSON)); const factory = new PluginFactoryLedgerConnector({ pluginImportType: PluginImportType.Local, diff --git a/extensions/cactus-plugin-htlc-coordinator-besu/src/test/typescript/integration/plugin-htlc-coordinator/own-htlc-endpoint.test.ts b/extensions/cactus-plugin-htlc-coordinator-besu/src/test/typescript/integration/plugin-htlc-coordinator/own-htlc-endpoint.test.ts index 818f9a7bf7c..819946d977d 100644 --- a/extensions/cactus-plugin-htlc-coordinator-besu/src/test/typescript/integration/plugin-htlc-coordinator/own-htlc-endpoint.test.ts +++ b/extensions/cactus-plugin-htlc-coordinator-besu/src/test/typescript/integration/plugin-htlc-coordinator/own-htlc-endpoint.test.ts @@ -57,7 +57,7 @@ const web3SigningCredential: Web3SigningCredential = { type: Web3SigningCredentialType.PrivateKeyHex, } as Web3SigningCredential; const contractAddress = "0xCfEB869F69431e42cdB54A4F4f105C19C080A601"; - +const contractName = HashTimeLockJSON.contractName; const testCase = "Test own htlc endpoint"; test("BEFORE " + testCase, async (t: Test) => { @@ -94,10 +94,7 @@ test(testCase, async (t: Test) => { DemoHelperJSON.contractName, JSON.stringify(DemoHelperJSON), ); - keychainPlugin.set( - HashTimeLockJSON.contractName, - JSON.stringify(HashTimeLockJSON), - ); + keychainPlugin.set(contractName, JSON.stringify(HashTimeLockJSON)); const factory = new PluginFactoryLedgerConnector({ pluginImportType: PluginImportType.Local, diff --git a/extensions/cactus-plugin-htlc-coordinator-besu/src/test/typescript/integration/plugin-htlc-coordinator/refund.test.ts b/extensions/cactus-plugin-htlc-coordinator-besu/src/test/typescript/integration/plugin-htlc-coordinator/refund.test.ts index d254fca0574..eb681d3fa8d 100644 --- a/extensions/cactus-plugin-htlc-coordinator-besu/src/test/typescript/integration/plugin-htlc-coordinator/refund.test.ts +++ b/extensions/cactus-plugin-htlc-coordinator-besu/src/test/typescript/integration/plugin-htlc-coordinator/refund.test.ts @@ -62,7 +62,7 @@ const web3SigningCredential: Web3SigningCredential = { type: Web3SigningCredentialType.PrivateKeyHex, } as Web3SigningCredential; const contractAddress = "0xCfEB869F69431e42cdB54A4F4f105C19C080A601"; - +const contractName = HashTimeLockJSON.contractName; const testCase = "Test own htlc endpoint"; test("BEFORE " + testCase, async (t: Test) => { @@ -99,10 +99,7 @@ test(testCase, async (t: Test) => { DemoHelperJSON.contractName, JSON.stringify(DemoHelperJSON), ); - keychainPlugin.set( - HashTimeLockJSON.contractName, - JSON.stringify(HashTimeLockJSON), - ); + keychainPlugin.set(contractName, JSON.stringify(HashTimeLockJSON)); const factory = new PluginFactoryLedgerConnector({ pluginImportType: PluginImportType.Local, diff --git a/extensions/cactus-plugin-htlc-coordinator-besu/src/test/typescript/integration/plugin-htlc-coordinator/withdraw-counterparty-endpoint.test.ts b/extensions/cactus-plugin-htlc-coordinator-besu/src/test/typescript/integration/plugin-htlc-coordinator/withdraw-counterparty-endpoint.test.ts index 12000794842..ca76c2fce4f 100644 --- a/extensions/cactus-plugin-htlc-coordinator-besu/src/test/typescript/integration/plugin-htlc-coordinator/withdraw-counterparty-endpoint.test.ts +++ b/extensions/cactus-plugin-htlc-coordinator-besu/src/test/typescript/integration/plugin-htlc-coordinator/withdraw-counterparty-endpoint.test.ts @@ -62,7 +62,7 @@ const web3SigningCredential: Web3SigningCredential = { type: Web3SigningCredentialType.PrivateKeyHex, } as Web3SigningCredential; const contractAddress = "0xCfEB869F69431e42cdB54A4F4f105C19C080A601"; - +const contractName = HashTimeLockJSON.contractName; const testCase = "Test own htlc endpoint"; test("BEFORE " + testCase, async (t: Test) => { @@ -99,10 +99,7 @@ test(testCase, async (t: Test) => { DemoHelperJSON.contractName, JSON.stringify(DemoHelperJSON), ); - keychainPlugin.set( - HashTimeLockJSON.contractName, - JSON.stringify(HashTimeLockJSON), - ); + keychainPlugin.set(contractName, JSON.stringify(HashTimeLockJSON)); const factory = new PluginFactoryLedgerConnector({ pluginImportType: PluginImportType.Local, diff --git a/packages/cactus-plugin-htlc-eth-besu/.gitignore b/packages/cactus-plugin-htlc-eth-besu/.gitignore new file mode 100644 index 00000000000..58b9aa07361 --- /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 b2691715743..51b67eb7091 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 00000000000..3a402ba52a6 --- /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 79a592ec3f5..019ee61d91b 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 928082b1964..6369268e259 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,5 +1,4 @@ { - "contractName": "HashTimeLock", "abi": [ { "anonymous": false, @@ -131,65 +130,19 @@ "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": [ + "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "internalType": "bytes32", + "name": "id", + "type": "bytes32" } ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "WITHDRAWN", + "name": "contractExists", "outputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "internalType": "bool", + "name": "result", + "type": "bool" } ], "stateMutability": "view", @@ -254,6 +207,44 @@ "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": [ { @@ -298,14 +289,9 @@ "internalType": "bytes32", "name": "id", "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "secret", - "type": "bytes32" } ], - "name": "withdraw", + "name": "refund", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -316,17980 +302,5893 @@ "internalType": "bytes32", "name": "id", "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "secret", + "type": "bytes32" } ], - "name": "refund", + "name": "withdraw", "outputs": [], "stateMutability": "nonpayable", "type": "function" + } + ], + "bytecode": { + "object": "0x608060405234801561001057600080fd5b50611309806100206000396000f3fe6080604052600436106100705760003560e01c80637249fbb61161004e5780637249fbb6146100fd578063d36320951461011d578063ec56a37314610130578063fbdf3b431461016557600080fd5b80632f21a6631461007557806363615149146100ab5780636c8244b8146100cd575b600080fd5b34801561008157600080fd5b50610095610090366004610db6565b610193565b6040516100a29190610e74565b60405180910390f35b3480156100b757600080fd5b506100cb6100c6366004610eb8565b610241565b005b3480156100d957600080fd5b506100ed6100e8366004610eda565b610408565b60405190151581526020016100a2565b34801561010957600080fd5b506100cb610118366004610eda565b6105c2565b6100cb61012b366004610f3c565b610704565b34801561013c57600080fd5b5061015061014b366004610eda565b610a72565b6040516100a299989796959493929190611037565b34801561017157600080fd5b50610185610180366004610eda565b610bdb565b6040519081526020016100a2565b60606000825167ffffffffffffffff8111156101b1576101b1610da0565b6040519080825280602002602001820160405280156101da578160200160208202803683370190505b50905060005b835181101561023a5761020b8482815181106101fe576101fe6110a7565b6020026020010151610bdb565b82828151811061021d5761021d6110a7565b602090810291909101015280610232816110bd565b9150506101e0565b5092915050565b600082815260208190526040902060038101546001146102a85760405162461bcd60e51b815260206004820152600f60248201527f535741505f4e4f545f414354495645000000000000000000000000000000000060448201526064015b60405180910390fd5b428160020154116102ea5760405162461bcd60e51b815260206004820152600c60248201526b494e56414c49445f54494d4560a01b604482015260640161029f565b6040805160208101849052016040516020818303038152906040528051906020012081600401541461035e5760405162461bcd60e51b815260206004820152600e60248201527f494e56414c49445f534543524554000000000000000000000000000000000000604482015260640161029f565b600381810155600681015481546040516001600160a01b039092169181156108fc0291906000818181858888f193505050501580156103a1573d6000803e3d6000fd5b506006810154600582015460048301546040516001600160a01b0393841693929092169186917f2d3a5ed13d0553389b4078e01264416362e34d23520fda797fbc17f3905ed131916103fb91888252602082015260400190565b60405180910390a4505050565b60008181526020818152604080832081516101208101835281548152600182015493810193909352600281015491830191909152600381015460608301526004810154608083015260058101546001600160a01b0390811660a084015260068201541660c08301526007810180548493929160e0840191610488906110e4565b80601f01602080910402602001604051908101604052809291908181526020018280546104b4906110e4565b80156105015780601f106104d657610100808354040283529160200191610501565b820191906000526020600020905b8154815290600101906020018083116104e457829003601f168201915b5050505050815260200160088201805461051a906110e4565b80601f0160208091040260200160405190810160405280929190818152602001828054610546906110e4565b80156105935780601f1061056857610100808354040283529160200191610593565b820191906000526020600020905b81548152906001019060200180831161057657829003601f168201915b505050505081525050905060008160600151036105b35750600092915050565b50600192915050565b50919050565b600081815260208190526040902060038101546001146106245760405162461bcd60e51b815260206004820152600f60248201527f535741505f4e4f545f4143544956450000000000000000000000000000000000604482015260640161029f565b42816002015411156106675760405162461bcd60e51b815260206004820152600c60248201526b494e56414c49445f54494d4560a01b604482015260640161029f565b60026003820155600581015481546040516001600160a01b039092169181156108fc0291906000818181858888f193505050501580156106ab573d6000803e3d6000fd5b506006810154600582015460048301546040519081526001600160a01b03928316929091169084907f6fa50d56c31f3efe0cb6ff06232bffce8fe8c4155e3cbb6f2d79dd12631c25229060200160405180910390a45050565b33344289116107445760405162461bcd60e51b815260206004820152600c60248201526b494e56414c49445f54494d4560a01b604482015260640161029f565b600081116107945760405162461bcd60e51b815260206004820152600e60248201527f494e56414c49445f414d4f554e54000000000000000000000000000000000000604482015260640161029f565b6040516bffffffffffffffffffffffff19606084811b8216602084015289901b1660348201526048810182905260688101899052608881018a905260009060029060a80160408051601f19818403018152908290526107f291611118565b602060405180830381855afa15801561080f573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052508101906108329190611134565b600081815260208190526040902060030154909150156108945760405162461bcd60e51b815260206004820152600b60248201527f535741505f455849535453000000000000000000000000000000000000000000604482015260640161029f565b6040518061012001604052808381526020018c81526020018b8152602001600181526020018a8152602001846001600160a01b03168152602001896001600160a01b0316815260200188888080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250505090825250604080516020601f8901819004810282018101909252878152918101919088908890819084018382808284376000920182905250939094525050838152602081815260409182902084518155908401516001820155908301516002820155606083015160038201556080830151600482015560a08301516005820180546001600160a01b039283167fffffffffffffffffffffffff00000000000000000000000000000000000000009182161790915560c085015160068401805491909316911617905560e083015190915060078201906109f1908261119c565b506101008201516008820190610a07908261119c565b50905050876001600160a01b0316836001600160a01b0316827f767d0ffbc3d16cc51fc05770a22976e4b0fda9198e37878b76979429b2d5d88c858f8f8f8e8e8e8e604051610a5d989796959493929190611285565b60405180910390a45050505050505050505050565b60006020819052908152604090208054600182015460028301546003840154600485015460058601546006870154600788018054979896979596949593946001600160a01b03938416949390921692610aca906110e4565b80601f0160208091040260200160405190810160405280929190818152602001828054610af6906110e4565b8015610b435780601f10610b1857610100808354040283529160200191610b43565b820191906000526020600020905b815481529060010190602001808311610b2657829003601f168201915b505050505090806008018054610b58906110e4565b80601f0160208091040260200160405190810160405280929190818152602001828054610b84906110e4565b8015610bd15780601f10610ba657610100808354040283529160200191610bd1565b820191906000526020600020905b815481529060010190602001808311610bb457829003601f168201915b5050505050905089565b60008181526020818152604080832081516101208101835281548152600182015493810193909352600281015491830191909152600381015460608301526004810154608083015260058101546001600160a01b0390811660a084015260068201541660c08301526007810180548493929160e0840191610c5b906110e4565b80601f0160208091040260200160405190810160405280929190818152602001828054610c87906110e4565b8015610cd45780601f10610ca957610100808354040283529160200191610cd4565b820191906000526020600020905b815481529060010190602001808311610cb757829003601f168201915b50505050508152602001600882018054610ced906110e4565b80601f0160208091040260200160405190810160405280929190818152602001828054610d19906110e4565b8015610d665780601f10610d3b57610100808354040283529160200191610d66565b820191906000526020600020905b815481529060010190602001808311610d4957829003601f168201915b505050505081525050905060018160600151148015610d885750428160400151105b15610d9657600491506105bc565b6060015192915050565b634e487b7160e01b600052604160045260246000fd5b60006020808385031215610dc957600080fd5b823567ffffffffffffffff80821115610de157600080fd5b818501915085601f830112610df557600080fd5b813581811115610e0757610e07610da0565b8060051b604051601f19603f83011681018181108582111715610e2c57610e2c610da0565b604052918252848201925083810185019188831115610e4a57600080fd5b938501935b82851015610e6857843584529385019392850192610e4f565b98975050505050505050565b6020808252825182820181905260009190848201906040850190845b81811015610eac57835183529284019291840191600101610e90565b50909695505050505050565b60008060408385031215610ecb57600080fd5b50508035926020909101359150565b600060208284031215610eec57600080fd5b5035919050565b60008083601f840112610f0557600080fd5b50813567ffffffffffffffff811115610f1d57600080fd5b602083019150836020828501011115610f3557600080fd5b9250929050565b60008060008060008060008060c0898b031215610f5857600080fd5b88359750602089013596506040890135955060608901356001600160a01b0381168114610f8457600080fd5b9450608089013567ffffffffffffffff80821115610fa157600080fd5b610fad8c838d01610ef3565b909650945060a08b0135915080821115610fc657600080fd5b50610fd38b828c01610ef3565b999c989b5096995094979396929594505050565b60005b83811015611002578181015183820152602001610fea565b50506000910152565b60008151808452611023816020860160208601610fe7565b601f01601f19169290920160200192915050565b60006101208b83528a60208401528960408401528860608401528760808401526001600160a01b0380881660a085015280871660c0850152508060e08401526110828184018661100b565b9050828103610100840152611097818561100b565b9c9b505050505050505050505050565b634e487b7160e01b600052603260045260246000fd5b6000600182016110dd57634e487b7160e01b600052601160045260246000fd5b5060010190565b600181811c908216806110f857607f821691505b6020821081036105bc57634e487b7160e01b600052602260045260246000fd5b6000825161112a818460208701610fe7565b9190910192915050565b60006020828403121561114657600080fd5b5051919050565b601f82111561119757600081815260208120601f850160051c810160208610156111745750805b601f850160051c820191505b8181101561119357828155600101611180565b5050505b505050565b815167ffffffffffffffff8111156111b6576111b6610da0565b6111ca816111c484546110e4565b8461114d565b602080601f8311600181146111ff57600084156111e75750858301515b600019600386901b1c1916600185901b178555611193565b600085815260208120601f198616915b8281101561122e5788860151825594840194600190910190840161120f565b508582101561124c5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b88815287602082015286604082015285606082015260c0608082015260006112b160c08301868861125c565b82810360a08401526112c481858761125c565b9b9a505050505050505050505056fea2646970667358221220c03975ac83c04811571f266015b384540f96b1e8982e9b8e9f5c332d7940507364736f6c63430008130033", + "sourceMap": "25:4406:0:-:0;;;;;;;;;;;;;;;;;;;", + "linkReferences": {} + }, + "deployedBytecode": { + "object": "0x6080604052600436106100705760003560e01c80637249fbb61161004e5780637249fbb6146100fd578063d36320951461011d578063ec56a37314610130578063fbdf3b431461016557600080fd5b80632f21a6631461007557806363615149146100ab5780636c8244b8146100cd575b600080fd5b34801561008157600080fd5b50610095610090366004610db6565b610193565b6040516100a29190610e74565b60405180910390f35b3480156100b757600080fd5b506100cb6100c6366004610eb8565b610241565b005b3480156100d957600080fd5b506100ed6100e8366004610eda565b610408565b60405190151581526020016100a2565b34801561010957600080fd5b506100cb610118366004610eda565b6105c2565b6100cb61012b366004610f3c565b610704565b34801561013c57600080fd5b5061015061014b366004610eda565b610a72565b6040516100a299989796959493929190611037565b34801561017157600080fd5b50610185610180366004610eda565b610bdb565b6040519081526020016100a2565b60606000825167ffffffffffffffff8111156101b1576101b1610da0565b6040519080825280602002602001820160405280156101da578160200160208202803683370190505b50905060005b835181101561023a5761020b8482815181106101fe576101fe6110a7565b6020026020010151610bdb565b82828151811061021d5761021d6110a7565b602090810291909101015280610232816110bd565b9150506101e0565b5092915050565b600082815260208190526040902060038101546001146102a85760405162461bcd60e51b815260206004820152600f60248201527f535741505f4e4f545f414354495645000000000000000000000000000000000060448201526064015b60405180910390fd5b428160020154116102ea5760405162461bcd60e51b815260206004820152600c60248201526b494e56414c49445f54494d4560a01b604482015260640161029f565b6040805160208101849052016040516020818303038152906040528051906020012081600401541461035e5760405162461bcd60e51b815260206004820152600e60248201527f494e56414c49445f534543524554000000000000000000000000000000000000604482015260640161029f565b600381810155600681015481546040516001600160a01b039092169181156108fc0291906000818181858888f193505050501580156103a1573d6000803e3d6000fd5b506006810154600582015460048301546040516001600160a01b0393841693929092169186917f2d3a5ed13d0553389b4078e01264416362e34d23520fda797fbc17f3905ed131916103fb91888252602082015260400190565b60405180910390a4505050565b60008181526020818152604080832081516101208101835281548152600182015493810193909352600281015491830191909152600381015460608301526004810154608083015260058101546001600160a01b0390811660a084015260068201541660c08301526007810180548493929160e0840191610488906110e4565b80601f01602080910402602001604051908101604052809291908181526020018280546104b4906110e4565b80156105015780601f106104d657610100808354040283529160200191610501565b820191906000526020600020905b8154815290600101906020018083116104e457829003601f168201915b5050505050815260200160088201805461051a906110e4565b80601f0160208091040260200160405190810160405280929190818152602001828054610546906110e4565b80156105935780601f1061056857610100808354040283529160200191610593565b820191906000526020600020905b81548152906001019060200180831161057657829003601f168201915b505050505081525050905060008160600151036105b35750600092915050565b50600192915050565b50919050565b600081815260208190526040902060038101546001146106245760405162461bcd60e51b815260206004820152600f60248201527f535741505f4e4f545f4143544956450000000000000000000000000000000000604482015260640161029f565b42816002015411156106675760405162461bcd60e51b815260206004820152600c60248201526b494e56414c49445f54494d4560a01b604482015260640161029f565b60026003820155600581015481546040516001600160a01b039092169181156108fc0291906000818181858888f193505050501580156106ab573d6000803e3d6000fd5b506006810154600582015460048301546040519081526001600160a01b03928316929091169084907f6fa50d56c31f3efe0cb6ff06232bffce8fe8c4155e3cbb6f2d79dd12631c25229060200160405180910390a45050565b33344289116107445760405162461bcd60e51b815260206004820152600c60248201526b494e56414c49445f54494d4560a01b604482015260640161029f565b600081116107945760405162461bcd60e51b815260206004820152600e60248201527f494e56414c49445f414d4f554e54000000000000000000000000000000000000604482015260640161029f565b6040516bffffffffffffffffffffffff19606084811b8216602084015289901b1660348201526048810182905260688101899052608881018a905260009060029060a80160408051601f19818403018152908290526107f291611118565b602060405180830381855afa15801561080f573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052508101906108329190611134565b600081815260208190526040902060030154909150156108945760405162461bcd60e51b815260206004820152600b60248201527f535741505f455849535453000000000000000000000000000000000000000000604482015260640161029f565b6040518061012001604052808381526020018c81526020018b8152602001600181526020018a8152602001846001600160a01b03168152602001896001600160a01b0316815260200188888080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250505090825250604080516020601f8901819004810282018101909252878152918101919088908890819084018382808284376000920182905250939094525050838152602081815260409182902084518155908401516001820155908301516002820155606083015160038201556080830151600482015560a08301516005820180546001600160a01b039283167fffffffffffffffffffffffff00000000000000000000000000000000000000009182161790915560c085015160068401805491909316911617905560e083015190915060078201906109f1908261119c565b506101008201516008820190610a07908261119c565b50905050876001600160a01b0316836001600160a01b0316827f767d0ffbc3d16cc51fc05770a22976e4b0fda9198e37878b76979429b2d5d88c858f8f8f8e8e8e8e604051610a5d989796959493929190611285565b60405180910390a45050505050505050505050565b60006020819052908152604090208054600182015460028301546003840154600485015460058601546006870154600788018054979896979596949593946001600160a01b03938416949390921692610aca906110e4565b80601f0160208091040260200160405190810160405280929190818152602001828054610af6906110e4565b8015610b435780601f10610b1857610100808354040283529160200191610b43565b820191906000526020600020905b815481529060010190602001808311610b2657829003601f168201915b505050505090806008018054610b58906110e4565b80601f0160208091040260200160405190810160405280929190818152602001828054610b84906110e4565b8015610bd15780601f10610ba657610100808354040283529160200191610bd1565b820191906000526020600020905b815481529060010190602001808311610bb457829003601f168201915b5050505050905089565b60008181526020818152604080832081516101208101835281548152600182015493810193909352600281015491830191909152600381015460608301526004810154608083015260058101546001600160a01b0390811660a084015260068201541660c08301526007810180548493929160e0840191610c5b906110e4565b80601f0160208091040260200160405190810160405280929190818152602001828054610c87906110e4565b8015610cd45780601f10610ca957610100808354040283529160200191610cd4565b820191906000526020600020905b815481529060010190602001808311610cb757829003601f168201915b50505050508152602001600882018054610ced906110e4565b80601f0160208091040260200160405190810160405280929190818152602001828054610d19906110e4565b8015610d665780601f10610d3b57610100808354040283529160200191610d66565b820191906000526020600020905b815481529060010190602001808311610d4957829003601f168201915b505050505081525050905060018160600151148015610d885750428160400151105b15610d9657600491506105bc565b6060015192915050565b634e487b7160e01b600052604160045260246000fd5b60006020808385031215610dc957600080fd5b823567ffffffffffffffff80821115610de157600080fd5b818501915085601f830112610df557600080fd5b813581811115610e0757610e07610da0565b8060051b604051601f19603f83011681018181108582111715610e2c57610e2c610da0565b604052918252848201925083810185019188831115610e4a57600080fd5b938501935b82851015610e6857843584529385019392850192610e4f565b98975050505050505050565b6020808252825182820181905260009190848201906040850190845b81811015610eac57835183529284019291840191600101610e90565b50909695505050505050565b60008060408385031215610ecb57600080fd5b50508035926020909101359150565b600060208284031215610eec57600080fd5b5035919050565b60008083601f840112610f0557600080fd5b50813567ffffffffffffffff811115610f1d57600080fd5b602083019150836020828501011115610f3557600080fd5b9250929050565b60008060008060008060008060c0898b031215610f5857600080fd5b88359750602089013596506040890135955060608901356001600160a01b0381168114610f8457600080fd5b9450608089013567ffffffffffffffff80821115610fa157600080fd5b610fad8c838d01610ef3565b909650945060a08b0135915080821115610fc657600080fd5b50610fd38b828c01610ef3565b999c989b5096995094979396929594505050565b60005b83811015611002578181015183820152602001610fea565b50506000910152565b60008151808452611023816020860160208601610fe7565b601f01601f19169290920160200192915050565b60006101208b83528a60208401528960408401528860608401528760808401526001600160a01b0380881660a085015280871660c0850152508060e08401526110828184018661100b565b9050828103610100840152611097818561100b565b9c9b505050505050505050505050565b634e487b7160e01b600052603260045260246000fd5b6000600182016110dd57634e487b7160e01b600052601160045260246000fd5b5060010190565b600181811c908216806110f857607f821691505b6020821081036105bc57634e487b7160e01b600052602260045260246000fd5b6000825161112a818460208701610fe7565b9190910192915050565b60006020828403121561114657600080fd5b5051919050565b601f82111561119757600081815260208120601f850160051c810160208610156111745750805b601f850160051c820191505b8181101561119357828155600101611180565b5050505b505050565b815167ffffffffffffffff8111156111b6576111b6610da0565b6111ca816111c484546110e4565b8461114d565b602080601f8311600181146111ff57600084156111e75750858301515b600019600386901b1c1916600185901b178555611193565b600085815260208120601f198616915b8281101561122e5788860151825594840194600190910190840161120f565b508582101561124c5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b88815287602082015286604082015285606082015260c0608082015260006112b160c08301868861125c565b82810360a08401526112c481858761125c565b9b9a505050505050505050505056fea2646970667358221220c03975ac83c04811571f266015b384540f96b1e8982e9b8e9f5c332d7940507364736f6c63430008130033", + "sourceMap": "25:4406:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3494:303;;;;;;;;;;-1:-1:-1;3494:303:0;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;2668:465;;;;;;;;;;-1:-1:-1;2668:465:0;;;;;:::i;:::-;;:::i;:::-;;4172:257;;;;;;;;;;-1:-1:-1;4172:257:0;;;;;:::i;:::-;;:::i;:::-;;;2563:14:20;;2556:22;2538:41;;2526:2;2511:18;4172:257:0;2398:187:20;3139:349:0;;;;;;;;;;-1:-1:-1;3139:349:0;;;;;:::i;:::-;;:::i;1509:1153::-;;;;;;:::i;:::-;;:::i;54:49::-;;;;;;;;;;-1:-1:-1;54:49:0;;;;;:::i;:::-;;:::i;:::-;;;;;;;;;;;;;;;:::i;3803:363::-;;;;;;;;;;-1:-1:-1;3803:363:0;;;;;:::i;:::-;;:::i;:::-;;;5781:25:20;;;5769:2;5754:18;3803:363:0;5635:177:20;3494:303:0;3556:16;3584:23;3624:3;:10;3610:25;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3610:25:0;;3584:51;;3651:13;3646:121;3678:3;:10;3670:5;:18;3646:121;;;3729:27;3745:3;3749:5;3745:10;;;;;;;;:::i;:::-;;;;;;;3729:15;:27::i;:::-;3713:6;3720:5;3713:13;;;;;;;;:::i;:::-;;;;;;;;;;:43;3690:7;;;;:::i;:::-;;;;3646:121;;;-1:-1:-1;3784:6:0;3494:303;-1:-1:-1;;3494:303:0:o;2668:465::-;2733:22;2758:13;;;;;;;;;;2790:8;;;;324:1;2790:18;2782:46;;;;-1:-1:-1;;;2782:46:0;;6502:2:20;2782:46:0;;;6484:21:20;6541:2;6521:18;;;6514:30;6580:17;6560:18;;;6553:45;6615:18;;2782:46:0;;;;;;;;;2862:15;2847:1;:12;;;:30;2839:55;;;;-1:-1:-1;;;2839:55:0;;6846:2:20;2839:55:0;;;6828:21:20;6885:2;6865:18;;;6858:30;-1:-1:-1;;;6904:18:20;;;6897:42;6956:18;;2839:55:0;6644:336:20;2839:55:0;2937:24;;;;;;7114:19:20;;;7149:12;2937:24:0;;;;;;;;;;;;2927:35;;;;;;2913:1;:10;;;:49;2905:75;;;;-1:-1:-1;;;2905:75:0;;7374:2:20;2905:75:0;;;7356:21:20;7413:2;7393:18;;;7386:30;7452:16;7432:18;;;7425:44;7486:18;;2905:75:0;7172:338:20;2905:75:0;480:1;2991:8;;;:20;3022:10;;;;3042:13;;3022:34;;-1:-1:-1;;;;;3022:10:0;;;;:34;;;;;3042:13;3022:10;:34;:10;:34;3042:13;3022:10;:34;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3115:10:0;;;;3105:8;;;;3093:10;;;;3072:54;;-1:-1:-1;;;;;3115:10:0;;;;3105:8;;;;;3081:2;;3072:54;;;;3085:6;7689:25:20;;7745:2;7730:18;;7723:34;7677:2;7662:18;;7515:248;3072:54:0;;;;;;;;2723:410;2668:465;;:::o;4172:257::-;4229:11;4287:13;;;;;;;;;;;4252:48;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;4252:48:0;;;;;;;;;;;;;;;;;;;;;4229:11;;4252:48;4287:13;4252:48;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;248:1;4315:12;:19;;;:27;4311:112;;-1:-1:-1;4365:5:0;;4172:257;-1:-1:-1;;4172:257:0:o;4311:112::-;-1:-1:-1;4408:4:0;;4172:257;-1:-1:-1;;4172:257:0:o;4311:112::-;4242:187;4172:257;;;:::o;3139:349::-;3186:22;3211:13;;;;;;;;;;3243:8;;;;324:1;3243:18;3235:46;;;;-1:-1:-1;;;3235:46:0;;6502:2:20;3235:46:0;;;6484:21:20;6541:2;6521:18;;;6514:30;6580:17;6560:18;;;6553:45;6615:18;;3235:46:0;6300:339:20;3235:46:0;3316:15;3300:1;:12;;;:31;;3292:56;;;;-1:-1:-1;;;3292:56:0;;6846:2:20;3292:56:0;;;6828:21:20;6885:2;6865:18;;;6858:30;-1:-1:-1;;;6904:18:20;;;6897:42;6956:18;;3292:56:0;6644:336:20;3292:56:0;408:1;3359:8;;;:19;3389:8;;;;3407:13;;3389:32;;-1:-1:-1;;;;;3389:8:0;;;;:32;;;;;3407:13;3389:8;:32;:8;:32;3407:13;3389:8;:32;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3470:10:0;;;;3460:8;;;;3448:10;;;;3437:44;;5781:25:20;;;-1:-1:-1;;;;;3470:10:0;;;;3460:8;;;;3444:2;;3437:44;;5769:2:20;5754:18;3437:44:0;;;;;;;3176:312;3139:349;:::o;1509:1153::-;1792:10;1835:9;1876:15;1863:28;;1855:53;;;;-1:-1:-1;;;1855:53:0;;6846:2:20;1855:53:0;;;6828:21:20;6885:2;6865:18;;;6858:30;-1:-1:-1;;;6904:18:20;;;6897:42;6956:18;;1855:53:0;6644:336:20;1855:53:0;1941:1;1927:11;:15;1919:42;;;;-1:-1:-1;;;1919:42:0;;8594:2:20;1919:42:0;;;8576:21:20;8633:2;8613:18;;;8606:30;8672:16;8652:18;;;8645:44;8706:18;;1919:42:0;8392:338:20;1919:42:0;2005:69;;-1:-1:-1;;9078:2:20;9074:15;;;9070:24;;2005:69:0;;;9058:37:20;9129:15;;;9125:24;9111:12;;;9104:46;9166:12;;;9159:28;;;9203:12;;;9196:28;;;9240:13;;;9233:29;;;1972:10:0;;1985:99;;9278:13:20;;2005:69:0;;;-1:-1:-1;;2005:69:0;;;;;;;;;;1985:99;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;248:1;2103:13;;;;;;;;;;:20;;;1972:112;;-1:-1:-1;2103:28:0;2095:52;;;;-1:-1:-1;;;2095:52:0;;9985:2:20;2095:52:0;;;9967:21:20;10024:2;10004:18;;;9997:30;10063:13;10043:18;;;10036:41;10094:18;;2095:52:0;9783:335:20;2095:52:0;2174:235;;;;;;;;2200:11;2174:235;;;;2225:12;2174:235;;;;2251:10;2174:235;;;;324:1;2174:235;;;;2295:8;2174:235;;;;2317:6;-1:-1:-1;;;;;2174:235:0;;;;;2337:8;-1:-1:-1;;;;;2174:235:0;;;;;2359:13;;2174:235;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;2174:235:0;;;-1:-1:-1;2174:235:0;;;;;;;;;;;;;;;;;;;;;;;;;;;2386:13;;;;;;2174:235;;2386:13;;;;2174:235;;;;;;;;-1:-1:-1;2174:235:0;;;;-1:-1:-1;;2158:13:0;;;;;;;;;;;;:251;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2158:251:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:13;;-1:-1:-1;2158:251:0;;;;;;;;:::i;:::-;-1:-1:-1;2158:251:0;;;;;;;;;;;;:::i;:::-;;;;;2583:8;-1:-1:-1;;;;;2425:230:0;2563:6;-1:-1:-1;;;;;2425:230:0;2525:2;2425:230;2450:11;2475:12;2501:10;2541:8;2605:13;;2632;;2425:230;;;;;;;;;;;;;:::i;:::-;;;;;;;;1749:913;;;1509:1153;;;;;;;;:::o;54:49::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;54:49:0;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;3803:363::-;3861:14;3922:13;;;;;;;;;;;3887:48;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;3887:48:0;;;;;;;;;;;;;;;;;;;;;3861:14;;3887:48;3922:13;3887:48;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;324:1;3963:12;:19;;;:29;:86;;;;;4034:15;4008:12;:23;;;:41;3963:86;3946:214;;;551:1;4074:16;;3946:214;;;4130:19;;;;3803:363;-1:-1:-1;;3803:363:0:o;14:184:20:-;-1:-1:-1;;;63:1:20;56:88;163:4;160:1;153:15;187:4;184:1;177:15;203:1115;287:6;318:2;361;349:9;340:7;336:23;332:32;329:52;;;377:1;374;367:12;329:52;417:9;404:23;446:18;487:2;479:6;476:14;473:34;;;503:1;500;493:12;473:34;541:6;530:9;526:22;516:32;;586:7;579:4;575:2;571:13;567:27;557:55;;608:1;605;598:12;557:55;644:2;631:16;666:2;662;659:10;656:36;;;672:18;;:::i;:::-;718:2;715:1;711:10;750:2;744:9;813:2;809:7;804:2;800;796:11;792:25;784:6;780:38;868:6;856:10;853:22;848:2;836:10;833:18;830:46;827:72;;;879:18;;:::i;:::-;915:2;908:22;965:18;;;999:15;;;;-1:-1:-1;1041:11:20;;;1037:20;;;1069:19;;;1066:39;;;1101:1;1098;1091:12;1066:39;1125:11;;;;1145:142;1161:6;1156:3;1153:15;1145:142;;;1227:17;;1215:30;;1178:12;;;;1265;;;;1145:142;;;1306:6;203:1115;-1:-1:-1;;;;;;;;203:1115:20:o;1323:632::-;1494:2;1546:21;;;1616:13;;1519:18;;;1638:22;;;1465:4;;1494:2;1717:15;;;;1691:2;1676:18;;;1465:4;1760:169;1774:6;1771:1;1768:13;1760:169;;;1835:13;;1823:26;;1904:15;;;;1869:12;;;;1796:1;1789:9;1760:169;;;-1:-1:-1;1946:3:20;;1323:632;-1:-1:-1;;;;;;1323:632:20:o;1960:248::-;2028:6;2036;2089:2;2077:9;2068:7;2064:23;2060:32;2057:52;;;2105:1;2102;2095:12;2057:52;-1:-1:-1;;2128:23:20;;;2198:2;2183:18;;;2170:32;;-1:-1:-1;1960:248:20:o;2213:180::-;2272:6;2325:2;2313:9;2304:7;2300:23;2296:32;2293:52;;;2341:1;2338;2331:12;2293:52;-1:-1:-1;2364:23:20;;2213:180;-1:-1:-1;2213:180:20:o;2590:348::-;2642:8;2652:6;2706:3;2699:4;2691:6;2687:17;2683:27;2673:55;;2724:1;2721;2714:12;2673:55;-1:-1:-1;2747:20:20;;2790:18;2779:30;;2776:50;;;2822:1;2819;2812:12;2776:50;2859:4;2851:6;2847:17;2835:29;;2911:3;2904:4;2895:6;2887;2883:19;2879:30;2876:39;2873:59;;;2928:1;2925;2918:12;2873:59;2590:348;;;;;:::o;2943:1133::-;3079:6;3087;3095;3103;3111;3119;3127;3135;3188:3;3176:9;3167:7;3163:23;3159:33;3156:53;;;3205:1;3202;3195:12;3156:53;3241:9;3228:23;3218:33;;3298:2;3287:9;3283:18;3270:32;3260:42;;3349:2;3338:9;3334:18;3321:32;3311:42;;3403:2;3392:9;3388:18;3375:32;-1:-1:-1;;;;;3440:5:20;3436:54;3429:5;3426:65;3416:93;;3505:1;3502;3495:12;3416:93;3528:5;-1:-1:-1;3584:3:20;3569:19;;3556:33;3608:18;3638:14;;;3635:34;;;3665:1;3662;3655:12;3635:34;3704:59;3755:7;3746:6;3735:9;3731:22;3704:59;:::i;:::-;3782:8;;-1:-1:-1;3678:85:20;-1:-1:-1;3870:3:20;3855:19;;3842:33;;-1:-1:-1;3887:16:20;;;3884:36;;;3916:1;3913;3906:12;3884:36;;3955:61;4008:7;3997:8;3986:9;3982:24;3955:61;:::i;:::-;2943:1133;;;;-1:-1:-1;2943:1133:20;;-1:-1:-1;2943:1133:20;;;;;;4035:8;-1:-1:-1;;;2943:1133:20:o;4081:250::-;4166:1;4176:113;4190:6;4187:1;4184:13;4176:113;;;4266:11;;;4260:18;4247:11;;;4240:39;4212:2;4205:10;4176:113;;;-1:-1:-1;;4323:1:20;4305:16;;4298:27;4081:250::o;4336:271::-;4378:3;4416:5;4410:12;4443:6;4438:3;4431:19;4459:76;4528:6;4521:4;4516:3;4512:14;4505:4;4498:5;4494:16;4459:76;:::i;:::-;4589:2;4568:15;-1:-1:-1;;4564:29:20;4555:39;;;;4596:4;4551:50;;4336:271;-1:-1:-1;;4336:271:20:o;4612:1018::-;5000:4;5029:3;5059:6;5048:9;5041:25;5102:6;5097:2;5086:9;5082:18;5075:34;5145:6;5140:2;5129:9;5125:18;5118:34;5188:6;5183:2;5172:9;5168:18;5161:34;5232:6;5226:3;5215:9;5211:19;5204:35;-1:-1:-1;;;;;5349:2:20;5341:6;5337:15;5331:3;5320:9;5316:19;5309:44;5402:2;5394:6;5390:15;5384:3;5373:9;5369:19;5362:44;;5443:2;5437:3;5426:9;5422:19;5415:31;5469:45;5510:2;5499:9;5495:18;5487:6;5469:45;:::i;:::-;5455:59;;5563:9;5555:6;5551:22;5545:3;5534:9;5530:19;5523:51;5591:33;5617:6;5609;5591:33;:::i;:::-;5583:41;4612:1018;-1:-1:-1;;;;;;;;;;;;4612:1018:20:o;5817:184::-;-1:-1:-1;;;5866:1:20;5859:88;5966:4;5963:1;5956:15;5990:4;5987:1;5980:15;6006:289;6045:3;6066:17;;;6063:197;;-1:-1:-1;;;6113:1:20;6106:88;6217:4;6214:1;6207:15;6245:4;6242:1;6235:15;6063:197;-1:-1:-1;6287:1:20;6276:13;;6006:289::o;7768:437::-;7847:1;7843:12;;;;7890;;;7911:61;;7965:4;7957:6;7953:17;7943:27;;7911:61;8018:2;8010:6;8007:14;7987:18;7984:38;7981:218;;-1:-1:-1;;;8052:1:20;8045:88;8156:4;8153:1;8146:15;8184:4;8181:1;8174:15;9302:287;9431:3;9469:6;9463:13;9485:66;9544:6;9539:3;9532:4;9524:6;9520:17;9485:66;:::i;:::-;9567:16;;;;;9302:287;-1:-1:-1;;9302:287:20:o;9594:184::-;9664:6;9717:2;9705:9;9696:7;9692:23;9688:32;9685:52;;;9733:1;9730;9723:12;9685:52;-1:-1:-1;9756:16:20;;9594:184;-1:-1:-1;9594:184:20:o;10249:545::-;10351:2;10346:3;10343:11;10340:448;;;10387:1;10412:5;10408:2;10401:17;10457:4;10453:2;10443:19;10527:2;10515:10;10511:19;10508:1;10504:27;10498:4;10494:38;10563:4;10551:10;10548:20;10545:47;;;-1:-1:-1;10586:4:20;10545:47;10641:2;10636:3;10632:12;10629:1;10625:20;10619:4;10615:31;10605:41;;10696:82;10714:2;10707:5;10704:13;10696:82;;;10759:17;;;10740:1;10729:13;10696:82;;;10700:3;;;10340:448;10249:545;;;:::o;10970:1352::-;11096:3;11090:10;11123:18;11115:6;11112:30;11109:56;;;11145:18;;:::i;:::-;11174:97;11264:6;11224:38;11256:4;11250:11;11224:38;:::i;:::-;11218:4;11174:97;:::i;:::-;11326:4;;11390:2;11379:14;;11407:1;11402:663;;;;12109:1;12126:6;12123:89;;;-1:-1:-1;12178:19:20;;;12172:26;12123:89;-1:-1:-1;;10927:1:20;10923:11;;;10919:24;10915:29;10905:40;10951:1;10947:11;;;10902:57;12225:81;;11372:944;;11402:663;10196:1;10189:14;;;10233:4;10220:18;;-1:-1:-1;;11438:20:20;;;11556:236;11570:7;11567:1;11564:14;11556:236;;;11659:19;;;11653:26;11638:42;;11751:27;;;;11719:1;11707:14;;;;11586:19;;11556:236;;;11560:3;11820:6;11811:7;11808:19;11805:201;;;11881:19;;;11875:26;-1:-1:-1;;11964:1:20;11960:14;;;11976:3;11956:24;11952:37;11948:42;11933:58;11918:74;;11805:201;-1:-1:-1;;;;;12052:1:20;12036:14;;;12032:22;12019:36;;-1:-1:-1;10970:1352:20:o;12327:267::-;12416:6;12411:3;12404:19;12468:6;12461:5;12454:4;12449:3;12445:14;12432:43;-1:-1:-1;12520:1:20;12495:16;;;12513:4;12491:27;;;12484:38;;;;12576:2;12555:15;;;-1:-1:-1;;12551:29:20;12542:39;;;12538:50;;12327:267::o;12599:725::-;12928:6;12917:9;12910:25;12971:6;12966:2;12955:9;12951:18;12944:34;13014:6;13009:2;12998:9;12994:18;12987:34;13057:6;13052:2;13041:9;13037:18;13030:34;13101:3;13095;13084:9;13080:19;13073:32;12891:4;13128:63;13186:3;13175:9;13171:19;13163:6;13155;13128:63;:::i;:::-;13240:9;13232:6;13228:22;13222:3;13211:9;13207:19;13200:51;13268:50;13311:6;13303;13295;13268:50;:::i;:::-;13260:58;12599:725;-1:-1:-1;;;;;;;;;;;12599:725:20:o", + "linkReferences": {} + }, + "methodIdentifiers": { + "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" + }, + "rawMetadata": "{\"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\":{\"src/main/solidity/contracts/HashTimeLock.sol\":\"HashTimeLock\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":1000},\"remappings\":[\":ds-test/=vendor/forge-std/lib/ds-test/src/\",\":forge-std/=vendor/forge-std/src/\"]},\"sources\":{\"src/main/solidity/contracts/HashTimeLock.sol\":{\"keccak256\":\"0xa00732f69b02163ef36d788b0c60ae758de92ab15e7f4f2e457ef1f5aff29394\",\"urls\":[\"bzz-raw://928d20b5fe410711d7a8bfb60932bf0fbf98fb2b773e420624f31f93a406597f\",\"dweb:/ipfs/QmTJftPdu8teFz9vhkrBHPSj8pmCS9zMuctGf4JqjanpPa\"]}},\"version\":1}", + "metadata": { + "compiler": { + "version": "0.8.19+commit.7dd6d404" }, - { - "inputs": [ + "language": "Solidity", + "output": { + "abi": [ { - "internalType": "bytes32[]", - "name": "ids", - "type": "bytes32[]" - } - ], - "name": "getStatus", - "outputs": [ + "inputs": [ + { + "internalType": "uint256", + "name": "inputAmount", + "type": "uint256", + "indexed": false + }, + { + "internalType": "uint256", + "name": "outputAmount", + "type": "uint256", + "indexed": false + }, + { + "internalType": "uint256", + "name": "expiration", + "type": "uint256", + "indexed": false + }, + { + "internalType": "bytes32", + "name": "id", + "type": "bytes32", + "indexed": true + }, + { + "internalType": "bytes32", + "name": "hashLock", + "type": "bytes32", + "indexed": false + }, + { + "internalType": "address", + "name": "sender", + "type": "address", + "indexed": true + }, + { + "internalType": "address", + "name": "receiver", + "type": "address", + "indexed": true + }, + { + "internalType": "string", + "name": "outputNetwork", + "type": "string", + "indexed": false + }, + { + "internalType": "string", + "name": "outputAddress", + "type": "string", + "indexed": false + } + ], + "type": "event", + "name": "NewContract", + "anonymous": false + }, { - "internalType": "uint256[]", - "name": "", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ + "inputs": [ + { + "internalType": "bytes32", + "name": "id", + "type": "bytes32", + "indexed": true + }, + { + "internalType": "bytes32", + "name": "hashLock", + "type": "bytes32", + "indexed": false + }, + { + "internalType": "address", + "name": "sender", + "type": "address", + "indexed": true + }, + { + "internalType": "address", + "name": "receiver", + "type": "address", + "indexed": true + } + ], + "type": "event", + "name": "Refund", + "anonymous": false + }, { - "internalType": "bytes32", - "name": "id", - "type": "bytes32" - } - ], - "name": "getSingleStatus", - "outputs": [ + "inputs": [ + { + "internalType": "bytes32", + "name": "id", + "type": "bytes32", + "indexed": true + }, + { + "internalType": "bytes32", + "name": "secret", + "type": "bytes32", + "indexed": false + }, + { + "internalType": "bytes32", + "name": "hashLock", + "type": "bytes32", + "indexed": false + }, + { + "internalType": "address", + "name": "sender", + "type": "address", + "indexed": true + }, + { + "internalType": "address", + "name": "receiver", + "type": "address", + "indexed": true + } + ], + "type": "event", + "name": "Withdraw", + "anonymous": false + }, { - "internalType": "uint256", - "name": "result", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ + "inputs": [ + { + "internalType": "bytes32", + "name": "id", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function", + "name": "contractExists", + "outputs": [ + { + "internalType": "bool", + "name": "result", + "type": "bool" + } + ] + }, { - "internalType": "bytes32", - "name": "id", - "type": "bytes32" - } - ], - "name": "contractExists", - "outputs": [ + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function", + "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" + } + ] + }, { - "internalType": "bool", - "name": "result", - "type": "bool" + "inputs": [ + { + "internalType": "bytes32", + "name": "id", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function", + "name": "getSingleStatus", + "outputs": [ + { + "internalType": "uint256", + "name": "result", + "type": "uint256" + } + ] + }, + { + "inputs": [ + { + "internalType": "bytes32[]", + "name": "ids", + "type": "bytes32[]" + } + ], + "stateMutability": "view", + "type": "function", + "name": "getStatus", + "outputs": [ + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + } + ] + }, + { + "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" + } + ], + "stateMutability": "payable", + "type": "function", + "name": "newContract" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "id", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function", + "name": "refund" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "id", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "secret", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function", + "name": "withdraw" } ], - "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": [] - }, + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } + }, + "settings": { + "remappings": [ + ":ds-test/=vendor/forge-std/lib/ds-test/src/", + ":forge-std/=vendor/forge-std/src/" + ], + "optimizer": { + "enabled": true, + "runs": 1000 + }, + "metadata": { + "bytecodeHash": "ipfs" + }, + "compilationTarget": { + "src/main/solidity/contracts/HashTimeLock.sol": "HashTimeLock" + }, + "libraries": {} + }, + "sources": { + "src/main/solidity/contracts/HashTimeLock.sol": { + "keccak256": "0xa00732f69b02163ef36d788b0c60ae758de92ab15e7f4f2e457ef1f5aff29394", + "urls": [ + "bzz-raw://928d20b5fe410711d7a8bfb60932bf0fbf98fb2b773e420624f31f93a406597f", + "dweb:/ipfs/QmTJftPdu8teFz9vhkrBHPSj8pmCS9zMuctGf4JqjanpPa" + ], + "license": null + } + }, + "version": 1 + }, + "ast": { + "absolutePath": "src/main/solidity/contracts/HashTimeLock.sol", + "id": 415, + "exportedSymbols": { + "HashTimeLock": [ + 414 + ] + }, + "nodeType": "SourceUnit", + "src": "0:4432:0", + "nodes": [ + { + "id": 1, + "nodeType": "PragmaDirective", + "src": "0:23:0", + "nodes": [], + "literals": [ + "solidity", + "0.8", + ".19" + ] + }, + { + "id": 414, + "nodeType": "ContractDefinition", + "src": "25:4406:0", + "nodes": [ { - "body": { - "nodeType": "YulBlock", - "src": "89:303:3", - "statements": [ - { - "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" - }, - { - "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" - } - ] - }, - { - "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" - }, - { - "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" - } - ] + "id": 6, + "nodeType": "VariableDeclaration", + "src": "54:49:0", + "nodes": [], + "constant": false, + "functionSelector": "ec56a373", + "mutability": "mutable", + "name": "contracts", + "nameLocation": "94:9:0", + "scope": 414, + "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": "62:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Mapping", + "src": "54: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": [ + "73:12:0" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 40, + "src": "73:12:0" }, - { - "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" + "referencedDeclaration": 40, + "src": "73:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_LockContract_$40_storage_ptr", + "typeString": "struct HashTimeLock.LockContract" } - ] + } }, - "name": "abi_decode_t_string_calldata", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "offset", - "nodeType": "YulTypedName", - "src": "52:6:3", - "type": "" + "visibility": "public" + }, + { + "id": 9, + "nodeType": "VariableDeclaration", + "src": "224:25:0", + "nodes": [], + "constant": true, + "mutability": "constant", + "name": "INIT", + "nameLocation": "241:4:0", + "scope": 414, + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "224:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "hexValue": "30", + "id": 8, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "248:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" }, - { - "name": "end", - "nodeType": "YulTypedName", - "src": "60:3:3", - "type": "" + "value": "0" + }, + "visibility": "internal" + }, + { + "id": 12, + "nodeType": "VariableDeclaration", + "src": "298:27:0", + "nodes": [], + "constant": true, + "mutability": "constant", + "name": "ACTIVE", + "nameLocation": "315:6:0", + "scope": 414, + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 10, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "298:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" } - ], - "returnVariables": [ - { - "name": "arrayPos", - "nodeType": "YulTypedName", - "src": "68:8:3", - "type": "" + }, + "value": { + "hexValue": "31", + "id": 11, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "324:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" }, - { - "name": "length", - "nodeType": "YulTypedName", - "src": "78:6:3", - "type": "" + "value": "1" + }, + "visibility": "internal" + }, + { + "id": 15, + "nodeType": "VariableDeclaration", + "src": "380:29:0", + "nodes": [], + "constant": true, + "mutability": "constant", + "name": "REFUNDED", + "nameLocation": "397:8:0", + "scope": 414, + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "380:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" } - ], - "src": "14:378:3" + }, + "value": { + "hexValue": "32", + "id": 14, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "408:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "visibility": "internal" }, { - "body": { - "nodeType": "YulBlock", - "src": "492:918:3", - "statements": [ - { - "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": "" - } - ] - }, - { - "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" + "id": 18, + "nodeType": "VariableDeclaration", + "src": "451:30:0", + "nodes": [], + "constant": true, + "mutability": "constant", + "name": "WITHDRAWN", + "nameLocation": "468:9:0", + "scope": 414, + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "451:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "hexValue": "33", + "id": 17, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "480:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "visibility": "internal" + }, + { + "id": 21, + "nodeType": "VariableDeclaration", + "src": "524:28:0", + "nodes": [], + "constant": true, + "mutability": "constant", + "name": "EXPIRED", + "nameLocation": "541:7:0", + "scope": 414, + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "524:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "hexValue": "34", + "id": 20, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "551:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_4_by_1", + "typeString": "int_const 4" + }, + "value": "4" + }, + "visibility": "internal" + }, + { + "id": 40, + "nodeType": "StructDefinition", + "src": "600:290:0", + "nodes": [], + "canonicalName": "HashTimeLock.LockContract", + "members": [ + { + "constant": false, + "id": 23, + "mutability": "mutable", + "name": "inputAmount", + "nameLocation": "638:11:0", + "nodeType": "VariableDeclaration", + "scope": 40, + "src": "630:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" }, - { - "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": "" - } - ] + "typeName": { + "id": 22, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "630:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } }, - { - "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": "" - } - ] + "visibility": "internal" + }, + { + "constant": false, + "id": 25, + "mutability": "mutable", + "name": "outputAmount", + "nameLocation": "667:12:0", + "nodeType": "VariableDeclaration", + "scope": 40, + "src": "659:20:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" }, - { - "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" + "typeName": { + "id": 24, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "659:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } }, - { - "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": "" - } - ] + "visibility": "internal" + }, + { + "constant": false, + "id": 27, + "mutability": "mutable", + "name": "expiration", + "nameLocation": "697:10:0", + "nodeType": "VariableDeclaration", + "scope": 40, + "src": "689:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" }, - { - "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" + "typeName": { + "id": 26, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "689:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } }, - { - "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": "" - } - ] + "visibility": "internal" + }, + { + "constant": false, + "id": 29, + "mutability": "mutable", + "name": "status", + "nameLocation": "725:6:0", + "nodeType": "VariableDeclaration", + "scope": 40, + "src": "717:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 28, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "717:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 31, + "mutability": "mutable", + "name": "hashLock", + "nameLocation": "749:8:0", + "nodeType": "VariableDeclaration", + "scope": 40, + "src": "741:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 30, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "741:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 33, + "mutability": "mutable", + "name": "sender", + "nameLocation": "783:6:0", + "nodeType": "VariableDeclaration", + "scope": 40, + "src": "767:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 32, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "767:15:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 35, + "mutability": "mutable", + "name": "receiver", + "nameLocation": "815:8:0", + "nodeType": "VariableDeclaration", + "scope": 40, + "src": "799:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 34, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "799:15:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 37, + "mutability": "mutable", + "name": "outputNetwork", + "nameLocation": "840:13:0", + "nodeType": "VariableDeclaration", + "scope": 40, + "src": "833:20:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + }, + "typeName": { + "id": 36, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "833:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 39, + "mutability": "mutable", + "name": "outputAddress", + "nameLocation": "870:13:0", + "nodeType": "VariableDeclaration", + "scope": 40, + "src": "863:20:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + }, + "typeName": { + "id": 38, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "863:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } }, + "visibility": "internal" + } + ], + "name": "LockContract", + "nameLocation": "607:12:0", + "scope": 414, + "visibility": "public" + }, + { + "id": 52, + "nodeType": "EventDefinition", + "src": "896:165:0", + "nodes": [], + "anonymous": false, + "eventSelector": "2d3a5ed13d0553389b4078e01264416362e34d23520fda797fbc17f3905ed131", + "name": "Withdraw", + "nameLocation": "902:8:0", + "parameters": { + "id": 51, + "nodeType": "ParameterList", + "parameters": [ { - "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" - } - ] + "constant": false, + "id": 42, + "indexed": true, + "mutability": "mutable", + "name": "id", + "nameLocation": "936:2:0", + "nodeType": "VariableDeclaration", + "scope": 52, + "src": "920:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" }, - "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" + "typeName": { + "id": 41, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "920:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } }, - "nodeType": "YulIf", - "src": "884:2:3" + "visibility": "internal" }, { - "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" + "constant": false, + "id": 44, + "indexed": false, + "mutability": "mutable", + "name": "secret", + "nameLocation": "956:6:0", + "nodeType": "VariableDeclaration", + "scope": 52, + "src": "948:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" }, - "variables": [ - { - "name": "_4", - "nodeType": "YulTypedName", - "src": "928:2:3", - "type": "" + "typeName": { + "id": 43, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "948:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" } - ] + }, + "visibility": "internal" }, { - "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" + "constant": false, + "id": 46, + "indexed": false, + "mutability": "mutable", + "name": "hashLock", + "nameLocation": "980:8:0", + "nodeType": "VariableDeclaration", + "scope": 52, + "src": "972:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" }, - "variables": [ - { - "name": "dst", - "nodeType": "YulTypedName", - "src": "962:3:3", - "type": "" + "typeName": { + "id": 45, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "972:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" } - ] + }, + "visibility": "internal" }, { - "nodeType": "YulVariableDeclaration", - "src": "1005:16:3", - "value": { - "name": "dst", - "nodeType": "YulIdentifier", - "src": "1018:3:3" + "constant": false, + "id": 48, + "indexed": true, + "mutability": "mutable", + "name": "sender", + "nameLocation": "1014:6:0", + "nodeType": "VariableDeclaration", + "scope": 52, + "src": "998:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" }, - "variables": [ - { - "name": "dst_1", - "nodeType": "YulTypedName", - "src": "1009:5:3", - "type": "" + "typeName": { + "id": 47, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "998:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" } - ] + }, + "visibility": "internal" }, { - "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" - }, - { - "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" + "constant": false, + "id": 50, + "indexed": true, + "mutability": "mutable", + "name": "receiver", + "nameLocation": "1046:8:0", + "nodeType": "VariableDeclaration", + "scope": 52, + "src": "1030:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" }, - "variableNames": [ - { - "name": "dst", - "nodeType": "YulIdentifier", - "src": "1058:3:3" + "typeName": { + "id": 49, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1030:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" } - ] - }, - { - "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": "" - } - ] - }, + "visibility": "internal" + } + ], + "src": "910:150:0" + } + }, + { + "id": 62, + "nodeType": "EventDefinition", + "src": "1067:139:0", + "nodes": [], + "anonymous": false, + "eventSelector": "6fa50d56c31f3efe0cb6ff06232bffce8fe8c4155e3cbb6f2d79dd12631c2522", + "name": "Refund", + "nameLocation": "1073:6:0", + "parameters": { + "id": 61, + "nodeType": "ParameterList", + "parameters": [ { - "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" - } - ] + "constant": false, + "id": 54, + "indexed": true, + "mutability": "mutable", + "name": "id", + "nameLocation": "1105:2:0", + "nodeType": "VariableDeclaration", + "scope": 62, + "src": "1089:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" }, - "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" + "typeName": { + "id": 53, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1089:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } }, - "nodeType": "YulIf", - "src": "1117:2:3" + "visibility": "internal" }, { - "nodeType": "YulVariableDeclaration", - "src": "1189:15:3", - "value": { - "name": "value0", - "nodeType": "YulIdentifier", - "src": "1198:6:3" + "constant": false, + "id": 56, + "indexed": false, + "mutability": "mutable", + "name": "hashLock", + "nameLocation": "1125:8:0", + "nodeType": "VariableDeclaration", + "scope": 62, + "src": "1117:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" }, - "variables": [ - { - "name": "i", - "nodeType": "YulTypedName", - "src": "1193:1:3", - "type": "" + "typeName": { + "id": 55, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1117:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" } - ] + }, + "visibility": "internal" }, { - "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" - } - ] - } - ] + "constant": false, + "id": 58, + "indexed": true, + "mutability": "mutable", + "name": "sender", + "nameLocation": "1159:6:0", + "nodeType": "VariableDeclaration", + "scope": 62, + "src": "1143:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" }, - "pre": { - "nodeType": "YulBlock", - "src": "1217:3:3", - "statements": [] + "typeName": { + "id": 57, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1143:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } }, - "src": "1213:167:3" + "visibility": "internal" }, { - "nodeType": "YulAssignment", - "src": "1389:15:3", - "value": { - "name": "dst_1", - "nodeType": "YulIdentifier", - "src": "1399:5:3" + "constant": false, + "id": 60, + "indexed": true, + "mutability": "mutable", + "name": "receiver", + "nameLocation": "1191:8:0", + "nodeType": "VariableDeclaration", + "scope": 62, + "src": "1175:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" }, - "variableNames": [ - { - "name": "value0", - "nodeType": "YulIdentifier", - "src": "1389:6:3" + "typeName": { + "id": 59, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1175:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" } - ] + }, + "visibility": "internal" } - ] - }, - "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": "" - } - ], - "src": "397:1013:3" + ], + "src": "1079:126:0" + } }, { - "body": { - "nodeType": "YulBlock", - "src": "1485:120:3", - "statements": [ + "id": 82, + "nodeType": "EventDefinition", + "src": "1212:291:0", + "nodes": [], + "anonymous": false, + "eventSelector": "767d0ffbc3d16cc51fc05770a22976e4b0fda9198e37878b76979429b2d5d88c", + "name": "NewContract", + "nameLocation": "1218:11:0", + "parameters": { + "id": 81, + "nodeType": "ParameterList", + "parameters": [ { - "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" - } - ] + "constant": false, + "id": 64, + "indexed": false, + "mutability": "mutable", + "name": "inputAmount", + "nameLocation": "1247:11:0", + "nodeType": "VariableDeclaration", + "scope": 82, + "src": "1239:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" }, - "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" + "typeName": { + "id": 63, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1239:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } }, - "nodeType": "YulIf", - "src": "1495:2:3" + "visibility": "internal" }, { - "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" + "constant": false, + "id": 66, + "indexed": false, + "mutability": "mutable", + "name": "outputAmount", + "nameLocation": "1276:12:0", + "nodeType": "VariableDeclaration", + "scope": 82, + "src": "1268:20:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" }, - "variableNames": [ - { - "name": "value0", - "nodeType": "YulIdentifier", - "src": "1566:6:3" + "typeName": { + "id": 65, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1268:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" } - ] - } - ] - }, - "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": "" - } - ], - "src": "1415:190:3" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "1691:113:3", - "statements": [ - { - "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" + "visibility": "internal" }, { - "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" + "constant": false, + "id": 68, + "indexed": false, + "mutability": "mutable", + "name": "expiration", + "nameLocation": "1306:10:0", + "nodeType": "VariableDeclaration", + "scope": 82, + "src": "1298:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" }, - "variableNames": [ - { - "name": "value0", - "nodeType": "YulIdentifier", - "src": "1772:6:3" + "typeName": { + "id": 67, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1298:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" } - ] - } - ] - }, - "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": [ + }, + "visibility": "internal" + }, { - "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" - } - ] + "constant": false, + "id": 70, + "indexed": true, + "mutability": "mutable", + "name": "id", + "nameLocation": "1342:2:0", + "nodeType": "VariableDeclaration", + "scope": 82, + "src": "1326:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" }, - "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" + "typeName": { + "id": 69, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1326:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } }, - "nodeType": "YulIf", - "src": "1906:2:3" + "visibility": "internal" }, { - "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" + "constant": false, + "id": 72, + "indexed": false, + "mutability": "mutable", + "name": "hashLock", + "nameLocation": "1362:8:0", + "nodeType": "VariableDeclaration", + "scope": 82, + "src": "1354:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" }, - "variableNames": [ - { - "name": "value0", - "nodeType": "YulIdentifier", - "src": "1977:6:3" + "typeName": { + "id": 71, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1354:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" } - ] + }, + "visibility": "internal" }, { - "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" + "constant": false, + "id": 74, + "indexed": true, + "mutability": "mutable", + "name": "sender", + "nameLocation": "1396:6:0", + "nodeType": "VariableDeclaration", + "scope": 82, + "src": "1380:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" }, - "variableNames": [ - { - "name": "value1", - "nodeType": "YulIdentifier", - "src": "2019:6:3" + "typeName": { + "id": 73, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1380:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" } - ] + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 76, + "indexed": true, + "mutability": "mutable", + "name": "receiver", + "nameLocation": "1428:8:0", + "nodeType": "VariableDeclaration", + "scope": 82, + "src": "1412:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 75, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1412:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 78, + "indexed": false, + "mutability": "mutable", + "name": "outputNetwork", + "nameLocation": "1453:13:0", + "nodeType": "VariableDeclaration", + "scope": 82, + "src": "1446:20:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 77, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1446:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 80, + "indexed": false, + "mutability": "mutable", + "name": "outputAddress", + "nameLocation": "1483:13:0", + "nodeType": "VariableDeclaration", + "scope": 82, + "src": "1476:20:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 79, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1476:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" } - ] - }, - "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": "" - } - ], - "src": "1809:258:3" + ], + "src": "1229:273:0" + } }, { + "id": 177, + "nodeType": "FunctionDefinition", + "src": "1509:1153:0", + "nodes": [], "body": { - "nodeType": "YulBlock", - "src": "2275:951:3", + "id": 176, + "nodeType": "Block", + "src": "1749:913:0", + "nodes": [], "statements": [ { - "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": { + "assignments": [ + 98 + ], + "declarations": [ + { + "constant": false, + "id": 98, + "mutability": "mutable", + "name": "sender", + "nameLocation": "1775:6:0", + "nodeType": "VariableDeclaration", + "scope": 176, + "src": "1759:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 97, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1759:15:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "visibility": "internal" + } + ], + "id": 104, + "initialValue": { "arguments": [ { - "arguments": [ - { - "name": "dataEnd", - "nodeType": "YulIdentifier", - "src": "2296:7:3" - }, - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "2305:9:3" + "expression": { + "id": 101, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1792:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" } - ], - "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" + "id": 102, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "1796:6:0", + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "1792:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } } ], - "functionName": { - "name": "slt", - "nodeType": "YulIdentifier", - "src": "2288:3:3" + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 100, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1784:8:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_payable_$", + "typeString": "type(address payable)" + }, + "typeName": { + "id": 99, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1784:8:0", + "stateMutability": "payable", + "typeDescriptions": {} + } }, - "nodeType": "YulFunctionCall", - "src": "2288:33:3" + "id": 103, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1784:19:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } }, - "nodeType": "YulIf", - "src": "2285:2:3" + "nodeType": "VariableDeclarationStatement", + "src": "1759:44:0" }, { - "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": [ + "assignments": [ + 106 + ], + "declarations": [ { - "name": "value0", - "nodeType": "YulIdentifier", - "src": "2357:6:3" + "constant": false, + "id": 106, + "mutability": "mutable", + "name": "inputAmount", + "nameLocation": "1821:11:0", + "nodeType": "VariableDeclaration", + "scope": 176, + "src": "1813:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 105, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1813:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" } - ] - }, - { - "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" - }, - "nodeType": "YulFunctionCall", - "src": "2422:18:3" + ], + "id": 109, + "initialValue": { + "expression": { + "id": 107, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1835:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" } - ], - "functionName": { - "name": "calldataload", - "nodeType": "YulIdentifier", - "src": "2409:12:3" }, - "nodeType": "YulFunctionCall", - "src": "2409:32:3" - }, - "variableNames": [ - { - "name": "value1", - "nodeType": "YulIdentifier", - "src": "2399:6:3" + "id": 108, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "1839:5:0", + "memberName": "value", + "nodeType": "MemberAccess", + "src": "1835:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" } - ] + }, + "nodeType": "VariableDeclarationStatement", + "src": "1813:31:0" }, { - "nodeType": "YulAssignment", - "src": "2450:42:3", - "value": { + "expression": { "arguments": [ { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "2477:9:3" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "2488:2:3", - "type": "", - "value": "64" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "2473:3:3" + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" }, - "nodeType": "YulFunctionCall", - "src": "2473:18:3" - } - ], - "functionName": { - "name": "calldataload", - "nodeType": "YulIdentifier", - "src": "2460:12:3" - }, - "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" + "id": 114, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 111, + "name": "expiration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 86, + "src": "1863:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "expression": { + "id": 112, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "1876:5:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "2542:2:3", - "type": "", - "value": "96" + "id": 113, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "1882:9:0", + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "1876:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "2527:3:3" }, - "nodeType": "YulFunctionCall", - "src": "2527:18:3" + "src": "1863: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": "1893:14:0", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b98f3e47db5919a8c78ec10ff6bf7d1326066d3facdc164cf7441d38cae771df", + "typeString": "literal_string \"INVALID_TIME\"" + }, + "value": "INVALID_TIME" } ], - "functionName": { - "name": "calldataload", - "nodeType": "YulIdentifier", - "src": "2514:12:3" + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b98f3e47db5919a8c78ec10ff6bf7d1326066d3facdc164cf7441d38cae771df", + "typeString": "literal_string \"INVALID_TIME\"" + } + ], + "id": 110, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "1855:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } }, - "nodeType": "YulFunctionCall", - "src": "2514:32:3" - }, - "variables": [ - { - "name": "value", - "nodeType": "YulTypedName", - "src": "2505:5:3", - "type": "" + "id": 116, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1855:53:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" } - ] + }, + "id": 117, + "nodeType": "ExpressionStatement", + "src": "1855:53:0" }, { - "body": { - "nodeType": "YulBlock", - "src": "2609:26:3", - "statements": [ + "expression": { + "arguments": [ { - "expression": { - "arguments": [ - { - "name": "value4", - "nodeType": "YulIdentifier", - "src": "2618:6:3" - }, - { - "name": "value4", - "nodeType": "YulIdentifier", - "src": "2626:6:3" - } - ], - "functionName": { - "name": "revert", - "nodeType": "YulIdentifier", - "src": "2611:6:3" + "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": "1927: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": "1941:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" }, - "nodeType": "YulFunctionCall", - "src": "2611:22:3" + "value": "0" }, - "nodeType": "YulExpressionStatement", - "src": "2611:22:3" - } - ] - }, - "condition": { - "arguments": [ + "src": "1927:15:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, { - "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" - }, - "nodeType": "YulFunctionCall", - "src": "2575:31:3" - } - ], - "functionName": { - "name": "eq", - "nodeType": "YulIdentifier", - "src": "2565:2:3" + "hexValue": "494e56414c49445f414d4f554e54", + "id": 122, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1944:16:0", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_eb6dbbf3194e9f4dd39c8dabe51ddb59ca6ad00c50b1bc74675ce4b263687722", + "typeString": "literal_string \"INVALID_AMOUNT\"" }, - "nodeType": "YulFunctionCall", - "src": "2565:42:3" + "value": "INVALID_AMOUNT" } ], - "functionName": { - "name": "iszero", - "nodeType": "YulIdentifier", - "src": "2558:6:3" + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_eb6dbbf3194e9f4dd39c8dabe51ddb59ca6ad00c50b1bc74675ce4b263687722", + "typeString": "literal_string \"INVALID_AMOUNT\"" + } + ], + "id": 118, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "1919:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } }, - "nodeType": "YulFunctionCall", - "src": "2558:50:3" + "id": 123, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1919:42:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } }, - "nodeType": "YulIf", - "src": "2555:2:3" + "id": 124, + "nodeType": "ExpressionStatement", + "src": "1919:42:0" }, { - "nodeType": "YulAssignment", - "src": "2644:15:3", - "value": { - "name": "value", - "nodeType": "YulIdentifier", - "src": "2654:5:3" - }, - "variableNames": [ + "assignments": [ + 126 + ], + "declarations": [ { - "name": "value3", - "nodeType": "YulIdentifier", - "src": "2644:6:3" + "constant": false, + "id": 126, + "mutability": "mutable", + "name": "id", + "nameLocation": "1980:2:0", + "nodeType": "VariableDeclaration", + "scope": 176, + "src": "1972:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 125, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1972:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" } - ] - }, - { - "nodeType": "YulVariableDeclaration", - "src": "2668:47:3", - "value": { + ], + "id": 137, + "initialValue": { "arguments": [ { "arguments": [ { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "2699:9:3" + "id": 130, + "name": "sender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 98, + "src": "2022:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } }, { - "kind": "number", - "nodeType": "YulLiteral", - "src": "2710:3:3", - "type": "", - "value": "128" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "2695:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "2695:19:3" - } - ], - "functionName": { - "name": "calldataload", - "nodeType": "YulIdentifier", - "src": "2682:12:3" - }, - "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" + "id": 131, + "name": "receiver", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 90, + "src": "2030:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" } - ], - "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" + "id": 132, + "name": "inputAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 106, + "src": "2040:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } }, { - "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" + "id": 133, + "name": "hashLock", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 88, + "src": "2053:8:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } }, { - "kind": "number", - "nodeType": "YulLiteral", - "src": "3008:3:3", - "type": "", - "value": "160" + "id": 134, + "name": "expiration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 86, + "src": "2063:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } } ], - "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": [ + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, { - "name": "value6", - "nodeType": "YulIdentifier", - "src": "3051:6:3" + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" }, { - "name": "value6", - "nodeType": "YulIdentifier", - "src": "3059:6:3" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } ], - "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" + "expression": { + "id": 128, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "2005:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } }, - { - "name": "offset_1", - "nodeType": "YulIdentifier", - "src": "3147:8:3" + "id": 129, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "2009:12:0", + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "src": "2005:16:0", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "3132:3:3" }, - "nodeType": "YulFunctionCall", - "src": "3132:24:3" - }, - { - "name": "dataEnd", - "nodeType": "YulIdentifier", - "src": "3158:7:3" + "id": 135, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2005:69:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } } ], - "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": "" + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 127, + "name": "sha256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -22, + "src": "1985:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_sha256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } }, - { - "name": "value7_1", - "nodeType": "YulTypedName", - "src": "3091:8:3", - "type": "" + "id": 136, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1985:99:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" } - ] - }, - { - "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": "VariableDeclarationStatement", + "src": "1972:112:0" }, - { - "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" + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" }, - "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" + "id": 144, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "id": 139, + "name": "contracts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6, + "src": "2103: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": "2113:2:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "3401:3:3" }, - "nodeType": "YulFunctionCall", - "src": "3401:16:3" + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2103:13:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_LockContract_$40_storage", + "typeString": "struct HashTimeLock.LockContract storage ref" + } }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "3419:4:3", - "type": "", - "value": "0x20" + "id": 142, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "2117:6:0", + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 29, + "src": "2103:20:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" } - ], - "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" + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 143, + "name": "INIT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9, + "src": "2127:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "3450:3:3" }, - "nodeType": "YulFunctionCall", - "src": "3450:39:3" + "src": "2103:28:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } }, { - "kind": "number", - "nodeType": "YulLiteral", - "src": "3491:4:3", - "type": "", - "value": "0x20" + "hexValue": "535741505f455849535453", + "id": 145, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2133:13:0", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_10858945dd31484ce6a77564821a1a6ff0e82939d9bea2b8e6caae50c7fc3750", + "typeString": "literal_string \"SWAP_EXISTS\"" + }, + "value": "SWAP_EXISTS" } ], - "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" + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_10858945dd31484ce6a77564821a1a6ff0e82939d9bea2b8e6caae50c7fc3750", + "typeString": "literal_string \"SWAP_EXISTS\"" + } + ], + "id": 138, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "2095:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" } - ], - "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": "" + "id": 146, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2095:52:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" } - ] - }, - { - "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" + "id": 147, + "nodeType": "ExpressionStatement", + "src": "2095:52:0" }, { "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" + "id": 162, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 148, + "name": "contracts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6, + "src": "2158:9:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_LockContract_$40_storage_$", + "typeString": "mapping(bytes32 => struct HashTimeLock.LockContract storage ref)" + } }, - { - "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" + "id": 150, + "indexExpression": { + "id": 149, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 126, + "src": "2168:2:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } }, - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "3688:6:3" + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2158:13:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_LockContract_$40_storage", + "typeString": "struct HashTimeLock.LockContract storage ref" } - ], - "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" + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 152, + "name": "inputAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 106, + "src": "2200:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" } - ], - "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" + { + "id": 153, + "name": "outputAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 84, + "src": "2225:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" } - ], - "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": [ + { + "id": 154, + "name": "expiration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 86, + "src": "2251:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 155, + "name": "ACTIVE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12, + "src": "2275:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 156, + "name": "hashLock", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 88, + "src": "2295:8:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 157, + "name": "sender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 98, + "src": "2317:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "id": 158, + "name": "receiver", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 90, + "src": "2337:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "id": 159, + "name": "outputNetwork", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 92, + "src": "2359:13:0", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string calldata" + } + }, + { + "id": 160, + "name": "outputAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 94, + "src": "2386:13:0", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string calldata" + } + } + ], + "expression": { + "argumentTypes": [ { - "name": "pos", - "nodeType": "YulIdentifier", - "src": "4152:3:3" + "typeIdentifier": "t_uint256", + "typeString": "uint256" }, { - "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": [ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, { - "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" + "typeIdentifier": "t_uint256", + "typeString": "uint256" }, { - "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": [ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, { - "name": "pos", - "nodeType": "YulIdentifier", - "src": "4207:3:3" + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" }, { - "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": [ + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, { - "name": "pos", - "nodeType": "YulIdentifier", - "src": "4244:3:3" + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string calldata" }, { - "kind": "number", - "nodeType": "YulLiteral", - "src": "4249:2:3", - "type": "", - "value": "72" + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string calldata" } ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "4240:3:3" - }, - "nodeType": "YulFunctionCall", - "src": "4240:12:3" + "id": 151, + "name": "LockContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 40, + "src": "2174:12:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_struct$_LockContract_$40_storage_ptr_$", + "typeString": "type(struct HashTimeLock.LockContract storage pointer)" + } }, - { - "name": "value3", - "nodeType": "YulIdentifier", - "src": "4254:6:3" + "id": 161, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "structConstructorCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2174:235:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_LockContract_$40_memory_ptr", + "typeString": "struct HashTimeLock.LockContract memory" } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "4233:6:3" }, - "nodeType": "YulFunctionCall", - "src": "4233:28:3" + "src": "2158:251:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_LockContract_$40_storage", + "typeString": "struct HashTimeLock.LockContract storage ref" + } }, - "nodeType": "YulExpressionStatement", - "src": "4233:28:3" + "id": 163, + "nodeType": "ExpressionStatement", + "src": "2158:251:0" }, { - "expression": { + "eventCall": { "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" + "id": 165, + "name": "inputAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 106, + "src": "2450:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } }, { - "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" + "id": 166, + "name": "outputAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 84, + "src": "2475:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } }, { - "name": "pos", - "nodeType": "YulIdentifier", - "src": "4750:3:3" + "id": 167, + "name": "expiration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 86, + "src": "2501:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } }, { - "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" + "id": 168, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 126, + "src": "2525:2:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } }, { - "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" + "id": 169, + "name": "hashLock", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 88, + "src": "2541:8:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } }, { - "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" + "id": 170, + "name": "sender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 98, + "src": "2563:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } }, { - "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" + "id": 171, + "name": "receiver", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 90, + "src": "2583:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } }, { - "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" + "id": 172, + "name": "outputNetwork", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 92, + "src": "2605:13:0", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string calldata" + } }, { - "kind": "number", - "nodeType": "YulLiteral", - "src": "5173:2:3", - "type": "", - "value": "64" + "id": 173, + "name": "outputAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 94, + "src": "2632:13:0", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string calldata" + } } ], - "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" + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" }, - "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" + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" }, - "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" + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" }, - "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" + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" }, - "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" + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" }, - "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" + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" }, - "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", - "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" + { + "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": "2425: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": 77, - "name": "ElementaryTypeName", - "src": "702:7:1" - } - ], - "id": 78, - "name": "VariableDeclaration", - "src": "702:19:1" - }, - { - "attributes": { + "id": 174, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2425:230:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 175, + "nodeType": "EmitStatement", + "src": "2420:235:0" + } + ] + }, + "functionSelector": "d3632095", + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "newContract", + "nameLocation": "1518:11:0", + "parameters": { + "id": 95, + "nodeType": "ParameterList", + "parameters": [ + { "constant": false, + "id": 84, "mutability": "mutable", "name": "outputAmount", - "scope": 95, + "nameLocation": "1547:12:0", + "nodeType": "VariableDeclaration", + "scope": 177, + "src": "1539:20:0", "stateVariable": false, "storageLocation": "default", - "type": "uint256", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 83, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1539:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "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, + "id": 86, "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, + "nameLocation": "1577:10:0", + "nodeType": "VariableDeclaration", + "scope": 177, + "src": "1569:18:0", "stateVariable": false, "storageLocation": "default", - "type": "uint256", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 85, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1569:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "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, + "id": 88, "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, + "nameLocation": "1605:8:0", + "nodeType": "VariableDeclaration", + "scope": 177, + "src": "1597:16:0", "stateVariable": false, "storageLocation": "default", - "type": "address payable", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 87, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1597:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, "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, + "id": 90, "mutability": "mutable", "name": "receiver", - "scope": 95, + "nameLocation": "1639:8:0", + "nodeType": "VariableDeclaration", + "scope": 177, + "src": "1623:24:0", "stateVariable": false, "storageLocation": "default", - "type": "address payable", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "payable", - "type": "address payable" - }, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { "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", + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1623:15:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, "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, + "id": 92, "mutability": "mutable", - "name": "outputAddress", - "scope": 95, + "name": "outputNetwork", + "nameLocation": "1673:13:0", + "nodeType": "VariableDeclaration", + "scope": 177, + "src": "1657:29:0", "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" + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string" }, - { - "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" + "typeName": { + "id": 91, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1657:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } }, - { - "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" + "visibility": "internal" + }, + { + "constant": false, + "id": 94, + "mutability": "mutable", + "name": "outputAddress", + "nameLocation": "1712:13:0", + "nodeType": "VariableDeclaration", + "scope": 177, + "src": "1696:29:0", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string" }, - { - "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" + "typeName": { + "id": 93, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1696:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "1529:202:0" + }, + "returnParameters": { + "id": 96, + "nodeType": "ParameterList", + "parameters": [], + "src": "1749:0:0" + }, + "scope": 414, + "stateMutability": "payable", + "virtual": false, + "visibility": "external" }, { - "attributes": { - "anonymous": false, - "name": "NewContract" - }, - "children": [ - { - "children": [ - { - "attributes": { + "id": 248, + "nodeType": "FunctionDefinition", + "src": "2668:465:0", + "nodes": [], + "body": { + "id": 247, + "nodeType": "Block", + "src": "2723:410:0", + "nodes": [], + "statements": [ + { + "assignments": [ + 186 + ], + "declarations": [ + { "constant": false, - "indexed": false, + "id": 186, "mutability": "mutable", - "name": "inputAmount", - "scope": 137, + "name": "c", + "nameLocation": "2754:1:0", + "nodeType": "VariableDeclaration", + "scope": 247, + "src": "2733:22:0", "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" + "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": [ + "2733:12:0" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 40, + "src": "2733:12:0" }, - "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", + "referencedDeclaration": 40, + "src": "2733:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_LockContract_$40_storage_ptr", + "typeString": "struct HashTimeLock.LockContract" + } + }, "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 120, - "name": "ElementaryTypeName", - "src": "1340:7:1" + } + ], + "id": 190, + "initialValue": { + "baseExpression": { + "id": 187, + "name": "contracts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6, + "src": "2758:9:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_LockContract_$40_storage_$", + "typeString": "mapping(bytes32 => struct HashTimeLock.LockContract storage ref)" } - ], - "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", + "id": 189, + "indexExpression": { + "id": 188, "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" + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 179, + "src": "2768:2:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" } - ], - "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" + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2758:13:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_LockContract_$40_storage", + "typeString": "struct HashTimeLock.LockContract storage ref" + } }, - { - "attributes": { - "constant": false, - "indexed": false, - "mutability": "mutable", - "name": "outputAddress", - "scope": 137, - "stateVariable": false, - "storageLocation": "default", - "type": "string", - "visibility": "internal" - }, - "children": [ + "nodeType": "VariableDeclarationStatement", + "src": "2733:38:0" + }, + { + "expression": { + "arguments": [ { - "attributes": { - "name": "string", - "type": "string" + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" }, - "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": 195, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 192, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 186, + "src": "2790: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": "2792:6:0", + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 29, + "src": "2790:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "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" + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 194, + "name": "ACTIVE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12, + "src": "2802:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "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": [ + "src": "2790:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, { - "attributes": { - "name": "bytes32", - "type": "bytes32" + "hexValue": "535741505f4e4f545f414354495645", + "id": 196, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2810:17:0", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_afbfa7d3db262df0c92c413f0113503b1c1332dc5a4a874fcd8d6a6de57b74dd", + "typeString": "literal_string \"SWAP_NOT_ACTIVE\"" }, - "id": 142, - "name": "ElementaryTypeName", - "src": "1669:7:1" + "value": "SWAP_NOT_ACTIVE" } ], - "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" + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" }, - "id": 144, - "name": "ElementaryTypeName", - "src": "1695:15:1" + { + "typeIdentifier": "t_stringliteral_afbfa7d3db262df0c92c413f0113503b1c1332dc5a4a874fcd8d6a6de57b74dd", + "typeString": "literal_string \"SWAP_NOT_ACTIVE\"" + } + ], + "id": 191, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "2782:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" } - ], - "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" + "id": 197, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2782:46:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "outputAddress", - "scope": 229, - "stateVariable": false, - "storageLocation": "calldata", - "type": "string", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "string", - "type": "string" - }, - "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 - ] + "id": 198, + "nodeType": "ExpressionStatement", + "src": "2782:46:0" }, - "children": [], - "id": 151, - "name": "ParameterList", - "src": "1821:0:1" - }, - { - "children": [ - { - "attributes": { - "assignments": [ - 153 - ] - }, - "children": [ + { + "expression": { + "arguments": [ { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "sender", - "scope": 228, - "stateVariable": false, - "storageLocation": "default", - "type": "address payable", - "visibility": "internal" + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "payable", - "type": "address payable" - }, - "id": 152, - "name": "ElementaryTypeName", - "src": "1831:15:1" - } - ], - "id": 153, - "name": "VariableDeclaration", - "src": "1831:22:1" - }, - { - "attributes": { + "id": 204, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 200, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 186, + "src": "2847:1:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_LockContract_$40_storage_ptr", + "typeString": "struct HashTimeLock.LockContract storage pointer" + } + }, + "id": 201, "isConstant": false, - "isLValue": false, + "isLValue": true, "isPure": false, "lValueRequested": false, - "member_name": "sender", - "type": "address payable" - }, - "children": [ - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": -15, - "type": "msg", - "value": "msg" - }, - "id": 154, - "name": "Identifier", - "src": "1856:3:1" + "memberLocation": "2849:10:0", + "memberName": "expiration", + "nodeType": "MemberAccess", + "referencedDeclaration": 27, + "src": "2847:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" } - ], - "id": 155, - "name": "MemberAccess", - "src": "1856:10:1" - } - ], - "id": 156, - "name": "VariableDeclarationStatement", - "src": "1831:35:1" - }, - { - "attributes": { - "assignments": [ - 158 - ] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "inputAmount", - "scope": 228, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "visibility": "internal" }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 157, - "name": "ElementaryTypeName", - "src": "1876:7:1" - } - ], - "id": 158, - "name": "VariableDeclaration", - "src": "1876:19:1" - }, - { - "attributes": { + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "expression": { + "id": 202, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "2862:5:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 203, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, - "member_name": "value", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": -15, - "type": "msg", - "value": "msg" - }, - "id": 159, - "name": "Identifier", - "src": "1898:3:1" + "memberLocation": "2868:9:0", + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "2862:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" } - ], - "id": 160, - "name": "MemberAccess", - "src": "1898:9:1" + }, + "src": "2847: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": "2879:14:0", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b98f3e47db5919a8c78ec10ff6bf7d1326066d3facdc164cf7441d38cae771df", + "typeString": "literal_string \"INVALID_TIME\"" + }, + "value": "INVALID_TIME" } ], - "id": 161, - "name": "VariableDeclarationStatement", - "src": "1876:31:1" + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b98f3e47db5919a8c78ec10ff6bf7d1326066d3facdc164cf7441d38cae771df", + "typeString": "literal_string \"INVALID_TIME\"" + } + ], + "id": 199, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "2839: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": "2839:55:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } }, - { - "children": [ + "id": 207, + "nodeType": "ExpressionStatement", + "src": "2839:55:0" + }, + { + "expression": { + "arguments": [ { - "attributes": { + "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": "2913:1:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_LockContract_$40_storage_ptr", + "typeString": "struct HashTimeLock.LockContract storage pointer" + } + }, + "id": 210, "isConstant": false, - "isLValue": false, + "isLValue": true, "isPure": false, - "isStructConstructorCall": false, "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "tuple()", - "type_conversion": false + "memberLocation": "2915:8:0", + "memberName": "hashLock", + "nodeType": "MemberAccess", + "referencedDeclaration": 31, + "src": "2913:10:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "arguments": [ + { + "arguments": [ { - "typeIdentifier": "t_stringliteral_b98f3e47db5919a8c78ec10ff6bf7d1326066d3facdc164cf7441d38cae771df", - "typeString": "literal_string \"INVALID_TIME\"" + "id": 214, + "name": "secret", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 181, + "src": "2954:6:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } } ], - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "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" - }, - "children": [ - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 141, - "type": "uint256", - "value": "expiration" - }, - "id": 163, - "name": "Identifier", - "src": "1926:10:1" - }, - { - "attributes": { - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "timestamp", - "type": "uint256" - }, - "children": [ + "expression": { + "argumentTypes": [ { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": -4, - "type": "block", - "value": "block" - }, - "id": 164, - "name": "Identifier", - "src": "1939:5:1" + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" } ], - "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" - }, - "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" + "expression": { + "id": 212, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "2937:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } }, - { - "typeIdentifier": "t_stringliteral_eb6dbbf3194e9f4dd39c8dabe51ddb59ca6ad00c50b1bc74675ce4b263687722", - "typeString": "literal_string \"INVALID_AMOUNT\"" + "id": 213, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "2941:12:0", + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "src": "2937:16:0", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" } - ], - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 170, - "name": "Identifier", - "src": "1982:7:1" - }, - { - "attributes": { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" }, + "id": 215, "isConstant": false, "isLValue": false, "isPure": false, + "kind": "functionCall", "lValueRequested": false, - "operator": ">", - "type": "bool" - }, - "children": [ - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 158, - "type": "uint256", - "value": "inputAmount" - }, - "id": 171, - "name": "Identifier", - "src": "1990:11:1" - }, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2937:24:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ { - "attributes": { - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "token": "number", - "type": "int_const 0", - "value": "0" - }, - "id": 172, - "name": "Literal", - "src": "2004:1:1" + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" } ], - "id": 173, - "name": "BinaryOperation", - "src": "1990:15:1" + "id": 211, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "2927:9:0", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } }, - { - "attributes": { - "hexvalue": "494e56414c49445f414d4f554e54", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "token": "string", - "type": "literal_string \"INVALID_AMOUNT\"", - "value": "INVALID_AMOUNT" - }, - "id": 174, - "name": "Literal", - "src": "2007:16:1" + "id": 216, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2927:35:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" } - ], - "id": 175, - "name": "FunctionCall", - "src": "1982:42:1" + }, + "src": "2913: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": "2963:16:0", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_20442b474b3561be70a7e12c2acf875277f59e68e7748337cd68bf5c8ada064b", + "typeString": "literal_string \"INVALID_SECRET\"" + }, + "value": "INVALID_SECRET" } ], - "id": 176, - "name": "ExpressionStatement", - "src": "1982:42:1" + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_20442b474b3561be70a7e12c2acf875277f59e68e7748337cd68bf5c8ada064b", + "typeString": "literal_string \"INVALID_SECRET\"" + } + ], + "id": 208, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "2905: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": "2905:75:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } }, - { - "attributes": { - "assignments": [ - 178 - ] + "id": 220, + "nodeType": "ExpressionStatement", + "src": "2905:75:0" + }, + { + "expression": { + "id": 225, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 221, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 186, + "src": "2991: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": "2993:6:0", + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 29, + "src": "2991:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 224, + "name": "WITHDRAWN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18, + "src": "3002:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } }, - "children": [ + "src": "2991:20:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 226, + "nodeType": "ExpressionStatement", + "src": "2991:20:0" + }, + { + "expression": { + "arguments": [ { - "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" + "expression": { + "id": 232, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 186, + "src": "3042:1:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_LockContract_$40_storage_ptr", + "typeString": "struct HashTimeLock.LockContract storage pointer" } - ], - "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": [ - { - "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" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "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": 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" - } - ], - "id": 187, - "name": "FunctionCall", - "src": "2068:69:1" - } - ], - "id": 188, - "name": "FunctionCall", - "src": "2048:99:1" + "id": 233, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3044:11:0", + "memberName": "inputAmount", + "nodeType": "MemberAccess", + "referencedDeclaration": 23, + "src": "3042:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } } ], - "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 - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "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" - }, - "children": [ - { - "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": 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" - }, - "id": 195, - "name": "Identifier", - "src": "2190:7:1" - } - ], - "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" + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "expression": { + "id": 227, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 186, + "src": "3022:1:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_LockContract_$40_storage_ptr", + "typeString": "struct HashTimeLock.LockContract storage pointer" } - ], - "id": 198, - "name": "FunctionCall", - "src": "2158:55:1" + }, + "id": 230, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3024:8:0", + "memberName": "receiver", + "nodeType": "MemberAccess", + "referencedDeclaration": 35, + "src": "3022:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 231, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3033:8:0", + "memberName": "transfer", + "nodeType": "MemberAccess", + "src": "3022:19:0", + "typeDescriptions": { + "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" } - ], - "id": 199, - "name": "ExpressionStatement", - "src": "2158:55:1" + }, + "id": 234, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3022:34:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } }, - { - "children": [ + "id": 235, + "nodeType": "ExpressionStatement", + "src": "3022:34:0" + }, + { + "eventCall": { + "arguments": [ { - "attributes": { - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "struct HashTimeLock.LockContract storage ref" - }, - "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" - }, - { - "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" - } - ], - "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" - }, - "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" - }, - "id": 209, - "name": "Identifier", - "src": "2383:6:1" - }, - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 145, - "type": "address payable", - "value": "receiver" - }, - "id": 210, - "name": "Identifier", - "src": "2403:8:1" - }, - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 147, - "type": "string calldata", - "value": "outputNetwork" - }, - "id": 211, - "name": "Identifier", - "src": "2425:13:1" - }, - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 149, - "type": "string calldata", - "value": "outputAddress" - }, - "id": 212, - "name": "Identifier", - "src": "2452:13:1" - } - ], - "id": 213, - "name": "FunctionCall", - "src": "2240:235:1" + "id": 237, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 179, + "src": "3081:2:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 238, + "name": "secret", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 181, + "src": "3085:6:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "expression": { + "id": 239, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 186, + "src": "3093:1:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_LockContract_$40_storage_ptr", + "typeString": "struct HashTimeLock.LockContract storage pointer" } - ], - "id": 214, - "name": "Assignment", - "src": "2224:251:1" - } - ], - "id": 215, - "name": "ExpressionStatement", - "src": "2224:251:1" - }, - { - "children": [ + }, + "id": 240, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3095:8:0", + "memberName": "hashLock", + "nodeType": "MemberAccess", + "referencedDeclaration": 31, + "src": "3093:10:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, { - "attributes": { - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "tuple()", - "type_conversion": false + "expression": { + "id": 241, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 186, + "src": "3105:1:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_LockContract_$40_storage_ptr", + "typeString": "struct HashTimeLock.LockContract storage pointer" + } }, - "children": [ - { - "attributes": { - "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" - } - ], - "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": 242, + "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" + } + }, + { + "expression": { + "id": 243, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 186, + "src": "3115:1:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_LockContract_$40_storage_ptr", + "typeString": "struct HashTimeLock.LockContract storage pointer" } - ], - "id": 226, - "name": "FunctionCall", - "src": "2491:230:1" + }, + "id": 244, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3117:8:0", + "memberName": "receiver", + "nodeType": "MemberAccess", + "referencedDeclaration": 35, + "src": "3115:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } } ], - "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" + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" }, - "id": 230, - "name": "ElementaryTypeName", - "src": "2752:7:1" + { + "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": "3072: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": 231, - "name": "VariableDeclaration", - "src": "2752:10:1" + }, + "id": 245, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3072:54:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 246, + "nodeType": "EmitStatement", + "src": "3067:59:0" + } + ] + }, + "functionSelector": "63615149", + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "withdraw", + "nameLocation": "2677:8:0", + "parameters": { + "id": 182, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 179, + "mutability": "mutable", + "name": "id", + "nameLocation": "2694:2:0", + "nodeType": "VariableDeclaration", + "scope": 248, + "src": "2686:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 178, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2686:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 181, + "mutability": "mutable", + "name": "secret", + "nameLocation": "2706:6:0", + "nodeType": "VariableDeclaration", + "scope": 248, + "src": "2698:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 180, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2698:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } }, - { - "attributes": { + "visibility": "internal" + } + ], + "src": "2685:28:0" + }, + "returnParameters": { + "id": 183, + "nodeType": "ParameterList", + "parameters": [], + "src": "2723:0:0" + }, + "scope": 414, + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "id": 303, + "nodeType": "FunctionDefinition", + "src": "3139:349:0", + "nodes": [], + "body": { + "id": 302, + "nodeType": "Block", + "src": "3176:312:0", + "nodes": [], + "statements": [ + { + "assignments": [ + 255 + ], + "declarations": [ + { "constant": false, + "id": 255, "mutability": "mutable", - "name": "secret", - "scope": 299, + "name": "c", + "nameLocation": "3207:1:0", + "nodeType": "VariableDeclaration", + "scope": 302, + "src": "3186:22:0", "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" + "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": [ + "3186:12:0" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 40, + "src": "3186:12:0" }, - "id": 232, - "name": "ElementaryTypeName", - "src": "2764:7:1" + "referencedDeclaration": 40, + "src": "3186: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": "3211:9:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_LockContract_$40_storage_$", + "typeString": "mapping(bytes32 => struct HashTimeLock.LockContract storage ref)" } - ], - "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": 258, + "indexExpression": { + "id": 257, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 250, + "src": "3221:2:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" } - ], - "id": 241, - "name": "VariableDeclarationStatement", - "src": "2799:38:1" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3211:13:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_LockContract_$40_storage", + "typeString": "struct HashTimeLock.LockContract storage ref" + } }, - { - "children": [ + "nodeType": "VariableDeclarationStatement", + "src": "3186:38:0" + }, + { + "expression": { + "arguments": [ { - "attributes": { - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "tuple()", - "type_conversion": false + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "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" - }, - "children": [ - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 237, - "type": "struct HashTimeLock.LockContract storage pointer", - "value": "c" - }, - "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" - }, - "id": 245, - "name": "Identifier", - "src": "2868:6:1" - } - ], - "id": 246, - "name": "BinaryOperation", - "src": "2856:18:1" + "id": 264, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 261, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 255, + "src": "3243:1:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_LockContract_$40_storage_ptr", + "typeString": "struct HashTimeLock.LockContract storage pointer" + } }, - { - "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": { + "id": 262, "isConstant": false, - "isLValue": false, + "isLValue": true, "isPure": false, - "isStructConstructorCall": false, "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_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" - }, - "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" - }, - "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" + "memberLocation": "3245:6:0", + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 29, + "src": "3243:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" } - ], - "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" - }, - { - "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" - }, - "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 - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "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": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "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": 263, - "name": "Identifier", - "src": "3000:3:1" - } - ], - "id": 264, - "name": "MemberAccess", - "src": "3000:16:1" - }, - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 233, - "type": "bytes32", - "value": "secret" - }, - "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" + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 263, + "name": "ACTIVE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12, + "src": "3255:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" } - ], - "id": 270, - "name": "FunctionCall", - "src": "2971:72:1" - } - ], - "id": 271, - "name": "ExpressionStatement", - "src": "2971:72:1" - }, - { - "children": [ + }, + "src": "3243:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, { - "attributes": { - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "uint256" + "hexValue": "535741505f4e4f545f414354495645", + "id": 265, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3263:17:0", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_afbfa7d3db262df0c92c413f0113503b1c1332dc5a4a874fcd8d6a6de57b74dd", + "typeString": "literal_string \"SWAP_NOT_ACTIVE\"" }, - "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" + "value": "SWAP_NOT_ACTIVE" } ], - "id": 277, - "name": "ExpressionStatement", - "src": "3054:20:1" + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_afbfa7d3db262df0c92c413f0113503b1c1332dc5a4a874fcd8d6a6de57b74dd", + "typeString": "literal_string \"SWAP_NOT_ACTIVE\"" + } + ], + "id": 260, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "3235: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": "3235:46:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } }, - { - "children": [ + "id": 267, + "nodeType": "ExpressionStatement", + "src": "3235:46:0" + }, + { + "expression": { + "arguments": [ { - "attributes": { + "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": "3300:1:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_LockContract_$40_storage_ptr", + "typeString": "struct HashTimeLock.LockContract storage pointer" + } + }, + "id": 270, "isConstant": false, - "isLValue": false, + "isLValue": true, "isPure": false, - "isStructConstructorCall": false, "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "tuple()", - "type_conversion": false + "memberLocation": "3302:10:0", + "memberName": "expiration", + "nodeType": "MemberAccess", + "referencedDeclaration": 27, + "src": "3300:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } }, - "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": "receiver", - "referencedDeclaration": 90, - "type": "address payable" - }, - "children": [ - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 237, - "type": "struct HashTimeLock.LockContract storage pointer", - "value": "c" - }, - "id": 278, - "name": "Identifier", - "src": "3085:1:1" - } - ], - "id": 281, - "name": "MemberAccess", - "src": "3085:10:1" - } - ], - "id": 282, - "name": "MemberAccess", - "src": "3085:19:1" + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "expression": { + "id": 271, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "3316:5:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } }, - { - "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" - }, - "id": 283, - "name": "Identifier", - "src": "3105:1:1" - } - ], - "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": { + "id": 272, "isConstant": false, "isLValue": false, "isPure": false, - "isStructConstructorCall": false, "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "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" - } - ], - "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" - }, - "id": 294, - "name": "Identifier", - "src": "3178:1:1" - } - ], - "id": 295, - "name": "MemberAccess", - "src": "3178:10:1" + "memberLocation": "3322:9:0", + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "3316:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" } - ], - "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": [ + }, + "src": "3300:31:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, { - "attributes": { - "name": "bytes32", - "type": "bytes32" + "hexValue": "494e56414c49445f54494d45", + "id": 274, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3333:14:0", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b98f3e47db5919a8c78ec10ff6bf7d1326066d3facdc164cf7441d38cae771df", + "typeString": "literal_string \"INVALID_TIME\"" }, - "id": 300, - "name": "ElementaryTypeName", - "src": "3218:7:1" + "value": "INVALID_TIME" } ], - "id": 301, - "name": "VariableDeclaration", - "src": "3218:10:1" - } - ], - "id": 302, - "name": "ParameterList", - "src": "3217:12:1" - }, - { - "attributes": { - "parameters": [ - null - ] + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b98f3e47db5919a8c78ec10ff6bf7d1326066d3facdc164cf7441d38cae771df", + "typeString": "literal_string \"INVALID_TIME\"" + } + ], + "id": 268, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "3292: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": "3292:56:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 276, + "nodeType": "ExpressionStatement", + "src": "3292:56:0" }, - "children": [], - "id": 303, - "name": "ParameterList", - "src": "3239:0:1" - }, - { - "children": [ - { - "attributes": { - "assignments": [ - 305 - ] + { + "expression": { + "id": 281, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 277, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 255, + "src": "3359: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": "3361:6:0", + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 29, + "src": "3359:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 280, + "name": "REFUNDED", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15, + "src": "3370:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } }, - "children": [ + "src": "3359:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 282, + "nodeType": "ExpressionStatement", + "src": "3359:19:0" + }, + { + "expression": { + "arguments": [ { - "attributes": { - "constant": false, - "mutability": "mutable", + "expression": { + "id": 288, "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" + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 255, + "src": "3407:1:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_LockContract_$40_storage_ptr", + "typeString": "struct HashTimeLock.LockContract storage pointer" } - ], - "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": 289, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3409:11:0", + "memberName": "inputAmount", + "nodeType": "MemberAccess", + "referencedDeclaration": 23, + "src": "3407:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } } ], - "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" - }, - { - "typeIdentifier": "t_stringliteral_afbfa7d3db262df0c92c413f0113503b1c1332dc5a4a874fcd8d6a6de57b74dd", - "typeString": "literal_string \"SWAP_NOT_ACTIVE\"" - } - ], - "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" - }, - "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" - } - ], - "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" + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "expression": { + "id": 283, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 255, + "src": "3389:1:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_LockContract_$40_storage_ptr", + "typeString": "struct HashTimeLock.LockContract storage pointer" } - ], - "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 }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "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" - }, - "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" - }, - "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": 286, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3391:6:0", + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": 33, + "src": "3389:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 287, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3398:8:0", + "memberName": "transfer", + "nodeType": "MemberAccess", + "src": "3389:17:0", + "typeDescriptions": { + "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" } - ], - "id": 326, - "name": "ExpressionStatement", - "src": "3355:56:1" + }, + "id": 290, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3389:32:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } }, - { - "children": [ + "id": 291, + "nodeType": "ExpressionStatement", + "src": "3389:32:0" + }, + { + "eventCall": { + "arguments": [ { - "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": 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": 293, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 250, + "src": "3444:2:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "expression": { + "id": 294, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 255, + "src": "3448:1:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_LockContract_$40_storage_ptr", + "typeString": "struct HashTimeLock.LockContract storage pointer" } - ], - "id": 331, - "name": "Assignment", - "src": "3422:19:1" - } - ], - "id": 332, - "name": "ExpressionStatement", - "src": "3422:19:1" - }, - { - "children": [ + }, + "id": 295, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3450:8:0", + "memberName": "hashLock", + "nodeType": "MemberAccess", + "referencedDeclaration": 31, + "src": "3448:10:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, { - "attributes": { - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "tuple()", - "type_conversion": false + "expression": { + "id": 296, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 255, + "src": "3460:1:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_LockContract_$40_storage_ptr", + "typeString": "struct HashTimeLock.LockContract storage pointer" + } }, - "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" - }, - "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": 297, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3462:6:0", + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": 33, + "src": "3460:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "expression": { + "id": 298, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 255, + "src": "3470:1:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_LockContract_$40_storage_ptr", + "typeString": "struct HashTimeLock.LockContract storage pointer" } - ], - "id": 340, - "name": "FunctionCall", - "src": "3452:32:1" + }, + "id": 299, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3472:8:0", + "memberName": "receiver", + "nodeType": "MemberAccess", + "referencedDeclaration": 35, + "src": "3470:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } } ], - "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 + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" }, - "children": [ - { - "attributes": { - "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" - } - ], - "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" + { + "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": "3437:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_bytes32_$_t_address_$_t_address_$returns$__$", + "typeString": "function (bytes32,bytes32,address,address)" } - ], - "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 + }, + "id": 300, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3437:44:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 301, + "nodeType": "EmitStatement", + "src": "3432:49:0" + } + ] + }, + "functionSelector": "7249fbb6", + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "refund", + "nameLocation": "3148:6:0", + "parameters": { + "id": 251, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 250, + "mutability": "mutable", + "name": "id", + "nameLocation": "3163:2:0", + "nodeType": "VariableDeclaration", + "scope": 303, + "src": "3155:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 249, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3155:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } ], - "name": "getStatus", - "scope": 462, - "stateMutability": "view", - "virtual": false, - "visibility": "public" + "src": "3154:12:0" }, - "children": [ - { - "children": [ - { - "attributes": { + "returnParameters": { + "id": 252, + "nodeType": "ParameterList", + "parameters": [], + "src": "3176:0:0" + }, + "scope": 414, + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "id": 350, + "nodeType": "FunctionDefinition", + "src": "3494:303:0", + "nodes": [], + "body": { + "id": 349, + "nodeType": "Block", + "src": "3574:223:0", + "nodes": [], + "statements": [ + { + "assignments": [ + 316 + ], + "declarations": [ + { "constant": false, + "id": 316, "mutability": "mutable", - "name": "ids", - "scope": 400, + "name": "result", + "nameLocation": "3601:6:0", + "nodeType": "VariableDeclaration", + "scope": 349, + "src": "3584:23:0", "stateVariable": false, "storageLocation": "memory", - "type": "bytes32[]", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 314, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3584:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 315, + "nodeType": "ArrayTypeName", + "src": "3584:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, "visibility": "internal" - }, - "children": [ + } + ], + "id": 323, + "initialValue": { + "arguments": [ { - "attributes": { - "type": "bytes32[]" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 354, - "name": "ElementaryTypeName", - "src": "3576:7:1" + "expression": { + "id": 320, + "name": "ids", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 306, + "src": "3624:3:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", + "typeString": "bytes32[] memory" } - ], - "id": 355, - "name": "ArrayTypeName", - "src": "3576:9:1" + }, + "id": 321, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3628:6:0", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "3624:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } } ], - "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" + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 319, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "3610: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": "3614:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" } - ], - "id": 359, - "name": "ArrayTypeName", - "src": "3619:9:1" + }, + "id": 318, + "nodeType": "ArrayTypeName", + "src": "3614:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } } - ], - "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" - }, + "id": 322, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3610:25:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3584:51:0" + }, + { + "body": { + "id": 345, + "nodeType": "Block", + "src": "3699:68:0", + "statements": [ { - "attributes": { + "expression": { + "id": 343, "isConstant": false, "isLValue": false, "isPure": false, - "isStructConstructorCall": false, "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "uint256[] memory", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "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" - }, - "id": 367, - "name": "ElementaryTypeName", - "src": "3677:7:1" - } - ], - "id": 368, - "name": "ArrayTypeName", - "src": "3677:9:1" + "leftHandSide": { + "baseExpression": { + "id": 335, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 316, + "src": "3713:6:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" } - ], - "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", + "id": 337, + "indexExpression": { + "id": 336, "name": "index", - "scope": 396, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "visibility": "internal" + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 325, + "src": "3720:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } }, - "children": [ + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "3713:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ { - "attributes": { - "name": "uint256", - "type": "uint256" + "baseExpression": { + "id": 339, + "name": "ids", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 306, + "src": "3745: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": "3749:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } }, - "id": 374, - "name": "ElementaryTypeName", - "src": "3714:7:1" + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3745:10:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } } ], - "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" + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 338, + "name": "getSingleStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 387, + "src": "3729:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view returns (uint256)" + } }, - "id": 376, - "name": "Literal", - "src": "3730:1:1" + "id": 342, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3729:27:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3713:43:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" } - ], - "id": 377, - "name": "VariableDeclarationStatement", - "src": "3714:17:1" + }, + "id": 344, + "nodeType": "ExpressionStatement", + "src": "3713:43:0" + } + ] + }, + "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": "3670:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "expression": { + "id": 329, + "name": "ids", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 306, + "src": "3678: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": "3682:6:0", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "3678:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3670:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 346, + "initializationExpression": { + "assignments": [ + 325 + ], + "declarations": [ { - "attributes": { - "commonType": { + "constant": false, + "id": 325, + "mutability": "mutable", + "name": "index", + "nameLocation": "3659:5:0", + "nodeType": "VariableDeclaration", + "scope": 346, + "src": "3651:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 324, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3651:7:0", + "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "<", - "type": "bool" - }, - "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" + }, + "visibility": "internal" + } + ], + "id": 327, + "initialValue": { + "hexValue": "30", + "id": 326, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3667:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" }, - { - "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" + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "3651:17:0" + }, + "loopExpression": { + "expression": { + "id": 333, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "3690:7:0", + "subExpression": { + "id": 332, + "name": "index", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 325, + "src": "3690:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } }, - { - "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" - }, - "id": 385, - "name": "Identifier", - "src": "3776:6:1" - }, - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 375, - "type": "uint256", - "value": "index" - }, - "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 - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 436, - "type": "function (bytes32) view returns (uint256)", - "value": "getSingleStatus" - }, - "id": 388, - "name": "Identifier", - "src": "3792:15:1" - }, - { - "attributes": { - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "bytes32" - }, - "children": [ - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 356, - "type": "bytes32[] memory", - "value": "ids" - }, - "id": 389, - "name": "Identifier", - "src": "3808:3:1" - }, - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 375, - "type": "uint256", - "value": "index" - }, - "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" - } - ], - "id": 394, - "name": "ExpressionStatement", - "src": "3776:43:1" - } - ], - "id": 395, - "name": "Block", - "src": "3762:68:1" + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 334, + "nodeType": "ExpressionStatement", + "src": "3690:7:0" + }, + "nodeType": "ForStatement", + "src": "3646:121:0" + }, + { + "expression": { + "id": 347, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 316, + "src": "3784:6:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "functionReturnParameters": 311, + "id": 348, + "nodeType": "Return", + "src": "3777:13:0" + } + ] + }, + "functionSelector": "2f21a663", + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getStatus", + "nameLocation": "3503:9:0", + "parameters": { + "id": 307, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 306, + "mutability": "mutable", + "name": "ids", + "nameLocation": "3530:3:0", + "nodeType": "VariableDeclaration", + "scope": 350, + "src": "3513: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": "3513:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" } - ], - "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": 305, + "nodeType": "ArrayTypeName", + "src": "3513:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", + "typeString": "bytes32[]" + } + }, + "visibility": "internal" + } + ], + "src": "3512:22:0" + }, + "returnParameters": { + "id": 311, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 310, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 350, + "src": "3556:16:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 308, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3556:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" } - ], - "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 + }, + "id": 309, + "nodeType": "ArrayTypeName", + "src": "3556:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "visibility": "internal" + } ], - "name": "getSingleStatus", - "scope": 462, - "stateMutability": "view", - "virtual": false, - "visibility": "public" + "src": "3555:18:0" }, - "children": [ - { - "children": [ - { - "attributes": { + "scope": 414, + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "id": 387, + "nodeType": "FunctionDefinition", + "src": "3803:363:0", + "nodes": [], + "body": { + "id": 386, + "nodeType": "Block", + "src": "3877:289:0", + "nodes": [], + "statements": [ + { + "assignments": [ + 359 + ], + "declarations": [ + { "constant": false, + "id": 359, "mutability": "mutable", - "name": "id", - "scope": 436, + "name": "tempContract", + "nameLocation": "3907:12:0", + "nodeType": "VariableDeclaration", + "scope": 386, + "src": "3887:32:0", "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", + "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": [ + "3887:12:0" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 40, + "src": "3887:12:0" + }, + "referencedDeclaration": 40, + "src": "3887: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": "3922:9:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_LockContract_$40_storage_$", + "typeString": "mapping(bytes32 => struct HashTimeLock.LockContract storage ref)" + } }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 401, - "name": "ElementaryTypeName", - "src": "3891:7:1" + "id": 362, + "indexExpression": { + "id": 361, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 352, + "src": "3932:2:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" } - ], - "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" + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3922:13:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_LockContract_$40_storage", + "typeString": "struct HashTimeLock.LockContract storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3887:48:0" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "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": "3963:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_LockContract_$40_memory_ptr", + "typeString": "struct HashTimeLock.LockContract memory" + } }, - "id": 404, - "name": "ElementaryTypeName", - "src": "3924:7:1" + "id": 365, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3976:6:0", + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 29, + "src": "3963:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 366, + "name": "ACTIVE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12, + "src": "3986:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3963:29:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" } - ], - "id": 405, - "name": "VariableDeclaration", - "src": "3924:14:1" - } - ], - "id": 406, - "name": "ParameterList", - "src": "3923:16:1" - }, - { - "children": [ - { - "attributes": { - "assignments": [ - 408 - ] }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 372, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 368, "name": "tempContract", - "scope": 435, - "stateVariable": false, - "storageLocation": "memory", - "type": "struct HashTimeLock.LockContract", - "visibility": "internal" + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 359, + "src": "4008:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_LockContract_$40_memory_ptr", + "typeString": "struct HashTimeLock.LockContract memory" + } }, - "children": [ - { - "attributes": { - "name": "LockContract", - "referencedDeclaration": 95, - "type": "struct HashTimeLock.LockContract" - }, - "id": 407, - "name": "UserDefinedTypeName", - "src": "3950:12:1" + "id": 369, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4021:10:0", + "memberName": "expiration", + "nodeType": "MemberAccess", + "referencedDeclaration": 27, + "src": "4008:23:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "expression": { + "id": 370, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "4034:5:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" } - ], - "id": 408, - "name": "VariableDeclaration", - "src": "3950:32:1" + }, + "id": 371, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4040:9:0", + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "4034:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } }, + "src": "4008:41:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "3963:86:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 384, + "nodeType": "Block", + "src": "4107:53:0", + "statements": [ { - "attributes": { + "expression": { + "id": 382, "isConstant": false, - "isLValue": true, + "isLValue": false, "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" + "leftHandSide": { + "id": 379, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 355, + "src": "4121:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } }, - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 402, - "type": "bytes32", - "value": "id" + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "id": 380, + "name": "tempContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 359, + "src": "4130:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_LockContract_$40_memory_ptr", + "typeString": "struct HashTimeLock.LockContract memory" + } }, - "id": 410, - "name": "Identifier", - "src": "3995:2:1" + "id": 381, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4143:6:0", + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 29, + "src": "4130:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4121:28:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" } - ], - "id": 411, - "name": "IndexAccess", - "src": "3985:13:1" + }, + "id": 383, + "nodeType": "ExpressionStatement", + "src": "4121:28:0" } - ], - "id": 412, - "name": "VariableDeclarationStatement", - "src": "3950:48:1" + ] }, - { - "children": [ + "id": 385, + "nodeType": "IfStatement", + "src": "3946:214:0", + "trueBody": { + "id": 378, + "nodeType": "Block", + "src": "4060:41:0", + "statements": [ { - "attributes": { - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, + "expression": { + "id": 376, "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" - }, - "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" + "leftHandSide": { + "id": 374, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 355, + "src": "4074:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } }, - { - "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": 408, - "type": "struct HashTimeLock.LockContract memory", - "value": "tempContract" - }, - "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" - }, - "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": 423, - "name": "Identifier", - "src": "4137:6:1" - }, - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 76, - "type": "uint256", - "value": "EXPIRED" - }, - "id": 424, - "name": "Identifier", - "src": "4146:7:1" - } - ], - "id": 425, - "name": "Assignment", - "src": "4137:16:1" - } - ], - "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" - }, - "id": 428, - "name": "Identifier", - "src": "4184:6:1" - }, - { - "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" - }, - "id": 429, - "name": "Identifier", - "src": "4193:12:1" - } - ], - "id": 430, - "name": "MemberAccess", - "src": "4193:19:1" - } - ], - "id": 431, - "name": "Assignment", - "src": "4184:28:1" - } - ], - "id": 432, - "name": "ExpressionStatement", - "src": "4184:28:1" + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 375, + "name": "EXPIRED", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21, + "src": "4083:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4074:16:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" } - ], - "id": 433, - "name": "Block", - "src": "4170:53:1" + }, + "id": 377, + "nodeType": "ExpressionStatement", + "src": "4074:16:0" } - ], - "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 + } + ] + }, + "functionSelector": "fbdf3b43", + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getSingleStatus", + "nameLocation": "3812:15:0", + "parameters": { + "id": 353, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 352, + "mutability": "mutable", + "name": "id", + "nameLocation": "3836:2:0", + "nodeType": "VariableDeclaration", + "scope": 387, + "src": "3828:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 351, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3828:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } ], - "name": "contractExists", - "scope": 462, - "stateMutability": "view", - "virtual": false, - "visibility": "public" + "src": "3827:12:0" }, - "children": [ - { - "children": [ - { - "attributes": { + "returnParameters": { + "id": 356, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 355, + "mutability": "mutable", + "name": "result", + "nameLocation": "3869:6:0", + "nodeType": "VariableDeclaration", + "scope": 387, + "src": "3861:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 354, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3861:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "3860:16:0" + }, + "scope": 414, + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "id": 413, + "nodeType": "FunctionDefinition", + "src": "4172:257:0", + "nodes": [], + "body": { + "id": 412, + "nodeType": "Block", + "src": "4242:187:0", + "nodes": [], + "statements": [ + { + "assignments": [ + 396 + ], + "declarations": [ + { "constant": false, + "id": 396, "mutability": "mutable", + "name": "tempContract", + "nameLocation": "4272:12:0", + "nodeType": "VariableDeclaration", + "scope": 412, + "src": "4252: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": [ + "4252:12:0" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 40, + "src": "4252:12:0" + }, + "referencedDeclaration": 40, + "src": "4252: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": "4287: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", - "scope": 461, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", - "visibility": "internal" + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 389, + "src": "4297:2:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 437, - "name": "ElementaryTypeName", - "src": "4259:7:1" + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4287:13:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_LockContract_$40_storage", + "typeString": "struct HashTimeLock.LockContract storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4252:48:0" + }, + { + "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": "4315: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": "4328:6:0", + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 29, + "src": "4315:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" } - ], - "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" + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 403, + "name": "INIT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9, + "src": "4338:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" } - ], - "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" - }, + "src": "4315:27:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 410, + "nodeType": "Block", + "src": "4387:36:0", + "statements": [ { - "attributes": { + "expression": { + "hexValue": "74727565", + "id": 408, "isConstant": false, - "isLValue": true, - "isPure": false, + "isLValue": false, + "isPure": true, + "kind": "bool", "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" + "nodeType": "Literal", + "src": "4408:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" }, - { - "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" + "value": "true" + }, + "functionReturnParameters": 393, + "id": 409, + "nodeType": "Return", + "src": "4401:11:0" } - ], - "id": 448, - "name": "VariableDeclarationStatement", - "src": "4315:48:1" + ] }, - { - "children": [ + "id": 411, + "nodeType": "IfStatement", + "src": "4311:112:0", + "trueBody": { + "id": 407, + "nodeType": "Block", + "src": "4344:37:0", + "statements": [ { - "attributes": { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, + "expression": { + "hexValue": "66616c7365", + "id": 405, "isConstant": false, "isLValue": false, - "isPure": false, + "isPure": true, + "kind": "bool", "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": 444, - "type": "struct HashTimeLock.LockContract memory", - "value": "tempContract" - }, - "id": 449, - "name": "Identifier", - "src": "4378:12:1" - } - ], - "id": 450, - "name": "MemberAccess", - "src": "4378:19:1" + "nodeType": "Literal", + "src": "4365:5:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" }, - { - "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" + "value": "false" + }, + "functionReturnParameters": 393, + "id": 406, + "nodeType": "Return", + "src": "4358:12:0" } - ], - "id": 459, - "name": "IfStatement", - "src": "4374:115:1" + ] } - ], - "id": 460, - "name": "Block", - "src": "4305:190:1" - } - ], - "id": 461, - "name": "FunctionDefinition", - "src": "4235:260:1" + } + ] + }, + "functionSelector": "6c8244b8", + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "contractExists", + "nameLocation": "4181:14:0", + "parameters": { + "id": 390, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 389, + "mutability": "mutable", + "name": "id", + "nameLocation": "4204:2:0", + "nodeType": "VariableDeclaration", + "scope": 413, + "src": "4196:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 388, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4196:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "4195:12:0" + }, + "returnParameters": { + "id": 393, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 392, + "mutability": "mutable", + "name": "result", + "nameLocation": "4234:6:0", + "nodeType": "VariableDeclaration", + "scope": 413, + "src": "4229:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 391, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "4229:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "4228:13:0" + }, + "scope": 414, + "stateMutability": "view", + "virtual": false, + "visibility": "public" } ], - "id": 462, - "name": "ContractDefinition", - "src": "59:4438:1" + "abstract": false, + "baseContracts": [], + "canonicalName": "HashTimeLock", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "linearizedBaseContracts": [ + 414 + ], + "name": "HashTimeLock", + "nameLocation": "34:12:0", + "scope": 415, + "usedErrors": [] } - ], - "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 - } + "id": 0 } \ 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 33287ce7e1b..0f5696259b3 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 00000000000..f546919c37d --- /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 ed56be74187..d21b0db7016 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,9 +150,9 @@ export class PluginHtlcEthBesu implements ICactusPlugin, IPluginWebService { ) as PluginLedgerConnectorBesu; const hashedTimeLockResponse = await connector.deployContract({ - contractName: HashTimeLockJSON.contractName, + contractName: contractName, contractAbi: HashTimeLockJSON.abi, - bytecode: HashTimeLockJSON.bytecode, + bytecode: HashTimeLockJSON.bytecode.object, web3SigningCredential: initializeRequest.web3SigningCredential, keychainId: initializeRequest.keychainId, constructorArgs: initializeRequest.constructorArgs, @@ -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 00000000000..5cedf6f7620 --- /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/main/typescript/public-api.ts b/packages/cactus-plugin-htlc-eth-besu/src/main/typescript/public-api.ts index 76484e883df..1b9cdf431a8 100644 --- a/packages/cactus-plugin-htlc-eth-besu/src/main/typescript/public-api.ts +++ b/packages/cactus-plugin-htlc-eth-besu/src/main/typescript/public-api.ts @@ -1,5 +1,5 @@ -import * as HashTimeLockJson from "../solidity/contracts/HashTimeLock.json"; -export { HashTimeLockJson }; +import * as HashTimeLockJSON from "../solidity/contracts/HashTimeLock.json"; +export { HashTimeLockJSON }; export * from "./generated/openapi/typescript-axios/index"; 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 00000000000..7b7a003f88d --- /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 a053502a11c..1eb1cd8efcc 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/get-single-status-endpoint-invalid.test.ts b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/get-single-status-endpoint-invalid.test.ts index 78ea6619fd8..ffbc41502bc 100644 --- a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/get-single-status-endpoint-invalid.test.ts +++ b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/get-single-status-endpoint-invalid.test.ts @@ -12,7 +12,7 @@ import { PluginFactoryHtlcEthBesu, NewContractObj, InitializeRequest, - HashTimeLockJson, + HashTimeLockJSON, } from "@hyperledger/cactus-plugin-htlc-eth-besu"; import { PluginFactoryLedgerConnector, @@ -102,8 +102,10 @@ describe(testCase, () => { logLevel, }); keychainPlugin.set( - HashTimeLockJson.contractName, - JSON.stringify(HashTimeLockJson), + HashTimeLockJSON.metadata.settings.compilationTarget[ + "src/main/solidity/contracts/HashTimeLock.sol" + ], + JSON.stringify(HashTimeLockJSON), ); const factory = new PluginFactoryLedgerConnector({ diff --git a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/get-single-status-endpoint.test.ts b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/get-single-status-endpoint.test.ts index 136cc1338da..9ee5d8e6680 100644 --- a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/get-single-status-endpoint.test.ts +++ b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/get-single-status-endpoint.test.ts @@ -81,7 +81,9 @@ test(testCase, async (t: Test) => { logLevel, }); keychainPlugin.set( - HashTimeLockJSON.contractName, + HashTimeLockJSON.metadata.settings.compilationTarget[ + "src/main/solidity/contracts/HashTimeLock.sol" + ], JSON.stringify(HashTimeLockJSON), ); diff --git a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/get-status-endpoint-invalid.test.ts b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/get-status-endpoint-invalid.test.ts index 49a0869da1c..f2fcce43512 100644 --- a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/get-status-endpoint-invalid.test.ts +++ b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/get-status-endpoint-invalid.test.ts @@ -90,7 +90,9 @@ describe(testCase, () => { logLevel, }); keychainPlugin.set( - HashTimeLockJSON.contractName, + HashTimeLockJSON.metadata.settings.compilationTarget[ + "src/main/solidity/contracts/HashTimeLock.sol" + ], JSON.stringify(HashTimeLockJSON), ); diff --git a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/get-status-endpoint.test.ts b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/get-status-endpoint.test.ts index e4082b0ae3b..dce090bb6a8 100644 --- a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/get-status-endpoint.test.ts +++ b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/get-status-endpoint.test.ts @@ -99,7 +99,9 @@ describe(testCase, () => { logLevel, }); keychainPlugin.set( - HashTimeLockJSON.contractName, + HashTimeLockJSON.metadata.settings.compilationTarget[ + "src/main/solidity/contracts/HashTimeLock.sol" + ], JSON.stringify(HashTimeLockJSON), ); diff --git a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/initialize-endpoint-invalid.test.ts b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/initialize-endpoint-invalid.test.ts index 485ce2d5472..8216ef87abb 100644 --- a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/initialize-endpoint-invalid.test.ts +++ b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/initialize-endpoint-invalid.test.ts @@ -91,7 +91,9 @@ describe(testCase, () => { logLevel, }); keychainPlugin.set( - HashTimeLockJSON.contractName, + HashTimeLockJSON.metadata.settings.compilationTarget[ + "src/main/solidity/contracts/HashTimeLock.sol" + ], JSON.stringify(HashTimeLockJSON), ); diff --git a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/initialize-endpoint.test.ts b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/initialize-endpoint.test.ts index 71b8eb78894..ff1a0355593 100644 --- a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/initialize-endpoint.test.ts +++ b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/initialize-endpoint.test.ts @@ -90,7 +90,9 @@ describe(testCase, () => { logLevel, }); keychainPlugin.set( - HashTimeLockJSON.contractName, + HashTimeLockJSON.metadata.settings.compilationTarget[ + "src/main/solidity/contracts/HashTimeLock.sol" + ], JSON.stringify(HashTimeLockJSON), ); diff --git a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/new-contract-endpoint-invalid.test.ts b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/new-contract-endpoint-invalid.test.ts index 5eae6f04084..67e7eca99c5 100644 --- a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/new-contract-endpoint-invalid.test.ts +++ b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/new-contract-endpoint-invalid.test.ts @@ -96,7 +96,9 @@ describe(testCase, () => { logLevel, }); keychainPlugin.set( - HashTimeLockJSON.contractName, + HashTimeLockJSON.metadata.settings.compilationTarget[ + "src/main/solidity/contracts/HashTimeLock.sol" + ], JSON.stringify(HashTimeLockJSON), ); const factory = new PluginFactoryLedgerConnector({ diff --git a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/new-contract-endpoint.test.ts b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/new-contract-endpoint.test.ts index db8243b925b..79cc272a891 100644 --- a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/new-contract-endpoint.test.ts +++ b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/new-contract-endpoint.test.ts @@ -93,7 +93,9 @@ describe(testCase, () => { logLevel, }); keychainPlugin.set( - HashTimeLockJSON.contractName, + HashTimeLockJSON.metadata.settings.compilationTarget[ + "src/main/solidity/contracts/HashTimeLock.sol" + ], JSON.stringify(HashTimeLockJSON), ); 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 969c635b143..a858d442d28 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 @@ -97,7 +97,9 @@ test(testCase, async (t: Test) => { logLevel, }); keychainPlugin.set( - HashTimeLockJSON.contractName, + HashTimeLockJSON.metadata.settings.compilationTarget[ + "src/main/solidity/contracts/HashTimeLock.sol" + ], JSON.stringify(HashTimeLockJSON), ); diff --git a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/refund-endpoint-invalid.test.ts b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/refund-endpoint-invalid.test.ts index 7095e3bd7a4..2bdf6d3581b 100644 --- a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/refund-endpoint-invalid.test.ts +++ b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/refund-endpoint-invalid.test.ts @@ -96,7 +96,9 @@ describe(testCase, () => { logLevel, }); keychainPlugin.set( - HashTimeLockJSON.contractName, + HashTimeLockJSON.metadata.settings.compilationTarget[ + "src/main/solidity/contracts/HashTimeLock.sol" + ], JSON.stringify(HashTimeLockJSON), ); diff --git a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/refund-endpoint.test.ts b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/refund-endpoint.test.ts index c85e916aa63..1276f2ffb45 100644 --- a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/refund-endpoint.test.ts +++ b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/refund-endpoint.test.ts @@ -101,7 +101,9 @@ describe(testCase, () => { logLevel, }); keychainPlugin.set( - HashTimeLockJSON.contractName, + HashTimeLockJSON.metadata.settings.compilationTarget[ + "src/main/solidity/contracts/HashTimeLock.sol" + ], JSON.stringify(HashTimeLockJSON), ); diff --git a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/withdraw-endpoint-invalid.test.ts b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/withdraw-endpoint-invalid.test.ts index ab4676212b9..f5bbb8273e9 100644 --- a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/withdraw-endpoint-invalid.test.ts +++ b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/withdraw-endpoint-invalid.test.ts @@ -92,7 +92,9 @@ describe(testCase, () => { logLevel, }); keychainPlugin.set( - HashTimeLockJSON.contractName, + HashTimeLockJSON.metadata.settings.compilationTarget[ + "src/main/solidity/contracts/HashTimeLock.sol" + ], JSON.stringify(HashTimeLockJSON), ); 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 c73675c7b9a..9698f4341fd 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 @@ -93,7 +93,9 @@ describe(testCase, () => { logLevel, }); keychainPlugin.set( - HashTimeLockJSON.contractName, + HashTimeLockJSON.metadata.settings.compilationTarget[ + "src/main/solidity/contracts/HashTimeLock.sol" + ], JSON.stringify(HashTimeLockJSON), );