Skip to content

Commit

Permalink
feat: fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jpsains committed Nov 26, 2024
1 parent 1c471b4 commit 2f655b5
Show file tree
Hide file tree
Showing 13 changed files with 236 additions and 624 deletions.
Binary file modified ethereum.db
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ import { Protocol } from '../../../protocols'

import { Erc20, Erc20__factory } from '../../../../contracts'
import { filterMapAsync } from '../../../../core/utils/filters'
import { Vault__factory } from '../../contracts'
import { Erc20Metadata } from '../../../../types/erc20Metadata'
import { Vault__factory } from '../../contracts'

const vaultAAddress = '0xBA12222222228d8Ba445958a75a0704d566BF2C8'

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
{
"blockNumber": 21270797,
"latency": "Latency: 1.14 seconds",
"aggregatedValues": ["USD34,118.72"],
"snapshot": [
{
"protocolId": "balancer-v2",
"name": "BalancerV2",
"description": "BalancerV2 defi adapter",
"siteUrl": "https:",
"iconUrl": "https://",
"positionType": "supply",
"chainId": 1,
"productId": "pool",
"chainName": "ethereum",
"success": true,
"tokens": [
{
"address": "0x848a5564158d84b8A8fb68ab5D004Fae11619A54",
"name": "Balancer weETH/ezETH/rswETH",
"symbol": "weETH/ezETH/rswETH",
"decimals": 18,
"balanceRaw": "9939726460812312625n",
"type": "protocol",
"tokens": [
{
"address": "0xbf5495Efe5DB9ce00f80364C8B423567e58d2110",
"name": "Renzo Restaked ETH",
"symbol": "ezETH",
"decimals": 18,
"type": "underlying",
"balanceRaw": "2739128808273259048n",
"tokens": [
{
"address": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
"name": "Ethereum",
"symbol": "ETH",
"decimals": 18,
"type": "underlying",
"balanceRaw": "2815885481033622954n",
"balance": 2.815885481033623,
"price": 3362.61634367,
"iconUrl": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/info/logo.png"
}
],
"balance": 2.739128808273259,
"price": 3456.844567450552,
"iconUrl": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xbf5495Efe5DB9ce00f80364C8B423567e58d2110/logo.png"
},
{
"address": "0xCd5fE23C85820F7B72D0926FC9b05b43E359b7ee",
"name": "Wrapped eETH",
"symbol": "weETH",
"decimals": 18,
"type": "underlying",
"balanceRaw": "2364281494507876913n",
"tokens": [
{
"address": "0x35fA164735182de50811E8e2E824cFb9B6118ac2",
"name": "ether.fi ETH",
"symbol": "eETH",
"decimals": 18,
"type": "underlying",
"balanceRaw": "2491338496030385848n",
"tokens": [
{
"address": "0x0000000000000000000000000000000000000000",
"name": "Ethereum",
"symbol": "ETH",
"decimals": 18,
"type": "underlying",
"balanceRaw": "2491338496030385848n",
"balance": 2.491338496030386,
"price": 3362.61634367,
"iconUrl": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/info/logo.png"
}
],
"balance": 2.491338496030386,
"price": 3362.61634367,
"iconUrl": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0x35fA164735182de50811E8e2E824cFb9B6118ac2/logo.png"
}
],
"balance": 2.364281494507877,
"price": 3543.324077029907,
"iconUrl": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xCd5fE23C85820F7B72D0926FC9b05b43E359b7ee/logo.png"
},
{
"address": "0xFAe103DC9cf190eD75350761e95403b7b8aFa6c0",
"name": "rswETH",
"symbol": "rswETH",
"decimals": 18,
"type": "underlying",
"balanceRaw": "4738135039710413701n",
"balance": 4.738135039710413,
"price": 3434.3820248325205,
"iconUrl": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xFAe103DC9cf190eD75350761e95403b7b8aFa6c0/logo.png"
}
],
"balance": 9.939726460812313
}
]
}
],
"rpcResponses": {
"0c43f9d0b645e67747b811d8ee94cfc6": {
"result": "0x144913e"
},
"abaa1cb183efcbff52d9b4a9c311a109": {
"result": "0x00000000000000000000000000000000000000000000000089f1008d9d44c031"
},
"a7505c9a3ed0fe2baa2e8a0aeb4a2a8d": {
"result": "0x000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000001448fea0000000000000000000000000000000000000000000000000000000000000004000000000000000000000000848a5564158d84b8a8fb68ab5d004fae11619a54000000000000000000000000bf5495efe5db9ce00f80364c8b423567e58d2110000000000000000000000000cd5fe23c85820f7b72d0926fc9b05b43e359b7ee000000000000000000000000fae103dc9cf190ed75350761e95403b7b8afa6c0000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000080000000002326c24027875f0820000000000000000000000000000000000000000000000018a7de49a4617c299a00000000000000000000000000000000000000000000001548184575a643d6a200000000000000000000000000000000000000000000002aa63f2fda826c9bba"
},
"2809757f3e3a29be8e452a2f90bd2350": {
"result": "0x00000000000000000000000000000000000080000000007c9f35fa3aeb6fd4c9"
},
"c62829d7d15f3c02bb5c6eff3c2b7c10": {
"result": "0x0000000000000000000000000000000000000000000000070000000000000b530000000000000000000000000000000000000000000000000000004e4ac1593f00000000000000000000000000000000000000000000000000000000674583e500000000000000000000000000000000000000000000000000000000674584070000000000000000000000000000000000000000000000070000000000000b53"
},
"0fd58d9c8421b060754813e1a47b088f": {
"result": "0x0000000000000000000000000000000000000000000000000e9fa3250ffe7b19"
},
"05acfb7b16379a0af9cb457b875d7389": {
"result": "0x0000000000000000000000000000000000000000000000000e2c8955529d22b4"
},
"573ff543f960839adbd097ee8ea4bf0a": {
"result": "0x0000000000000000000000000000000000000000000000000e4444d466db902d"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,6 @@
}
],
"rpcResponses": {
"0c43f9d0b645e67747b811d8ee94cfc6": {
"result": "0x14422c4"
},
"8720b5d69ad45a29bb970f9bb4b06008": {
"result": "0x00000000000000000000000000000000000000000000000000202dea9fb96e34"
},
Expand All @@ -98,29 +95,29 @@
"6ada7fbe0acf1c8810fdc0909208c30b": {
"result": "0x0000000000000000000000000000000000000000000000000097ef072074d7c8"
},
"c186a1e53978ca00fbf94453139643f6": {
"result": "0x000000000000000000000000000000000000000000000000000000000746d2c1"
},
"160ecf3b98fdcd9674702fefa6773a6a": {
"result": "0x0000000000000000000000000000000000000000000000000000001c2714ce9f"
"dd053d50c2ad8f7f8619aef234271e01": {
"result": "0x000000000000000000000000000000000000000000000001edbda4ba47e311f1"
},
"0c42b53469ed066749d2ed56773696b8": {
"result": "0x0000000000000000000000000000000000000000000000070000000000000a710000000000000000000000000000000000000000000000000000004e1e798e440000000000000000000000000000000000000000000000000000000067404f6e0000000000000000000000000000000000000000000000000000000067404f830000000000000000000000000000000000000000000000070000000000000a71"
},
"dd053d50c2ad8f7f8619aef234271e01": {
"result": "0x000000000000000000000000000000000000000000000001edbda4ba47e311f1"
"160ecf3b98fdcd9674702fefa6773a6a": {
"result": "0x0000000000000000000000000000000000000000000000000000001c2714ce9f"
},
"c186a1e53978ca00fbf94453139643f6": {
"result": "0x000000000000000000000000000000000000000000000000000000000746d2c1"
},
"a74d239b15735a4622bee6d6f304c79f": {
"result": "0x0000000000000000000000000000000000000000000000000000000000000000"
},
"5c404d8a8d7ec85853b925339c98ec4c": {
"result": "0x00000000000000000000000000000000000000000000000928f6f0368ec9f07a"
},
"ec2b4bc9864926496a0275d1bf7fc6d9": {
"result": "0x000000000000000000000000000000000000000000f602903a9b596019674a8c"
},
"7d4fb28a7fa9a44c6984497c298f5cb1": {
"result": "0x0000000000000000000000000000000000000003b1a22f984a82b28846288be4"
},
"ec2b4bc9864926496a0275d1bf7fc6d9": {
"result": "0x000000000000000000000000000000000000000000f602903a9b596019674a8c"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,16 @@ export const testCases: TestCase[] = [

blockNumber: 21242486,
},
{
chainId: Chain.Ethereum,
method: 'positions',
key: '3',

input: {
userAddress: '0xDB2a2f53e2bC952Abde8Aa1cC32F09dFF35F7C42',
filterProtocolTokens: ['0x848a5564158d84b8A8fb68ab5D004Fae11619A54'],
},

blockNumber: 21270797,
},
]
Original file line number Diff line number Diff line change
Expand Up @@ -164,53 +164,53 @@
"bf6836bbd7b90f8f17a9d3c202ae8672": {
"result": "0x0000000000000000000000000000000000000000000000021a24758e57848194"
},
"9db6c854e60fc9e7ca90fb819d2de104": {
"result": "0x000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000014363f60000000000000000000000000000000000000000000000000000000000000002000000000000000000000000ba100000625a3754423978a60c9317c58a424e3d000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000106df8fa48b283db01e7c20000000000000000000000000000000000000000000000b2cb19d1b8f0a8ee7a"
},
"4ca6d8a684aff7ccf023da7b98cc25ff": {
"result": "0x0000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000013a06d700000000000000000000000000000000000000000000000000000000000000040000000000000000000000002f4eb100552ef93840d5adc30560e5513dfffacb00000000000000000000000082698aecc9e28e9bb27608bd52cf57f704bd1b83000000000000000000000000a13a9247ea42d743238089903570127dda72fe44000000000000000000000000ae37d54ae477268b9997d4161b96b8200755935c0000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000002b9f68e2ecd7b615900000000000000000000000000000000000000000000005a8c7118d6e57755620000000000000000000000000000000000007fffffd0f8754e606b6e684a43e6000000000000000000000000000000000000000000000004dc2071eba086ae7c"
},
"9db6c854e60fc9e7ca90fb819d2de104": {
"result": "0x000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000014363f60000000000000000000000000000000000000000000000000000000000000002000000000000000000000000ba100000625a3754423978a60c9317c58a424e3d000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000106df8fa48b283db01e7c20000000000000000000000000000000000000000000000b2cb19d1b8f0a8ee7a"
"3678fdfc18e413506faa5bb1f9e7c3ac": {
"result": "0x00000000000000000000000000000000000000000005984ec60ec4b265675dfb"
},
"ebb7019bd684748441d7baaa40860cd9": {
"result": "0x0000000000000000000000000000000000007fffffd13b035a68314a0ce6e2dc"
},
"c6443e715cde299579704a591e917756": {
"result": "0x000000000000000000000000000000000000000000000007000000000000091b000000000000000000000000000000000000000000000000000000468eb5f48000000000000000000000000000000000000000000000000000000000673766e100000000000000000000000000000000000000000000000000000000673766f3000000000000000000000000000000000000000000000007000000000000091b"
},
"5e41d8306257bacd879bb10edc27625e": {
"result": "0x000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000129f25900000000000000000000000000000000000000000000000000000000000000030000000000000000000000002f4eb100552ef93840d5adc30560e5513dfffacb000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec7000000000000000000000000f8fd466f12e236f4c96f7cce6c79eadb819abf580000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000fffffffed91de12dc1e09196d1380000000000000000000000000000000000000000000000000000000001fd15d20000000000000000000000000000000000000000000000000000000000000001"
},
"9d2356243d2c5505071069eb1d34f317": {
"result": "0x000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000001302543000000000000000000000000000000000000000000000000000000000000000300000000000000000000000002d60b84491589974263d922d9cc7a3152618ef60000000000000000000000006b175474e89094c44da98b954eedeac495271d0f000000000000000000000000ae37d54ae477268b9997d4161b96b8200755935c0000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000011501becd2f9fb7af00000000000000000000000000000000000000000000000082d0f9edbe79b020c000000000000000000000000000000000000ffffffff7f21eac65caffbeb0746"
},
"4407192925b018b26ad5e70c748eeca2": {
"result": "0x000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000129f253000000000000000000000000000000000000000000000000000000000000000300000000000000000000000082698aecc9e28e9bb27608bd52cf57f704bd1b83000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000d093fa4fb80d09bb30817fdcd442d4d02ed3e5de0000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000fffffffd94fae72039445e1de3cb00000000000000000000000000000000000000000000000000000000018c3a3d0000000000000000000000000000000000000000000000000000000000000000"
},
"3678fdfc18e413506faa5bb1f9e7c3ac": {
"result": "0x00000000000000000000000000000000000000000005984ec60ec4b265675dfb"
},
"389cf0b39a800c194a558a0058ad9202": {
"result": "0x000000000000000000000000000000000000fffffffed953d9d44330871e147c"
},
"41f526774015f3f2913fc0a82c62850f": {
"result": "0x000000000000000000000000000000000000fffffffd95fb0bce8530b2e6658d"
},
"c6443e715cde299579704a591e917756": {
"result": "0x000000000000000000000000000000000000000000000007000000000000091b000000000000000000000000000000000000000000000000000000468eb5f48000000000000000000000000000000000000000000000000000000000673766e100000000000000000000000000000000000000000000000000000000673766f3000000000000000000000000000000000000000000000007000000000000091b"
},
"9d2356243d2c5505071069eb1d34f317": {
"result": "0x000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000001302543000000000000000000000000000000000000000000000000000000000000000300000000000000000000000002d60b84491589974263d922d9cc7a3152618ef60000000000000000000000006b175474e89094c44da98b954eedeac495271d0f000000000000000000000000ae37d54ae477268b9997d4161b96b8200755935c0000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000011501becd2f9fb7af00000000000000000000000000000000000000000000000082d0f9edbe79b020c000000000000000000000000000000000000ffffffff7f21eac65caffbeb0746"
},
"c13137e44f1b0bcb25f0648c86b0fca6": {
"result": "0x00000000000000000000000000000000000000000111312b5e15454c2981df1c"
},
"3182ca43df14aa9748799332af11b483": {
"result": "0x000000000000000000000000000000000000000001106b756889c9941c794b46"
"033bb2e6a6bf6a2eeab042ff37ce8e5a": {
"result": "0x000000000000000000000000000000000000ffffffff7f530235e799206feb42"
},
"1ab3f4b8cb83198de71ad236d9fecc91": {
"result": "0x0000000000000000000000000000000000000000000000000002550063766b07"
},
"033bb2e6a6bf6a2eeab042ff37ce8e5a": {
"result": "0x000000000000000000000000000000000000ffffffff7f530235e799206feb42"
},
"9467b33f4797a01ca227761c60465bee": {
"result": "0x0000000000000000000000000000000000000000000000000000000000000000"
},
"5e398386ac6704d741e9ed398f89fa1c": {
"result": "0x00000000000000000000000000000000000000000000000000012cab3ec95e3b"
},
"c13137e44f1b0bcb25f0648c86b0fca6": {
"result": "0x00000000000000000000000000000000000000000111312b5e15454c2981df1c"
},
"3182ca43df14aa9748799332af11b483": {
"result": "0x000000000000000000000000000000000000000001106b756889c9941c794b46"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -58,17 +58,17 @@
"e74c02fad89642c9c831daf768b09296": {
"result": "0x000000000000000000000000000000000000000000000000156d11ae1d6fad9e00000000000000000000000000000000000000000000000000000000c68b9cf3"
},
"c08559f21e6dae77b5e2c77c82f1e0a4": {
"result": "0x00000000000000000000000000000000000000000000000000000001fcee5979"
},
"a0d7c4aaf7651d65734fcd5dd2ccce94": {
"result": "0x00000000000000000000000082af49447d8a07e3bd95bd0d56f35241523fbab1000000000000000000000000af88d065e77c8cc2239327c5edb3a432268e5831"
},
"384c7c494bba6adf0a332dc46f3590e1": {
"result": "0x0000000000000000000000000000000000000000000000010000000000096bec0000000000000000000000000000000000000000000000000000004cbdc10ca0000000000000000000000000000000000000000000000000000000006685417000000000000000000000000000000000000000000000000000000000668541700000000000000000000000000000000000000000000000010000000000096bec"
"c08559f21e6dae77b5e2c77c82f1e0a4": {
"result": "0x00000000000000000000000000000000000000000000000000000001fcee5979"
},
"af976d6676ff9fd1a807e866c36089e2": {
"result": "0x000000000000000000000000000000000000000000fb2a00f1d1d6ab44aea9c6"
},
"384c7c494bba6adf0a332dc46f3590e1": {
"result": "0x0000000000000000000000000000000000000000000000010000000000096bec0000000000000000000000000000000000000000000000000000004cbdc10ca0000000000000000000000000000000000000000000000000000000006685417000000000000000000000000000000000000000000000000000000000668541700000000000000000000000000000000000000000000000010000000000096bec"
}
}
}
Loading

0 comments on commit 2f655b5

Please sign in to comment.