Skip to content

Commit

Permalink
vesting adapter and snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
bergarces committed Nov 5, 2024
1 parent 0480413 commit 7e35f12
Show file tree
Hide file tree
Showing 20 changed files with 4,930 additions and 141 deletions.
Binary file modified arb.db
Binary file not shown.
Binary file modified avax.db
Binary file not shown.
1,058 changes: 1,058 additions & 0 deletions packages/adapters-library/src/adapters/gmx/contracts/Vester.ts

Large diffs are not rendered by default.

1,024 changes: 1,024 additions & 0 deletions packages/adapters-library/src/adapters/gmx/contracts/abis/vester.json

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ export { RewardReader__factory } from "./RewardReader__factory";
export { RewardRouter__factory } from "./RewardRouter__factory";
export { RewardTracker__factory } from "./RewardTracker__factory";
export { Vault__factory } from "./Vault__factory";
export { Vester__factory } from "./Vester__factory";
2 changes: 2 additions & 0 deletions packages/adapters-library/src/adapters/gmx/contracts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ export type { RewardReader } from "./RewardReader";
export type { RewardRouter } from "./RewardRouter";
export type { RewardTracker } from "./RewardTracker";
export type { Vault } from "./Vault";
export type { Vester } from "./Vester";
export * as factories from "./factories";
export { GlpManager__factory } from "./factories/GlpManager__factory";
export { RewardReader__factory } from "./factories/RewardReader__factory";
export { RewardRouter__factory } from "./factories/RewardRouter__factory";
export { RewardTracker__factory } from "./factories/RewardTracker__factory";
export { Vault__factory } from "./factories/Vault__factory";
export { Vester__factory } from "./factories/Vester__factory";
Original file line number Diff line number Diff line change
Expand Up @@ -39,20 +39,15 @@ type AdditionalMetadata = {
}

const contractAddresses: Partial<
Record<
Chain,
{ rewardRouter: string; glpRewardRouter: string; rewardReader: string }
>
Record<Chain, { rewardRouter: string; glpRewardRouter: string }>
> = {
[Chain.Arbitrum]: {
rewardRouter: '0x5e4766f932ce00aa4a1a82d3da85adf15c5694a1',
glpRewardRouter: '0xB95DB5B167D75e6d04227CfFFA61069348d271F5',
rewardReader: '0x8BFb8e82Ee4569aee78D03235ff465Bd436D40E0',
},
[Chain.Avalanche]: {
rewardRouter: '0x091eD806490Cc58Fd514441499e58984cCce0630',
glpRewardRouter: '0xB70B91CE0771d3f4c81D87660f71Da31d48eB3B3',
rewardReader: '0x04Fc11Bd28763872d143637a7c768bD96E44c1b6',
},
}

Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,35 +1,20 @@
import { Chain } from '../../../../../core/constants/chains'
import { TimePeriod } from '../../../../../core/constants/timePeriod'
import type { TestCase } from '../../../../../types/testCase'
import { WriteActions } from '../../../../../types/writeActions'

export const testCases: TestCase[] = [
// {
// chainId: Chain.Ethereum,
// method: 'positions',
// input: {
// userAddress: '0x6b8Be925ED8277fE4D27820aE4677e76Ebf4c255',
// },
// },
// {
// chainId: Chain.Ethereum,
// method: 'profits',
// input: {
// userAddress: '0xCEadFdCCd0E8E370D985c49Ed3117b2572243A4a',
// timePeriod: TimePeriod.oneDay,
// },
// },
// {
// method: 'tx-params',
// key: 'supply',
// chainId: Chain.Ethereum,
// input: {
// productId: 'farming',
// action: WriteActions.Deposit,
// inputs: {
// asset: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
// amount: '10000000000000000000',
// },
// },
// },
{
chainId: Chain.Arbitrum,
method: 'positions',

input: {
userAddress: '0x8914fc85e44befedbd7a1f22e2469a8739b05c8a',

filterProtocolTokens: [
'0xfc5A1A6EB076a2C7aD06eD22C90d7E710E35ad0a',
'0xf42Ae1D54fd613C9bb14810b0588FaAa09a426cA',
],
},

blockNumber: 271425317,
},
]
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"latency": "Latency: 1.183 seconds",
"latency": "Latency: 1.946 seconds",
"blockNumber": 201320270,
"snapshot": [
{
"protocolId": "gmx",
"name": "GMX",
"description": "GMX Liquidity Provider Token adapter",
"siteUrl": "https://https://app.gmx.io",
"siteUrl": "https://app.gmx.io",
"iconUrl": "https://gmx.io//static/media/ic_gmx_40.72a1053e8344ef876100ac72aff70ead.svg",
"positionType": "supply",
"chainId": 42161,
Expand Down Expand Up @@ -134,29 +134,29 @@
"f31cdd09b969eaf1d75f870b1ae394e0": {
"result": "0x00000000000000000000000000000000000000000009f8c457edc8a5025c17f0"
},
"832ff8d48549ae41b02d38a2625ce300": {
"result": "0x000000000000000000000000000000000000000000000000000000081f22d30d"
},
"bcb689019824ac329c631c5dbcac62ae": {
"result": "0x0000000000000000000000000000000000000000000001d7c84896a5cf5ee66d"
},
"6f9aa70e8eebd93f1f7fe020459b1eb2": {
"result": "0x00000000000000000000000000000000000000000003be6d4ca060ddba6d8f80"
},
"5baa7d12a60d7391da30303431649f51": {
"result": "0x0000000000000000000000000000000000000000000000000e37e2948bd01ec7"
},
"4390f46f0be225ca2e6315e7bbdccb56": {
"result": "0x000000000000000000000000000000000000000000000000000005593939b864"
},
"8be1556fdee93cf95f680d167fda318d": {
"result": "0x0000000000000000000000000000000000000000000046825f5e5d3eb6758e0f"
"662d05896f1bd9a993489fd2d598e214": {
"result": "0x00000000000000000000000000000000000000000000000000001efce579fa0f"
},
"61f9711a792ab848025528fbade83ce6": {
"result": "0x000000000000000000000000000000000000000000000000000003a2e6a530e2"
},
"662d05896f1bd9a993489fd2d598e214": {
"result": "0x00000000000000000000000000000000000000000000000000001efce579fa0f"
"bcb689019824ac329c631c5dbcac62ae": {
"result": "0x0000000000000000000000000000000000000000000001d7c84896a5cf5ee66d"
},
"832ff8d48549ae41b02d38a2625ce300": {
"result": "0x000000000000000000000000000000000000000000000000000000081f22d30d"
},
"5baa7d12a60d7391da30303431649f51": {
"result": "0x0000000000000000000000000000000000000000000000000e37e2948bd01ec7"
},
"8be1556fdee93cf95f680d167fda318d": {
"result": "0x0000000000000000000000000000000000000000000046825f5e5d3eb6758e0f"
},
"2d71f50226b4afdf8e2c685624400f02": {
"result": "0x000000000000000000000000000000000000000000002984605985f99f098b25"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"aggregatedValues": ["USD71.17", "USD48.13"],
"latency": "Latency: 1.815 seconds",
"latency": "Latency: 2.211 seconds",
"snapshot": {
"protocolId": "gmx",
"name": "GMX",
"description": "GMX Liquidity Provider Token adapter",
"siteUrl": "https://https://app.gmx.io",
"siteUrl": "https://app.gmx.io",
"iconUrl": "https://gmx.io//static/media/ic_gmx_40.72a1053e8344ef876100ac72aff70ead.svg",
"positionType": "supply",
"chainId": 43114,
Expand Down Expand Up @@ -249,6 +249,9 @@
"857e98e0c1b020ad574a12601f208492": {
"result": "0x000000000000000000000000000000000000000000000028886dccde59274c4a"
},
"9034c336598dc1997d5c8a858b547fac": {
"result": "0x000000000000000000000000000000000000000000000000000019ff9e73cf4c"
},
"28c24616569a641a538ee5350feba3b7": {
"result": "0x0000000000000000000000000000000000000000000000000000000000000000"
},
Expand All @@ -258,61 +261,52 @@
"1992fc0986312b173e66c53f8feafd2a": {
"result": "0x0000000000000000000000000000000000000000000000000000000e94d2cf7d"
},
"9034c336598dc1997d5c8a858b547fac": {
"result": "0x000000000000000000000000000000000000000000000000000019ff9e73cf4c"
"e0ef955b347ace19ca3d089f05ad7fa3": {
"result": "0x00000000000000000000000000000000000000000000001e79b7f4ba6ff8ab8b"
},
"6b6c4c97d476064f11097c3af9007c44": {
"result": "0x000000000000000000000000000000000000000000000000000015b3ba1580b7"
},
"8001434f56be75b7d6e934171d2f5688": {
"result": "0x000000000000000000000000000000000000000000003f497f7b04f079fa09d2"
},
"6b6c4c97d476064f11097c3af9007c44": {
"result": "0x000000000000000000000000000000000000000000000000000015b3ba1580b7"
"fb6bfda8464ac6516ce6c8d38ba2c27d": {
"result": "0x0000000000000000000000000000000000000000000000000000139b60c8d54d"
},
"e0ef955b347ace19ca3d089f05ad7fa3": {
"result": "0x00000000000000000000000000000000000000000000001e79b7f4ba6ff8ab8b"
"f3073e4742d030775f20ba035673004f": {
"result": "0x0000000000000000000000000000000000000000000001a71671f0efea562482"
},
"403bd926286a00d6b23a5d448ec08630": {
"result": "0x00000000000000000000000000000000000000000000000000000005114c635a"
},
"f3073e4742d030775f20ba035673004f": {
"result": "0x0000000000000000000000000000000000000000000001a71671f0efea562482"
"01438571248b861e324ba77b07a9f52e": {
"result": "0x000000000000000000000000000000000000000000000000000013738e9ed4ec"
},
"283df2bfc53806ee3e812b12c4738f3a": {
"result": "0x000000000000000000000000000000000000000000000000000000062608c065"
},
"fb6bfda8464ac6516ce6c8d38ba2c27d": {
"result": "0x0000000000000000000000000000000000000000000000000000139b60c8d54d"
},
"7689f3875318291689dd97c3170aa015": {
"result": "0x00000000000000000000000000000000000000000000768d0e2f838038de6f0e"
},
"01438571248b861e324ba77b07a9f52e": {
"result": "0x000000000000000000000000000000000000000000000000000013738e9ed4ec"
},
"be67be73e68658d93ac809237910843e": {
"result": "0x00000000000000000000000000000000000000000000000100000000000110470000000000000000000000000000000000000000000000000000002b27e654400000000000000000000000000000000000000000000000000000000062f43ac30000000000000000000000000000000000000000000000000000000062f43ac30000000000000000000000000000000000000000000000010000000000011047"
},
"2793c3f62ea1029133d3b05fb6d0b054": {
"result": "0x0000000000000000000000000000000000000000000000010000000000012f1d000000000000000000000000000000000000000000000000000000240d02374600000000000000000000000000000000000000000000000000000000630ff02400000000000000000000000000000000000000000000000000000000630ff0240000000000000000000000000000000000000000000000010000000000012f1d"
},
"6cc00ace72b08ebcbc7575bcb9386c10": {
"result": "0x"
},
"87fde0989dfa69c89f31e05c1bac2561": {
"result": "0x"
},
"dafd9b4b7ae394e0966c3753f3ae6855": {
"6cc00ace72b08ebcbc7575bcb9386c10": {
"result": "0x"
},
"d3cb1b04edde6e705b72701f81ce7801": {
"dafd9b4b7ae394e0966c3753f3ae6855": {
"result": "0x"
},
"9eb0a87484561221c894e250c1393f2c": {
"result": "0x"
},
"4b52ed645d44a4151f6987830b4ffddf": {
"d3cb1b04edde6e705b72701f81ce7801": {
"result": "0x"
},
"ab56d23a70736d36b10fc51ee5daf8e6": {
"4b52ed645d44a4151f6987830b4ffddf": {
"result": "0x"
},
"b67837510d2c2fc8b29047daaea37661": {
Expand All @@ -321,14 +315,20 @@
"bca93ba443e9114cd59162816e7bc2c5": {
"result": "0x"
},
"9a04cf3abe01910298ae8a45834f4fd8": {
"907f25a0755d455c32e9654fd7e0d3b4": {
"result": "0x"
},
"907f25a0755d455c32e9654fd7e0d3b4": {
"ab56d23a70736d36b10fc51ee5daf8e6": {
"result": "0x"
},
"9a04cf3abe01910298ae8a45834f4fd8": {
"result": "0x"
},
"866ead78be69ed04526b275d0dcdfd2a": {
"result": "0x"
},
"2793c3f62ea1029133d3b05fb6d0b054": {
"result": "0x0000000000000000000000000000000000000000000000010000000000012f1d000000000000000000000000000000000000000000000000000000240d02374600000000000000000000000000000000000000000000000000000000630ff02400000000000000000000000000000000000000000000000000000000630ff0240000000000000000000000000000000000000000000000010000000000012f1d"
}
}
}
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"blockNumber": 45143861,
"latency": "Latency: 1.994 seconds",
"latency": "Latency: 3.347 seconds",
"aggregatedValues": ["USD5,107.66"],
"snapshot": [
{
"protocolId": "gmx",
"name": "GMX",
"description": "GMX Liquidity Provider Token adapter",
"siteUrl": "https://https://app.gmx.io",
"siteUrl": "https://app.gmx.io",
"iconUrl": "https://gmx.io//static/media/ic_gmx_40.72a1053e8344ef876100ac72aff70ead.svg",
"positionType": "supply",
"chainId": 43114,
Expand Down Expand Up @@ -128,30 +128,30 @@
"b7ad924a367ac0af0306263bd42a56c6": {
"result": "0x0000000000000000000000000000000000000000000000000000003eadd14e3e"
},
"24cad0e399e038bc033ca9b9e3970957": {
"result": "0x000000000000000000000000000000000000000000001434317c4f6c47ad2585"
},
"0698a9c166383179ff4c79f79c64ff00": {
"result": "0x00000000000000000000000000000000000000000000000000000b1388b063e7"
},
"24cad0e399e038bc033ca9b9e3970957": {
"result": "0x000000000000000000000000000000000000000000001434317c4f6c47ad2585"
},
"920720f394448617d06458feeaa4652c": {
"result": "0x00000000000000000000000000000000000000000000000100000000000378a2000000000000000000000000000000000000000000000000000000475b493f1f00000000000000000000000000000000000000000000000000000000663a352900000000000000000000000000000000000000000000000000000000663a352900000000000000000000000000000000000000000000000100000000000378a2"
},
"8e8383de4fccdf7dc5371931ff0da74a": {
"result": "0x000000000000000000000000000000000000000000000000000124bc17cce9bf"
},
"36aa2409c822a462152edfc8c452451c": {
"result": "0x00000000000000000000000000000000000000029c29d4fff58c695ca68913b9"
},
"6b9a4b55cd6debedd0bd33b4c3b16475": {
"result": "0x00000000000000000000000000000000000000029b32d5753a52fbeb5aafffd2"
},
"8e8383de4fccdf7dc5371931ff0da74a": {
"result": "0x000000000000000000000000000000000000000000000000000124bc17cce9bf"
},
"8412c6449118837f9391f43c1e3d16c3": {
"result": "0x0000000000000000000000000000000000000000010e5ec6f79bfc7f30ab5c8a"
},
"cf812ebb8fbbeee748ac9b52919ff0af": {
"result": "0x000000000000000000000000000000000000000000000000002a59205cf6e06c"
},
"36aa2409c822a462152edfc8c452451c": {
"result": "0x00000000000000000000000000000000000000029c29d4fff58c695ca68913b9"
},
"c49b9fd109da527aa3463d26d63dbd39": {
"result": "0x0000000000000000000000000000000000000000010e0e0e2c9e34f6a0c0a264"
}
Expand Down
Loading

0 comments on commit 7e35f12

Please sign in to comment.