From 49dd789572cf2e2c59994d55a91a50883cba6b3e Mon Sep 17 00:00:00 2001 From: tkernell Date: Tue, 14 Mar 2023 20:18:53 -0500 Subject: [PATCH 1/2] update tellor module addresses --- src/deployments.json | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/deployments.json b/src/deployments.json index 0145ab9d..920aadd1 100644 --- a/src/deployments.json +++ b/src/deployments.json @@ -7,7 +7,7 @@ "v1.1.0": "0x61Ddf82AD2f9598ba4A0Be3c2369bFEd71B73cbA" }, "tellor": { - "v1.0.1": "0x7D5f5EaF541AC203Ee1424895b6997041C886FBE" + "v2.0.0": "0xcc4C0ED5958770B5036189394360C33DDECf8414" }, "realityETH": { "v1.0.0": "0x72d453a685c27580acDFcF495830EB16B7E165f8" @@ -91,6 +91,9 @@ "realityERC20": { "v1.0.0": "0x6f628F0c3A3Ff75c39CF310901f10d79692Ed889" }, + "tellor": { + "v2.0.0": "0xcc4C0ED5958770B5036189394360C33DDECf8414" + }, "bridge": { "v1.0.0": "0x457042756F2B1056487173003D27f37644C119f3" }, @@ -126,6 +129,9 @@ "realityERC20": { "v1.0.0": "0x6f628F0c3A3Ff75c39CF310901f10d79692Ed889" }, + "tellor": { + "v2.0.0": "0xcc4C0ED5958770B5036189394360C33DDECf8414" + }, "bridge": { "v1.0.0": "0x457042756F2B1056487173003D27f37644C119f3" }, @@ -160,6 +166,9 @@ "realityERC20": { "v1.0.0": "0x6f628F0c3A3Ff75c39CF310901f10d79692Ed889" }, + "tellor": { + "v2.0.0": "0xcc4C0ED5958770B5036189394360C33DDECf8414" + }, "bridge": { "v1.0.0": "0x457042756F2B1056487173003D27f37644C119f3" }, @@ -193,7 +202,7 @@ "v1.1.0": "0xeBa54EaaCe9B0b534099d3f52CB1fe9Ad714e98e" }, "tellor": { - "v1.0.1": "0xEAB27A2Dc46431B96126f20bFC3197eD8247ed79" + "v2.0.0": "0xcc4C0ED5958770B5036189394360C33DDECf8414" }, "realityETH": { "v1.0.0": "0x72d453a685c27580acDFcF495830EB16B7E165f8" @@ -236,7 +245,7 @@ "v1.0.0": "0xe2847462a574bfd43014d1c7BB6De5769C294691" }, "tellor": { - "v1.0.1": "0xBCc265bDbc5a26D9279250b6e9CbD5527EEf4FAD" + "v2.0.0": "0xcc4C0ED5958770B5036189394360C33DDECf8414" }, "realityETH": { "v1.0.0": "0x72d453a685c27580acDFcF495830EB16B7E165f8" From 5acef43f7bd654ebe803907f629771e8ecc329da Mon Sep 17 00:00:00 2001 From: tkernell Date: Tue, 14 Mar 2023 20:44:27 -0500 Subject: [PATCH 2/2] update tellor abi, contracts.ts, and types.ts --- src/abi/Tellor.json | 166 ++++++++++++++++++++++++++++++++++++--- src/factory/contracts.ts | 17 ++-- src/factory/types.ts | 2 +- 3 files changed, 166 insertions(+), 19 deletions(-) diff --git a/src/abi/Tellor.json b/src/abi/Tellor.json index 2730114f..591079a8 100644 --- a/src/abi/Tellor.json +++ b/src/abi/Tellor.json @@ -375,15 +375,15 @@ "internalType": "bytes32", "name": "_queryId", "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "_timestamp", + "type": "uint256" } ], - "name": "getCurrentValue", + "name": "getDataAfter", "outputs": [ - { - "internalType": "bool", - "name": "_ifRetrieve", - "type": "bool" - }, { "internalType": "bytes", "name": "_value", @@ -413,11 +413,6 @@ ], "name": "getDataBefore", "outputs": [ - { - "internalType": "bool", - "name": "_ifRetrieve", - "type": "bool" - }, { "internalType": "bytes", "name": "_value", @@ -445,6 +440,35 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_queryId", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "_timestamp", + "type": "uint256" + } + ], + "name": "getIndexForDataAfter", + "outputs": [ + { + "internalType": "bool", + "name": "_found", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "_index", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -474,6 +498,45 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_queryId", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "_timestamp", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_maxAge", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_maxCount", + "type": "uint256" + } + ], + "name": "getMultipleValuesBefore", + "outputs": [ + { + "internalType": "bytes[]", + "name": "_values", + "type": "bytes[]" + }, + { + "internalType": "uint256[]", + "name": "_timestamps", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -512,6 +575,30 @@ "stateMutability": "pure", "type": "function" }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_queryId", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "_timestamp", + "type": "uint256" + } + ], + "name": "getReporterByTimestamp", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -588,6 +675,19 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "idMappingContract", + "outputs": [ + { + "internalType": "contract IMappingContract", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -727,6 +827,19 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [ + { + "internalType": "address", + "name": "_addy", + "type": "address" + } + ], + "name": "setIdMappingContract", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { @@ -791,5 +904,34 @@ "outputs": [], "stateMutability": "nonpayable", "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_id", + "type": "bytes32" + } + ], + "name": "valueFor", + "outputs": [ + { + "internalType": "int256", + "name": "_value", + "type": "int256" + }, + { + "internalType": "uint256", + "name": "_timestamp", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_statusCode", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" } -] +] \ No newline at end of file diff --git a/src/factory/contracts.ts b/src/factory/contracts.ts index 413f6a91..0f4217e8 100644 --- a/src/factory/contracts.ts +++ b/src/factory/contracts.ts @@ -49,7 +49,7 @@ export const MasterCopyAddresses: Record = { [KnownContracts.CIRCULATING_SUPPLY_ERC721]: "0xBD34D00dC0ae37C687F784A11FA6a0F2c5726Ba3", [KnownContracts.ROLES]: "0xD8DfC1d938D7D163C5231688341e9635E9011889", - [KnownContracts.TELLOR]: "", + [KnownContracts.TELLOR]: "0xcc4C0ED5958770B5036189394360C33DDECf8414", [KnownContracts.OPTIMISTIC_GOVERNOR]: "", [KnownContracts.OZ_GOVERNOR]: "0xe28c39FAC73cce2B33C4C003049e2F3AE43f77d5", [KnownContracts.ERC20_VOTES]: "0x752c61de75ADA0F8a33e048d2F773f51172f033e", @@ -66,27 +66,32 @@ export const ContractAddresses: Record< > = { [SupportedNetworks.Mainnet]: { ...MasterCopyAddresses, - [KnownContracts.TELLOR]: "0x7D5f5EaF541AC203Ee1424895b6997041C886FBE", + [KnownContracts.TELLOR]: "0xcc4C0ED5958770B5036189394360C33DDECf8414", [KnownContracts.OPTIMISTIC_GOVERNOR]: "0x61Ddf82AD2f9598ba4A0Be3c2369bFEd71B73cbA", }, [SupportedNetworks.Goerli]: { ...MasterCopyAddresses, + [KnownContracts.TELLOR]: "0xcc4C0ED5958770B5036189394360C33DDECf8414", [KnownContracts.OPTIMISTIC_GOVERNOR]: "0x8Baa1BCF4e3572ec49F7Ec8ab2F9571bdDbd39fc", }, - [SupportedNetworks.BinanceSmartChain]: { ...MasterCopyAddresses }, - [SupportedNetworks.GnosisChain]: { ...MasterCopyAddresses }, + [SupportedNetworks.BinanceSmartChain]: { ...MasterCopyAddresses, + [KnownContracts.TELLOR]: "0xcc4C0ED5958770B5036189394360C33DDECf8414", + }, + [SupportedNetworks.GnosisChain]: { ...MasterCopyAddresses, + [KnownContracts.TELLOR]: "0xcc4C0ED5958770B5036189394360C33DDECf8414", + }, [SupportedNetworks.Polygon]: { ...MasterCopyAddresses, - [KnownContracts.TELLOR]: "0xEAB27A2Dc46431B96126f20bFC3197eD8247ed79", + [KnownContracts.TELLOR]: "0xcc4C0ED5958770B5036189394360C33DDECf8414", [KnownContracts.OPTIMISTIC_GOVERNOR]: "0xeBa54EaaCe9B0b534099d3f52CB1fe9Ad714e98e", }, [SupportedNetworks.HardhatNetwork]: { ...MasterCopyAddresses }, [SupportedNetworks.Mumbai]: { ...MasterCopyAddresses, - [KnownContracts.TELLOR]: "0xBCc265bDbc5a26D9279250b6e9CbD5527EEf4FAD", + [KnownContracts.TELLOR]: "0xcc4C0ED5958770B5036189394360C33DDECf8414", }, [SupportedNetworks.ArbitrumOne]: { ...MasterCopyAddresses }, [SupportedNetworks.Optimism]: { ...MasterCopyAddresses }, diff --git a/src/factory/types.ts b/src/factory/types.ts index dde83795..58fe9ec4 100644 --- a/src/factory/types.ts +++ b/src/factory/types.ts @@ -45,7 +45,7 @@ export enum KnownContracts { // type META_GUARD_VERSION = "v1.0.0"; // type OPTIMISTIC_GOVERNOR_VERSION = "v1.0.0"; -// type TELLOR_VERSION = "v1.0.1"; +// type TELLOR_VERSION = "v2.0.0"; // type REALITY_ETH_VERSION = "v1.0.0"; // type BRIDGE_VERSION = "v1.0.0"; // type DELAY_VERSION = "v1.0.0";