Skip to content

Commit

Permalink
Merge pull request #1 from FraxFinance/fix/fpi
Browse files Browse the repository at this point in the history
Fix: FPI Adapter
  • Loading branch information
pegahcarter authored Oct 18, 2024
2 parents 65f17b1 + 76acfe0 commit c19d797
Show file tree
Hide file tree
Showing 11 changed files with 405 additions and 89 deletions.
5 changes: 0 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@ typechain
typechain-types

# Hardhat files
cache
artifacts

#foundry test compilation files
out

# pnpm
pnpm-error.log
Expand Down
4 changes: 2 additions & 2 deletions constants/tokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ export const TOKENS: TokensMap = {
symbol: 'frxETH',
},
// FPI on Ethereum
// https://etherscan.io/token/0x853d955acef822db058eb8505911ed77f175b99e
// https://etherscan.io/token/0x5Ca135cB8527d76e932f34B5145575F9d8cbE08E
FPI: {
address: '0x853d955aCEf822Db058eb8505911ED77F175b99e',
address: '0x5Ca135cB8527d76e932f34B5145575F9d8cbE08E',
name: 'Frax Price Index',
symbol: 'FPI',
},
Expand Down
4 changes: 2 additions & 2 deletions deploy/ofts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ deploy.dependencies = [
// 'StakedFraxEtherOFTAdapter',
// 'FraxOFT',
// 'FraxOFTAdapter',
'FraxEtherOFT',
'FraxEtherOFTAdapter',
// 'FraxEtherOFT',
// 'FraxEtherOFTAdapter',
'FraxPriceIndexOFT',
'FraxPriceIndexOFTAdapter'
]
Expand Down
42 changes: 21 additions & 21 deletions deployments/base/FraxPriceIndexOFT.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"address": "0xE41228a455700cAF09E551805A8aB37caa39D08c",
"address": "0x6Eca253b102D41B6B69AC815B9CC6bD47eF1979d",
"abi": [
{
"inputs": [
Expand Down Expand Up @@ -1773,46 +1773,46 @@
"type": "function"
}
],
"transactionHash": "0x78db3688785031d75f275bc19cf947f19dd1780256f2796009e3520ae39d9c47",
"transactionHash": "0x9d33b75b333c5b370fe80ef41d8421de9942a1d78f1886cfe6c65b2643f5f116",
"receipt": {
"to": null,
"from": "0x1D3bE58f3B199C12FB6525aBC0265999Ec849274",
"contractAddress": "0xE41228a455700cAF09E551805A8aB37caa39D08c",
"transactionIndex": 44,
"contractAddress": "0x6Eca253b102D41B6B69AC815B9CC6bD47eF1979d",
"transactionIndex": 106,
"gasUsed": "2995057",
"logsBloom": "0x00000000000000000000000000000000000000000000000000800000001000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000001000000000000000000100000000000000000020000000000000000000800000000000010000000000000000000400000000000000000000000000000000000000000000200000000200000000000000000000000000000000000800000000000000000000000000000000000000400000040000000000000000000000000000000000000000000000000000020000000000000000000000000000000200000000000010000000000000000000000",
"blockHash": "0xe1a0c29c7b5573196674697bb7d84cc6065884d9cc5d12c1108bf986ed0e8ce6",
"transactionHash": "0x78db3688785031d75f275bc19cf947f19dd1780256f2796009e3520ae39d9c47",
"logsBloom": "0x00000000000000000000000400000000000000000000000000800000001000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000001000000000000000000100000000000000000020000000000000000004800000000000010000000000000000000400000000000000000000000000000000010000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000200000000000010000000000000000000000",
"blockHash": "0xf2a35b0be115eb29f658cae173735068a06989e26dabf72430ddc0fb72119bdd",
"transactionHash": "0x9d33b75b333c5b370fe80ef41d8421de9942a1d78f1886cfe6c65b2643f5f116",
"logs": [
{
"transactionIndex": 44,
"blockNumber": 16362455,
"transactionHash": "0x78db3688785031d75f275bc19cf947f19dd1780256f2796009e3520ae39d9c47",
"address": "0xE41228a455700cAF09E551805A8aB37caa39D08c",
"transactionIndex": 106,
"blockNumber": 19260122,
"transactionHash": "0x9d33b75b333c5b370fe80ef41d8421de9942a1d78f1886cfe6c65b2643f5f116",
"address": "0x6Eca253b102D41B6B69AC815B9CC6bD47eF1979d",
"topics": [
"0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0",
"0x0000000000000000000000000000000000000000000000000000000000000000",
"0x0000000000000000000000001d3be58f3b199c12fb6525abc0265999ec849274"
],
"data": "0x",
"logIndex": 128,
"blockHash": "0xe1a0c29c7b5573196674697bb7d84cc6065884d9cc5d12c1108bf986ed0e8ce6"
"logIndex": 173,
"blockHash": "0xf2a35b0be115eb29f658cae173735068a06989e26dabf72430ddc0fb72119bdd"
},
{
"transactionIndex": 44,
"blockNumber": 16362455,
"transactionHash": "0x78db3688785031d75f275bc19cf947f19dd1780256f2796009e3520ae39d9c47",
"transactionIndex": 106,
"blockNumber": 19260122,
"transactionHash": "0x9d33b75b333c5b370fe80ef41d8421de9942a1d78f1886cfe6c65b2643f5f116",
"address": "0x1a44076050125825900e736c501f859c50fE728c",
"topics": [
"0x6ee10e9ed4d6ce9742703a498707862f4b00f1396a87195eb93267b3d7983981"
],
"data": "0x000000000000000000000000e41228a455700caf09e551805a8ab37caa39d08c0000000000000000000000001d3be58f3b199c12fb6525abc0265999ec849274",
"logIndex": 129,
"blockHash": "0xe1a0c29c7b5573196674697bb7d84cc6065884d9cc5d12c1108bf986ed0e8ce6"
"data": "0x0000000000000000000000006eca253b102d41b6b69ac815b9cc6bd47ef1979d0000000000000000000000001d3be58f3b199c12fb6525abc0265999ec849274",
"logIndex": 174,
"blockHash": "0xf2a35b0be115eb29f658cae173735068a06989e26dabf72430ddc0fb72119bdd"
}
],
"blockNumber": 16362455,
"cumulativeGasUsed": "9415698",
"blockNumber": 19260122,
"cumulativeGasUsed": "18939522",
"status": 1,
"byzantium": true
},
Expand Down
42 changes: 21 additions & 21 deletions deployments/blast/FraxPriceIndexOFT.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"address": "0xE41228a455700cAF09E551805A8aB37caa39D08c",
"address": "0x6Eca253b102D41B6B69AC815B9CC6bD47eF1979d",
"abi": [
{
"inputs": [
Expand Down Expand Up @@ -1773,46 +1773,46 @@
"type": "function"
}
],
"transactionHash": "0xb462edd4fc6fbf2a10fd63b6439ffe828ddff63a36f464c6646e04cc0990511a",
"transactionHash": "0xd89032e0ef2b8807fd72b57502938f69226d8e57e3004a1f7c9903e29af4a145",
"receipt": {
"to": null,
"from": "0x1D3bE58f3B199C12FB6525aBC0265999Ec849274",
"contractAddress": "0xE41228a455700cAF09E551805A8aB37caa39D08c",
"transactionIndex": 8,
"contractAddress": "0x6Eca253b102D41B6B69AC815B9CC6bD47eF1979d",
"transactionIndex": 14,
"gasUsed": "2995057",
"logsBloom": "0x00000000000000000000000000000000000000000000000000800000001000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000001000000000000000000100000000000000000020000000000000000000800000000000010000000000000000000400000000000000000000000000000000000000000000200000000200000000000000000000000000000000000800000000000000000000000000000000000000400000040000000000000000000000000000000000000000000000000000020000000000000000000000000000000200000000000010000000000000000000000",
"blockHash": "0xbf8e924423120100a5c5cee7e48c80bee30332a84122c08f1733d7944fa0e159",
"transactionHash": "0xb462edd4fc6fbf2a10fd63b6439ffe828ddff63a36f464c6646e04cc0990511a",
"logsBloom": "0x00000000000000000000000400000000000000000000000000800000001000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000001000000000000000000100000000000000000020000000000000000004800000000000010000000000000000000400000000000000000000000000000000010000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000200000000000010000000000000000000000",
"blockHash": "0xfdae866a5b7fdb179d492b5c043a6f6f051d1b56baa2928b3e9c5899b40364a7",
"transactionHash": "0xd89032e0ef2b8807fd72b57502938f69226d8e57e3004a1f7c9903e29af4a145",
"logs": [
{
"transactionIndex": 8,
"blockNumber": 5352220,
"transactionHash": "0xb462edd4fc6fbf2a10fd63b6439ffe828ddff63a36f464c6646e04cc0990511a",
"address": "0xE41228a455700cAF09E551805A8aB37caa39D08c",
"transactionIndex": 14,
"blockNumber": 8249888,
"transactionHash": "0xd89032e0ef2b8807fd72b57502938f69226d8e57e3004a1f7c9903e29af4a145",
"address": "0x6Eca253b102D41B6B69AC815B9CC6bD47eF1979d",
"topics": [
"0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0",
"0x0000000000000000000000000000000000000000000000000000000000000000",
"0x0000000000000000000000001d3be58f3b199c12fb6525abc0265999ec849274"
],
"data": "0x",
"logIndex": 15,
"blockHash": "0xbf8e924423120100a5c5cee7e48c80bee30332a84122c08f1733d7944fa0e159"
"logIndex": 5,
"blockHash": "0xfdae866a5b7fdb179d492b5c043a6f6f051d1b56baa2928b3e9c5899b40364a7"
},
{
"transactionIndex": 8,
"blockNumber": 5352220,
"transactionHash": "0xb462edd4fc6fbf2a10fd63b6439ffe828ddff63a36f464c6646e04cc0990511a",
"transactionIndex": 14,
"blockNumber": 8249888,
"transactionHash": "0xd89032e0ef2b8807fd72b57502938f69226d8e57e3004a1f7c9903e29af4a145",
"address": "0x1a44076050125825900e736c501f859c50fE728c",
"topics": [
"0x6ee10e9ed4d6ce9742703a498707862f4b00f1396a87195eb93267b3d7983981"
],
"data": "0x000000000000000000000000e41228a455700caf09e551805a8ab37caa39d08c0000000000000000000000001d3be58f3b199c12fb6525abc0265999ec849274",
"logIndex": 16,
"blockHash": "0xbf8e924423120100a5c5cee7e48c80bee30332a84122c08f1733d7944fa0e159"
"data": "0x0000000000000000000000006eca253b102d41b6b69ac815b9cc6bd47ef1979d0000000000000000000000001d3be58f3b199c12fb6525abc0265999ec849274",
"logIndex": 6,
"blockHash": "0xfdae866a5b7fdb179d492b5c043a6f6f051d1b56baa2928b3e9c5899b40364a7"
}
],
"blockNumber": 5352220,
"cumulativeGasUsed": "3948391",
"blockNumber": 8249888,
"cumulativeGasUsed": "4967776",
"status": 1,
"byzantium": true
},
Expand Down
46 changes: 23 additions & 23 deletions deployments/ethereum/FraxPriceIndexOFTAdapter.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"address": "0xE41228a455700cAF09E551805A8aB37caa39D08c",
"address": "0x6Eca253b102D41B6B69AC815B9CC6bD47eF1979d",
"abi": [
{
"inputs": [
Expand Down Expand Up @@ -1316,51 +1316,51 @@
"type": "function"
}
],
"transactionHash": "0x5823267dcad0a2e96c5f29c9d84b58209171dfd7a54110eec18c7ab062a27f7a",
"transactionHash": "0x33929ff37b1ea0e2662e4b95ff511322caa9d01a94d3383277c6995b541de934",
"receipt": {
"to": null,
"from": "0x1D3bE58f3B199C12FB6525aBC0265999Ec849274",
"contractAddress": "0xE41228a455700cAF09E551805A8aB37caa39D08c",
"transactionIndex": 115,
"gasUsed": "2506474",
"logsBloom": "0x00000000000000000000000000000000000000000000000000800000001000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000001000000000000000000100000000000000000020000000000000000000800000000000010000000000000000000400000000000000000000000000000000000000000000200000000200000000000000000000000000000000000800000000000000000000000000000000000000400000040000000000000000000000000000000000000000000000000000020000000000000000000000000000000200000000000010000000000000000000000",
"blockHash": "0xd16f7ad0613f11d904ff156668dcec943bd5eaddcfc9fec0895fd8e642c39036",
"transactionHash": "0x5823267dcad0a2e96c5f29c9d84b58209171dfd7a54110eec18c7ab062a27f7a",
"contractAddress": "0x6Eca253b102D41B6B69AC815B9CC6bD47eF1979d",
"transactionIndex": 65,
"gasUsed": "2506345",
"logsBloom": "0x00000000000000000000000400000000000000000000000000800000001000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000001000000000000000000100000000000000000020000000000000000004800000000000010000000000000000000400000000000000000000000000000000010000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000200000000000010000000000000000000000",
"blockHash": "0x44a9ee1afd0533389d9b517d793486a2a5411ec42c64221a3c37d3e7c32e3bfc",
"transactionHash": "0x33929ff37b1ea0e2662e4b95ff511322caa9d01a94d3383277c6995b541de934",
"logs": [
{
"transactionIndex": 115,
"blockNumber": 20184929,
"transactionHash": "0x5823267dcad0a2e96c5f29c9d84b58209171dfd7a54110eec18c7ab062a27f7a",
"address": "0xE41228a455700cAF09E551805A8aB37caa39D08c",
"transactionIndex": 65,
"blockNumber": 20665333,
"transactionHash": "0x33929ff37b1ea0e2662e4b95ff511322caa9d01a94d3383277c6995b541de934",
"address": "0x6Eca253b102D41B6B69AC815B9CC6bD47eF1979d",
"topics": [
"0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0",
"0x0000000000000000000000000000000000000000000000000000000000000000",
"0x0000000000000000000000001d3be58f3b199c12fb6525abc0265999ec849274"
],
"data": "0x",
"logIndex": 253,
"blockHash": "0xd16f7ad0613f11d904ff156668dcec943bd5eaddcfc9fec0895fd8e642c39036"
"logIndex": 178,
"blockHash": "0x44a9ee1afd0533389d9b517d793486a2a5411ec42c64221a3c37d3e7c32e3bfc"
},
{
"transactionIndex": 115,
"blockNumber": 20184929,
"transactionHash": "0x5823267dcad0a2e96c5f29c9d84b58209171dfd7a54110eec18c7ab062a27f7a",
"transactionIndex": 65,
"blockNumber": 20665333,
"transactionHash": "0x33929ff37b1ea0e2662e4b95ff511322caa9d01a94d3383277c6995b541de934",
"address": "0x1a44076050125825900e736c501f859c50fE728c",
"topics": [
"0x6ee10e9ed4d6ce9742703a498707862f4b00f1396a87195eb93267b3d7983981"
],
"data": "0x000000000000000000000000e41228a455700caf09e551805a8ab37caa39d08c0000000000000000000000001d3be58f3b199c12fb6525abc0265999ec849274",
"logIndex": 254,
"blockHash": "0xd16f7ad0613f11d904ff156668dcec943bd5eaddcfc9fec0895fd8e642c39036"
"data": "0x0000000000000000000000006eca253b102d41b6b69ac815b9cc6bd47ef1979d0000000000000000000000001d3be58f3b199c12fb6525abc0265999ec849274",
"logIndex": 179,
"blockHash": "0x44a9ee1afd0533389d9b517d793486a2a5411ec42c64221a3c37d3e7c32e3bfc"
}
],
"blockNumber": 20184929,
"cumulativeGasUsed": "11090697",
"blockNumber": 20665333,
"cumulativeGasUsed": "9725653",
"status": 1,
"byzantium": true
},
"args": [
"0x853d955aCEf822Db058eb8505911ED77F175b99e",
"0x5Ca135cB8527d76e932f34B5145575F9d8cbE08E",
"0x1a44076050125825900e736c501f859c50fE728c",
"0x1D3bE58f3B199C12FB6525aBC0265999Ec849274"
],
Expand Down
30 changes: 15 additions & 15 deletions deployments/metis/FraxPriceIndexOFT.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"address": "0xE41228a455700cAF09E551805A8aB37caa39D08c",
"address": "0x6Eca253b102D41B6B69AC815B9CC6bD47eF1979d",
"abi": [
{
"inputs": [
Expand Down Expand Up @@ -1773,45 +1773,45 @@
"type": "function"
}
],
"transactionHash": "0x59b3bf7ba36457b1fb2b63cea941375fa53f36ee4c1e13b016bd0675c9fd1029",
"transactionHash": "0x017f7e270531dc6240dbbdde554a4b15f891a7f549e306708a53ed549e258fda",
"receipt": {
"to": null,
"from": "0x1D3bE58f3B199C12FB6525aBC0265999Ec849274",
"contractAddress": "0xE41228a455700cAF09E551805A8aB37caa39D08c",
"contractAddress": "0x6Eca253b102D41B6B69AC815B9CC6bD47eF1979d",
"transactionIndex": 0,
"gasUsed": "2994119",
"logsBloom": "0x00000000000000000000000000000000000000000000000000800000001000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000001000000000000000000100000000000000000020000000000000000000800000000000010000000000000000000400000000000000000000000000000000000000000000200000000200000000000000000000000000000000000800000000000000000000000000000000000000400000040000000000000000000000000000000000000000000000000000020000000000000000000000000000000200000000000010000000000000000000000",
"blockHash": "0x3ea40a7c2c5783b0039a50ddeabc07bc87a70f1817424d323b32f73b7975108c",
"transactionHash": "0x59b3bf7ba36457b1fb2b63cea941375fa53f36ee4c1e13b016bd0675c9fd1029",
"logsBloom": "0x00000000000000000000000400000000000000000000000000800000001000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000001000000000000000000100000000000000000020000000000000000004800000000000010000000000000000000400000000000000000000000000000000010000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000200000000000010000000000000000000000",
"blockHash": "0xef6cfa84d80cc2308bb326630a557460c43e3fa5898a835383d5d860316f1c04",
"transactionHash": "0x017f7e270531dc6240dbbdde554a4b15f891a7f549e306708a53ed549e258fda",
"logs": [
{
"transactionIndex": 0,
"blockNumber": 17480232,
"transactionHash": "0x59b3bf7ba36457b1fb2b63cea941375fa53f36ee4c1e13b016bd0675c9fd1029",
"address": "0xE41228a455700cAF09E551805A8aB37caa39D08c",
"blockNumber": 18326819,
"transactionHash": "0x017f7e270531dc6240dbbdde554a4b15f891a7f549e306708a53ed549e258fda",
"address": "0x6Eca253b102D41B6B69AC815B9CC6bD47eF1979d",
"topics": [
"0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0",
"0x0000000000000000000000000000000000000000000000000000000000000000",
"0x0000000000000000000000001d3be58f3b199c12fb6525abc0265999ec849274"
],
"data": "0x",
"logIndex": 0,
"blockHash": "0x3ea40a7c2c5783b0039a50ddeabc07bc87a70f1817424d323b32f73b7975108c"
"blockHash": "0xef6cfa84d80cc2308bb326630a557460c43e3fa5898a835383d5d860316f1c04"
},
{
"transactionIndex": 0,
"blockNumber": 17480232,
"transactionHash": "0x59b3bf7ba36457b1fb2b63cea941375fa53f36ee4c1e13b016bd0675c9fd1029",
"blockNumber": 18326819,
"transactionHash": "0x017f7e270531dc6240dbbdde554a4b15f891a7f549e306708a53ed549e258fda",
"address": "0x1a44076050125825900e736c501f859c50fE728c",
"topics": [
"0x6ee10e9ed4d6ce9742703a498707862f4b00f1396a87195eb93267b3d7983981"
],
"data": "0x000000000000000000000000e41228a455700caf09e551805a8ab37caa39d08c0000000000000000000000001d3be58f3b199c12fb6525abc0265999ec849274",
"data": "0x0000000000000000000000006eca253b102d41b6b69ac815b9cc6bd47ef1979d0000000000000000000000001d3be58f3b199c12fb6525abc0265999ec849274",
"logIndex": 1,
"blockHash": "0x3ea40a7c2c5783b0039a50ddeabc07bc87a70f1817424d323b32f73b7975108c"
"blockHash": "0xef6cfa84d80cc2308bb326630a557460c43e3fa5898a835383d5d860316f1c04"
}
],
"blockNumber": 17480232,
"blockNumber": 18326819,
"cumulativeGasUsed": "2994119",
"status": 1,
"byzantium": true
Expand Down
Loading

0 comments on commit c19d797

Please sign in to comment.