Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: new multisig version #19

Merged
merged 67 commits into from
Nov 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
ccb7dee
fix multisig/multisigsetup tests for new implementation
novaknole Aug 20, 2024
2ca8113
fix more tests
novaknole Aug 21, 2024
516a532
feat: add unit test for initialize from function
clauBv23 Aug 21, 2024
c710d76
ci: remove comment
clauBv23 Aug 21, 2024
b2996b6
feat: add check to ensure the plugin is being reinitialized when upgr…
clauBv23 Aug 21, 2024
8bfe5d0
fix test
clauBv23 Aug 21, 2024
b80d626
ci: remove comment
clauBv23 Aug 21, 2024
1b24da1
feat: add reinitialization when upgrading plugin and check it on the …
clauBv23 Aug 21, 2024
2b679ed
ci: remove comment
clauBv23 Aug 21, 2024
a50a5c8
ci: add comment
clauBv23 Aug 21, 2024
d4e80c0
ci: update comment
clauBv23 Aug 21, 2024
3300d84
fix lint
clauBv23 Aug 21, 2024
4ef810f
proposal hash return value
novaknole Aug 27, 2024
43ef91e
add create proposal id
novaknole Aug 27, 2024
a8c7376
remove .only
novaknole Aug 27, 2024
ae7046c
Merge branch 'feature/multisig-improvements' into feat/add-tests
clauBv23 Aug 30, 2024
6a2c080
initializeFrom and erc165 changes for upgrades
novaknole Sep 10, 2024
e3cf955
Merge branch 'feature/multisig-improvements' into feat/add-tests
clauBv23 Sep 13, 2024
31ebac1
ci: define latest version as constant
clauBv23 Sep 13, 2024
f7ec5fc
feat: fix test for initialize from function
clauBv23 Sep 13, 2024
6f84d88
fix: upgradeability tests
clauBv23 Sep 13, 2024
065802a
modifier added for safety and target config improved
novaknole Sep 19, 2024
6b6fa6f
add comment
novaknole Sep 19, 2024
c87ff68
bytes param added
novaknole Sep 19, 2024
11364d5
rename param function:
novaknole Sep 19, 2024
33910d9
Merge branch 'feature/multisig-improvements' into feat/add-tests
novaknole Sep 23, 2024
a10d40b
Merge pull request #18 from aragon/feat/add-tests
novaknole Sep 23, 2024
9164a7c
Update packages/contracts/src/Multisig.sol
novaknole Sep 23, 2024
28d65f7
Update packages/contracts/src/Multisig.sol
novaknole Sep 25, 2024
c262bad
Update packages/contracts/src/Multisig.sol
novaknole Sep 25, 2024
27c09ee
add test for delegatecall
novaknole Sep 26, 2024
0eaa19d
silence warnings
novaknole Sep 26, 2024
451c556
executor interface
novaknole Sep 26, 2024
7e86090
action as free level
novaknole Sep 27, 2024
abf3435
Merge pull request #23 from aragon/feature/executors
novaknole Sep 27, 2024
bc751dd
Merge pull request #21 from aragon/feature/bytes-param-add
novaknole Sep 27, 2024
dfe1336
remove unnecessary revoke
novaknole Sep 27, 2024
b1fdf94
better upgrade tests
novaknole Sep 28, 2024
4d68a56
callinitialization from osx-commons
novaknole Sep 28, 2024
056dbfa
fix tohex
novaknole Sep 29, 2024
71de210
add metadata support
novaknole Oct 7, 2024
4a00b14
metadata extension
novaknole Oct 8, 2024
832eafd
Update packages/contracts/src/MultisigSetup.sol
novaknole Oct 8, 2024
d095f55
Update packages/contracts/src/Multisig.sol
novaknole Oct 8, 2024
032ea3c
Update packages/contracts/src/Multisig.sol
novaknole Oct 8, 2024
8e66bfa
Update packages/contracts/src/Multisig.sol
novaknole Oct 8, 2024
fc1381d
permission added
novaknole Oct 8, 2024
732bf42
rename
novaknole Oct 8, 2024
eded00b
Merge pull request #24 from aragon/feature/metadata
novaknole Oct 8, 2024
3cea0c5
metadata rename
novaknole Oct 9, 2024
2141a95
fix contracts and test (#25)
novaknole Oct 14, 2024
da23965
feat: add auth to execute() and update Setup & testing
Rekard0 Oct 31, 2024
343b352
add test for recording vote with tryExecution when caller don't have …
Rekard0 Oct 31, 2024
7b948f2
comment
novaknole Nov 1, 2024
005aacb
remove .only
novaknole Nov 1, 2024
c674484
add hassucceeded
novaknole Nov 4, 2024
c8a4f3c
comments in tests
novaknole Nov 4, 2024
682b074
reverts
novaknole Nov 4, 2024
76ee964
remove .only
novaknole Nov 4, 2024
8d3268a
Merge pull request #26 from aragon/feature/hasSucceeded
novaknole Nov 4, 2024
a51622d
docgen
novaknole Nov 5, 2024
5b5fe64
new line comment
novaknole Nov 5, 2024
752fff1
original comment
novaknole Nov 5, 2024
ceee8fd
multi line comment
novaknole Nov 5, 2024
42948ff
comments
novaknole Nov 5, 2024
9115d42
add docgen
novaknole Nov 5, 2024
2818638
reorder comment
novaknole Nov 5, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ packages/subgraph/imported
packages/subgraph/generated
packages/subgraph/tests/.bin

docs

# files
*.env
*.log
Expand Down
9 changes: 7 additions & 2 deletions packages/contracts/deploy/20_new_version/23_publish.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {

// Check build number
const latestBuild = (await pluginRepo.buildCount(VERSION.release)).toNumber();

if (VERSION.build < latestBuild) {
throw Error(
`Publishing with build number ${VERSION.build} is not possible. The latest build is ${latestBuild}. Aborting publication...`
Expand Down Expand Up @@ -142,8 +143,12 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
createVersion: {
_release: VERSION.release,
_pluginSetup: setup.address,
_buildMetadata: toHex(buildMetadataURI),
_releaseMetadata: toHex(releaseMetadataURI),
_buildMetadata: ethers.utils.hexlify(
ethers.utils.toUtf8Bytes(buildMetadataURI)
),
_releaseMetadata: ethers.utils.hexlify(
ethers.utils.toUtf8Bytes(releaseMetadataURI)
),
},
},
],
Expand Down
9 changes: 8 additions & 1 deletion packages/contracts/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import {
import type {NetworkUserConfig} from 'hardhat/types';
import {resolve} from 'path';
import 'solidity-coverage';
import 'solidity-docgen';

const dotenvConfigPath: string = process.env.DOTENV_CONFIG_PATH || '../../.env';
dotenvConfig({path: resolve(__dirname, dotenvConfigPath), override: true});
Expand Down Expand Up @@ -154,7 +155,6 @@ const config: HardhatUserConfig = {
tests: './test',
deploy: './deploy',
},

solidity: {
version: '0.8.17',
settings: {
Expand All @@ -175,6 +175,13 @@ const config: HardhatUserConfig = {
outDir: 'typechain',
target: 'ethers-v5',
},
docgen: {
outputDir: 'docs',
theme: 'markdown',
pages: 'files',
collapseNewlines: true,
exclude: ['test', 'mocks'],
},
};

export default config;
2 changes: 2 additions & 0 deletions packages/contracts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"lint:sol": "cd ../../ && yarn run lint:contracts:sol",
"lint:ts": "cd ../../ && yarn run lint:contracts:ts",
"test": "hardhat test",
"docgen": "hardhat docgen",
"typechain": "cross-env TS_NODE_TRANSPILE_ONLY=true hardhat typechain",
"clean": "rimraf ./artifacts ./cache ./coverage ./typechain ./types ./coverage.json && yarn typechain"
},
Expand Down Expand Up @@ -35,6 +36,7 @@
"@openzeppelin/hardhat-upgrades": "^1.28.0",
"@typechain/ethers-v5": "^10.1.1",
"@typechain/hardhat": "^6.1.4",
"solidity-docgen": "^0.6.0-beta.35",
"@types/chai": "^4.3.4",
"@types/mocha": "^10.0.0",
"@types/node": "^18.11.9",
Expand Down
32 changes: 32 additions & 0 deletions packages/contracts/src/ListedCheckCondition.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// SPDX-License-Identifier: AGPL-3.0-or-later

pragma solidity ^0.8.8;

import {Multisig} from "./Multisig.sol";

import {PermissionCondition} from "@aragon/osx-commons-contracts/src/permission/condition/PermissionCondition.sol";

contract ListedCheckCondition is PermissionCondition {
Multisig private immutable MULTISIG;

constructor(address _multisig) {
MULTISIG = Multisig(_multisig);
}

function isGranted(
address _where,
address _who,
bytes32 _permissionId,
bytes calldata _data
) public view override returns (bool) {
(_where, _data, _permissionId);

(bool onlyListed, ) = MULTISIG.multisigSettings();

if (onlyListed && !MULTISIG.isListed(_who)) {
return false;
}

return true;
}
}
Loading
Loading