From 01b54d2c58bd49607d97feb4eeae7899e30cde8c Mon Sep 17 00:00:00 2001 From: Jayant Krishnamurthy Date: Tue, 23 May 2023 07:13:01 -0700 Subject: [PATCH] Add PythErrors abi (#827) * add error abis * add to script too --- .../sdk/solidity/abis/PythErrors.json | 67 +++++++++++++++++++ .../sdk/solidity/scripts/generateAbi.js | 8 ++- 2 files changed, 74 insertions(+), 1 deletion(-) create mode 100644 target_chains/ethereum/sdk/solidity/abis/PythErrors.json diff --git a/target_chains/ethereum/sdk/solidity/abis/PythErrors.json b/target_chains/ethereum/sdk/solidity/abis/PythErrors.json new file mode 100644 index 00000000..d59027e9 --- /dev/null +++ b/target_chains/ethereum/sdk/solidity/abis/PythErrors.json @@ -0,0 +1,67 @@ +[ + { + "inputs": [], + "name": "InsufficientFee", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidArgument", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidGovernanceDataSource", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidGovernanceMessage", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidGovernanceTarget", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidUpdateData", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidUpdateDataSource", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidWormholeVaa", + "type": "error" + }, + { + "inputs": [], + "name": "NoFreshUpdate", + "type": "error" + }, + { + "inputs": [], + "name": "OldGovernanceMessage", + "type": "error" + }, + { + "inputs": [], + "name": "PriceFeedNotFound", + "type": "error" + }, + { + "inputs": [], + "name": "PriceFeedNotFoundWithinRange", + "type": "error" + }, + { + "inputs": [], + "name": "StalePrice", + "type": "error" + } +] diff --git a/target_chains/ethereum/sdk/solidity/scripts/generateAbi.js b/target_chains/ethereum/sdk/solidity/scripts/generateAbi.js index dad412cc..196d5ff1 100644 --- a/target_chains/ethereum/sdk/solidity/scripts/generateAbi.js +++ b/target_chains/ethereum/sdk/solidity/scripts/generateAbi.js @@ -2,7 +2,13 @@ const fs = require("fs"); const solc = require("solc"); // Assuming each contract is in the file with the same name. -var contracts = ["IPyth", "IPythEvents", "AbstractPyth", "MockPyth"]; +var contracts = [ + "IPyth", + "IPythEvents", + "AbstractPyth", + "MockPyth", + "PythErrors", +]; var sources = {}; var outputSelection = {};