Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove temp dapidataregistry #60

Merged
merged 7 commits into from
Nov 2, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ module.exports = {
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/no-dynamic-delete': 'off',

// Lodash
'lodash/prefer-immutable-method': 'off',

// Jest
'jest/no-hooks': 'off',
},
Expand Down
31 changes: 0 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,37 +139,6 @@ A provider configuration.

The URL of the provider.

##### `__Temporary__DapiDataRegistry`

The data needed to make the requests to signed API. This data will in the future be stored on-chain in a
`DapiDataRegistry` contract. For the time being, they are statically defined in the configuration file.

###### `airnodeToSignedApiUrl`

A mapping from Airnode address to signed API URL. When data from particular beacon is needed a request is made to the
signed API corresponding to the beacon address.

###### `dataFeedIdToBeacons`

A mapping from data feed ID to a list of beacon data.

###### `dataFeedIdToBeacons<DATA_FEED_ID>`

A single element array for a beacon data. If the data feed is a beacon set, the array contains the data for all the
beacons in the beacon set (in correct order).

`dataFeedIdToBeacons<DATA_FEED_ID>[n]`

A beacon data.

`dataFeedIdToBeacons<DATA_FEED_ID>[n].airnode`

The Airnode address of the beacon.

`dataFeedIdToBeacons<DATA_FEED_ID>[n].templateId`

The template ID of the beacon.

##### `gasSettings`

The settings used to calculate gas prices used to submit transactions.
Expand Down
14 changes: 0 additions & 14 deletions config/airseeker.example.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,6 @@
"Api3ServerV1": "0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512",
"DapiDataRegistry": "0xDD78254f864F97f65e2d86541BdaEf88A504D2B2"
},
"__Temporary__DapiDataRegistry": {
"airnodeToSignedApiUrl": {
"0xbF3137b0a7574563a23a8fC8badC6537F98197CC": "http://127.0.0.1:8090/"
},
"dataFeedIdToBeacons": {
"0xebba8507d616ed80766292d200a3598fdba656d9938cecc392765d4a284a69a4": [
{
"airnode": "0xbF3137b0a7574563a23a8fC8badC6537F98197CC",
"templateId": "0xcc35bd1800c06c12856a87311dd95bfcbb3add875844021d59a929d79f3c99bd"
}
]
},
"activeDapiNames": ["ETH/USD"]
},
"providers": {
"hardhat": {
"url": "${HARDHAT_PROVIDER_URL}"
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
"axios": "^1.5.1",
"dotenv": "^16.3.1",
"ethers": "^5.7.2",
"immer": "^10.0.3",
"lodash": "^4.17.21",
"zod": "^3.22.2"
}
Expand Down
7 changes: 7 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 0 additions & 25 deletions src/config/schema.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,6 @@ describe('chains schema', () => {
url: 'http://localhost:8545',
},
},
__Temporary__DapiDataRegistry: {
airnodeToSignedApiUrl: {},
dataFeedIdToBeacons: {},
activeDapiNames: [],
},
gasSettings,
dataFeedBatchSize: 10,
dataFeedUpdateInterval: 60,
Expand All @@ -79,11 +74,6 @@ describe('chains schema', () => {
url: 'http://mainnet-url.com',
},
},
__Temporary__DapiDataRegistry: {
airnodeToSignedApiUrl: {},
dataFeedIdToBeacons: {},
activeDapiNames: [],
},
gasSettings,
dataFeedBatchSize: 10,
dataFeedUpdateInterval: 60,
Expand Down Expand Up @@ -112,11 +102,6 @@ describe('chains schema', () => {
contracts: {
DapiDataRegistry: '0xDD78254f864F97f65e2d86541BdaEf88A504D2B2',
},
__Temporary__DapiDataRegistry: {
airnodeToSignedApiUrl: {},
dataFeedIdToBeacons: {},
activeDapiNames: [],
},
gasSettings,
dataFeedBatchSize: 10,
dataFeedUpdateInterval: 60,
Expand Down Expand Up @@ -146,11 +131,6 @@ describe('chains schema', () => {
url: 'http://localhost:8545',
},
},
__Temporary__DapiDataRegistry: {
airnodeToSignedApiUrl: {},
dataFeedIdToBeacons: {},
activeDapiNames: [],
},
gasSettings,
dataFeedBatchSize: 10,
dataFeedUpdateInterval: 60,
Expand Down Expand Up @@ -191,11 +171,6 @@ describe('chains schema', () => {
DapiDataRegistry: '0xDD78254f864F97f65e2d86541BdaEf88A504D2B2',
},
providers: {},
__Temporary__DapiDataRegistry: {
airnodeToSignedApiUrl: {},
dataFeedIdToBeacons: {},
activeDapiNames: [],
},
gasSettings,
dataFeedBatchSize: 10,
dataFeedUpdateInterval: 60,
Expand Down
18 changes: 0 additions & 18 deletions src/config/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,23 +32,6 @@ const contractsSchema = optionalContractsSchema.required();

export type Contracts = z.infer<typeof contractsSchema>;

export const temporaryBeaconDataSchema = z.object({
airnode: evmAddressSchema,
templateId: evmIdSchema,
});

export type TemporaryBeaconData = z.infer<typeof temporaryBeaconDataSchema>;

// The DapiDataRegistry should live on-chain and Airseeker will query the contract for information. However, the
// contract does not exist as of now, so the data is hardcoded.
export const temporaryDapiDataRegistrySchema = z.object({
airnodeToSignedApiUrl: z.record(z.string()),
dataFeedIdToBeacons: z.record(z.array(temporaryBeaconDataSchema)),
activeDapiNames: z.array(z.string()),
});

export type TemporaryDapiDataRegistry = z.infer<typeof temporaryDapiDataRegistrySchema>;

export const gasSettingsSchema = z.object({
recommendedGasPriceMultiplier: z.number().positive(),
sanitizationSamplingWindow: z.number().positive(),
Expand All @@ -64,7 +47,6 @@ export type GasSettings = z.infer<typeof gasSettingsSchema>;
export const optionalChainSchema = z
.object({
providers: z.record(providerSchema), // The record key is the provider "nickname"
__Temporary__DapiDataRegistry: temporaryDapiDataRegistrySchema,
contracts: optionalContractsSchema,
gasSettings: gasSettingsSchema,
dataFeedUpdateInterval: z.number().positive(),
Expand Down
Loading