Skip to content

Commit

Permalink
Merge pull request #2316 from DefiLlama/refs-2314
Browse files Browse the repository at this point in the history
add base sonic and Soneium
  • Loading branch information
dtmkeng authored Jan 14, 2025
2 parents 4ac6805 + 8b22baa commit da13869
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 12 deletions.
67 changes: 55 additions & 12 deletions fees/zns/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,12 @@ const addresses: TAddress = {
[CHAIN.TAIKO]: "0xFb2Cd41a8aeC89EFBb19575C6c48d872cE97A0A5",
[CHAIN.XLAYER]: "0x71709a5f1831ba48c414375fb6a58662a40c01b5",
[CHAIN.ZORA]: "0xf180136DdC9e4F8c9b5A9FE59e2b1f07265C5D4D",
[CHAIN.BOBA]: "0xf1D09DA87c50820eD3b924aFf3C37058eD6eA40e",
[CHAIN.ZKLINK]: "0xe0971a2B6E34bd060866081aE879630e83C4A0BD",
// [CHAIN.BOBA]: "0xf1D09DA87c50820eD3b924aFf3C37058eD6eA40e",
// [CHAIN.ZKLINK]: "0xe0971a2B6E34bd060866081aE879630e83C4A0BD",
[CHAIN.SONIC]: "0xFb2Cd41a8aeC89EFBb19575C6c48d872cE97A0A5",
[CHAIN.BASE]: "0x55b867a955e4384bcac03ef7f2e492f68016c152",
[CHAIN.SONEIUM]: "0xf180136DdC9e4F8c9b5A9FE59e2b1f07265C5D4D",
[CHAIN.INK]: "0xFb2Cd41a8aeC89EFBb19575C6c48d872cE97A0A5"
};

const methodology = {
Expand All @@ -29,11 +33,23 @@ const methodology = {

const ABI = {
priceToRegister: {
inputs: [{ internalType: "uint16", name: "len", type: "uint16" }],
name: "priceToRegister",
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
stateMutability: "view",
type: "function",
"inputs": [
{
"internalType": "uint16",
"name": "len",
"type": "uint16"
}
],
"name": "priceToRegister",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
priceToRenew: {
inputs: [{ internalType: "uint16", name: "len", type: "uint16" }],
Expand All @@ -60,7 +76,6 @@ const fetchLogsAndCalculateFees = async (
eventAbi: abi_event.renewedDomain,
});
const lens = [1,2,3,4,5]

const znsPriceRegistor = await options.api.multiCall({
abi: ABI.priceToRegister,
calls: lens.map(len=>({
Expand Down Expand Up @@ -154,20 +169,48 @@ const adapter: Adapter = {
methodology,
},
},
[CHAIN.BOBA]: {
// [CHAIN.BOBA]: {
// fetch: fetchLogsAndCalculateFees,
// start: '2024-06-29',
// meta: {
// methodology,
// },
// },
// [CHAIN.ZKLINK]: {
// fetch: fetchLogsAndCalculateFees,
// start: '2024-06-29',
// meta: {
// methodology,
// },
// },
[CHAIN.SONIC]: {
fetch: fetchLogsAndCalculateFees,
start: '2024-05-30',
meta: {
methodology,
},
},
[CHAIN.BASE]: {
fetch: fetchLogsAndCalculateFees,
start: '2024-06-29',
start: '2024-05-30',
meta: {
methodology,
},
},
[CHAIN.ZKLINK]: {
[CHAIN.SONEIUM]: {
fetch: fetchLogsAndCalculateFees,
start: '2024-06-29',
start: '2024-06-24',
meta: {
methodology,
},
},
[CHAIN.INK]: {
fetch: fetchLogsAndCalculateFees,
start: '2024-05-30',
meta: {
methodology
}
}
},
};

Expand Down
2 changes: 2 additions & 0 deletions helpers/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,8 @@ export enum CHAIN {
VANA = "vana",
SONIC = "sonic",
HYPERLIQUID = "hyperliquid",
SONEIUM = "soneium",
INK = "ink",
}

// Don´t use
Expand Down

0 comments on commit da13869

Please sign in to comment.