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

Updated Blazing Bot Fees #2272

Merged
merged 2 commits into from
Jan 1, 2025
Merged
Changes from all 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
37 changes: 37 additions & 0 deletions fees/blazingbot.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,28 @@
import { FetchOptions, SimpleAdapter } from "../adapters/types";
import { CHAIN } from "../helpers/chains";
import { getSolanaReceived } from "../helpers/token";

const fethcFeesSolana = async (options: FetchOptions) => {
const dailyFees = await getSolanaReceived({ options, target: '4TTaKEKLjh1WJZttu1kvDtZt9N4G854C6ZKPAprZFRuy' })
return { dailyFees, dailyRevenue: dailyFees, }
}

const v2_contract_address: any = {
[CHAIN.BSC]: '0xfdb7eF80BD6aB675CD52811BfB9329FbD9B92aBA',
[CHAIN.BASE]: '0x6882912e2580471E5ac7a928a4f52F0bD2701810',
[CHAIN.ETHEREUM]: '0xfdb7ef80bd6ab675cd52811bfb9329fbd9b92aba',
[CHAIN.SONIC]: '0xE47809790a0cE703c2AC81598c90d5cC1569675d',
}

const v3_contract_address: any = {
[CHAIN.BSC]: '0xB23495f9a4807cD7672f382B9b0c2a3A0ec78649',
[CHAIN.BASE]: '0xE47809790a0cE703c2AC81598c90d5cC1569675d',
[CHAIN.ETHEREUM]: '0x196f75367A9286E039C6CFEBa5B8686ed84cBa68',
[CHAIN.SONIC]: '0xB23495f9a4807cD7672f382B9b0c2a3A0ec78649',
}

const virtual_contract_address: any = {
[CHAIN.BASE]: '0x803A70b24062e429Ce48801a0fAb6B13a994A454',
}

const fetchFees = async (options: FetchOptions) => {
Expand All @@ -36,6 +48,21 @@ const fetchFees = async (options: FetchOptions) => {
dailyRevenue.addGasToken(Number(log.data));
});

if (options.chain === CHAIN.BASE) {
const logsVirtual = await options.getLogs({
topic: '0xac73d170101ac263d42f3626a4a5142cdae6d109e48d6310c276b1fd1f5f3854',
target: virtual_contract_address[options.chain],
});

logsVirtual.map((log: any) => {
dailyFees.addGasToken(Number(log.data));
dailyRevenue.addGasToken(Number(log.data));
});
}

console.log("Daily fees: ", dailyFees);
console.log("Daily revenue: ", dailyRevenue);

return {
dailyFees: dailyFees,
dailyRevenue: dailyRevenue,
Expand All @@ -57,7 +84,17 @@ const adapter: SimpleAdapter = {
fetch: fetchFees,
start: '2024-03-01',
},
[CHAIN.SONIC]: {
fetch: fetchFees,
start: '2024-12-15',
},
[CHAIN.SOLANA]: {
fetch: fethcFeesSolana,
runAtCurrTime: true,
start: '2024-11-23',
},
},
isExpensiveAdapter: true,
};

export default adapter;
Loading