From 511e6984f48b0d395e9e3d4c7a796f69cbd1c5e0 Mon Sep 17 00:00:00 2001 From: Pablo Veyrat Date: Thu, 18 Jul 2024 16:29:37 +0200 Subject: [PATCH 1/4] fix: linea script --- helpers/createProposal.sh | 2 +- lib/utils | 2 +- scripts/Interfaces.s.sol | 16 ++++ scripts/proposals/nameable/SetupLinea.s.sol | 81 +++++++++++++++++++ .../nameable/UpgradeAgTokenNameable.s.sol | 9 ++- test/scripts/nameable/SetupLinea.t.sol | 49 +++++++++++ 6 files changed, 156 insertions(+), 3 deletions(-) create mode 100644 scripts/proposals/nameable/SetupLinea.s.sol create mode 100644 test/scripts/nameable/SetupLinea.t.sol diff --git a/helpers/createProposal.sh b/helpers/createProposal.sh index 1cfc17b..285fac1 100644 --- a/helpers/createProposal.sh +++ b/helpers/createProposal.sh @@ -95,7 +95,7 @@ function main { echo "Running on chains $chainIds" export CHAIN_IDS=$chainIds - FOUNDRY_PROFILE=dev forge script $script + FOUNDRY_PROFILE=dev forge script $script -vvvv if [ $? -ne 0 ]; then echo "" diff --git a/lib/utils b/lib/utils index 3b7a747..e64751f 160000 --- a/lib/utils +++ b/lib/utils @@ -1 +1 @@ -Subproject commit 3b7a747213be6a1210b1c92d92c7688798a74edf +Subproject commit e64751fc263a2f3a7f52563da3c010a13195cb6b diff --git a/scripts/Interfaces.s.sol b/scripts/Interfaces.s.sol index b753a51..b8cb35a 100644 --- a/scripts/Interfaces.s.sol +++ b/scripts/Interfaces.s.sol @@ -29,11 +29,27 @@ interface INameable { function setNameAndSymbol(string memory name, string memory symbol) external; } +interface ITreasuryGovernance { + function addMinter(address minter) external; + + function setCore(address _core) external; + + function core() external view returns (address); +} + interface ISavings { function setRate(uint208 newRate) external; + function setMaxRate(uint256 newMaxRate) external; + + function toggleTrusted(address trustedAddress) external; + + function isTrustedUpdater(address) external view returns (uint256); + function rate() external view returns (uint208); + function maxRate() external view returns (uint256); + function accessControlManager() external view returns (address); } diff --git a/scripts/proposals/nameable/SetupLinea.s.sol b/scripts/proposals/nameable/SetupLinea.s.sol new file mode 100644 index 0000000..d0e7881 --- /dev/null +++ b/scripts/proposals/nameable/SetupLinea.s.sol @@ -0,0 +1,81 @@ +// SPDX-License-Identifier: GPL-3.0 +pragma solidity ^0.8.19; + +import { console } from "forge-std/console.sol"; +import { Wrapper } from "../Wrapper.s.sol"; +import "../../Constants.s.sol"; +import { ProxyAdmin } from "oz/proxy/transparent/ProxyAdmin.sol"; + +contract SetupLinea is Wrapper { + SubCall[] private subCalls; + // Linea + uint256 public constant chainId = CHAIN_LINEA; + + function _setMaxRateSavings( + address savings, + address treasury, + uint256 maxRate, + string memory name, + string memory symbol, + address keeper + ) private { + bytes memory nameAndSymbolData = abi.encodeWithSelector(INameable.setNameAndSymbol.selector, name, symbol); + bytes memory maxRateData = abi.encodeWithSelector(ISavings.setMaxRate.selector, maxRate); + bytes memory keeperData = abi.encodeWithSelector(ISavings.toggleTrusted.selector, keeper); + bytes memory minterData = abi.encodeWithSelector(ITreasuryGovernance.addMinter.selector, savings); + subCalls.push(SubCall(chainId, treasury, 0, minterData)); + subCalls.push(SubCall(chainId, savings, 0, nameAndSymbolData)); + subCalls.push(SubCall(chainId, savings, 0, maxRateData)); + subCalls.push(SubCall(chainId, savings, 0, keeperData)); + } + + function run() external { + address stUSD = 0x0022228a2cc5E7eF0274A7Baa600d44da5aB5776; + address stEUR = 0x004626A008B1aCdC4c74ab51644093b155e59A23; + address treasuryEUR = 0xf1dDcACA7D17f8030Ab2eb54f2D9811365EFe123; + address treasuryUSD = 0x840b25c87B626a259CA5AC32124fA752F0230a72; + address keeper = 0xa9bbbDDe822789F123667044443dc7001fb43C01; + uint256 maxRateUSD = 10669464645118865408; + uint256 maxRateEUR = 3022265993024575488; + string memory nameUSD = "Staked USDA"; + string memory symbolUSD = "stUSD"; + string memory nameEUR = "Staked EURA"; + string memory symbolEUR = "stEUR"; + + { + // Upgrade stUSD to the latest version + address proxyAdmin = 0x1D941EF0D3Bba4ad67DBfBCeE5262F4CEE53A32b; + bytes memory upgradeData = abi.encodeWithSelector( + ProxyAdmin.upgradeAndCall.selector, + stUSD, + // SavingsNameable implem on Linea + 0x2b11d82caadD76985861e858029C28446DE05A50, + "" + ); + subCalls.push(SubCall(chainId, proxyAdmin, 0, upgradeData)); + } + + { + bytes memory treasuryData = abi.encodeWithSelector( + ITreasuryGovernance.setCore.selector, + // AccessControlManager Core + 0x4b1E2c2762667331Bc91648052F646d1b0d35984 + ); + subCalls.push(SubCall(chainId, treasuryUSD, 0, treasuryData)); + } + + _setMaxRateSavings(stUSD, treasuryUSD, maxRateUSD, nameUSD, symbolUSD, keeper); + _setMaxRateSavings(stEUR, treasuryEUR, maxRateEUR, nameEUR, symbolEUR, keeper); + + // TODO: complete + string memory description = "ipfs://QmRSdyuXeemVEn97RPRSiit6UEUonvwVr9we7bEe2w8v2E"; + + ( + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + uint256[] memory chainIds2 + ) = _wrap(subCalls); + _serializeJson(targets, values, calldatas, chainIds2, description); + } +} diff --git a/scripts/proposals/nameable/UpgradeAgTokenNameable.s.sol b/scripts/proposals/nameable/UpgradeAgTokenNameable.s.sol index 53beb94..61acc88 100644 --- a/scripts/proposals/nameable/UpgradeAgTokenNameable.s.sol +++ b/scripts/proposals/nameable/UpgradeAgTokenNameable.s.sol @@ -11,7 +11,14 @@ contract UpgradeAgTokenNameable is Wrapper { mapping(uint256 => address) private _chainToToken; mapping(uint256 => address) private _chainToImplementation; - function _upgradeAgToken(uint256 chainId, string memory name, string memory symbol, address proxy, address implementation, address proxyAdmin) private { + function _upgradeAgToken( + uint256 chainId, + string memory name, + string memory symbol, + address proxy, + address implementation, + address proxyAdmin + ) private { vm.selectFork(forkIdentifier[chainId]); bytes memory nameAndSymbolData = abi.encodeWithSelector(INameable.setNameAndSymbol.selector, name, symbol); diff --git a/test/scripts/nameable/SetupLinea.t.sol b/test/scripts/nameable/SetupLinea.t.sol new file mode 100644 index 0000000..aa5c63f --- /dev/null +++ b/test/scripts/nameable/SetupLinea.t.sol @@ -0,0 +1,49 @@ +// SPDX-License-Identifier: GPL-3.0 +pragma solidity ^0.8.19; + +import { stdJson } from "forge-std/StdJson.sol"; +import { console } from "forge-std/console.sol"; +import { ScriptHelpers } from "../ScriptHelpers.t.sol"; +import "../../../scripts/Constants.s.sol"; +import { TimelockControllerWithCounter } from "contracts/TimelockControllerWithCounter.sol"; +import { ProposalSender } from "contracts/ProposalSender.sol"; +import { IERC20Metadata } from "oz/token/ERC20/extensions/IERC20Metadata.sol"; + +contract SetupLineaTest is ScriptHelpers { + using stdJson for string; + mapping(uint256 => address) private _chainToToken; + + function setUp() public override { + super.setUp(); + } + + function testScript() external { + uint256[] memory chainIds = _executeProposal(); + vm.selectFork(forkIdentifier[59144]); + + address stUSD = 0x0022228a2cc5E7eF0274A7Baa600d44da5aB5776; + address stEUR = 0x004626A008B1aCdC4c74ab51644093b155e59A23; + address treasuryEUR = 0xf1dDcACA7D17f8030Ab2eb54f2D9811365EFe123; + address treasuryUSD = 0x840b25c87B626a259CA5AC32124fA752F0230a72; + address keeper = 0xa9bbbDDe822789F123667044443dc7001fb43C01; + uint256 maxRateUSD = 10669464645118865408; + uint256 maxRateEUR = 3022265993024575488; + string memory nameUSD = "Staked USDA"; + string memory symbolUSD = "stUSD"; + string memory nameEUR = "Staked EURA"; + string memory symbolEUR = "stEUR"; + + assertEq(ITreasuryGovernance(treasuryUSD).core(), 0x4b1E2c2762667331Bc91648052F646d1b0d35984); + assertEq(IGenericAccessControl(treasuryUSD).isMinter(stUSD), true); + assertEq(IERC20Metadata(stUSD).name(), nameUSD); + assertEq(IERC20Metadata(stUSD).symbol(), symbolUSD); + assertEq(ISavings(stUSD).maxRate(), maxRateUSD); + assertEq(ISavings(stUSD).isTrustedUpdater(keeper), 1); + + assertEq(ITreasuryGovernance(treasuryEUR).core(), 0x4b1E2c2762667331Bc91648052F646d1b0d35984); + assertEq(IGenericAccessControl(treasuryEUR).isMinter(stEUR), true); + assertEq(IERC20Metadata(stEUR).name(), nameEUR); + assertEq(IERC20Metadata(stEUR).symbol(), symbolEUR); + assertEq(ISavings(stEUR).isTrustedUpdater(keeper), 1); + } +} From 4284195a67c9ae4bf884d373f2eff1f1086cd0ee Mon Sep 17 00:00:00 2001 From: Pablo Veyrat Date: Thu, 18 Jul 2024 17:18:04 +0200 Subject: [PATCH 2/4] fix: proposal payload --- package.json | 2 +- .../nameable/UpgradeAgTokenNameable.s.sol | 2 +- scripts/proposals/payload.json | 8 +++---- utils/forwardUtils.js | 22 +++++++++---------- yarn.lock | 8 +++---- 5 files changed, 20 insertions(+), 22 deletions(-) diff --git a/package.json b/package.json index f2a511c..ea601b0 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ "url": "https://github.com/AngleProtocol/boilerplate/issues" }, "devDependencies": { - "@angleprotocol/sdk": "^v2.14.0", + "@angleprotocol/sdk": "^v2.19.0", "@layerzerolabs/lz-sdk": "^0.0.75", "discord.js": "^14.14.1", "prettier": "^2.0.0", diff --git a/scripts/proposals/nameable/UpgradeAgTokenNameable.s.sol b/scripts/proposals/nameable/UpgradeAgTokenNameable.s.sol index 61acc88..059d796 100644 --- a/scripts/proposals/nameable/UpgradeAgTokenNameable.s.sol +++ b/scripts/proposals/nameable/UpgradeAgTokenNameable.s.sol @@ -30,7 +30,7 @@ contract UpgradeAgTokenNameable is Wrapper { function run() external { uint256[] memory chainIds = vm.envUint("CHAIN_IDS", ","); - string memory description = "ipfs://QmRSdyuXeemVEn97RPRSiit6UEUonvwVr9we7bEe2w8v2E"; + string memory description = "ipfs://QmbFMke1KXqnYyBBWxB74N4c5SBnJMVAiMNRcGu6x1AwQH"; /** TODO complete */ string memory name = "EURA"; // previously "agEUR" diff --git a/scripts/proposals/payload.json b/scripts/proposals/payload.json index 6c2f61c..a94ef36 100644 --- a/scripts/proposals/payload.json +++ b/scripts/proposals/payload.json @@ -1,15 +1,15 @@ { "calldatas": { - "0": "0x8f2a0bb000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001517f0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000748ba9cd5a5ddba5aba70a4ac861b2413dca4436000000000000000000000000748ba9cd5a5ddba5aba70a4ac861b2413dca44360000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000002406f3f9e6000000000000000000000000000000000000000000000000000000000000001900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002443ec3e09000000000000000000000000000000000000000000000000000000000000004b00000000000000000000000000000000000000000000000000000000" + "0": "0xbb5a944f00000000000000000000000000000000000000000000000000000000000000b700000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000ca00000000000000000000000000000000000000000000000000000000000000c20000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001600000000000000000000000000000000000000000000000000000000000000001000000000000000000000000d23b51d6f2cb3ec7ca9599d4332a2f10c3cfdf8500000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000a448f2a0bb000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000220000000000000000000000000000000000000000000000000000000000000038000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001517f000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000001d941ef0d3bba4ad67dbfbcee5262f4cee53a32b000000000000000000000000840b25c87b626a259ca5ac32124fa752f0230a72000000000000000000000000840b25c87b626a259ca5ac32124fa752f0230a720000000000000000000000000022228a2cc5e7ef0274a7baa600d44da5ab57760000000000000000000000000022228a2cc5e7ef0274a7baa600d44da5ab57760000000000000000000000000022228a2cc5e7ef0274a7baa600d44da5ab5776000000000000000000000000f1ddcaca7d17f8030ab2eb54f2d9811365efe123000000000000000000000000004626a008b1acdc4c74ab51644093b155e59a23000000000000000000000000004626a008b1acdc4c74ab51644093b155e59a23000000000000000000000000004626a008b1acdc4c74ab51644093b155e59a23000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000026000000000000000000000000000000000000000000000000000000000000002c000000000000000000000000000000000000000000000000000000000000003c00000000000000000000000000000000000000000000000000000000000000420000000000000000000000000000000000000000000000000000000000000048000000000000000000000000000000000000000000000000000000000000004e000000000000000000000000000000000000000000000000000000000000005e0000000000000000000000000000000000000000000000000000000000000064000000000000000000000000000000000000000000000000000000000000000849623609d0000000000000000000000000022228a2cc5e7ef0274a7baa600d44da5ab57760000000000000000000000002b11d82caadd76985861e858029c28446de05a5000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024800096300000000000000000000000004b1e2c2762667331bc91648052f646d1b0d35984000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024983b2d560000000000000000000000000022228a2cc5e7ef0274a7baa600d44da5ab57760000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c45a44621500000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000b5374616b6564205553444100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000057374555344000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024aa4abe7f00000000000000000000000000000000000000000000000094118d90c3e630000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000247ee84349000000000000000000000000a9bbbdde822789f123667044443dc7001fb43c01000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024983b2d56000000000000000000000000004626a008b1acdc4c74ab51644093b155e59a230000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c45a44621500000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000b5374616b6564204555524100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000057374455552000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024aa4abe7f00000000000000000000000000000000000000000000000029f13ee872f918000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000247ee84349000000000000000000000000a9bbbdde822789f123667044443dc7001fb43c01000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000220001000000000000000000000000000000000000000000000000000000000004a87e000000000000000000000000000000000000000000000000000000000000" }, "chainIds": { - "0": 1 + "0": 59144 }, "description": "ipfs://QmRSdyuXeemVEn97RPRSiit6UEUonvwVr9we7bEe2w8v2E", "targets": { - "0": "0x09D81464c7293C774203E46E3C921559c8E9D53f" + "0": "0x896D64B4B7265273dDCD00808f3579563f9790A8" }, "values": { - "0": 0 + "0": 320917191048702 } } \ No newline at end of file diff --git a/utils/forwardUtils.js b/utils/forwardUtils.js index b670b2d..7f1d5ae 100755 --- a/utils/forwardUtils.js +++ b/utils/forwardUtils.js @@ -1,22 +1,20 @@ const { exec } = require("child_process"); if (process.argv.length < 3) { - console.error('Please provide a chain input as an argument.'); - process.exit(1); + console.error("Please provide a chain input as an argument."); + process.exit(1); } const command = process.argv[2]; -const extraArgs = process.argv.slice(3).join(' '); +const extraArgs = process.argv.slice(3).join(" "); - -exec(`node lib/utils/utils/${command}.js ${extraArgs}`, (error, stdout, stderr) => { +exec( + `node lib/utils/utils/${command}.js ${extraArgs}`, + (error, stdout, stderr) => { if (error) { - console.log(error); - process.exit(1); - } - if (stderr) { - console.log(stderr); - process.exit(1); + console.log(error); + process.exit(1); } console.log(stdout); -}); \ No newline at end of file + } +); diff --git a/yarn.lock b/yarn.lock index 8056062..6d97b50 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7,10 +7,10 @@ resolved "https://registry.yarnpkg.com/@adraffy/ens-normalize/-/ens-normalize-1.10.0.tgz#d2a39395c587e092d77cbbc80acf956a54f38bf7" integrity sha512-nA9XHtlAkYfJxY7bce8DcN7eKxWWCWkU+1GR9d+U6MbNpfwQp8TI7vqOsBsMcHoT4mBu2kypKoSKnghEzOOq5Q== -"@angleprotocol/sdk@^v2.14.0": - version "2.14.17" - resolved "https://npm.pkg.github.com/download/@angleprotocol/sdk/2.14.17/a183797ef1372251c1305f02f77eb7d161717189#a183797ef1372251c1305f02f77eb7d161717189" - integrity sha512-7Yn+mo8mwrA0EMqZtveh+fVHNRlcvxPNeQN8M0AIlYysp/rpbhQLZ6aQpTCvnH/5VyyiY8svHBOHs6Tj+aHWEg== +"@angleprotocol/sdk@^v2.19.0": + version "2.19.0" + resolved "https://npm.pkg.github.com/download/@angleprotocol/sdk/2.19.0/fab70b8f9745e22ade307e591005946bcffc3107#fab70b8f9745e22ade307e591005946bcffc3107" + integrity sha512-pxQH7bpdx+WInO5ehpwvvjiUZezg1SznytRsgfXxxX7SbiE9FHaQiamW+KhvvEx/yFQuxvQkj8QnjiiKfvuqxQ== dependencies: "@apollo/client" "^3.7.17" "@typechain/ethers-v5" "^10.0.0" From 5b7ba409c3b8248dc378f2a4c3b8ed369a937354 Mon Sep 17 00:00:00 2001 From: Pablo Veyrat Date: Thu, 18 Jul 2024 19:33:37 +0200 Subject: [PATCH 3/4] fix: linea setup for deployment --- scripts/Constants.s.sol | 2 +- scripts/Interfaces.s.sol | 4 ++++ scripts/proposals/Wrapper.s.sol | 2 +- scripts/proposals/nameable/SetupLinea.s.sol | 21 +++++++-------------- scripts/proposals/payload.json | 4 ++-- test/scripts/nameable/SetupLinea.t.sol | 5 +++-- 6 files changed, 18 insertions(+), 20 deletions(-) diff --git a/scripts/Constants.s.sol b/scripts/Constants.s.sol index fa5415d..5aa5022 100644 --- a/scripts/Constants.s.sol +++ b/scripts/Constants.s.sol @@ -45,4 +45,4 @@ uint64 constant fourPoint3Rate = 1335019428339023872; string constant pathProposal = "/scripts/proposals/payload.json"; address constant proposer = 0xfdA462548Ce04282f4B6D6619823a7C64Fdc0185; -address constant whale = 0x41Bc7d0687e6Cea57Fa26da78379DfDC5627C56d; +address constant whale = 0xD13F8C25CceD32cdfA79EB5eD654Ce3e484dCAF5; diff --git a/scripts/Interfaces.s.sol b/scripts/Interfaces.s.sol index b8cb35a..3101661 100644 --- a/scripts/Interfaces.s.sol +++ b/scripts/Interfaces.s.sol @@ -19,6 +19,10 @@ interface IAccessControlWriteVyper { function accept_transfer_ownership() external; } +interface IProxyAdmin { + function upgrade(address proxy, address implementation) external; +} + interface IVaultManagerGovernance { function setUint64(uint64 param, bytes32 what) external; diff --git a/scripts/proposals/Wrapper.s.sol b/scripts/proposals/Wrapper.s.sol index d91a590..a19660a 100644 --- a/scripts/proposals/Wrapper.s.sol +++ b/scripts/proposals/Wrapper.s.sol @@ -210,7 +210,7 @@ contract Wrapper is Utils { hex"" ); - values[finalPropLength] = nativeFee; + values[finalPropLength] = (nativeFee * GAS_MULTIPLIER) / BASE_GAS; finalPropLength += 1; i += count; diff --git a/scripts/proposals/nameable/SetupLinea.s.sol b/scripts/proposals/nameable/SetupLinea.s.sol index d0e7881..7386aa1 100644 --- a/scripts/proposals/nameable/SetupLinea.s.sol +++ b/scripts/proposals/nameable/SetupLinea.s.sol @@ -19,10 +19,17 @@ contract SetupLinea is Wrapper { string memory symbol, address keeper ) private { + bytes memory upgradeData = abi.encodeWithSelector( + IProxyAdmin.upgrade.selector, + savings, + // SavingsNameable implem on Linea + 0x2C28Bd22aB59341892e85aD76d159d127c4B03FA + ); bytes memory nameAndSymbolData = abi.encodeWithSelector(INameable.setNameAndSymbol.selector, name, symbol); bytes memory maxRateData = abi.encodeWithSelector(ISavings.setMaxRate.selector, maxRate); bytes memory keeperData = abi.encodeWithSelector(ISavings.toggleTrusted.selector, keeper); bytes memory minterData = abi.encodeWithSelector(ITreasuryGovernance.addMinter.selector, savings); + subCalls.push(SubCall(chainId, 0x1D941EF0D3Bba4ad67DBfBCeE5262F4CEE53A32b, 0, upgradeData)); subCalls.push(SubCall(chainId, treasury, 0, minterData)); subCalls.push(SubCall(chainId, savings, 0, nameAndSymbolData)); subCalls.push(SubCall(chainId, savings, 0, maxRateData)); @@ -42,19 +49,6 @@ contract SetupLinea is Wrapper { string memory nameEUR = "Staked EURA"; string memory symbolEUR = "stEUR"; - { - // Upgrade stUSD to the latest version - address proxyAdmin = 0x1D941EF0D3Bba4ad67DBfBCeE5262F4CEE53A32b; - bytes memory upgradeData = abi.encodeWithSelector( - ProxyAdmin.upgradeAndCall.selector, - stUSD, - // SavingsNameable implem on Linea - 0x2b11d82caadD76985861e858029C28446DE05A50, - "" - ); - subCalls.push(SubCall(chainId, proxyAdmin, 0, upgradeData)); - } - { bytes memory treasuryData = abi.encodeWithSelector( ITreasuryGovernance.setCore.selector, @@ -67,7 +61,6 @@ contract SetupLinea is Wrapper { _setMaxRateSavings(stUSD, treasuryUSD, maxRateUSD, nameUSD, symbolUSD, keeper); _setMaxRateSavings(stEUR, treasuryEUR, maxRateEUR, nameEUR, symbolEUR, keeper); - // TODO: complete string memory description = "ipfs://QmRSdyuXeemVEn97RPRSiit6UEUonvwVr9we7bEe2w8v2E"; ( diff --git a/scripts/proposals/payload.json b/scripts/proposals/payload.json index a94ef36..e067007 100644 --- a/scripts/proposals/payload.json +++ b/scripts/proposals/payload.json @@ -1,6 +1,6 @@ { "calldatas": { - "0": "0xbb5a944f00000000000000000000000000000000000000000000000000000000000000b700000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000ca00000000000000000000000000000000000000000000000000000000000000c20000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001600000000000000000000000000000000000000000000000000000000000000001000000000000000000000000d23b51d6f2cb3ec7ca9599d4332a2f10c3cfdf8500000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000a448f2a0bb000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000220000000000000000000000000000000000000000000000000000000000000038000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001517f000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000001d941ef0d3bba4ad67dbfbcee5262f4cee53a32b000000000000000000000000840b25c87b626a259ca5ac32124fa752f0230a72000000000000000000000000840b25c87b626a259ca5ac32124fa752f0230a720000000000000000000000000022228a2cc5e7ef0274a7baa600d44da5ab57760000000000000000000000000022228a2cc5e7ef0274a7baa600d44da5ab57760000000000000000000000000022228a2cc5e7ef0274a7baa600d44da5ab5776000000000000000000000000f1ddcaca7d17f8030ab2eb54f2d9811365efe123000000000000000000000000004626a008b1acdc4c74ab51644093b155e59a23000000000000000000000000004626a008b1acdc4c74ab51644093b155e59a23000000000000000000000000004626a008b1acdc4c74ab51644093b155e59a23000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000026000000000000000000000000000000000000000000000000000000000000002c000000000000000000000000000000000000000000000000000000000000003c00000000000000000000000000000000000000000000000000000000000000420000000000000000000000000000000000000000000000000000000000000048000000000000000000000000000000000000000000000000000000000000004e000000000000000000000000000000000000000000000000000000000000005e0000000000000000000000000000000000000000000000000000000000000064000000000000000000000000000000000000000000000000000000000000000849623609d0000000000000000000000000022228a2cc5e7ef0274a7baa600d44da5ab57760000000000000000000000002b11d82caadd76985861e858029c28446de05a5000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024800096300000000000000000000000004b1e2c2762667331bc91648052f646d1b0d35984000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024983b2d560000000000000000000000000022228a2cc5e7ef0274a7baa600d44da5ab57760000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c45a44621500000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000b5374616b6564205553444100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000057374555344000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024aa4abe7f00000000000000000000000000000000000000000000000094118d90c3e630000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000247ee84349000000000000000000000000a9bbbdde822789f123667044443dc7001fb43c01000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024983b2d56000000000000000000000000004626a008b1acdc4c74ab51644093b155e59a230000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c45a44621500000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000b5374616b6564204555524100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000057374455552000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024aa4abe7f00000000000000000000000000000000000000000000000029f13ee872f918000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000247ee84349000000000000000000000000a9bbbdde822789f123667044443dc7001fb43c01000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000220001000000000000000000000000000000000000000000000000000000000004a87e000000000000000000000000000000000000000000000000000000000000" + "0": "0xbb5a944f00000000000000000000000000000000000000000000000000000000000000b700000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000d400000000000000000000000000000000000000000000000000000000000000cc0000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001600000000000000000000000000000000000000000000000000000000000000001000000000000000000000000d23b51d6f2cb3ec7ca9599d4332a2f10c3cfdf8500000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000ae48f2a0bb000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000024000000000000000000000000000000000000000000000000000000000000003c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001517f000000000000000000000000000000000000000000000000000000000000000b000000000000000000000000840b25c87b626a259ca5ac32124fa752f0230a720000000000000000000000001d941ef0d3bba4ad67dbfbcee5262f4cee53a32b000000000000000000000000840b25c87b626a259ca5ac32124fa752f0230a720000000000000000000000000022228a2cc5e7ef0274a7baa600d44da5ab57760000000000000000000000000022228a2cc5e7ef0274a7baa600d44da5ab57760000000000000000000000000022228a2cc5e7ef0274a7baa600d44da5ab57760000000000000000000000001d941ef0d3bba4ad67dbfbcee5262f4cee53a32b000000000000000000000000f1ddcaca7d17f8030ab2eb54f2d9811365efe123000000000000000000000000004626a008b1acdc4c74ab51644093b155e59a23000000000000000000000000004626a008b1acdc4c74ab51644093b155e59a23000000000000000000000000004626a008b1acdc4c74ab51644093b155e59a23000000000000000000000000000000000000000000000000000000000000000b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000001c0000000000000000000000000000000000000000000000000000000000000024000000000000000000000000000000000000000000000000000000000000002a000000000000000000000000000000000000000000000000000000000000003a00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000046000000000000000000000000000000000000000000000000000000000000004e00000000000000000000000000000000000000000000000000000000000000540000000000000000000000000000000000000000000000000000000000000064000000000000000000000000000000000000000000000000000000000000006a00000000000000000000000000000000000000000000000000000000000000024800096300000000000000000000000004b1e2c2762667331bc91648052f646d1b0d3598400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004499a88ec40000000000000000000000000022228a2cc5e7ef0274a7baa600d44da5ab57760000000000000000000000002c28bd22ab59341892e85ad76d159d127c4b03fa000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024983b2d560000000000000000000000000022228a2cc5e7ef0274a7baa600d44da5ab57760000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c45a44621500000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000b5374616b6564205553444100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000057374555344000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024aa4abe7f00000000000000000000000000000000000000000000000094118d90c3e630000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000247ee84349000000000000000000000000a9bbbdde822789f123667044443dc7001fb43c0100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004499a88ec4000000000000000000000000004626a008b1acdc4c74ab51644093b155e59a230000000000000000000000002c28bd22ab59341892e85ad76d159d127c4b03fa000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024983b2d56000000000000000000000000004626a008b1acdc4c74ab51644093b155e59a230000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c45a44621500000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000b5374616b6564204555524100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000057374455552000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024aa4abe7f00000000000000000000000000000000000000000000000029f13ee872f918000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000247ee84349000000000000000000000000a9bbbdde822789f123667044443dc7001fb43c01000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000220001000000000000000000000000000000000000000000000000000000000004d99b000000000000000000000000000000000000000000000000000000000000" }, "chainIds": { "0": 59144 @@ -10,6 +10,6 @@ "0": "0x896D64B4B7265273dDCD00808f3579563f9790A8" }, "values": { - "0": 320917191048702 + "0": 481606186599933 } } \ No newline at end of file diff --git a/test/scripts/nameable/SetupLinea.t.sol b/test/scripts/nameable/SetupLinea.t.sol index aa5c63f..113dd24 100644 --- a/test/scripts/nameable/SetupLinea.t.sol +++ b/test/scripts/nameable/SetupLinea.t.sol @@ -34,16 +34,17 @@ contract SetupLineaTest is ScriptHelpers { string memory symbolEUR = "stEUR"; assertEq(ITreasuryGovernance(treasuryUSD).core(), 0x4b1E2c2762667331Bc91648052F646d1b0d35984); - assertEq(IGenericAccessControl(treasuryUSD).isMinter(stUSD), true); + assertEq(IGenericAccessControl(0x0000206329b97DB379d5E1Bf586BbDB969C63274).isMinter(stUSD), true); assertEq(IERC20Metadata(stUSD).name(), nameUSD); assertEq(IERC20Metadata(stUSD).symbol(), symbolUSD); assertEq(ISavings(stUSD).maxRate(), maxRateUSD); assertEq(ISavings(stUSD).isTrustedUpdater(keeper), 1); assertEq(ITreasuryGovernance(treasuryEUR).core(), 0x4b1E2c2762667331Bc91648052F646d1b0d35984); - assertEq(IGenericAccessControl(treasuryEUR).isMinter(stEUR), true); + assertEq(IGenericAccessControl(0x1a7e4e63778B4f12a199C062f3eFdD288afCBce8).isMinter(stEUR), true); assertEq(IERC20Metadata(stEUR).name(), nameEUR); assertEq(IERC20Metadata(stEUR).symbol(), symbolEUR); + assertEq(ISavings(stEUR).maxRate(), maxRateEUR); assertEq(ISavings(stEUR).isTrustedUpdater(keeper), 1); } } From b376174b778fe3e936a11c0eb574cfae3843ba8f Mon Sep 17 00:00:00 2001 From: Pablo Veyrat Date: Mon, 22 Jul 2024 14:39:37 +0200 Subject: [PATCH 4/4] feat: linea change to set name --- scripts/proposals/nameable/SetupLinea.s.sol | 57 +++++++++++---------- scripts/proposals/payload.json | 4 +- test/scripts/nameable/SetupLinea.t.sol | 11 ++++ 3 files changed, 43 insertions(+), 29 deletions(-) diff --git a/scripts/proposals/nameable/SetupLinea.s.sol b/scripts/proposals/nameable/SetupLinea.s.sol index 7386aa1..ec4da37 100644 --- a/scripts/proposals/nameable/SetupLinea.s.sol +++ b/scripts/proposals/nameable/SetupLinea.s.sol @@ -11,43 +11,27 @@ contract SetupLinea is Wrapper { // Linea uint256 public constant chainId = CHAIN_LINEA; - function _setMaxRateSavings( - address savings, - address treasury, - uint256 maxRate, - string memory name, - string memory symbol, - address keeper - ) private { - bytes memory upgradeData = abi.encodeWithSelector( - IProxyAdmin.upgrade.selector, - savings, - // SavingsNameable implem on Linea - 0x2C28Bd22aB59341892e85aD76d159d127c4B03FA - ); - bytes memory nameAndSymbolData = abi.encodeWithSelector(INameable.setNameAndSymbol.selector, name, symbol); + function _setMaxRateSavings(address savings, address treasury, uint256 maxRate, address keeper) private { bytes memory maxRateData = abi.encodeWithSelector(ISavings.setMaxRate.selector, maxRate); bytes memory keeperData = abi.encodeWithSelector(ISavings.toggleTrusted.selector, keeper); bytes memory minterData = abi.encodeWithSelector(ITreasuryGovernance.addMinter.selector, savings); - subCalls.push(SubCall(chainId, 0x1D941EF0D3Bba4ad67DBfBCeE5262F4CEE53A32b, 0, upgradeData)); subCalls.push(SubCall(chainId, treasury, 0, minterData)); - subCalls.push(SubCall(chainId, savings, 0, nameAndSymbolData)); subCalls.push(SubCall(chainId, savings, 0, maxRateData)); subCalls.push(SubCall(chainId, savings, 0, keeperData)); } + function _setNameAndSymbol(address token, address implem, string memory name, string memory symbol) private { + bytes memory upgradeData = abi.encodeWithSelector(IProxyAdmin.upgrade.selector, token, implem); + bytes memory nameAndSymbolData = abi.encodeWithSelector(INameable.setNameAndSymbol.selector, name, symbol); + subCalls.push(SubCall(chainId, 0x1D941EF0D3Bba4ad67DBfBCeE5262F4CEE53A32b, 0, upgradeData)); + subCalls.push(SubCall(chainId, token, 0, nameAndSymbolData)); + } + function run() external { address stUSD = 0x0022228a2cc5E7eF0274A7Baa600d44da5aB5776; address stEUR = 0x004626A008B1aCdC4c74ab51644093b155e59A23; - address treasuryEUR = 0xf1dDcACA7D17f8030Ab2eb54f2D9811365EFe123; address treasuryUSD = 0x840b25c87B626a259CA5AC32124fA752F0230a72; - address keeper = 0xa9bbbDDe822789F123667044443dc7001fb43C01; - uint256 maxRateUSD = 10669464645118865408; - uint256 maxRateEUR = 3022265993024575488; - string memory nameUSD = "Staked USDA"; - string memory symbolUSD = "stUSD"; - string memory nameEUR = "Staked EURA"; - string memory symbolEUR = "stEUR"; + address treasuryEUR = 0xf1dDcACA7D17f8030Ab2eb54f2D9811365EFe123; { bytes memory treasuryData = abi.encodeWithSelector( @@ -58,8 +42,27 @@ contract SetupLinea is Wrapper { subCalls.push(SubCall(chainId, treasuryUSD, 0, treasuryData)); } - _setMaxRateSavings(stUSD, treasuryUSD, maxRateUSD, nameUSD, symbolUSD, keeper); - _setMaxRateSavings(stEUR, treasuryEUR, maxRateEUR, nameEUR, symbolEUR, keeper); + { + address savingsNameableImplem = 0x2C28Bd22aB59341892e85aD76d159d127c4B03FA; + _setNameAndSymbol(stUSD, savingsNameableImplem, "Staked USDA", "stUSD"); + _setNameAndSymbol(stEUR, savingsNameableImplem, "Staked EURA", "stEUR"); + } + + { + address agTokenNameableImplem = 0xc42b7A34Cb37eE450cc8059B10D839e4753229d5; + address EURA = 0x1a7e4e63778B4f12a199C062f3eFdD288afCBce8; + address USDA = 0x0000206329b97DB379d5E1Bf586BbDB969C63274; + _setNameAndSymbol(EURA, agTokenNameableImplem, "EURA", "EURA"); + _setNameAndSymbol(USDA, agTokenNameableImplem, "USDA", "USDA"); + } + + { + address keeper = 0xa9bbbDDe822789F123667044443dc7001fb43C01; + uint256 maxRateUSD = 10669464645118865408; + uint256 maxRateEUR = 3022265993024575488; + _setMaxRateSavings(stUSD, treasuryUSD, maxRateUSD, keeper); + _setMaxRateSavings(stEUR, treasuryEUR, maxRateEUR, keeper); + } string memory description = "ipfs://QmRSdyuXeemVEn97RPRSiit6UEUonvwVr9we7bEe2w8v2E"; diff --git a/scripts/proposals/payload.json b/scripts/proposals/payload.json index e067007..0b4e1f2 100644 --- a/scripts/proposals/payload.json +++ b/scripts/proposals/payload.json @@ -1,6 +1,6 @@ { "calldatas": { - "0": "0xbb5a944f00000000000000000000000000000000000000000000000000000000000000b700000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000d400000000000000000000000000000000000000000000000000000000000000cc0000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001600000000000000000000000000000000000000000000000000000000000000001000000000000000000000000d23b51d6f2cb3ec7ca9599d4332a2f10c3cfdf8500000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000ae48f2a0bb000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000024000000000000000000000000000000000000000000000000000000000000003c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001517f000000000000000000000000000000000000000000000000000000000000000b000000000000000000000000840b25c87b626a259ca5ac32124fa752f0230a720000000000000000000000001d941ef0d3bba4ad67dbfbcee5262f4cee53a32b000000000000000000000000840b25c87b626a259ca5ac32124fa752f0230a720000000000000000000000000022228a2cc5e7ef0274a7baa600d44da5ab57760000000000000000000000000022228a2cc5e7ef0274a7baa600d44da5ab57760000000000000000000000000022228a2cc5e7ef0274a7baa600d44da5ab57760000000000000000000000001d941ef0d3bba4ad67dbfbcee5262f4cee53a32b000000000000000000000000f1ddcaca7d17f8030ab2eb54f2d9811365efe123000000000000000000000000004626a008b1acdc4c74ab51644093b155e59a23000000000000000000000000004626a008b1acdc4c74ab51644093b155e59a23000000000000000000000000004626a008b1acdc4c74ab51644093b155e59a23000000000000000000000000000000000000000000000000000000000000000b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000001c0000000000000000000000000000000000000000000000000000000000000024000000000000000000000000000000000000000000000000000000000000002a000000000000000000000000000000000000000000000000000000000000003a00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000046000000000000000000000000000000000000000000000000000000000000004e00000000000000000000000000000000000000000000000000000000000000540000000000000000000000000000000000000000000000000000000000000064000000000000000000000000000000000000000000000000000000000000006a00000000000000000000000000000000000000000000000000000000000000024800096300000000000000000000000004b1e2c2762667331bc91648052f646d1b0d3598400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004499a88ec40000000000000000000000000022228a2cc5e7ef0274a7baa600d44da5ab57760000000000000000000000002c28bd22ab59341892e85ad76d159d127c4b03fa000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024983b2d560000000000000000000000000022228a2cc5e7ef0274a7baa600d44da5ab57760000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c45a44621500000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000b5374616b6564205553444100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000057374555344000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024aa4abe7f00000000000000000000000000000000000000000000000094118d90c3e630000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000247ee84349000000000000000000000000a9bbbdde822789f123667044443dc7001fb43c0100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004499a88ec4000000000000000000000000004626a008b1acdc4c74ab51644093b155e59a230000000000000000000000002c28bd22ab59341892e85ad76d159d127c4b03fa000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024983b2d56000000000000000000000000004626a008b1acdc4c74ab51644093b155e59a230000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c45a44621500000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000b5374616b6564204555524100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000057374455552000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024aa4abe7f00000000000000000000000000000000000000000000000029f13ee872f918000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000247ee84349000000000000000000000000a9bbbdde822789f123667044443dc7001fb43c01000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000220001000000000000000000000000000000000000000000000000000000000004d99b000000000000000000000000000000000000000000000000000000000000" + "0": "0xbb5a944f00000000000000000000000000000000000000000000000000000000000000b7000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000011c00000000000000000000000000000000000000000000000000000000000001140000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001600000000000000000000000000000000000000000000000000000000000000001000000000000000000000000d23b51d6f2cb3ec7ca9599d4332a2f10c3cfdf8500000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000f648f2a0bb000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000002c000000000000000000000000000000000000000000000000000000000000004c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001517f000000000000000000000000000000000000000000000000000000000000000f000000000000000000000000840b25c87b626a259ca5ac32124fa752f0230a720000000000000000000000001d941ef0d3bba4ad67dbfbcee5262f4cee53a32b0000000000000000000000000022228a2cc5e7ef0274a7baa600d44da5ab57760000000000000000000000001d941ef0d3bba4ad67dbfbcee5262f4cee53a32b000000000000000000000000004626a008b1acdc4c74ab51644093b155e59a230000000000000000000000001d941ef0d3bba4ad67dbfbcee5262f4cee53a32b0000000000000000000000001a7e4e63778b4f12a199c062f3efdd288afcbce80000000000000000000000001d941ef0d3bba4ad67dbfbcee5262f4cee53a32b0000000000000000000000000000206329b97db379d5e1bf586bbdb969c63274000000000000000000000000840b25c87b626a259ca5ac32124fa752f0230a720000000000000000000000000022228a2cc5e7ef0274a7baa600d44da5ab57760000000000000000000000000022228a2cc5e7ef0274a7baa600d44da5ab5776000000000000000000000000f1ddcaca7d17f8030ab2eb54f2d9811365efe123000000000000000000000000004626a008b1acdc4c74ab51644093b155e59a23000000000000000000000000004626a008b1acdc4c74ab51644093b155e59a23000000000000000000000000000000000000000000000000000000000000000f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f00000000000000000000000000000000000000000000000000000000000001e0000000000000000000000000000000000000000000000000000000000000024000000000000000000000000000000000000000000000000000000000000002c000000000000000000000000000000000000000000000000000000000000003c00000000000000000000000000000000000000000000000000000000000000440000000000000000000000000000000000000000000000000000000000000054000000000000000000000000000000000000000000000000000000000000005c000000000000000000000000000000000000000000000000000000000000006c00000000000000000000000000000000000000000000000000000000000000740000000000000000000000000000000000000000000000000000000000000084000000000000000000000000000000000000000000000000000000000000008a00000000000000000000000000000000000000000000000000000000000000900000000000000000000000000000000000000000000000000000000000000096000000000000000000000000000000000000000000000000000000000000009c00000000000000000000000000000000000000000000000000000000000000a200000000000000000000000000000000000000000000000000000000000000024800096300000000000000000000000004b1e2c2762667331bc91648052f646d1b0d3598400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004499a88ec40000000000000000000000000022228a2cc5e7ef0274a7baa600d44da5ab57760000000000000000000000002c28bd22ab59341892e85ad76d159d127c4b03fa0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c45a44621500000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000b5374616b656420555344410000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005737455534400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004499a88ec4000000000000000000000000004626a008b1acdc4c74ab51644093b155e59a230000000000000000000000002c28bd22ab59341892e85ad76d159d127c4b03fa0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c45a44621500000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000b5374616b656420455552410000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005737445555200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004499a88ec40000000000000000000000001a7e4e63778b4f12a199c062f3efdd288afcbce8000000000000000000000000c42b7a34cb37ee450cc8059b10d839e4753229d50000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c45a44621500000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000445555241000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004455552410000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004499a88ec40000000000000000000000000000206329b97db379d5e1bf586bbdb969c63274000000000000000000000000c42b7a34cb37ee450cc8059b10d839e4753229d50000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c45a446215000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000004555344410000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000045553444100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024983b2d560000000000000000000000000022228a2cc5e7ef0274a7baa600d44da5ab5776000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024aa4abe7f00000000000000000000000000000000000000000000000094118d90c3e630000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000247ee84349000000000000000000000000a9bbbdde822789f123667044443dc7001fb43c01000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024983b2d56000000000000000000000000004626a008b1acdc4c74ab51644093b155e59a23000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024aa4abe7f00000000000000000000000000000000000000000000000029f13ee872f918000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000247ee84349000000000000000000000000a9bbbdde822789f123667044443dc7001fb43c01000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000220001000000000000000000000000000000000000000000000000000000000005f4e7000000000000000000000000000000000000000000000000000000000000" }, "chainIds": { "0": 59144 @@ -10,6 +10,6 @@ "0": "0x896D64B4B7265273dDCD00808f3579563f9790A8" }, "values": { - "0": 481606186599933 + "0": 482036851897461 } } \ No newline at end of file diff --git a/test/scripts/nameable/SetupLinea.t.sol b/test/scripts/nameable/SetupLinea.t.sol index 113dd24..c60123e 100644 --- a/test/scripts/nameable/SetupLinea.t.sol +++ b/test/scripts/nameable/SetupLinea.t.sol @@ -46,5 +46,16 @@ contract SetupLineaTest is ScriptHelpers { assertEq(IERC20Metadata(stEUR).symbol(), symbolEUR); assertEq(ISavings(stEUR).maxRate(), maxRateEUR); assertEq(ISavings(stEUR).isTrustedUpdater(keeper), 1); + + address EURA = 0x1a7e4e63778B4f12a199C062f3eFdD288afCBce8; + address USDA = 0x0000206329b97DB379d5E1Bf586BbDB969C63274; + + assertEq(IERC20Metadata(EURA).name(), "EURA"); + assertEq(IERC20Metadata(EURA).symbol(), "EURA"); + console.log(IERC20Metadata(EURA).totalSupply()); + + assertEq(IERC20Metadata(USDA).name(), "USDA"); + assertEq(IERC20Metadata(USDA).symbol(), "USDA"); + console.log(IERC20Metadata(USDA).totalSupply()); } }