diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index caf91f58..ca8f3d09 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,7 +22,7 @@ jobs: fail-fast: false matrix: os: ["ubuntu-latest", "windows-2022"] - type: ["brownie", "buidler", "dapp", "embark", "hardhat", "solc", "truffle", "waffle", "foundry", "standard"] + type: ["brownie", "buidler", "dapp", "embark", "hardhat", "solc", "truffle", "waffle", "foundry", "standard", "solc_multi_file", "hardhat_multi_file"] exclude: # Currently broken, tries to pull git:// which is blocked by GH - type: embark diff --git a/scripts/ci_test_hardhat_multi_file.sh b/scripts/ci_test_hardhat_multi_file.sh new file mode 100755 index 00000000..59f049b0 --- /dev/null +++ b/scripts/ci_test_hardhat_multi_file.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash + +DIR=$(mktemp -d) + +cp -r tests/hardhat-multi-file "$DIR" +cd "$DIR/hardhat-multi-file" || exit 255 +npm install +crytic-compile --compile-remove-metadata --export-formats solc,truffle . + +cd - || exit 255 +node tests/process_combined_solc.js "$DIR/hardhat-multi-file/crytic-export/combined_solc.json" $(realpath $DIR) +DIFF=$(diff -q "$DIR/hardhat-multi-file/crytic-export" tests/expected/hardhat-multi-file) +if [ "$?" != "0" ] || [ "$DIFF" != "" ] +then + echo "hardhat-multi-file test failed" + echo "$DIFF" + exit 255 +fi diff --git a/scripts/ci_test_solc_multi_file.sh b/scripts/ci_test_solc_multi_file.sh new file mode 100755 index 00000000..72650dad --- /dev/null +++ b/scripts/ci_test_solc_multi_file.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +DIR=$(mktemp -d) + +cp -r tests/solc-multi-file "$DIR" +cd "$DIR/solc-multi-file" || exit 255 +crytic-compile --compile-remove-metadata --export-formats solc,truffle . + +cd - || exit 255 +node tests/process_combined_solc.js "$DIR/solc-multi-file/crytic-export/combined_solc.json" $(realpath $DIR) +DIFF=$(diff -q "$DIR/solc-multi-file/crytic-export" tests/expected/solc-multi-file) +if [ "$?" != "0" ] || [ "$DIFF" != "" ] +then + echo "solc-multi-file test failed" + echo "$DIFF" + exit 255 +fi diff --git a/tests/expected/hardhat-multi-file/A.json b/tests/expected/hardhat-multi-file/A.json new file mode 100644 index 00000000..647e3d27 --- /dev/null +++ b/tests/expected/hardhat-multi-file/A.json @@ -0,0 +1 @@ +{"contractName": "A", "abi": [{"inputs": [{"internalType": "uint256", "name": "yval", "type": "uint256"}, {"internalType": "uint256", "name": "zval", "type": "uint256"}], "stateMutability": "nonpayable", "type": "constructor"}, {"inputs": [{"internalType": "uint256", "name": "xval", "type": "uint256"}], "name": "set", "outputs": [], "stateMutability": "nonpayable", "type": "function"}, {"inputs": [], "name": "sum", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "stateMutability": "view", "type": "function"}], "bytecode": "0x608060405234801561001057600080fd5b506040516122143803806122148339818101604052604081101561003357600080fd5b81019080805190602001909291908051906020019092919050505060008081905550816001819055508060028190555060405161006f906101bb565b604051809103906000f08015801561008b573d6000803e3d6000fd5b50600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550806040516100d9906101c8565b80828152602001915050604051809103906000f0801580156100ff573d6000803e3d6000fd5b50600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508060405161014d906101d5565b80828152602001915050604051809103906000f080158015610173573d6000803e3d6000fd5b50600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050506101e2565b6119028061054383390190565b61012d80611e4583390190565b6102a280611f7283390190565b610352806101f16000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c806360fe47b11461003b578063853255cc14610069575b600080fd5b6100676004803603602081101561005157600080fd5b8101908080359060200190929190505050610087565b005b61007161011e565b6040518082815260200191505060405180910390f35b80600081905550600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16634018d9aa826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561010357600080fd5b505af1158015610117573d6000803e3d6000fd5b5050505050565b6000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a0d7afb76040518163ffffffff1660e01b815260040160206040518083038186803b15801561018857600080fd5b505afa15801561019c573d6000803e3d6000fd5b505050506040513d60208110156101b257600080fd5b8101908080519060200190929190505050600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663853255cc6040518163ffffffff1660e01b815260040160206040518083038186803b15801561022b57600080fd5b505afa15801561023f573d6000803e3d6000fd5b505050506040513d602081101561025557600080fd5b8101908080519060200190929190505050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a0d7afb76040518163ffffffff1660e01b815260040160206040518083038186803b1580156102ce57600080fd5b505afa1580156102e2573d6000803e3d6000fd5b505050506040513d60208110156102f857600080fd5b8101908080519060200190929190505050600254600154600054010101010190509056fe608060405234801561001057600080fd5b5060008081905550600660018190555060016000540160405161003290610117565b80828152602001915050604051809103906000f080158015610058573d6000803e3d6000fd5b50600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506002600054016040516100ab90610124565b80828152602001915050604051809103906000f0801580156100d1573d6000803e3d6000fd5b50600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610131565b6107ed8061026e83390190565b610ea780610a5b83390190565b61012e806101406000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c8063a0d7afb714602d575b600080fd5b60336049565b6040518082815260200191505060405180910390f35b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663853255cc6040518163ffffffff1660e01b815260040160206040518083038186803b15801560b257600080fd5b505afa15801560c5573d6000803e3d6000fd5b505050506040513d602081101560da57600080fd5b8101908080519060200190929190505050600154600054030190509056fea264697066735822122080543e0c8069e143ba3a6838f29f42fe1ec0df2721ac2c383b84466b346d191664736f6c63430007030033608060405234801561001057600080fd5b506040516107ed3803806107ed8339818101604052602081101561003357600080fd5b810190808051906020019092919050505060008081905550806001819055506005604051610060906100cd565b80828152602001915050604051809103906000f080158015610086573d6000803e3d6000fd5b50600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506100da565b610503806102ea83390190565b610201806100e96000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80634018d9aa1461003b578063853255cc14610069575b600080fd5b6100676004803603602081101561005157600080fd5b8101908080359060200190929190505050610087565b005b610071610121565b6040518082815260200191505060405180910390f35b80600081905550600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16634018d9aa600183016040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561010657600080fd5b505af115801561011a573d6000803e3d6000fd5b5050505050565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663853255cc6040518163ffffffff1660e01b815260040160206040518083038186803b15801561018b57600080fd5b505afa15801561019f573d6000803e3d6000fd5b505050506040513d60208110156101b557600080fd5b810190808051906020019092919050505090509056fea2646970667358221220b82df2aa2e430319215b47e2ba4c79732ea53c9686190c1dc8530c55b72060e564736f6c63430007030033608060405234801561001057600080fd5b506040516105033803806105038339818101604052602081101561003357600080fd5b810190808051906020019092919050505060008081905550806001819055508060405161005f906100cc565b80828152602001915050604051809103906000f080158015610085573d6000803e3d6000fd5b50600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506100d9565b6102a28061026183390190565b610179806100e86000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80634018d9aa1461003b578063853255cc14610069575b600080fd5b6100676004803603602081101561005157600080fd5b8101908080359060200190929190505050610087565b005b610071610091565b6040518082815260200191505060405180910390f35b8060008190555050565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a0d7afb76040518163ffffffff1660e01b815260040160206040518083038186803b1580156100fb57600080fd5b505afa15801561010f573d6000803e3d6000fd5b505050506040513d602081101561012557600080fd5b8101908080519060200190929190505050600154600054010190509056fea2646970667358221220ec8b5ae5c6f71260e1077af8088b564be4ae241ac16c43e3cac821682be2d7c964736f6c63430007030033608060405234801561001057600080fd5b506040516102a23803806102a28339818101604052602081101561003357600080fd5b810190808051906020019092919050505060008081905550806001819055506005604051610060906100cd565b80828152602001915050604051809103906000f080158015610086573d6000803e3d6000fd5b50600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506100da565b61012d8061017583390190565b608d806100e86000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c8063a0d7afb714602d575b600080fd5b60336049565b6040518082815260200191505060405180910390f35b60006001546000540390509056fea26469706673582212204e7f66950d7eac1667bf123fd0c2c0b36d53de5866b4bd867fac7411e321b0b464736f6c63430007030033608060405234801561001057600080fd5b5060405161012d38038061012d8339818101604052602081101561003357600080fd5b810190808051906020019092919050505060008081905550806001819055505060cc806100616000396000f3fe6080604052348015600f57600080fd5b506004361060325760003560e01c80634018d9aa146037578063853255cc146062575b600080fd5b606060048036036020811015604b57600080fd5b8101908080359060200190929190505050607e565b005b60686088565b6040518082815260200191505060405180910390f35b8060008190555050565b60006001546000540190509056fea2646970667358221220fa023934f603bf6bcaae6a6ab06db920cce4aca360c67548633e7f3514118cc964736f6c63430007030033608060405234801561001057600080fd5b50604051610ea7380380610ea78339818101604052602081101561003357600080fd5b810190808051906020019092919050505060008081905550806001819055506005604051610060906100cd565b80828152602001915050604051809103906000f080158015610086573d6000803e3d6000fd5b50600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506100da565b610bbd806102ea83390190565b610201806100e96000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80634018d9aa1461003b578063853255cc14610069575b600080fd5b6100676004803603602081101561005157600080fd5b8101908080359060200190929190505050610087565b005b610071610121565b6040518082815260200191505060405180910390f35b80600081905550600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16634018d9aa600183016040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561010657600080fd5b505af115801561011a573d6000803e3d6000fd5b5050505050565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663853255cc6040518163ffffffff1660e01b815260040160206040518083038186803b15801561018b57600080fd5b505afa15801561019f573d6000803e3d6000fd5b505050506040513d60208110156101b557600080fd5b810190808051906020019092919050505090509056fea2646970667358221220df9be5d8f790b183800142a7b55385ddfdcdb8a32d28a3611189c1f9935f083e64736f6c63430007030033608060405234801561001057600080fd5b50604051610bbd380380610bbd8339818101604052602081101561003357600080fd5b810190808051906020019092919050505060008081905550806001819055508060405161005f90610143565b80828152602001915050604051809103906000f080158015610085573d6000803e3d6000fd5b50600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600181016040516100d690610150565b80828152602001915050604051809103906000f0801580156100fc573d6000803e3d6000fd5b50600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505061015d565b6102a28061041883390190565b610503806106ba83390190565b6102ac8061016c6000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80634018d9aa1461003b578063853255cc14610069575b600080fd5b6100676004803603602081101561005157600080fd5b8101908080359060200190929190505050610087565b005b610071610120565b6040518082815260200191505060405180910390f35b80600081905550600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16634018d9aa6001546040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561010557600080fd5b505af1158015610119573d6000803e3d6000fd5b5050505050565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663853255cc6040518163ffffffff1660e01b815260040160206040518083038186803b15801561018a57600080fd5b505afa15801561019e573d6000803e3d6000fd5b505050506040513d60208110156101b457600080fd5b8101908080519060200190929190505050600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a0d7afb76040518163ffffffff1660e01b815260040160206040518083038186803b15801561022d57600080fd5b505afa158015610241573d6000803e3d6000fd5b505050506040513d602081101561025757600080fd5b810190808051906020019092919050505060015460005401010190509056fea26469706673582212207adf748c4fbc65b7c753bb0a72e946f848bffb9e1d7c8e268d29021c42b7df4964736f6c63430007030033608060405234801561001057600080fd5b506040516102a23803806102a28339818101604052602081101561003357600080fd5b810190808051906020019092919050505060008081905550806001819055506005604051610060906100cd565b80828152602001915050604051809103906000f080158015610086573d6000803e3d6000fd5b50600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506100da565b61012d8061017583390190565b608d806100e86000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c8063a0d7afb714602d575b600080fd5b60336049565b6040518082815260200191505060405180910390f35b60006001546000540390509056fea26469706673582212204e7f66950d7eac1667bf123fd0c2c0b36d53de5866b4bd867fac7411e321b0b464736f6c63430007030033608060405234801561001057600080fd5b5060405161012d38038061012d8339818101604052602081101561003357600080fd5b810190808051906020019092919050505060008081905550806001819055505060cc806100616000396000f3fe6080604052348015600f57600080fd5b506004361060325760003560e01c80634018d9aa146037578063853255cc146062575b600080fd5b606060048036036020811015604b57600080fd5b8101908080359060200190929190505050607e565b005b60686088565b6040518082815260200191505060405180910390f35b8060008190555050565b60006001546000540190509056fea2646970667358221220fa023934f603bf6bcaae6a6ab06db920cce4aca360c67548633e7f3514118cc964736f6c63430007030033608060405234801561001057600080fd5b506040516105033803806105038339818101604052602081101561003357600080fd5b810190808051906020019092919050505060008081905550806001819055508060405161005f906100cc565b80828152602001915050604051809103906000f080158015610085573d6000803e3d6000fd5b50600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506100d9565b6102a28061026183390190565b610179806100e86000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80634018d9aa1461003b578063853255cc14610069575b600080fd5b6100676004803603602081101561005157600080fd5b8101908080359060200190929190505050610087565b005b610071610091565b6040518082815260200191505060405180910390f35b8060008190555050565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a0d7afb76040518163ffffffff1660e01b815260040160206040518083038186803b1580156100fb57600080fd5b505afa15801561010f573d6000803e3d6000fd5b505050506040513d602081101561012557600080fd5b8101908080519060200190929190505050600154600054010190509056fea2646970667358221220ec8b5ae5c6f71260e1077af8088b564be4ae241ac16c43e3cac821682be2d7c964736f6c63430007030033608060405234801561001057600080fd5b506040516102a23803806102a28339818101604052602081101561003357600080fd5b810190808051906020019092919050505060008081905550806001819055506005604051610060906100cd565b80828152602001915050604051809103906000f080158015610086573d6000803e3d6000fd5b50600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506100da565b61012d8061017583390190565b608d806100e86000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c8063a0d7afb714602d575b600080fd5b60336049565b6040518082815260200191505060405180910390f35b60006001546000540390509056fea26469706673582212204e7f66950d7eac1667bf123fd0c2c0b36d53de5866b4bd867fac7411e321b0b464736f6c63430007030033608060405234801561001057600080fd5b5060405161012d38038061012d8339818101604052602081101561003357600080fd5b810190808051906020019092919050505060008081905550806001819055505060cc806100616000396000f3fe6080604052348015600f57600080fd5b506004361060325760003560e01c80634018d9aa146037578063853255cc146062575b600080fd5b606060048036036020811015604b57600080fd5b8101908080359060200190929190505050607e565b005b60686088565b6040518082815260200191505060405180910390f35b8060008190555050565b60006001546000540190509056fea2646970667358221220fa023934f603bf6bcaae6a6ab06db920cce4aca360c67548633e7f3514118cc964736f6c63430007030033608060405234801561001057600080fd5b5060405161012d38038061012d8339818101604052602081101561003357600080fd5b810190808051906020019092919050505060008081905550806001819055505060cc806100616000396000f3fe6080604052348015600f57600080fd5b506004361060325760003560e01c80634018d9aa146037578063853255cc146062575b600080fd5b606060048036036020811015604b57600080fd5b8101908080359060200190929190505050607e565b005b60686088565b6040518082815260200191505060405180910390f35b8060008190555050565b60006001546000540190509056fea2646970667358221220fa023934f603bf6bcaae6a6ab06db920cce4aca360c67548633e7f3514118cc964736f6c63430007030033608060405234801561001057600080fd5b506040516102a23803806102a28339818101604052602081101561003357600080fd5b810190808051906020019092919050505060008081905550806001819055506005604051610060906100cd565b80828152602001915050604051809103906000f080158015610086573d6000803e3d6000fd5b50600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506100da565b61012d8061017583390190565b608d806100e86000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c8063a0d7afb714602d575b600080fd5b60336049565b6040518082815260200191505060405180910390f35b60006001546000540390509056fea26469706673582212204e7f66950d7eac1667bf123fd0c2c0b36d53de5866b4bd867fac7411e321b0b464736f6c63430007030033608060405234801561001057600080fd5b5060405161012d38038061012d8339818101604052602081101561003357600080fd5b810190808051906020019092919050505060008081905550806001819055505060cc806100616000396000f3fe6080604052348015600f57600080fd5b506004361060325760003560e01c80634018d9aa146037578063853255cc146062575b600080fd5b606060048036036020811015604b57600080fd5b8101908080359060200190929190505050607e565b005b60686088565b6040518082815260200191505060405180910390f35b8060008190555050565b60006001546000540190509056fea2646970667358221220fa023934f603bf6bcaae6a6ab06db920cce4aca360c67548633e7f3514118cc964736f6c63430007030033", "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100365760003560e01c806360fe47b11461003b578063853255cc14610069575b600080fd5b6100676004803603602081101561005157600080fd5b8101908080359060200190929190505050610087565b005b61007161011e565b6040518082815260200191505060405180910390f35b80600081905550600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16634018d9aa826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561010357600080fd5b505af1158015610117573d6000803e3d6000fd5b5050505050565b6000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a0d7afb76040518163ffffffff1660e01b815260040160206040518083038186803b15801561018857600080fd5b505afa15801561019c573d6000803e3d6000fd5b505050506040513d60208110156101b257600080fd5b8101908080519060200190929190505050600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663853255cc6040518163ffffffff1660e01b815260040160206040518083038186803b15801561022b57600080fd5b505afa15801561023f573d6000803e3d6000fd5b505050506040513d602081101561025557600080fd5b8101908080519060200190929190505050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a0d7afb76040518163ffffffff1660e01b815260040160206040518083038186803b1580156102ce57600080fd5b505afa1580156102e2573d6000803e3d6000fd5b505050506040513d60208110156102f857600080fd5b8101908080519060200190929190505050600254600154600054010101010190509056fe", "ast": {"absolutePath": "contracts/A.sol", "exportedSymbols": {"A": [97], "B": [150], "C": [191], "D": [229], "E": [285], "G": [344], "I": [421], "K": [480]}, "id": 151, "license": "Unlicense", "nodeType": "SourceUnit", "nodes": [{"id": 1, "literals": ["solidity", "^", "0.7", ".0"], "nodeType": "PragmaDirective", "src": "37:23:0"}, {"absolutePath": "contracts/C.sol", "file": "./C.sol", "id": 2, "nodeType": "ImportDirective", "scope": 151, "sourceUnit": 230, "src": "62:17:0", "symbolAliases": [], "unitAlias": ""}, {"absolutePath": "contracts/E/G.sol", "file": "./E/G.sol", "id": 3, "nodeType": "ImportDirective", "scope": 151, "sourceUnit": 345, "src": "80:19:0", "symbolAliases": [], "unitAlias": ""}, {"absolutePath": "contracts/I/K.sol", "file": "./I/K.sol", "id": 4, "nodeType": "ImportDirective", "scope": 151, "sourceUnit": 481, "src": "100:19:0", "symbolAliases": [], "unitAlias": ""}, {"abstract": false, "baseContracts": [], "contractDependencies": [150, 191, 229], "contractKind": "contract", "fullyImplemented": true, "id": 97, "linearizedBaseContracts": [97], "name": "A", "nodeType": "ContractDefinition", "nodes": [{"constant": false, "id": 6, "mutability": "mutable", "name": "x", "nodeType": "VariableDeclaration", "scope": 97, "src": "136:9:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 5, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "136:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}, {"constant": false, "id": 8, "mutability": "mutable", "name": "y", "nodeType": "VariableDeclaration", "scope": 97, "src": "149:9:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 7, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "149:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}, {"constant": false, "id": 10, "mutability": "mutable", "name": "z", "nodeType": "VariableDeclaration", "scope": 97, "src": "162:9:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 9, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "162:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}, {"constant": false, "id": 12, "mutability": "mutable", "name": "b", "nodeType": "VariableDeclaration", "scope": 97, "src": "175:3:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_contract$_B_$150", "typeString": "contract B"}, "typeName": {"id": 11, "name": "B", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 150, "src": "175:1:0", "typeDescriptions": {"typeIdentifier": "t_contract$_B_$150", "typeString": "contract B"}}, "visibility": "internal"}, {"constant": false, "id": 14, "mutability": "mutable", "name": "c", "nodeType": "VariableDeclaration", "scope": 97, "src": "182:3:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_contract$_C_$191", "typeString": "contract C"}, "typeName": {"id": 13, "name": "C", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 191, "src": "182:1:0", "typeDescriptions": {"typeIdentifier": "t_contract$_C_$191", "typeString": "contract C"}}, "visibility": "internal"}, {"constant": false, "id": 16, "mutability": "mutable", "name": "d", "nodeType": "VariableDeclaration", "scope": 97, "src": "189:3:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_contract$_D_$229", "typeString": "contract D"}, "typeName": {"id": 15, "name": "D", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 229, "src": "189:1:0", "typeDescriptions": {"typeIdentifier": "t_contract$_D_$229", "typeString": "contract D"}}, "visibility": "internal"}, {"body": {"id": 55, "nodeType": "Block", "src": "237:103:0", "statements": [{"expression": {"id": 25, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"id": 23, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6, "src": "243:1:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"hexValue": "30", "id": 24, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "247:1:0", "typeDescriptions": {"typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0"}, "value": "0"}, "src": "243:5:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 26, "nodeType": "ExpressionStatement", "src": "243:5:0"}, {"expression": {"id": 29, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"id": 27, "name": "y", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8, "src": "254:1:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"id": 28, "name": "yval", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 18, "src": "258:4:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "254:8:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 30, "nodeType": "ExpressionStatement", "src": "254:8:0"}, {"expression": {"id": 33, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"id": 31, "name": "z", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 10, "src": "268:1:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"id": 32, "name": "zval", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 20, "src": "272:4:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "268:8:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 34, "nodeType": "ExpressionStatement", "src": "268:8:0"}, {"expression": {"id": 39, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"id": 35, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 12, "src": "282:1:0", "typeDescriptions": {"typeIdentifier": "t_contract$_B_$150", "typeString": "contract B"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"arguments": [], "expression": {"argumentTypes": [], "id": 37, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "NewExpression", "src": "286:5:0", "typeDescriptions": {"typeIdentifier": "t_function_creation_nonpayable$__$returns$_t_contract$_B_$150_$", "typeString": "function () returns (contract B)"}, "typeName": {"id": 36, "name": "B", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 150, "src": "290:1:0", "typeDescriptions": {"typeIdentifier": "t_contract$_B_$150", "typeString": "contract B"}}}, "id": 38, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "286:7:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_contract$_B_$150", "typeString": "contract B"}}, "src": "282:11:0", "typeDescriptions": {"typeIdentifier": "t_contract$_B_$150", "typeString": "contract B"}}, "id": 40, "nodeType": "ExpressionStatement", "src": "282:11:0"}, {"expression": {"id": 46, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"id": 41, "name": "c", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 14, "src": "299:1:0", "typeDescriptions": {"typeIdentifier": "t_contract$_C_$191", "typeString": "contract C"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"arguments": [{"id": 44, "name": "zval", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 20, "src": "309:4:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}], "id": 43, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "NewExpression", "src": "303:5:0", "typeDescriptions": {"typeIdentifier": "t_function_creation_nonpayable$_t_uint256_$returns$_t_contract$_C_$191_$", "typeString": "function (uint256) returns (contract C)"}, "typeName": {"id": 42, "name": "C", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 191, "src": "307:1:0", "typeDescriptions": {"typeIdentifier": "t_contract$_C_$191", "typeString": "contract C"}}}, "id": 45, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "303:11:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_contract$_C_$191", "typeString": "contract C"}}, "src": "299:15:0", "typeDescriptions": {"typeIdentifier": "t_contract$_C_$191", "typeString": "contract C"}}, "id": 47, "nodeType": "ExpressionStatement", "src": "299:15:0"}, {"expression": {"id": 53, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"id": 48, "name": "d", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 16, "src": "320:1:0", "typeDescriptions": {"typeIdentifier": "t_contract$_D_$229", "typeString": "contract D"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"arguments": [{"id": 51, "name": "zval", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 20, "src": "330:4:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}], "id": 50, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "NewExpression", "src": "324:5:0", "typeDescriptions": {"typeIdentifier": "t_function_creation_nonpayable$_t_uint256_$returns$_t_contract$_D_$229_$", "typeString": "function (uint256) returns (contract D)"}, "typeName": {"id": 49, "name": "D", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 229, "src": "328:1:0", "typeDescriptions": {"typeIdentifier": "t_contract$_D_$229", "typeString": "contract D"}}}, "id": 52, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "324:11:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_contract$_D_$229", "typeString": "contract D"}}, "src": "320:15:0", "typeDescriptions": {"typeIdentifier": "t_contract$_D_$229", "typeString": "contract D"}}, "id": 54, "nodeType": "ExpressionStatement", "src": "320:15:0"}]}, "id": 56, "implemented": true, "kind": "constructor", "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "parameters": {"id": 21, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 18, "mutability": "mutable", "name": "yval", "nodeType": "VariableDeclaration", "scope": 56, "src": "209:12:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 17, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "209:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}, {"constant": false, "id": 20, "mutability": "mutable", "name": "zval", "nodeType": "VariableDeclaration", "scope": 56, "src": "223:12:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 19, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "223:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "208:28:0"}, "returnParameters": {"id": 22, "nodeType": "ParameterList", "parameters": [], "src": "237:0:0"}, "scope": 97, "src": "197:143:0", "stateMutability": "nonpayable", "virtual": false, "visibility": "public"}, {"body": {"id": 79, "nodeType": "Block", "src": "389:49:0", "statements": [{"expression": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 77, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 73, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 69, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 65, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 63, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 61, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6, "src": "402:1:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"id": 62, "name": "y", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8, "src": "404:1:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "402:3:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"id": 64, "name": "z", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 10, "src": "406:1:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "402:5:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"arguments": [], "expression": {"argumentTypes": [], "expression": {"id": 66, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 12, "src": "408:1:0", "typeDescriptions": {"typeIdentifier": "t_contract$_B_$150", "typeString": "contract B"}}, "id": 67, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "diff", "nodeType": "MemberAccess", "referencedDeclaration": 149, "src": "408:6:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", "typeString": "function () view external returns (uint256)"}}, "id": 68, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "408:8:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "402:14:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"arguments": [], "expression": {"argumentTypes": [], "expression": {"id": 70, "name": "c", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 14, "src": "417:1:0", "typeDescriptions": {"typeIdentifier": "t_contract$_C_$191", "typeString": "contract C"}}, "id": 71, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sum", "nodeType": "MemberAccess", "referencedDeclaration": 180, "src": "417:5:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", "typeString": "function () view external returns (uint256)"}}, "id": 72, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "417:7:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "402:22:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"arguments": [], "expression": {"argumentTypes": [], "expression": {"id": 74, "name": "d", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 16, "src": "425:1:0", "typeDescriptions": {"typeIdentifier": "t_contract$_D_$229", "typeString": "contract D"}}, "id": 75, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "diff", "nodeType": "MemberAccess", "referencedDeclaration": 228, "src": "425:6:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", "typeString": "function () view external returns (uint256)"}}, "id": 76, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "425:8:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "402:31:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "functionReturnParameters": 60, "id": 78, "nodeType": "Return", "src": "395:38:0"}]}, "functionSelector": "853255cc", "id": 80, "implemented": true, "kind": "function", "modifiers": [], "name": "sum", "nodeType": "FunctionDefinition", "parameters": {"id": 57, "nodeType": "ParameterList", "parameters": [], "src": "356:2:0"}, "returnParameters": {"id": 60, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 59, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "scope": 80, "src": "380:7:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 58, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "380:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "379:9:0"}, "scope": 97, "src": "344:94:0", "stateMutability": "view", "virtual": false, "visibility": "public"}, {"body": {"id": 95, "nodeType": "Block", "src": "476:37:0", "statements": [{"expression": {"id": 87, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"id": 85, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6, "src": "482:1:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"id": 86, "name": "xval", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 82, "src": "486:4:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "482:8:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 88, "nodeType": "ExpressionStatement", "src": "482:8:0"}, {"expression": {"arguments": [{"id": 92, "name": "xval", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 82, "src": "503:4:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}], "expression": {"id": 89, "name": "c", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 14, "src": "496:1:0", "typeDescriptions": {"typeIdentifier": "t_contract$_C_$191", "typeString": "contract C"}}, "id": 91, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "setX", "nodeType": "MemberAccess", "referencedDeclaration": 190, "src": "496:6:0", "typeDescriptions": {"typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$", "typeString": "function (uint256) external"}}, "id": 93, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "496:12:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 94, "nodeType": "ExpressionStatement", "src": "496:12:0"}]}, "functionSelector": "60fe47b1", "id": 96, "implemented": true, "kind": "function", "modifiers": [], "name": "set", "nodeType": "FunctionDefinition", "parameters": {"id": 83, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 82, "mutability": "mutable", "name": "xval", "nodeType": "VariableDeclaration", "scope": 96, "src": "455:12:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 81, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "455:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "454:14:0"}, "returnParameters": {"id": 84, "nodeType": "ParameterList", "parameters": [], "src": "476:0:0"}, "scope": 97, "src": "442:71:0", "stateMutability": "nonpayable", "virtual": false, "visibility": "public"}], "scope": 151, "src": "121:394:0"}, {"abstract": false, "baseContracts": [], "contractDependencies": [344, 480], "contractKind": "contract", "fullyImplemented": true, "id": 150, "linearizedBaseContracts": [150], "name": "B", "nodeType": "ContractDefinition", "nodes": [{"constant": false, "id": 99, "mutability": "mutable", "name": "x", "nodeType": "VariableDeclaration", "scope": 150, "src": "532:9:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 98, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "532:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}, {"constant": false, "id": 101, "mutability": "mutable", "name": "y", "nodeType": "VariableDeclaration", "scope": 150, "src": "545:9:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 100, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "545:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}, {"constant": false, "id": 103, "mutability": "mutable", "name": "g", "nodeType": "VariableDeclaration", "scope": 150, "src": "558:3:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_contract$_G_$344", "typeString": "contract G"}, "typeName": {"id": 102, "name": "G", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 344, "src": "558:1:0", "typeDescriptions": {"typeIdentifier": "t_contract$_G_$344", "typeString": "contract G"}}, "visibility": "internal"}, {"constant": false, "id": 105, "mutability": "mutable", "name": "k", "nodeType": "VariableDeclaration", "scope": 150, "src": "565:3:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_contract$_K_$480", "typeString": "contract K"}, "typeName": {"id": 104, "name": "K", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 480, "src": "565:1:0", "typeDescriptions": {"typeIdentifier": "t_contract$_K_$480", "typeString": "contract K"}}, "visibility": "internal"}, {"body": {"id": 134, "nodeType": "Block", "src": "587:67:0", "statements": [{"expression": {"id": 110, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"id": 108, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 99, "src": "593:1:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"hexValue": "30", "id": 109, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "597:1:0", "typeDescriptions": {"typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0"}, "value": "0"}, "src": "593:5:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 111, "nodeType": "ExpressionStatement", "src": "593:5:0"}, {"expression": {"id": 114, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"id": 112, "name": "y", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 101, "src": "604:1:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"hexValue": "36", "id": 113, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "608:1:0", "typeDescriptions": {"typeIdentifier": "t_rational_6_by_1", "typeString": "int_const 6"}, "value": "6"}, "src": "604:5:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 115, "nodeType": "ExpressionStatement", "src": "604:5:0"}, {"expression": {"id": 123, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"id": 116, "name": "g", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 103, "src": "615:1:0", "typeDescriptions": {"typeIdentifier": "t_contract$_G_$344", "typeString": "contract G"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"arguments": [{"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 121, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 119, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 99, "src": "625:1:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"hexValue": "31", "id": 120, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "627:1:0", "typeDescriptions": {"typeIdentifier": "t_rational_1_by_1", "typeString": "int_const 1"}, "value": "1"}, "src": "625:3:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}], "id": 118, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "NewExpression", "src": "619:5:0", "typeDescriptions": {"typeIdentifier": "t_function_creation_nonpayable$_t_uint256_$returns$_t_contract$_G_$344_$", "typeString": "function (uint256) returns (contract G)"}, "typeName": {"id": 117, "name": "G", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 344, "src": "623:1:0", "typeDescriptions": {"typeIdentifier": "t_contract$_G_$344", "typeString": "contract G"}}}, "id": 122, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "619:10:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_contract$_G_$344", "typeString": "contract G"}}, "src": "615:14:0", "typeDescriptions": {"typeIdentifier": "t_contract$_G_$344", "typeString": "contract G"}}, "id": 124, "nodeType": "ExpressionStatement", "src": "615:14:0"}, {"expression": {"id": 132, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"id": 125, "name": "k", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 105, "src": "635:1:0", "typeDescriptions": {"typeIdentifier": "t_contract$_K_$480", "typeString": "contract K"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"arguments": [{"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 130, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 128, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 99, "src": "645:1:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"hexValue": "32", "id": 129, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "647:1:0", "typeDescriptions": {"typeIdentifier": "t_rational_2_by_1", "typeString": "int_const 2"}, "value": "2"}, "src": "645:3:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}], "id": 127, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "NewExpression", "src": "639:5:0", "typeDescriptions": {"typeIdentifier": "t_function_creation_nonpayable$_t_uint256_$returns$_t_contract$_K_$480_$", "typeString": "function (uint256) returns (contract K)"}, "typeName": {"id": 126, "name": "K", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 480, "src": "643:1:0", "typeDescriptions": {"typeIdentifier": "t_contract$_K_$480", "typeString": "contract K"}}}, "id": 131, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "639:10:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_contract$_K_$480", "typeString": "contract K"}}, "src": "635:14:0", "typeDescriptions": {"typeIdentifier": "t_contract$_K_$480", "typeString": "contract K"}}, "id": 133, "nodeType": "ExpressionStatement", "src": "635:14:0"}]}, "id": 135, "implemented": true, "kind": "constructor", "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "parameters": {"id": 106, "nodeType": "ParameterList", "parameters": [], "src": "584:2:0"}, "returnParameters": {"id": 107, "nodeType": "ParameterList", "parameters": [], "src": "587:0:0"}, "scope": 150, "src": "573:81:0", "stateMutability": "nonpayable", "virtual": false, "visibility": "public"}, {"body": {"id": 148, "nodeType": "Block", "src": "704:29:0", "statements": [{"expression": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 146, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 142, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 140, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 99, "src": "717:1:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "-", "rightExpression": {"id": 141, "name": "y", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 101, "src": "719:1:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "717:3:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"arguments": [], "expression": {"argumentTypes": [], "expression": {"id": 143, "name": "g", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 103, "src": "721:1:0", "typeDescriptions": {"typeIdentifier": "t_contract$_G_$344", "typeString": "contract G"}}, "id": 144, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sum", "nodeType": "MemberAccess", "referencedDeclaration": 325, "src": "721:5:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", "typeString": "function () view external returns (uint256)"}}, "id": 145, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "721:7:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "717:11:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "functionReturnParameters": 139, "id": 147, "nodeType": "Return", "src": "710:18:0"}]}, "functionSelector": "a0d7afb7", "id": 149, "implemented": true, "kind": "function", "modifiers": [], "name": "diff", "nodeType": "FunctionDefinition", "parameters": {"id": 136, "nodeType": "ParameterList", "parameters": [], "src": "671:2:0"}, "returnParameters": {"id": 139, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 138, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "scope": 149, "src": "695:7:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 137, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "695:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "694:9:0"}, "scope": 150, "src": "658:75:0", "stateMutability": "view", "virtual": false, "visibility": "public"}], "scope": 151, "src": "517:218:0"}], "src": "37:699:0"}, "userdoc": {"methods": {}, "notice": null}, "devdoc": {"methods": {}, "author": null, "details": null, "title": null}} \ No newline at end of file diff --git a/tests/expected/hardhat-multi-file/B.json b/tests/expected/hardhat-multi-file/B.json new file mode 100644 index 00000000..a0f522d7 --- /dev/null +++ b/tests/expected/hardhat-multi-file/B.json @@ -0,0 +1 @@ +{"contractName": "B", "abi": [{"inputs": [], "stateMutability": "nonpayable", "type": "constructor"}, {"inputs": [], "name": "diff", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "stateMutability": "view", "type": "function"}], "bytecode": "0x608060405234801561001057600080fd5b5060008081905550600660018190555060016000540160405161003290610117565b80828152602001915050604051809103906000f080158015610058573d6000803e3d6000fd5b50600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506002600054016040516100ab90610124565b80828152602001915050604051809103906000f0801580156100d1573d6000803e3d6000fd5b50600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610131565b6107ed8061026e83390190565b610ea780610a5b83390190565b61012e806101406000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c8063a0d7afb714602d575b600080fd5b60336049565b6040518082815260200191505060405180910390f35b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663853255cc6040518163ffffffff1660e01b815260040160206040518083038186803b15801560b257600080fd5b505afa15801560c5573d6000803e3d6000fd5b505050506040513d602081101560da57600080fd5b8101908080519060200190929190505050600154600054030190509056fe608060405234801561001057600080fd5b506040516107ed3803806107ed8339818101604052602081101561003357600080fd5b810190808051906020019092919050505060008081905550806001819055506005604051610060906100cd565b80828152602001915050604051809103906000f080158015610086573d6000803e3d6000fd5b50600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506100da565b610503806102ea83390190565b610201806100e96000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80634018d9aa1461003b578063853255cc14610069575b600080fd5b6100676004803603602081101561005157600080fd5b8101908080359060200190929190505050610087565b005b610071610121565b6040518082815260200191505060405180910390f35b80600081905550600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16634018d9aa600183016040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561010657600080fd5b505af115801561011a573d6000803e3d6000fd5b5050505050565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663853255cc6040518163ffffffff1660e01b815260040160206040518083038186803b15801561018b57600080fd5b505afa15801561019f573d6000803e3d6000fd5b505050506040513d60208110156101b557600080fd5b810190808051906020019092919050505090509056fea2646970667358221220b82df2aa2e430319215b47e2ba4c79732ea53c9686190c1dc8530c55b72060e564736f6c63430007030033608060405234801561001057600080fd5b506040516105033803806105038339818101604052602081101561003357600080fd5b810190808051906020019092919050505060008081905550806001819055508060405161005f906100cc565b80828152602001915050604051809103906000f080158015610085573d6000803e3d6000fd5b50600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506100d9565b6102a28061026183390190565b610179806100e86000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80634018d9aa1461003b578063853255cc14610069575b600080fd5b6100676004803603602081101561005157600080fd5b8101908080359060200190929190505050610087565b005b610071610091565b6040518082815260200191505060405180910390f35b8060008190555050565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a0d7afb76040518163ffffffff1660e01b815260040160206040518083038186803b1580156100fb57600080fd5b505afa15801561010f573d6000803e3d6000fd5b505050506040513d602081101561012557600080fd5b8101908080519060200190929190505050600154600054010190509056fea2646970667358221220ec8b5ae5c6f71260e1077af8088b564be4ae241ac16c43e3cac821682be2d7c964736f6c63430007030033608060405234801561001057600080fd5b506040516102a23803806102a28339818101604052602081101561003357600080fd5b810190808051906020019092919050505060008081905550806001819055506005604051610060906100cd565b80828152602001915050604051809103906000f080158015610086573d6000803e3d6000fd5b50600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506100da565b61012d8061017583390190565b608d806100e86000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c8063a0d7afb714602d575b600080fd5b60336049565b6040518082815260200191505060405180910390f35b60006001546000540390509056fea26469706673582212204e7f66950d7eac1667bf123fd0c2c0b36d53de5866b4bd867fac7411e321b0b464736f6c63430007030033608060405234801561001057600080fd5b5060405161012d38038061012d8339818101604052602081101561003357600080fd5b810190808051906020019092919050505060008081905550806001819055505060cc806100616000396000f3fe6080604052348015600f57600080fd5b506004361060325760003560e01c80634018d9aa146037578063853255cc146062575b600080fd5b606060048036036020811015604b57600080fd5b8101908080359060200190929190505050607e565b005b60686088565b6040518082815260200191505060405180910390f35b8060008190555050565b60006001546000540190509056fea2646970667358221220fa023934f603bf6bcaae6a6ab06db920cce4aca360c67548633e7f3514118cc964736f6c63430007030033608060405234801561001057600080fd5b50604051610ea7380380610ea78339818101604052602081101561003357600080fd5b810190808051906020019092919050505060008081905550806001819055506005604051610060906100cd565b80828152602001915050604051809103906000f080158015610086573d6000803e3d6000fd5b50600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506100da565b610bbd806102ea83390190565b610201806100e96000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80634018d9aa1461003b578063853255cc14610069575b600080fd5b6100676004803603602081101561005157600080fd5b8101908080359060200190929190505050610087565b005b610071610121565b6040518082815260200191505060405180910390f35b80600081905550600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16634018d9aa600183016040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561010657600080fd5b505af115801561011a573d6000803e3d6000fd5b5050505050565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663853255cc6040518163ffffffff1660e01b815260040160206040518083038186803b15801561018b57600080fd5b505afa15801561019f573d6000803e3d6000fd5b505050506040513d60208110156101b557600080fd5b810190808051906020019092919050505090509056fea2646970667358221220df9be5d8f790b183800142a7b55385ddfdcdb8a32d28a3611189c1f9935f083e64736f6c63430007030033608060405234801561001057600080fd5b50604051610bbd380380610bbd8339818101604052602081101561003357600080fd5b810190808051906020019092919050505060008081905550806001819055508060405161005f90610143565b80828152602001915050604051809103906000f080158015610085573d6000803e3d6000fd5b50600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600181016040516100d690610150565b80828152602001915050604051809103906000f0801580156100fc573d6000803e3d6000fd5b50600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505061015d565b6102a28061041883390190565b610503806106ba83390190565b6102ac8061016c6000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80634018d9aa1461003b578063853255cc14610069575b600080fd5b6100676004803603602081101561005157600080fd5b8101908080359060200190929190505050610087565b005b610071610120565b6040518082815260200191505060405180910390f35b80600081905550600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16634018d9aa6001546040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561010557600080fd5b505af1158015610119573d6000803e3d6000fd5b5050505050565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663853255cc6040518163ffffffff1660e01b815260040160206040518083038186803b15801561018a57600080fd5b505afa15801561019e573d6000803e3d6000fd5b505050506040513d60208110156101b457600080fd5b8101908080519060200190929190505050600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a0d7afb76040518163ffffffff1660e01b815260040160206040518083038186803b15801561022d57600080fd5b505afa158015610241573d6000803e3d6000fd5b505050506040513d602081101561025757600080fd5b810190808051906020019092919050505060015460005401010190509056fea26469706673582212207adf748c4fbc65b7c753bb0a72e946f848bffb9e1d7c8e268d29021c42b7df4964736f6c63430007030033608060405234801561001057600080fd5b506040516102a23803806102a28339818101604052602081101561003357600080fd5b810190808051906020019092919050505060008081905550806001819055506005604051610060906100cd565b80828152602001915050604051809103906000f080158015610086573d6000803e3d6000fd5b50600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506100da565b61012d8061017583390190565b608d806100e86000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c8063a0d7afb714602d575b600080fd5b60336049565b6040518082815260200191505060405180910390f35b60006001546000540390509056fea26469706673582212204e7f66950d7eac1667bf123fd0c2c0b36d53de5866b4bd867fac7411e321b0b464736f6c63430007030033608060405234801561001057600080fd5b5060405161012d38038061012d8339818101604052602081101561003357600080fd5b810190808051906020019092919050505060008081905550806001819055505060cc806100616000396000f3fe6080604052348015600f57600080fd5b506004361060325760003560e01c80634018d9aa146037578063853255cc146062575b600080fd5b606060048036036020811015604b57600080fd5b8101908080359060200190929190505050607e565b005b60686088565b6040518082815260200191505060405180910390f35b8060008190555050565b60006001546000540190509056fea2646970667358221220fa023934f603bf6bcaae6a6ab06db920cce4aca360c67548633e7f3514118cc964736f6c63430007030033608060405234801561001057600080fd5b506040516105033803806105038339818101604052602081101561003357600080fd5b810190808051906020019092919050505060008081905550806001819055508060405161005f906100cc565b80828152602001915050604051809103906000f080158015610085573d6000803e3d6000fd5b50600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506100d9565b6102a28061026183390190565b610179806100e86000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80634018d9aa1461003b578063853255cc14610069575b600080fd5b6100676004803603602081101561005157600080fd5b8101908080359060200190929190505050610087565b005b610071610091565b6040518082815260200191505060405180910390f35b8060008190555050565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a0d7afb76040518163ffffffff1660e01b815260040160206040518083038186803b1580156100fb57600080fd5b505afa15801561010f573d6000803e3d6000fd5b505050506040513d602081101561012557600080fd5b8101908080519060200190929190505050600154600054010190509056fea2646970667358221220ec8b5ae5c6f71260e1077af8088b564be4ae241ac16c43e3cac821682be2d7c964736f6c63430007030033608060405234801561001057600080fd5b506040516102a23803806102a28339818101604052602081101561003357600080fd5b810190808051906020019092919050505060008081905550806001819055506005604051610060906100cd565b80828152602001915050604051809103906000f080158015610086573d6000803e3d6000fd5b50600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506100da565b61012d8061017583390190565b608d806100e86000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c8063a0d7afb714602d575b600080fd5b60336049565b6040518082815260200191505060405180910390f35b60006001546000540390509056fea26469706673582212204e7f66950d7eac1667bf123fd0c2c0b36d53de5866b4bd867fac7411e321b0b464736f6c63430007030033608060405234801561001057600080fd5b5060405161012d38038061012d8339818101604052602081101561003357600080fd5b810190808051906020019092919050505060008081905550806001819055505060cc806100616000396000f3fe6080604052348015600f57600080fd5b506004361060325760003560e01c80634018d9aa146037578063853255cc146062575b600080fd5b606060048036036020811015604b57600080fd5b8101908080359060200190929190505050607e565b005b60686088565b6040518082815260200191505060405180910390f35b8060008190555050565b60006001546000540190509056fea2646970667358221220fa023934f603bf6bcaae6a6ab06db920cce4aca360c67548633e7f3514118cc964736f6c63430007030033", "deployedBytecode": "0x6080604052348015600f57600080fd5b506004361060285760003560e01c8063a0d7afb714602d575b600080fd5b60336049565b6040518082815260200191505060405180910390f35b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663853255cc6040518163ffffffff1660e01b815260040160206040518083038186803b15801560b257600080fd5b505afa15801560c5573d6000803e3d6000fd5b505050506040513d602081101560da57600080fd5b8101908080519060200190929190505050600154600054030190509056fe", "ast": {"absolutePath": "contracts/A.sol", "exportedSymbols": {"A": [97], "B": [150], "C": [191], "D": [229], "E": [285], "G": [344], "I": [421], "K": [480]}, "id": 151, "license": "Unlicense", "nodeType": "SourceUnit", "nodes": [{"id": 1, "literals": ["solidity", "^", "0.7", ".0"], "nodeType": "PragmaDirective", "src": "37:23:0"}, {"absolutePath": "contracts/C.sol", "file": "./C.sol", "id": 2, "nodeType": "ImportDirective", "scope": 151, "sourceUnit": 230, "src": "62:17:0", "symbolAliases": [], "unitAlias": ""}, {"absolutePath": "contracts/E/G.sol", "file": "./E/G.sol", "id": 3, "nodeType": "ImportDirective", "scope": 151, "sourceUnit": 345, "src": "80:19:0", "symbolAliases": [], "unitAlias": ""}, {"absolutePath": "contracts/I/K.sol", "file": "./I/K.sol", "id": 4, "nodeType": "ImportDirective", "scope": 151, "sourceUnit": 481, "src": "100:19:0", "symbolAliases": [], "unitAlias": ""}, {"abstract": false, "baseContracts": [], "contractDependencies": [150, 191, 229], "contractKind": "contract", "fullyImplemented": true, "id": 97, "linearizedBaseContracts": [97], "name": "A", "nodeType": "ContractDefinition", "nodes": [{"constant": false, "id": 6, "mutability": "mutable", "name": "x", "nodeType": "VariableDeclaration", "scope": 97, "src": "136:9:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 5, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "136:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}, {"constant": false, "id": 8, "mutability": "mutable", "name": "y", "nodeType": "VariableDeclaration", "scope": 97, "src": "149:9:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 7, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "149:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}, {"constant": false, "id": 10, "mutability": "mutable", "name": "z", "nodeType": "VariableDeclaration", "scope": 97, "src": "162:9:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 9, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "162:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}, {"constant": false, "id": 12, "mutability": "mutable", "name": "b", "nodeType": "VariableDeclaration", "scope": 97, "src": "175:3:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_contract$_B_$150", "typeString": "contract B"}, "typeName": {"id": 11, "name": "B", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 150, "src": "175:1:0", "typeDescriptions": {"typeIdentifier": "t_contract$_B_$150", "typeString": "contract B"}}, "visibility": "internal"}, {"constant": false, "id": 14, "mutability": "mutable", "name": "c", "nodeType": "VariableDeclaration", "scope": 97, "src": "182:3:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_contract$_C_$191", "typeString": "contract C"}, "typeName": {"id": 13, "name": "C", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 191, "src": "182:1:0", "typeDescriptions": {"typeIdentifier": "t_contract$_C_$191", "typeString": "contract C"}}, "visibility": "internal"}, {"constant": false, "id": 16, "mutability": "mutable", "name": "d", "nodeType": "VariableDeclaration", "scope": 97, "src": "189:3:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_contract$_D_$229", "typeString": "contract D"}, "typeName": {"id": 15, "name": "D", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 229, "src": "189:1:0", "typeDescriptions": {"typeIdentifier": "t_contract$_D_$229", "typeString": "contract D"}}, "visibility": "internal"}, {"body": {"id": 55, "nodeType": "Block", "src": "237:103:0", "statements": [{"expression": {"id": 25, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"id": 23, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6, "src": "243:1:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"hexValue": "30", "id": 24, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "247:1:0", "typeDescriptions": {"typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0"}, "value": "0"}, "src": "243:5:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 26, "nodeType": "ExpressionStatement", "src": "243:5:0"}, {"expression": {"id": 29, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"id": 27, "name": "y", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8, "src": "254:1:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"id": 28, "name": "yval", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 18, "src": "258:4:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "254:8:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 30, "nodeType": "ExpressionStatement", "src": "254:8:0"}, {"expression": {"id": 33, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"id": 31, "name": "z", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 10, "src": "268:1:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"id": 32, "name": "zval", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 20, "src": "272:4:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "268:8:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 34, "nodeType": "ExpressionStatement", "src": "268:8:0"}, {"expression": {"id": 39, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"id": 35, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 12, "src": "282:1:0", "typeDescriptions": {"typeIdentifier": "t_contract$_B_$150", "typeString": "contract B"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"arguments": [], "expression": {"argumentTypes": [], "id": 37, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "NewExpression", "src": "286:5:0", "typeDescriptions": {"typeIdentifier": "t_function_creation_nonpayable$__$returns$_t_contract$_B_$150_$", "typeString": "function () returns (contract B)"}, "typeName": {"id": 36, "name": "B", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 150, "src": "290:1:0", "typeDescriptions": {"typeIdentifier": "t_contract$_B_$150", "typeString": "contract B"}}}, "id": 38, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "286:7:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_contract$_B_$150", "typeString": "contract B"}}, "src": "282:11:0", "typeDescriptions": {"typeIdentifier": "t_contract$_B_$150", "typeString": "contract B"}}, "id": 40, "nodeType": "ExpressionStatement", "src": "282:11:0"}, {"expression": {"id": 46, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"id": 41, "name": "c", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 14, "src": "299:1:0", "typeDescriptions": {"typeIdentifier": "t_contract$_C_$191", "typeString": "contract C"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"arguments": [{"id": 44, "name": "zval", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 20, "src": "309:4:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}], "id": 43, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "NewExpression", "src": "303:5:0", "typeDescriptions": {"typeIdentifier": "t_function_creation_nonpayable$_t_uint256_$returns$_t_contract$_C_$191_$", "typeString": "function (uint256) returns (contract C)"}, "typeName": {"id": 42, "name": "C", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 191, "src": "307:1:0", "typeDescriptions": {"typeIdentifier": "t_contract$_C_$191", "typeString": "contract C"}}}, "id": 45, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "303:11:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_contract$_C_$191", "typeString": "contract C"}}, "src": "299:15:0", "typeDescriptions": {"typeIdentifier": "t_contract$_C_$191", "typeString": "contract C"}}, "id": 47, "nodeType": "ExpressionStatement", "src": "299:15:0"}, {"expression": {"id": 53, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"id": 48, "name": "d", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 16, "src": "320:1:0", "typeDescriptions": {"typeIdentifier": "t_contract$_D_$229", "typeString": "contract D"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"arguments": [{"id": 51, "name": "zval", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 20, "src": "330:4:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}], "id": 50, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "NewExpression", "src": "324:5:0", "typeDescriptions": {"typeIdentifier": "t_function_creation_nonpayable$_t_uint256_$returns$_t_contract$_D_$229_$", "typeString": "function (uint256) returns (contract D)"}, "typeName": {"id": 49, "name": "D", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 229, "src": "328:1:0", "typeDescriptions": {"typeIdentifier": "t_contract$_D_$229", "typeString": "contract D"}}}, "id": 52, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "324:11:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_contract$_D_$229", "typeString": "contract D"}}, "src": "320:15:0", "typeDescriptions": {"typeIdentifier": "t_contract$_D_$229", "typeString": "contract D"}}, "id": 54, "nodeType": "ExpressionStatement", "src": "320:15:0"}]}, "id": 56, "implemented": true, "kind": "constructor", "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "parameters": {"id": 21, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 18, "mutability": "mutable", "name": "yval", "nodeType": "VariableDeclaration", "scope": 56, "src": "209:12:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 17, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "209:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}, {"constant": false, "id": 20, "mutability": "mutable", "name": "zval", "nodeType": "VariableDeclaration", "scope": 56, "src": "223:12:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 19, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "223:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "208:28:0"}, "returnParameters": {"id": 22, "nodeType": "ParameterList", "parameters": [], "src": "237:0:0"}, "scope": 97, "src": "197:143:0", "stateMutability": "nonpayable", "virtual": false, "visibility": "public"}, {"body": {"id": 79, "nodeType": "Block", "src": "389:49:0", "statements": [{"expression": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 77, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 73, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 69, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 65, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 63, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 61, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6, "src": "402:1:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"id": 62, "name": "y", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8, "src": "404:1:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "402:3:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"id": 64, "name": "z", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 10, "src": "406:1:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "402:5:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"arguments": [], "expression": {"argumentTypes": [], "expression": {"id": 66, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 12, "src": "408:1:0", "typeDescriptions": {"typeIdentifier": "t_contract$_B_$150", "typeString": "contract B"}}, "id": 67, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "diff", "nodeType": "MemberAccess", "referencedDeclaration": 149, "src": "408:6:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", "typeString": "function () view external returns (uint256)"}}, "id": 68, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "408:8:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "402:14:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"arguments": [], "expression": {"argumentTypes": [], "expression": {"id": 70, "name": "c", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 14, "src": "417:1:0", "typeDescriptions": {"typeIdentifier": "t_contract$_C_$191", "typeString": "contract C"}}, "id": 71, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sum", "nodeType": "MemberAccess", "referencedDeclaration": 180, "src": "417:5:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", "typeString": "function () view external returns (uint256)"}}, "id": 72, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "417:7:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "402:22:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"arguments": [], "expression": {"argumentTypes": [], "expression": {"id": 74, "name": "d", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 16, "src": "425:1:0", "typeDescriptions": {"typeIdentifier": "t_contract$_D_$229", "typeString": "contract D"}}, "id": 75, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "diff", "nodeType": "MemberAccess", "referencedDeclaration": 228, "src": "425:6:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", "typeString": "function () view external returns (uint256)"}}, "id": 76, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "425:8:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "402:31:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "functionReturnParameters": 60, "id": 78, "nodeType": "Return", "src": "395:38:0"}]}, "functionSelector": "853255cc", "id": 80, "implemented": true, "kind": "function", "modifiers": [], "name": "sum", "nodeType": "FunctionDefinition", "parameters": {"id": 57, "nodeType": "ParameterList", "parameters": [], "src": "356:2:0"}, "returnParameters": {"id": 60, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 59, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "scope": 80, "src": "380:7:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 58, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "380:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "379:9:0"}, "scope": 97, "src": "344:94:0", "stateMutability": "view", "virtual": false, "visibility": "public"}, {"body": {"id": 95, "nodeType": "Block", "src": "476:37:0", "statements": [{"expression": {"id": 87, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"id": 85, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6, "src": "482:1:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"id": 86, "name": "xval", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 82, "src": "486:4:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "482:8:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 88, "nodeType": "ExpressionStatement", "src": "482:8:0"}, {"expression": {"arguments": [{"id": 92, "name": "xval", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 82, "src": "503:4:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}], "expression": {"id": 89, "name": "c", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 14, "src": "496:1:0", "typeDescriptions": {"typeIdentifier": "t_contract$_C_$191", "typeString": "contract C"}}, "id": 91, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "setX", "nodeType": "MemberAccess", "referencedDeclaration": 190, "src": "496:6:0", "typeDescriptions": {"typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$", "typeString": "function (uint256) external"}}, "id": 93, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "496:12:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 94, "nodeType": "ExpressionStatement", "src": "496:12:0"}]}, "functionSelector": "60fe47b1", "id": 96, "implemented": true, "kind": "function", "modifiers": [], "name": "set", "nodeType": "FunctionDefinition", "parameters": {"id": 83, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 82, "mutability": "mutable", "name": "xval", "nodeType": "VariableDeclaration", "scope": 96, "src": "455:12:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 81, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "455:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "454:14:0"}, "returnParameters": {"id": 84, "nodeType": "ParameterList", "parameters": [], "src": "476:0:0"}, "scope": 97, "src": "442:71:0", "stateMutability": "nonpayable", "virtual": false, "visibility": "public"}], "scope": 151, "src": "121:394:0"}, {"abstract": false, "baseContracts": [], "contractDependencies": [344, 480], "contractKind": "contract", "fullyImplemented": true, "id": 150, "linearizedBaseContracts": [150], "name": "B", "nodeType": "ContractDefinition", "nodes": [{"constant": false, "id": 99, "mutability": "mutable", "name": "x", "nodeType": "VariableDeclaration", "scope": 150, "src": "532:9:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 98, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "532:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}, {"constant": false, "id": 101, "mutability": "mutable", "name": "y", "nodeType": "VariableDeclaration", "scope": 150, "src": "545:9:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 100, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "545:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}, {"constant": false, "id": 103, "mutability": "mutable", "name": "g", "nodeType": "VariableDeclaration", "scope": 150, "src": "558:3:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_contract$_G_$344", "typeString": "contract G"}, "typeName": {"id": 102, "name": "G", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 344, "src": "558:1:0", "typeDescriptions": {"typeIdentifier": "t_contract$_G_$344", "typeString": "contract G"}}, "visibility": "internal"}, {"constant": false, "id": 105, "mutability": "mutable", "name": "k", "nodeType": "VariableDeclaration", "scope": 150, "src": "565:3:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_contract$_K_$480", "typeString": "contract K"}, "typeName": {"id": 104, "name": "K", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 480, "src": "565:1:0", "typeDescriptions": {"typeIdentifier": "t_contract$_K_$480", "typeString": "contract K"}}, "visibility": "internal"}, {"body": {"id": 134, "nodeType": "Block", "src": "587:67:0", "statements": [{"expression": {"id": 110, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"id": 108, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 99, "src": "593:1:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"hexValue": "30", "id": 109, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "597:1:0", "typeDescriptions": {"typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0"}, "value": "0"}, "src": "593:5:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 111, "nodeType": "ExpressionStatement", "src": "593:5:0"}, {"expression": {"id": 114, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"id": 112, "name": "y", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 101, "src": "604:1:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"hexValue": "36", "id": 113, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "608:1:0", "typeDescriptions": {"typeIdentifier": "t_rational_6_by_1", "typeString": "int_const 6"}, "value": "6"}, "src": "604:5:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 115, "nodeType": "ExpressionStatement", "src": "604:5:0"}, {"expression": {"id": 123, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"id": 116, "name": "g", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 103, "src": "615:1:0", "typeDescriptions": {"typeIdentifier": "t_contract$_G_$344", "typeString": "contract G"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"arguments": [{"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 121, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 119, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 99, "src": "625:1:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"hexValue": "31", "id": 120, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "627:1:0", "typeDescriptions": {"typeIdentifier": "t_rational_1_by_1", "typeString": "int_const 1"}, "value": "1"}, "src": "625:3:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}], "id": 118, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "NewExpression", "src": "619:5:0", "typeDescriptions": {"typeIdentifier": "t_function_creation_nonpayable$_t_uint256_$returns$_t_contract$_G_$344_$", "typeString": "function (uint256) returns (contract G)"}, "typeName": {"id": 117, "name": "G", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 344, "src": "623:1:0", "typeDescriptions": {"typeIdentifier": "t_contract$_G_$344", "typeString": "contract G"}}}, "id": 122, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "619:10:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_contract$_G_$344", "typeString": "contract G"}}, "src": "615:14:0", "typeDescriptions": {"typeIdentifier": "t_contract$_G_$344", "typeString": "contract G"}}, "id": 124, "nodeType": "ExpressionStatement", "src": "615:14:0"}, {"expression": {"id": 132, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"id": 125, "name": "k", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 105, "src": "635:1:0", "typeDescriptions": {"typeIdentifier": "t_contract$_K_$480", "typeString": "contract K"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"arguments": [{"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 130, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 128, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 99, "src": "645:1:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"hexValue": "32", "id": 129, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "647:1:0", "typeDescriptions": {"typeIdentifier": "t_rational_2_by_1", "typeString": "int_const 2"}, "value": "2"}, "src": "645:3:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}], "id": 127, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "NewExpression", "src": "639:5:0", "typeDescriptions": {"typeIdentifier": "t_function_creation_nonpayable$_t_uint256_$returns$_t_contract$_K_$480_$", "typeString": "function (uint256) returns (contract K)"}, "typeName": {"id": 126, "name": "K", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 480, "src": "643:1:0", "typeDescriptions": {"typeIdentifier": "t_contract$_K_$480", "typeString": "contract K"}}}, "id": 131, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "639:10:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_contract$_K_$480", "typeString": "contract K"}}, "src": "635:14:0", "typeDescriptions": {"typeIdentifier": "t_contract$_K_$480", "typeString": "contract K"}}, "id": 133, "nodeType": "ExpressionStatement", "src": "635:14:0"}]}, "id": 135, "implemented": true, "kind": "constructor", "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "parameters": {"id": 106, "nodeType": "ParameterList", "parameters": [], "src": "584:2:0"}, "returnParameters": {"id": 107, "nodeType": "ParameterList", "parameters": [], "src": "587:0:0"}, "scope": 150, "src": "573:81:0", "stateMutability": "nonpayable", "virtual": false, "visibility": "public"}, {"body": {"id": 148, "nodeType": "Block", "src": "704:29:0", "statements": [{"expression": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 146, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 142, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 140, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 99, "src": "717:1:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "-", "rightExpression": {"id": 141, "name": "y", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 101, "src": "719:1:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "717:3:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"arguments": [], "expression": {"argumentTypes": [], "expression": {"id": 143, "name": "g", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 103, "src": "721:1:0", "typeDescriptions": {"typeIdentifier": "t_contract$_G_$344", "typeString": "contract G"}}, "id": 144, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sum", "nodeType": "MemberAccess", "referencedDeclaration": 325, "src": "721:5:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", "typeString": "function () view external returns (uint256)"}}, "id": 145, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "721:7:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "717:11:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "functionReturnParameters": 139, "id": 147, "nodeType": "Return", "src": "710:18:0"}]}, "functionSelector": "a0d7afb7", "id": 149, "implemented": true, "kind": "function", "modifiers": [], "name": "diff", "nodeType": "FunctionDefinition", "parameters": {"id": 136, "nodeType": "ParameterList", "parameters": [], "src": "671:2:0"}, "returnParameters": {"id": 139, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 138, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "scope": 149, "src": "695:7:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 137, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "695:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "694:9:0"}, "scope": 150, "src": "658:75:0", "stateMutability": "view", "virtual": false, "visibility": "public"}], "scope": 151, "src": "517:218:0"}], "src": "37:699:0"}, "userdoc": {"methods": {}, "notice": null}, "devdoc": {"methods": {}, "author": null, "details": null, "title": null}} \ No newline at end of file diff --git a/tests/expected/hardhat-multi-file/C.json b/tests/expected/hardhat-multi-file/C.json new file mode 100644 index 00000000..3f0041c4 --- /dev/null +++ b/tests/expected/hardhat-multi-file/C.json @@ -0,0 +1 @@ +{"contractName": "C", "abi": [{"inputs": [{"internalType": "uint256", "name": "yval", "type": "uint256"}], "stateMutability": "nonpayable", "type": "constructor"}, {"inputs": [{"internalType": "uint256", "name": "xval", "type": "uint256"}], "name": "setX", "outputs": [], "stateMutability": "nonpayable", "type": "function"}, {"inputs": [], "name": "sum", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "stateMutability": "view", "type": "function"}], "bytecode": "0x608060405234801561001057600080fd5b5060405161012d38038061012d8339818101604052602081101561003357600080fd5b810190808051906020019092919050505060008081905550806001819055505060cc806100616000396000f3fe6080604052348015600f57600080fd5b506004361060325760003560e01c80634018d9aa146037578063853255cc146062575b600080fd5b606060048036036020811015604b57600080fd5b8101908080359060200190929190505050607e565b005b60686088565b6040518082815260200191505060405180910390f35b8060008190555050565b60006001546000540190509056fe", "deployedBytecode": "0x6080604052348015600f57600080fd5b506004361060325760003560e01c80634018d9aa146037578063853255cc146062575b600080fd5b606060048036036020811015604b57600080fd5b8101908080359060200190929190505050607e565b005b60686088565b6040518082815260200191505060405180910390f35b8060008190555050565b60006001546000540190509056fe", "ast": {"absolutePath": "contracts/C.sol", "exportedSymbols": {"C": [191], "D": [229]}, "id": 230, "license": "Unlicense", "nodeType": "SourceUnit", "nodes": [{"id": 152, "literals": ["solidity", "^", "0.7", ".0"], "nodeType": "PragmaDirective", "src": "37:23:1"}, {"abstract": false, "baseContracts": [], "contractDependencies": [], "contractKind": "contract", "fullyImplemented": true, "id": 191, "linearizedBaseContracts": [191], "name": "C", "nodeType": "ContractDefinition", "nodes": [{"constant": false, "id": 154, "mutability": "mutable", "name": "x", "nodeType": "VariableDeclaration", "scope": 191, "src": "77:9:1", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 153, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "77:7:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}, {"constant": false, "id": 156, "mutability": "mutable", "name": "y", "nodeType": "VariableDeclaration", "scope": 191, "src": "90:9:1", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 155, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "90:7:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}, {"body": {"id": 169, "nodeType": "Block", "src": "130:30:1", "statements": [{"expression": {"id": 163, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"id": 161, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 154, "src": "136:1:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"hexValue": "30", "id": 162, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "140:1:1", "typeDescriptions": {"typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0"}, "value": "0"}, "src": "136:5:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 164, "nodeType": "ExpressionStatement", "src": "136:5:1"}, {"expression": {"id": 167, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"id": 165, "name": "y", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 156, "src": "147:1:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"id": 166, "name": "yval", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 158, "src": "151:4:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "147:8:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 168, "nodeType": "ExpressionStatement", "src": "147:8:1"}]}, "id": 170, "implemented": true, "kind": "constructor", "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "parameters": {"id": 159, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 158, "mutability": "mutable", "name": "yval", "nodeType": "VariableDeclaration", "scope": 170, "src": "116:12:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 157, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "116:7:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "115:14:1"}, "returnParameters": {"id": 160, "nodeType": "ParameterList", "parameters": [], "src": "130:0:1"}, "scope": 191, "src": "104:56:1", "stateMutability": "nonpayable", "virtual": false, "visibility": "public"}, {"body": {"id": 179, "nodeType": "Block", "src": "209:21:1", "statements": [{"expression": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 177, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 175, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 154, "src": "222:1:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"id": 176, "name": "y", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 156, "src": "224:1:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "222:3:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "functionReturnParameters": 174, "id": 178, "nodeType": "Return", "src": "215:10:1"}]}, "functionSelector": "853255cc", "id": 180, "implemented": true, "kind": "function", "modifiers": [], "name": "sum", "nodeType": "FunctionDefinition", "parameters": {"id": 171, "nodeType": "ParameterList", "parameters": [], "src": "176:2:1"}, "returnParameters": {"id": 174, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 173, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "scope": 180, "src": "200:7:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 172, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "200:7:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "199:9:1"}, "scope": 191, "src": "164:66:1", "stateMutability": "view", "virtual": false, "visibility": "public"}, {"body": {"id": 189, "nodeType": "Block", "src": "269:19:1", "statements": [{"expression": {"id": 187, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"id": 185, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 154, "src": "275:1:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"id": 186, "name": "xval", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 182, "src": "279:4:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "275:8:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 188, "nodeType": "ExpressionStatement", "src": "275:8:1"}]}, "functionSelector": "4018d9aa", "id": 190, "implemented": true, "kind": "function", "modifiers": [], "name": "setX", "nodeType": "FunctionDefinition", "parameters": {"id": 183, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 182, "mutability": "mutable", "name": "xval", "nodeType": "VariableDeclaration", "scope": 190, "src": "248:12:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 181, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "248:7:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "247:14:1"}, "returnParameters": {"id": 184, "nodeType": "ParameterList", "parameters": [], "src": "269:0:1"}, "scope": 191, "src": "234:54:1", "stateMutability": "nonpayable", "virtual": false, "visibility": "public"}], "scope": 230, "src": "62:228:1"}, {"abstract": false, "baseContracts": [], "contractDependencies": [191], "contractKind": "contract", "fullyImplemented": true, "id": 229, "linearizedBaseContracts": [229], "name": "D", "nodeType": "ContractDefinition", "nodes": [{"constant": false, "id": 193, "mutability": "mutable", "name": "x", "nodeType": "VariableDeclaration", "scope": 229, "src": "307:9:1", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 192, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "307:7:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}, {"constant": false, "id": 195, "mutability": "mutable", "name": "y", "nodeType": "VariableDeclaration", "scope": 229, "src": "320:9:1", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 194, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "320:7:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}, {"constant": false, "id": 197, "mutability": "mutable", "name": "c", "nodeType": "VariableDeclaration", "scope": 229, "src": "333:3:1", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_contract$_C_$191", "typeString": "contract C"}, "typeName": {"id": 196, "name": "C", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 191, "src": "333:1:1", "typeDescriptions": {"typeIdentifier": "t_contract$_C_$191", "typeString": "contract C"}}, "visibility": "internal"}, {"body": {"id": 217, "nodeType": "Block", "src": "367:48:1", "statements": [{"expression": {"id": 204, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"id": 202, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 193, "src": "373:1:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"hexValue": "30", "id": 203, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "377:1:1", "typeDescriptions": {"typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0"}, "value": "0"}, "src": "373:5:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 205, "nodeType": "ExpressionStatement", "src": "373:5:1"}, {"expression": {"id": 208, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"id": 206, "name": "y", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 195, "src": "384:1:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"id": 207, "name": "yval", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 199, "src": "388:4:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "384:8:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 209, "nodeType": "ExpressionStatement", "src": "384:8:1"}, {"expression": {"id": 215, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"id": 210, "name": "c", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 197, "src": "398:1:1", "typeDescriptions": {"typeIdentifier": "t_contract$_C_$191", "typeString": "contract C"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"arguments": [{"hexValue": "35", "id": 213, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "408:1:1", "typeDescriptions": {"typeIdentifier": "t_rational_5_by_1", "typeString": "int_const 5"}, "value": "5"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_rational_5_by_1", "typeString": "int_const 5"}], "id": 212, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "NewExpression", "src": "402:5:1", "typeDescriptions": {"typeIdentifier": "t_function_creation_nonpayable$_t_uint256_$returns$_t_contract$_C_$191_$", "typeString": "function (uint256) returns (contract C)"}, "typeName": {"id": 211, "name": "C", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 191, "src": "406:1:1", "typeDescriptions": {"typeIdentifier": "t_contract$_C_$191", "typeString": "contract C"}}}, "id": 214, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "402:8:1", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_contract$_C_$191", "typeString": "contract C"}}, "src": "398:12:1", "typeDescriptions": {"typeIdentifier": "t_contract$_C_$191", "typeString": "contract C"}}, "id": 216, "nodeType": "ExpressionStatement", "src": "398:12:1"}]}, "id": 218, "implemented": true, "kind": "constructor", "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "parameters": {"id": 200, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 199, "mutability": "mutable", "name": "yval", "nodeType": "VariableDeclaration", "scope": 218, "src": "353:12:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 198, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "353:7:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "352:14:1"}, "returnParameters": {"id": 201, "nodeType": "ParameterList", "parameters": [], "src": "367:0:1"}, "scope": 229, "src": "341:74:1", "stateMutability": "nonpayable", "virtual": false, "visibility": "public"}, {"body": {"id": 227, "nodeType": "Block", "src": "465:21:1", "statements": [{"expression": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 225, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 223, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 193, "src": "478:1:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "-", "rightExpression": {"id": 224, "name": "y", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 195, "src": "480:1:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "478:3:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "functionReturnParameters": 222, "id": 226, "nodeType": "Return", "src": "471:10:1"}]}, "functionSelector": "a0d7afb7", "id": 228, "implemented": true, "kind": "function", "modifiers": [], "name": "diff", "nodeType": "FunctionDefinition", "parameters": {"id": 219, "nodeType": "ParameterList", "parameters": [], "src": "432:2:1"}, "returnParameters": {"id": 222, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 221, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "scope": 228, "src": "456:7:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 220, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "456:7:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "455:9:1"}, "scope": 229, "src": "419:67:1", "stateMutability": "view", "virtual": false, "visibility": "public"}], "scope": 230, "src": "292:196:1"}], "src": "37:452:1"}, "userdoc": {"methods": {}, "notice": null}, "devdoc": {"methods": {}, "author": null, "details": null, "title": null}} \ No newline at end of file diff --git a/tests/expected/hardhat-multi-file/D.json b/tests/expected/hardhat-multi-file/D.json new file mode 100644 index 00000000..c91bfa9d --- /dev/null +++ b/tests/expected/hardhat-multi-file/D.json @@ -0,0 +1 @@ +{"contractName": "D", "abi": [{"inputs": [{"internalType": "uint256", "name": "yval", "type": "uint256"}], "stateMutability": "nonpayable", "type": "constructor"}, {"inputs": [], "name": "diff", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "stateMutability": "view", "type": "function"}], "bytecode": "0x608060405234801561001057600080fd5b506040516102a23803806102a28339818101604052602081101561003357600080fd5b810190808051906020019092919050505060008081905550806001819055506005604051610060906100cd565b80828152602001915050604051809103906000f080158015610086573d6000803e3d6000fd5b50600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506100da565b61012d8061017583390190565b608d806100e86000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c8063a0d7afb714602d575b600080fd5b60336049565b6040518082815260200191505060405180910390f35b60006001546000540390509056fe608060405234801561001057600080fd5b5060405161012d38038061012d8339818101604052602081101561003357600080fd5b810190808051906020019092919050505060008081905550806001819055505060cc806100616000396000f3fe6080604052348015600f57600080fd5b506004361060325760003560e01c80634018d9aa146037578063853255cc146062575b600080fd5b606060048036036020811015604b57600080fd5b8101908080359060200190929190505050607e565b005b60686088565b6040518082815260200191505060405180910390f35b8060008190555050565b60006001546000540190509056fea2646970667358221220fa023934f603bf6bcaae6a6ab06db920cce4aca360c67548633e7f3514118cc964736f6c63430007030033", "deployedBytecode": "0x6080604052348015600f57600080fd5b506004361060285760003560e01c8063a0d7afb714602d575b600080fd5b60336049565b6040518082815260200191505060405180910390f35b60006001546000540390509056fe", "ast": {"absolutePath": "contracts/C.sol", "exportedSymbols": {"C": [191], "D": [229]}, "id": 230, "license": "Unlicense", "nodeType": "SourceUnit", "nodes": [{"id": 152, "literals": ["solidity", "^", "0.7", ".0"], "nodeType": "PragmaDirective", "src": "37:23:1"}, {"abstract": false, "baseContracts": [], "contractDependencies": [], "contractKind": "contract", "fullyImplemented": true, "id": 191, "linearizedBaseContracts": [191], "name": "C", "nodeType": "ContractDefinition", "nodes": [{"constant": false, "id": 154, "mutability": "mutable", "name": "x", "nodeType": "VariableDeclaration", "scope": 191, "src": "77:9:1", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 153, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "77:7:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}, {"constant": false, "id": 156, "mutability": "mutable", "name": "y", "nodeType": "VariableDeclaration", "scope": 191, "src": "90:9:1", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 155, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "90:7:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}, {"body": {"id": 169, "nodeType": "Block", "src": "130:30:1", "statements": [{"expression": {"id": 163, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"id": 161, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 154, "src": "136:1:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"hexValue": "30", "id": 162, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "140:1:1", "typeDescriptions": {"typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0"}, "value": "0"}, "src": "136:5:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 164, "nodeType": "ExpressionStatement", "src": "136:5:1"}, {"expression": {"id": 167, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"id": 165, "name": "y", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 156, "src": "147:1:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"id": 166, "name": "yval", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 158, "src": "151:4:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "147:8:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 168, "nodeType": "ExpressionStatement", "src": "147:8:1"}]}, "id": 170, "implemented": true, "kind": "constructor", "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "parameters": {"id": 159, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 158, "mutability": "mutable", "name": "yval", "nodeType": "VariableDeclaration", "scope": 170, "src": "116:12:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 157, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "116:7:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "115:14:1"}, "returnParameters": {"id": 160, "nodeType": "ParameterList", "parameters": [], "src": "130:0:1"}, "scope": 191, "src": "104:56:1", "stateMutability": "nonpayable", "virtual": false, "visibility": "public"}, {"body": {"id": 179, "nodeType": "Block", "src": "209:21:1", "statements": [{"expression": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 177, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 175, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 154, "src": "222:1:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"id": 176, "name": "y", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 156, "src": "224:1:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "222:3:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "functionReturnParameters": 174, "id": 178, "nodeType": "Return", "src": "215:10:1"}]}, "functionSelector": "853255cc", "id": 180, "implemented": true, "kind": "function", "modifiers": [], "name": "sum", "nodeType": "FunctionDefinition", "parameters": {"id": 171, "nodeType": "ParameterList", "parameters": [], "src": "176:2:1"}, "returnParameters": {"id": 174, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 173, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "scope": 180, "src": "200:7:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 172, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "200:7:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "199:9:1"}, "scope": 191, "src": "164:66:1", "stateMutability": "view", "virtual": false, "visibility": "public"}, {"body": {"id": 189, "nodeType": "Block", "src": "269:19:1", "statements": [{"expression": {"id": 187, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"id": 185, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 154, "src": "275:1:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"id": 186, "name": "xval", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 182, "src": "279:4:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "275:8:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 188, "nodeType": "ExpressionStatement", "src": "275:8:1"}]}, "functionSelector": "4018d9aa", "id": 190, "implemented": true, "kind": "function", "modifiers": [], "name": "setX", "nodeType": "FunctionDefinition", "parameters": {"id": 183, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 182, "mutability": "mutable", "name": "xval", "nodeType": "VariableDeclaration", "scope": 190, "src": "248:12:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 181, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "248:7:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "247:14:1"}, "returnParameters": {"id": 184, "nodeType": "ParameterList", "parameters": [], "src": "269:0:1"}, "scope": 191, "src": "234:54:1", "stateMutability": "nonpayable", "virtual": false, "visibility": "public"}], "scope": 230, "src": "62:228:1"}, {"abstract": false, "baseContracts": [], "contractDependencies": [191], "contractKind": "contract", "fullyImplemented": true, "id": 229, "linearizedBaseContracts": [229], "name": "D", "nodeType": "ContractDefinition", "nodes": [{"constant": false, "id": 193, "mutability": "mutable", "name": "x", "nodeType": "VariableDeclaration", "scope": 229, "src": "307:9:1", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 192, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "307:7:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}, {"constant": false, "id": 195, "mutability": "mutable", "name": "y", "nodeType": "VariableDeclaration", "scope": 229, "src": "320:9:1", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 194, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "320:7:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}, {"constant": false, "id": 197, "mutability": "mutable", "name": "c", "nodeType": "VariableDeclaration", "scope": 229, "src": "333:3:1", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_contract$_C_$191", "typeString": "contract C"}, "typeName": {"id": 196, "name": "C", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 191, "src": "333:1:1", "typeDescriptions": {"typeIdentifier": "t_contract$_C_$191", "typeString": "contract C"}}, "visibility": "internal"}, {"body": {"id": 217, "nodeType": "Block", "src": "367:48:1", "statements": [{"expression": {"id": 204, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"id": 202, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 193, "src": "373:1:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"hexValue": "30", "id": 203, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "377:1:1", "typeDescriptions": {"typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0"}, "value": "0"}, "src": "373:5:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 205, "nodeType": "ExpressionStatement", "src": "373:5:1"}, {"expression": {"id": 208, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"id": 206, "name": "y", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 195, "src": "384:1:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"id": 207, "name": "yval", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 199, "src": "388:4:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "384:8:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 209, "nodeType": "ExpressionStatement", "src": "384:8:1"}, {"expression": {"id": 215, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"id": 210, "name": "c", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 197, "src": "398:1:1", "typeDescriptions": {"typeIdentifier": "t_contract$_C_$191", "typeString": "contract C"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"arguments": [{"hexValue": "35", "id": 213, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "408:1:1", "typeDescriptions": {"typeIdentifier": "t_rational_5_by_1", "typeString": "int_const 5"}, "value": "5"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_rational_5_by_1", "typeString": "int_const 5"}], "id": 212, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "NewExpression", "src": "402:5:1", "typeDescriptions": {"typeIdentifier": "t_function_creation_nonpayable$_t_uint256_$returns$_t_contract$_C_$191_$", "typeString": "function (uint256) returns (contract C)"}, "typeName": {"id": 211, "name": "C", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 191, "src": "406:1:1", "typeDescriptions": {"typeIdentifier": "t_contract$_C_$191", "typeString": "contract C"}}}, "id": 214, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "402:8:1", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_contract$_C_$191", "typeString": "contract C"}}, "src": "398:12:1", "typeDescriptions": {"typeIdentifier": "t_contract$_C_$191", "typeString": "contract C"}}, "id": 216, "nodeType": "ExpressionStatement", "src": "398:12:1"}]}, "id": 218, "implemented": true, "kind": "constructor", "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "parameters": {"id": 200, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 199, "mutability": "mutable", "name": "yval", "nodeType": "VariableDeclaration", "scope": 218, "src": "353:12:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 198, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "353:7:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "352:14:1"}, "returnParameters": {"id": 201, "nodeType": "ParameterList", "parameters": [], "src": "367:0:1"}, "scope": 229, "src": "341:74:1", "stateMutability": "nonpayable", "virtual": false, "visibility": "public"}, {"body": {"id": 227, "nodeType": "Block", "src": "465:21:1", "statements": [{"expression": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 225, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 223, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 193, "src": "478:1:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "-", "rightExpression": {"id": 224, "name": "y", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 195, "src": "480:1:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "478:3:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "functionReturnParameters": 222, "id": 226, "nodeType": "Return", "src": "471:10:1"}]}, "functionSelector": "a0d7afb7", "id": 228, "implemented": true, "kind": "function", "modifiers": [], "name": "diff", "nodeType": "FunctionDefinition", "parameters": {"id": 219, "nodeType": "ParameterList", "parameters": [], "src": "432:2:1"}, "returnParameters": {"id": 222, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 221, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "scope": 228, "src": "456:7:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 220, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "456:7:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "455:9:1"}, "scope": 229, "src": "419:67:1", "stateMutability": "view", "virtual": false, "visibility": "public"}], "scope": 230, "src": "292:196:1"}], "src": "37:452:1"}, "userdoc": {"methods": {}, "notice": null}, "devdoc": {"methods": {}, "author": null, "details": null, "title": null}} \ No newline at end of file diff --git a/tests/expected/hardhat-multi-file/E.json b/tests/expected/hardhat-multi-file/E.json new file mode 100644 index 00000000..d6bf44ad --- /dev/null +++ b/tests/expected/hardhat-multi-file/E.json @@ -0,0 +1 @@ +{"contractName": "E", "abi": [{"inputs": [{"internalType": "uint256", "name": "yval", "type": "uint256"}], "stateMutability": "nonpayable", "type": "constructor"}, {"inputs": [{"internalType": "uint256", "name": "xval", "type": "uint256"}], "name": "setX", "outputs": [], "stateMutability": "nonpayable", "type": "function"}, {"inputs": [], "name": "sum", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "stateMutability": "view", "type": "function"}], "bytecode": "0x608060405234801561001057600080fd5b506040516105033803806105038339818101604052602081101561003357600080fd5b810190808051906020019092919050505060008081905550806001819055508060405161005f906100cc565b80828152602001915050604051809103906000f080158015610085573d6000803e3d6000fd5b50600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506100d9565b6102a28061026183390190565b610179806100e86000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80634018d9aa1461003b578063853255cc14610069575b600080fd5b6100676004803603602081101561005157600080fd5b8101908080359060200190929190505050610087565b005b610071610091565b6040518082815260200191505060405180910390f35b8060008190555050565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a0d7afb76040518163ffffffff1660e01b815260040160206040518083038186803b1580156100fb57600080fd5b505afa15801561010f573d6000803e3d6000fd5b505050506040513d602081101561012557600080fd5b8101908080519060200190929190505050600154600054010190509056fe608060405234801561001057600080fd5b506040516102a23803806102a28339818101604052602081101561003357600080fd5b810190808051906020019092919050505060008081905550806001819055506005604051610060906100cd565b80828152602001915050604051809103906000f080158015610086573d6000803e3d6000fd5b50600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506100da565b61012d8061017583390190565b608d806100e86000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c8063a0d7afb714602d575b600080fd5b60336049565b6040518082815260200191505060405180910390f35b60006001546000540390509056fea26469706673582212204e7f66950d7eac1667bf123fd0c2c0b36d53de5866b4bd867fac7411e321b0b464736f6c63430007030033608060405234801561001057600080fd5b5060405161012d38038061012d8339818101604052602081101561003357600080fd5b810190808051906020019092919050505060008081905550806001819055505060cc806100616000396000f3fe6080604052348015600f57600080fd5b506004361060325760003560e01c80634018d9aa146037578063853255cc146062575b600080fd5b606060048036036020811015604b57600080fd5b8101908080359060200190929190505050607e565b005b60686088565b6040518082815260200191505060405180910390f35b8060008190555050565b60006001546000540190509056fea2646970667358221220fa023934f603bf6bcaae6a6ab06db920cce4aca360c67548633e7f3514118cc964736f6c63430007030033", "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100365760003560e01c80634018d9aa1461003b578063853255cc14610069575b600080fd5b6100676004803603602081101561005157600080fd5b8101908080359060200190929190505050610087565b005b610071610091565b6040518082815260200191505060405180910390f35b8060008190555050565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a0d7afb76040518163ffffffff1660e01b815260040160206040518083038186803b1580156100fb57600080fd5b505afa15801561010f573d6000803e3d6000fd5b505050506040513d602081101561012557600080fd5b8101908080519060200190929190505050600154600054010190509056fe", "ast": {"absolutePath": "contracts/E/E.sol", "exportedSymbols": {"C": [191], "D": [229], "E": [285], "I": [421]}, "id": 286, "license": "Unlicense", "nodeType": "SourceUnit", "nodes": [{"id": 231, "literals": ["solidity", "^", "0.7", ".0"], "nodeType": "PragmaDirective", "src": "37:23:2"}, {"absolutePath": "contracts/C.sol", "file": "../C.sol", "id": 232, "nodeType": "ImportDirective", "scope": 286, "sourceUnit": 230, "src": "62:18:2", "symbolAliases": [], "unitAlias": ""}, {"absolutePath": "contracts/I/I.sol", "file": "../I/I.sol", "id": 233, "nodeType": "ImportDirective", "scope": 286, "sourceUnit": 422, "src": "81:20:2", "symbolAliases": [], "unitAlias": ""}, {"abstract": false, "baseContracts": [], "contractDependencies": [229], "contractKind": "contract", "fullyImplemented": true, "id": 285, "linearizedBaseContracts": [285], "name": "E", "nodeType": "ContractDefinition", "nodes": [{"constant": false, "id": 235, "mutability": "mutable", "name": "x", "nodeType": "VariableDeclaration", "scope": 285, "src": "118:9:2", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 234, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "118:7:2", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}, {"constant": false, "id": 237, "mutability": "mutable", "name": "y", "nodeType": "VariableDeclaration", "scope": 285, "src": "131:9:2", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 236, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "131:7:2", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}, {"constant": false, "id": 239, "mutability": "mutable", "name": "d", "nodeType": "VariableDeclaration", "scope": 285, "src": "144:3:2", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_contract$_D_$229", "typeString": "contract D"}, "typeName": {"id": 238, "name": "D", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 229, "src": "144:1:2", "typeDescriptions": {"typeIdentifier": "t_contract$_D_$229", "typeString": "contract D"}}, "visibility": "internal"}, {"body": {"id": 259, "nodeType": "Block", "src": "178:51:2", "statements": [{"expression": {"id": 246, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"id": 244, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 235, "src": "184:1:2", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"hexValue": "30", "id": 245, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "188:1:2", "typeDescriptions": {"typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0"}, "value": "0"}, "src": "184:5:2", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 247, "nodeType": "ExpressionStatement", "src": "184:5:2"}, {"expression": {"id": 250, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"id": 248, "name": "y", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 237, "src": "195:1:2", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"id": 249, "name": "yval", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 241, "src": "199:4:2", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "195:8:2", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 251, "nodeType": "ExpressionStatement", "src": "195:8:2"}, {"expression": {"id": 257, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"id": 252, "name": "d", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 239, "src": "209:1:2", "typeDescriptions": {"typeIdentifier": "t_contract$_D_$229", "typeString": "contract D"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"arguments": [{"id": 255, "name": "yval", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 241, "src": "219:4:2", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}], "id": 254, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "NewExpression", "src": "213:5:2", "typeDescriptions": {"typeIdentifier": "t_function_creation_nonpayable$_t_uint256_$returns$_t_contract$_D_$229_$", "typeString": "function (uint256) returns (contract D)"}, "typeName": {"id": 253, "name": "D", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 229, "src": "217:1:2", "typeDescriptions": {"typeIdentifier": "t_contract$_D_$229", "typeString": "contract D"}}}, "id": 256, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "213:11:2", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_contract$_D_$229", "typeString": "contract D"}}, "src": "209:15:2", "typeDescriptions": {"typeIdentifier": "t_contract$_D_$229", "typeString": "contract D"}}, "id": 258, "nodeType": "ExpressionStatement", "src": "209:15:2"}]}, "id": 260, "implemented": true, "kind": "constructor", "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "parameters": {"id": 242, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 241, "mutability": "mutable", "name": "yval", "nodeType": "VariableDeclaration", "scope": 260, "src": "164:12:2", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 240, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "164:7:2", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "163:14:2"}, "returnParameters": {"id": 243, "nodeType": "ParameterList", "parameters": [], "src": "178:0:2"}, "scope": 285, "src": "152:77:2", "stateMutability": "nonpayable", "virtual": false, "visibility": "public"}, {"body": {"id": 273, "nodeType": "Block", "src": "278:30:2", "statements": [{"expression": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 271, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 267, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 265, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 235, "src": "291:1:2", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"id": 266, "name": "y", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 237, "src": "293:1:2", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "291:3:2", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"arguments": [], "expression": {"argumentTypes": [], "expression": {"id": 268, "name": "d", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 239, "src": "295:1:2", "typeDescriptions": {"typeIdentifier": "t_contract$_D_$229", "typeString": "contract D"}}, "id": 269, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "diff", "nodeType": "MemberAccess", "referencedDeclaration": 228, "src": "295:6:2", "typeDescriptions": {"typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", "typeString": "function () view external returns (uint256)"}}, "id": 270, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "295:8:2", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "291:12:2", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "functionReturnParameters": 264, "id": 272, "nodeType": "Return", "src": "284:19:2"}]}, "functionSelector": "853255cc", "id": 274, "implemented": true, "kind": "function", "modifiers": [], "name": "sum", "nodeType": "FunctionDefinition", "parameters": {"id": 261, "nodeType": "ParameterList", "parameters": [], "src": "245:2:2"}, "returnParameters": {"id": 264, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 263, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "scope": 274, "src": "269:7:2", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 262, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "269:7:2", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "268:9:2"}, "scope": 285, "src": "233:75:2", "stateMutability": "view", "virtual": false, "visibility": "public"}, {"body": {"id": 283, "nodeType": "Block", "src": "347:19:2", "statements": [{"expression": {"id": 281, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"id": 279, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 235, "src": "353:1:2", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"id": 280, "name": "xval", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 276, "src": "357:4:2", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "353:8:2", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 282, "nodeType": "ExpressionStatement", "src": "353:8:2"}]}, "functionSelector": "4018d9aa", "id": 284, "implemented": true, "kind": "function", "modifiers": [], "name": "setX", "nodeType": "FunctionDefinition", "parameters": {"id": 277, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 276, "mutability": "mutable", "name": "xval", "nodeType": "VariableDeclaration", "scope": 284, "src": "326:12:2", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 275, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "326:7:2", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "325:14:2"}, "returnParameters": {"id": 278, "nodeType": "ParameterList", "parameters": [], "src": "347:0:2"}, "scope": 285, "src": "312:54:2", "stateMutability": "nonpayable", "virtual": false, "visibility": "public"}], "scope": 286, "src": "103:265:2"}], "src": "37:332:2"}, "userdoc": {"methods": {}, "notice": null}, "devdoc": {"methods": {}, "author": null, "details": null, "title": null}} \ No newline at end of file diff --git a/tests/expected/hardhat-multi-file/G.json b/tests/expected/hardhat-multi-file/G.json new file mode 100644 index 00000000..1878843c --- /dev/null +++ b/tests/expected/hardhat-multi-file/G.json @@ -0,0 +1 @@ +{"contractName": "G", "abi": [{"inputs": [{"internalType": "uint256", "name": "yval", "type": "uint256"}], "stateMutability": "nonpayable", "type": "constructor"}, {"inputs": [{"internalType": "uint256", "name": "xval", "type": "uint256"}], "name": "setX", "outputs": [], "stateMutability": "nonpayable", "type": "function"}, {"inputs": [], "name": "sum", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "stateMutability": "view", "type": "function"}], "bytecode": "0x608060405234801561001057600080fd5b506040516107ed3803806107ed8339818101604052602081101561003357600080fd5b810190808051906020019092919050505060008081905550806001819055506005604051610060906100cd565b80828152602001915050604051809103906000f080158015610086573d6000803e3d6000fd5b50600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506100da565b610503806102ea83390190565b610201806100e96000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80634018d9aa1461003b578063853255cc14610069575b600080fd5b6100676004803603602081101561005157600080fd5b8101908080359060200190929190505050610087565b005b610071610121565b6040518082815260200191505060405180910390f35b80600081905550600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16634018d9aa600183016040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561010657600080fd5b505af115801561011a573d6000803e3d6000fd5b5050505050565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663853255cc6040518163ffffffff1660e01b815260040160206040518083038186803b15801561018b57600080fd5b505afa15801561019f573d6000803e3d6000fd5b505050506040513d60208110156101b557600080fd5b810190808051906020019092919050505090509056fe608060405234801561001057600080fd5b506040516105033803806105038339818101604052602081101561003357600080fd5b810190808051906020019092919050505060008081905550806001819055508060405161005f906100cc565b80828152602001915050604051809103906000f080158015610085573d6000803e3d6000fd5b50600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506100d9565b6102a28061026183390190565b610179806100e86000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80634018d9aa1461003b578063853255cc14610069575b600080fd5b6100676004803603602081101561005157600080fd5b8101908080359060200190929190505050610087565b005b610071610091565b6040518082815260200191505060405180910390f35b8060008190555050565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a0d7afb76040518163ffffffff1660e01b815260040160206040518083038186803b1580156100fb57600080fd5b505afa15801561010f573d6000803e3d6000fd5b505050506040513d602081101561012557600080fd5b8101908080519060200190929190505050600154600054010190509056fea2646970667358221220ec8b5ae5c6f71260e1077af8088b564be4ae241ac16c43e3cac821682be2d7c964736f6c63430007030033608060405234801561001057600080fd5b506040516102a23803806102a28339818101604052602081101561003357600080fd5b810190808051906020019092919050505060008081905550806001819055506005604051610060906100cd565b80828152602001915050604051809103906000f080158015610086573d6000803e3d6000fd5b50600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506100da565b61012d8061017583390190565b608d806100e86000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c8063a0d7afb714602d575b600080fd5b60336049565b6040518082815260200191505060405180910390f35b60006001546000540390509056fea26469706673582212204e7f66950d7eac1667bf123fd0c2c0b36d53de5866b4bd867fac7411e321b0b464736f6c63430007030033608060405234801561001057600080fd5b5060405161012d38038061012d8339818101604052602081101561003357600080fd5b810190808051906020019092919050505060008081905550806001819055505060cc806100616000396000f3fe6080604052348015600f57600080fd5b506004361060325760003560e01c80634018d9aa146037578063853255cc146062575b600080fd5b606060048036036020811015604b57600080fd5b8101908080359060200190929190505050607e565b005b60686088565b6040518082815260200191505060405180910390f35b8060008190555050565b60006001546000540190509056fea2646970667358221220fa023934f603bf6bcaae6a6ab06db920cce4aca360c67548633e7f3514118cc964736f6c63430007030033", "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100365760003560e01c80634018d9aa1461003b578063853255cc14610069575b600080fd5b6100676004803603602081101561005157600080fd5b8101908080359060200190929190505050610087565b005b610071610121565b6040518082815260200191505060405180910390f35b80600081905550600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16634018d9aa600183016040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561010657600080fd5b505af115801561011a573d6000803e3d6000fd5b5050505050565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663853255cc6040518163ffffffff1660e01b815260040160206040518083038186803b15801561018b57600080fd5b505afa15801561019f573d6000803e3d6000fd5b505050506040513d60208110156101b557600080fd5b810190808051906020019092919050505090509056fe", "ast": {"absolutePath": "contracts/E/G.sol", "exportedSymbols": {"C": [191], "D": [229], "E": [285], "G": [344], "I": [421]}, "id": 345, "license": "Unlicense", "nodeType": "SourceUnit", "nodes": [{"id": 287, "literals": ["solidity", "^", "0.7", ".0"], "nodeType": "PragmaDirective", "src": "37:23:3"}, {"absolutePath": "contracts/E/E.sol", "file": "./E.sol", "id": 288, "nodeType": "ImportDirective", "scope": 345, "sourceUnit": 286, "src": "62:17:3", "symbolAliases": [], "unitAlias": ""}, {"abstract": false, "baseContracts": [], "contractDependencies": [285], "contractKind": "contract", "fullyImplemented": true, "id": 344, "linearizedBaseContracts": [344], "name": "G", "nodeType": "ContractDefinition", "nodes": [{"constant": false, "id": 290, "mutability": "mutable", "name": "x", "nodeType": "VariableDeclaration", "scope": 344, "src": "96:9:3", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 289, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "96:7:3", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}, {"constant": false, "id": 292, "mutability": "mutable", "name": "y", "nodeType": "VariableDeclaration", "scope": 344, "src": "109:9:3", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 291, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "109:7:3", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}, {"constant": false, "id": 294, "mutability": "mutable", "name": "e", "nodeType": "VariableDeclaration", "scope": 344, "src": "122:3:3", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_contract$_E_$285", "typeString": "contract E"}, "typeName": {"id": 293, "name": "E", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 285, "src": "122:1:3", "typeDescriptions": {"typeIdentifier": "t_contract$_E_$285", "typeString": "contract E"}}, "visibility": "internal"}, {"body": {"id": 314, "nodeType": "Block", "src": "156:48:3", "statements": [{"expression": {"id": 301, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"id": 299, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 290, "src": "162:1:3", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"hexValue": "30", "id": 300, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "166:1:3", "typeDescriptions": {"typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0"}, "value": "0"}, "src": "162:5:3", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 302, "nodeType": "ExpressionStatement", "src": "162:5:3"}, {"expression": {"id": 305, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"id": 303, "name": "y", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 292, "src": "173:1:3", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"id": 304, "name": "yval", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 296, "src": "177:4:3", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "173:8:3", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 306, "nodeType": "ExpressionStatement", "src": "173:8:3"}, {"expression": {"id": 312, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"id": 307, "name": "e", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 294, "src": "187:1:3", "typeDescriptions": {"typeIdentifier": "t_contract$_E_$285", "typeString": "contract E"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"arguments": [{"hexValue": "35", "id": 310, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "197:1:3", "typeDescriptions": {"typeIdentifier": "t_rational_5_by_1", "typeString": "int_const 5"}, "value": "5"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_rational_5_by_1", "typeString": "int_const 5"}], "id": 309, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "NewExpression", "src": "191:5:3", "typeDescriptions": {"typeIdentifier": "t_function_creation_nonpayable$_t_uint256_$returns$_t_contract$_E_$285_$", "typeString": "function (uint256) returns (contract E)"}, "typeName": {"id": 308, "name": "E", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 285, "src": "195:1:3", "typeDescriptions": {"typeIdentifier": "t_contract$_E_$285", "typeString": "contract E"}}}, "id": 311, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "191:8:3", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_contract$_E_$285", "typeString": "contract E"}}, "src": "187:12:3", "typeDescriptions": {"typeIdentifier": "t_contract$_E_$285", "typeString": "contract E"}}, "id": 313, "nodeType": "ExpressionStatement", "src": "187:12:3"}]}, "id": 315, "implemented": true, "kind": "constructor", "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "parameters": {"id": 297, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 296, "mutability": "mutable", "name": "yval", "nodeType": "VariableDeclaration", "scope": 315, "src": "142:12:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 295, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "142:7:3", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "141:14:3"}, "returnParameters": {"id": 298, "nodeType": "ParameterList", "parameters": [], "src": "156:0:3"}, "scope": 344, "src": "130:74:3", "stateMutability": "nonpayable", "virtual": false, "visibility": "public"}, {"body": {"id": 324, "nodeType": "Block", "src": "253:25:3", "statements": [{"expression": {"arguments": [], "expression": {"argumentTypes": [], "expression": {"id": 320, "name": "e", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 294, "src": "266:1:3", "typeDescriptions": {"typeIdentifier": "t_contract$_E_$285", "typeString": "contract E"}}, "id": 321, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sum", "nodeType": "MemberAccess", "referencedDeclaration": 274, "src": "266:5:3", "typeDescriptions": {"typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", "typeString": "function () view external returns (uint256)"}}, "id": 322, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "266:7:3", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "functionReturnParameters": 319, "id": 323, "nodeType": "Return", "src": "259:14:3"}]}, "functionSelector": "853255cc", "id": 325, "implemented": true, "kind": "function", "modifiers": [], "name": "sum", "nodeType": "FunctionDefinition", "parameters": {"id": 316, "nodeType": "ParameterList", "parameters": [], "src": "220:2:3"}, "returnParameters": {"id": 319, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 318, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "scope": 325, "src": "244:7:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 317, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "244:7:3", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "243:9:3"}, "scope": 344, "src": "208:70:3", "stateMutability": "view", "virtual": false, "visibility": "public"}, {"body": {"id": 342, "nodeType": "Block", "src": "317:39:3", "statements": [{"expression": {"id": 332, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"id": 330, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 290, "src": "323:1:3", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"id": 331, "name": "xval", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 327, "src": "327:4:3", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "323:8:3", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 333, "nodeType": "ExpressionStatement", "src": "323:8:3"}, {"expression": {"arguments": [{"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 339, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 337, "name": "xval", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 327, "src": "344:4:3", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"hexValue": "31", "id": 338, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "349:1:3", "typeDescriptions": {"typeIdentifier": "t_rational_1_by_1", "typeString": "int_const 1"}, "value": "1"}, "src": "344:6:3", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}], "expression": {"id": 334, "name": "e", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 294, "src": "337:1:3", "typeDescriptions": {"typeIdentifier": "t_contract$_E_$285", "typeString": "contract E"}}, "id": 336, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "setX", "nodeType": "MemberAccess", "referencedDeclaration": 284, "src": "337:6:3", "typeDescriptions": {"typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$", "typeString": "function (uint256) external"}}, "id": 340, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "337:14:3", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 341, "nodeType": "ExpressionStatement", "src": "337:14:3"}]}, "functionSelector": "4018d9aa", "id": 343, "implemented": true, "kind": "function", "modifiers": [], "name": "setX", "nodeType": "FunctionDefinition", "parameters": {"id": 328, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 327, "mutability": "mutable", "name": "xval", "nodeType": "VariableDeclaration", "scope": 343, "src": "296:12:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 326, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "296:7:3", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "295:14:3"}, "returnParameters": {"id": 329, "nodeType": "ParameterList", "parameters": [], "src": "317:0:3"}, "scope": 344, "src": "282:74:3", "stateMutability": "nonpayable", "virtual": false, "visibility": "public"}], "scope": 345, "src": "81:277:3"}], "src": "37:322:3"}, "userdoc": {"methods": {}, "notice": null}, "devdoc": {"methods": {}, "author": null, "details": null, "title": null}} \ No newline at end of file diff --git a/tests/expected/hardhat-multi-file/I.json b/tests/expected/hardhat-multi-file/I.json new file mode 100644 index 00000000..246256d3 --- /dev/null +++ b/tests/expected/hardhat-multi-file/I.json @@ -0,0 +1 @@ +{"contractName": "I", "abi": [{"inputs": [{"internalType": "uint256", "name": "yval", "type": "uint256"}], "stateMutability": "nonpayable", "type": "constructor"}, {"inputs": [{"internalType": "uint256", "name": "xval", "type": "uint256"}], "name": "setX", "outputs": [], "stateMutability": "nonpayable", "type": "function"}, {"inputs": [], "name": "sum", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "stateMutability": "view", "type": "function"}], "bytecode": "0x608060405234801561001057600080fd5b50604051610bbd380380610bbd8339818101604052602081101561003357600080fd5b810190808051906020019092919050505060008081905550806001819055508060405161005f90610143565b80828152602001915050604051809103906000f080158015610085573d6000803e3d6000fd5b50600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600181016040516100d690610150565b80828152602001915050604051809103906000f0801580156100fc573d6000803e3d6000fd5b50600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505061015d565b6102a28061041883390190565b610503806106ba83390190565b6102ac8061016c6000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80634018d9aa1461003b578063853255cc14610069575b600080fd5b6100676004803603602081101561005157600080fd5b8101908080359060200190929190505050610087565b005b610071610120565b6040518082815260200191505060405180910390f35b80600081905550600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16634018d9aa6001546040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561010557600080fd5b505af1158015610119573d6000803e3d6000fd5b5050505050565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663853255cc6040518163ffffffff1660e01b815260040160206040518083038186803b15801561018a57600080fd5b505afa15801561019e573d6000803e3d6000fd5b505050506040513d60208110156101b457600080fd5b8101908080519060200190929190505050600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a0d7afb76040518163ffffffff1660e01b815260040160206040518083038186803b15801561022d57600080fd5b505afa158015610241573d6000803e3d6000fd5b505050506040513d602081101561025757600080fd5b810190808051906020019092919050505060015460005401010190509056fe608060405234801561001057600080fd5b506040516102a23803806102a28339818101604052602081101561003357600080fd5b810190808051906020019092919050505060008081905550806001819055506005604051610060906100cd565b80828152602001915050604051809103906000f080158015610086573d6000803e3d6000fd5b50600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506100da565b61012d8061017583390190565b608d806100e86000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c8063a0d7afb714602d575b600080fd5b60336049565b6040518082815260200191505060405180910390f35b60006001546000540390509056fea26469706673582212204e7f66950d7eac1667bf123fd0c2c0b36d53de5866b4bd867fac7411e321b0b464736f6c63430007030033608060405234801561001057600080fd5b5060405161012d38038061012d8339818101604052602081101561003357600080fd5b810190808051906020019092919050505060008081905550806001819055505060cc806100616000396000f3fe6080604052348015600f57600080fd5b506004361060325760003560e01c80634018d9aa146037578063853255cc146062575b600080fd5b606060048036036020811015604b57600080fd5b8101908080359060200190929190505050607e565b005b60686088565b6040518082815260200191505060405180910390f35b8060008190555050565b60006001546000540190509056fea2646970667358221220fa023934f603bf6bcaae6a6ab06db920cce4aca360c67548633e7f3514118cc964736f6c63430007030033608060405234801561001057600080fd5b506040516105033803806105038339818101604052602081101561003357600080fd5b810190808051906020019092919050505060008081905550806001819055508060405161005f906100cc565b80828152602001915050604051809103906000f080158015610085573d6000803e3d6000fd5b50600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506100d9565b6102a28061026183390190565b610179806100e86000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80634018d9aa1461003b578063853255cc14610069575b600080fd5b6100676004803603602081101561005157600080fd5b8101908080359060200190929190505050610087565b005b610071610091565b6040518082815260200191505060405180910390f35b8060008190555050565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a0d7afb76040518163ffffffff1660e01b815260040160206040518083038186803b1580156100fb57600080fd5b505afa15801561010f573d6000803e3d6000fd5b505050506040513d602081101561012557600080fd5b8101908080519060200190929190505050600154600054010190509056fea2646970667358221220ec8b5ae5c6f71260e1077af8088b564be4ae241ac16c43e3cac821682be2d7c964736f6c63430007030033608060405234801561001057600080fd5b506040516102a23803806102a28339818101604052602081101561003357600080fd5b810190808051906020019092919050505060008081905550806001819055506005604051610060906100cd565b80828152602001915050604051809103906000f080158015610086573d6000803e3d6000fd5b50600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506100da565b61012d8061017583390190565b608d806100e86000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c8063a0d7afb714602d575b600080fd5b60336049565b6040518082815260200191505060405180910390f35b60006001546000540390509056fea26469706673582212204e7f66950d7eac1667bf123fd0c2c0b36d53de5866b4bd867fac7411e321b0b464736f6c63430007030033608060405234801561001057600080fd5b5060405161012d38038061012d8339818101604052602081101561003357600080fd5b810190808051906020019092919050505060008081905550806001819055505060cc806100616000396000f3fe6080604052348015600f57600080fd5b506004361060325760003560e01c80634018d9aa146037578063853255cc146062575b600080fd5b606060048036036020811015604b57600080fd5b8101908080359060200190929190505050607e565b005b60686088565b6040518082815260200191505060405180910390f35b8060008190555050565b60006001546000540190509056fea2646970667358221220fa023934f603bf6bcaae6a6ab06db920cce4aca360c67548633e7f3514118cc964736f6c63430007030033", "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100365760003560e01c80634018d9aa1461003b578063853255cc14610069575b600080fd5b6100676004803603602081101561005157600080fd5b8101908080359060200190929190505050610087565b005b610071610120565b6040518082815260200191505060405180910390f35b80600081905550600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16634018d9aa6001546040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561010557600080fd5b505af1158015610119573d6000803e3d6000fd5b5050505050565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663853255cc6040518163ffffffff1660e01b815260040160206040518083038186803b15801561018a57600080fd5b505afa15801561019e573d6000803e3d6000fd5b505050506040513d60208110156101b457600080fd5b8101908080519060200190929190505050600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a0d7afb76040518163ffffffff1660e01b815260040160206040518083038186803b15801561022d57600080fd5b505afa158015610241573d6000803e3d6000fd5b505050506040513d602081101561025757600080fd5b810190808051906020019092919050505060015460005401010190509056fe", "ast": {"absolutePath": "contracts/I/I.sol", "exportedSymbols": {"C": [191], "D": [229], "E": [285], "I": [421]}, "id": 422, "license": "Unlicense", "nodeType": "SourceUnit", "nodes": [{"id": 346, "literals": ["solidity", "^", "0.7", ".0"], "nodeType": "PragmaDirective", "src": "37:23:4"}, {"absolutePath": "contracts/C.sol", "file": "../C.sol", "id": 347, "nodeType": "ImportDirective", "scope": 422, "sourceUnit": 230, "src": "62:18:4", "symbolAliases": [], "unitAlias": ""}, {"absolutePath": "contracts/E/E.sol", "file": "../E/E.sol", "id": 348, "nodeType": "ImportDirective", "scope": 422, "sourceUnit": 286, "src": "81:20:4", "symbolAliases": [], "unitAlias": ""}, {"abstract": false, "baseContracts": [], "contractDependencies": [229, 285], "contractKind": "contract", "fullyImplemented": true, "id": 421, "linearizedBaseContracts": [421], "name": "I", "nodeType": "ContractDefinition", "nodes": [{"constant": false, "id": 350, "mutability": "mutable", "name": "x", "nodeType": "VariableDeclaration", "scope": 421, "src": "118:9:4", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 349, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "118:7:4", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}, {"constant": false, "id": 352, "mutability": "mutable", "name": "y", "nodeType": "VariableDeclaration", "scope": 421, "src": "131:9:4", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 351, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "131:7:4", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}, {"constant": false, "id": 354, "mutability": "mutable", "name": "d", "nodeType": "VariableDeclaration", "scope": 421, "src": "144:3:4", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_contract$_D_$229", "typeString": "contract D"}, "typeName": {"id": 353, "name": "D", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 229, "src": "144:1:4", "typeDescriptions": {"typeIdentifier": "t_contract$_D_$229", "typeString": "contract D"}}, "visibility": "internal"}, {"constant": false, "id": 356, "mutability": "mutable", "name": "e", "nodeType": "VariableDeclaration", "scope": 421, "src": "151:3:4", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_contract$_E_$285", "typeString": "contract E"}, "typeName": {"id": 355, "name": "E", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 285, "src": "151:1:4", "typeDescriptions": {"typeIdentifier": "t_contract$_E_$285", "typeString": "contract E"}}, "visibility": "internal"}, {"body": {"id": 385, "nodeType": "Block", "src": "185:74:4", "statements": [{"expression": {"id": 363, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"id": 361, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 350, "src": "191:1:4", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"hexValue": "30", "id": 362, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "195:1:4", "typeDescriptions": {"typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0"}, "value": "0"}, "src": "191:5:4", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 364, "nodeType": "ExpressionStatement", "src": "191:5:4"}, {"expression": {"id": 367, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"id": 365, "name": "y", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 352, "src": "202:1:4", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"id": 366, "name": "yval", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 358, "src": "206:4:4", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "202:8:4", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 368, "nodeType": "ExpressionStatement", "src": "202:8:4"}, {"expression": {"id": 374, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"id": 369, "name": "d", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 354, "src": "216:1:4", "typeDescriptions": {"typeIdentifier": "t_contract$_D_$229", "typeString": "contract D"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"arguments": [{"id": 372, "name": "yval", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 358, "src": "226:4:4", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}], "id": 371, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "NewExpression", "src": "220:5:4", "typeDescriptions": {"typeIdentifier": "t_function_creation_nonpayable$_t_uint256_$returns$_t_contract$_D_$229_$", "typeString": "function (uint256) returns (contract D)"}, "typeName": {"id": 370, "name": "D", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 229, "src": "224:1:4", "typeDescriptions": {"typeIdentifier": "t_contract$_D_$229", "typeString": "contract D"}}}, "id": 373, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "220:11:4", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_contract$_D_$229", "typeString": "contract D"}}, "src": "216:15:4", "typeDescriptions": {"typeIdentifier": "t_contract$_D_$229", "typeString": "contract D"}}, "id": 375, "nodeType": "ExpressionStatement", "src": "216:15:4"}, {"expression": {"id": 383, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"id": 376, "name": "e", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 356, "src": "237:1:4", "typeDescriptions": {"typeIdentifier": "t_contract$_E_$285", "typeString": "contract E"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"arguments": [{"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 381, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 379, "name": "yval", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 358, "src": "247:4:4", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"hexValue": "31", "id": 380, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "252:1:4", "typeDescriptions": {"typeIdentifier": "t_rational_1_by_1", "typeString": "int_const 1"}, "value": "1"}, "src": "247:6:4", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}], "id": 378, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "NewExpression", "src": "241:5:4", "typeDescriptions": {"typeIdentifier": "t_function_creation_nonpayable$_t_uint256_$returns$_t_contract$_E_$285_$", "typeString": "function (uint256) returns (contract E)"}, "typeName": {"id": 377, "name": "E", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 285, "src": "245:1:4", "typeDescriptions": {"typeIdentifier": "t_contract$_E_$285", "typeString": "contract E"}}}, "id": 382, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "241:13:4", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_contract$_E_$285", "typeString": "contract E"}}, "src": "237:17:4", "typeDescriptions": {"typeIdentifier": "t_contract$_E_$285", "typeString": "contract E"}}, "id": 384, "nodeType": "ExpressionStatement", "src": "237:17:4"}]}, "id": 386, "implemented": true, "kind": "constructor", "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "parameters": {"id": 359, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 358, "mutability": "mutable", "name": "yval", "nodeType": "VariableDeclaration", "scope": 386, "src": "171:12:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 357, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "171:7:4", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "170:14:4"}, "returnParameters": {"id": 360, "nodeType": "ParameterList", "parameters": [], "src": "185:0:4"}, "scope": 421, "src": "159:100:4", "stateMutability": "nonpayable", "virtual": false, "visibility": "public"}, {"body": {"id": 403, "nodeType": "Block", "src": "308:38:4", "statements": [{"expression": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 401, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 397, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 393, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 391, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 350, "src": "321:1:4", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"id": 392, "name": "y", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 352, "src": "323:1:4", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "321:3:4", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"arguments": [], "expression": {"argumentTypes": [], "expression": {"id": 394, "name": "d", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 354, "src": "325:1:4", "typeDescriptions": {"typeIdentifier": "t_contract$_D_$229", "typeString": "contract D"}}, "id": 395, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "diff", "nodeType": "MemberAccess", "referencedDeclaration": 228, "src": "325:6:4", "typeDescriptions": {"typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", "typeString": "function () view external returns (uint256)"}}, "id": 396, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "325:8:4", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "321:12:4", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"arguments": [], "expression": {"argumentTypes": [], "expression": {"id": 398, "name": "e", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 356, "src": "334:1:4", "typeDescriptions": {"typeIdentifier": "t_contract$_E_$285", "typeString": "contract E"}}, "id": 399, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sum", "nodeType": "MemberAccess", "referencedDeclaration": 274, "src": "334:5:4", "typeDescriptions": {"typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", "typeString": "function () view external returns (uint256)"}}, "id": 400, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "334:7:4", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "321:20:4", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "functionReturnParameters": 390, "id": 402, "nodeType": "Return", "src": "314:27:4"}]}, "functionSelector": "853255cc", "id": 404, "implemented": true, "kind": "function", "modifiers": [], "name": "sum", "nodeType": "FunctionDefinition", "parameters": {"id": 387, "nodeType": "ParameterList", "parameters": [], "src": "275:2:4"}, "returnParameters": {"id": 390, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 389, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "scope": 404, "src": "299:7:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 388, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "299:7:4", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "298:9:4"}, "scope": 421, "src": "263:83:4", "stateMutability": "view", "virtual": false, "visibility": "public"}, {"body": {"id": 419, "nodeType": "Block", "src": "385:34:4", "statements": [{"expression": {"id": 411, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"id": 409, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 350, "src": "391:1:4", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"id": 410, "name": "xval", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 406, "src": "395:4:4", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "391:8:4", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 412, "nodeType": "ExpressionStatement", "src": "391:8:4"}, {"expression": {"arguments": [{"id": 416, "name": "y", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 352, "src": "412:1:4", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}], "expression": {"id": 413, "name": "e", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 356, "src": "405:1:4", "typeDescriptions": {"typeIdentifier": "t_contract$_E_$285", "typeString": "contract E"}}, "id": 415, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "setX", "nodeType": "MemberAccess", "referencedDeclaration": 284, "src": "405:6:4", "typeDescriptions": {"typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$", "typeString": "function (uint256) external"}}, "id": 417, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "405:9:4", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 418, "nodeType": "ExpressionStatement", "src": "405:9:4"}]}, "functionSelector": "4018d9aa", "id": 420, "implemented": true, "kind": "function", "modifiers": [], "name": "setX", "nodeType": "FunctionDefinition", "parameters": {"id": 407, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 406, "mutability": "mutable", "name": "xval", "nodeType": "VariableDeclaration", "scope": 420, "src": "364:12:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 405, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "364:7:4", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "363:14:4"}, "returnParameters": {"id": 408, "nodeType": "ParameterList", "parameters": [], "src": "385:0:4"}, "scope": 421, "src": "350:69:4", "stateMutability": "nonpayable", "virtual": false, "visibility": "public"}], "scope": 422, "src": "103:318:4"}], "src": "37:385:4"}, "userdoc": {"methods": {}, "notice": null}, "devdoc": {"methods": {}, "author": null, "details": null, "title": null}} \ No newline at end of file diff --git a/tests/expected/hardhat-multi-file/K.json b/tests/expected/hardhat-multi-file/K.json new file mode 100644 index 00000000..553b8272 --- /dev/null +++ b/tests/expected/hardhat-multi-file/K.json @@ -0,0 +1 @@ +{"contractName": "K", "abi": [{"inputs": [{"internalType": "uint256", "name": "yval", "type": "uint256"}], "stateMutability": "nonpayable", "type": "constructor"}, {"inputs": [{"internalType": "uint256", "name": "xval", "type": "uint256"}], "name": "setX", "outputs": [], "stateMutability": "nonpayable", "type": "function"}, {"inputs": [], "name": "sum", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "stateMutability": "view", "type": "function"}], "bytecode": "0x608060405234801561001057600080fd5b50604051610ea7380380610ea78339818101604052602081101561003357600080fd5b810190808051906020019092919050505060008081905550806001819055506005604051610060906100cd565b80828152602001915050604051809103906000f080158015610086573d6000803e3d6000fd5b50600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506100da565b610bbd806102ea83390190565b610201806100e96000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80634018d9aa1461003b578063853255cc14610069575b600080fd5b6100676004803603602081101561005157600080fd5b8101908080359060200190929190505050610087565b005b610071610121565b6040518082815260200191505060405180910390f35b80600081905550600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16634018d9aa600183016040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561010657600080fd5b505af115801561011a573d6000803e3d6000fd5b5050505050565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663853255cc6040518163ffffffff1660e01b815260040160206040518083038186803b15801561018b57600080fd5b505afa15801561019f573d6000803e3d6000fd5b505050506040513d60208110156101b557600080fd5b810190808051906020019092919050505090509056fe608060405234801561001057600080fd5b50604051610bbd380380610bbd8339818101604052602081101561003357600080fd5b810190808051906020019092919050505060008081905550806001819055508060405161005f90610143565b80828152602001915050604051809103906000f080158015610085573d6000803e3d6000fd5b50600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600181016040516100d690610150565b80828152602001915050604051809103906000f0801580156100fc573d6000803e3d6000fd5b50600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505061015d565b6102a28061041883390190565b610503806106ba83390190565b6102ac8061016c6000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80634018d9aa1461003b578063853255cc14610069575b600080fd5b6100676004803603602081101561005157600080fd5b8101908080359060200190929190505050610087565b005b610071610120565b6040518082815260200191505060405180910390f35b80600081905550600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16634018d9aa6001546040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561010557600080fd5b505af1158015610119573d6000803e3d6000fd5b5050505050565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663853255cc6040518163ffffffff1660e01b815260040160206040518083038186803b15801561018a57600080fd5b505afa15801561019e573d6000803e3d6000fd5b505050506040513d60208110156101b457600080fd5b8101908080519060200190929190505050600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a0d7afb76040518163ffffffff1660e01b815260040160206040518083038186803b15801561022d57600080fd5b505afa158015610241573d6000803e3d6000fd5b505050506040513d602081101561025757600080fd5b810190808051906020019092919050505060015460005401010190509056fea26469706673582212207adf748c4fbc65b7c753bb0a72e946f848bffb9e1d7c8e268d29021c42b7df4964736f6c63430007030033608060405234801561001057600080fd5b506040516102a23803806102a28339818101604052602081101561003357600080fd5b810190808051906020019092919050505060008081905550806001819055506005604051610060906100cd565b80828152602001915050604051809103906000f080158015610086573d6000803e3d6000fd5b50600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506100da565b61012d8061017583390190565b608d806100e86000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c8063a0d7afb714602d575b600080fd5b60336049565b6040518082815260200191505060405180910390f35b60006001546000540390509056fea26469706673582212204e7f66950d7eac1667bf123fd0c2c0b36d53de5866b4bd867fac7411e321b0b464736f6c63430007030033608060405234801561001057600080fd5b5060405161012d38038061012d8339818101604052602081101561003357600080fd5b810190808051906020019092919050505060008081905550806001819055505060cc806100616000396000f3fe6080604052348015600f57600080fd5b506004361060325760003560e01c80634018d9aa146037578063853255cc146062575b600080fd5b606060048036036020811015604b57600080fd5b8101908080359060200190929190505050607e565b005b60686088565b6040518082815260200191505060405180910390f35b8060008190555050565b60006001546000540190509056fea2646970667358221220fa023934f603bf6bcaae6a6ab06db920cce4aca360c67548633e7f3514118cc964736f6c63430007030033608060405234801561001057600080fd5b506040516105033803806105038339818101604052602081101561003357600080fd5b810190808051906020019092919050505060008081905550806001819055508060405161005f906100cc565b80828152602001915050604051809103906000f080158015610085573d6000803e3d6000fd5b50600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506100d9565b6102a28061026183390190565b610179806100e86000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80634018d9aa1461003b578063853255cc14610069575b600080fd5b6100676004803603602081101561005157600080fd5b8101908080359060200190929190505050610087565b005b610071610091565b6040518082815260200191505060405180910390f35b8060008190555050565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a0d7afb76040518163ffffffff1660e01b815260040160206040518083038186803b1580156100fb57600080fd5b505afa15801561010f573d6000803e3d6000fd5b505050506040513d602081101561012557600080fd5b8101908080519060200190929190505050600154600054010190509056fea2646970667358221220ec8b5ae5c6f71260e1077af8088b564be4ae241ac16c43e3cac821682be2d7c964736f6c63430007030033608060405234801561001057600080fd5b506040516102a23803806102a28339818101604052602081101561003357600080fd5b810190808051906020019092919050505060008081905550806001819055506005604051610060906100cd565b80828152602001915050604051809103906000f080158015610086573d6000803e3d6000fd5b50600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506100da565b61012d8061017583390190565b608d806100e86000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c8063a0d7afb714602d575b600080fd5b60336049565b6040518082815260200191505060405180910390f35b60006001546000540390509056fea26469706673582212204e7f66950d7eac1667bf123fd0c2c0b36d53de5866b4bd867fac7411e321b0b464736f6c63430007030033608060405234801561001057600080fd5b5060405161012d38038061012d8339818101604052602081101561003357600080fd5b810190808051906020019092919050505060008081905550806001819055505060cc806100616000396000f3fe6080604052348015600f57600080fd5b506004361060325760003560e01c80634018d9aa146037578063853255cc146062575b600080fd5b606060048036036020811015604b57600080fd5b8101908080359060200190929190505050607e565b005b60686088565b6040518082815260200191505060405180910390f35b8060008190555050565b60006001546000540190509056fea2646970667358221220fa023934f603bf6bcaae6a6ab06db920cce4aca360c67548633e7f3514118cc964736f6c63430007030033", "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100365760003560e01c80634018d9aa1461003b578063853255cc14610069575b600080fd5b6100676004803603602081101561005157600080fd5b8101908080359060200190929190505050610087565b005b610071610121565b6040518082815260200191505060405180910390f35b80600081905550600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16634018d9aa600183016040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561010657600080fd5b505af115801561011a573d6000803e3d6000fd5b5050505050565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663853255cc6040518163ffffffff1660e01b815260040160206040518083038186803b15801561018b57600080fd5b505afa15801561019f573d6000803e3d6000fd5b505050506040513d60208110156101b557600080fd5b810190808051906020019092919050505090509056fe", "ast": {"absolutePath": "contracts/I/K.sol", "exportedSymbols": {"C": [191], "D": [229], "E": [285], "I": [421], "K": [480]}, "id": 481, "license": "Unlicense", "nodeType": "SourceUnit", "nodes": [{"id": 423, "literals": ["solidity", "^", "0.7", ".0"], "nodeType": "PragmaDirective", "src": "37:23:5"}, {"absolutePath": "contracts/I/I.sol", "file": "./I.sol", "id": 424, "nodeType": "ImportDirective", "scope": 481, "sourceUnit": 422, "src": "62:17:5", "symbolAliases": [], "unitAlias": ""}, {"abstract": false, "baseContracts": [], "contractDependencies": [421], "contractKind": "contract", "fullyImplemented": true, "id": 480, "linearizedBaseContracts": [480], "name": "K", "nodeType": "ContractDefinition", "nodes": [{"constant": false, "id": 426, "mutability": "mutable", "name": "x", "nodeType": "VariableDeclaration", "scope": 480, "src": "96:9:5", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 425, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "96:7:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}, {"constant": false, "id": 428, "mutability": "mutable", "name": "y", "nodeType": "VariableDeclaration", "scope": 480, "src": "109:9:5", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 427, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "109:7:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}, {"constant": false, "id": 430, "mutability": "mutable", "name": "i", "nodeType": "VariableDeclaration", "scope": 480, "src": "122:3:5", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_contract$_I_$421", "typeString": "contract I"}, "typeName": {"id": 429, "name": "I", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 421, "src": "122:1:5", "typeDescriptions": {"typeIdentifier": "t_contract$_I_$421", "typeString": "contract I"}}, "visibility": "internal"}, {"body": {"id": 450, "nodeType": "Block", "src": "156:48:5", "statements": [{"expression": {"id": 437, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"id": 435, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 426, "src": "162:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"hexValue": "30", "id": 436, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "166:1:5", "typeDescriptions": {"typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0"}, "value": "0"}, "src": "162:5:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 438, "nodeType": "ExpressionStatement", "src": "162:5:5"}, {"expression": {"id": 441, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"id": 439, "name": "y", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 428, "src": "173:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"id": 440, "name": "yval", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 432, "src": "177:4:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "173:8:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 442, "nodeType": "ExpressionStatement", "src": "173:8:5"}, {"expression": {"id": 448, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"id": 443, "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 430, "src": "187:1:5", "typeDescriptions": {"typeIdentifier": "t_contract$_I_$421", "typeString": "contract I"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"arguments": [{"hexValue": "35", "id": 446, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "197:1:5", "typeDescriptions": {"typeIdentifier": "t_rational_5_by_1", "typeString": "int_const 5"}, "value": "5"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_rational_5_by_1", "typeString": "int_const 5"}], "id": 445, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "NewExpression", "src": "191:5:5", "typeDescriptions": {"typeIdentifier": "t_function_creation_nonpayable$_t_uint256_$returns$_t_contract$_I_$421_$", "typeString": "function (uint256) returns (contract I)"}, "typeName": {"id": 444, "name": "I", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 421, "src": "195:1:5", "typeDescriptions": {"typeIdentifier": "t_contract$_I_$421", "typeString": "contract I"}}}, "id": 447, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "191:8:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_contract$_I_$421", "typeString": "contract I"}}, "src": "187:12:5", "typeDescriptions": {"typeIdentifier": "t_contract$_I_$421", "typeString": "contract I"}}, "id": 449, "nodeType": "ExpressionStatement", "src": "187:12:5"}]}, "id": 451, "implemented": true, "kind": "constructor", "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "parameters": {"id": 433, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 432, "mutability": "mutable", "name": "yval", "nodeType": "VariableDeclaration", "scope": 451, "src": "142:12:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 431, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "142:7:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "141:14:5"}, "returnParameters": {"id": 434, "nodeType": "ParameterList", "parameters": [], "src": "156:0:5"}, "scope": 480, "src": "130:74:5", "stateMutability": "nonpayable", "virtual": false, "visibility": "public"}, {"body": {"id": 460, "nodeType": "Block", "src": "253:25:5", "statements": [{"expression": {"arguments": [], "expression": {"argumentTypes": [], "expression": {"id": 456, "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 430, "src": "266:1:5", "typeDescriptions": {"typeIdentifier": "t_contract$_I_$421", "typeString": "contract I"}}, "id": 457, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sum", "nodeType": "MemberAccess", "referencedDeclaration": 404, "src": "266:5:5", "typeDescriptions": {"typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", "typeString": "function () view external returns (uint256)"}}, "id": 458, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "266:7:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "functionReturnParameters": 455, "id": 459, "nodeType": "Return", "src": "259:14:5"}]}, "functionSelector": "853255cc", "id": 461, "implemented": true, "kind": "function", "modifiers": [], "name": "sum", "nodeType": "FunctionDefinition", "parameters": {"id": 452, "nodeType": "ParameterList", "parameters": [], "src": "220:2:5"}, "returnParameters": {"id": 455, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 454, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "scope": 461, "src": "244:7:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 453, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "244:7:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "243:9:5"}, "scope": 480, "src": "208:70:5", "stateMutability": "view", "virtual": false, "visibility": "public"}, {"body": {"id": 478, "nodeType": "Block", "src": "317:39:5", "statements": [{"expression": {"id": 468, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"id": 466, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 426, "src": "323:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"id": 467, "name": "xval", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 463, "src": "327:4:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "323:8:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 469, "nodeType": "ExpressionStatement", "src": "323:8:5"}, {"expression": {"arguments": [{"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 475, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 473, "name": "xval", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 463, "src": "344:4:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"hexValue": "31", "id": 474, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "349:1:5", "typeDescriptions": {"typeIdentifier": "t_rational_1_by_1", "typeString": "int_const 1"}, "value": "1"}, "src": "344:6:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}], "expression": {"id": 470, "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 430, "src": "337:1:5", "typeDescriptions": {"typeIdentifier": "t_contract$_I_$421", "typeString": "contract I"}}, "id": 472, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "setX", "nodeType": "MemberAccess", "referencedDeclaration": 420, "src": "337:6:5", "typeDescriptions": {"typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$", "typeString": "function (uint256) external"}}, "id": 476, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "337:14:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 477, "nodeType": "ExpressionStatement", "src": "337:14:5"}]}, "functionSelector": "4018d9aa", "id": 479, "implemented": true, "kind": "function", "modifiers": [], "name": "setX", "nodeType": "FunctionDefinition", "parameters": {"id": 464, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 463, "mutability": "mutable", "name": "xval", "nodeType": "VariableDeclaration", "scope": 479, "src": "296:12:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 462, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "296:7:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "295:14:5"}, "returnParameters": {"id": 465, "nodeType": "ParameterList", "parameters": [], "src": "317:0:5"}, "scope": 480, "src": "282:74:5", "stateMutability": "nonpayable", "virtual": false, "visibility": "public"}], "scope": 481, "src": "81:277:5"}], "src": "37:322:5"}, "userdoc": {"methods": {}, "notice": null}, "devdoc": {"methods": {}, "author": null, "details": null, "title": null}} \ No newline at end of file diff --git a/tests/expected/hardhat-multi-file/X.json b/tests/expected/hardhat-multi-file/X.json new file mode 100644 index 00000000..41d3c91c --- /dev/null +++ b/tests/expected/hardhat-multi-file/X.json @@ -0,0 +1 @@ +{"contractName": "X", "abi": [{"inputs": [{"internalType": "uint256", "name": "yval", "type": "uint256"}], "stateMutability": "nonpayable", "type": "constructor"}, {"inputs": [{"internalType": "uint256", "name": "xval", "type": "uint256"}], "name": "setX", "outputs": [], "stateMutability": "nonpayable", "type": "function"}, {"inputs": [], "name": "sum", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "stateMutability": "view", "type": "function"}], "bytecode": "0x608060405234801561001057600080fd5b50604051610bbd380380610bbd8339818101604052602081101561003357600080fd5b810190808051906020019092919050505060008081905550806001819055508060405161005f90610143565b80828152602001915050604051809103906000f080158015610085573d6000803e3d6000fd5b50600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600181016040516100d690610150565b80828152602001915050604051809103906000f0801580156100fc573d6000803e3d6000fd5b50600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505061015d565b6102a28061041883390190565b610503806106ba83390190565b6102ac8061016c6000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80634018d9aa1461003b578063853255cc14610069575b600080fd5b6100676004803603602081101561005157600080fd5b8101908080359060200190929190505050610087565b005b610071610120565b6040518082815260200191505060405180910390f35b80600081905550600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16634018d9aa6001546040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561010557600080fd5b505af1158015610119573d6000803e3d6000fd5b5050505050565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663853255cc6040518163ffffffff1660e01b815260040160206040518083038186803b15801561018a57600080fd5b505afa15801561019e573d6000803e3d6000fd5b505050506040513d60208110156101b457600080fd5b8101908080519060200190929190505050600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a0d7afb76040518163ffffffff1660e01b815260040160206040518083038186803b15801561022d57600080fd5b505afa158015610241573d6000803e3d6000fd5b505050506040513d602081101561025757600080fd5b810190808051906020019092919050505060015460005401010190509056fe608060405234801561001057600080fd5b506040516102a23803806102a28339818101604052602081101561003357600080fd5b810190808051906020019092919050505060008081905550806001819055506005604051610060906100cd565b80828152602001915050604051809103906000f080158015610086573d6000803e3d6000fd5b50600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506100da565b61012d8061017583390190565b608d806100e86000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c8063a0d7afb714602d575b600080fd5b60336049565b6040518082815260200191505060405180910390f35b60006001546000540390509056fea26469706673582212204e7f66950d7eac1667bf123fd0c2c0b36d53de5866b4bd867fac7411e321b0b464736f6c63430007030033608060405234801561001057600080fd5b5060405161012d38038061012d8339818101604052602081101561003357600080fd5b810190808051906020019092919050505060008081905550806001819055505060cc806100616000396000f3fe6080604052348015600f57600080fd5b506004361060325760003560e01c80634018d9aa146037578063853255cc146062575b600080fd5b606060048036036020811015604b57600080fd5b8101908080359060200190929190505050607e565b005b60686088565b6040518082815260200191505060405180910390f35b8060008190555050565b60006001546000540190509056fea2646970667358221220fa023934f603bf6bcaae6a6ab06db920cce4aca360c67548633e7f3514118cc964736f6c63430007030033608060405234801561001057600080fd5b506040516105033803806105038339818101604052602081101561003357600080fd5b810190808051906020019092919050505060008081905550806001819055508060405161005f906100cc565b80828152602001915050604051809103906000f080158015610085573d6000803e3d6000fd5b50600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506100d9565b6102a28061026183390190565b610179806100e86000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80634018d9aa1461003b578063853255cc14610069575b600080fd5b6100676004803603602081101561005157600080fd5b8101908080359060200190929190505050610087565b005b610071610091565b6040518082815260200191505060405180910390f35b8060008190555050565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a0d7afb76040518163ffffffff1660e01b815260040160206040518083038186803b1580156100fb57600080fd5b505afa15801561010f573d6000803e3d6000fd5b505050506040513d602081101561012557600080fd5b8101908080519060200190929190505050600154600054010190509056fea2646970667358221220ec8b5ae5c6f71260e1077af8088b564be4ae241ac16c43e3cac821682be2d7c964736f6c63430007030033608060405234801561001057600080fd5b506040516102a23803806102a28339818101604052602081101561003357600080fd5b810190808051906020019092919050505060008081905550806001819055506005604051610060906100cd565b80828152602001915050604051809103906000f080158015610086573d6000803e3d6000fd5b50600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506100da565b61012d8061017583390190565b608d806100e86000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c8063a0d7afb714602d575b600080fd5b60336049565b6040518082815260200191505060405180910390f35b60006001546000540390509056fea26469706673582212204e7f66950d7eac1667bf123fd0c2c0b36d53de5866b4bd867fac7411e321b0b464736f6c63430007030033608060405234801561001057600080fd5b5060405161012d38038061012d8339818101604052602081101561003357600080fd5b810190808051906020019092919050505060008081905550806001819055505060cc806100616000396000f3fe6080604052348015600f57600080fd5b506004361060325760003560e01c80634018d9aa146037578063853255cc146062575b600080fd5b606060048036036020811015604b57600080fd5b8101908080359060200190929190505050607e565b005b60686088565b6040518082815260200191505060405180910390f35b8060008190555050565b60006001546000540190509056fea2646970667358221220fa023934f603bf6bcaae6a6ab06db920cce4aca360c67548633e7f3514118cc964736f6c63430007030033", "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100365760003560e01c80634018d9aa1461003b578063853255cc14610069575b600080fd5b6100676004803603602081101561005157600080fd5b8101908080359060200190929190505050610087565b005b610071610120565b6040518082815260200191505060405180910390f35b80600081905550600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16634018d9aa6001546040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561010557600080fd5b505af1158015610119573d6000803e3d6000fd5b5050505050565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663853255cc6040518163ffffffff1660e01b815260040160206040518083038186803b15801561018a57600080fd5b505afa15801561019e573d6000803e3d6000fd5b505050506040513d60208110156101b457600080fd5b8101908080519060200190929190505050600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a0d7afb76040518163ffffffff1660e01b815260040160206040518083038186803b15801561022d57600080fd5b505afa158015610241573d6000803e3d6000fd5b505050506040513d602081101561025757600080fd5b810190808051906020019092919050505060015460005401010190509056fe", "ast": {"absolutePath": "contracts/X/X.sol", "exportedSymbols": {"C": [191], "D": [229], "E": [285], "I": [421], "X": [557]}, "id": 558, "license": "Unlicense", "nodeType": "SourceUnit", "nodes": [{"id": 482, "literals": ["solidity", "^", "0.7", ".0"], "nodeType": "PragmaDirective", "src": "37:23:6"}, {"absolutePath": "contracts/C.sol", "file": "../C.sol", "id": 483, "nodeType": "ImportDirective", "scope": 558, "sourceUnit": 230, "src": "62:18:6", "symbolAliases": [], "unitAlias": ""}, {"absolutePath": "contracts/E/E.sol", "file": "../E/E.sol", "id": 484, "nodeType": "ImportDirective", "scope": 558, "sourceUnit": 286, "src": "81:20:6", "symbolAliases": [], "unitAlias": ""}, {"abstract": false, "baseContracts": [], "contractDependencies": [229, 285], "contractKind": "contract", "fullyImplemented": true, "id": 557, "linearizedBaseContracts": [557], "name": "X", "nodeType": "ContractDefinition", "nodes": [{"constant": false, "id": 486, "mutability": "mutable", "name": "x", "nodeType": "VariableDeclaration", "scope": 557, "src": "118:9:6", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 485, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "118:7:6", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}, {"constant": false, "id": 488, "mutability": "mutable", "name": "y", "nodeType": "VariableDeclaration", "scope": 557, "src": "131:9:6", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 487, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "131:7:6", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}, {"constant": false, "id": 490, "mutability": "mutable", "name": "d", "nodeType": "VariableDeclaration", "scope": 557, "src": "144:3:6", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_contract$_D_$229", "typeString": "contract D"}, "typeName": {"id": 489, "name": "D", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 229, "src": "144:1:6", "typeDescriptions": {"typeIdentifier": "t_contract$_D_$229", "typeString": "contract D"}}, "visibility": "internal"}, {"constant": false, "id": 492, "mutability": "mutable", "name": "e", "nodeType": "VariableDeclaration", "scope": 557, "src": "151:3:6", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_contract$_E_$285", "typeString": "contract E"}, "typeName": {"id": 491, "name": "E", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 285, "src": "151:1:6", "typeDescriptions": {"typeIdentifier": "t_contract$_E_$285", "typeString": "contract E"}}, "visibility": "internal"}, {"body": {"id": 521, "nodeType": "Block", "src": "185:74:6", "statements": [{"expression": {"id": 499, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"id": 497, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 486, "src": "191:1:6", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"hexValue": "30", "id": 498, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "195:1:6", "typeDescriptions": {"typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0"}, "value": "0"}, "src": "191:5:6", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 500, "nodeType": "ExpressionStatement", "src": "191:5:6"}, {"expression": {"id": 503, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"id": 501, "name": "y", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 488, "src": "202:1:6", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"id": 502, "name": "yval", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 494, "src": "206:4:6", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "202:8:6", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 504, "nodeType": "ExpressionStatement", "src": "202:8:6"}, {"expression": {"id": 510, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"id": 505, "name": "d", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 490, "src": "216:1:6", "typeDescriptions": {"typeIdentifier": "t_contract$_D_$229", "typeString": "contract D"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"arguments": [{"id": 508, "name": "yval", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 494, "src": "226:4:6", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}], "id": 507, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "NewExpression", "src": "220:5:6", "typeDescriptions": {"typeIdentifier": "t_function_creation_nonpayable$_t_uint256_$returns$_t_contract$_D_$229_$", "typeString": "function (uint256) returns (contract D)"}, "typeName": {"id": 506, "name": "D", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 229, "src": "224:1:6", "typeDescriptions": {"typeIdentifier": "t_contract$_D_$229", "typeString": "contract D"}}}, "id": 509, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "220:11:6", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_contract$_D_$229", "typeString": "contract D"}}, "src": "216:15:6", "typeDescriptions": {"typeIdentifier": "t_contract$_D_$229", "typeString": "contract D"}}, "id": 511, "nodeType": "ExpressionStatement", "src": "216:15:6"}, {"expression": {"id": 519, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"id": 512, "name": "e", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 492, "src": "237:1:6", "typeDescriptions": {"typeIdentifier": "t_contract$_E_$285", "typeString": "contract E"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"arguments": [{"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 517, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 515, "name": "yval", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 494, "src": "247:4:6", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"hexValue": "31", "id": 516, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "252:1:6", "typeDescriptions": {"typeIdentifier": "t_rational_1_by_1", "typeString": "int_const 1"}, "value": "1"}, "src": "247:6:6", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}], "id": 514, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "NewExpression", "src": "241:5:6", "typeDescriptions": {"typeIdentifier": "t_function_creation_nonpayable$_t_uint256_$returns$_t_contract$_E_$285_$", "typeString": "function (uint256) returns (contract E)"}, "typeName": {"id": 513, "name": "E", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 285, "src": "245:1:6", "typeDescriptions": {"typeIdentifier": "t_contract$_E_$285", "typeString": "contract E"}}}, "id": 518, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "241:13:6", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_contract$_E_$285", "typeString": "contract E"}}, "src": "237:17:6", "typeDescriptions": {"typeIdentifier": "t_contract$_E_$285", "typeString": "contract E"}}, "id": 520, "nodeType": "ExpressionStatement", "src": "237:17:6"}]}, "id": 522, "implemented": true, "kind": "constructor", "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "parameters": {"id": 495, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 494, "mutability": "mutable", "name": "yval", "nodeType": "VariableDeclaration", "scope": 522, "src": "171:12:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 493, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "171:7:6", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "170:14:6"}, "returnParameters": {"id": 496, "nodeType": "ParameterList", "parameters": [], "src": "185:0:6"}, "scope": 557, "src": "159:100:6", "stateMutability": "nonpayable", "virtual": false, "visibility": "public"}, {"body": {"id": 539, "nodeType": "Block", "src": "308:38:6", "statements": [{"expression": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 537, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 533, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 529, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 527, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 486, "src": "321:1:6", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"id": 528, "name": "y", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 488, "src": "323:1:6", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "321:3:6", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"arguments": [], "expression": {"argumentTypes": [], "expression": {"id": 530, "name": "d", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 490, "src": "325:1:6", "typeDescriptions": {"typeIdentifier": "t_contract$_D_$229", "typeString": "contract D"}}, "id": 531, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "diff", "nodeType": "MemberAccess", "referencedDeclaration": 228, "src": "325:6:6", "typeDescriptions": {"typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", "typeString": "function () view external returns (uint256)"}}, "id": 532, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "325:8:6", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "321:12:6", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"arguments": [], "expression": {"argumentTypes": [], "expression": {"id": 534, "name": "e", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 492, "src": "334:1:6", "typeDescriptions": {"typeIdentifier": "t_contract$_E_$285", "typeString": "contract E"}}, "id": 535, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sum", "nodeType": "MemberAccess", "referencedDeclaration": 274, "src": "334:5:6", "typeDescriptions": {"typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", "typeString": "function () view external returns (uint256)"}}, "id": 536, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "334:7:6", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "321:20:6", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "functionReturnParameters": 526, "id": 538, "nodeType": "Return", "src": "314:27:6"}]}, "functionSelector": "853255cc", "id": 540, "implemented": true, "kind": "function", "modifiers": [], "name": "sum", "nodeType": "FunctionDefinition", "parameters": {"id": 523, "nodeType": "ParameterList", "parameters": [], "src": "275:2:6"}, "returnParameters": {"id": 526, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 525, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "scope": 540, "src": "299:7:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 524, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "299:7:6", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "298:9:6"}, "scope": 557, "src": "263:83:6", "stateMutability": "view", "virtual": false, "visibility": "public"}, {"body": {"id": 555, "nodeType": "Block", "src": "385:34:6", "statements": [{"expression": {"id": 547, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"id": 545, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 486, "src": "391:1:6", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"id": 546, "name": "xval", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 542, "src": "395:4:6", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "391:8:6", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 548, "nodeType": "ExpressionStatement", "src": "391:8:6"}, {"expression": {"arguments": [{"id": 552, "name": "y", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 488, "src": "412:1:6", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}], "expression": {"id": 549, "name": "e", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 492, "src": "405:1:6", "typeDescriptions": {"typeIdentifier": "t_contract$_E_$285", "typeString": "contract E"}}, "id": 551, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "setX", "nodeType": "MemberAccess", "referencedDeclaration": 284, "src": "405:6:6", "typeDescriptions": {"typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$", "typeString": "function (uint256) external"}}, "id": 553, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "405:9:6", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 554, "nodeType": "ExpressionStatement", "src": "405:9:6"}]}, "functionSelector": "4018d9aa", "id": 556, "implemented": true, "kind": "function", "modifiers": [], "name": "setX", "nodeType": "FunctionDefinition", "parameters": {"id": 543, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 542, "mutability": "mutable", "name": "xval", "nodeType": "VariableDeclaration", "scope": 556, "src": "364:12:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 541, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "364:7:6", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "363:14:6"}, "returnParameters": {"id": 544, "nodeType": "ParameterList", "parameters": [], "src": "385:0:6"}, "scope": 557, "src": "350:69:6", "stateMutability": "nonpayable", "virtual": false, "visibility": "public"}], "scope": 558, "src": "103:318:6"}], "src": "37:385:6"}, "userdoc": {"methods": {}, "notice": null}, "devdoc": {"methods": {}, "author": null, "details": null, "title": null}} \ No newline at end of file diff --git a/tests/expected/hardhat-multi-file/Z.json b/tests/expected/hardhat-multi-file/Z.json new file mode 100644 index 00000000..d3c37616 --- /dev/null +++ b/tests/expected/hardhat-multi-file/Z.json @@ -0,0 +1 @@ +{"contractName": "Z", "abi": [{"inputs": [{"internalType": "uint256", "name": "yval", "type": "uint256"}], "stateMutability": "nonpayable", "type": "constructor"}, {"inputs": [{"internalType": "uint256", "name": "xval", "type": "uint256"}], "name": "setX", "outputs": [], "stateMutability": "nonpayable", "type": "function"}, {"inputs": [], "name": "sum", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "stateMutability": "view", "type": "function"}], "bytecode": "0x608060405234801561001057600080fd5b50604051610e99380380610e998339818101604052602081101561003357600080fd5b8101908080519060200190929190505050806000819055506005604051610059906100c6565b80828152602001915050604051809103906000f08015801561007f573d6000803e3d6000fd5b50600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506100d3565b610bbd806102dc83390190565b6101fa806100e26000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80634018d9aa1461003b578063853255cc14610069575b600080fd5b6100676004803603602081101561005157600080fd5b8101908080359060200190929190505050610087565b005b61007161011a565b6040518082815260200191505060405180910390f35b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16634018d9aa600183016040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156100ff57600080fd5b505af1158015610113573d6000803e3d6000fd5b5050505050565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663853255cc6040518163ffffffff1660e01b815260040160206040518083038186803b15801561018457600080fd5b505afa158015610198573d6000803e3d6000fd5b505050506040513d60208110156101ae57600080fd5b810190808051906020019092919050505090509056fe608060405234801561001057600080fd5b50604051610bbd380380610bbd8339818101604052602081101561003357600080fd5b810190808051906020019092919050505060008081905550806001819055508060405161005f90610143565b80828152602001915050604051809103906000f080158015610085573d6000803e3d6000fd5b50600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600181016040516100d690610150565b80828152602001915050604051809103906000f0801580156100fc573d6000803e3d6000fd5b50600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505061015d565b6102a28061041883390190565b610503806106ba83390190565b6102ac8061016c6000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80634018d9aa1461003b578063853255cc14610069575b600080fd5b6100676004803603602081101561005157600080fd5b8101908080359060200190929190505050610087565b005b610071610120565b6040518082815260200191505060405180910390f35b80600081905550600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16634018d9aa6001546040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561010557600080fd5b505af1158015610119573d6000803e3d6000fd5b5050505050565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663853255cc6040518163ffffffff1660e01b815260040160206040518083038186803b15801561018a57600080fd5b505afa15801561019e573d6000803e3d6000fd5b505050506040513d60208110156101b457600080fd5b8101908080519060200190929190505050600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a0d7afb76040518163ffffffff1660e01b815260040160206040518083038186803b15801561022d57600080fd5b505afa158015610241573d6000803e3d6000fd5b505050506040513d602081101561025757600080fd5b810190808051906020019092919050505060015460005401010190509056fea2646970667358221220a5363a19a9f78e7325c5b5daf5b391bec6b791a5dcbc774b74c1a26908d75a0164736f6c63430007030033608060405234801561001057600080fd5b506040516102a23803806102a28339818101604052602081101561003357600080fd5b810190808051906020019092919050505060008081905550806001819055506005604051610060906100cd565b80828152602001915050604051809103906000f080158015610086573d6000803e3d6000fd5b50600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506100da565b61012d8061017583390190565b608d806100e86000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c8063a0d7afb714602d575b600080fd5b60336049565b6040518082815260200191505060405180910390f35b60006001546000540390509056fea26469706673582212204e7f66950d7eac1667bf123fd0c2c0b36d53de5866b4bd867fac7411e321b0b464736f6c63430007030033608060405234801561001057600080fd5b5060405161012d38038061012d8339818101604052602081101561003357600080fd5b810190808051906020019092919050505060008081905550806001819055505060cc806100616000396000f3fe6080604052348015600f57600080fd5b506004361060325760003560e01c80634018d9aa146037578063853255cc146062575b600080fd5b606060048036036020811015604b57600080fd5b8101908080359060200190929190505050607e565b005b60686088565b6040518082815260200191505060405180910390f35b8060008190555050565b60006001546000540190509056fea2646970667358221220fa023934f603bf6bcaae6a6ab06db920cce4aca360c67548633e7f3514118cc964736f6c63430007030033608060405234801561001057600080fd5b506040516105033803806105038339818101604052602081101561003357600080fd5b810190808051906020019092919050505060008081905550806001819055508060405161005f906100cc565b80828152602001915050604051809103906000f080158015610085573d6000803e3d6000fd5b50600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506100d9565b6102a28061026183390190565b610179806100e86000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80634018d9aa1461003b578063853255cc14610069575b600080fd5b6100676004803603602081101561005157600080fd5b8101908080359060200190929190505050610087565b005b610071610091565b6040518082815260200191505060405180910390f35b8060008190555050565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a0d7afb76040518163ffffffff1660e01b815260040160206040518083038186803b1580156100fb57600080fd5b505afa15801561010f573d6000803e3d6000fd5b505050506040513d602081101561012557600080fd5b8101908080519060200190929190505050600154600054010190509056fea2646970667358221220ec8b5ae5c6f71260e1077af8088b564be4ae241ac16c43e3cac821682be2d7c964736f6c63430007030033608060405234801561001057600080fd5b506040516102a23803806102a28339818101604052602081101561003357600080fd5b810190808051906020019092919050505060008081905550806001819055506005604051610060906100cd565b80828152602001915050604051809103906000f080158015610086573d6000803e3d6000fd5b50600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506100da565b61012d8061017583390190565b608d806100e86000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c8063a0d7afb714602d575b600080fd5b60336049565b6040518082815260200191505060405180910390f35b60006001546000540390509056fea26469706673582212204e7f66950d7eac1667bf123fd0c2c0b36d53de5866b4bd867fac7411e321b0b464736f6c63430007030033608060405234801561001057600080fd5b5060405161012d38038061012d8339818101604052602081101561003357600080fd5b810190808051906020019092919050505060008081905550806001819055505060cc806100616000396000f3fe6080604052348015600f57600080fd5b506004361060325760003560e01c80634018d9aa146037578063853255cc146062575b600080fd5b606060048036036020811015604b57600080fd5b8101908080359060200190929190505050607e565b005b60686088565b6040518082815260200191505060405180910390f35b8060008190555050565b60006001546000540190509056fea2646970667358221220fa023934f603bf6bcaae6a6ab06db920cce4aca360c67548633e7f3514118cc964736f6c63430007030033", "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100365760003560e01c80634018d9aa1461003b578063853255cc14610069575b600080fd5b6100676004803603602081101561005157600080fd5b8101908080359060200190929190505050610087565b005b61007161011a565b6040518082815260200191505060405180910390f35b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16634018d9aa600183016040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156100ff57600080fd5b505af1158015610113573d6000803e3d6000fd5b5050505050565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663853255cc6040518163ffffffff1660e01b815260040160206040518083038186803b15801561018457600080fd5b505afa158015610198573d6000803e3d6000fd5b505050506040513d60208110156101ae57600080fd5b810190808051906020019092919050505090509056fe", "ast": {"absolutePath": "contracts/X/Z.sol", "exportedSymbols": {"C": [191], "D": [229], "E": [285], "I": [421], "X": [557], "Z": [606]}, "id": 607, "license": "Unlicense", "nodeType": "SourceUnit", "nodes": [{"id": 559, "literals": ["solidity", "^", "0.7", ".0"], "nodeType": "PragmaDirective", "src": "37:23:7"}, {"absolutePath": "contracts/X/X.sol", "file": "./X.sol", "id": 560, "nodeType": "ImportDirective", "scope": 607, "sourceUnit": 558, "src": "62:17:7", "symbolAliases": [], "unitAlias": ""}, {"abstract": false, "baseContracts": [], "contractDependencies": [557], "contractKind": "contract", "fullyImplemented": true, "id": 606, "linearizedBaseContracts": [606], "name": "Z", "nodeType": "ContractDefinition", "nodes": [{"constant": false, "id": 562, "mutability": "mutable", "name": "y", "nodeType": "VariableDeclaration", "scope": 606, "src": "96:9:7", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 561, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "96:7:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}, {"constant": false, "id": 564, "mutability": "mutable", "name": "x", "nodeType": "VariableDeclaration", "scope": 606, "src": "109:3:7", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_contract$_X_$557", "typeString": "contract X"}, "typeName": {"id": 563, "name": "X", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 557, "src": "109:1:7", "typeDescriptions": {"typeIdentifier": "t_contract$_X_$557", "typeString": "contract X"}}, "visibility": "internal"}, {"body": {"id": 580, "nodeType": "Block", "src": "143:37:7", "statements": [{"expression": {"id": 571, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"id": 569, "name": "y", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 562, "src": "149:1:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"id": 570, "name": "yval", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 566, "src": "153:4:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "149:8:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 572, "nodeType": "ExpressionStatement", "src": "149:8:7"}, {"expression": {"id": 578, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"id": 573, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 564, "src": "163:1:7", "typeDescriptions": {"typeIdentifier": "t_contract$_X_$557", "typeString": "contract X"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"arguments": [{"hexValue": "35", "id": 576, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "173:1:7", "typeDescriptions": {"typeIdentifier": "t_rational_5_by_1", "typeString": "int_const 5"}, "value": "5"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_rational_5_by_1", "typeString": "int_const 5"}], "id": 575, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "NewExpression", "src": "167:5:7", "typeDescriptions": {"typeIdentifier": "t_function_creation_nonpayable$_t_uint256_$returns$_t_contract$_X_$557_$", "typeString": "function (uint256) returns (contract X)"}, "typeName": {"id": 574, "name": "X", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 557, "src": "171:1:7", "typeDescriptions": {"typeIdentifier": "t_contract$_X_$557", "typeString": "contract X"}}}, "id": 577, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "167:8:7", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_contract$_X_$557", "typeString": "contract X"}}, "src": "163:12:7", "typeDescriptions": {"typeIdentifier": "t_contract$_X_$557", "typeString": "contract X"}}, "id": 579, "nodeType": "ExpressionStatement", "src": "163:12:7"}]}, "id": 581, "implemented": true, "kind": "constructor", "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "parameters": {"id": 567, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 566, "mutability": "mutable", "name": "yval", "nodeType": "VariableDeclaration", "scope": 581, "src": "129:12:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 565, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "129:7:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "128:14:7"}, "returnParameters": {"id": 568, "nodeType": "ParameterList", "parameters": [], "src": "143:0:7"}, "scope": 606, "src": "117:63:7", "stateMutability": "nonpayable", "virtual": false, "visibility": "public"}, {"body": {"id": 590, "nodeType": "Block", "src": "229:25:7", "statements": [{"expression": {"arguments": [], "expression": {"argumentTypes": [], "expression": {"id": 586, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 564, "src": "242:1:7", "typeDescriptions": {"typeIdentifier": "t_contract$_X_$557", "typeString": "contract X"}}, "id": 587, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sum", "nodeType": "MemberAccess", "referencedDeclaration": 540, "src": "242:5:7", "typeDescriptions": {"typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", "typeString": "function () view external returns (uint256)"}}, "id": 588, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "242:7:7", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "functionReturnParameters": 585, "id": 589, "nodeType": "Return", "src": "235:14:7"}]}, "functionSelector": "853255cc", "id": 591, "implemented": true, "kind": "function", "modifiers": [], "name": "sum", "nodeType": "FunctionDefinition", "parameters": {"id": 582, "nodeType": "ParameterList", "parameters": [], "src": "196:2:7"}, "returnParameters": {"id": 585, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 584, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "scope": 591, "src": "220:7:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 583, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "220:7:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "219:9:7"}, "scope": 606, "src": "184:70:7", "stateMutability": "view", "virtual": false, "visibility": "public"}, {"body": {"id": 604, "nodeType": "Block", "src": "293:25:7", "statements": [{"expression": {"arguments": [{"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 601, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 599, "name": "xval", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 593, "src": "306:4:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"hexValue": "31", "id": 600, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "311:1:7", "typeDescriptions": {"typeIdentifier": "t_rational_1_by_1", "typeString": "int_const 1"}, "value": "1"}, "src": "306:6:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}], "expression": {"id": 596, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 564, "src": "299:1:7", "typeDescriptions": {"typeIdentifier": "t_contract$_X_$557", "typeString": "contract X"}}, "id": 598, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "setX", "nodeType": "MemberAccess", "referencedDeclaration": 556, "src": "299:6:7", "typeDescriptions": {"typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$", "typeString": "function (uint256) external"}}, "id": 602, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "299:14:7", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 603, "nodeType": "ExpressionStatement", "src": "299:14:7"}]}, "functionSelector": "4018d9aa", "id": 605, "implemented": true, "kind": "function", "modifiers": [], "name": "setX", "nodeType": "FunctionDefinition", "parameters": {"id": 594, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 593, "mutability": "mutable", "name": "xval", "nodeType": "VariableDeclaration", "scope": 605, "src": "272:12:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 592, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "272:7:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "271:14:7"}, "returnParameters": {"id": 595, "nodeType": "ParameterList", "parameters": [], "src": "293:0:7"}, "scope": 606, "src": "258:60:7", "stateMutability": "nonpayable", "virtual": false, "visibility": "public"}], "scope": 607, "src": "81:239:7"}], "src": "37:284:7"}, "userdoc": {"methods": {}, "notice": null}, "devdoc": {"methods": {}, "author": null, "details": null, "title": null}} \ No newline at end of file diff --git a/tests/expected/hardhat-multi-file/combined_solc.json b/tests/expected/hardhat-multi-file/combined_solc.json new file mode 100644 index 00000000..2fc725c9 --- /dev/null +++ b/tests/expected/hardhat-multi-file/combined_solc.json @@ -0,0 +1 @@ +["TMPDIR/hardhat-multi-file/contracts/A.sol","TMPDIR/hardhat-multi-file/contracts/C.sol","TMPDIR/hardhat-multi-file/contracts/E/E.sol","TMPDIR/hardhat-multi-file/contracts/E/G.sol","TMPDIR/hardhat-multi-file/contracts/I/I.sol","TMPDIR/hardhat-multi-file/contracts/I/K.sol","TMPDIR/hardhat-multi-file/contracts/X/X.sol","TMPDIR/hardhat-multi-file/contracts/X/Z.sol"] \ No newline at end of file diff --git a/tests/expected/solc-multi-file/A.json b/tests/expected/solc-multi-file/A.json new file mode 100644 index 00000000..459f8fe6 --- /dev/null +++ b/tests/expected/solc-multi-file/A.json @@ -0,0 +1 @@ +{"contractName": "A", "abi": [{"constant": false, "inputs": [{"name": "xval", "type": "uint256"}], "name": "set", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "sum", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"inputs": [{"name": "yval", "type": "uint256"}, {"name": "zval", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}], "bytecode": "0x608060405234801561001057600080fd5b506040516040806121478339810180604052604081101561003057600080fd5b81019080805190602001909291908051906020019092919050505060008081905550816001819055508060028190555060405161006c906101b8565b604051809103906000f080158015610088573d6000803e3d6000fd5b50600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550806040516100d6906101c5565b80828152602001915050604051809103906000f0801580156100fc573d6000803e3d6000fd5b50600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508060405161014a906101d2565b80828152602001915050604051809103906000f080158015610170573d6000803e3d6000fd5b50600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050506101df565b6118698061053683390190565b61012080611d9f83390190565b61028880611ebf83390190565b610348806101ee6000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c806360fe47b11461003b578063853255cc14610069575b600080fd5b6100676004803603602081101561005157600080fd5b8101908080359060200190929190505050610087565b005b61007161011e565b6040518082815260200191505060405180910390f35b80600081905550600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16634018d9aa826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561010357600080fd5b505af1158015610117573d6000803e3d6000fd5b5050505050565b6000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a0d7afb76040518163ffffffff1660e01b815260040160206040518083038186803b15801561018857600080fd5b505afa15801561019c573d6000803e3d6000fd5b505050506040513d60208110156101b257600080fd5b8101908080519060200190929190505050600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663853255cc6040518163ffffffff1660e01b815260040160206040518083038186803b15801561022b57600080fd5b505afa15801561023f573d6000803e3d6000fd5b505050506040513d602081101561025557600080fd5b8101908080519060200190929190505050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a0d7afb76040518163ffffffff1660e01b815260040160206040518083038186803b1580156102ce57600080fd5b505afa1580156102e2573d6000803e3d6000fd5b505050506040513d60208110156102f857600080fd5b8101908080519060200190929190505050600254600154600054010101010190509056fe608060405234801561001057600080fd5b5060008081905550600660018190555060016000540160405161003290610117565b80828152602001915050604051809103906000f080158015610058573d6000803e3d6000fd5b50600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506002600054016040516100ab90610124565b80828152602001915050604051809103906000f0801580156100d1573d6000803e3d6000fd5b50600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610131565b6107b98061026483390190565b610e4c80610a1d83390190565b610124806101406000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c8063a0d7afb714602d575b600080fd5b60336049565b6040518082815260200191505060405180910390f35b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663853255cc6040518163ffffffff1660e01b815260040160206040518083038186803b15801560b257600080fd5b505afa15801560c5573d6000803e3d6000fd5b505050506040513d602081101560da57600080fd5b8101908080519060200190929190505050600154600054030190509056fea165627a7a723058208348e6d92775e117a1747761d2545545b7bb3a9638f629bdd75951e96293e68b0029608060405234801561001057600080fd5b506040516020806107b98339810180604052602081101561003057600080fd5b81019080805190602001909291905050506000808190555080600181905550600560405161005d906100ca565b80828152602001915050604051809103906000f080158015610083573d6000803e3d6000fd5b50600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506100d7565b6104dc806102dd83390190565b6101f7806100e66000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80634018d9aa1461003b578063853255cc14610069575b600080fd5b6100676004803603602081101561005157600080fd5b8101908080359060200190929190505050610087565b005b610071610121565b6040518082815260200191505060405180910390f35b80600081905550600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16634018d9aa600183016040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561010657600080fd5b505af115801561011a573d6000803e3d6000fd5b5050505050565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663853255cc6040518163ffffffff1660e01b815260040160206040518083038186803b15801561018b57600080fd5b505afa15801561019f573d6000803e3d6000fd5b505050506040513d60208110156101b557600080fd5b810190808051906020019092919050505090509056fea165627a7a7230582039825452eab93d3c5b16b79164fd7a381736d1ceffa82396a7283671fbbce3fd0029608060405234801561001057600080fd5b506040516020806104dc8339810180604052602081101561003057600080fd5b810190808051906020019092919050505060008081905550806001819055508060405161005c906100c9565b80828152602001915050604051809103906000f080158015610082573d6000803e3d6000fd5b50600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506100d6565b6102888061025483390190565b61016f806100e56000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80634018d9aa1461003b578063853255cc14610069575b600080fd5b6100676004803603602081101561005157600080fd5b8101908080359060200190929190505050610087565b005b610071610091565b6040518082815260200191505060405180910390f35b8060008190555050565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a0d7afb76040518163ffffffff1660e01b815260040160206040518083038186803b1580156100fb57600080fd5b505afa15801561010f573d6000803e3d6000fd5b505050506040513d602081101561012557600080fd5b8101908080519060200190929190505050600154600054010190509056fea165627a7a72305820be7d0c032ba61d5a5dd35ec573ea745ab2b7cf97722aacffe6cf563be5bf9f380029608060405234801561001057600080fd5b506040516020806102888339810180604052602081101561003057600080fd5b81019080805190602001909291905050506000808190555080600181905550600560405161005d906100ca565b80828152602001915050604051809103906000f080158015610083573d6000803e3d6000fd5b50600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506100d7565b6101208061016883390190565b6083806100e56000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c8063a0d7afb714602d575b600080fd5b60336049565b6040518082815260200191505060405180910390f35b60006001546000540390509056fea165627a7a723058201afddf157b08e7ca10fd3ec23be46d8d79937e3de04d99fd76dda13572ccb03f0029608060405234801561001057600080fd5b506040516020806101208339810180604052602081101561003057600080fd5b810190808051906020019092919050505060008081905550806001819055505060c28061005e6000396000f3fe6080604052348015600f57600080fd5b506004361060325760003560e01c80634018d9aa146037578063853255cc146062575b600080fd5b606060048036036020811015604b57600080fd5b8101908080359060200190929190505050607e565b005b60686088565b6040518082815260200191505060405180910390f35b8060008190555050565b60006001546000540190509056fea165627a7a72305820f5a2f94ed487768cbf61442383f5f1a6be2e888f4838bbdca8d853b0c1a288190029608060405234801561001057600080fd5b50604051602080610e4c8339810180604052602081101561003057600080fd5b81019080805190602001909291905050506000808190555080600181905550600560405161005d906100ca565b80828152602001915050604051809103906000f080158015610083573d6000803e3d6000fd5b50600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506100d7565b610b6f806102dd83390190565b6101f7806100e66000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80634018d9aa1461003b578063853255cc14610069575b600080fd5b6100676004803603602081101561005157600080fd5b8101908080359060200190929190505050610087565b005b610071610121565b6040518082815260200191505060405180910390f35b80600081905550600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16634018d9aa600183016040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561010657600080fd5b505af115801561011a573d6000803e3d6000fd5b5050505050565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663853255cc6040518163ffffffff1660e01b815260040160206040518083038186803b15801561018b57600080fd5b505afa15801561019f573d6000803e3d6000fd5b505050506040513d60208110156101b557600080fd5b810190808051906020019092919050505090509056fea165627a7a723058203d806347ce0702d67afd020697fa0eb2d47d028951df6bd065f211bdb73814800029608060405234801561001057600080fd5b50604051602080610b6f8339810180604052602081101561003057600080fd5b810190808051906020019092919050505060008081905550806001819055508060405161005c90610140565b80828152602001915050604051809103906000f080158015610082573d6000803e3d6000fd5b50600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600181016040516100d39061014d565b80828152602001915050604051809103906000f0801580156100f9573d6000803e3d6000fd5b50600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505061015a565b6102888061040b83390190565b6104dc8061069383390190565b6102a2806101696000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80634018d9aa1461003b578063853255cc14610069575b600080fd5b6100676004803603602081101561005157600080fd5b8101908080359060200190929190505050610087565b005b610071610120565b6040518082815260200191505060405180910390f35b80600081905550600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16634018d9aa6001546040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561010557600080fd5b505af1158015610119573d6000803e3d6000fd5b5050505050565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663853255cc6040518163ffffffff1660e01b815260040160206040518083038186803b15801561018a57600080fd5b505afa15801561019e573d6000803e3d6000fd5b505050506040513d60208110156101b457600080fd5b8101908080519060200190929190505050600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a0d7afb76040518163ffffffff1660e01b815260040160206040518083038186803b15801561022d57600080fd5b505afa158015610241573d6000803e3d6000fd5b505050506040513d602081101561025757600080fd5b810190808051906020019092919050505060015460005401010190509056fea165627a7a7230582011f7c89b5d0495c839a814fc0fecd6058720cf5f06c8078db6137f0b6f75bdc70029608060405234801561001057600080fd5b506040516020806102888339810180604052602081101561003057600080fd5b81019080805190602001909291905050506000808190555080600181905550600560405161005d906100ca565b80828152602001915050604051809103906000f080158015610083573d6000803e3d6000fd5b50600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506100d7565b6101208061016883390190565b6083806100e56000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c8063a0d7afb714602d575b600080fd5b60336049565b6040518082815260200191505060405180910390f35b60006001546000540390509056fea165627a7a723058201afddf157b08e7ca10fd3ec23be46d8d79937e3de04d99fd76dda13572ccb03f0029608060405234801561001057600080fd5b506040516020806101208339810180604052602081101561003057600080fd5b810190808051906020019092919050505060008081905550806001819055505060c28061005e6000396000f3fe6080604052348015600f57600080fd5b506004361060325760003560e01c80634018d9aa146037578063853255cc146062575b600080fd5b606060048036036020811015604b57600080fd5b8101908080359060200190929190505050607e565b005b60686088565b6040518082815260200191505060405180910390f35b8060008190555050565b60006001546000540190509056fea165627a7a72305820f5a2f94ed487768cbf61442383f5f1a6be2e888f4838bbdca8d853b0c1a288190029608060405234801561001057600080fd5b506040516020806104dc8339810180604052602081101561003057600080fd5b810190808051906020019092919050505060008081905550806001819055508060405161005c906100c9565b80828152602001915050604051809103906000f080158015610082573d6000803e3d6000fd5b50600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506100d6565b6102888061025483390190565b61016f806100e56000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80634018d9aa1461003b578063853255cc14610069575b600080fd5b6100676004803603602081101561005157600080fd5b8101908080359060200190929190505050610087565b005b610071610091565b6040518082815260200191505060405180910390f35b8060008190555050565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a0d7afb76040518163ffffffff1660e01b815260040160206040518083038186803b1580156100fb57600080fd5b505afa15801561010f573d6000803e3d6000fd5b505050506040513d602081101561012557600080fd5b8101908080519060200190929190505050600154600054010190509056fea165627a7a72305820be7d0c032ba61d5a5dd35ec573ea745ab2b7cf97722aacffe6cf563be5bf9f380029608060405234801561001057600080fd5b506040516020806102888339810180604052602081101561003057600080fd5b81019080805190602001909291905050506000808190555080600181905550600560405161005d906100ca565b80828152602001915050604051809103906000f080158015610083573d6000803e3d6000fd5b50600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506100d7565b6101208061016883390190565b6083806100e56000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c8063a0d7afb714602d575b600080fd5b60336049565b6040518082815260200191505060405180910390f35b60006001546000540390509056fea165627a7a723058201afddf157b08e7ca10fd3ec23be46d8d79937e3de04d99fd76dda13572ccb03f0029608060405234801561001057600080fd5b506040516020806101208339810180604052602081101561003057600080fd5b810190808051906020019092919050505060008081905550806001819055505060c28061005e6000396000f3fe6080604052348015600f57600080fd5b506004361060325760003560e01c80634018d9aa146037578063853255cc146062575b600080fd5b606060048036036020811015604b57600080fd5b8101908080359060200190929190505050607e565b005b60686088565b6040518082815260200191505060405180910390f35b8060008190555050565b60006001546000540190509056fea165627a7a72305820f5a2f94ed487768cbf61442383f5f1a6be2e888f4838bbdca8d853b0c1a288190029608060405234801561001057600080fd5b506040516020806101208339810180604052602081101561003057600080fd5b810190808051906020019092919050505060008081905550806001819055505060c28061005e6000396000f3fe6080604052348015600f57600080fd5b506004361060325760003560e01c80634018d9aa146037578063853255cc146062575b600080fd5b606060048036036020811015604b57600080fd5b8101908080359060200190929190505050607e565b005b60686088565b6040518082815260200191505060405180910390f35b8060008190555050565b60006001546000540190509056fea165627a7a72305820f5a2f94ed487768cbf61442383f5f1a6be2e888f4838bbdca8d853b0c1a288190029608060405234801561001057600080fd5b506040516020806102888339810180604052602081101561003057600080fd5b81019080805190602001909291905050506000808190555080600181905550600560405161005d906100ca565b80828152602001915050604051809103906000f080158015610083573d6000803e3d6000fd5b50600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506100d7565b6101208061016883390190565b6083806100e56000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c8063a0d7afb714602d575b600080fd5b60336049565b6040518082815260200191505060405180910390f35b60006001546000540390509056fea165627a7a723058201afddf157b08e7ca10fd3ec23be46d8d79937e3de04d99fd76dda13572ccb03f0029608060405234801561001057600080fd5b506040516020806101208339810180604052602081101561003057600080fd5b810190808051906020019092919050505060008081905550806001819055505060c28061005e6000396000f3fe6080604052348015600f57600080fd5b506004361060325760003560e01c80634018d9aa146037578063853255cc146062575b600080fd5b606060048036036020811015604b57600080fd5b8101908080359060200190929190505050607e565b005b60686088565b6040518082815260200191505060405180910390f35b8060008190555050565b60006001546000540190509056fea165627a7a72305820f5a2f94ed487768cbf61442383f5f1a6be2e888f4838bbdca8d853b0c1a288190029", "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100365760003560e01c806360fe47b11461003b578063853255cc14610069575b600080fd5b6100676004803603602081101561005157600080fd5b8101908080359060200190929190505050610087565b005b61007161011e565b6040518082815260200191505060405180910390f35b80600081905550600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16634018d9aa826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561010357600080fd5b505af1158015610117573d6000803e3d6000fd5b5050505050565b6000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a0d7afb76040518163ffffffff1660e01b815260040160206040518083038186803b15801561018857600080fd5b505afa15801561019c573d6000803e3d6000fd5b505050506040513d60208110156101b257600080fd5b8101908080519060200190929190505050600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663853255cc6040518163ffffffff1660e01b815260040160206040518083038186803b15801561022b57600080fd5b505afa15801561023f573d6000803e3d6000fd5b505050506040513d602081101561025557600080fd5b8101908080519060200190929190505050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a0d7afb76040518163ffffffff1660e01b815260040160206040518083038186803b1580156102ce57600080fd5b505afa1580156102e2573d6000803e3d6000fd5b505050506040513d60208110156102f857600080fd5b8101908080519060200190929190505050600254600154600054010101010190509056fe", "ast": {"absolutePath": "./A.sol", "exportedSymbols": {"A": [96], "B": [149]}, "id": 150, "nodeType": "SourceUnit", "nodes": [{"absolutePath": "./C.sol", "file": "./C.sol", "id": 1, "nodeType": "ImportDirective", "scope": 150, "sourceUnit": 228, "src": "0:17:0", "symbolAliases": [], "unitAlias": ""}, {"absolutePath": "./E/G.sol", "file": "./E/G.sol", "id": 2, "nodeType": "ImportDirective", "scope": 150, "sourceUnit": 286, "src": "18:19:0", "symbolAliases": [], "unitAlias": ""}, {"absolutePath": "./I/K.sol", "file": "./I/K.sol", "id": 3, "nodeType": "ImportDirective", "scope": 150, "sourceUnit": 344, "src": "38:19:0", "symbolAliases": [], "unitAlias": ""}, {"baseContracts": [], "contractDependencies": [149, 189, 227], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "id": 96, "linearizedBaseContracts": [96], "name": "A", "nodeType": "ContractDefinition", "nodes": [{"constant": false, "id": 5, "name": "x", "nodeType": "VariableDeclaration", "scope": 96, "src": "74:9:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 4, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "74:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "value": null, "visibility": "internal"}, {"constant": false, "id": 7, "name": "y", "nodeType": "VariableDeclaration", "scope": 96, "src": "87:9:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 6, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "87:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "value": null, "visibility": "internal"}, {"constant": false, "id": 9, "name": "z", "nodeType": "VariableDeclaration", "scope": 96, "src": "100:9:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 8, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "100:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "value": null, "visibility": "internal"}, {"constant": false, "id": 11, "name": "b", "nodeType": "VariableDeclaration", "scope": 96, "src": "113:3:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_contract$_B_$149", "typeString": "contract B"}, "typeName": {"contractScope": null, "id": 10, "name": "B", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 149, "src": "113:1:0", "typeDescriptions": {"typeIdentifier": "t_contract$_B_$149", "typeString": "contract B"}}, "value": null, "visibility": "internal"}, {"constant": false, "id": 13, "name": "c", "nodeType": "VariableDeclaration", "scope": 96, "src": "120:3:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_contract$_C_$189", "typeString": "contract C"}, "typeName": {"contractScope": null, "id": 12, "name": "C", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 189, "src": "120:1:0", "typeDescriptions": {"typeIdentifier": "t_contract$_C_$189", "typeString": "contract C"}}, "value": null, "visibility": "internal"}, {"constant": false, "id": 15, "name": "d", "nodeType": "VariableDeclaration", "scope": 96, "src": "127:3:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_contract$_D_$227", "typeString": "contract D"}, "typeName": {"contractScope": null, "id": 14, "name": "D", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 227, "src": "127:1:0", "typeDescriptions": {"typeIdentifier": "t_contract$_D_$227", "typeString": "contract D"}}, "value": null, "visibility": "internal"}, {"body": {"id": 54, "nodeType": "Block", "src": "182:103:0", "statements": [{"expression": {"argumentTypes": null, "id": 24, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"argumentTypes": null, "id": 22, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5, "src": "188:1:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"argumentTypes": null, "hexValue": "30", "id": 23, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "192:1:0", "subdenomination": null, "typeDescriptions": {"typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0"}, "value": "0"}, "src": "188:5:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 25, "nodeType": "ExpressionStatement", "src": "188:5:0"}, {"expression": {"argumentTypes": null, "id": 28, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"argumentTypes": null, "id": 26, "name": "y", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7, "src": "199:1:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"argumentTypes": null, "id": 27, "name": "yval", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 17, "src": "203:4:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "199:8:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 29, "nodeType": "ExpressionStatement", "src": "199:8:0"}, {"expression": {"argumentTypes": null, "id": 32, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"argumentTypes": null, "id": 30, "name": "z", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9, "src": "213:1:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"argumentTypes": null, "id": 31, "name": "zval", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 19, "src": "217:4:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "213:8:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 33, "nodeType": "ExpressionStatement", "src": "213:8:0"}, {"expression": {"argumentTypes": null, "id": 38, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"argumentTypes": null, "id": 34, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 11, "src": "227:1:0", "typeDescriptions": {"typeIdentifier": "t_contract$_B_$149", "typeString": "contract B"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"argumentTypes": null, "arguments": [], "expression": {"argumentTypes": [], "id": 36, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "NewExpression", "src": "231:5:0", "typeDescriptions": {"typeIdentifier": "t_function_creation_nonpayable$__$returns$_t_contract$_B_$149_$", "typeString": "function () returns (contract B)"}, "typeName": {"contractScope": null, "id": 35, "name": "B", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 149, "src": "235:1:0", "typeDescriptions": {"typeIdentifier": "t_contract$_B_$149", "typeString": "contract B"}}}, "id": 37, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "231:7:0", "typeDescriptions": {"typeIdentifier": "t_contract$_B_$149", "typeString": "contract B"}}, "src": "227:11:0", "typeDescriptions": {"typeIdentifier": "t_contract$_B_$149", "typeString": "contract B"}}, "id": 39, "nodeType": "ExpressionStatement", "src": "227:11:0"}, {"expression": {"argumentTypes": null, "id": 45, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"argumentTypes": null, "id": 40, "name": "c", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 13, "src": "244:1:0", "typeDescriptions": {"typeIdentifier": "t_contract$_C_$189", "typeString": "contract C"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"argumentTypes": null, "arguments": [{"argumentTypes": null, "id": 43, "name": "zval", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 19, "src": "254:4:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}], "id": 42, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "NewExpression", "src": "248:5:0", "typeDescriptions": {"typeIdentifier": "t_function_creation_nonpayable$_t_uint256_$returns$_t_contract$_C_$189_$", "typeString": "function (uint256) returns (contract C)"}, "typeName": {"contractScope": null, "id": 41, "name": "C", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 189, "src": "252:1:0", "typeDescriptions": {"typeIdentifier": "t_contract$_C_$189", "typeString": "contract C"}}}, "id": 44, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "248:11:0", "typeDescriptions": {"typeIdentifier": "t_contract$_C_$189", "typeString": "contract C"}}, "src": "244:15:0", "typeDescriptions": {"typeIdentifier": "t_contract$_C_$189", "typeString": "contract C"}}, "id": 46, "nodeType": "ExpressionStatement", "src": "244:15:0"}, {"expression": {"argumentTypes": null, "id": 52, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"argumentTypes": null, "id": 47, "name": "d", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 15, "src": "265:1:0", "typeDescriptions": {"typeIdentifier": "t_contract$_D_$227", "typeString": "contract D"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"argumentTypes": null, "arguments": [{"argumentTypes": null, "id": 50, "name": "zval", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 19, "src": "275:4:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}], "id": 49, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "NewExpression", "src": "269:5:0", "typeDescriptions": {"typeIdentifier": "t_function_creation_nonpayable$_t_uint256_$returns$_t_contract$_D_$227_$", "typeString": "function (uint256) returns (contract D)"}, "typeName": {"contractScope": null, "id": 48, "name": "D", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 227, "src": "273:1:0", "typeDescriptions": {"typeIdentifier": "t_contract$_D_$227", "typeString": "contract D"}}}, "id": 51, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "269:11:0", "typeDescriptions": {"typeIdentifier": "t_contract$_D_$227", "typeString": "contract D"}}, "src": "265:15:0", "typeDescriptions": {"typeIdentifier": "t_contract$_D_$227", "typeString": "contract D"}}, "id": 53, "nodeType": "ExpressionStatement", "src": "265:15:0"}]}, "documentation": null, "id": 55, "implemented": true, "kind": "constructor", "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "parameters": {"id": 20, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 17, "name": "yval", "nodeType": "VariableDeclaration", "scope": 55, "src": "147:12:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 16, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "147:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "value": null, "visibility": "internal"}, {"constant": false, "id": 19, "name": "zval", "nodeType": "VariableDeclaration", "scope": 55, "src": "161:12:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 18, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "161:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "value": null, "visibility": "internal"}], "src": "146:28:0"}, "returnParameters": {"id": 21, "nodeType": "ParameterList", "parameters": [], "src": "182:0:0"}, "scope": 96, "src": "135:150:0", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public"}, {"body": {"id": 78, "nodeType": "Block", "src": "334:49:0", "statements": [{"expression": {"argumentTypes": null, "commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 76, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"argumentTypes": null, "commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 72, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"argumentTypes": null, "commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 68, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"argumentTypes": null, "commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 64, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"argumentTypes": null, "commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 62, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"argumentTypes": null, "id": 60, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5, "src": "347:1:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"argumentTypes": null, "id": 61, "name": "y", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7, "src": "349:1:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "347:3:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"argumentTypes": null, "id": 63, "name": "z", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9, "src": "351:1:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "347:5:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"argumentTypes": null, "arguments": [], "expression": {"argumentTypes": [], "expression": {"argumentTypes": null, "id": 65, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 11, "src": "353:1:0", "typeDescriptions": {"typeIdentifier": "t_contract$_B_$149", "typeString": "contract B"}}, "id": 66, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "diff", "nodeType": "MemberAccess", "referencedDeclaration": 148, "src": "353:6:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", "typeString": "function () view external returns (uint256)"}}, "id": 67, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "353:8:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "347:14:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"argumentTypes": null, "arguments": [], "expression": {"argumentTypes": [], "expression": {"argumentTypes": null, "id": 69, "name": "c", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 13, "src": "362:1:0", "typeDescriptions": {"typeIdentifier": "t_contract$_C_$189", "typeString": "contract C"}}, "id": 70, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sum", "nodeType": "MemberAccess", "referencedDeclaration": 178, "src": "362:5:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", "typeString": "function () view external returns (uint256)"}}, "id": 71, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "362:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "347:22:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"argumentTypes": null, "arguments": [], "expression": {"argumentTypes": [], "expression": {"argumentTypes": null, "id": 73, "name": "d", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 15, "src": "370:1:0", "typeDescriptions": {"typeIdentifier": "t_contract$_D_$227", "typeString": "contract D"}}, "id": 74, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "diff", "nodeType": "MemberAccess", "referencedDeclaration": 226, "src": "370:6:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", "typeString": "function () view external returns (uint256)"}}, "id": 75, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "370:8:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "347:31:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "functionReturnParameters": 59, "id": 77, "nodeType": "Return", "src": "340:38:0"}]}, "documentation": null, "id": 79, "implemented": true, "kind": "function", "modifiers": [], "name": "sum", "nodeType": "FunctionDefinition", "parameters": {"id": 56, "nodeType": "ParameterList", "parameters": [], "src": "301:2:0"}, "returnParameters": {"id": 59, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 58, "name": "", "nodeType": "VariableDeclaration", "scope": 79, "src": "325:7:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 57, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "325:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "value": null, "visibility": "internal"}], "src": "324:9:0"}, "scope": 96, "src": "289:94:0", "stateMutability": "view", "superFunction": null, "visibility": "public"}, {"body": {"id": 94, "nodeType": "Block", "src": "421:37:0", "statements": [{"expression": {"argumentTypes": null, "id": 86, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"argumentTypes": null, "id": 84, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5, "src": "427:1:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"argumentTypes": null, "id": 85, "name": "xval", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 81, "src": "431:4:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "427:8:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 87, "nodeType": "ExpressionStatement", "src": "427:8:0"}, {"expression": {"argumentTypes": null, "arguments": [{"argumentTypes": null, "id": 91, "name": "xval", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 81, "src": "448:4:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}], "expression": {"argumentTypes": null, "id": 88, "name": "c", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 13, "src": "441:1:0", "typeDescriptions": {"typeIdentifier": "t_contract$_C_$189", "typeString": "contract C"}}, "id": 90, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "setX", "nodeType": "MemberAccess", "referencedDeclaration": 188, "src": "441:6:0", "typeDescriptions": {"typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$", "typeString": "function (uint256) external"}}, "id": 92, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "441:12:0", "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 93, "nodeType": "ExpressionStatement", "src": "441:12:0"}]}, "documentation": null, "id": 95, "implemented": true, "kind": "function", "modifiers": [], "name": "set", "nodeType": "FunctionDefinition", "parameters": {"id": 82, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 81, "name": "xval", "nodeType": "VariableDeclaration", "scope": 95, "src": "400:12:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 80, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "400:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "value": null, "visibility": "internal"}], "src": "399:14:0"}, "returnParameters": {"id": 83, "nodeType": "ParameterList", "parameters": [], "src": "421:0:0"}, "scope": 96, "src": "387:71:0", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public"}], "scope": 150, "src": "59:401:0"}, {"baseContracts": [], "contractDependencies": [285, 343], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "id": 149, "linearizedBaseContracts": [149], "name": "B", "nodeType": "ContractDefinition", "nodes": [{"constant": false, "id": 98, "name": "x", "nodeType": "VariableDeclaration", "scope": 149, "src": "477:9:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 97, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "477:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "value": null, "visibility": "internal"}, {"constant": false, "id": 100, "name": "y", "nodeType": "VariableDeclaration", "scope": 149, "src": "490:9:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 99, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "490:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "value": null, "visibility": "internal"}, {"constant": false, "id": 102, "name": "g", "nodeType": "VariableDeclaration", "scope": 149, "src": "503:3:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_contract$_G_$285", "typeString": "contract G"}, "typeName": {"contractScope": null, "id": 101, "name": "G", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 285, "src": "503:1:0", "typeDescriptions": {"typeIdentifier": "t_contract$_G_$285", "typeString": "contract G"}}, "value": null, "visibility": "internal"}, {"constant": false, "id": 104, "name": "k", "nodeType": "VariableDeclaration", "scope": 149, "src": "510:3:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_contract$_K_$343", "typeString": "contract K"}, "typeName": {"contractScope": null, "id": 103, "name": "K", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 343, "src": "510:1:0", "typeDescriptions": {"typeIdentifier": "t_contract$_K_$343", "typeString": "contract K"}}, "value": null, "visibility": "internal"}, {"body": {"id": 133, "nodeType": "Block", "src": "539:67:0", "statements": [{"expression": {"argumentTypes": null, "id": 109, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"argumentTypes": null, "id": 107, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 98, "src": "545:1:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"argumentTypes": null, "hexValue": "30", "id": 108, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "549:1:0", "subdenomination": null, "typeDescriptions": {"typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0"}, "value": "0"}, "src": "545:5:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 110, "nodeType": "ExpressionStatement", "src": "545:5:0"}, {"expression": {"argumentTypes": null, "id": 113, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"argumentTypes": null, "id": 111, "name": "y", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 100, "src": "556:1:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"argumentTypes": null, "hexValue": "36", "id": 112, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "560:1:0", "subdenomination": null, "typeDescriptions": {"typeIdentifier": "t_rational_6_by_1", "typeString": "int_const 6"}, "value": "6"}, "src": "556:5:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 114, "nodeType": "ExpressionStatement", "src": "556:5:0"}, {"expression": {"argumentTypes": null, "id": 122, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"argumentTypes": null, "id": 115, "name": "g", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 102, "src": "567:1:0", "typeDescriptions": {"typeIdentifier": "t_contract$_G_$285", "typeString": "contract G"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"argumentTypes": null, "arguments": [{"argumentTypes": null, "commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 120, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"argumentTypes": null, "id": 118, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 98, "src": "577:1:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"argumentTypes": null, "hexValue": "31", "id": 119, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "579:1:0", "subdenomination": null, "typeDescriptions": {"typeIdentifier": "t_rational_1_by_1", "typeString": "int_const 1"}, "value": "1"}, "src": "577:3:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}], "id": 117, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "NewExpression", "src": "571:5:0", "typeDescriptions": {"typeIdentifier": "t_function_creation_nonpayable$_t_uint256_$returns$_t_contract$_G_$285_$", "typeString": "function (uint256) returns (contract G)"}, "typeName": {"contractScope": null, "id": 116, "name": "G", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 285, "src": "575:1:0", "typeDescriptions": {"typeIdentifier": "t_contract$_G_$285", "typeString": "contract G"}}}, "id": 121, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "571:10:0", "typeDescriptions": {"typeIdentifier": "t_contract$_G_$285", "typeString": "contract G"}}, "src": "567:14:0", "typeDescriptions": {"typeIdentifier": "t_contract$_G_$285", "typeString": "contract G"}}, "id": 123, "nodeType": "ExpressionStatement", "src": "567:14:0"}, {"expression": {"argumentTypes": null, "id": 131, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"argumentTypes": null, "id": 124, "name": "k", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 104, "src": "587:1:0", "typeDescriptions": {"typeIdentifier": "t_contract$_K_$343", "typeString": "contract K"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"argumentTypes": null, "arguments": [{"argumentTypes": null, "commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 129, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"argumentTypes": null, "id": 127, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 98, "src": "597:1:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"argumentTypes": null, "hexValue": "32", "id": 128, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "599:1:0", "subdenomination": null, "typeDescriptions": {"typeIdentifier": "t_rational_2_by_1", "typeString": "int_const 2"}, "value": "2"}, "src": "597:3:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}], "id": 126, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "NewExpression", "src": "591:5:0", "typeDescriptions": {"typeIdentifier": "t_function_creation_nonpayable$_t_uint256_$returns$_t_contract$_K_$343_$", "typeString": "function (uint256) returns (contract K)"}, "typeName": {"contractScope": null, "id": 125, "name": "K", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 343, "src": "595:1:0", "typeDescriptions": {"typeIdentifier": "t_contract$_K_$343", "typeString": "contract K"}}}, "id": 130, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "591:10:0", "typeDescriptions": {"typeIdentifier": "t_contract$_K_$343", "typeString": "contract K"}}, "src": "587:14:0", "typeDescriptions": {"typeIdentifier": "t_contract$_K_$343", "typeString": "contract K"}}, "id": 132, "nodeType": "ExpressionStatement", "src": "587:14:0"}]}, "documentation": null, "id": 134, "implemented": true, "kind": "constructor", "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "parameters": {"id": 105, "nodeType": "ParameterList", "parameters": [], "src": "529:2:0"}, "returnParameters": {"id": 106, "nodeType": "ParameterList", "parameters": [], "src": "539:0:0"}, "scope": 149, "src": "518:88:0", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public"}, {"body": {"id": 147, "nodeType": "Block", "src": "656:29:0", "statements": [{"expression": {"argumentTypes": null, "commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 145, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"argumentTypes": null, "commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 141, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"argumentTypes": null, "id": 139, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 98, "src": "669:1:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "-", "rightExpression": {"argumentTypes": null, "id": 140, "name": "y", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 100, "src": "671:1:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "669:3:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"argumentTypes": null, "arguments": [], "expression": {"argumentTypes": [], "expression": {"argumentTypes": null, "id": 142, "name": "g", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 102, "src": "673:1:0", "typeDescriptions": {"typeIdentifier": "t_contract$_G_$285", "typeString": "contract G"}}, "id": 143, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sum", "nodeType": "MemberAccess", "referencedDeclaration": 266, "src": "673:5:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", "typeString": "function () view external returns (uint256)"}}, "id": 144, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "673:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "669:11:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "functionReturnParameters": 138, "id": 146, "nodeType": "Return", "src": "662:18:0"}]}, "documentation": null, "id": 148, "implemented": true, "kind": "function", "modifiers": [], "name": "diff", "nodeType": "FunctionDefinition", "parameters": {"id": 135, "nodeType": "ParameterList", "parameters": [], "src": "623:2:0"}, "returnParameters": {"id": 138, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 137, "name": "", "nodeType": "VariableDeclaration", "scope": 148, "src": "647:7:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 136, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "647:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "value": null, "visibility": "internal"}], "src": "646:9:0"}, "scope": 149, "src": "610:75:0", "stateMutability": "view", "superFunction": null, "visibility": "public"}], "scope": 150, "src": "462:225:0"}], "src": "0:688:0"}, "userdoc": {"methods": {}, "notice": null}, "devdoc": {"methods": {}, "author": null, "details": null, "title": null}} \ No newline at end of file diff --git a/tests/expected/solc-multi-file/B.json b/tests/expected/solc-multi-file/B.json new file mode 100644 index 00000000..16de1887 --- /dev/null +++ b/tests/expected/solc-multi-file/B.json @@ -0,0 +1 @@ +{"contractName": "B", "abi": [{"constant": true, "inputs": [], "name": "diff", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"inputs": [], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}], "bytecode": "0x608060405234801561001057600080fd5b5060008081905550600660018190555060016000540160405161003290610117565b80828152602001915050604051809103906000f080158015610058573d6000803e3d6000fd5b50600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506002600054016040516100ab90610124565b80828152602001915050604051809103906000f0801580156100d1573d6000803e3d6000fd5b50600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610131565b6107b98061026483390190565b610e4c80610a1d83390190565b610124806101406000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c8063a0d7afb714602d575b600080fd5b60336049565b6040518082815260200191505060405180910390f35b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663853255cc6040518163ffffffff1660e01b815260040160206040518083038186803b15801560b257600080fd5b505afa15801560c5573d6000803e3d6000fd5b505050506040513d602081101560da57600080fd5b8101908080519060200190929190505050600154600054030190509056fe608060405234801561001057600080fd5b506040516020806107b98339810180604052602081101561003057600080fd5b81019080805190602001909291905050506000808190555080600181905550600560405161005d906100ca565b80828152602001915050604051809103906000f080158015610083573d6000803e3d6000fd5b50600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506100d7565b6104dc806102dd83390190565b6101f7806100e66000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80634018d9aa1461003b578063853255cc14610069575b600080fd5b6100676004803603602081101561005157600080fd5b8101908080359060200190929190505050610087565b005b610071610121565b6040518082815260200191505060405180910390f35b80600081905550600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16634018d9aa600183016040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561010657600080fd5b505af115801561011a573d6000803e3d6000fd5b5050505050565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663853255cc6040518163ffffffff1660e01b815260040160206040518083038186803b15801561018b57600080fd5b505afa15801561019f573d6000803e3d6000fd5b505050506040513d60208110156101b557600080fd5b810190808051906020019092919050505090509056fea165627a7a7230582039825452eab93d3c5b16b79164fd7a381736d1ceffa82396a7283671fbbce3fd0029608060405234801561001057600080fd5b506040516020806104dc8339810180604052602081101561003057600080fd5b810190808051906020019092919050505060008081905550806001819055508060405161005c906100c9565b80828152602001915050604051809103906000f080158015610082573d6000803e3d6000fd5b50600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506100d6565b6102888061025483390190565b61016f806100e56000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80634018d9aa1461003b578063853255cc14610069575b600080fd5b6100676004803603602081101561005157600080fd5b8101908080359060200190929190505050610087565b005b610071610091565b6040518082815260200191505060405180910390f35b8060008190555050565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a0d7afb76040518163ffffffff1660e01b815260040160206040518083038186803b1580156100fb57600080fd5b505afa15801561010f573d6000803e3d6000fd5b505050506040513d602081101561012557600080fd5b8101908080519060200190929190505050600154600054010190509056fea165627a7a72305820be7d0c032ba61d5a5dd35ec573ea745ab2b7cf97722aacffe6cf563be5bf9f380029608060405234801561001057600080fd5b506040516020806102888339810180604052602081101561003057600080fd5b81019080805190602001909291905050506000808190555080600181905550600560405161005d906100ca565b80828152602001915050604051809103906000f080158015610083573d6000803e3d6000fd5b50600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506100d7565b6101208061016883390190565b6083806100e56000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c8063a0d7afb714602d575b600080fd5b60336049565b6040518082815260200191505060405180910390f35b60006001546000540390509056fea165627a7a723058201afddf157b08e7ca10fd3ec23be46d8d79937e3de04d99fd76dda13572ccb03f0029608060405234801561001057600080fd5b506040516020806101208339810180604052602081101561003057600080fd5b810190808051906020019092919050505060008081905550806001819055505060c28061005e6000396000f3fe6080604052348015600f57600080fd5b506004361060325760003560e01c80634018d9aa146037578063853255cc146062575b600080fd5b606060048036036020811015604b57600080fd5b8101908080359060200190929190505050607e565b005b60686088565b6040518082815260200191505060405180910390f35b8060008190555050565b60006001546000540190509056fea165627a7a72305820f5a2f94ed487768cbf61442383f5f1a6be2e888f4838bbdca8d853b0c1a288190029608060405234801561001057600080fd5b50604051602080610e4c8339810180604052602081101561003057600080fd5b81019080805190602001909291905050506000808190555080600181905550600560405161005d906100ca565b80828152602001915050604051809103906000f080158015610083573d6000803e3d6000fd5b50600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506100d7565b610b6f806102dd83390190565b6101f7806100e66000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80634018d9aa1461003b578063853255cc14610069575b600080fd5b6100676004803603602081101561005157600080fd5b8101908080359060200190929190505050610087565b005b610071610121565b6040518082815260200191505060405180910390f35b80600081905550600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16634018d9aa600183016040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561010657600080fd5b505af115801561011a573d6000803e3d6000fd5b5050505050565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663853255cc6040518163ffffffff1660e01b815260040160206040518083038186803b15801561018b57600080fd5b505afa15801561019f573d6000803e3d6000fd5b505050506040513d60208110156101b557600080fd5b810190808051906020019092919050505090509056fea165627a7a723058203d806347ce0702d67afd020697fa0eb2d47d028951df6bd065f211bdb73814800029608060405234801561001057600080fd5b50604051602080610b6f8339810180604052602081101561003057600080fd5b810190808051906020019092919050505060008081905550806001819055508060405161005c90610140565b80828152602001915050604051809103906000f080158015610082573d6000803e3d6000fd5b50600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600181016040516100d39061014d565b80828152602001915050604051809103906000f0801580156100f9573d6000803e3d6000fd5b50600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505061015a565b6102888061040b83390190565b6104dc8061069383390190565b6102a2806101696000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80634018d9aa1461003b578063853255cc14610069575b600080fd5b6100676004803603602081101561005157600080fd5b8101908080359060200190929190505050610087565b005b610071610120565b6040518082815260200191505060405180910390f35b80600081905550600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16634018d9aa6001546040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561010557600080fd5b505af1158015610119573d6000803e3d6000fd5b5050505050565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663853255cc6040518163ffffffff1660e01b815260040160206040518083038186803b15801561018a57600080fd5b505afa15801561019e573d6000803e3d6000fd5b505050506040513d60208110156101b457600080fd5b8101908080519060200190929190505050600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a0d7afb76040518163ffffffff1660e01b815260040160206040518083038186803b15801561022d57600080fd5b505afa158015610241573d6000803e3d6000fd5b505050506040513d602081101561025757600080fd5b810190808051906020019092919050505060015460005401010190509056fea165627a7a7230582011f7c89b5d0495c839a814fc0fecd6058720cf5f06c8078db6137f0b6f75bdc70029608060405234801561001057600080fd5b506040516020806102888339810180604052602081101561003057600080fd5b81019080805190602001909291905050506000808190555080600181905550600560405161005d906100ca565b80828152602001915050604051809103906000f080158015610083573d6000803e3d6000fd5b50600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506100d7565b6101208061016883390190565b6083806100e56000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c8063a0d7afb714602d575b600080fd5b60336049565b6040518082815260200191505060405180910390f35b60006001546000540390509056fea165627a7a723058201afddf157b08e7ca10fd3ec23be46d8d79937e3de04d99fd76dda13572ccb03f0029608060405234801561001057600080fd5b506040516020806101208339810180604052602081101561003057600080fd5b810190808051906020019092919050505060008081905550806001819055505060c28061005e6000396000f3fe6080604052348015600f57600080fd5b506004361060325760003560e01c80634018d9aa146037578063853255cc146062575b600080fd5b606060048036036020811015604b57600080fd5b8101908080359060200190929190505050607e565b005b60686088565b6040518082815260200191505060405180910390f35b8060008190555050565b60006001546000540190509056fea165627a7a72305820f5a2f94ed487768cbf61442383f5f1a6be2e888f4838bbdca8d853b0c1a288190029608060405234801561001057600080fd5b506040516020806104dc8339810180604052602081101561003057600080fd5b810190808051906020019092919050505060008081905550806001819055508060405161005c906100c9565b80828152602001915050604051809103906000f080158015610082573d6000803e3d6000fd5b50600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506100d6565b6102888061025483390190565b61016f806100e56000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80634018d9aa1461003b578063853255cc14610069575b600080fd5b6100676004803603602081101561005157600080fd5b8101908080359060200190929190505050610087565b005b610071610091565b6040518082815260200191505060405180910390f35b8060008190555050565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a0d7afb76040518163ffffffff1660e01b815260040160206040518083038186803b1580156100fb57600080fd5b505afa15801561010f573d6000803e3d6000fd5b505050506040513d602081101561012557600080fd5b8101908080519060200190929190505050600154600054010190509056fea165627a7a72305820be7d0c032ba61d5a5dd35ec573ea745ab2b7cf97722aacffe6cf563be5bf9f380029608060405234801561001057600080fd5b506040516020806102888339810180604052602081101561003057600080fd5b81019080805190602001909291905050506000808190555080600181905550600560405161005d906100ca565b80828152602001915050604051809103906000f080158015610083573d6000803e3d6000fd5b50600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506100d7565b6101208061016883390190565b6083806100e56000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c8063a0d7afb714602d575b600080fd5b60336049565b6040518082815260200191505060405180910390f35b60006001546000540390509056fea165627a7a723058201afddf157b08e7ca10fd3ec23be46d8d79937e3de04d99fd76dda13572ccb03f0029608060405234801561001057600080fd5b506040516020806101208339810180604052602081101561003057600080fd5b810190808051906020019092919050505060008081905550806001819055505060c28061005e6000396000f3fe6080604052348015600f57600080fd5b506004361060325760003560e01c80634018d9aa146037578063853255cc146062575b600080fd5b606060048036036020811015604b57600080fd5b8101908080359060200190929190505050607e565b005b60686088565b6040518082815260200191505060405180910390f35b8060008190555050565b60006001546000540190509056fea165627a7a72305820f5a2f94ed487768cbf61442383f5f1a6be2e888f4838bbdca8d853b0c1a288190029", "deployedBytecode": "0x6080604052348015600f57600080fd5b506004361060285760003560e01c8063a0d7afb714602d575b600080fd5b60336049565b6040518082815260200191505060405180910390f35b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663853255cc6040518163ffffffff1660e01b815260040160206040518083038186803b15801560b257600080fd5b505afa15801560c5573d6000803e3d6000fd5b505050506040513d602081101560da57600080fd5b8101908080519060200190929190505050600154600054030190509056fe", "ast": {"absolutePath": "./A.sol", "exportedSymbols": {"A": [96], "B": [149]}, "id": 150, "nodeType": "SourceUnit", "nodes": [{"absolutePath": "./C.sol", "file": "./C.sol", "id": 1, "nodeType": "ImportDirective", "scope": 150, "sourceUnit": 228, "src": "0:17:0", "symbolAliases": [], "unitAlias": ""}, {"absolutePath": "./E/G.sol", "file": "./E/G.sol", "id": 2, "nodeType": "ImportDirective", "scope": 150, "sourceUnit": 286, "src": "18:19:0", "symbolAliases": [], "unitAlias": ""}, {"absolutePath": "./I/K.sol", "file": "./I/K.sol", "id": 3, "nodeType": "ImportDirective", "scope": 150, "sourceUnit": 344, "src": "38:19:0", "symbolAliases": [], "unitAlias": ""}, {"baseContracts": [], "contractDependencies": [149, 189, 227], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "id": 96, "linearizedBaseContracts": [96], "name": "A", "nodeType": "ContractDefinition", "nodes": [{"constant": false, "id": 5, "name": "x", "nodeType": "VariableDeclaration", "scope": 96, "src": "74:9:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 4, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "74:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "value": null, "visibility": "internal"}, {"constant": false, "id": 7, "name": "y", "nodeType": "VariableDeclaration", "scope": 96, "src": "87:9:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 6, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "87:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "value": null, "visibility": "internal"}, {"constant": false, "id": 9, "name": "z", "nodeType": "VariableDeclaration", "scope": 96, "src": "100:9:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 8, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "100:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "value": null, "visibility": "internal"}, {"constant": false, "id": 11, "name": "b", "nodeType": "VariableDeclaration", "scope": 96, "src": "113:3:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_contract$_B_$149", "typeString": "contract B"}, "typeName": {"contractScope": null, "id": 10, "name": "B", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 149, "src": "113:1:0", "typeDescriptions": {"typeIdentifier": "t_contract$_B_$149", "typeString": "contract B"}}, "value": null, "visibility": "internal"}, {"constant": false, "id": 13, "name": "c", "nodeType": "VariableDeclaration", "scope": 96, "src": "120:3:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_contract$_C_$189", "typeString": "contract C"}, "typeName": {"contractScope": null, "id": 12, "name": "C", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 189, "src": "120:1:0", "typeDescriptions": {"typeIdentifier": "t_contract$_C_$189", "typeString": "contract C"}}, "value": null, "visibility": "internal"}, {"constant": false, "id": 15, "name": "d", "nodeType": "VariableDeclaration", "scope": 96, "src": "127:3:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_contract$_D_$227", "typeString": "contract D"}, "typeName": {"contractScope": null, "id": 14, "name": "D", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 227, "src": "127:1:0", "typeDescriptions": {"typeIdentifier": "t_contract$_D_$227", "typeString": "contract D"}}, "value": null, "visibility": "internal"}, {"body": {"id": 54, "nodeType": "Block", "src": "182:103:0", "statements": [{"expression": {"argumentTypes": null, "id": 24, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"argumentTypes": null, "id": 22, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5, "src": "188:1:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"argumentTypes": null, "hexValue": "30", "id": 23, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "192:1:0", "subdenomination": null, "typeDescriptions": {"typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0"}, "value": "0"}, "src": "188:5:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 25, "nodeType": "ExpressionStatement", "src": "188:5:0"}, {"expression": {"argumentTypes": null, "id": 28, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"argumentTypes": null, "id": 26, "name": "y", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7, "src": "199:1:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"argumentTypes": null, "id": 27, "name": "yval", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 17, "src": "203:4:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "199:8:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 29, "nodeType": "ExpressionStatement", "src": "199:8:0"}, {"expression": {"argumentTypes": null, "id": 32, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"argumentTypes": null, "id": 30, "name": "z", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9, "src": "213:1:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"argumentTypes": null, "id": 31, "name": "zval", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 19, "src": "217:4:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "213:8:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 33, "nodeType": "ExpressionStatement", "src": "213:8:0"}, {"expression": {"argumentTypes": null, "id": 38, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"argumentTypes": null, "id": 34, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 11, "src": "227:1:0", "typeDescriptions": {"typeIdentifier": "t_contract$_B_$149", "typeString": "contract B"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"argumentTypes": null, "arguments": [], "expression": {"argumentTypes": [], "id": 36, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "NewExpression", "src": "231:5:0", "typeDescriptions": {"typeIdentifier": "t_function_creation_nonpayable$__$returns$_t_contract$_B_$149_$", "typeString": "function () returns (contract B)"}, "typeName": {"contractScope": null, "id": 35, "name": "B", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 149, "src": "235:1:0", "typeDescriptions": {"typeIdentifier": "t_contract$_B_$149", "typeString": "contract B"}}}, "id": 37, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "231:7:0", "typeDescriptions": {"typeIdentifier": "t_contract$_B_$149", "typeString": "contract B"}}, "src": "227:11:0", "typeDescriptions": {"typeIdentifier": "t_contract$_B_$149", "typeString": "contract B"}}, "id": 39, "nodeType": "ExpressionStatement", "src": "227:11:0"}, {"expression": {"argumentTypes": null, "id": 45, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"argumentTypes": null, "id": 40, "name": "c", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 13, "src": "244:1:0", "typeDescriptions": {"typeIdentifier": "t_contract$_C_$189", "typeString": "contract C"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"argumentTypes": null, "arguments": [{"argumentTypes": null, "id": 43, "name": "zval", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 19, "src": "254:4:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}], "id": 42, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "NewExpression", "src": "248:5:0", "typeDescriptions": {"typeIdentifier": "t_function_creation_nonpayable$_t_uint256_$returns$_t_contract$_C_$189_$", "typeString": "function (uint256) returns (contract C)"}, "typeName": {"contractScope": null, "id": 41, "name": "C", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 189, "src": "252:1:0", "typeDescriptions": {"typeIdentifier": "t_contract$_C_$189", "typeString": "contract C"}}}, "id": 44, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "248:11:0", "typeDescriptions": {"typeIdentifier": "t_contract$_C_$189", "typeString": "contract C"}}, "src": "244:15:0", "typeDescriptions": {"typeIdentifier": "t_contract$_C_$189", "typeString": "contract C"}}, "id": 46, "nodeType": "ExpressionStatement", "src": "244:15:0"}, {"expression": {"argumentTypes": null, "id": 52, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"argumentTypes": null, "id": 47, "name": "d", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 15, "src": "265:1:0", "typeDescriptions": {"typeIdentifier": "t_contract$_D_$227", "typeString": "contract D"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"argumentTypes": null, "arguments": [{"argumentTypes": null, "id": 50, "name": "zval", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 19, "src": "275:4:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}], "id": 49, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "NewExpression", "src": "269:5:0", "typeDescriptions": {"typeIdentifier": "t_function_creation_nonpayable$_t_uint256_$returns$_t_contract$_D_$227_$", "typeString": "function (uint256) returns (contract D)"}, "typeName": {"contractScope": null, "id": 48, "name": "D", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 227, "src": "273:1:0", "typeDescriptions": {"typeIdentifier": "t_contract$_D_$227", "typeString": "contract D"}}}, "id": 51, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "269:11:0", "typeDescriptions": {"typeIdentifier": "t_contract$_D_$227", "typeString": "contract D"}}, "src": "265:15:0", "typeDescriptions": {"typeIdentifier": "t_contract$_D_$227", "typeString": "contract D"}}, "id": 53, "nodeType": "ExpressionStatement", "src": "265:15:0"}]}, "documentation": null, "id": 55, "implemented": true, "kind": "constructor", "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "parameters": {"id": 20, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 17, "name": "yval", "nodeType": "VariableDeclaration", "scope": 55, "src": "147:12:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 16, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "147:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "value": null, "visibility": "internal"}, {"constant": false, "id": 19, "name": "zval", "nodeType": "VariableDeclaration", "scope": 55, "src": "161:12:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 18, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "161:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "value": null, "visibility": "internal"}], "src": "146:28:0"}, "returnParameters": {"id": 21, "nodeType": "ParameterList", "parameters": [], "src": "182:0:0"}, "scope": 96, "src": "135:150:0", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public"}, {"body": {"id": 78, "nodeType": "Block", "src": "334:49:0", "statements": [{"expression": {"argumentTypes": null, "commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 76, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"argumentTypes": null, "commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 72, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"argumentTypes": null, "commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 68, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"argumentTypes": null, "commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 64, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"argumentTypes": null, "commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 62, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"argumentTypes": null, "id": 60, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5, "src": "347:1:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"argumentTypes": null, "id": 61, "name": "y", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7, "src": "349:1:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "347:3:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"argumentTypes": null, "id": 63, "name": "z", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9, "src": "351:1:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "347:5:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"argumentTypes": null, "arguments": [], "expression": {"argumentTypes": [], "expression": {"argumentTypes": null, "id": 65, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 11, "src": "353:1:0", "typeDescriptions": {"typeIdentifier": "t_contract$_B_$149", "typeString": "contract B"}}, "id": 66, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "diff", "nodeType": "MemberAccess", "referencedDeclaration": 148, "src": "353:6:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", "typeString": "function () view external returns (uint256)"}}, "id": 67, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "353:8:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "347:14:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"argumentTypes": null, "arguments": [], "expression": {"argumentTypes": [], "expression": {"argumentTypes": null, "id": 69, "name": "c", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 13, "src": "362:1:0", "typeDescriptions": {"typeIdentifier": "t_contract$_C_$189", "typeString": "contract C"}}, "id": 70, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sum", "nodeType": "MemberAccess", "referencedDeclaration": 178, "src": "362:5:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", "typeString": "function () view external returns (uint256)"}}, "id": 71, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "362:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "347:22:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"argumentTypes": null, "arguments": [], "expression": {"argumentTypes": [], "expression": {"argumentTypes": null, "id": 73, "name": "d", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 15, "src": "370:1:0", "typeDescriptions": {"typeIdentifier": "t_contract$_D_$227", "typeString": "contract D"}}, "id": 74, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "diff", "nodeType": "MemberAccess", "referencedDeclaration": 226, "src": "370:6:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", "typeString": "function () view external returns (uint256)"}}, "id": 75, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "370:8:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "347:31:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "functionReturnParameters": 59, "id": 77, "nodeType": "Return", "src": "340:38:0"}]}, "documentation": null, "id": 79, "implemented": true, "kind": "function", "modifiers": [], "name": "sum", "nodeType": "FunctionDefinition", "parameters": {"id": 56, "nodeType": "ParameterList", "parameters": [], "src": "301:2:0"}, "returnParameters": {"id": 59, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 58, "name": "", "nodeType": "VariableDeclaration", "scope": 79, "src": "325:7:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 57, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "325:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "value": null, "visibility": "internal"}], "src": "324:9:0"}, "scope": 96, "src": "289:94:0", "stateMutability": "view", "superFunction": null, "visibility": "public"}, {"body": {"id": 94, "nodeType": "Block", "src": "421:37:0", "statements": [{"expression": {"argumentTypes": null, "id": 86, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"argumentTypes": null, "id": 84, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5, "src": "427:1:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"argumentTypes": null, "id": 85, "name": "xval", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 81, "src": "431:4:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "427:8:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 87, "nodeType": "ExpressionStatement", "src": "427:8:0"}, {"expression": {"argumentTypes": null, "arguments": [{"argumentTypes": null, "id": 91, "name": "xval", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 81, "src": "448:4:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}], "expression": {"argumentTypes": null, "id": 88, "name": "c", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 13, "src": "441:1:0", "typeDescriptions": {"typeIdentifier": "t_contract$_C_$189", "typeString": "contract C"}}, "id": 90, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "setX", "nodeType": "MemberAccess", "referencedDeclaration": 188, "src": "441:6:0", "typeDescriptions": {"typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$", "typeString": "function (uint256) external"}}, "id": 92, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "441:12:0", "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 93, "nodeType": "ExpressionStatement", "src": "441:12:0"}]}, "documentation": null, "id": 95, "implemented": true, "kind": "function", "modifiers": [], "name": "set", "nodeType": "FunctionDefinition", "parameters": {"id": 82, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 81, "name": "xval", "nodeType": "VariableDeclaration", "scope": 95, "src": "400:12:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 80, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "400:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "value": null, "visibility": "internal"}], "src": "399:14:0"}, "returnParameters": {"id": 83, "nodeType": "ParameterList", "parameters": [], "src": "421:0:0"}, "scope": 96, "src": "387:71:0", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public"}], "scope": 150, "src": "59:401:0"}, {"baseContracts": [], "contractDependencies": [285, 343], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "id": 149, "linearizedBaseContracts": [149], "name": "B", "nodeType": "ContractDefinition", "nodes": [{"constant": false, "id": 98, "name": "x", "nodeType": "VariableDeclaration", "scope": 149, "src": "477:9:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 97, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "477:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "value": null, "visibility": "internal"}, {"constant": false, "id": 100, "name": "y", "nodeType": "VariableDeclaration", "scope": 149, "src": "490:9:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 99, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "490:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "value": null, "visibility": "internal"}, {"constant": false, "id": 102, "name": "g", "nodeType": "VariableDeclaration", "scope": 149, "src": "503:3:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_contract$_G_$285", "typeString": "contract G"}, "typeName": {"contractScope": null, "id": 101, "name": "G", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 285, "src": "503:1:0", "typeDescriptions": {"typeIdentifier": "t_contract$_G_$285", "typeString": "contract G"}}, "value": null, "visibility": "internal"}, {"constant": false, "id": 104, "name": "k", "nodeType": "VariableDeclaration", "scope": 149, "src": "510:3:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_contract$_K_$343", "typeString": "contract K"}, "typeName": {"contractScope": null, "id": 103, "name": "K", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 343, "src": "510:1:0", "typeDescriptions": {"typeIdentifier": "t_contract$_K_$343", "typeString": "contract K"}}, "value": null, "visibility": "internal"}, {"body": {"id": 133, "nodeType": "Block", "src": "539:67:0", "statements": [{"expression": {"argumentTypes": null, "id": 109, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"argumentTypes": null, "id": 107, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 98, "src": "545:1:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"argumentTypes": null, "hexValue": "30", "id": 108, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "549:1:0", "subdenomination": null, "typeDescriptions": {"typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0"}, "value": "0"}, "src": "545:5:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 110, "nodeType": "ExpressionStatement", "src": "545:5:0"}, {"expression": {"argumentTypes": null, "id": 113, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"argumentTypes": null, "id": 111, "name": "y", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 100, "src": "556:1:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"argumentTypes": null, "hexValue": "36", "id": 112, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "560:1:0", "subdenomination": null, "typeDescriptions": {"typeIdentifier": "t_rational_6_by_1", "typeString": "int_const 6"}, "value": "6"}, "src": "556:5:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 114, "nodeType": "ExpressionStatement", "src": "556:5:0"}, {"expression": {"argumentTypes": null, "id": 122, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"argumentTypes": null, "id": 115, "name": "g", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 102, "src": "567:1:0", "typeDescriptions": {"typeIdentifier": "t_contract$_G_$285", "typeString": "contract G"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"argumentTypes": null, "arguments": [{"argumentTypes": null, "commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 120, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"argumentTypes": null, "id": 118, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 98, "src": "577:1:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"argumentTypes": null, "hexValue": "31", "id": 119, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "579:1:0", "subdenomination": null, "typeDescriptions": {"typeIdentifier": "t_rational_1_by_1", "typeString": "int_const 1"}, "value": "1"}, "src": "577:3:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}], "id": 117, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "NewExpression", "src": "571:5:0", "typeDescriptions": {"typeIdentifier": "t_function_creation_nonpayable$_t_uint256_$returns$_t_contract$_G_$285_$", "typeString": "function (uint256) returns (contract G)"}, "typeName": {"contractScope": null, "id": 116, "name": "G", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 285, "src": "575:1:0", "typeDescriptions": {"typeIdentifier": "t_contract$_G_$285", "typeString": "contract G"}}}, "id": 121, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "571:10:0", "typeDescriptions": {"typeIdentifier": "t_contract$_G_$285", "typeString": "contract G"}}, "src": "567:14:0", "typeDescriptions": {"typeIdentifier": "t_contract$_G_$285", "typeString": "contract G"}}, "id": 123, "nodeType": "ExpressionStatement", "src": "567:14:0"}, {"expression": {"argumentTypes": null, "id": 131, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"argumentTypes": null, "id": 124, "name": "k", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 104, "src": "587:1:0", "typeDescriptions": {"typeIdentifier": "t_contract$_K_$343", "typeString": "contract K"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"argumentTypes": null, "arguments": [{"argumentTypes": null, "commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 129, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"argumentTypes": null, "id": 127, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 98, "src": "597:1:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"argumentTypes": null, "hexValue": "32", "id": 128, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "599:1:0", "subdenomination": null, "typeDescriptions": {"typeIdentifier": "t_rational_2_by_1", "typeString": "int_const 2"}, "value": "2"}, "src": "597:3:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}], "id": 126, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "NewExpression", "src": "591:5:0", "typeDescriptions": {"typeIdentifier": "t_function_creation_nonpayable$_t_uint256_$returns$_t_contract$_K_$343_$", "typeString": "function (uint256) returns (contract K)"}, "typeName": {"contractScope": null, "id": 125, "name": "K", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 343, "src": "595:1:0", "typeDescriptions": {"typeIdentifier": "t_contract$_K_$343", "typeString": "contract K"}}}, "id": 130, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "591:10:0", "typeDescriptions": {"typeIdentifier": "t_contract$_K_$343", "typeString": "contract K"}}, "src": "587:14:0", "typeDescriptions": {"typeIdentifier": "t_contract$_K_$343", "typeString": "contract K"}}, "id": 132, "nodeType": "ExpressionStatement", "src": "587:14:0"}]}, "documentation": null, "id": 134, "implemented": true, "kind": "constructor", "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "parameters": {"id": 105, "nodeType": "ParameterList", "parameters": [], "src": "529:2:0"}, "returnParameters": {"id": 106, "nodeType": "ParameterList", "parameters": [], "src": "539:0:0"}, "scope": 149, "src": "518:88:0", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public"}, {"body": {"id": 147, "nodeType": "Block", "src": "656:29:0", "statements": [{"expression": {"argumentTypes": null, "commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 145, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"argumentTypes": null, "commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 141, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"argumentTypes": null, "id": 139, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 98, "src": "669:1:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "-", "rightExpression": {"argumentTypes": null, "id": 140, "name": "y", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 100, "src": "671:1:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "669:3:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"argumentTypes": null, "arguments": [], "expression": {"argumentTypes": [], "expression": {"argumentTypes": null, "id": 142, "name": "g", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 102, "src": "673:1:0", "typeDescriptions": {"typeIdentifier": "t_contract$_G_$285", "typeString": "contract G"}}, "id": 143, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sum", "nodeType": "MemberAccess", "referencedDeclaration": 266, "src": "673:5:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", "typeString": "function () view external returns (uint256)"}}, "id": 144, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "673:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "669:11:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "functionReturnParameters": 138, "id": 146, "nodeType": "Return", "src": "662:18:0"}]}, "documentation": null, "id": 148, "implemented": true, "kind": "function", "modifiers": [], "name": "diff", "nodeType": "FunctionDefinition", "parameters": {"id": 135, "nodeType": "ParameterList", "parameters": [], "src": "623:2:0"}, "returnParameters": {"id": 138, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 137, "name": "", "nodeType": "VariableDeclaration", "scope": 148, "src": "647:7:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 136, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "647:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "value": null, "visibility": "internal"}], "src": "646:9:0"}, "scope": 149, "src": "610:75:0", "stateMutability": "view", "superFunction": null, "visibility": "public"}], "scope": 150, "src": "462:225:0"}], "src": "0:688:0"}, "userdoc": {"methods": {}, "notice": null}, "devdoc": {"methods": {}, "author": null, "details": null, "title": null}} \ No newline at end of file diff --git a/tests/expected/solc-multi-file/C.json b/tests/expected/solc-multi-file/C.json new file mode 100644 index 00000000..0d3c025f --- /dev/null +++ b/tests/expected/solc-multi-file/C.json @@ -0,0 +1 @@ +{"contractName": "C", "abi": [{"constant": false, "inputs": [{"name": "xval", "type": "uint256"}], "name": "setX", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "sum", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"inputs": [{"name": "yval", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}], "bytecode": "0x608060405234801561001057600080fd5b506040516020806101208339810180604052602081101561003057600080fd5b810190808051906020019092919050505060008081905550806001819055505060c28061005e6000396000f3fe6080604052348015600f57600080fd5b506004361060325760003560e01c80634018d9aa146037578063853255cc146062575b600080fd5b606060048036036020811015604b57600080fd5b8101908080359060200190929190505050607e565b005b60686088565b6040518082815260200191505060405180910390f35b8060008190555050565b60006001546000540190509056fe", "deployedBytecode": "0x6080604052348015600f57600080fd5b506004361060325760003560e01c80634018d9aa146037578063853255cc146062575b600080fd5b606060048036036020811015604b57600080fd5b8101908080359060200190929190505050607e565b005b60686088565b6040518082815260200191505060405180910390f35b8060008190555050565b60006001546000540190509056fe", "ast": {"absolutePath": "./C.sol", "exportedSymbols": {"C": [189], "D": [227]}, "id": 228, "nodeType": "SourceUnit", "nodes": [{"baseContracts": [], "contractDependencies": [], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "id": 189, "linearizedBaseContracts": [189], "name": "C", "nodeType": "ContractDefinition", "nodes": [{"constant": false, "id": 152, "name": "x", "nodeType": "VariableDeclaration", "scope": 189, "src": "15:9:1", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 151, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "15:7:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "value": null, "visibility": "internal"}, {"constant": false, "id": 154, "name": "y", "nodeType": "VariableDeclaration", "scope": 189, "src": "28:9:1", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 153, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "28:7:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "value": null, "visibility": "internal"}, {"body": {"id": 167, "nodeType": "Block", "src": "75:30:1", "statements": [{"expression": {"argumentTypes": null, "id": 161, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"argumentTypes": null, "id": 159, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 152, "src": "81:1:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"argumentTypes": null, "hexValue": "30", "id": 160, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "85:1:1", "subdenomination": null, "typeDescriptions": {"typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0"}, "value": "0"}, "src": "81:5:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 162, "nodeType": "ExpressionStatement", "src": "81:5:1"}, {"expression": {"argumentTypes": null, "id": 165, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"argumentTypes": null, "id": 163, "name": "y", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 154, "src": "92:1:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"argumentTypes": null, "id": 164, "name": "yval", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 156, "src": "96:4:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "92:8:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 166, "nodeType": "ExpressionStatement", "src": "92:8:1"}]}, "documentation": null, "id": 168, "implemented": true, "kind": "constructor", "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "parameters": {"id": 157, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 156, "name": "yval", "nodeType": "VariableDeclaration", "scope": 168, "src": "54:12:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 155, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "54:7:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "value": null, "visibility": "internal"}], "src": "53:14:1"}, "returnParameters": {"id": 158, "nodeType": "ParameterList", "parameters": [], "src": "75:0:1"}, "scope": 189, "src": "42:63:1", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public"}, {"body": {"id": 177, "nodeType": "Block", "src": "154:21:1", "statements": [{"expression": {"argumentTypes": null, "commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 175, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"argumentTypes": null, "id": 173, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 152, "src": "167:1:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"argumentTypes": null, "id": 174, "name": "y", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 154, "src": "169:1:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "167:3:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "functionReturnParameters": 172, "id": 176, "nodeType": "Return", "src": "160:10:1"}]}, "documentation": null, "id": 178, "implemented": true, "kind": "function", "modifiers": [], "name": "sum", "nodeType": "FunctionDefinition", "parameters": {"id": 169, "nodeType": "ParameterList", "parameters": [], "src": "121:2:1"}, "returnParameters": {"id": 172, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 171, "name": "", "nodeType": "VariableDeclaration", "scope": 178, "src": "145:7:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 170, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "145:7:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "value": null, "visibility": "internal"}], "src": "144:9:1"}, "scope": 189, "src": "109:66:1", "stateMutability": "view", "superFunction": null, "visibility": "public"}, {"body": {"id": 187, "nodeType": "Block", "src": "214:19:1", "statements": [{"expression": {"argumentTypes": null, "id": 185, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"argumentTypes": null, "id": 183, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 152, "src": "220:1:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"argumentTypes": null, "id": 184, "name": "xval", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 180, "src": "224:4:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "220:8:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 186, "nodeType": "ExpressionStatement", "src": "220:8:1"}]}, "documentation": null, "id": 188, "implemented": true, "kind": "function", "modifiers": [], "name": "setX", "nodeType": "FunctionDefinition", "parameters": {"id": 181, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 180, "name": "xval", "nodeType": "VariableDeclaration", "scope": 188, "src": "193:12:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 179, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "193:7:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "value": null, "visibility": "internal"}], "src": "192:14:1"}, "returnParameters": {"id": 182, "nodeType": "ParameterList", "parameters": [], "src": "214:0:1"}, "scope": 189, "src": "179:54:1", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public"}], "scope": 228, "src": "0:235:1"}, {"baseContracts": [], "contractDependencies": [189], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "id": 227, "linearizedBaseContracts": [227], "name": "D", "nodeType": "ContractDefinition", "nodes": [{"constant": false, "id": 191, "name": "x", "nodeType": "VariableDeclaration", "scope": 227, "src": "252:9:1", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 190, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "252:7:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "value": null, "visibility": "internal"}, {"constant": false, "id": 193, "name": "y", "nodeType": "VariableDeclaration", "scope": 227, "src": "265:9:1", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 192, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "265:7:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "value": null, "visibility": "internal"}, {"constant": false, "id": 195, "name": "c", "nodeType": "VariableDeclaration", "scope": 227, "src": "278:3:1", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_contract$_C_$189", "typeString": "contract C"}, "typeName": {"contractScope": null, "id": 194, "name": "C", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 189, "src": "278:1:1", "typeDescriptions": {"typeIdentifier": "t_contract$_C_$189", "typeString": "contract C"}}, "value": null, "visibility": "internal"}, {"body": {"id": 215, "nodeType": "Block", "src": "319:48:1", "statements": [{"expression": {"argumentTypes": null, "id": 202, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"argumentTypes": null, "id": 200, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 191, "src": "325:1:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"argumentTypes": null, "hexValue": "30", "id": 201, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "329:1:1", "subdenomination": null, "typeDescriptions": {"typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0"}, "value": "0"}, "src": "325:5:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 203, "nodeType": "ExpressionStatement", "src": "325:5:1"}, {"expression": {"argumentTypes": null, "id": 206, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"argumentTypes": null, "id": 204, "name": "y", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 193, "src": "336:1:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"argumentTypes": null, "id": 205, "name": "yval", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 197, "src": "340:4:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "336:8:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 207, "nodeType": "ExpressionStatement", "src": "336:8:1"}, {"expression": {"argumentTypes": null, "id": 213, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"argumentTypes": null, "id": 208, "name": "c", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 195, "src": "350:1:1", "typeDescriptions": {"typeIdentifier": "t_contract$_C_$189", "typeString": "contract C"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"argumentTypes": null, "arguments": [{"argumentTypes": null, "hexValue": "35", "id": 211, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "360:1:1", "subdenomination": null, "typeDescriptions": {"typeIdentifier": "t_rational_5_by_1", "typeString": "int_const 5"}, "value": "5"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_rational_5_by_1", "typeString": "int_const 5"}], "id": 210, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "NewExpression", "src": "354:5:1", "typeDescriptions": {"typeIdentifier": "t_function_creation_nonpayable$_t_uint256_$returns$_t_contract$_C_$189_$", "typeString": "function (uint256) returns (contract C)"}, "typeName": {"contractScope": null, "id": 209, "name": "C", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 189, "src": "358:1:1", "typeDescriptions": {"typeIdentifier": "t_contract$_C_$189", "typeString": "contract C"}}}, "id": 212, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "354:8:1", "typeDescriptions": {"typeIdentifier": "t_contract$_C_$189", "typeString": "contract C"}}, "src": "350:12:1", "typeDescriptions": {"typeIdentifier": "t_contract$_C_$189", "typeString": "contract C"}}, "id": 214, "nodeType": "ExpressionStatement", "src": "350:12:1"}]}, "documentation": null, "id": 216, "implemented": true, "kind": "constructor", "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "parameters": {"id": 198, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 197, "name": "yval", "nodeType": "VariableDeclaration", "scope": 216, "src": "298:12:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 196, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "298:7:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "value": null, "visibility": "internal"}], "src": "297:14:1"}, "returnParameters": {"id": 199, "nodeType": "ParameterList", "parameters": [], "src": "319:0:1"}, "scope": 227, "src": "286:81:1", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public"}, {"body": {"id": 225, "nodeType": "Block", "src": "417:21:1", "statements": [{"expression": {"argumentTypes": null, "commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 223, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"argumentTypes": null, "id": 221, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 191, "src": "430:1:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "-", "rightExpression": {"argumentTypes": null, "id": 222, "name": "y", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 193, "src": "432:1:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "430:3:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "functionReturnParameters": 220, "id": 224, "nodeType": "Return", "src": "423:10:1"}]}, "documentation": null, "id": 226, "implemented": true, "kind": "function", "modifiers": [], "name": "diff", "nodeType": "FunctionDefinition", "parameters": {"id": 217, "nodeType": "ParameterList", "parameters": [], "src": "384:2:1"}, "returnParameters": {"id": 220, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 219, "name": "", "nodeType": "VariableDeclaration", "scope": 226, "src": "408:7:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 218, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "408:7:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "value": null, "visibility": "internal"}], "src": "407:9:1"}, "scope": 227, "src": "371:67:1", "stateMutability": "view", "superFunction": null, "visibility": "public"}], "scope": 228, "src": "237:203:1"}], "src": "0:441:1"}, "userdoc": {"methods": {}, "notice": null}, "devdoc": {"methods": {}, "author": null, "details": null, "title": null}} \ No newline at end of file diff --git a/tests/expected/solc-multi-file/D.json b/tests/expected/solc-multi-file/D.json new file mode 100644 index 00000000..8258acc2 --- /dev/null +++ b/tests/expected/solc-multi-file/D.json @@ -0,0 +1 @@ +{"contractName": "D", "abi": [{"constant": true, "inputs": [], "name": "diff", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"inputs": [{"name": "yval", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}], "bytecode": "0x608060405234801561001057600080fd5b506040516020806102888339810180604052602081101561003057600080fd5b81019080805190602001909291905050506000808190555080600181905550600560405161005d906100ca565b80828152602001915050604051809103906000f080158015610083573d6000803e3d6000fd5b50600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506100d7565b6101208061016883390190565b6083806100e56000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c8063a0d7afb714602d575b600080fd5b60336049565b6040518082815260200191505060405180910390f35b60006001546000540390509056fe608060405234801561001057600080fd5b506040516020806101208339810180604052602081101561003057600080fd5b810190808051906020019092919050505060008081905550806001819055505060c28061005e6000396000f3fe6080604052348015600f57600080fd5b506004361060325760003560e01c80634018d9aa146037578063853255cc146062575b600080fd5b606060048036036020811015604b57600080fd5b8101908080359060200190929190505050607e565b005b60686088565b6040518082815260200191505060405180910390f35b8060008190555050565b60006001546000540190509056fea165627a7a72305820f5a2f94ed487768cbf61442383f5f1a6be2e888f4838bbdca8d853b0c1a288190029", "deployedBytecode": "0x6080604052348015600f57600080fd5b506004361060285760003560e01c8063a0d7afb714602d575b600080fd5b60336049565b6040518082815260200191505060405180910390f35b60006001546000540390509056fe", "ast": {"absolutePath": "./C.sol", "exportedSymbols": {"C": [189], "D": [227]}, "id": 228, "nodeType": "SourceUnit", "nodes": [{"baseContracts": [], "contractDependencies": [], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "id": 189, "linearizedBaseContracts": [189], "name": "C", "nodeType": "ContractDefinition", "nodes": [{"constant": false, "id": 152, "name": "x", "nodeType": "VariableDeclaration", "scope": 189, "src": "15:9:1", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 151, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "15:7:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "value": null, "visibility": "internal"}, {"constant": false, "id": 154, "name": "y", "nodeType": "VariableDeclaration", "scope": 189, "src": "28:9:1", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 153, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "28:7:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "value": null, "visibility": "internal"}, {"body": {"id": 167, "nodeType": "Block", "src": "75:30:1", "statements": [{"expression": {"argumentTypes": null, "id": 161, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"argumentTypes": null, "id": 159, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 152, "src": "81:1:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"argumentTypes": null, "hexValue": "30", "id": 160, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "85:1:1", "subdenomination": null, "typeDescriptions": {"typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0"}, "value": "0"}, "src": "81:5:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 162, "nodeType": "ExpressionStatement", "src": "81:5:1"}, {"expression": {"argumentTypes": null, "id": 165, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"argumentTypes": null, "id": 163, "name": "y", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 154, "src": "92:1:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"argumentTypes": null, "id": 164, "name": "yval", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 156, "src": "96:4:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "92:8:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 166, "nodeType": "ExpressionStatement", "src": "92:8:1"}]}, "documentation": null, "id": 168, "implemented": true, "kind": "constructor", "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "parameters": {"id": 157, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 156, "name": "yval", "nodeType": "VariableDeclaration", "scope": 168, "src": "54:12:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 155, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "54:7:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "value": null, "visibility": "internal"}], "src": "53:14:1"}, "returnParameters": {"id": 158, "nodeType": "ParameterList", "parameters": [], "src": "75:0:1"}, "scope": 189, "src": "42:63:1", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public"}, {"body": {"id": 177, "nodeType": "Block", "src": "154:21:1", "statements": [{"expression": {"argumentTypes": null, "commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 175, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"argumentTypes": null, "id": 173, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 152, "src": "167:1:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"argumentTypes": null, "id": 174, "name": "y", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 154, "src": "169:1:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "167:3:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "functionReturnParameters": 172, "id": 176, "nodeType": "Return", "src": "160:10:1"}]}, "documentation": null, "id": 178, "implemented": true, "kind": "function", "modifiers": [], "name": "sum", "nodeType": "FunctionDefinition", "parameters": {"id": 169, "nodeType": "ParameterList", "parameters": [], "src": "121:2:1"}, "returnParameters": {"id": 172, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 171, "name": "", "nodeType": "VariableDeclaration", "scope": 178, "src": "145:7:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 170, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "145:7:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "value": null, "visibility": "internal"}], "src": "144:9:1"}, "scope": 189, "src": "109:66:1", "stateMutability": "view", "superFunction": null, "visibility": "public"}, {"body": {"id": 187, "nodeType": "Block", "src": "214:19:1", "statements": [{"expression": {"argumentTypes": null, "id": 185, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"argumentTypes": null, "id": 183, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 152, "src": "220:1:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"argumentTypes": null, "id": 184, "name": "xval", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 180, "src": "224:4:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "220:8:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 186, "nodeType": "ExpressionStatement", "src": "220:8:1"}]}, "documentation": null, "id": 188, "implemented": true, "kind": "function", "modifiers": [], "name": "setX", "nodeType": "FunctionDefinition", "parameters": {"id": 181, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 180, "name": "xval", "nodeType": "VariableDeclaration", "scope": 188, "src": "193:12:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 179, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "193:7:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "value": null, "visibility": "internal"}], "src": "192:14:1"}, "returnParameters": {"id": 182, "nodeType": "ParameterList", "parameters": [], "src": "214:0:1"}, "scope": 189, "src": "179:54:1", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public"}], "scope": 228, "src": "0:235:1"}, {"baseContracts": [], "contractDependencies": [189], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "id": 227, "linearizedBaseContracts": [227], "name": "D", "nodeType": "ContractDefinition", "nodes": [{"constant": false, "id": 191, "name": "x", "nodeType": "VariableDeclaration", "scope": 227, "src": "252:9:1", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 190, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "252:7:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "value": null, "visibility": "internal"}, {"constant": false, "id": 193, "name": "y", "nodeType": "VariableDeclaration", "scope": 227, "src": "265:9:1", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 192, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "265:7:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "value": null, "visibility": "internal"}, {"constant": false, "id": 195, "name": "c", "nodeType": "VariableDeclaration", "scope": 227, "src": "278:3:1", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_contract$_C_$189", "typeString": "contract C"}, "typeName": {"contractScope": null, "id": 194, "name": "C", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 189, "src": "278:1:1", "typeDescriptions": {"typeIdentifier": "t_contract$_C_$189", "typeString": "contract C"}}, "value": null, "visibility": "internal"}, {"body": {"id": 215, "nodeType": "Block", "src": "319:48:1", "statements": [{"expression": {"argumentTypes": null, "id": 202, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"argumentTypes": null, "id": 200, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 191, "src": "325:1:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"argumentTypes": null, "hexValue": "30", "id": 201, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "329:1:1", "subdenomination": null, "typeDescriptions": {"typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0"}, "value": "0"}, "src": "325:5:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 203, "nodeType": "ExpressionStatement", "src": "325:5:1"}, {"expression": {"argumentTypes": null, "id": 206, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"argumentTypes": null, "id": 204, "name": "y", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 193, "src": "336:1:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"argumentTypes": null, "id": 205, "name": "yval", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 197, "src": "340:4:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "336:8:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 207, "nodeType": "ExpressionStatement", "src": "336:8:1"}, {"expression": {"argumentTypes": null, "id": 213, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"argumentTypes": null, "id": 208, "name": "c", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 195, "src": "350:1:1", "typeDescriptions": {"typeIdentifier": "t_contract$_C_$189", "typeString": "contract C"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"argumentTypes": null, "arguments": [{"argumentTypes": null, "hexValue": "35", "id": 211, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "360:1:1", "subdenomination": null, "typeDescriptions": {"typeIdentifier": "t_rational_5_by_1", "typeString": "int_const 5"}, "value": "5"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_rational_5_by_1", "typeString": "int_const 5"}], "id": 210, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "NewExpression", "src": "354:5:1", "typeDescriptions": {"typeIdentifier": "t_function_creation_nonpayable$_t_uint256_$returns$_t_contract$_C_$189_$", "typeString": "function (uint256) returns (contract C)"}, "typeName": {"contractScope": null, "id": 209, "name": "C", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 189, "src": "358:1:1", "typeDescriptions": {"typeIdentifier": "t_contract$_C_$189", "typeString": "contract C"}}}, "id": 212, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "354:8:1", "typeDescriptions": {"typeIdentifier": "t_contract$_C_$189", "typeString": "contract C"}}, "src": "350:12:1", "typeDescriptions": {"typeIdentifier": "t_contract$_C_$189", "typeString": "contract C"}}, "id": 214, "nodeType": "ExpressionStatement", "src": "350:12:1"}]}, "documentation": null, "id": 216, "implemented": true, "kind": "constructor", "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "parameters": {"id": 198, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 197, "name": "yval", "nodeType": "VariableDeclaration", "scope": 216, "src": "298:12:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 196, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "298:7:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "value": null, "visibility": "internal"}], "src": "297:14:1"}, "returnParameters": {"id": 199, "nodeType": "ParameterList", "parameters": [], "src": "319:0:1"}, "scope": 227, "src": "286:81:1", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public"}, {"body": {"id": 225, "nodeType": "Block", "src": "417:21:1", "statements": [{"expression": {"argumentTypes": null, "commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 223, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"argumentTypes": null, "id": 221, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 191, "src": "430:1:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "-", "rightExpression": {"argumentTypes": null, "id": 222, "name": "y", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 193, "src": "432:1:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "430:3:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "functionReturnParameters": 220, "id": 224, "nodeType": "Return", "src": "423:10:1"}]}, "documentation": null, "id": 226, "implemented": true, "kind": "function", "modifiers": [], "name": "diff", "nodeType": "FunctionDefinition", "parameters": {"id": 217, "nodeType": "ParameterList", "parameters": [], "src": "384:2:1"}, "returnParameters": {"id": 220, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 219, "name": "", "nodeType": "VariableDeclaration", "scope": 226, "src": "408:7:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 218, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "408:7:1", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "value": null, "visibility": "internal"}], "src": "407:9:1"}, "scope": 227, "src": "371:67:1", "stateMutability": "view", "superFunction": null, "visibility": "public"}], "scope": 228, "src": "237:203:1"}], "src": "0:441:1"}, "userdoc": {"methods": {}, "notice": null}, "devdoc": {"methods": {}, "author": null, "details": null, "title": null}} \ No newline at end of file diff --git a/tests/expected/solc-multi-file/E.json b/tests/expected/solc-multi-file/E.json new file mode 100644 index 00000000..d4d88d3a --- /dev/null +++ b/tests/expected/solc-multi-file/E.json @@ -0,0 +1 @@ +{"contractName": "E", "abi": [{"constant": false, "inputs": [{"name": "xval", "type": "uint256"}], "name": "setX", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "sum", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"inputs": [{"name": "yval", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}], "bytecode": "0x608060405234801561001057600080fd5b506040516020806104dc8339810180604052602081101561003057600080fd5b810190808051906020019092919050505060008081905550806001819055508060405161005c906100c9565b80828152602001915050604051809103906000f080158015610082573d6000803e3d6000fd5b50600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506100d6565b6102888061025483390190565b61016f806100e56000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80634018d9aa1461003b578063853255cc14610069575b600080fd5b6100676004803603602081101561005157600080fd5b8101908080359060200190929190505050610087565b005b610071610091565b6040518082815260200191505060405180910390f35b8060008190555050565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a0d7afb76040518163ffffffff1660e01b815260040160206040518083038186803b1580156100fb57600080fd5b505afa15801561010f573d6000803e3d6000fd5b505050506040513d602081101561012557600080fd5b8101908080519060200190929190505050600154600054010190509056fe608060405234801561001057600080fd5b506040516020806102888339810180604052602081101561003057600080fd5b81019080805190602001909291905050506000808190555080600181905550600560405161005d906100ca565b80828152602001915050604051809103906000f080158015610083573d6000803e3d6000fd5b50600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506100d7565b6101208061016883390190565b6083806100e56000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c8063a0d7afb714602d575b600080fd5b60336049565b6040518082815260200191505060405180910390f35b60006001546000540390509056fea165627a7a723058201afddf157b08e7ca10fd3ec23be46d8d79937e3de04d99fd76dda13572ccb03f0029608060405234801561001057600080fd5b506040516020806101208339810180604052602081101561003057600080fd5b810190808051906020019092919050505060008081905550806001819055505060c28061005e6000396000f3fe6080604052348015600f57600080fd5b506004361060325760003560e01c80634018d9aa146037578063853255cc146062575b600080fd5b606060048036036020811015604b57600080fd5b8101908080359060200190929190505050607e565b005b60686088565b6040518082815260200191505060405180910390f35b8060008190555050565b60006001546000540190509056fea165627a7a72305820f5a2f94ed487768cbf61442383f5f1a6be2e888f4838bbdca8d853b0c1a288190029", "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100365760003560e01c80634018d9aa1461003b578063853255cc14610069575b600080fd5b6100676004803603602081101561005157600080fd5b8101908080359060200190929190505050610087565b005b610071610091565b6040518082815260200191505060405180910390f35b8060008190555050565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a0d7afb76040518163ffffffff1660e01b815260040160206040518083038186803b1580156100fb57600080fd5b505afa15801561010f573d6000803e3d6000fd5b505050506040513d602081101561012557600080fd5b8101908080519060200190929190505050600154600054010190509056fe", "ast": {"absolutePath": "./E/E.sol", "exportedSymbols": {"E": [398]}, "id": 399, "nodeType": "SourceUnit", "nodes": [{"absolutePath": "./C.sol", "file": "../C.sol", "id": 345, "nodeType": "ImportDirective", "scope": 399, "sourceUnit": 228, "src": "0:18:2", "symbolAliases": [], "unitAlias": ""}, {"absolutePath": "./I/I.sol", "file": "../I/I.sol", "id": 346, "nodeType": "ImportDirective", "scope": 399, "sourceUnit": 475, "src": "19:20:2", "symbolAliases": [], "unitAlias": ""}, {"baseContracts": [], "contractDependencies": [227], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "id": 398, "linearizedBaseContracts": [398], "name": "E", "nodeType": "ContractDefinition", "nodes": [{"constant": false, "id": 348, "name": "x", "nodeType": "VariableDeclaration", "scope": 398, "src": "56:9:2", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 347, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "56:7:2", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "value": null, "visibility": "internal"}, {"constant": false, "id": 350, "name": "y", "nodeType": "VariableDeclaration", "scope": 398, "src": "69:9:2", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 349, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "69:7:2", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "value": null, "visibility": "internal"}, {"constant": false, "id": 352, "name": "d", "nodeType": "VariableDeclaration", "scope": 398, "src": "82:3:2", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_contract$_D_$227", "typeString": "contract D"}, "typeName": {"contractScope": null, "id": 351, "name": "D", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 227, "src": "82:1:2", "typeDescriptions": {"typeIdentifier": "t_contract$_D_$227", "typeString": "contract D"}}, "value": null, "visibility": "internal"}, {"body": {"id": 372, "nodeType": "Block", "src": "123:51:2", "statements": [{"expression": {"argumentTypes": null, "id": 359, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"argumentTypes": null, "id": 357, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 348, "src": "129:1:2", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"argumentTypes": null, "hexValue": "30", "id": 358, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "133:1:2", "subdenomination": null, "typeDescriptions": {"typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0"}, "value": "0"}, "src": "129:5:2", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 360, "nodeType": "ExpressionStatement", "src": "129:5:2"}, {"expression": {"argumentTypes": null, "id": 363, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"argumentTypes": null, "id": 361, "name": "y", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 350, "src": "140:1:2", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"argumentTypes": null, "id": 362, "name": "yval", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 354, "src": "144:4:2", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "140:8:2", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 364, "nodeType": "ExpressionStatement", "src": "140:8:2"}, {"expression": {"argumentTypes": null, "id": 370, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"argumentTypes": null, "id": 365, "name": "d", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 352, "src": "154:1:2", "typeDescriptions": {"typeIdentifier": "t_contract$_D_$227", "typeString": "contract D"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"argumentTypes": null, "arguments": [{"argumentTypes": null, "id": 368, "name": "yval", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 354, "src": "164:4:2", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}], "id": 367, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "NewExpression", "src": "158:5:2", "typeDescriptions": {"typeIdentifier": "t_function_creation_nonpayable$_t_uint256_$returns$_t_contract$_D_$227_$", "typeString": "function (uint256) returns (contract D)"}, "typeName": {"contractScope": null, "id": 366, "name": "D", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 227, "src": "162:1:2", "typeDescriptions": {"typeIdentifier": "t_contract$_D_$227", "typeString": "contract D"}}}, "id": 369, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "158:11:2", "typeDescriptions": {"typeIdentifier": "t_contract$_D_$227", "typeString": "contract D"}}, "src": "154:15:2", "typeDescriptions": {"typeIdentifier": "t_contract$_D_$227", "typeString": "contract D"}}, "id": 371, "nodeType": "ExpressionStatement", "src": "154:15:2"}]}, "documentation": null, "id": 373, "implemented": true, "kind": "constructor", "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "parameters": {"id": 355, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 354, "name": "yval", "nodeType": "VariableDeclaration", "scope": 373, "src": "102:12:2", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 353, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "102:7:2", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "value": null, "visibility": "internal"}], "src": "101:14:2"}, "returnParameters": {"id": 356, "nodeType": "ParameterList", "parameters": [], "src": "123:0:2"}, "scope": 398, "src": "90:84:2", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public"}, {"body": {"id": 386, "nodeType": "Block", "src": "223:30:2", "statements": [{"expression": {"argumentTypes": null, "commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 384, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"argumentTypes": null, "commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 380, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"argumentTypes": null, "id": 378, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 348, "src": "236:1:2", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"argumentTypes": null, "id": 379, "name": "y", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 350, "src": "238:1:2", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "236:3:2", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"argumentTypes": null, "arguments": [], "expression": {"argumentTypes": [], "expression": {"argumentTypes": null, "id": 381, "name": "d", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 352, "src": "240:1:2", "typeDescriptions": {"typeIdentifier": "t_contract$_D_$227", "typeString": "contract D"}}, "id": 382, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "diff", "nodeType": "MemberAccess", "referencedDeclaration": 226, "src": "240:6:2", "typeDescriptions": {"typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", "typeString": "function () view external returns (uint256)"}}, "id": 383, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "240:8:2", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "236:12:2", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "functionReturnParameters": 377, "id": 385, "nodeType": "Return", "src": "229:19:2"}]}, "documentation": null, "id": 387, "implemented": true, "kind": "function", "modifiers": [], "name": "sum", "nodeType": "FunctionDefinition", "parameters": {"id": 374, "nodeType": "ParameterList", "parameters": [], "src": "190:2:2"}, "returnParameters": {"id": 377, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 376, "name": "", "nodeType": "VariableDeclaration", "scope": 387, "src": "214:7:2", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 375, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "214:7:2", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "value": null, "visibility": "internal"}], "src": "213:9:2"}, "scope": 398, "src": "178:75:2", "stateMutability": "view", "superFunction": null, "visibility": "public"}, {"body": {"id": 396, "nodeType": "Block", "src": "292:19:2", "statements": [{"expression": {"argumentTypes": null, "id": 394, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"argumentTypes": null, "id": 392, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 348, "src": "298:1:2", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"argumentTypes": null, "id": 393, "name": "xval", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 389, "src": "302:4:2", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "298:8:2", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 395, "nodeType": "ExpressionStatement", "src": "298:8:2"}]}, "documentation": null, "id": 397, "implemented": true, "kind": "function", "modifiers": [], "name": "setX", "nodeType": "FunctionDefinition", "parameters": {"id": 390, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 389, "name": "xval", "nodeType": "VariableDeclaration", "scope": 397, "src": "271:12:2", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 388, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "271:7:2", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "value": null, "visibility": "internal"}], "src": "270:14:2"}, "returnParameters": {"id": 391, "nodeType": "ParameterList", "parameters": [], "src": "292:0:2"}, "scope": 398, "src": "257:54:2", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public"}], "scope": 399, "src": "41:272:2"}], "src": "0:314:2"}, "userdoc": {"methods": {}, "notice": null}, "devdoc": {"methods": {}, "author": null, "details": null, "title": null}} \ No newline at end of file diff --git a/tests/expected/solc-multi-file/G.json b/tests/expected/solc-multi-file/G.json new file mode 100644 index 00000000..eda4f948 --- /dev/null +++ b/tests/expected/solc-multi-file/G.json @@ -0,0 +1 @@ +{"contractName": "G", "abi": [{"constant": false, "inputs": [{"name": "xval", "type": "uint256"}], "name": "setX", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "sum", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"inputs": [{"name": "yval", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}], "bytecode": "0x608060405234801561001057600080fd5b506040516020806107b98339810180604052602081101561003057600080fd5b81019080805190602001909291905050506000808190555080600181905550600560405161005d906100ca565b80828152602001915050604051809103906000f080158015610083573d6000803e3d6000fd5b50600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506100d7565b6104dc806102dd83390190565b6101f7806100e66000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80634018d9aa1461003b578063853255cc14610069575b600080fd5b6100676004803603602081101561005157600080fd5b8101908080359060200190929190505050610087565b005b610071610121565b6040518082815260200191505060405180910390f35b80600081905550600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16634018d9aa600183016040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561010657600080fd5b505af115801561011a573d6000803e3d6000fd5b5050505050565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663853255cc6040518163ffffffff1660e01b815260040160206040518083038186803b15801561018b57600080fd5b505afa15801561019f573d6000803e3d6000fd5b505050506040513d60208110156101b557600080fd5b810190808051906020019092919050505090509056fe608060405234801561001057600080fd5b506040516020806104dc8339810180604052602081101561003057600080fd5b810190808051906020019092919050505060008081905550806001819055508060405161005c906100c9565b80828152602001915050604051809103906000f080158015610082573d6000803e3d6000fd5b50600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506100d6565b6102888061025483390190565b61016f806100e56000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80634018d9aa1461003b578063853255cc14610069575b600080fd5b6100676004803603602081101561005157600080fd5b8101908080359060200190929190505050610087565b005b610071610091565b6040518082815260200191505060405180910390f35b8060008190555050565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a0d7afb76040518163ffffffff1660e01b815260040160206040518083038186803b1580156100fb57600080fd5b505afa15801561010f573d6000803e3d6000fd5b505050506040513d602081101561012557600080fd5b8101908080519060200190929190505050600154600054010190509056fea165627a7a72305820be7d0c032ba61d5a5dd35ec573ea745ab2b7cf97722aacffe6cf563be5bf9f380029608060405234801561001057600080fd5b506040516020806102888339810180604052602081101561003057600080fd5b81019080805190602001909291905050506000808190555080600181905550600560405161005d906100ca565b80828152602001915050604051809103906000f080158015610083573d6000803e3d6000fd5b50600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506100d7565b6101208061016883390190565b6083806100e56000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c8063a0d7afb714602d575b600080fd5b60336049565b6040518082815260200191505060405180910390f35b60006001546000540390509056fea165627a7a723058201afddf157b08e7ca10fd3ec23be46d8d79937e3de04d99fd76dda13572ccb03f0029608060405234801561001057600080fd5b506040516020806101208339810180604052602081101561003057600080fd5b810190808051906020019092919050505060008081905550806001819055505060c28061005e6000396000f3fe6080604052348015600f57600080fd5b506004361060325760003560e01c80634018d9aa146037578063853255cc146062575b600080fd5b606060048036036020811015604b57600080fd5b8101908080359060200190929190505050607e565b005b60686088565b6040518082815260200191505060405180910390f35b8060008190555050565b60006001546000540190509056fea165627a7a72305820f5a2f94ed487768cbf61442383f5f1a6be2e888f4838bbdca8d853b0c1a288190029", "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100365760003560e01c80634018d9aa1461003b578063853255cc14610069575b600080fd5b6100676004803603602081101561005157600080fd5b8101908080359060200190929190505050610087565b005b610071610121565b6040518082815260200191505060405180910390f35b80600081905550600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16634018d9aa600183016040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561010657600080fd5b505af115801561011a573d6000803e3d6000fd5b5050505050565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663853255cc6040518163ffffffff1660e01b815260040160206040518083038186803b15801561018b57600080fd5b505afa15801561019f573d6000803e3d6000fd5b505050506040513d60208110156101b557600080fd5b810190808051906020019092919050505090509056fe", "ast": {"absolutePath": "./E/G.sol", "exportedSymbols": {"G": [285]}, "id": 286, "nodeType": "SourceUnit", "nodes": [{"absolutePath": "./E/E.sol", "file": "./E.sol", "id": 229, "nodeType": "ImportDirective", "scope": 286, "sourceUnit": 399, "src": "0:17:3", "symbolAliases": [], "unitAlias": ""}, {"baseContracts": [], "contractDependencies": [398], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "id": 285, "linearizedBaseContracts": [285], "name": "G", "nodeType": "ContractDefinition", "nodes": [{"constant": false, "id": 231, "name": "x", "nodeType": "VariableDeclaration", "scope": 285, "src": "34:9:3", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 230, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "34:7:3", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "value": null, "visibility": "internal"}, {"constant": false, "id": 233, "name": "y", "nodeType": "VariableDeclaration", "scope": 285, "src": "47:9:3", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 232, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "47:7:3", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "value": null, "visibility": "internal"}, {"constant": false, "id": 235, "name": "e", "nodeType": "VariableDeclaration", "scope": 285, "src": "60:3:3", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_contract$_E_$398", "typeString": "contract E"}, "typeName": {"contractScope": null, "id": 234, "name": "E", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 398, "src": "60:1:3", "typeDescriptions": {"typeIdentifier": "t_contract$_E_$398", "typeString": "contract E"}}, "value": null, "visibility": "internal"}, {"body": {"id": 255, "nodeType": "Block", "src": "101:48:3", "statements": [{"expression": {"argumentTypes": null, "id": 242, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"argumentTypes": null, "id": 240, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 231, "src": "107:1:3", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"argumentTypes": null, "hexValue": "30", "id": 241, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "111:1:3", "subdenomination": null, "typeDescriptions": {"typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0"}, "value": "0"}, "src": "107:5:3", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 243, "nodeType": "ExpressionStatement", "src": "107:5:3"}, {"expression": {"argumentTypes": null, "id": 246, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"argumentTypes": null, "id": 244, "name": "y", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 233, "src": "118:1:3", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"argumentTypes": null, "id": 245, "name": "yval", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 237, "src": "122:4:3", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "118:8:3", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 247, "nodeType": "ExpressionStatement", "src": "118:8:3"}, {"expression": {"argumentTypes": null, "id": 253, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"argumentTypes": null, "id": 248, "name": "e", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 235, "src": "132:1:3", "typeDescriptions": {"typeIdentifier": "t_contract$_E_$398", "typeString": "contract E"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"argumentTypes": null, "arguments": [{"argumentTypes": null, "hexValue": "35", "id": 251, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "142:1:3", "subdenomination": null, "typeDescriptions": {"typeIdentifier": "t_rational_5_by_1", "typeString": "int_const 5"}, "value": "5"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_rational_5_by_1", "typeString": "int_const 5"}], "id": 250, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "NewExpression", "src": "136:5:3", "typeDescriptions": {"typeIdentifier": "t_function_creation_nonpayable$_t_uint256_$returns$_t_contract$_E_$398_$", "typeString": "function (uint256) returns (contract E)"}, "typeName": {"contractScope": null, "id": 249, "name": "E", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 398, "src": "140:1:3", "typeDescriptions": {"typeIdentifier": "t_contract$_E_$398", "typeString": "contract E"}}}, "id": 252, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "136:8:3", "typeDescriptions": {"typeIdentifier": "t_contract$_E_$398", "typeString": "contract E"}}, "src": "132:12:3", "typeDescriptions": {"typeIdentifier": "t_contract$_E_$398", "typeString": "contract E"}}, "id": 254, "nodeType": "ExpressionStatement", "src": "132:12:3"}]}, "documentation": null, "id": 256, "implemented": true, "kind": "constructor", "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "parameters": {"id": 238, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 237, "name": "yval", "nodeType": "VariableDeclaration", "scope": 256, "src": "80:12:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 236, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "80:7:3", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "value": null, "visibility": "internal"}], "src": "79:14:3"}, "returnParameters": {"id": 239, "nodeType": "ParameterList", "parameters": [], "src": "101:0:3"}, "scope": 285, "src": "68:81:3", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public"}, {"body": {"id": 265, "nodeType": "Block", "src": "198:25:3", "statements": [{"expression": {"argumentTypes": null, "arguments": [], "expression": {"argumentTypes": [], "expression": {"argumentTypes": null, "id": 261, "name": "e", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 235, "src": "211:1:3", "typeDescriptions": {"typeIdentifier": "t_contract$_E_$398", "typeString": "contract E"}}, "id": 262, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sum", "nodeType": "MemberAccess", "referencedDeclaration": 387, "src": "211:5:3", "typeDescriptions": {"typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", "typeString": "function () view external returns (uint256)"}}, "id": 263, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "211:7:3", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "functionReturnParameters": 260, "id": 264, "nodeType": "Return", "src": "204:14:3"}]}, "documentation": null, "id": 266, "implemented": true, "kind": "function", "modifiers": [], "name": "sum", "nodeType": "FunctionDefinition", "parameters": {"id": 257, "nodeType": "ParameterList", "parameters": [], "src": "165:2:3"}, "returnParameters": {"id": 260, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 259, "name": "", "nodeType": "VariableDeclaration", "scope": 266, "src": "189:7:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 258, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "189:7:3", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "value": null, "visibility": "internal"}], "src": "188:9:3"}, "scope": 285, "src": "153:70:3", "stateMutability": "view", "superFunction": null, "visibility": "public"}, {"body": {"id": 283, "nodeType": "Block", "src": "262:39:3", "statements": [{"expression": {"argumentTypes": null, "id": 273, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"argumentTypes": null, "id": 271, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 231, "src": "268:1:3", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"argumentTypes": null, "id": 272, "name": "xval", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 268, "src": "272:4:3", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "268:8:3", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 274, "nodeType": "ExpressionStatement", "src": "268:8:3"}, {"expression": {"argumentTypes": null, "arguments": [{"argumentTypes": null, "commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 280, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"argumentTypes": null, "id": 278, "name": "xval", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 268, "src": "289:4:3", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"argumentTypes": null, "hexValue": "31", "id": 279, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "294:1:3", "subdenomination": null, "typeDescriptions": {"typeIdentifier": "t_rational_1_by_1", "typeString": "int_const 1"}, "value": "1"}, "src": "289:6:3", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}], "expression": {"argumentTypes": null, "id": 275, "name": "e", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 235, "src": "282:1:3", "typeDescriptions": {"typeIdentifier": "t_contract$_E_$398", "typeString": "contract E"}}, "id": 277, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "setX", "nodeType": "MemberAccess", "referencedDeclaration": 397, "src": "282:6:3", "typeDescriptions": {"typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$", "typeString": "function (uint256) external"}}, "id": 281, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "282:14:3", "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 282, "nodeType": "ExpressionStatement", "src": "282:14:3"}]}, "documentation": null, "id": 284, "implemented": true, "kind": "function", "modifiers": [], "name": "setX", "nodeType": "FunctionDefinition", "parameters": {"id": 269, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 268, "name": "xval", "nodeType": "VariableDeclaration", "scope": 284, "src": "241:12:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 267, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "241:7:3", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "value": null, "visibility": "internal"}], "src": "240:14:3"}, "returnParameters": {"id": 270, "nodeType": "ParameterList", "parameters": [], "src": "262:0:3"}, "scope": 285, "src": "227:74:3", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public"}], "scope": 286, "src": "19:284:3"}], "src": "0:304:3"}, "userdoc": {"methods": {}, "notice": null}, "devdoc": {"methods": {}, "author": null, "details": null, "title": null}} \ No newline at end of file diff --git a/tests/expected/solc-multi-file/I.json b/tests/expected/solc-multi-file/I.json new file mode 100644 index 00000000..dbae6e25 --- /dev/null +++ b/tests/expected/solc-multi-file/I.json @@ -0,0 +1 @@ +{"contractName": "I", "abi": [{"constant": false, "inputs": [{"name": "xval", "type": "uint256"}], "name": "setX", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "sum", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"inputs": [{"name": "yval", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}], "bytecode": "0x608060405234801561001057600080fd5b50604051602080610b6f8339810180604052602081101561003057600080fd5b810190808051906020019092919050505060008081905550806001819055508060405161005c90610140565b80828152602001915050604051809103906000f080158015610082573d6000803e3d6000fd5b50600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600181016040516100d39061014d565b80828152602001915050604051809103906000f0801580156100f9573d6000803e3d6000fd5b50600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505061015a565b6102888061040b83390190565b6104dc8061069383390190565b6102a2806101696000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80634018d9aa1461003b578063853255cc14610069575b600080fd5b6100676004803603602081101561005157600080fd5b8101908080359060200190929190505050610087565b005b610071610120565b6040518082815260200191505060405180910390f35b80600081905550600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16634018d9aa6001546040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561010557600080fd5b505af1158015610119573d6000803e3d6000fd5b5050505050565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663853255cc6040518163ffffffff1660e01b815260040160206040518083038186803b15801561018a57600080fd5b505afa15801561019e573d6000803e3d6000fd5b505050506040513d60208110156101b457600080fd5b8101908080519060200190929190505050600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a0d7afb76040518163ffffffff1660e01b815260040160206040518083038186803b15801561022d57600080fd5b505afa158015610241573d6000803e3d6000fd5b505050506040513d602081101561025757600080fd5b810190808051906020019092919050505060015460005401010190509056fe608060405234801561001057600080fd5b506040516020806102888339810180604052602081101561003057600080fd5b81019080805190602001909291905050506000808190555080600181905550600560405161005d906100ca565b80828152602001915050604051809103906000f080158015610083573d6000803e3d6000fd5b50600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506100d7565b6101208061016883390190565b6083806100e56000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c8063a0d7afb714602d575b600080fd5b60336049565b6040518082815260200191505060405180910390f35b60006001546000540390509056fea165627a7a723058201afddf157b08e7ca10fd3ec23be46d8d79937e3de04d99fd76dda13572ccb03f0029608060405234801561001057600080fd5b506040516020806101208339810180604052602081101561003057600080fd5b810190808051906020019092919050505060008081905550806001819055505060c28061005e6000396000f3fe6080604052348015600f57600080fd5b506004361060325760003560e01c80634018d9aa146037578063853255cc146062575b600080fd5b606060048036036020811015604b57600080fd5b8101908080359060200190929190505050607e565b005b60686088565b6040518082815260200191505060405180910390f35b8060008190555050565b60006001546000540190509056fea165627a7a72305820f5a2f94ed487768cbf61442383f5f1a6be2e888f4838bbdca8d853b0c1a288190029608060405234801561001057600080fd5b506040516020806104dc8339810180604052602081101561003057600080fd5b810190808051906020019092919050505060008081905550806001819055508060405161005c906100c9565b80828152602001915050604051809103906000f080158015610082573d6000803e3d6000fd5b50600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506100d6565b6102888061025483390190565b61016f806100e56000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80634018d9aa1461003b578063853255cc14610069575b600080fd5b6100676004803603602081101561005157600080fd5b8101908080359060200190929190505050610087565b005b610071610091565b6040518082815260200191505060405180910390f35b8060008190555050565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a0d7afb76040518163ffffffff1660e01b815260040160206040518083038186803b1580156100fb57600080fd5b505afa15801561010f573d6000803e3d6000fd5b505050506040513d602081101561012557600080fd5b8101908080519060200190929190505050600154600054010190509056fea165627a7a72305820be7d0c032ba61d5a5dd35ec573ea745ab2b7cf97722aacffe6cf563be5bf9f380029608060405234801561001057600080fd5b506040516020806102888339810180604052602081101561003057600080fd5b81019080805190602001909291905050506000808190555080600181905550600560405161005d906100ca565b80828152602001915050604051809103906000f080158015610083573d6000803e3d6000fd5b50600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506100d7565b6101208061016883390190565b6083806100e56000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c8063a0d7afb714602d575b600080fd5b60336049565b6040518082815260200191505060405180910390f35b60006001546000540390509056fea165627a7a723058201afddf157b08e7ca10fd3ec23be46d8d79937e3de04d99fd76dda13572ccb03f0029608060405234801561001057600080fd5b506040516020806101208339810180604052602081101561003057600080fd5b810190808051906020019092919050505060008081905550806001819055505060c28061005e6000396000f3fe6080604052348015600f57600080fd5b506004361060325760003560e01c80634018d9aa146037578063853255cc146062575b600080fd5b606060048036036020811015604b57600080fd5b8101908080359060200190929190505050607e565b005b60686088565b6040518082815260200191505060405180910390f35b8060008190555050565b60006001546000540190509056fea165627a7a72305820f5a2f94ed487768cbf61442383f5f1a6be2e888f4838bbdca8d853b0c1a288190029", "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100365760003560e01c80634018d9aa1461003b578063853255cc14610069575b600080fd5b6100676004803603602081101561005157600080fd5b8101908080359060200190929190505050610087565b005b610071610120565b6040518082815260200191505060405180910390f35b80600081905550600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16634018d9aa6001546040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561010557600080fd5b505af1158015610119573d6000803e3d6000fd5b5050505050565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663853255cc6040518163ffffffff1660e01b815260040160206040518083038186803b15801561018a57600080fd5b505afa15801561019e573d6000803e3d6000fd5b505050506040513d60208110156101b457600080fd5b8101908080519060200190929190505050600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a0d7afb76040518163ffffffff1660e01b815260040160206040518083038186803b15801561022d57600080fd5b505afa158015610241573d6000803e3d6000fd5b505050506040513d602081101561025757600080fd5b810190808051906020019092919050505060015460005401010190509056fe", "ast": {"absolutePath": "./I/I.sol", "exportedSymbols": {"I": [474]}, "id": 475, "nodeType": "SourceUnit", "nodes": [{"absolutePath": "./C.sol", "file": "../C.sol", "id": 400, "nodeType": "ImportDirective", "scope": 475, "sourceUnit": 228, "src": "0:18:4", "symbolAliases": [], "unitAlias": ""}, {"absolutePath": "./E/E.sol", "file": "../E/E.sol", "id": 401, "nodeType": "ImportDirective", "scope": 475, "sourceUnit": 399, "src": "19:20:4", "symbolAliases": [], "unitAlias": ""}, {"baseContracts": [], "contractDependencies": [227, 398], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "id": 474, "linearizedBaseContracts": [474], "name": "I", "nodeType": "ContractDefinition", "nodes": [{"constant": false, "id": 403, "name": "x", "nodeType": "VariableDeclaration", "scope": 474, "src": "56:9:4", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 402, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "56:7:4", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "value": null, "visibility": "internal"}, {"constant": false, "id": 405, "name": "y", "nodeType": "VariableDeclaration", "scope": 474, "src": "69:9:4", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 404, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "69:7:4", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "value": null, "visibility": "internal"}, {"constant": false, "id": 407, "name": "d", "nodeType": "VariableDeclaration", "scope": 474, "src": "82:3:4", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_contract$_D_$227", "typeString": "contract D"}, "typeName": {"contractScope": null, "id": 406, "name": "D", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 227, "src": "82:1:4", "typeDescriptions": {"typeIdentifier": "t_contract$_D_$227", "typeString": "contract D"}}, "value": null, "visibility": "internal"}, {"constant": false, "id": 409, "name": "e", "nodeType": "VariableDeclaration", "scope": 474, "src": "89:3:4", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_contract$_E_$398", "typeString": "contract E"}, "typeName": {"contractScope": null, "id": 408, "name": "E", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 398, "src": "89:1:4", "typeDescriptions": {"typeIdentifier": "t_contract$_E_$398", "typeString": "contract E"}}, "value": null, "visibility": "internal"}, {"body": {"id": 438, "nodeType": "Block", "src": "130:74:4", "statements": [{"expression": {"argumentTypes": null, "id": 416, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"argumentTypes": null, "id": 414, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 403, "src": "136:1:4", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"argumentTypes": null, "hexValue": "30", "id": 415, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "140:1:4", "subdenomination": null, "typeDescriptions": {"typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0"}, "value": "0"}, "src": "136:5:4", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 417, "nodeType": "ExpressionStatement", "src": "136:5:4"}, {"expression": {"argumentTypes": null, "id": 420, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"argumentTypes": null, "id": 418, "name": "y", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 405, "src": "147:1:4", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"argumentTypes": null, "id": 419, "name": "yval", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 411, "src": "151:4:4", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "147:8:4", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 421, "nodeType": "ExpressionStatement", "src": "147:8:4"}, {"expression": {"argumentTypes": null, "id": 427, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"argumentTypes": null, "id": 422, "name": "d", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 407, "src": "161:1:4", "typeDescriptions": {"typeIdentifier": "t_contract$_D_$227", "typeString": "contract D"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"argumentTypes": null, "arguments": [{"argumentTypes": null, "id": 425, "name": "yval", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 411, "src": "171:4:4", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}], "id": 424, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "NewExpression", "src": "165:5:4", "typeDescriptions": {"typeIdentifier": "t_function_creation_nonpayable$_t_uint256_$returns$_t_contract$_D_$227_$", "typeString": "function (uint256) returns (contract D)"}, "typeName": {"contractScope": null, "id": 423, "name": "D", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 227, "src": "169:1:4", "typeDescriptions": {"typeIdentifier": "t_contract$_D_$227", "typeString": "contract D"}}}, "id": 426, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "165:11:4", "typeDescriptions": {"typeIdentifier": "t_contract$_D_$227", "typeString": "contract D"}}, "src": "161:15:4", "typeDescriptions": {"typeIdentifier": "t_contract$_D_$227", "typeString": "contract D"}}, "id": 428, "nodeType": "ExpressionStatement", "src": "161:15:4"}, {"expression": {"argumentTypes": null, "id": 436, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"argumentTypes": null, "id": 429, "name": "e", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 409, "src": "182:1:4", "typeDescriptions": {"typeIdentifier": "t_contract$_E_$398", "typeString": "contract E"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"argumentTypes": null, "arguments": [{"argumentTypes": null, "commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 434, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"argumentTypes": null, "id": 432, "name": "yval", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 411, "src": "192:4:4", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"argumentTypes": null, "hexValue": "31", "id": 433, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "197:1:4", "subdenomination": null, "typeDescriptions": {"typeIdentifier": "t_rational_1_by_1", "typeString": "int_const 1"}, "value": "1"}, "src": "192:6:4", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}], "id": 431, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "NewExpression", "src": "186:5:4", "typeDescriptions": {"typeIdentifier": "t_function_creation_nonpayable$_t_uint256_$returns$_t_contract$_E_$398_$", "typeString": "function (uint256) returns (contract E)"}, "typeName": {"contractScope": null, "id": 430, "name": "E", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 398, "src": "190:1:4", "typeDescriptions": {"typeIdentifier": "t_contract$_E_$398", "typeString": "contract E"}}}, "id": 435, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "186:13:4", "typeDescriptions": {"typeIdentifier": "t_contract$_E_$398", "typeString": "contract E"}}, "src": "182:17:4", "typeDescriptions": {"typeIdentifier": "t_contract$_E_$398", "typeString": "contract E"}}, "id": 437, "nodeType": "ExpressionStatement", "src": "182:17:4"}]}, "documentation": null, "id": 439, "implemented": true, "kind": "constructor", "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "parameters": {"id": 412, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 411, "name": "yval", "nodeType": "VariableDeclaration", "scope": 439, "src": "109:12:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 410, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "109:7:4", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "value": null, "visibility": "internal"}], "src": "108:14:4"}, "returnParameters": {"id": 413, "nodeType": "ParameterList", "parameters": [], "src": "130:0:4"}, "scope": 474, "src": "97:107:4", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public"}, {"body": {"id": 456, "nodeType": "Block", "src": "253:38:4", "statements": [{"expression": {"argumentTypes": null, "commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 454, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"argumentTypes": null, "commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 450, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"argumentTypes": null, "commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 446, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"argumentTypes": null, "id": 444, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 403, "src": "266:1:4", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"argumentTypes": null, "id": 445, "name": "y", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 405, "src": "268:1:4", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "266:3:4", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"argumentTypes": null, "arguments": [], "expression": {"argumentTypes": [], "expression": {"argumentTypes": null, "id": 447, "name": "d", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 407, "src": "270:1:4", "typeDescriptions": {"typeIdentifier": "t_contract$_D_$227", "typeString": "contract D"}}, "id": 448, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "diff", "nodeType": "MemberAccess", "referencedDeclaration": 226, "src": "270:6:4", "typeDescriptions": {"typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", "typeString": "function () view external returns (uint256)"}}, "id": 449, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "270:8:4", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "266:12:4", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"argumentTypes": null, "arguments": [], "expression": {"argumentTypes": [], "expression": {"argumentTypes": null, "id": 451, "name": "e", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 409, "src": "279:1:4", "typeDescriptions": {"typeIdentifier": "t_contract$_E_$398", "typeString": "contract E"}}, "id": 452, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sum", "nodeType": "MemberAccess", "referencedDeclaration": 387, "src": "279:5:4", "typeDescriptions": {"typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", "typeString": "function () view external returns (uint256)"}}, "id": 453, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "279:7:4", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "266:20:4", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "functionReturnParameters": 443, "id": 455, "nodeType": "Return", "src": "259:27:4"}]}, "documentation": null, "id": 457, "implemented": true, "kind": "function", "modifiers": [], "name": "sum", "nodeType": "FunctionDefinition", "parameters": {"id": 440, "nodeType": "ParameterList", "parameters": [], "src": "220:2:4"}, "returnParameters": {"id": 443, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 442, "name": "", "nodeType": "VariableDeclaration", "scope": 457, "src": "244:7:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 441, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "244:7:4", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "value": null, "visibility": "internal"}], "src": "243:9:4"}, "scope": 474, "src": "208:83:4", "stateMutability": "view", "superFunction": null, "visibility": "public"}, {"body": {"id": 472, "nodeType": "Block", "src": "330:34:4", "statements": [{"expression": {"argumentTypes": null, "id": 464, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"argumentTypes": null, "id": 462, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 403, "src": "336:1:4", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"argumentTypes": null, "id": 463, "name": "xval", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 459, "src": "340:4:4", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "336:8:4", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 465, "nodeType": "ExpressionStatement", "src": "336:8:4"}, {"expression": {"argumentTypes": null, "arguments": [{"argumentTypes": null, "id": 469, "name": "y", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 405, "src": "357:1:4", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}], "expression": {"argumentTypes": null, "id": 466, "name": "e", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 409, "src": "350:1:4", "typeDescriptions": {"typeIdentifier": "t_contract$_E_$398", "typeString": "contract E"}}, "id": 468, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "setX", "nodeType": "MemberAccess", "referencedDeclaration": 397, "src": "350:6:4", "typeDescriptions": {"typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$", "typeString": "function (uint256) external"}}, "id": 470, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "350:9:4", "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 471, "nodeType": "ExpressionStatement", "src": "350:9:4"}]}, "documentation": null, "id": 473, "implemented": true, "kind": "function", "modifiers": [], "name": "setX", "nodeType": "FunctionDefinition", "parameters": {"id": 460, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 459, "name": "xval", "nodeType": "VariableDeclaration", "scope": 473, "src": "309:12:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 458, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "309:7:4", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "value": null, "visibility": "internal"}], "src": "308:14:4"}, "returnParameters": {"id": 461, "nodeType": "ParameterList", "parameters": [], "src": "330:0:4"}, "scope": 474, "src": "295:69:4", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public"}], "scope": 475, "src": "41:325:4"}], "src": "0:367:4"}, "userdoc": {"methods": {}, "notice": null}, "devdoc": {"methods": {}, "author": null, "details": null, "title": null}} \ No newline at end of file diff --git a/tests/expected/solc-multi-file/K.json b/tests/expected/solc-multi-file/K.json new file mode 100644 index 00000000..a93a3383 --- /dev/null +++ b/tests/expected/solc-multi-file/K.json @@ -0,0 +1 @@ +{"contractName": "K", "abi": [{"constant": false, "inputs": [{"name": "xval", "type": "uint256"}], "name": "setX", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "sum", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"inputs": [{"name": "yval", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}], "bytecode": "0x608060405234801561001057600080fd5b50604051602080610e4c8339810180604052602081101561003057600080fd5b81019080805190602001909291905050506000808190555080600181905550600560405161005d906100ca565b80828152602001915050604051809103906000f080158015610083573d6000803e3d6000fd5b50600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506100d7565b610b6f806102dd83390190565b6101f7806100e66000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80634018d9aa1461003b578063853255cc14610069575b600080fd5b6100676004803603602081101561005157600080fd5b8101908080359060200190929190505050610087565b005b610071610121565b6040518082815260200191505060405180910390f35b80600081905550600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16634018d9aa600183016040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561010657600080fd5b505af115801561011a573d6000803e3d6000fd5b5050505050565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663853255cc6040518163ffffffff1660e01b815260040160206040518083038186803b15801561018b57600080fd5b505afa15801561019f573d6000803e3d6000fd5b505050506040513d60208110156101b557600080fd5b810190808051906020019092919050505090509056fe608060405234801561001057600080fd5b50604051602080610b6f8339810180604052602081101561003057600080fd5b810190808051906020019092919050505060008081905550806001819055508060405161005c90610140565b80828152602001915050604051809103906000f080158015610082573d6000803e3d6000fd5b50600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600181016040516100d39061014d565b80828152602001915050604051809103906000f0801580156100f9573d6000803e3d6000fd5b50600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505061015a565b6102888061040b83390190565b6104dc8061069383390190565b6102a2806101696000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80634018d9aa1461003b578063853255cc14610069575b600080fd5b6100676004803603602081101561005157600080fd5b8101908080359060200190929190505050610087565b005b610071610120565b6040518082815260200191505060405180910390f35b80600081905550600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16634018d9aa6001546040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561010557600080fd5b505af1158015610119573d6000803e3d6000fd5b5050505050565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663853255cc6040518163ffffffff1660e01b815260040160206040518083038186803b15801561018a57600080fd5b505afa15801561019e573d6000803e3d6000fd5b505050506040513d60208110156101b457600080fd5b8101908080519060200190929190505050600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a0d7afb76040518163ffffffff1660e01b815260040160206040518083038186803b15801561022d57600080fd5b505afa158015610241573d6000803e3d6000fd5b505050506040513d602081101561025757600080fd5b810190808051906020019092919050505060015460005401010190509056fea165627a7a7230582011f7c89b5d0495c839a814fc0fecd6058720cf5f06c8078db6137f0b6f75bdc70029608060405234801561001057600080fd5b506040516020806102888339810180604052602081101561003057600080fd5b81019080805190602001909291905050506000808190555080600181905550600560405161005d906100ca565b80828152602001915050604051809103906000f080158015610083573d6000803e3d6000fd5b50600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506100d7565b6101208061016883390190565b6083806100e56000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c8063a0d7afb714602d575b600080fd5b60336049565b6040518082815260200191505060405180910390f35b60006001546000540390509056fea165627a7a723058201afddf157b08e7ca10fd3ec23be46d8d79937e3de04d99fd76dda13572ccb03f0029608060405234801561001057600080fd5b506040516020806101208339810180604052602081101561003057600080fd5b810190808051906020019092919050505060008081905550806001819055505060c28061005e6000396000f3fe6080604052348015600f57600080fd5b506004361060325760003560e01c80634018d9aa146037578063853255cc146062575b600080fd5b606060048036036020811015604b57600080fd5b8101908080359060200190929190505050607e565b005b60686088565b6040518082815260200191505060405180910390f35b8060008190555050565b60006001546000540190509056fea165627a7a72305820f5a2f94ed487768cbf61442383f5f1a6be2e888f4838bbdca8d853b0c1a288190029608060405234801561001057600080fd5b506040516020806104dc8339810180604052602081101561003057600080fd5b810190808051906020019092919050505060008081905550806001819055508060405161005c906100c9565b80828152602001915050604051809103906000f080158015610082573d6000803e3d6000fd5b50600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506100d6565b6102888061025483390190565b61016f806100e56000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80634018d9aa1461003b578063853255cc14610069575b600080fd5b6100676004803603602081101561005157600080fd5b8101908080359060200190929190505050610087565b005b610071610091565b6040518082815260200191505060405180910390f35b8060008190555050565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a0d7afb76040518163ffffffff1660e01b815260040160206040518083038186803b1580156100fb57600080fd5b505afa15801561010f573d6000803e3d6000fd5b505050506040513d602081101561012557600080fd5b8101908080519060200190929190505050600154600054010190509056fea165627a7a72305820be7d0c032ba61d5a5dd35ec573ea745ab2b7cf97722aacffe6cf563be5bf9f380029608060405234801561001057600080fd5b506040516020806102888339810180604052602081101561003057600080fd5b81019080805190602001909291905050506000808190555080600181905550600560405161005d906100ca565b80828152602001915050604051809103906000f080158015610083573d6000803e3d6000fd5b50600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506100d7565b6101208061016883390190565b6083806100e56000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c8063a0d7afb714602d575b600080fd5b60336049565b6040518082815260200191505060405180910390f35b60006001546000540390509056fea165627a7a723058201afddf157b08e7ca10fd3ec23be46d8d79937e3de04d99fd76dda13572ccb03f0029608060405234801561001057600080fd5b506040516020806101208339810180604052602081101561003057600080fd5b810190808051906020019092919050505060008081905550806001819055505060c28061005e6000396000f3fe6080604052348015600f57600080fd5b506004361060325760003560e01c80634018d9aa146037578063853255cc146062575b600080fd5b606060048036036020811015604b57600080fd5b8101908080359060200190929190505050607e565b005b60686088565b6040518082815260200191505060405180910390f35b8060008190555050565b60006001546000540190509056fea165627a7a72305820f5a2f94ed487768cbf61442383f5f1a6be2e888f4838bbdca8d853b0c1a288190029", "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100365760003560e01c80634018d9aa1461003b578063853255cc14610069575b600080fd5b6100676004803603602081101561005157600080fd5b8101908080359060200190929190505050610087565b005b610071610121565b6040518082815260200191505060405180910390f35b80600081905550600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16634018d9aa600183016040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561010657600080fd5b505af115801561011a573d6000803e3d6000fd5b5050505050565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663853255cc6040518163ffffffff1660e01b815260040160206040518083038186803b15801561018b57600080fd5b505afa15801561019f573d6000803e3d6000fd5b505050506040513d60208110156101b557600080fd5b810190808051906020019092919050505090509056fe", "ast": {"absolutePath": "./I/K.sol", "exportedSymbols": {"K": [343]}, "id": 344, "nodeType": "SourceUnit", "nodes": [{"absolutePath": "./I/I.sol", "file": "./I.sol", "id": 287, "nodeType": "ImportDirective", "scope": 344, "sourceUnit": 475, "src": "0:17:5", "symbolAliases": [], "unitAlias": ""}, {"baseContracts": [], "contractDependencies": [474], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "id": 343, "linearizedBaseContracts": [343], "name": "K", "nodeType": "ContractDefinition", "nodes": [{"constant": false, "id": 289, "name": "x", "nodeType": "VariableDeclaration", "scope": 343, "src": "34:9:5", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 288, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "34:7:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "value": null, "visibility": "internal"}, {"constant": false, "id": 291, "name": "y", "nodeType": "VariableDeclaration", "scope": 343, "src": "47:9:5", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 290, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "47:7:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "value": null, "visibility": "internal"}, {"constant": false, "id": 293, "name": "i", "nodeType": "VariableDeclaration", "scope": 343, "src": "60:3:5", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_contract$_I_$474", "typeString": "contract I"}, "typeName": {"contractScope": null, "id": 292, "name": "I", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 474, "src": "60:1:5", "typeDescriptions": {"typeIdentifier": "t_contract$_I_$474", "typeString": "contract I"}}, "value": null, "visibility": "internal"}, {"body": {"id": 313, "nodeType": "Block", "src": "101:48:5", "statements": [{"expression": {"argumentTypes": null, "id": 300, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"argumentTypes": null, "id": 298, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 289, "src": "107:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"argumentTypes": null, "hexValue": "30", "id": 299, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "111:1:5", "subdenomination": null, "typeDescriptions": {"typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0"}, "value": "0"}, "src": "107:5:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 301, "nodeType": "ExpressionStatement", "src": "107:5:5"}, {"expression": {"argumentTypes": null, "id": 304, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"argumentTypes": null, "id": 302, "name": "y", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 291, "src": "118:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"argumentTypes": null, "id": 303, "name": "yval", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 295, "src": "122:4:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "118:8:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 305, "nodeType": "ExpressionStatement", "src": "118:8:5"}, {"expression": {"argumentTypes": null, "id": 311, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"argumentTypes": null, "id": 306, "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 293, "src": "132:1:5", "typeDescriptions": {"typeIdentifier": "t_contract$_I_$474", "typeString": "contract I"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"argumentTypes": null, "arguments": [{"argumentTypes": null, "hexValue": "35", "id": 309, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "142:1:5", "subdenomination": null, "typeDescriptions": {"typeIdentifier": "t_rational_5_by_1", "typeString": "int_const 5"}, "value": "5"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_rational_5_by_1", "typeString": "int_const 5"}], "id": 308, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "NewExpression", "src": "136:5:5", "typeDescriptions": {"typeIdentifier": "t_function_creation_nonpayable$_t_uint256_$returns$_t_contract$_I_$474_$", "typeString": "function (uint256) returns (contract I)"}, "typeName": {"contractScope": null, "id": 307, "name": "I", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 474, "src": "140:1:5", "typeDescriptions": {"typeIdentifier": "t_contract$_I_$474", "typeString": "contract I"}}}, "id": 310, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "136:8:5", "typeDescriptions": {"typeIdentifier": "t_contract$_I_$474", "typeString": "contract I"}}, "src": "132:12:5", "typeDescriptions": {"typeIdentifier": "t_contract$_I_$474", "typeString": "contract I"}}, "id": 312, "nodeType": "ExpressionStatement", "src": "132:12:5"}]}, "documentation": null, "id": 314, "implemented": true, "kind": "constructor", "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "parameters": {"id": 296, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 295, "name": "yval", "nodeType": "VariableDeclaration", "scope": 314, "src": "80:12:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 294, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "80:7:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "value": null, "visibility": "internal"}], "src": "79:14:5"}, "returnParameters": {"id": 297, "nodeType": "ParameterList", "parameters": [], "src": "101:0:5"}, "scope": 343, "src": "68:81:5", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public"}, {"body": {"id": 323, "nodeType": "Block", "src": "198:25:5", "statements": [{"expression": {"argumentTypes": null, "arguments": [], "expression": {"argumentTypes": [], "expression": {"argumentTypes": null, "id": 319, "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 293, "src": "211:1:5", "typeDescriptions": {"typeIdentifier": "t_contract$_I_$474", "typeString": "contract I"}}, "id": 320, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sum", "nodeType": "MemberAccess", "referencedDeclaration": 457, "src": "211:5:5", "typeDescriptions": {"typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", "typeString": "function () view external returns (uint256)"}}, "id": 321, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "211:7:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "functionReturnParameters": 318, "id": 322, "nodeType": "Return", "src": "204:14:5"}]}, "documentation": null, "id": 324, "implemented": true, "kind": "function", "modifiers": [], "name": "sum", "nodeType": "FunctionDefinition", "parameters": {"id": 315, "nodeType": "ParameterList", "parameters": [], "src": "165:2:5"}, "returnParameters": {"id": 318, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 317, "name": "", "nodeType": "VariableDeclaration", "scope": 324, "src": "189:7:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 316, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "189:7:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "value": null, "visibility": "internal"}], "src": "188:9:5"}, "scope": 343, "src": "153:70:5", "stateMutability": "view", "superFunction": null, "visibility": "public"}, {"body": {"id": 341, "nodeType": "Block", "src": "262:39:5", "statements": [{"expression": {"argumentTypes": null, "id": 331, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"argumentTypes": null, "id": 329, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 289, "src": "268:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"argumentTypes": null, "id": 330, "name": "xval", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 326, "src": "272:4:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "268:8:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 332, "nodeType": "ExpressionStatement", "src": "268:8:5"}, {"expression": {"argumentTypes": null, "arguments": [{"argumentTypes": null, "commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 338, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"argumentTypes": null, "id": 336, "name": "xval", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 326, "src": "289:4:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"argumentTypes": null, "hexValue": "31", "id": 337, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "294:1:5", "subdenomination": null, "typeDescriptions": {"typeIdentifier": "t_rational_1_by_1", "typeString": "int_const 1"}, "value": "1"}, "src": "289:6:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}], "expression": {"argumentTypes": null, "id": 333, "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 293, "src": "282:1:5", "typeDescriptions": {"typeIdentifier": "t_contract$_I_$474", "typeString": "contract I"}}, "id": 335, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "setX", "nodeType": "MemberAccess", "referencedDeclaration": 473, "src": "282:6:5", "typeDescriptions": {"typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$", "typeString": "function (uint256) external"}}, "id": 339, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "282:14:5", "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 340, "nodeType": "ExpressionStatement", "src": "282:14:5"}]}, "documentation": null, "id": 342, "implemented": true, "kind": "function", "modifiers": [], "name": "setX", "nodeType": "FunctionDefinition", "parameters": {"id": 327, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 326, "name": "xval", "nodeType": "VariableDeclaration", "scope": 342, "src": "241:12:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 325, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "241:7:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "value": null, "visibility": "internal"}], "src": "240:14:5"}, "returnParameters": {"id": 328, "nodeType": "ParameterList", "parameters": [], "src": "262:0:5"}, "scope": 343, "src": "227:74:5", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public"}], "scope": 344, "src": "19:284:5"}], "src": "0:304:5"}, "userdoc": {"methods": {}, "notice": null}, "devdoc": {"methods": {}, "author": null, "details": null, "title": null}} \ No newline at end of file diff --git a/tests/expected/solc-multi-file/combined_solc.json b/tests/expected/solc-multi-file/combined_solc.json new file mode 100644 index 00000000..d7a3e33a --- /dev/null +++ b/tests/expected/solc-multi-file/combined_solc.json @@ -0,0 +1 @@ +["TMPDIR/solc-multi-file/A.sol","TMPDIR/solc-multi-file/C.sol","TMPDIR/solc-multi-file/E/E.sol","TMPDIR/solc-multi-file/E/G.sol","TMPDIR/solc-multi-file/I/I.sol","TMPDIR/solc-multi-file/I/K.sol"] \ No newline at end of file diff --git a/tests/hardhat-multi-file/contracts/A.sol b/tests/hardhat-multi-file/contracts/A.sol new file mode 100644 index 00000000..0bb6bd5f --- /dev/null +++ b/tests/hardhat-multi-file/contracts/A.sol @@ -0,0 +1,51 @@ +//SPDX-License-Identifier: Unlicense +pragma solidity ^0.7.0; + +import "./C.sol"; +import "./E/G.sol"; +import "./I/K.sol"; + +contract A { + uint256 x; + uint256 y; + uint256 z; + B b; + C c; + D d; + + constructor(uint256 yval, uint256 zval) { + x = 0; + y = yval; + z = zval; + b = new B(); + c = new C(zval); + d = new D(zval); + } + + function sum() public view returns (uint256) { + return x+y+z+b.diff()+c.sum()+d.diff(); + } + + function set(uint256 xval) public { + x = xval; + c.setX(xval); + } +} + +contract B { + uint256 x; + uint256 y; + G g; + K k; + + constructor() { + x = 0; + y = 6; + g = new G(x+1); + k = new K(x+2); + } + + function diff() public view returns (uint256) { + return x-y+g.sum(); + } +} diff --git a/tests/hardhat-multi-file/contracts/C.sol b/tests/hardhat-multi-file/contracts/C.sol new file mode 100644 index 00000000..ccbe12f5 --- /dev/null +++ b/tests/hardhat-multi-file/contracts/C.sol @@ -0,0 +1,36 @@ +//SPDX-License-Identifier: Unlicense +pragma solidity ^0.7.0; + +contract C { + uint256 x; + uint256 y; + + constructor(uint256 yval) { + x = 0; + y = yval; + } + + function sum() public view returns (uint256) { + return x+y; + } + + function setX(uint256 xval) public { + x = xval; + } +} + +contract D { + uint256 x; + uint256 y; + C c; + + constructor(uint256 yval) { + x = 0; + y = yval; + c = new C(5); + } + + function diff() public view returns (uint256) { + return x-y; + } +} diff --git a/tests/hardhat-multi-file/contracts/E/E.sol b/tests/hardhat-multi-file/contracts/E/E.sol new file mode 100644 index 00000000..db3f88d9 --- /dev/null +++ b/tests/hardhat-multi-file/contracts/E/E.sol @@ -0,0 +1,25 @@ +//SPDX-License-Identifier: Unlicense +pragma solidity ^0.7.0; + +import "../C.sol"; +import "../I/I.sol"; + +contract E { + uint256 x; + uint256 y; + D d; + + constructor(uint256 yval) { + x = 0; + y = yval; + d = new D(yval); + } + + function sum() public view returns (uint256) { + return x+y+d.diff(); + } + + function setX(uint256 xval) public { + x = xval; + } +} diff --git a/tests/hardhat-multi-file/contracts/E/G.sol b/tests/hardhat-multi-file/contracts/E/G.sol new file mode 100644 index 00000000..8683fab2 --- /dev/null +++ b/tests/hardhat-multi-file/contracts/E/G.sol @@ -0,0 +1,25 @@ +//SPDX-License-Identifier: Unlicense +pragma solidity ^0.7.0; + +import "./E.sol"; + +contract G { + uint256 x; + uint256 y; + E e; + + constructor(uint256 yval) { + x = 0; + y = yval; + e = new E(5); + } + + function sum() public view returns (uint256) { + return e.sum(); + } + + function setX(uint256 xval) public { + x = xval; + e.setX(xval+1); + } +} diff --git a/tests/hardhat-multi-file/contracts/I/I.sol b/tests/hardhat-multi-file/contracts/I/I.sol new file mode 100644 index 00000000..a1963604 --- /dev/null +++ b/tests/hardhat-multi-file/contracts/I/I.sol @@ -0,0 +1,28 @@ +//SPDX-License-Identifier: Unlicense +pragma solidity ^0.7.0; + +import "../C.sol"; +import "../E/E.sol"; + +contract I { + uint256 x; + uint256 y; + D d; + E e; + + constructor(uint256 yval) { + x = 0; + y = yval; + d = new D(yval); + e = new E(yval+1); + } + + function sum() public view returns (uint256) { + return x+y+d.diff()+e.sum(); + } + + function setX(uint256 xval) public { + x = xval; + e.setX(y); + } +} diff --git a/tests/hardhat-multi-file/contracts/I/K.sol b/tests/hardhat-multi-file/contracts/I/K.sol new file mode 100644 index 00000000..65f1bd73 --- /dev/null +++ b/tests/hardhat-multi-file/contracts/I/K.sol @@ -0,0 +1,25 @@ +//SPDX-License-Identifier: Unlicense +pragma solidity ^0.7.0; + +import "./I.sol"; + +contract K { + uint256 x; + uint256 y; + I i; + + constructor(uint256 yval) { + x = 0; + y = yval; + i = new I(5); + } + + function sum() public view returns (uint256) { + return i.sum(); + } + + function setX(uint256 xval) public { + x = xval; + i.setX(xval+1); + } +} diff --git a/tests/hardhat-multi-file/contracts/X/X.sol b/tests/hardhat-multi-file/contracts/X/X.sol new file mode 100644 index 00000000..dd590b27 --- /dev/null +++ b/tests/hardhat-multi-file/contracts/X/X.sol @@ -0,0 +1,28 @@ +//SPDX-License-Identifier: Unlicense +pragma solidity ^0.7.0; + +import "../C.sol"; +import "../E/E.sol"; + +contract X { + uint256 x; + uint256 y; + D d; + E e; + + constructor(uint256 yval) { + x = 0; + y = yval; + d = new D(yval); + e = new E(yval+1); + } + + function sum() public view returns (uint256) { + return x+y+d.diff()+e.sum(); + } + + function setX(uint256 xval) public { + x = xval; + e.setX(y); + } +} diff --git a/tests/hardhat-multi-file/contracts/X/Z.sol b/tests/hardhat-multi-file/contracts/X/Z.sol new file mode 100644 index 00000000..201b7451 --- /dev/null +++ b/tests/hardhat-multi-file/contracts/X/Z.sol @@ -0,0 +1,22 @@ +//SPDX-License-Identifier: Unlicense +pragma solidity ^0.7.0; + +import "./X.sol"; + +contract Z { + uint256 y; + X x; + + constructor(uint256 yval) { + y = yval; + x = new X(5); + } + + function sum() public view returns (uint256) { + return x.sum(); + } + + function setX(uint256 xval) public { + x.setX(xval+1); + } +} diff --git a/tests/hardhat-multi-file/hardhat.config.js b/tests/hardhat-multi-file/hardhat.config.js new file mode 100644 index 00000000..c51cfb93 --- /dev/null +++ b/tests/hardhat-multi-file/hardhat.config.js @@ -0,0 +1,22 @@ +require("@nomiclabs/hardhat-waffle"); + +// This is a sample Hardhat task. To learn how to create your own go to +// https://hardhat.org/guides/create-task.html +task("accounts", "Prints the list of accounts", async () => { + const accounts = await ethers.getSigners(); + + for (const account of accounts) { + console.log(account.address); + } +}); + +// You need to export an object to set up your config +// Go to https://hardhat.org/config/ to learn more + +/** + * @type import('hardhat/config').HardhatUserConfig + */ +module.exports = { + solidity: "0.7.3", +}; + diff --git a/tests/hardhat-multi-file/package.json b/tests/hardhat-multi-file/package.json new file mode 100644 index 00000000..074828dd --- /dev/null +++ b/tests/hardhat-multi-file/package.json @@ -0,0 +1,11 @@ +{ + "name": "hardhat-project", + "devDependencies": { + "@nomiclabs/hardhat-ethers": "^2.0.0", + "@nomiclabs/hardhat-waffle": "^2.0.0", + "chai": "^4.2.0", + "ethereum-waffle": "^3.2.0", + "ethers": "^5.0.19", + "hardhat": "^2.0.2" + } +} diff --git a/tests/hardhat-multi-file/scripts/sample-script.js b/tests/hardhat-multi-file/scripts/sample-script.js new file mode 100644 index 00000000..2b7bcd93 --- /dev/null +++ b/tests/hardhat-multi-file/scripts/sample-script.js @@ -0,0 +1,32 @@ +// We require the Hardhat Runtime Environment explicitly here. This is optional +// but useful for running the script in a standalone fashion through `node