Skip to content

Commit

Permalink
Merge pull request #113 from tkernell/tellor
Browse files Browse the repository at this point in the history
Update Tellor Module
  • Loading branch information
auryn-macmillan authored Mar 29, 2023
2 parents 4098d62 + 5acef43 commit 2bc4581
Show file tree
Hide file tree
Showing 4 changed files with 178 additions and 22 deletions.
166 changes: 154 additions & 12 deletions src/abi/Tellor.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -413,11 +413,6 @@
],
"name": "getDataBefore",
"outputs": [
{
"internalType": "bool",
"name": "_ifRetrieve",
"type": "bool"
},
{
"internalType": "bytes",
"name": "_value",
Expand Down Expand Up @@ -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": [
{
Expand Down Expand Up @@ -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": [
{
Expand Down Expand Up @@ -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": [
{
Expand Down Expand Up @@ -588,6 +675,19 @@
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "idMappingContract",
"outputs": [
{
"internalType": "contract IMappingContract",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
Expand Down Expand Up @@ -727,6 +827,19 @@
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_addy",
"type": "address"
}
],
"name": "setIdMappingContract",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
Expand Down Expand Up @@ -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"
}
]
]
15 changes: 12 additions & 3 deletions src/deployments.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"v1.1.0": "0x61Ddf82AD2f9598ba4A0Be3c2369bFEd71B73cbA"
},
"tellor": {
"v1.0.1": "0x7D5f5EaF541AC203Ee1424895b6997041C886FBE"
"v2.0.0": "0xcc4C0ED5958770B5036189394360C33DDECf8414"
},
"realityETH": {
"v1.0.0": "0x72d453a685c27580acDFcF495830EB16B7E165f8"
Expand Down Expand Up @@ -91,6 +91,9 @@
"realityERC20": {
"v1.0.0": "0x6f628F0c3A3Ff75c39CF310901f10d79692Ed889"
},
"tellor": {
"v2.0.0": "0xcc4C0ED5958770B5036189394360C33DDECf8414"
},
"bridge": {
"v1.0.0": "0x457042756F2B1056487173003D27f37644C119f3"
},
Expand Down Expand Up @@ -126,6 +129,9 @@
"realityERC20": {
"v1.0.0": "0x6f628F0c3A3Ff75c39CF310901f10d79692Ed889"
},
"tellor": {
"v2.0.0": "0xcc4C0ED5958770B5036189394360C33DDECf8414"
},
"bridge": {
"v1.0.0": "0x457042756F2B1056487173003D27f37644C119f3"
},
Expand Down Expand Up @@ -160,6 +166,9 @@
"realityERC20": {
"v1.0.0": "0x6f628F0c3A3Ff75c39CF310901f10d79692Ed889"
},
"tellor": {
"v2.0.0": "0xcc4C0ED5958770B5036189394360C33DDECf8414"
},
"bridge": {
"v1.0.0": "0x457042756F2B1056487173003D27f37644C119f3"
},
Expand Down Expand Up @@ -193,7 +202,7 @@
"v1.1.0": "0xeBa54EaaCe9B0b534099d3f52CB1fe9Ad714e98e"
},
"tellor": {
"v1.0.1": "0xEAB27A2Dc46431B96126f20bFC3197eD8247ed79"
"v2.0.0": "0xcc4C0ED5958770B5036189394360C33DDECf8414"
},
"realityETH": {
"v1.0.0": "0x72d453a685c27580acDFcF495830EB16B7E165f8"
Expand Down Expand Up @@ -236,7 +245,7 @@
"v1.0.0": "0xe2847462a574bfd43014d1c7BB6De5769C294691"
},
"tellor": {
"v1.0.1": "0xBCc265bDbc5a26D9279250b6e9CbD5527EEf4FAD"
"v2.0.0": "0xcc4C0ED5958770B5036189394360C33DDECf8414"
},
"realityETH": {
"v1.0.0": "0x72d453a685c27580acDFcF495830EB16B7E165f8"
Expand Down
17 changes: 11 additions & 6 deletions src/factory/contracts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export const MasterCopyAddresses: Record<KnownContracts, string> = {
[KnownContracts.CIRCULATING_SUPPLY_ERC721]:
"0xBD34D00dC0ae37C687F784A11FA6a0F2c5726Ba3",
[KnownContracts.ROLES]: "0xD8DfC1d938D7D163C5231688341e9635E9011889",
[KnownContracts.TELLOR]: "",
[KnownContracts.TELLOR]: "0xcc4C0ED5958770B5036189394360C33DDECf8414",
[KnownContracts.OPTIMISTIC_GOVERNOR]: "",
[KnownContracts.OZ_GOVERNOR]: "0xe28c39FAC73cce2B33C4C003049e2F3AE43f77d5",
[KnownContracts.ERC20_VOTES]: "0x752c61de75ADA0F8a33e048d2F773f51172f033e",
Expand All @@ -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 },
Expand Down
2 changes: 1 addition & 1 deletion src/factory/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down

0 comments on commit 2bc4581

Please sign in to comment.