mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Drop constant and payable fields from ABI.
This commit is contained in:
@@ -5,7 +5,6 @@ contract test {
|
||||
// :test
|
||||
// [
|
||||
// {
|
||||
// "constant": false,
|
||||
// "inputs":
|
||||
// [
|
||||
// {
|
||||
@@ -23,7 +22,6 @@ contract test {
|
||||
// "type": "uint256"
|
||||
// }
|
||||
// ],
|
||||
// "payable": false,
|
||||
// "stateMutability": "nonpayable",
|
||||
// "type": "function"
|
||||
// }
|
||||
|
||||
@@ -23,7 +23,6 @@ contract test {
|
||||
// "type": "bool"
|
||||
// }
|
||||
// ],
|
||||
// "payable": false,
|
||||
// "stateMutability": "nonpayable",
|
||||
// "type": "constructor"
|
||||
// }
|
||||
|
||||
@@ -9,7 +9,6 @@ contract test {
|
||||
// :test
|
||||
// [
|
||||
// {
|
||||
// "constant": false,
|
||||
// "inputs":
|
||||
// [
|
||||
// {
|
||||
@@ -37,7 +36,6 @@ contract test {
|
||||
// "type": "uint256"
|
||||
// }
|
||||
// ],
|
||||
// "payable": false,
|
||||
// "stateMutability": "nonpayable",
|
||||
// "type": "function"
|
||||
// }
|
||||
|
||||
@@ -7,7 +7,6 @@ contract test {
|
||||
// :test
|
||||
// [
|
||||
// {
|
||||
// "constant": false,
|
||||
// "inputs":
|
||||
// [
|
||||
// {
|
||||
@@ -25,7 +24,6 @@ contract test {
|
||||
// "type": "uint256"
|
||||
// }
|
||||
// ],
|
||||
// "payable": false,
|
||||
// "stateMutability": "nonpayable",
|
||||
// "type": "function"
|
||||
// }
|
||||
|
||||
@@ -55,7 +55,6 @@ contract test {
|
||||
// "type": "event"
|
||||
// },
|
||||
// {
|
||||
// "constant": false,
|
||||
// "inputs":
|
||||
// [
|
||||
// {
|
||||
@@ -73,7 +72,6 @@ contract test {
|
||||
// "type": "uint256"
|
||||
// }
|
||||
// ],
|
||||
// "payable": false,
|
||||
// "stateMutability": "nonpayable",
|
||||
// "type": "function"
|
||||
// }
|
||||
|
||||
@@ -5,7 +5,6 @@ contract test {
|
||||
// :test
|
||||
// [
|
||||
// {
|
||||
// "constant": false,
|
||||
// "inputs":
|
||||
// [
|
||||
// {
|
||||
@@ -16,7 +15,6 @@ contract test {
|
||||
// ],
|
||||
// "name": "g",
|
||||
// "outputs": [],
|
||||
// "payable": false,
|
||||
// "stateMutability": "nonpayable",
|
||||
// "type": "function"
|
||||
// }
|
||||
|
||||
@@ -5,7 +5,6 @@ contract test {
|
||||
// :test
|
||||
// [
|
||||
// {
|
||||
// "constant": false,
|
||||
// "inputs":
|
||||
// [
|
||||
// {
|
||||
@@ -16,7 +15,6 @@ contract test {
|
||||
// ],
|
||||
// "name": "g",
|
||||
// "outputs": [],
|
||||
// "payable": false,
|
||||
// "stateMutability": "nonpayable",
|
||||
// "type": "function"
|
||||
// }
|
||||
|
||||
@@ -8,7 +8,6 @@ contract C {
|
||||
// :C
|
||||
// [
|
||||
// {
|
||||
// "constant": true,
|
||||
// "inputs":
|
||||
// [
|
||||
// {
|
||||
@@ -27,12 +26,10 @@ contract C {
|
||||
// ],
|
||||
// "name": "f",
|
||||
// "outputs": [],
|
||||
// "payable": false,
|
||||
// "stateMutability": "view",
|
||||
// "type": "function"
|
||||
// },
|
||||
// {
|
||||
// "constant": true,
|
||||
// "inputs":
|
||||
// [
|
||||
// {
|
||||
@@ -51,7 +48,6 @@ contract C {
|
||||
// ],
|
||||
// "name": "g",
|
||||
// "outputs": [],
|
||||
// "payable": false,
|
||||
// "stateMutability": "view",
|
||||
// "type": "function"
|
||||
// }
|
||||
|
||||
@@ -5,7 +5,6 @@ contract test {
|
||||
// :test
|
||||
// [
|
||||
// {
|
||||
// "payable": false,
|
||||
// "stateMutability": "nonpayable",
|
||||
// "type": "fallback"
|
||||
// }
|
||||
|
||||
@@ -24,7 +24,6 @@ contract Derived is Base {
|
||||
// "type": "event"
|
||||
// },
|
||||
// {
|
||||
// "constant": false,
|
||||
// "inputs":
|
||||
// [
|
||||
// {
|
||||
@@ -42,7 +41,6 @@ contract Derived is Base {
|
||||
// "type": "uint256"
|
||||
// }
|
||||
// ],
|
||||
// "payable": false,
|
||||
// "stateMutability": "nonpayable",
|
||||
// "type": "function"
|
||||
// }
|
||||
@@ -80,7 +78,6 @@ contract Derived is Base {
|
||||
// "type": "event"
|
||||
// },
|
||||
// {
|
||||
// "constant": false,
|
||||
// "inputs":
|
||||
// [
|
||||
// {
|
||||
@@ -98,12 +95,10 @@ contract Derived is Base {
|
||||
// "type": "uint256"
|
||||
// }
|
||||
// ],
|
||||
// "payable": false,
|
||||
// "stateMutability": "nonpayable",
|
||||
// "type": "function"
|
||||
// },
|
||||
// {
|
||||
// "constant": false,
|
||||
// "inputs":
|
||||
// [
|
||||
// {
|
||||
@@ -121,7 +116,6 @@ contract Derived is Base {
|
||||
// "type": "bytes32"
|
||||
// }
|
||||
// ],
|
||||
// "payable": false,
|
||||
// "stateMutability": "nonpayable",
|
||||
// "type": "function"
|
||||
// }
|
||||
|
||||
@@ -7,7 +7,6 @@ library test {
|
||||
// :test
|
||||
// [
|
||||
// {
|
||||
// "constant": true,
|
||||
// "inputs":
|
||||
// [
|
||||
// {
|
||||
@@ -30,7 +29,6 @@ library test {
|
||||
// "type": "uint256[]"
|
||||
// }
|
||||
// ],
|
||||
// "payable": false,
|
||||
// "stateMutability": "pure",
|
||||
// "type": "function"
|
||||
// }
|
||||
|
||||
@@ -6,7 +6,6 @@ contract test {
|
||||
// :test
|
||||
// [
|
||||
// {
|
||||
// "constant": false,
|
||||
// "inputs":
|
||||
// [
|
||||
// {
|
||||
@@ -24,12 +23,10 @@ contract test {
|
||||
// "type": "uint256"
|
||||
// }
|
||||
// ],
|
||||
// "payable": false,
|
||||
// "stateMutability": "nonpayable",
|
||||
// "type": "function"
|
||||
// },
|
||||
// {
|
||||
// "constant": false,
|
||||
// "inputs":
|
||||
// [
|
||||
// {
|
||||
@@ -47,7 +44,6 @@ contract test {
|
||||
// "type": "uint256"
|
||||
// }
|
||||
// ],
|
||||
// "payable": false,
|
||||
// "stateMutability": "nonpayable",
|
||||
// "type": "function"
|
||||
// }
|
||||
|
||||
@@ -7,7 +7,6 @@ contract test {
|
||||
// :test
|
||||
// [
|
||||
// {
|
||||
// "constant": false,
|
||||
// "inputs":
|
||||
// [
|
||||
// {
|
||||
@@ -25,12 +24,10 @@ contract test {
|
||||
// "type": "uint256"
|
||||
// }
|
||||
// ],
|
||||
// "payable": false,
|
||||
// "stateMutability": "nonpayable",
|
||||
// "type": "function"
|
||||
// },
|
||||
// {
|
||||
// "constant": false,
|
||||
// "inputs":
|
||||
// [
|
||||
// {
|
||||
@@ -48,7 +45,6 @@ contract test {
|
||||
// "type": "uint256"
|
||||
// }
|
||||
// ],
|
||||
// "payable": false,
|
||||
// "stateMutability": "nonpayable",
|
||||
// "type": "function"
|
||||
// }
|
||||
|
||||
@@ -5,7 +5,6 @@ contract test {
|
||||
// :test
|
||||
// [
|
||||
// {
|
||||
// "constant": false,
|
||||
// "inputs":
|
||||
// [
|
||||
// {
|
||||
@@ -28,7 +27,6 @@ contract test {
|
||||
// "type": "uint256"
|
||||
// }
|
||||
// ],
|
||||
// "payable": false,
|
||||
// "stateMutability": "nonpayable",
|
||||
// "type": "function"
|
||||
// }
|
||||
|
||||
@@ -5,7 +5,6 @@ contract test {
|
||||
// :test
|
||||
// [
|
||||
// {
|
||||
// "payable": true,
|
||||
// "stateMutability": "payable",
|
||||
// "type": "fallback"
|
||||
// }
|
||||
|
||||
@@ -23,7 +23,6 @@ contract test {
|
||||
// "type": "bool"
|
||||
// }
|
||||
// ],
|
||||
// "payable": true,
|
||||
// "stateMutability": "payable",
|
||||
// "type": "constructor"
|
||||
// }
|
||||
|
||||
@@ -6,20 +6,16 @@ contract test {
|
||||
// :test
|
||||
// [
|
||||
// {
|
||||
// "constant": false,
|
||||
// "inputs": [],
|
||||
// "name": "f",
|
||||
// "outputs": [],
|
||||
// "payable": false,
|
||||
// "stateMutability": "nonpayable",
|
||||
// "type": "function"
|
||||
// },
|
||||
// {
|
||||
// "constant": false,
|
||||
// "inputs": [],
|
||||
// "name": "g",
|
||||
// "outputs": [],
|
||||
// "payable": true,
|
||||
// "stateMutability": "payable",
|
||||
// "type": "function"
|
||||
// }
|
||||
|
||||
@@ -6,7 +6,6 @@ contract test {
|
||||
// :test
|
||||
// [
|
||||
// {
|
||||
// "constant": true,
|
||||
// "inputs":
|
||||
// [
|
||||
// {
|
||||
@@ -24,12 +23,10 @@ contract test {
|
||||
// "type": "uint256"
|
||||
// }
|
||||
// ],
|
||||
// "payable": false,
|
||||
// "stateMutability": "pure",
|
||||
// "type": "function"
|
||||
// },
|
||||
// {
|
||||
// "constant": false,
|
||||
// "inputs":
|
||||
// [
|
||||
// {
|
||||
@@ -52,7 +49,6 @@ contract test {
|
||||
// "type": "uint256"
|
||||
// }
|
||||
// ],
|
||||
// "payable": false,
|
||||
// "stateMutability": "nonpayable",
|
||||
// "type": "function"
|
||||
// }
|
||||
|
||||
@@ -19,12 +19,10 @@ contract test {
|
||||
// "type": "uint8"
|
||||
// }
|
||||
// ],
|
||||
// "payable": false,
|
||||
// "stateMutability": "nonpayable",
|
||||
// "type": "constructor"
|
||||
// },
|
||||
// {
|
||||
// "constant": false,
|
||||
// "inputs": [],
|
||||
// "name": "ret",
|
||||
// "outputs":
|
||||
@@ -35,7 +33,6 @@ contract test {
|
||||
// "type": "uint8"
|
||||
// }
|
||||
// ],
|
||||
// "payable": false,
|
||||
// "stateMutability": "nonpayable",
|
||||
// "type": "function"
|
||||
// }
|
||||
|
||||
@@ -9,7 +9,6 @@ contract C {
|
||||
// :C
|
||||
// [
|
||||
// {
|
||||
// "constant": false,
|
||||
// "inputs": [],
|
||||
// "name": "f",
|
||||
// "outputs":
|
||||
@@ -46,7 +45,6 @@ contract C {
|
||||
// "type": "tuple"
|
||||
// }
|
||||
// ],
|
||||
// "payable": false,
|
||||
// "stateMutability": "nonpayable",
|
||||
// "type": "function"
|
||||
// }
|
||||
|
||||
@@ -8,7 +8,6 @@ contract C {
|
||||
// :C
|
||||
// [
|
||||
// {
|
||||
// "constant": false,
|
||||
// "inputs": [],
|
||||
// "name": "f",
|
||||
// "outputs":
|
||||
@@ -37,7 +36,6 @@ contract C {
|
||||
// "type": "address"
|
||||
// }
|
||||
// ],
|
||||
// "payable": false,
|
||||
// "stateMutability": "nonpayable",
|
||||
// "type": "function"
|
||||
// }
|
||||
|
||||
@@ -6,7 +6,6 @@ contract test {
|
||||
// :test
|
||||
// [
|
||||
// {
|
||||
// "constant": false,
|
||||
// "inputs":
|
||||
// [
|
||||
// {
|
||||
@@ -27,7 +26,6 @@ contract test {
|
||||
// ],
|
||||
// "name": "f",
|
||||
// "outputs": [],
|
||||
// "payable": false,
|
||||
// "stateMutability": "nonpayable",
|
||||
// "type": "function"
|
||||
// }
|
||||
|
||||
@@ -9,7 +9,6 @@ library L {
|
||||
// :L
|
||||
// [
|
||||
// {
|
||||
// "constant": true,
|
||||
// "inputs":
|
||||
// [
|
||||
// {
|
||||
@@ -46,7 +45,6 @@ library L {
|
||||
// ],
|
||||
// "name": "g",
|
||||
// "outputs": [],
|
||||
// "payable": false,
|
||||
// "stateMutability": "view",
|
||||
// "type": "function"
|
||||
// }
|
||||
|
||||
@@ -6,7 +6,6 @@ contract test {
|
||||
// :test
|
||||
// [
|
||||
// {
|
||||
// "constant": true,
|
||||
// "inputs":
|
||||
// [
|
||||
// {
|
||||
@@ -24,12 +23,10 @@ contract test {
|
||||
// "type": "uint256"
|
||||
// }
|
||||
// ],
|
||||
// "payable": false,
|
||||
// "stateMutability": "view",
|
||||
// "type": "function"
|
||||
// },
|
||||
// {
|
||||
// "constant": false,
|
||||
// "inputs":
|
||||
// [
|
||||
// {
|
||||
@@ -52,7 +49,6 @@ contract test {
|
||||
// "type": "uint256"
|
||||
// }
|
||||
// ],
|
||||
// "payable": false,
|
||||
// "stateMutability": "nonpayable",
|
||||
// "type": "function"
|
||||
// }
|
||||
|
||||
@@ -615,7 +615,7 @@ BOOST_AUTO_TEST_CASE(output_selection_dependent_contract)
|
||||
Json::Value contract = getContractResult(result, "fileA", "A");
|
||||
BOOST_CHECK(contract.isObject());
|
||||
BOOST_CHECK(contract["abi"].isArray());
|
||||
BOOST_CHECK_EQUAL(dev::jsonCompactPrint(contract["abi"]), "[{\"constant\":false,\"inputs\":[],\"name\":\"f\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]");
|
||||
BOOST_CHECK_EQUAL(dev::jsonCompactPrint(contract["abi"]), "[{\"inputs\":[],\"name\":\"f\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]");
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(output_selection_dependent_contract_with_import)
|
||||
@@ -647,7 +647,7 @@ BOOST_AUTO_TEST_CASE(output_selection_dependent_contract_with_import)
|
||||
Json::Value contract = getContractResult(result, "fileA", "A");
|
||||
BOOST_CHECK(contract.isObject());
|
||||
BOOST_CHECK(contract["abi"].isArray());
|
||||
BOOST_CHECK_EQUAL(dev::jsonCompactPrint(contract["abi"]), "[{\"constant\":false,\"inputs\":[],\"name\":\"f\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]");
|
||||
BOOST_CHECK_EQUAL(dev::jsonCompactPrint(contract["abi"]), "[{\"inputs\":[],\"name\":\"f\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]");
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(filename_with_colon)
|
||||
|
||||
Reference in New Issue
Block a user