A multisig contract written in Cairo, following a reference implementation from solidity-by-example.
⚠️ WARNING: This is not intended for production use. The code has barely been tested, let alone audited.
It is built under the assumption that all owners will have their own OpenZeppelin Account or similar.
Available actions:
submit_transaction
-- submit a new transaction for approvalconfirm_transaction
-- confirm/approve a transaction for one ownerrevoke_confirmation
-- undo a previous approval for one ownerexecute_transaction
-- execute the submitted transaction once minimum confirmations reached
python3.7 -m venv venv
source venv/bin/activate
python -m pip install cairo-nile
nile install
Needs way more tests, but super basic coverage can be run using the following:
(venv) ~/dev/eth/starknet/cairo-multisig$ make test
pytest tests/
================================= test session starts =================================
platform darwin -- Python 3.9.8, pytest-7.0.1, pluggy-1.0.0
rootdir: /Users/sam/dev/eth/starknet/cairo-multisig
plugins: web3-5.28.0, typeguard-2.13.3, asyncio-0.18.1
asyncio: mode=legacy
collected 4 items
tests/test_contract.py .... [100%]
=========================== 4 passed, 3 warnings in 56.27s ============================
- More tests
- Allow for transferring partial/full ownership