Adapter

NEAR Fees

NEAR Protocol is a smart contract platform that uses PoS sharding for high scalability.

Sub-Adapters 1

Preview and test each sub adapter.

NEAR Protocol (near)

Metadata

ID
near
name

"NEAR Protocol"

icon
category

"l1"

description

"NEAR Protocol is a smart contract platform that uses PoS sharding for high scalability."

feeDescription

"Transaction fees are paid by users and burned."

blockchain

"NEAR"

source

"Near Protocol Analytics"

website

"https://near.org"

protocolLaunch

"2020-07-21"

tokenTicker

"NEAR"

tokenCoingecko

"near"

Queries

Adapter Code

Check the entire code written for the Adapter.

Source code

Showing TS source.
1export const name = 'NEAR Fees';
2export const version = '0.1.0';
3export const license = 'MIT';
4
5export function setup(sdk: Context) {
6  const getFees = async (date: string): Promise<number> => {
7    const [fees, nearPrice] = await Promise.all([
8      sdk.http.get(`https://cryptostats-api-proxy.vercel.app/api/v1/near-daily-fees/${date}`),
9      sdk.coinGecko.getHistoricalPrice('near', date),
10    ]);
11
12    return (fees.value / 1e24) * nearPrice;
13  }
14
15  sdk.register({
16    id: 'near',
17    queries: {
18      oneDayTotalFees: getFees,
19    },
20    metadata: {
21      name: 'NEAR Protocol',
22      icon: sdk.ipfs.getDataURILoader('QmTo75WWgHvXu3H7dcA1KYgsgtfCDFG9dDsgW2WA8yvbxG', 'image/svg+xml'),
23      category: 'l1',
24      description: 'NEAR Protocol is a smart contract platform that uses PoS sharding for high scalability.',
25      feeDescription: 'Transaction fees are paid by users and burned.',
26      blockchain: 'NEAR',
27      source: 'Near Protocol Analytics',
28      website: 'https://near.org',
29      protocolLaunch: '2020-07-21',
30      tokenTicker: 'NEAR',
31      tokenCoingecko: 'near',
32    },
33  })
34}
35

It's something off?

Report it to the discussion board on Discord, we will take care of it.

Adapter Info

Version

0.1.0

License

MIT

IPFS CID

QmQqThA4GZya6V5S2enxLizHm5JX7dAd7nwimfLzyigwQz

CID (source)

QmUCYtYHc4zrzE7SBivsJXSo7EBMmk5KLNsA8nbK9pVWV4

Collections

Author

mihal.eth