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

Introduce DAO structure in contracts #10

Merged
merged 105 commits into from
Dec 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
105 commits
Select commit Hold shift + click to select a range
0107a3b
feat: scaffold dao structure in contracts
whoabuddy Nov 22, 2024
41c8616
fix: fill in base dao implementation
whoabuddy Nov 25, 2024
170a49c
fix: update notif to SIP-019 format (notification/payload)
whoabuddy Nov 25, 2024
10d52c4
fix: update bank acct to use ext trait
whoabuddy Nov 25, 2024
7636a92
feat: add treasury contract with whitelisted assets
whoabuddy Nov 25, 2024
d792ad5
refactor: Update treasury print statements to use notification and pa…
whoabuddy Nov 25, 2024
4bc0884
fix: use mainnet contracts directly for reqs
whoabuddy Nov 25, 2024
af74614
fix: setup messaging as dao extension
whoabuddy Nov 25, 2024
61f65d3
fix: remove unused auth fn
whoabuddy Nov 25, 2024
8a22db9
fix: use dao auth instead of deployer
whoabuddy Nov 25, 2024
6306228
fix: remove unused deployer code
whoabuddy Nov 25, 2024
3df90d0
fix: adapt payments to ext format
whoabuddy Nov 25, 2024
8b1ef63
fix: minor formatting for consistency
whoabuddy Nov 25, 2024
df4f4b2
fix: update bootstrap with extensions
whoabuddy Nov 25, 2024
2909015
Create aibtcdev-executor-trait.clar
r0zar Dec 15, 2024
ba1b74f
:sparkles: Add executor trait
r0zar Dec 15, 2024
12c254d
:sparkles: Add traits and update contracts
r0zar Dec 15, 2024
080d63a
fix: cleanup and reorganize clarinet.toml
whoabuddy Dec 24, 2024
9eca8cf
fix: consolidate traits into single contract
whoabuddy Dec 24, 2024
6da4aaf
refactor: apply new traits to all contracts
whoabuddy Dec 24, 2024
c8f42a2
fix: separate base dao trait (circular ref), cleanup traits
whoabuddy Dec 24, 2024
4919f97
fix: update bank account contract
whoabuddy Dec 24, 2024
2dfd27f
docs: start outlining test plan per contract
whoabuddy Dec 24, 2024
384bb2f
fix: update messaging contract
whoabuddy Dec 24, 2024
99da993
docs: update test plan
whoabuddy Dec 24, 2024
7f8ddf9
fix: update payments extension
whoabuddy Dec 24, 2024
36f4d20
docs: update test plan for payments
whoabuddy Dec 24, 2024
5866813
fix: simplify setting payment address, clean up formatting
whoabuddy Dec 24, 2024
65c450c
fix: remove deployer refs, payout to bank account
whoabuddy Dec 24, 2024
172817b
fix: expand trait docs, clean up proxy
whoabuddy Dec 24, 2024
4cedb97
fix: add DAO_MANIFEST as constant, read-only getter
whoabuddy Dec 24, 2024
31473a9
docs: update test plan, deployment plan
whoabuddy Dec 24, 2024
053bdae
feat: add high quorum core voting extension
whoabuddy Dec 24, 2024
02758ca
fix: add voting and conclusion starters
whoabuddy Dec 24, 2024
139392a
refactor: Enhance DAO direct execute contract with error handling and…
whoabuddy Dec 24, 2024
08a1036
refactor: Restructure and clarify error message constants for better …
whoabuddy Dec 24, 2024
2d83e98
refactor: Update error messages to be more specific and descriptive
whoabuddy Dec 24, 2024
5b7bacb
feat: Add checks to prevent voting on or concluding already concluded…
whoabuddy Dec 24, 2024
21ebbca
feat: Add direct-execute trait to DAO traits and implement in direct-…
whoabuddy Dec 24, 2024
ead3bd1
fix: move direct-execute trait to bottom, fix syntax
whoabuddy Dec 24, 2024
da6c7c6
fix: conclude proposal in record and execute
whoabuddy Dec 24, 2024
375b239
fix: add treasury for vote calculation, execution flow
whoabuddy Dec 24, 2024
97923a7
feat: Add treasury validation in conclude-proposal function
whoabuddy Dec 24, 2024
805bf21
feat: Add getter functions for voting period and quorum
whoabuddy Dec 24, 2024
4a25b7e
human intervention
whoabuddy Dec 24, 2024
75e648e
feat: Add aibtcdev-actions extension contract for DAO
whoabuddy Dec 24, 2024
e25f9cf
feat: Add aibtcdev-actions extension with 66% quorum for DAO actions
whoabuddy Dec 24, 2024
2d4beae
feat: Add treasury, bank, payment, and batch operation actions to aib…
whoabuddy Dec 24, 2024
7e5955a
refactor: Replace nested if-statements with match expression in execu…
whoabuddy Dec 24, 2024
8ee513e
feat: add actions with lower quorum specific votes
whoabuddy Dec 24, 2024
32c4c4b
chore: update deployment plan
whoabuddy Dec 24, 2024
05a04cb
docs: Update smart contract test plan with new contracts and functions
whoabuddy Dec 24, 2024
ee51c35
refactor: renaming some things
whoabuddy Dec 24, 2024
a615f02
refactor: Update contract paths in Clarinet.toml to match new file names
whoabuddy Dec 24, 2024
32c12dc
refactor: Update contract names in Clarinet.toml and trait definition
whoabuddy Dec 24, 2024
4e26fcc
refactor: Update contract references to use base DAO and correct cont…
whoabuddy Dec 24, 2024
2a942f0
human intervention until clarinet check passes
whoabuddy Dec 24, 2024
0498e48
docs: Update smart contract test plan with new contract names and tes…
whoabuddy Dec 24, 2024
b57ae37
docs: Update test plan for aibtc-ext001-actions with new proposal and…
whoabuddy Dec 24, 2024
69c4329
fix: finish prep for testing
whoabuddy Dec 24, 2024
cedae46
refactor: Update error codes to match extension numbers
whoabuddy Dec 24, 2024
c54ecce
test: Add missing tests for bank account extension
whoabuddy Dec 24, 2024
fc8cbe6
fix: start cleaning up tests with latest changes
whoabuddy Dec 24, 2024
2a267f1
feat: Update ErrCode enum with comprehensive error codes
whoabuddy Dec 24, 2024
404ec88
feat: Add test stub for ext003-direct-execute contract
whoabuddy Dec 24, 2024
b732ffe
fix: Update contract name in messaging test function call
whoabuddy Dec 24, 2024
c0d72f9
feat: Update ext004 messaging tests and contract with DAO authorizati…
whoabuddy Dec 24, 2024
6b90c14
refactor: Convert ext005 test to stub with updated error codes
whoabuddy Dec 24, 2024
a6661aa
feat: Add test stub for ext006-treasury with error codes and test cases
whoabuddy Dec 24, 2024
6bab692
refactor: Update extension test files to use consistent stub format
whoabuddy Dec 24, 2024
ec3b3ec
refactor: Update DAO and proposal tests with stub structure
whoabuddy Dec 24, 2024
a14efef
test: Implement tests for set-protocol-treasury and set-voting-token …
whoabuddy Dec 24, 2024
266cdc8
fix: Update test case to use Cl.uint for error code comparison
whoabuddy Dec 24, 2024
03b434b
refactor: Wrap error codes with Cl.uint() in test assertions
whoabuddy Dec 24, 2024
aad4ced
fix: correctly type assert lines
whoabuddy Dec 24, 2024
7581666
test: Add verification for treasury and voting token setting
whoabuddy Dec 24, 2024
74a69a0
style: Improve code formatting in test file
whoabuddy Dec 24, 2024
85ee369
test: Add comprehensive tests for propose-action() in ext001
whoabuddy Dec 24, 2024
82ee36f
test: Add comprehensive tests for vote-on-proposal() function
whoabuddy Dec 24, 2024
3cce1e1
test: Add comprehensive tests for conclude-proposal() function
whoabuddy Dec 24, 2024
7bead9e
test: Update error codes for set-protocol-treasury and set-voting-tok…
whoabuddy Dec 24, 2024
b258950
test: Add comprehensive tests for propose-action() in ext001 contract
whoabuddy Dec 24, 2024
84c0ed3
test: Add getter tests for ext001 contract voting parameters and init…
whoabuddy Dec 24, 2024
5e98475
test: Add tests for get-protocol-treasury, get-voting-token, get-prop…
whoabuddy Dec 24, 2024
a65542f
test: Add comprehensive tests for read-only functions in ext001 actio…
whoabuddy Dec 24, 2024
dcc8b12
test: Add test for callback() function in ext001 actions contract
whoabuddy Dec 24, 2024
30966c8
Based on the context and the changes you've made, here's a concise co…
whoabuddy Dec 24, 2024
b68a783
refactor: move test contracts into directory
whoabuddy Dec 24, 2024
294b017
fix: clean up some of the mess, still some to go
whoabuddy Dec 24, 2024
ca8f608
docs: Add comprehensive DAO documentation structure
whoabuddy Dec 24, 2024
f1fd957
docs: Add documentation for bank account extension (aibtc-ext002)
whoabuddy Dec 24, 2024
09a3327
docs: Add documentation for direct execute extension (aibtc-ext003)
whoabuddy Dec 24, 2024
df52a8e
feat: Rename extension docs to follow ext00x naming convention
whoabuddy Dec 24, 2024
102a77f
fix: follow naming convention
whoabuddy Dec 24, 2024
ea53d9f
docs: Add documentation for aibtc-ext004 messaging extension
whoabuddy Dec 24, 2024
834d12c
docs: Add documentation for aibtc-ext005 payments extension
whoabuddy Dec 24, 2024
1108886
docs: Add comprehensive documentation for treasury extension (aibtc-e…
whoabuddy Dec 24, 2024
26ca77e
docs: Add traits documentation for DAO components
whoabuddy Dec 24, 2024
0c711b1
docs: Add documentation for extension and proposal traits
whoabuddy Dec 24, 2024
f19e2f2
docs: Add documentation for treasury and direct-execute traits
whoabuddy Dec 24, 2024
0b265ef
docs: Add documentation for resources, invoices, and messaging traits
whoabuddy Dec 24, 2024
749424d
test: Temporarily disable and comment out problematic tests
whoabuddy Dec 24, 2024
ea9a505
refactor: Update test assertions to match smart contract return types
whoabuddy Dec 24, 2024
cb76bb2
fix: Update contract initialization and error handling in DAO extensi…
whoabuddy Dec 24, 2024
80a9c1d
fix: working through some kinks
whoabuddy Dec 24, 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
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@
.cache/**
history.txt
node_modules
lcov.info
lcov.info
.aider*
.env
109 changes: 83 additions & 26 deletions Clarinet.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,27 @@ authors = []
telemetry = true
cache_dir = './.cache'

[repl.analysis]
passes = []

[repl.analysis.check_checker]
strict = false
trusted_sender = false
trusted_caller = false
callee_filter = false

# external contracts loaded by clarinet

[[project.requirements]]
contract_id = 'SP2PABAF9FTAJYNFZH93XENAJ8FVY99RRM50D2JG9.nft-trait'
[contracts.aibtcdev-aibtc]
path = 'contracts/aibtcdev-aibtc.clar'
clarity_version = 2
epoch = 2.4

[[project.requirements]]
contract_id = 'SP3FBR2AGK5H9QBDH3EEN6DF8EK8JY7RX8QJ5SVTE.sip-010-trait-ft-standard'

[[project.requirements]]
contract_id = 'ST000000000000000000002AMW42H.pox-4'

# airdrop nft contracts

[contracts.aibtcdev-airdrop-1]
path = 'contracts/aibtcdev-airdrop-1.clar'
Expand All @@ -22,46 +37,88 @@ path = 'contracts/aibtcdev-airdrop-2.clar'
clarity_version = 2
epoch = 2.5

[contracts.aibtcdev-bank-account]
path = 'contracts/aibtcdev-bank-account.clar'
# dao base contract

[contracts.aibtcdev-base-dao]
path = 'contracts/dao/aibtcdev-base-dao.clar'
clarity_version = 2
epoch = 2.5

[contracts.aibtcdev-resources-v1]
path = 'contracts/aibtcdev-resources-v1.clar'
# dao proposals

[contracts.aibtc-prop001-bootstrap]
path = 'contracts/dao/proposals/aibtc-prop001-bootstrap.clar'
clarity_version = 2
epoch = 2.4
epoch = 2.5

[contracts.aibtcdev-traits-v1]
path = 'contracts/aibtcdev-traits-v1.clar'
# dao extensions

[contracts.aibtc-ext001-actions]
path = 'contracts/dao/extensions/aibtc-ext001-actions.clar'
clarity_version = 2
epoch = 2.4
epoch = 2.5

[contracts.external-proxy]
path = 'contracts/test-proxy.clar'
deployer = 'wallet_1'
[contracts.aibtc-ext002-bank-account]
path = 'contracts/dao/extensions/aibtc-ext002-bank-account.clar'
clarity_version = 2
epoch = 2.5

[contracts.aibtc-ext003-direct-execute]
path = 'contracts/dao/extensions/aibtc-ext003-direct-execute.clar'
clarity_version = 2
epoch = 2.5

[contracts.aibtc-ext004-messaging]
path = 'contracts/dao/extensions/aibtc-ext004-messaging.clar'
clarity_version = 2
epoch = 2.5

[contracts.aibtcdev-messaging]
path = 'contracts/aibtcdev-messaging.clar'
[contracts.aibtc-ext005-payments]
path = 'contracts/dao/extensions/aibtc-ext005-payments.clar'
clarity_version = 2
epoch = 2.5

[contracts.aibtc-ext006-treasury]
path = 'contracts/dao/extensions/aibtc-ext006-treasury.clar'
clarity_version = 2
epoch = 2.5

# dao traits

[contracts.aibtcdev-dao-v1]
path = 'contracts/dao/traits/aibtcdev-dao-v1.clar'
clarity_version = 2
epoch = 2.5

[contracts.aibtcdev-dao-traits-v1]
path = 'contracts/dao/traits/aibtcdev-dao-traits-v1.clar'
clarity_version = 2
epoch = 2.5

# testing utilities

[contracts.test-treasury]
path = 'contracts/test/aibtc-treasury.clar'
clarity_version = 2
epoch = 2.5

[contracts.external-proxy]
path = 'contracts/test/proxy.clar'
deployer = 'wallet_1'
clarity_version = 2
epoch = 2.5

[contracts.proxy]
path = 'contracts/test-proxy.clar'
path = 'contracts/test/proxy.clar'
clarity_version = 2
epoch = 2.5

[contracts.test-proxy]
path = 'contracts/test-proxy.clar'
path = 'contracts/test/proxy.clar'
clarity_version = 2
epoch = 2.5
[repl.analysis]
passes = ['check_checker']

[repl.analysis.check_checker]
strict = false
trusted_sender = false
trusted_caller = false
callee_filter = false
[contracts.test-token]
path = 'contracts/test/sip010-token.clar'
clarity_version = 2
epoch = 2.5
158 changes: 0 additions & 158 deletions contracts/aibtcdev-aibtc.clar

This file was deleted.

24 changes: 0 additions & 24 deletions contracts/aibtcdev-messaging.clar

This file was deleted.

15 changes: 0 additions & 15 deletions contracts/aibtcdev-traits-v1.clar

This file was deleted.

Loading
Loading