diff --git a/crates/json-abi/tests/abi.rs b/crates/json-abi/tests/abi.rs index 50f4b8383..42b94e653 100644 --- a/crates/json-abi/tests/abi.rs +++ b/crates/json-abi/tests/abi.rs @@ -80,6 +80,8 @@ fn to_sol_test(path: &str, abi: &JsonAbi, run_solc: bool) { let name = path.file_stem().unwrap().to_str().unwrap(); let mut abi = abi.clone(); + // Ignore constructors for Solc tests. + abi.constructor = None; abi.dedup(); let actual = abi.to_sol(name); @@ -110,9 +112,6 @@ fn to_sol_test(path: &str, abi: &JsonAbi, run_solc: bool) { Err(e) => panik(&format!("invalid JSON: {e}")), }; - // Constructor is ignored. - abi.constructor = None; - // Note that we don't compare the ABIs directly since the conversion is lossy, e.g. // `internalType` fields change. if solc_abi.len() != abi.len() { diff --git a/crates/json-abi/tests/abi/AggregationRouterV5.sol b/crates/json-abi/tests/abi/AggregationRouterV5.sol index bf04b16e0..f1163f982 100644 --- a/crates/json-abi/tests/abi/AggregationRouterV5.sol +++ b/crates/json-abi/tests/abi/AggregationRouterV5.sol @@ -84,8 +84,6 @@ interface AggregationRouterV5 { event OrderFilledRFQ(bytes32 orderHash, uint256 makingAmount); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); - constructor(address weth); - receive() external payable; function advanceNonce(uint8 amount) external; diff --git a/crates/json-abi/tests/abi/BlurExchange.sol b/crates/json-abi/tests/abi/BlurExchange.sol index 6a1e09318..fd66afa69 100644 --- a/crates/json-abi/tests/abi/BlurExchange.sol +++ b/crates/json-abi/tests/abi/BlurExchange.sol @@ -52,8 +52,6 @@ interface BlurExchange { event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); event Upgraded(address indexed implementation); - constructor(); - function FEE_TYPEHASH() external view returns (bytes32); function INVERSE_BASIS_POINT() external view returns (uint256); function NAME() external view returns (string memory); diff --git a/crates/json-abi/tests/abi/DoubleExponentInterestSetter.sol b/crates/json-abi/tests/abi/DoubleExponentInterestSetter.sol index bda5ee96f..da9ee9b95 100644 --- a/crates/json-abi/tests/abi/DoubleExponentInterestSetter.sol +++ b/crates/json-abi/tests/abi/DoubleExponentInterestSetter.sol @@ -1,6 +1,4 @@ interface DoubleExponentInterestSetter { - constructor((uint128, uint128) params); - function getCoefficients() external view returns (uint256[] memory); function getInterestRate(address, uint256 borrowWei, uint256 supplyWei) external view returns ((uint256,) memory); function getMaxAPR() external view returns (uint256); diff --git a/crates/json-abi/tests/abi/GaugeController.sol b/crates/json-abi/tests/abi/GaugeController.sol index 14173b307..6bfa479b0 100644 --- a/crates/json-abi/tests/abi/GaugeController.sol +++ b/crates/json-abi/tests/abi/GaugeController.sol @@ -7,8 +7,6 @@ interface GaugeController { event NewTypeWeight(int128 type_id, uint256 time, uint256 weight, uint256 total_weight); event VoteForGauge(uint256 time, address user, address gauge_addr, uint256 weight); - constructor(address _token, address _voting_escrow); - function add_gauge(address addr, int128 gauge_type, uint256 weight) external; function add_type(string memory _name, uint256 weight) external; function admin() external view returns (address); diff --git a/crates/json-abi/tests/abi/GnosisSafe.sol b/crates/json-abi/tests/abi/GnosisSafe.sol index 772733f60..0dc1d37ef 100644 --- a/crates/json-abi/tests/abi/GnosisSafe.sol +++ b/crates/json-abi/tests/abi/GnosisSafe.sol @@ -14,8 +14,6 @@ interface GnosisSafe { event RemovedOwner(address owner); event SignMsg(bytes32 indexed msgHash); - constructor(); - fallback() external payable; function NAME() external view returns (string memory); diff --git a/crates/json-abi/tests/abi/Junkyard.sol b/crates/json-abi/tests/abi/Junkyard.sol index ac7182f1b..4e1ef9222 100644 --- a/crates/json-abi/tests/abi/Junkyard.sol +++ b/crates/json-abi/tests/abi/Junkyard.sol @@ -15,8 +15,6 @@ interface Junkyard { event PricesChange(uint256, uint256); event Unpaused(address account); - constructor(address[] jkdPayees, uint256[] jkdShares, address _gateway, address _gasReceiver); - receive() external payable; function GAS_RECEIVER() external view returns (address); diff --git a/crates/json-abi/tests/abi/LiquidityGaugeV4.sol b/crates/json-abi/tests/abi/LiquidityGaugeV4.sol index 9af73d0e8..89f8156b6 100644 --- a/crates/json-abi/tests/abi/LiquidityGaugeV4.sol +++ b/crates/json-abi/tests/abi/LiquidityGaugeV4.sol @@ -8,8 +8,6 @@ interface LiquidityGaugeV4 { event UpdateLiquidityLimit(address user, uint256 original_balance, uint256 original_supply, uint256 working_balance, uint256 working_supply); event Withdraw(address indexed provider, uint256 value); - constructor(); - function SDT() external view returns (address); function accept_transfer_ownership() external; function add_reward(address _reward_token, address _distributor) external; diff --git a/crates/json-abi/tests/abi/Seaport.sol b/crates/json-abi/tests/abi/Seaport.sol index 648f53e4c..8af2cb2b7 100644 --- a/crates/json-abi/tests/abi/Seaport.sol +++ b/crates/json-abi/tests/abi/Seaport.sol @@ -165,8 +165,6 @@ interface Seaport { event OrderValidated(bytes32 orderHash, OrderParameters orderParameters); event OrdersMatched(bytes32[] orderHashes); - constructor(address conduitController); - receive() external payable; function cancel(OrderComponents[] memory orders) external returns (bool cancelled); diff --git a/crates/json-abi/tests/abi/UniswapV2Factory.sol b/crates/json-abi/tests/abi/UniswapV2Factory.sol index 5f86f72d5..e6c2c4030 100644 --- a/crates/json-abi/tests/abi/UniswapV2Factory.sol +++ b/crates/json-abi/tests/abi/UniswapV2Factory.sol @@ -1,8 +1,6 @@ interface UniswapV2Factory { event PairCreated(address indexed token0, address indexed token1, address pair, uint256); - constructor(address _feeToSetter); - function allPairs(uint256) external view returns (address); function allPairsLength() external view returns (uint256); function createPair(address tokenA, address tokenB) external returns (address pair); diff --git a/crates/json-abi/tests/abi/UniswapV2FactoryWithMigrator.sol b/crates/json-abi/tests/abi/UniswapV2FactoryWithMigrator.sol index 531eb5812..0106dde8a 100644 --- a/crates/json-abi/tests/abi/UniswapV2FactoryWithMigrator.sol +++ b/crates/json-abi/tests/abi/UniswapV2FactoryWithMigrator.sol @@ -1,8 +1,6 @@ interface UniswapV2FactoryWithMigrator { event PairCreated(address indexed token0, address indexed token1, address pair, uint256); - constructor(address _feeToSetter); - function allPairs(uint256) external view returns (address); function allPairsLength() external view returns (uint256); function createPair(address tokenA, address tokenB) external returns (address pair); diff --git a/crates/json-abi/tests/abi/ZRXToken.sol b/crates/json-abi/tests/abi/ZRXToken.sol index b3840d269..16dceba47 100644 --- a/crates/json-abi/tests/abi/ZRXToken.sol +++ b/crates/json-abi/tests/abi/ZRXToken.sol @@ -2,8 +2,6 @@ interface ZRXToken { event Approval(address indexed _owner, address indexed _spender, uint256 _value); event Transfer(address indexed _from, address indexed _to, uint256 _value); - constructor(); - function allowance(address _owner, address _spender) external returns (uint256); function approve(address _spender, uint256 _value) external returns (bool); function balanceOf(address _owner) external returns (uint256); diff --git a/crates/json-abi/tests/abi/ZeroXExchange.sol b/crates/json-abi/tests/abi/ZeroXExchange.sol index e904a05e7..ade24b25c 100644 --- a/crates/json-abi/tests/abi/ZeroXExchange.sol +++ b/crates/json-abi/tests/abi/ZeroXExchange.sol @@ -5,8 +5,6 @@ interface ZeroXExchange { event Fill(address indexed makerAddress, address indexed feeRecipientAddress, address takerAddress, address senderAddress, uint256 makerAssetFilledAmount, uint256 takerAssetFilledAmount, uint256 makerFeePaid, uint256 takerFeePaid, bytes32 indexed orderHash, bytes makerAssetData, bytes takerAssetData); event SignatureValidatorApproval(address indexed signerAddress, address indexed validatorAddress, bool approved); - constructor(bytes _zrxAssetData); - function EIP712_DOMAIN_HASH() external view returns (bytes32); function VERSION() external view returns (string memory); function ZRX_ASSET_DATA() external view returns (bytes memory);