The curve-dao package is a Python tool designed to interact with CurveDAO governance, allowing users to simulate and publish on-chain proposals for DAO voting.
GitHub
Source code of the curve-dao package can be found on GitHub. Contributions to develop this package are more than welcome!
This package simplifies the process of creating and testing CurveDAO proposals, making it easier for veCRV holders to participate in governance actions such as:
Managing Curve DAO gauges (creation, modification, or removal)
Here's a simple example of creating and simulating a DAO proposal:
importboaimportcurve_dao# Load contract and set adminscontract=boa.load("contracts/contract.vy",curve_dao.get_address("ownership"),curve_dao.get_address("param"),curve_dao.get_address("emergency"))# Define proposal actionsACTIONS=[("0xcontract","set_something",("values",),70,"set"),(contract,"enact")]# Create and optionally simulate the proposalDESCRIPTION="Enact something"vote_id=curve_dao.create_vote("ownership",ACTIONS,DESCRIPTION,etherscan_api_key=os.environ["ETHERSCAN_API_KEY"],pinata_token=os.environ["PINATA_TOKEN"])# Simulate in forked environmentifis_simulation:curve_dao.simulate(vote_id,"ownership",etherscan_api_key=os.environ["ETHERSCAN_API_KEY"])