diff --git a/.gas-snapshot b/.gas-snapshot index 832076a..89f4527 100644 --- a/.gas-snapshot +++ b/.gas-snapshot @@ -135,7 +135,7 @@ ModifySafeOwners:testRevertSafeNotRegisteredRemoveOwner_EOA_Caller() (gas: 50460 ModifySafeOwners:testRevertSafeNotRegisteredRemoveOwner_SAFE_Caller() (gas: 508830) ModifySafeOwners:testRevertZeroAddressAddOwnerWithThreshold() (gas: 1671786) ModifySafeOwners:testRevertZeroAddressProvidedRemoveOwner() (gas: 3078277) -TestDeploy:testDeploy() (gas: 6283203) +TestDeploy:testDeploy() (gas: 6283403) TestDeploySafe:testTransferFundsSafe() (gas: 109254) TestEnableGuard:testEnableKeyperGuard() (gas: 120801) TestEnableGuard:testEnableKeyperModule() (gas: 122062) diff --git a/README.md b/README.md index 2b5ac94..907bc7a 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# KeyperModule - Safe module for Palmera +# PalmeraModule - Safe module for Palmera This contract is a registry of keyper organization/squads setup on a Safe that can be used by specific accounts. For this the contract needs to be enabled as a module on the Safe that holds the assets that should be transferred. diff --git a/foundry.toml b/foundry.toml index 585dadb..32be37f 100644 --- a/foundry.toml +++ b/foundry.toml @@ -18,7 +18,7 @@ libraries = ['./libraries/Constants.sol:Constants:0x5F9Ae7E3aF99D13B14324b35E9Ed # See more config options https://github.com/foundry-rs/foundry/tree/master/config # Gas Report -gas_reports = ['KeyperModule', 'KeyperRoles', 'KeyperGuard'] +gas_reports = ['PalmeraModule', 'PalmeraRoles', 'PalmeraGuard'] # No match contracts no_match_contract = 'Skip*' diff --git a/lcov.info b/lcov.info index e8abd36..7379f85 100644 --- a/lcov.info +++ b/lcov.info @@ -193,11 +193,11 @@ BRF:12 BRH:6 end_of_record TN: -SF:src/KeyperGuard.sol -FN:29,KeyperGuard.checkTransaction -FNDA:435,KeyperGuard.checkTransaction -FN:43,KeyperGuard.checkAfterExecution -FNDA:432,KeyperGuard.checkAfterExecution +SF:src/PalmeraGuard.sol +FN:29,PalmeraGuard.checkTransaction +FNDA:435,PalmeraGuard.checkTransaction +FN:43,PalmeraGuard.checkAfterExecution +FNDA:432,PalmeraGuard.checkAfterExecution DA:44,432 DA:47,432 BRDA:47,0,0,3 @@ -236,15 +236,15 @@ BRF:14 BRH:7 end_of_record TN: -SF:src/KeyperModule.sol -FN:131,KeyperModule.createSafeProxy -FNDA:1,KeyperModule.createSafeProxy +SF:src/PalmeraModule.sol +FN:131,PalmeraModule.createSafeProxy +FNDA:1,PalmeraModule.createSafeProxy DA:135,1 DA:139,1 DA:151,1 DA:152,1 -FN:170,KeyperModule.execTransactionOnBehalf -FNDA:30,KeyperModule.execTransactionOnBehalf +FN:170,PalmeraModule.execTransactionOnBehalf +FNDA:30,PalmeraModule.execTransactionOnBehalf DA:187,0 DA:188,0 BRDA:188,0,0,2 @@ -267,8 +267,8 @@ DA:226,0 BRDA:226,3,0,1 BRDA:226,3,1,9 DA:227,0 -FN:237,KeyperModule.addOwnerWithThreshold -FNDA:16,KeyperModule.addOwnerWithThreshold +FN:237,PalmeraModule.addOwnerWithThreshold +FNDA:16,PalmeraModule.addOwnerWithThreshold DA:248,12 DA:249,12 BRDA:249,4,0,3 @@ -281,8 +281,8 @@ BRDA:255,5,1,8 DA:256,1 DA:259,8 DA:263,8 -FN:273,KeyperModule.removeOwner -FNDA:19,KeyperModule.removeOwner +FN:273,PalmeraModule.removeOwner +FNDA:19,PalmeraModule.removeOwner DA:280,17 DA:282,17 BRDA:281,6,0,4 @@ -299,8 +299,8 @@ BRDA:294,8,1,9 DA:295,1 DA:298,9 DA:303,9 -FN:312,KeyperModule.setRole -FNDA:32,KeyperModule.setRole +FN:312,PalmeraModule.setRole +FNDA:32,PalmeraModule.setRole DA:318,31 DA:320,31 BRDA:319,9,0,3 @@ -317,24 +317,24 @@ BRDA:331,11,1,27 DA:337,27 DA:339,27 DA:340,27 -FN:346,KeyperModule.registerOrg -FNDA:125,KeyperModule.registerOrg +FN:346,PalmeraModule.registerOrg +FNDA:125,PalmeraModule.registerOrg DA:351,125 DA:352,125 DA:353,125 DA:354,125 DA:356,125 DA:358,125 -FN:365,KeyperModule.createRootSafeSquad -FNDA:22,KeyperModule.createRootSafeSquad +FN:365,PalmeraModule.createRootSafeSquad +FNDA:22,PalmeraModule.createRootSafeSquad DA:372,22 DA:373,22 DA:374,22 DA:375,22 DA:377,22 DA:379,22 -FN:388,KeyperModule.addSquad -FNDA:297,KeyperModule.addSquad +FN:388,PalmeraModule.addSquad +FNDA:297,PalmeraModule.addSquad DA:395,295 BRDA:395,12,0,- BRDA:395,12,1,295 @@ -367,8 +367,8 @@ BRDA:424,16,0,- BRDA:424,16,1,139 DA:431,139 DA:436,290 -FN:444,KeyperModule.removeSquad -FNDA:20,KeyperModule.removeSquad +FN:444,PalmeraModule.removeSquad +FNDA:20,PalmeraModule.removeSquad DA:449,27 DA:450,27 DA:451,27 @@ -405,8 +405,8 @@ DA:502,18 DA:505,18 DA:510,18 DA:511,18 -FN:519,KeyperModule.disconnectSafe -FNDA:14,KeyperModule.disconnectSafe +FN:519,PalmeraModule.disconnectSafe +FNDA:14,PalmeraModule.disconnectSafe DA:525,9 DA:526,9 DA:527,9 @@ -423,8 +423,8 @@ DA:547,7 DA:548,7 BRDA:548,23,0,- BRDA:548,23,1,7 -FN:553,KeyperModule.removeWholeTree -FNDA:5,KeyperModule.removeWholeTree +FN:553,PalmeraModule.removeWholeTree +FNDA:5,PalmeraModule.removeWholeTree DA:554,4 DA:555,4 DA:556,4 @@ -441,8 +441,8 @@ DA:574,4 DA:575,4 BRDA:575,24,0,3 BRDA:575,24,1,4 -FN:581,KeyperModule.promoteRoot -FNDA:4,KeyperModule.promoteRoot +FN:581,PalmeraModule.promoteRoot +FNDA:4,PalmeraModule.promoteRoot DA:587,4 DA:588,4 DA:590,4 @@ -460,8 +460,8 @@ DA:607,1 DA:609,1 DA:610,1 DA:611,1 -FN:620,KeyperModule.updateSuper -FNDA:10,KeyperModule.updateSuper +FN:620,PalmeraModule.updateSuper +FNDA:10,PalmeraModule.updateSuper DA:626,8 DA:627,8 DA:629,8 @@ -498,8 +498,8 @@ BRDA:666,32,1,1 DA:671,1 DA:675,1 DA:676,1 -FN:688,KeyperModule.updateDepthTreeLimit -FNDA:8,KeyperModule.updateDepthTreeLimit +FN:688,PalmeraModule.updateDepthTreeLimit +FNDA:8,PalmeraModule.updateDepthTreeLimit DA:693,6 DA:694,6 DA:695,6 @@ -509,8 +509,8 @@ BRDA:696,33,1,3 DA:698,3 DA:700,3 DA:703,3 -FN:711,KeyperModule.addToList -FNDA:22,KeyperModule.addToList +FN:711,PalmeraModule.addToList +FNDA:22,PalmeraModule.addToList DA:716,12 BRDA:716,34,0,1 BRDA:716,34,1,11 @@ -535,8 +535,8 @@ DA:734,35 DA:736,8 DA:737,8 DA:738,8 -FN:743,KeyperModule.dropFromList -FNDA:17,KeyperModule.dropFromList +FN:743,PalmeraModule.dropFromList +FNDA:17,PalmeraModule.dropFromList DA:749,6 DA:750,6 BRDA:750,38,0,1 @@ -553,37 +553,37 @@ DA:756,2 DA:757,2 DA:758,2 DA:759,2 -FN:763,KeyperModule.enableAllowlist -FNDA:12,KeyperModule.enableAllowlist +FN:763,PalmeraModule.enableAllowlist +FNDA:12,PalmeraModule.enableAllowlist DA:764,7 DA:765,7 DA:766,7 -FN:770,KeyperModule.enableDenylist -FNDA:13,KeyperModule.enableDenylist +FN:770,PalmeraModule.enableDenylist +FNDA:13,PalmeraModule.enableDenylist DA:771,8 DA:772,8 DA:773,8 -FN:777,KeyperModule.disableDenyHelper -FNDA:1,KeyperModule.disableDenyHelper +FN:777,PalmeraModule.disableDenyHelper +FNDA:1,PalmeraModule.disableDenyHelper DA:782,1 DA:783,1 DA:784,1 -FN:793,KeyperModule.getSquadInfo -FNDA:43,KeyperModule.getSquadInfo +FN:793,PalmeraModule.getSquadInfo +FNDA:43,PalmeraModule.getSquadInfo DA:806,41 DA:807,41 -FN:821,KeyperModule.hasNotPermissionOverTarget -FNDA:4,KeyperModule.hasNotPermissionOverTarget +FN:821,PalmeraModule.hasNotPermissionOverTarget +FNDA:4,PalmeraModule.hasNotPermissionOverTarget DA:826,46 DA:830,0 -FN:836,KeyperModule.isOrgRegistered -FNDA:1,KeyperModule.isOrgRegistered +FN:836,PalmeraModule.isOrgRegistered +FNDA:1,PalmeraModule.isOrgRegistered DA:837,4287 BRDA:837,41,0,126 BRDA:837,41,1,4161 DA:838,4161 -FN:845,KeyperModule.isRootSafeOf -FNDA:14,KeyperModule.isRootSafeOf +FN:845,PalmeraModule.isRootSafeOf +FNDA:14,PalmeraModule.isRootSafeOf DA:851,134 BRDA:851,42,0,- BRDA:851,42,1,134 @@ -593,8 +593,8 @@ DA:854,134 BRDA:854,43,0,17 BRDA:854,43,1,117 DA:855,117 -FN:865,KeyperModule.isTreeMember -FNDA:24,KeyperModule.isTreeMember +FN:865,PalmeraModule.isTreeMember +FNDA:24,PalmeraModule.isTreeMember DA:870,400 BRDA:870,44,0,293 BRDA:870,44,1,107 @@ -607,16 +607,16 @@ DA:874,104 BRDA:874,46,0,12 BRDA:874,46,1,92 DA:875,92 -FN:881,KeyperModule.isLimitLevel -FNDA:9,KeyperModule.isLimitLevel +FN:881,PalmeraModule.isLimitLevel +FNDA:9,PalmeraModule.isLimitLevel DA:882,306 BRDA:882,47,0,- BRDA:882,47,1,306 DA:883,306 DA:884,306 DA:885,306 -FN:892,KeyperModule.isSuperSafe -FNDA:28,KeyperModule.isSuperSafe +FN:892,PalmeraModule.isSuperSafe +FNDA:28,PalmeraModule.isSuperSafe DA:897,79 BRDA:897,48,0,10 BRDA:897,48,1,69 @@ -627,16 +627,16 @@ BRDA:901,49,0,14 BRDA:901,49,1,55 DA:906,14 DA:908,55 -FN:915,KeyperModule.isPendingRemove -FNDA:0,KeyperModule.isPendingRemove +FN:915,PalmeraModule.isPendingRemove +FNDA:0,PalmeraModule.isPendingRemove DA:920,8 DA:923,8 BRDA:922,50,0,7 BRDA:922,50,1,1 DA:927,7 DA:929,1 -FN:932,KeyperModule.isSafeRegistered -FNDA:451,KeyperModule.isSafeRegistered +FN:932,PalmeraModule.isSafeRegistered +FNDA:451,PalmeraModule.isSafeRegistered DA:933,1117 BRDA:933,51,0,- BRDA:933,51,1,1117 @@ -648,28 +648,28 @@ DA:937,644 BRDA:937,53,0,- BRDA:937,53,1,644 DA:938,644 -FN:944,KeyperModule.getRootSafe -FNDA:8,KeyperModule.getRootSafe +FN:944,PalmeraModule.getRootSafe +FNDA:8,PalmeraModule.getRootSafe DA:949,73 DA:950,73 DA:951,73 BRDA:951,54,0,15 BRDA:951,54,1,58 DA:952,58 -FN:959,KeyperModule.getSquadSafeAddress -FNDA:242,KeyperModule.getSquadSafeAddress +FN:959,PalmeraModule.getSquadSafeAddress +FNDA:242,PalmeraModule.getSquadSafeAddress DA:965,242 DA:966,242 -FN:972,KeyperModule.getOrgHashBySafe -FNDA:164,KeyperModule.getOrgHashBySafe +FN:972,PalmeraModule.getOrgHashBySafe +FNDA:164,PalmeraModule.getOrgHashBySafe DA:973,2337 DA:974,2341 BRDA:974,55,0,- BRDA:974,55,1,1864 DA:975,1864 DA:978,473 -FN:985,KeyperModule.getSquadIdBySafe -FNDA:385,KeyperModule.getSquadIdBySafe +FN:985,PalmeraModule.getSquadIdBySafe +FNDA:385,PalmeraModule.getSquadIdBySafe DA:990,4139 BRDA:990,56,0,1 BRDA:990,56,1,4138 @@ -680,8 +680,8 @@ BRDA:995,57,0,- BRDA:995,57,1,3341 DA:996,3341 DA:999,797 -FN:1006,KeyperModule.getOrgBySquad -FNDA:72,KeyperModule.getOrgBySquad +FN:1006,PalmeraModule.getOrgBySquad +FNDA:72,PalmeraModule.getOrgBySquad DA:1011,2639 BRDA:1011,58,0,2 BRDA:1011,58,1,2637 @@ -693,8 +693,8 @@ DA:1014,2633 DA:1017,2637 BRDA:1017,60,0,4 BRDA:1017,60,1,2633 -FN:1024,KeyperModule.isSafeLead -FNDA:16,KeyperModule.isSafeLead +FN:1024,PalmeraModule.isSafeLead +FNDA:16,PalmeraModule.isSafeLead DA:1029,55 DA:1030,55 DA:1031,55 @@ -705,8 +705,8 @@ BRDA:1032,62,0,37 BRDA:1032,62,1,18 DA:1033,37 DA:1035,18 -FN:1043,KeyperModule._createOrgOrRoot -FNDA:147,KeyperModule._createOrgOrRoot +FN:1043,PalmeraModule._createOrgOrRoot +FNDA:147,PalmeraModule._createOrgOrRoot DA:1048,147 BRDA:1048,63,0,- BRDA:1048,63,1,147 @@ -727,8 +727,8 @@ DA:1070,147 DA:1073,147 DA:1074,147 DA:1077,147 -FN:1084,KeyperModule._exitSafe -FNDA:23,KeyperModule._exitSafe +FN:1084,PalmeraModule._exitSafe +FNDA:23,PalmeraModule._exitSafe DA:1085,23 DA:1086,23 DA:1087,23 @@ -746,8 +746,8 @@ DA:1101,0 DA:1103,23 DA:1107,23 DA:1109,23 -FN:1117,KeyperModule.disableSafeLeadRoles -FNDA:30,KeyperModule.disableSafeLeadRoles +FN:1117,PalmeraModule.disableSafeLeadRoles +FNDA:30,PalmeraModule.disableSafeLeadRoles DA:1118,30 DA:1119,30 BRDA:1119,67,0,- @@ -761,8 +761,8 @@ DA:1131,30 BRDA:1130,69,0,- BRDA:1130,69,1,- DA:1135,0 -FN:1144,KeyperModule.removeIndexSquad -FNDA:23,KeyperModule.removeIndexSquad +FN:1144,PalmeraModule.removeIndexSquad +FNDA:23,PalmeraModule.removeIndexSquad DA:1145,23 DA:1146,50 BRDA:1146,70,0,- @@ -770,8 +770,8 @@ BRDA:1146,70,1,23 DA:1147,23 DA:1148,23 DA:1149,23 -FN:1156,KeyperModule.removeOrg -FNDA:3,KeyperModule.removeOrg +FN:1156,PalmeraModule.removeOrg +FNDA:3,PalmeraModule.removeOrg DA:1157,3 DA:1158,3 BRDA:1158,71,0,- @@ -779,8 +779,8 @@ BRDA:1158,71,1,3 DA:1159,3 DA:1160,3 DA:1161,3 -FN:1170,KeyperModule._seekMember -FNDA:456,KeyperModule._seekMember +FN:1170,PalmeraModule._seekMember +FNDA:456,PalmeraModule._seekMember DA:1175,456 DA:1176,456 DA:1179,456 @@ -799,8 +799,8 @@ BRDA:1195,73,1,482 DA:1197,482 DA:1199,482 DA:1201,482 -FN:1209,KeyperModule.getTreeMember -FNDA:4,KeyperModule.getTreeMember +FN:1209,PalmeraModule.getTreeMember +FNDA:4,PalmeraModule.getTreeMember DA:1214,4 DA:1215,4 DA:1217,19 @@ -823,9 +823,9 @@ BRF:152 BRH:123 end_of_record TN: -SF:src/KeyperRoles.sol -FN:29,KeyperRoles.setupRoles -FNDA:1,KeyperRoles.setupRoles +SF:src/PalmeraRoles.sol +FN:29,PalmeraRoles.setupRoles +FNDA:1,PalmeraRoles.setupRoles DA:37,1 DA:45,1 DA:53,1 @@ -850,8 +850,8 @@ DA:207,1 DA:216,1 DA:224,1 DA:225,1 -FN:232,KeyperRoles.setUserRole -FNDA:2,KeyperRoles.setUserRole +FN:232,PalmeraRoles.setUserRole +FNDA:2,PalmeraRoles.setUserRole DA:238,2 BRDA:238,0,0,1 BRDA:238,0,1,1 diff --git a/script/DeployKeyperEnv.s.sol b/script/DeployKeyperEnv.s.sol index 7a0f803..d6396f1 100644 --- a/script/DeployKeyperEnv.s.sol +++ b/script/DeployKeyperEnv.s.sol @@ -3,20 +3,20 @@ pragma solidity ^0.8.15; import "forge-std/Script.sol"; import "@solenv/Solenv.sol"; -import "../src/KeyperRoles.sol"; -import "../src/KeyperModule.sol"; -import {KeyperGuard} from "../src/KeyperGuard.sol"; +import "../src/PalmeraRoles.sol"; +import "../src/PalmeraModule.sol"; +import {PalmeraGuard} from "../src/PalmeraGuard.sol"; import {CREATE3Factory} from "@create3/CREATE3Factory.sol"; import {GnosisSafeProxyFactory} from "@safe-contracts/proxies/GnosisSafeProxyFactory.sol"; import {GnosisSafe} from "@safe-contracts/GnosisSafe.sol"; -/// Deployement of Safe contracts, KeyperRoles and KeyperModule +/// Deployement of Safe contracts, PalmeraRoles and PalmeraModule /// @custom:security-contact general@palmeradao.xyz contract DeployKeyperEnv is Script { function run() public { vm.startBroadcast(); - // Using CREATE3Factory to be able to predic deployment address for KeyperModule + // Using CREATE3Factory to be able to predic deployment address for PalmeraModule // More info https://github.com/lifinance/create3-factory // The address https://sepolia.etherscan.io/address/0x93FEC2C00BfE902F733B57c5a6CeeD7CD1384AE1#code, is the address of the CREATE3Factory in Sepolia CREATE3Factory factory = @@ -31,10 +31,10 @@ contract DeployKeyperEnv is Script { address proxyFactory = vm.envAddress("PROXY_FACTORY_ADDRESS"); uint256 maxTreeDepth = 50; - // Deploy KeyperRoles: KeyperModule is set as owner of KeyperRoles authority + // Deploy PalmeraRoles: PalmeraModule is set as owner of PalmeraRoles authority console.log("KeyperModulePredicted: ", keyperModulePredicted); - KeyperRoles keyperRoles = new KeyperRoles(keyperModulePredicted); - console.log("KeyperRoles deployed at: ", address(keyperRoles)); + PalmeraRoles keyperRoles = new PalmeraRoles(keyperModulePredicted); + console.log("PalmeraRoles deployed at: ", address(keyperRoles)); bytes memory args = abi.encode( address(masterCopy), @@ -43,15 +43,16 @@ contract DeployKeyperEnv is Script { maxTreeDepth ); - bytes memory bytecode = - abi.encodePacked(vm.getCode("KeyperModule.sol:KeyperModule"), args); + bytes memory bytecode = abi.encodePacked( + vm.getCode("PalmeraModule.sol:PalmeraModule"), args + ); address keyperModuleAddr = factory.deploy(salt, bytecode); - console.log("KeyperModule deployed at: ", keyperModuleAddr); + console.log("PalmeraModule deployed at: ", keyperModuleAddr); /// Deploy Guard Contract - KeyperGuard keyperGuard = new KeyperGuard(keyperModuleAddr); - console.log("KeyperGuard deployed at: ", address(keyperGuard)); + PalmeraGuard keyperGuard = new PalmeraGuard(keyperModuleAddr); + console.log("PalmeraGuard deployed at: ", address(keyperGuard)); vm.stopBroadcast(); } diff --git a/script/DeployKeyperRoles.t.sol b/script/DeployKeyperRoles.t.sol index 6deb87e..8c396d9 100644 --- a/script/DeployKeyperRoles.t.sol +++ b/script/DeployKeyperRoles.t.sol @@ -3,9 +3,9 @@ pragma solidity ^0.8.15; import "forge-std/Script.sol"; import {Auth, Authority} from "@solmate/auth/Auth.sol"; -import "../src/KeyperRoles.sol"; +import "../src/PalmeraRoles.sol"; -/// @title Deploy KeyperRoles +/// @title Deploy PalmeraRoles /// @custom:security-contact general@palmeradao.xyz contract DeployKeyperRoles is Script { function run() public { @@ -16,7 +16,7 @@ contract DeployKeyperRoles is Script { function deploy(address keyperModule) internal { vm.startBroadcast(); - KeyperRoles roles = new KeyperRoles(keyperModule); + PalmeraRoles roles = new PalmeraRoles(keyperModule); vm.stopBroadcast(); } } diff --git a/script/DeployKeyperSafe.t.sol b/script/DeployKeyperSafe.t.sol index 682d55c..38dd8eb 100644 --- a/script/DeployKeyperSafe.t.sol +++ b/script/DeployKeyperSafe.t.sol @@ -2,7 +2,7 @@ pragma solidity ^0.8.15; import "forge-std/Script.sol"; -import {KeyperModule} from "../src/KeyperModule.sol"; +import {PalmeraModule} from "../src/PalmeraModule.sol"; import "@solenv/Solenv.sol"; /// @title Deploy KeyperSafe @@ -17,7 +17,7 @@ contract DeployKeyperSafe is Script { uint256 threshold = vm.envUint("THRESHOLD"); vm.startBroadcast(); - KeyperModule keyper = KeyperModule(keyperModuleAddress); + PalmeraModule keyper = PalmeraModule(keyperModuleAddress); vm.stopBroadcast(); } } diff --git a/script/DeployModuleWithMockedSafe.t.sol b/script/DeployModuleWithMockedSafe.t.sol index 793a488..9d97654 100644 --- a/script/DeployModuleWithMockedSafe.t.sol +++ b/script/DeployModuleWithMockedSafe.t.sol @@ -2,12 +2,12 @@ pragma solidity ^0.8.15; import "forge-std/Script.sol"; -import "src/KeyperModule.sol"; +import "src/PalmeraModule.sol"; import "test/mocks/MockedContract.t.sol"; import {CREATE3Factory} from "@create3/CREATE3Factory.sol"; import "@solenv/Solenv.sol"; -/// Deployement of Safe contracts, KeyperRoles and KeyperModule +/// Deployement of Safe contracts, PalmeraRoles and PalmeraModule /// @custom:security-contact general@palmeradao.xyz contract DeployModuleWithMockedSafe is Script { function run() public { @@ -19,7 +19,7 @@ contract DeployModuleWithMockedSafe is Script { vm.startBroadcast(); MockedContract masterCopyMocked = new MockedContract(); MockedContract proxyFactoryMocked = new MockedContract(); - KeyperModule keyperModule = new KeyperModule( + PalmeraModule keyperModule = new PalmeraModule( address(masterCopyMocked), address(proxyFactoryMocked), rolesAuthority, diff --git a/src/KeyperGuard.sol b/src/PalmeraGuard.sol similarity index 90% rename from src/KeyperGuard.sol rename to src/PalmeraGuard.sol index f04af67..d918687 100644 --- a/src/KeyperGuard.sol +++ b/src/PalmeraGuard.sol @@ -4,26 +4,26 @@ pragma solidity ^0.8.15; import {Guard, BaseGuard} from "@safe-contracts/base/GuardManager.sol"; import {StorageAccessible} from "@safe-contracts/common/StorageAccessible.sol"; import { - KeyperModule, + PalmeraModule, Context, Errors, Constants, ISafe, ISafeProxy, Enum -} from "./KeyperModule.sol"; +} from "./PalmeraModule.sol"; /// @title Keyper Guard /// @custom:security-contact general@palmeradao.xyz -contract KeyperGuard is BaseGuard, Context { - KeyperModule keyperModule; +contract PalmeraGuard is BaseGuard, Context { + PalmeraModule keyperModule; - string public constant NAME = "Keyper Guard"; + string public constant NAME = "Palmera Guard"; string public constant VERSION = "0.2.0"; constructor(address keyperModuleAddr) { if (keyperModuleAddr == address(0)) revert Errors.ZeroAddressProvided(); - keyperModule = KeyperModule(keyperModuleAddr); + keyperModule = PalmeraModule(keyperModuleAddr); } function checkTransaction( diff --git a/src/KeyperModule.sol b/src/PalmeraModule.sol similarity index 99% rename from src/KeyperModule.sol rename to src/PalmeraModule.sol index 19e31be..ad7bf61 100644 --- a/src/KeyperModule.sol +++ b/src/PalmeraModule.sol @@ -20,12 +20,12 @@ import {ReentrancyGuard} from "@openzeppelin/security/ReentrancyGuard.sol"; /// @title Keyper Module /// @custom:security-contact general@palmeradao.xyz -contract KeyperModule is Auth, ReentrancyGuard, Helpers { +contract PalmeraModule is Auth, ReentrancyGuard, Helpers { using GnosisSafeMath for uint256; using Address for address; /// @dev Definition of Safe module - string public constant NAME = "Keyper Module"; + string public constant NAME = "Palmera Module"; string public constant VERSION = "0.2.0"; /// @dev Control Nonce of the module uint256 public nonce; diff --git a/src/KeyperRoles.sol b/src/PalmeraRoles.sol similarity index 86% rename from src/KeyperRoles.sol rename to src/PalmeraRoles.sol index 8e48717..25909fa 100644 --- a/src/KeyperRoles.sol +++ b/src/PalmeraRoles.sol @@ -10,8 +10,8 @@ import {Events} from "../libraries/Events.sol"; /// @title Keyper Roles /// @custom:security-contact general@palmeradao.xyz -contract KeyperRoles is RolesAuthority, ValidAddress { - string public constant NAME = "Keyper Roles"; +contract PalmeraRoles is RolesAuthority, ValidAddress { + string public constant NAME = "Palmera Roles"; string public constant VERSION = "0.2.0"; constructor(address keyperModule) @@ -27,7 +27,7 @@ contract KeyperRoles is RolesAuthority, ValidAddress { { /// Define Role 0 - SAFE_LEAD - /// Target contract: KeyperModule + /// Target contract: PalmeraModule /// Auth function addOwnerWithThreshold setRoleCapability( uint8(DataTypes.Role.SAFE_LEAD), @@ -35,7 +35,7 @@ contract KeyperRoles is RolesAuthority, ValidAddress { Constants.ADD_OWNER, true ); - /// Target contract: KeyperModule + /// Target contract: PalmeraModule /// Auth function removeOwner setRoleCapability( uint8(DataTypes.Role.SAFE_LEAD), @@ -43,7 +43,7 @@ contract KeyperRoles is RolesAuthority, ValidAddress { Constants.REMOVE_OWNER, true ); - /// Target contract: KeyperModule + /// Target contract: PalmeraModule /// Auth function execTransactionOnBehalf setRoleCapability( uint8(DataTypes.Role.SAFE_LEAD), @@ -53,7 +53,7 @@ contract KeyperRoles is RolesAuthority, ValidAddress { ); /// Define Role 1 - SAFE_LEAD_EXEC_ON_BEHALF_ONLY - /// Target contract: KeyperModule + /// Target contract: PalmeraModule /// Auth function execTransactionOnBehalf setRoleCapability( uint8(DataTypes.Role.SAFE_LEAD_EXEC_ON_BEHALF_ONLY), @@ -63,7 +63,7 @@ contract KeyperRoles is RolesAuthority, ValidAddress { ); /// Define Role 2 - SAFE_LEAD_MODIFY_OWNERS_ONLY - /// Target contract: KeyperModule + /// Target contract: PalmeraModule /// Auth function addOwnerWithThreshold setRoleCapability( uint8(DataTypes.Role.SAFE_LEAD_MODIFY_OWNERS_ONLY), @@ -71,7 +71,7 @@ contract KeyperRoles is RolesAuthority, ValidAddress { Constants.ADD_OWNER, true ); - /// Target contract: KeyperModule + /// Target contract: PalmeraModule /// Auth function removeOwner setRoleCapability( uint8(DataTypes.Role.SAFE_LEAD_MODIFY_OWNERS_ONLY), @@ -81,7 +81,7 @@ contract KeyperRoles is RolesAuthority, ValidAddress { ); /// Define Role 3 - SUPER_SAFE - /// Target contract: KeyperModule + /// Target contract: PalmeraModule /// Auth function addOwnerWithThreshold setRoleCapability( uint8(DataTypes.Role.SUPER_SAFE), @@ -89,7 +89,7 @@ contract KeyperRoles is RolesAuthority, ValidAddress { Constants.ADD_OWNER, true ); - /// Target contract: KeyperModule + /// Target contract: PalmeraModule /// Auth function removeOwner setRoleCapability( uint8(DataTypes.Role.SUPER_SAFE), @@ -97,7 +97,7 @@ contract KeyperRoles is RolesAuthority, ValidAddress { Constants.REMOVE_OWNER, true ); - /// Target contract: KeyperModule + /// Target contract: PalmeraModule /// Auth function execTransactionOnBehalf setRoleCapability( uint8(DataTypes.Role.SUPER_SAFE), @@ -105,7 +105,7 @@ contract KeyperRoles is RolesAuthority, ValidAddress { Constants.EXEC_ON_BEHALF, true ); - /// Target contract: KeyperModule + /// Target contract: PalmeraModule /// Auth function removeSquad setRoleCapability( uint8(DataTypes.Role.SUPER_SAFE), @@ -115,7 +115,7 @@ contract KeyperRoles is RolesAuthority, ValidAddress { ); /// Define Role 4 - ROOT_SAFE - /// Target contract: KeyperModule + /// Target contract: PalmeraModule /// Auth function setRole setRoleCapability( uint8(DataTypes.Role.ROOT_SAFE), @@ -123,7 +123,7 @@ contract KeyperRoles is RolesAuthority, ValidAddress { Constants.ROLE_ASSIGMENT, true ); - /// Target contract: KeyperModule + /// Target contract: PalmeraModule /// Auth function enable Allow List setRoleCapability( uint8(DataTypes.Role.ROOT_SAFE), @@ -131,7 +131,7 @@ contract KeyperRoles is RolesAuthority, ValidAddress { Constants.ENABLE_ALLOWLIST, true ); - /// Target contract: KeyperModule + /// Target contract: PalmeraModule /// Auth function enable Deny List setRoleCapability( uint8(DataTypes.Role.ROOT_SAFE), @@ -139,7 +139,7 @@ contract KeyperRoles is RolesAuthority, ValidAddress { Constants.ENABLE_DENYLIST, true ); - /// Target contract: KeyperModule + /// Target contract: PalmeraModule /// Auth function Disable Deny Helper setRoleCapability( uint8(DataTypes.Role.ROOT_SAFE), @@ -147,7 +147,7 @@ contract KeyperRoles is RolesAuthority, ValidAddress { Constants.DISABLE_DENY_HELPER, true ); - /// Target contract: KeyperModule + /// Target contract: PalmeraModule /// Auth function Add to The List setRoleCapability( uint8(DataTypes.Role.ROOT_SAFE), @@ -155,7 +155,7 @@ contract KeyperRoles is RolesAuthority, ValidAddress { Constants.ADD_TO_LIST, true ); - /// Target contract: KeyperModule + /// Target contract: PalmeraModule /// Auth function Remove from List setRoleCapability( uint8(DataTypes.Role.ROOT_SAFE), @@ -163,7 +163,7 @@ contract KeyperRoles is RolesAuthority, ValidAddress { Constants.DROP_FROM_LIST, true ); - /// Target contract: KeyperModule + /// Target contract: PalmeraModule /// Auth function updateSuper setRoleCapability( uint8(DataTypes.Role.ROOT_SAFE), @@ -171,7 +171,7 @@ contract KeyperRoles is RolesAuthority, ValidAddress { Constants.UPDATE_SUPER_SAFE, true ); - /// Target contract: KeyperModule + /// Target contract: PalmeraModule /// Auth function createRootSafeSquad setRoleCapability( uint8(DataTypes.Role.ROOT_SAFE), @@ -179,7 +179,7 @@ contract KeyperRoles is RolesAuthority, ValidAddress { Constants.CREATE_ROOT_SAFE, true ); - /// Target contract: KeyperModule + /// Target contract: PalmeraModule /// Auth function updateDepthTreeLimit setRoleCapability( uint8(DataTypes.Role.ROOT_SAFE), @@ -188,7 +188,7 @@ contract KeyperRoles is RolesAuthority, ValidAddress { true ); - /// Target contract: KeyperModule + /// Target contract: PalmeraModule /// Auth function disconnectedSafe setRoleCapability( uint8(DataTypes.Role.ROOT_SAFE), @@ -197,7 +197,7 @@ contract KeyperRoles is RolesAuthority, ValidAddress { true ); - /// Target contract: KeyperModule + /// Target contract: PalmeraModule /// Auth function promoteRoot setRoleCapability( uint8(DataTypes.Role.ROOT_SAFE), @@ -206,7 +206,7 @@ contract KeyperRoles is RolesAuthority, ValidAddress { true ); - /// Target contract: KeyperModule + /// Target contract: PalmeraModule /// Auth function promoteRoot setRoleCapability( uint8(DataTypes.Role.ROOT_SAFE), diff --git a/src/ReentrancyAttack.sol b/src/ReentrancyAttack.sol index dbe40f4..8d88e48 100644 --- a/src/ReentrancyAttack.sol +++ b/src/ReentrancyAttack.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: LGPL-3.0-only pragma solidity ^0.8.15; -import {KeyperModule} from "../src/KeyperModule.sol"; +import {PalmeraModule} from "../src/PalmeraModule.sol"; import {Enum} from "@safe-contracts/common/Enum.sol"; import {Errors} from "../libraries/Errors.sol"; import {DataTypes} from "../libraries/DataTypes.sol"; @@ -18,10 +18,10 @@ contract Attacker { address[] public owners = new address[](2); - KeyperModule public keyperModule; + PalmeraModule public keyperModule; constructor(address _contractToAttackAddress) { - keyperModule = KeyperModule(_contractToAttackAddress); + keyperModule = PalmeraModule(_contractToAttackAddress); } //this is called when Attackee sends Ether to this contract (Attacker) diff --git a/test/EnableGuard.t.sol b/test/EnableGuard.t.sol index 5f86c0c..19ed9c8 100644 --- a/test/EnableGuard.t.sol +++ b/test/EnableGuard.t.sol @@ -3,15 +3,15 @@ pragma solidity ^0.8.15; import "forge-std/Test.sol"; import "./helpers/SafeHelper.t.sol"; -import {KeyperModule, Errors, Constants} from "../src/KeyperModule.sol"; -import {KeyperGuard} from "../src/KeyperGuard.sol"; +import {PalmeraModule, Errors, Constants} from "../src/PalmeraModule.sol"; +import {PalmeraGuard} from "../src/PalmeraGuard.sol"; import {StorageAccessible} from "@safe-contracts/common/StorageAccessible.sol"; /// @title TestEnableModule /// @custom:security-contact general@palmeradao.xyz contract TestEnableGuard is Test { - KeyperModule keyperModule; - KeyperGuard keyperGuard; + PalmeraModule keyperModule; + PalmeraGuard keyperGuard; SafeHelper safeHelper; address safeAddr; @@ -20,20 +20,20 @@ contract TestEnableGuard is Test { // Init new safe safeHelper = new SafeHelper(); safeAddr = safeHelper.setupSafeEnv(); - // Init KeyperModule + // Init PalmeraModule address masterCopy = safeHelper.safeMasterCopy(); address safeFactory = address(safeHelper.safeFactory()); address rolesAuthority = address(0xBEEF); uint256 maxTreeDepth = 50; - keyperModule = new KeyperModule( + keyperModule = new PalmeraModule( masterCopy, safeFactory, rolesAuthority, maxTreeDepth ); - keyperGuard = new KeyperGuard(address(keyperModule)); + keyperGuard = new PalmeraGuard(address(keyperModule)); safeHelper.setKeyperModule(address(keyperModule)); safeHelper.setKeyperGuard(address(keyperGuard)); } - /// @notice Test enabling the KeyperModule + /// @notice Test enabling the PalmeraModule function testEnableKeyperModule() public { bool result = safeHelper.enableModuleTx(safeAddr); assertEq(result, true); @@ -43,7 +43,7 @@ contract TestEnableGuard is Test { assertEq(isKeyperModuleEnabled, true); } - /// @notice Test enabling the KeyperGuard + /// @notice Test enabling the PalmeraGuard function testEnableKeyperGuard() public { bool result = safeHelper.enableGuardTx(safeAddr); assertEq(result, true); diff --git a/test/EnableModule.t.sol b/test/EnableModule.t.sol index 89f6ac5..46b3e07 100644 --- a/test/EnableModule.t.sol +++ b/test/EnableModule.t.sol @@ -3,12 +3,12 @@ pragma solidity ^0.8.15; import "forge-std/Test.sol"; import "./helpers/SafeHelper.t.sol"; -import {KeyperModule} from "../src/KeyperModule.sol"; +import {PalmeraModule} from "../src/PalmeraModule.sol"; /// @title TestEnableModule /// @custom:security-contact general@palmeradao.xyz contract TestEnableModule is Test { - KeyperModule keyperModule; + PalmeraModule keyperModule; SafeHelper safeHelper; address safeAddr; @@ -17,12 +17,12 @@ contract TestEnableModule is Test { // Init new safe safeHelper = new SafeHelper(); safeAddr = safeHelper.setupSafeEnv(); - // Init KeyperModule + // Init PalmeraModule address masterCopy = safeHelper.safeMasterCopy(); address safeFactory = address(safeHelper.safeFactory()); address rolesAuthority = address(0xBEEF); uint256 maxTreeDepth = 50; - keyperModule = new KeyperModule( + keyperModule = new PalmeraModule( masterCopy, safeFactory, rolesAuthority, maxTreeDepth ); safeHelper.setKeyperModule(address(keyperModule)); diff --git a/test/KeyperRoles.t.sol b/test/KeyperRoles.t.sol index 7b6c1db..018ca8a 100644 --- a/test/KeyperRoles.t.sol +++ b/test/KeyperRoles.t.sol @@ -10,9 +10,9 @@ contract KeyperRolesTest is DeployHelper { DeployHelper.deployAllContracts(90); } - /// @notice Auxiliary function to deploy KeyperRoles contract + /// @notice Auxiliary function to deploy PalmeraRoles contract function testCan_KeyperModule_Setup_RoleContract() public { - // Check KeyperModule has role capabilites + // Check PalmeraModule has role capabilites assertEq( keyperRolesContract.doesRoleHaveCapability( uint8(DataTypes.Role.SAFE_LEAD), diff --git a/test/KeyperRolesHarness.t.sol b/test/KeyperRolesHarness.t.sol index 1cde46c..e18b8ad 100644 --- a/test/KeyperRolesHarness.t.sol +++ b/test/KeyperRolesHarness.t.sol @@ -2,12 +2,12 @@ pragma solidity ^0.8.15; import "forge-std/Test.sol"; -import {KeyperRoles} from "../src/KeyperRoles.sol"; +import {PalmeraRoles} from "../src/PalmeraRoles.sol"; import {Constants} from "../libraries/Constants.sol"; import {DataTypes} from "../libraries/DataTypes.sol"; -// Helper contract to test internal method of KeyperRoles -contract KeyperRolesHarness is KeyperRoles(address(0xAAAA)) { +// Helper contract to test internal method of PalmeraRoles +contract KeyperRolesHarness is PalmeraRoles(address(0xAAAA)) { function exposed_setupRoles(address keyperModule) external { setupRoles(keyperModule); } diff --git a/test/helpers/DeployHelper.t.sol b/test/helpers/DeployHelper.t.sol index 5fc0fa5..b443b7a 100644 --- a/test/helpers/DeployHelper.t.sol +++ b/test/helpers/DeployHelper.t.sol @@ -10,9 +10,9 @@ import {Constants} from "../../libraries/Constants.sol"; import {DataTypes} from "../../libraries/DataTypes.sol"; import {Errors} from "../../libraries/Errors.sol"; import {Events} from "../../libraries/Events.sol"; -import {KeyperModule} from "../../src/KeyperModule.sol"; -import {KeyperRoles} from "../../src/KeyperRoles.sol"; -import {KeyperGuard} from "../../src/KeyperGuard.sol"; +import {PalmeraModule} from "../../src/PalmeraModule.sol"; +import {PalmeraRoles} from "../../src/PalmeraRoles.sol"; +import {PalmeraGuard} from "../../src/PalmeraGuard.sol"; import {CREATE3Factory} from "@create3/CREATE3Factory.sol"; import {SafeMath} from "@openzeppelin/utils/math/SafeMath.sol"; @@ -21,11 +21,11 @@ import {SafeMath} from "@openzeppelin/utils/math/SafeMath.sol"; contract DeployHelper is Test { using SafeMath for uint256; - KeyperModule keyperModule; - KeyperGuard keyperGuard; + PalmeraModule keyperModule; + PalmeraGuard keyperGuard; SafeHelper safeHelper; KeyperModuleHelper keyperHelper; - KeyperRoles keyperRolesContract; + PalmeraRoles keyperRolesContract; KeyperSafeBuilder keyperSafeBuilder; address safeAddr; @@ -73,17 +73,17 @@ contract DeployHelper is Test { // setting keyperRoles Address safeHelper.setKeyperRoles(keyperRolesDeployed); - // Init KeyperModule + // Init PalmeraModule address masterCopy = safeHelper.safeMasterCopy(); address safeFactory = address(safeHelper.safeFactory()); uint256 maxTreeDepth = 50; - keyperModule = new KeyperModule( + keyperModule = new PalmeraModule( masterCopy, safeFactory, address(keyperRolesDeployed), maxTreeDepth ); keyperModuleAddr = address(keyperModule); // Deploy Guard Contract - keyperGuard = new KeyperGuard(keyperModuleAddr); + keyperGuard = new PalmeraGuard(keyperModuleAddr); keyperGuardAddr = address(keyperGuard); // Init keyperModuleHelper @@ -103,13 +103,13 @@ contract DeployHelper is Test { bytes memory args = abi.encode(address(keyperModuleAddr)); bytes memory bytecode = - abi.encodePacked(vm.getCode("KeyperRoles.sol:KeyperRoles"), args); + abi.encodePacked(vm.getCode("PalmeraRoles.sol:PalmeraRoles"), args); - keyperRolesContract = KeyperRoles(factory.deploy(salt, bytecode)); + keyperRolesContract = PalmeraRoles(factory.deploy(salt, bytecode)); keyperSafeBuilder = new KeyperSafeBuilder(); keyperSafeBuilder.setUpParams( - KeyperModule(keyperModule), SafeHelper(safeHelper) + PalmeraModule(keyperModule), SafeHelper(safeHelper) ); } diff --git a/test/helpers/KeyperModuleHelper.t.sol b/test/helpers/KeyperModuleHelper.t.sol index 691f215..3810c96 100644 --- a/test/helpers/KeyperModuleHelper.t.sol +++ b/test/helpers/KeyperModuleHelper.t.sol @@ -4,12 +4,12 @@ pragma solidity ^0.8.15; import "forge-std/Test.sol"; import "./SignDigestHelper.t.sol"; import "./SignersHelper.t.sol"; -import {KeyperModule} from "../../src/KeyperModule.sol"; +import {PalmeraModule} from "../../src/PalmeraModule.sol"; import {Enum} from "@safe-contracts/common/Enum.sol"; import {GnosisSafe} from "@safe-contracts/GnosisSafe.sol"; import {DeploySafeFactory} from "../../script/DeploySafeFactory.t.sol"; -/// @notice Helper contract handling KeyperModule +/// @notice Helper contract handling PalmeraModule /// @custom:security-contact general@palmeradao.xyz contract KeyperModuleHelper is Test, SignDigestHelper, SignersHelper { struct KeyperTransaction { @@ -21,13 +21,13 @@ contract KeyperModuleHelper is Test, SignDigestHelper, SignersHelper { Enum.Operation operation; } - KeyperModule public keyper; + PalmeraModule public keyper; GnosisSafe public safeHelper; /// function to initialize the helper - /// @param _keyper instance of KeyperModule + /// @param _keyper instance of PalmeraModule /// @param numberOwners number of owners to initialize - function initHelper(KeyperModule _keyper, uint256 numberOwners) public { + function initHelper(PalmeraModule _keyper, uint256 numberOwners) public { keyper = _keyper; initOnwers(numberOwners); } diff --git a/test/helpers/KeyperSafeBuilder.t.sol b/test/helpers/KeyperSafeBuilder.t.sol index e0a1776..88602dd 100644 --- a/test/helpers/KeyperSafeBuilder.t.sol +++ b/test/helpers/KeyperSafeBuilder.t.sol @@ -3,13 +3,13 @@ pragma solidity ^0.8.15; import "forge-std/Test.sol"; import "./SafeHelper.t.sol"; -import {KeyperModule} from "../../src/KeyperModule.sol"; +import {PalmeraModule} from "../../src/PalmeraModule.sol"; /// @notice Helper contract handling and create Org and Squad with different levels /// @custom:security-contact general@palmeradao.xyz contract KeyperSafeBuilder is Test { SafeHelper public safeHelper; - KeyperModule public keyperModule; + PalmeraModule public keyperModule; // fixed array of 4 owners uint256[] ownersRootPK = new uint256[](4); @@ -17,9 +17,10 @@ contract KeyperSafeBuilder is Test { mapping(string => address) public keyperSafes; - function setUpParams(KeyperModule keyperModuleArg, SafeHelper safeHelperArg) - public - { + function setUpParams( + PalmeraModule keyperModuleArg, + SafeHelper safeHelperArg + ) public { keyperModule = keyperModuleArg; safeHelper = safeHelperArg; } diff --git a/test/helpers/ReentrancyAttackHelper.t.sol b/test/helpers/ReentrancyAttackHelper.t.sol index bfe4578..7f3490a 100644 --- a/test/helpers/ReentrancyAttackHelper.t.sol +++ b/test/helpers/ReentrancyAttackHelper.t.sol @@ -5,7 +5,7 @@ import "forge-std/Test.sol"; import "./SignDigestHelper.t.sol"; import "./SignersHelper.t.sol"; import "./SafeHelper.t.sol"; -import {KeyperModule} from "../../src/KeyperModule.sol"; +import {PalmeraModule} from "../../src/PalmeraModule.sol"; import {Attacker} from "../../src/ReentrancyAttack.sol"; import {Enum} from "@safe-contracts/common/Enum.sol"; import {DataTypes} from "../../libraries/DataTypes.sol"; @@ -13,19 +13,19 @@ import {DataTypes} from "../../libraries/DataTypes.sol"; /// @notice Helper contract handling ReentrancyAttack /// @custom:security-contact general@palmeradao.xyz contract AttackerHelper is Test, SignDigestHelper, SignersHelper { - KeyperModule public keyper; + PalmeraModule public keyper; SafeHelper public safeHelper; Attacker public attacker; mapping(string => address) public keyperSafes; /// function to initialize the helper - /// @param keyperArg instance of KeyperModule + /// @param keyperArg instance of PalmeraModule /// @param attackerArg instance of Attacker /// @param safeHelperArg instance of SafeHelper /// @param numberOwners number of owners to initialize function initHelper( - KeyperModule keyperArg, + PalmeraModule keyperArg, Attacker attackerArg, SafeHelper safeHelperArg, uint256 numberOwners diff --git a/test/helpers/SkipSafeHelper.t.sol b/test/helpers/SkipSafeHelper.t.sol index 7cfa014..e807c46 100644 --- a/test/helpers/SkipSafeHelper.t.sol +++ b/test/helpers/SkipSafeHelper.t.sol @@ -3,7 +3,7 @@ pragma solidity ^0.8.15; import "./SafeHelper.t.sol"; import "./KeyperModuleHelper.t.sol"; -import {KeyperModule} from "../../src/KeyperModule.sol"; +import {PalmeraModule} from "../../src/PalmeraModule.sol"; /// @notice Helper contract handling deployment Safe contracts /// @custom:security-contact general@palmeradao.xyz @@ -60,11 +60,11 @@ contract SkipSafeHelper is SafeHelper, KeyperModuleHelper { safeContract = GnosisSafe(payable(vm.envAddress("MASTER_COPY_ADDRESS"))); } - /// function to set the KeyperModule address - /// @param keyperModule address of the KeyperModule + /// function to set the PalmeraModule address + /// @param keyperModule address of the PalmeraModule function setKeyperModule(address keyperModule) public override { keyperModuleAddr = keyperModule; - keyper = KeyperModule(keyperModuleAddr); + keyper = PalmeraModule(keyperModuleAddr); } /// function to create a new Keyper Safe diff --git a/test/helpers/SkipSetupEnv.s.sol b/test/helpers/SkipSetupEnv.s.sol index 52c75b0..35c69ff 100644 --- a/test/helpers/SkipSetupEnv.s.sol +++ b/test/helpers/SkipSetupEnv.s.sol @@ -5,9 +5,9 @@ import "forge-std/Script.sol"; import "../../src/SigningUtils.sol"; import "./SkipSafeHelper.t.sol"; import "@solenv/Solenv.sol"; -import {KeyperModule} from "../../src/KeyperModule.sol"; -import {KeyperRoles} from "../../src/KeyperRoles.sol"; -import {KeyperGuard} from "../../src/KeyperGuard.sol"; +import {PalmeraModule} from "../../src/PalmeraModule.sol"; +import {PalmeraRoles} from "../../src/PalmeraRoles.sol"; +import {PalmeraGuard} from "../../src/PalmeraGuard.sol"; import {SafeMath} from "@openzeppelin/utils/math/SafeMath.sol"; /// @notice Script to setup the environment @@ -15,9 +15,9 @@ import {SafeMath} from "@openzeppelin/utils/math/SafeMath.sol"; contract SkipSetupEnv is Script, SkipSafeHelper { using SafeMath for uint256; - KeyperModule keyperModule; - KeyperGuard keyperGuard; - KeyperRoles keyperRolesContract; + PalmeraModule keyperModule; + PalmeraGuard keyperGuard; + PalmeraRoles keyperRolesContract; address safeAddr; address keyperRolesDeployed; @@ -42,9 +42,10 @@ contract SkipSetupEnv is Script, SkipSafeHelper { function run() public { Solenv.config(); vm.startBroadcast(); - keyperRolesContract = KeyperRoles(vm.envAddress("KEYPER_ROLES_ADDRESS")); - keyperModule = KeyperModule(vm.envAddress("KEYPER_MODULE_ADDRESS")); - keyperGuard = KeyperGuard(vm.envAddress("KEYPER_GUARD_ADDRESS")); + keyperRolesContract = + PalmeraRoles(vm.envAddress("KEYPER_ROLES_ADDRESS")); + keyperModule = PalmeraModule(vm.envAddress("KEYPER_MODULE_ADDRESS")); + keyperGuard = PalmeraGuard(vm.envAddress("KEYPER_GUARD_ADDRESS")); receiver = vm.envAddress("RECEIVER_ADDRESS"); // Init a new safe as main organization (3 owners, 1 threshold) safeAddr = setupSeveralSafeEnv(30);