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

feat angle staked tokens #1

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
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
16 changes: 11 additions & 5 deletions scripts/fetch-event-blocknumber.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Network } from '../src/constants';
import { Address } from '../src/types';
import { generateConfig } from '../src/config';
// TODO: Import correct ABI
import ABI from '../src/abi/erc20.json';
import ABI from '../src/abi/angle/stagToken.json';

// This is a helper script to fetch blockNumbers where a certain
// event was released by a certain contract
Expand Down Expand Up @@ -40,12 +40,18 @@ async function getBlockNumbersForEvents(
}

// TODO: Set your values here
const network = Network.AVALANCHE;
const eventNames = ['Transfer'];
const address = '0xc0253c3cc6aa5ab407b5795a04c28fb063273894';
const network = Network.MAINNET;
const eventNames = [
'Accrued',
'Deposit',
'Withdraw',
'ToggledPause',
'RateUpdated',
];
const address = '0x004626a008b1acdc4c74ab51644093b155e59a23';
const provider = new StaticJsonRpcProvider(
generateConfig(network).privateHttpProvider,
network,
);

getBlockNumbersForEvents(address, ABI, eventNames, 0, 2000, provider);
getBlockNumbersForEvents(address, ABI, eventNames, 0, 200000000, provider);
Loading