diff --git a/deployment-config/chains/1.json b/deployment-config/chains/1.json index 195e5b6..1d48dbc 100644 --- a/deployment-config/chains/1.json +++ b/deployment-config/chains/1.json @@ -50,12 +50,13 @@ "rateProvider": "0x318Da095d602C08eF41319f4c4bA0646d318C906", "decimals": 8 }, - "":{ + "0x9ba021b0a9b958b5e75ce9f6dff97c7ee52cb3e6":{ "priceFeed": "0x19219bc90f48dee4d5cf202e09c438faacfd8bea", - "rateProvider": "", + "rateProvider": "0x0000000000000000000000000000000000000000", "decimals": 18, - "description": "STETH / ETH", + "description": "apxETH/ETH", "priceFeedType": 1 + } } diff --git a/deployment-config/exampleL1.json b/deployment-config/exampleL1.json index 8fea879..4967aa3 100644 --- a/deployment-config/exampleL1.json +++ b/deployment-config/exampleL1.json @@ -1,20 +1,20 @@ { + "base": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", "protocolAdmin": "0xC2d99d76bb9D46BF8Ec9449E4DfAE48C30CF0839", "boringVaultAndBaseDecimals": "18", "boringVault": { - "boringVaultSalt": "0x1ddd634c506ad203da17ff00000000000000000000000000000000000000000e", + "boringVaultSalt": "0x1ddd634c506ad203da17ff000000000000000000000000000000000000000010", "boringVaultName": "Nucleus Vault", "boringVaultSymbol": "NV", "address": "0x0000000000E7Ab44153eEBEF2343ba5289F65dAC" }, "manager": { - "managerSalt": "0x30432d4b4ec00003b4a25000000000000000000000000000000000000000000e", + "managerSalt": "0x30432d4b4ec00003b4a250000000000000000000000000000000000000000010", "address": "0x0000000000fAd6Db23abdC1a85621B97bd1Dc82f" }, "accountant": { - "accountantSalt": "0x6a184dbea6f3cc0318679f00000000000000000000000000000000000000000e", + "accountantSalt": "0x6a184dbea6f3cc0318679f000000000000000000000000000000000000000010", "payoutAddress": "0x0000000000417626Ef34D62C4DC189b021603f2F", - "base": "0x5f207d42F869fd1c71d7f0f81a2A67Fc20FF7323", "allowedExchangeRateChangeUpper": "10003", "allowedExchangeRateChangeLower": "9998", "minimumUpdateDelayInSeconds": "3600", @@ -22,7 +22,7 @@ "address": "0x00000000004F96C07B83e86600D86F9479bB43fa" }, "teller": { - "tellerSalt": "0x51f8968749a56d01202c9100000000000000000000000000000000000000000e", + "tellerSalt": "0x51f8968749a56d01202c91000000000000000000000000000000000000000010", "maxGasForPeer": 100000, "minGasForPeer": 0, "peerEid": 30280, @@ -47,13 +47,13 @@ "address": "0x00000000004F96C07B83e86600D86F0000000000" }, "rolesAuthority": { - "rolesAuthoritySalt": "0x66bbc3b3b3000b01466a3a00000000000000000000000000000000000000000e", + "rolesAuthoritySalt": "0x66bbc3b3b3000b01466a3a000000000000000000000000000000000000000010", "strategist": "0xC2d99d76bb9D46BF8Ec9449E4DfAE48C30CF0839", "exchangeRateBot": "0x00000000004F96C07B83e86600D86F0000000000", "address": "0x00000000004F96C07B83e86600D86F0000000000" }, "decoder": { - "decoderSalt": "0x48b53893da2e0b0248268c00000000000000000000000000000000000000000e", + "decoderSalt": "0x48b53893da2e0b0248268c000000000000000000000000000000000000000010", "address": "0x00000000004F96C07B83e86600D86F0000000000" } } \ No newline at end of file diff --git a/deployment-config/exampleL2.json b/deployment-config/exampleL2.json index 01fd6d2..8a65696 100644 --- a/deployment-config/exampleL2.json +++ b/deployment-config/exampleL2.json @@ -1,4 +1,5 @@ { + "base":"0x160345fC359604fC6e70E3c5fAcbdE5F7A9342d8", "protocolAdmin": "0xF2dE1311C5b2C1BD94de996DA13F80010453e505", "boringVaultAndBaseDecimals": "18", "boringVault": { @@ -14,7 +15,6 @@ "accountant": { "accountantSalt": "0x6a184dbea6f3cc0318679f00000000000000000000000000000000000000000e", "payoutAddress": "0x0000000000417626Ef34D62C4DC189b021603f2F", - "base": "0x5f207d42F869fd1c71d7f0f81a2A67Fc20FF7323", "allowedExchangeRateChangeUpper": "10003", "allowedExchangeRateChangeLower": "9998", "minimumUpdateDelayInSeconds": "3600", diff --git a/deployment-config/form-btc-testnet-l1-08-30-24.json b/deployment-config/form-btc-testnet-l1-08-30-24.json index 7dccdc1..5dd02a0 100644 --- a/deployment-config/form-btc-testnet-l1-08-30-24.json +++ b/deployment-config/form-btc-testnet-l1-08-30-24.json @@ -1,59 +1,57 @@ { - "base": "0x92f3B59a79bFf5dc60c0d59eA13a44D082B2bdFC", - "protocolAdmin": "0x0000000000417626Ef34D62C4DC189b021603f2F", - "boringVaultAndBaseDecimals": "8", - "boringVault": { - "boringVaultSalt": "0x1ddd634c506ad203da17ff00000000000000000000000000000000000000000e", - "boringVaultName": "Form ETH", - "boringVaultSymbol": "FETH", - "address": "0x0000000000000000000000000000000000000000" - }, - "manager": { - "managerSalt": "0x30432d4b4ec00003b4a25000000000000000000000000000000000000000000e", - "address": "0x0000000000000000000000000000000000000000" - }, - "accountant": { - "accountantSalt": "0x6a184dbea6f3cc0318679f00000000000000000000000000000000000000000e", - "payoutAddress": "0x0000000000417626Ef34D62C4DC189b021603f2F", - "allowedExchangeRateChangeUpper": "10003", - "allowedExchangeRateChangeLower": "9998", - "minimumUpdateDelayInSeconds": "3600", - "managementFee": "0", - "address": "0x0000000000000000000000000000000000000000" - }, - "teller": { - "tellerSalt": "0x51f8968749a56d01202c9100000000000000000000000000000000000000000e", - "maxGasForPeer": 100000, - "minGasForPeer": 0, - "peerEid": 40270, - "tellerContractName": "TellerWithMultiAssetSupport", - "opMessenger": "0x58Cc85b8D04EA49cC6DBd3CbFFd00B4B8D6cb3ef", - "assets": [ - + "base": "0x92f3B59a79bFf5dc60c0d59eA13a44D082B2bdFC", + "protocolAdmin": "0x0000000000417626Ef34D62C4DC189b021603f2F", + "boringVaultAndBaseDecimals": "8", + "boringVault": { + "boringVaultSalt": "0x1ddd634c506ad203da17ff000000000000000000000000000000000000000012", + "boringVaultName": "Form ETH", + "boringVaultSymbol": "FETH", + "address": "0x0000000000000000000000000000000000000000" + }, + "manager": { + "managerSalt": "0x30432d4b4ec00003b4a250000000000000000000000000000000000000000012", + "address": "0x0000000000000000000000000000000000000000" + }, + "accountant": { + "accountantSalt": "0x6a184dbea6f3cc0318679f000000000000000000000000000000000000000012", + "payoutAddress": "0x0000000000417626Ef34D62C4DC189b021603f2F", + "allowedExchangeRateChangeUpper": "10003", + "allowedExchangeRateChangeLower": "9998", + "minimumUpdateDelayInSeconds": "3600", + "managementFee": "0", + "address": "0x0000000000000000000000000000000000000000" + }, + "teller": { + "tellerSalt": "0x51f8968749a56d01202c91000000000000000000000000000000000000000012", + "maxGasForPeer": 100000, + "minGasForPeer": 0, + "peerEid": 40270, + "tellerContractName": "TellerWithMultiAssetSupport", + "opMessenger": "0x58Cc85b8D04EA49cC6DBd3CbFFd00B4B8D6cb3ef", + "assets": [], + "dvnIfNoDefault": { + "required": [ + "0x589dEDbD617e0CBcB916A9223F4d1300c294236b" ], - "dvnIfNoDefault": { - "required": [ - "0x589dEDbD617e0CBcB916A9223F4d1300c294236b" - ], - "optional": [ - "0x380275805876Ff19055EA900CDb2B46a94ecF20D", - "0x8FafAE7Dd957044088b3d0F67359C327c6200d18", - "0xa59BA433ac34D2927232918Ef5B2eaAfcF130BA5", - "0xe552485d02EDd3067FE7FCbD4dd56BB1D3A998D2" - ], - "blockConfirmationsRequiredIfNoDefault": 15, - "optionalThreshold": 1 - }, - "address": "0x0000000000000000000000000000000000000000" - }, - "rolesAuthority": { - "rolesAuthoritySalt": "0x66bbc3b3b3000b01466a3a00000000000000000000000000000000000000000e", - "strategist": "0x0000000000417626Ef34D62C4DC189b021603f2F", - "exchangeRateBot": "0x0000000000417626Ef34D62C4DC189b021603f2F", - "address": "0x0000000000000000000000000000000000000000" + "optional": [ + "0x380275805876Ff19055EA900CDb2B46a94ecF20D", + "0x8FafAE7Dd957044088b3d0F67359C327c6200d18", + "0xa59BA433ac34D2927232918Ef5B2eaAfcF130BA5", + "0xe552485d02EDd3067FE7FCbD4dd56BB1D3A998D2" + ], + "blockConfirmationsRequiredIfNoDefault": 15, + "optionalThreshold": 1 }, - "decoder": { - "decoderSalt": "0x48b53893da2e0b0248268c00000000000000000000000000000000000000000e", - "address": "0x0000000000000000000000000000000000000000" - } - } \ No newline at end of file + "address": "0x0000000000000000000000000000000000000000" + }, + "rolesAuthority": { + "rolesAuthoritySalt": "0x66bbc3b3b3000b01466a3a000000000000000000000000000000000000000012", + "strategist": "0x0000000000417626Ef34D62C4DC189b021603f2F", + "exchangeRateBot": "0x0000000000417626Ef34D62C4DC189b021603f2F", + "address": "0x0000000000000000000000000000000000000000" + }, + "decoder": { + "decoderSalt": "0x48b53893da2e0b0248268c000000000000000000000000000000000000000012", + "address": "0x0000000000000000000000000000000000000000" + } +} \ No newline at end of file diff --git a/deployment-config/form-usd-testnet-l1-08-30-24.json b/deployment-config/form-usd-testnet-l1-08-30-24.json index 2401f6e..68774af 100644 --- a/deployment-config/form-usd-testnet-l1-08-30-24.json +++ b/deployment-config/form-usd-testnet-l1-08-30-24.json @@ -1,59 +1,57 @@ { - "base": "0x51fCe89b9f6D4c530698f181167043e1bB4abf89", - "protocolAdmin": "0x0000000000417626Ef34D62C4DC189b021603f2F", - "boringVaultAndBaseDecimals": "6", - "boringVault": { - "boringVaultSalt": "0x1ddd634c506ad203da17ff00000000000000000000000000000000000000000e", - "boringVaultName": "Form ETH", - "boringVaultSymbol": "FETH", - "address": "0x0000000000000000000000000000000000000000" - }, - "manager": { - "managerSalt": "0x30432d4b4ec00003b4a25000000000000000000000000000000000000000000e", - "address": "0x0000000000000000000000000000000000000000" - }, - "accountant": { - "accountantSalt": "0x6a184dbea6f3cc0318679f00000000000000000000000000000000000000000e", - "payoutAddress": "0x0000000000417626Ef34D62C4DC189b021603f2F", - "allowedExchangeRateChangeUpper": "10003", - "allowedExchangeRateChangeLower": "9998", - "minimumUpdateDelayInSeconds": "3600", - "managementFee": "0", - "address": "0x0000000000000000000000000000000000000000" - }, - "teller": { - "tellerSalt": "0x51f8968749a56d01202c9100000000000000000000000000000000000000000e", - "maxGasForPeer": 100000, - "minGasForPeer": 0, - "peerEid": 40270, - "tellerContractName": "TellerWithMultiAssetSupport", - "opMessenger": "0x58Cc85b8D04EA49cC6DBd3CbFFd00B4B8D6cb3ef", - "assets": [ - + "base": "0x51fCe89b9f6D4c530698f181167043e1bB4abf89", + "protocolAdmin": "0x0000000000417626Ef34D62C4DC189b021603f2F", + "boringVaultAndBaseDecimals": "6", + "boringVault": { + "boringVaultSalt": "0x1ddd634c506ad203da17ff000000000000000000000000000000000000000010", + "boringVaultName": "Form ETH", + "boringVaultSymbol": "FETH", + "address": "0x0000000000000000000000000000000000000000" + }, + "manager": { + "managerSalt": "0x30432d4b4ec00003b4a250000000000000000000000000000000000000000010", + "address": "0x0000000000000000000000000000000000000000" + }, + "accountant": { + "accountantSalt": "0x6a184dbea6f3cc0318679f000000000000000000000000000000000000000010", + "payoutAddress": "0x0000000000417626Ef34D62C4DC189b021603f2F", + "allowedExchangeRateChangeUpper": "10003", + "allowedExchangeRateChangeLower": "9998", + "minimumUpdateDelayInSeconds": "3600", + "managementFee": "0", + "address": "0x0000000000000000000000000000000000000000" + }, + "teller": { + "tellerSalt": "0x51f8968749a56d01202c91000000000000000000000000000000000000000010", + "maxGasForPeer": 100000, + "minGasForPeer": 0, + "peerEid": 40270, + "tellerContractName": "TellerWithMultiAssetSupport", + "opMessenger": "0x58Cc85b8D04EA49cC6DBd3CbFFd00B4B8D6cb3ef", + "assets": [], + "dvnIfNoDefault": { + "required": [ + "0x589dEDbD617e0CBcB916A9223F4d1300c294236b" ], - "dvnIfNoDefault": { - "required": [ - "0x589dEDbD617e0CBcB916A9223F4d1300c294236b" - ], - "optional": [ - "0x380275805876Ff19055EA900CDb2B46a94ecF20D", - "0x8FafAE7Dd957044088b3d0F67359C327c6200d18", - "0xa59BA433ac34D2927232918Ef5B2eaAfcF130BA5", - "0xe552485d02EDd3067FE7FCbD4dd56BB1D3A998D2" - ], - "blockConfirmationsRequiredIfNoDefault": 15, - "optionalThreshold": 1 - }, - "address": "0x0000000000000000000000000000000000000000" - }, - "rolesAuthority": { - "rolesAuthoritySalt": "0x66bbc3b3b3000b01466a3a00000000000000000000000000000000000000000e", - "strategist": "0x0000000000417626Ef34D62C4DC189b021603f2F", - "exchangeRateBot": "0x0000000000417626Ef34D62C4DC189b021603f2F", - "address": "0x0000000000000000000000000000000000000000" + "optional": [ + "0x380275805876Ff19055EA900CDb2B46a94ecF20D", + "0x8FafAE7Dd957044088b3d0F67359C327c6200d18", + "0xa59BA433ac34D2927232918Ef5B2eaAfcF130BA5", + "0xe552485d02EDd3067FE7FCbD4dd56BB1D3A998D2" + ], + "blockConfirmationsRequiredIfNoDefault": 15, + "optionalThreshold": 1 }, - "decoder": { - "decoderSalt": "0x48b53893da2e0b0248268c00000000000000000000000000000000000000000e", - "address": "0x0000000000000000000000000000000000000000" - } - } \ No newline at end of file + "address": "0x0000000000000000000000000000000000000000" + }, + "rolesAuthority": { + "rolesAuthoritySalt": "0x66bbc3b3b3000b01466a3a000000000000000000000000000000000000000010", + "strategist": "0x0000000000417626Ef34D62C4DC189b021603f2F", + "exchangeRateBot": "0x0000000000417626Ef34D62C4DC189b021603f2F", + "address": "0x0000000000000000000000000000000000000000" + }, + "decoder": { + "decoderSalt": "0x48b53893da2e0b0248268c000000000000000000000000000000000000000010", + "address": "0x0000000000000000000000000000000000000000" + } +} \ No newline at end of file diff --git a/script/Base.s.sol b/script/Base.s.sol index cb758d9..035d400 100644 --- a/script/Base.s.sol +++ b/script/Base.s.sol @@ -17,7 +17,7 @@ abstract contract BaseScript is Script { string constant CONFIG_CHAIN_ROOT = "./deployment-config/chains/"; /// Custom base params - ICreateX CREATEX = ICreateX(0x1C64d5eBCf22AC237d00cF7bB9Be6395e59B23b7); + ICreateX CREATEX = ICreateX(0x1077f8ea07EA34D9F23BC39256BF234665FB391f); /// @dev Included to enable compilation of the script without a $MNEMONIC environment variable. string internal constant TEST_MNEMONIC = "test test test test test test test test test test test junk"; diff --git a/script/DeployCustomCreatex.s.sol b/script/DeployCustomCreatex.s.sol index 6676362..e2be751 100644 --- a/script/DeployCustomCreatex.s.sol +++ b/script/DeployCustomCreatex.s.sol @@ -10,7 +10,7 @@ contract DeployCustomCreateX is Script { string internal mnemonic; string internal constant TEST_MNEMONIC = "test test test test test test test test test test test junk"; - address constant EXPECTED = 0x1C64d5eBCf22AC237d00cF7bB9Be6395e59B23b7; + address constant EXPECTED = 0x1077f8ea07EA34D9F23BC39256BF234665FB391f; bytes32 constant SALT = 0x8888888833388888888000000000000000000000000000000000000000000000; constructor() { diff --git a/src/helper/Constants.sol b/src/helper/Constants.sol index 17cc9cc..b44c710 100644 --- a/src/helper/Constants.sol +++ b/src/helper/Constants.sol @@ -8,6 +8,7 @@ IPriceFeed constant ETH_PER_EZETH_CHAINLINK = IPriceFeed(0x636A000262F6aA9e1F094 IPriceFeed constant ETH_PER_RSETH_CHAINLINK = IPriceFeed(0x03c68933f7a3F76875C0bc670a58e69294cDFD01); IPriceFeed constant ETH_PER_RSWETH_CHAINLINK = IPriceFeed(0xb613CfebD0b6e95abDDe02677d6bC42394FdB857); IPriceFeed constant ETH_PER_PUFETH_REDSTONE = IPriceFeed(0x76A495b0bFfb53ef3F0E94ef0763e03cE410835C); +IPriceFeed constant ETH_PER_APXETH_REDSTOME = IPriceFeed(0x19219BC90F48DeE4d5cF202E09c438FAacFd8Bea); address constant SWBTC = 0x8DB2350D78aBc13f5673A411D4700BCF87864dDE; address constant WBTC_ETHEREUM = 0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599; diff --git a/test/ion/oracles/EthPerTokenRateProvider.t.sol b/test/ion/oracles/EthPerTokenRateProvider.t.sol index aaf6c71..3775f5c 100644 --- a/test/ion/oracles/EthPerTokenRateProvider.t.sol +++ b/test/ion/oracles/EthPerTokenRateProvider.t.sol @@ -8,7 +8,8 @@ import { ETH_PER_EZETH_CHAINLINK, ETH_PER_RSETH_CHAINLINK, ETH_PER_RSWETH_CHAINLINK, - ETH_PER_PUFETH_REDSTONE + ETH_PER_PUFETH_REDSTONE, + ETH_PER_APXETH_REDSTOME } from "./../../../src/helper/Constants.sol"; import { Test } from "@forge-std/Test.sol"; @@ -194,3 +195,30 @@ contract PufEthRateProviderTest is EthPerTokenRateProviderTest { ); } } + +contract ApxEthRateProviderTest is EthPerTokenRateProviderTest { + function setUp() public override { + super.setUp(); + + _setExpectedPriceRange(0.99e18, 1.2e18); + + ethPerTokenRateProvider = new EthPerTokenRateProvider( + "apxETH/ETH", + ETH_PER_APXETH_REDSTOME, + MAX_TIME_FROM_LAST_UPDATE, + 18, + EthPerTokenRateProvider.PriceFeedType.REDSTONE + ); + } + + function test_Revert_IncorrectDescription() public override { + vm.expectRevert(EthPerTokenRateProvider.InvalidDescription.selector); + ethPerTokenRateProvider = new EthPerTokenRateProvider( + incorrectDescription, + ETH_PER_APXETH_REDSTOME, + MAX_TIME_FROM_LAST_UPDATE, + 18, + EthPerTokenRateProvider.PriceFeedType.REDSTONE + ); + } +}