v0.5.0
What's Changed
Minor Changes
-
87e08ea: Add
daoSpace.proposeEdit()function for creating proposals to publish edits to DAO spaces.This function:
- Publishes ops to IPFS using the GRC-20 binary format
- Generates a unique proposal ID (or accepts a custom one)
- Encodes the calldata for the SpaceRegistry's
enter()function with PROPOSAL_CREATED action
The proposal, when executed, will call the DAO space's
publish()function. Sincepublish()is a valid fast-path action, with FAST voting mode and sufficient votes, the proposal will auto-execute.Example usage:
import { daoSpace, Graph } from "@geoprotocol/geo-sdk"; const { ops } = Graph.createEntity({ name: "New Entity" }); const { editId, cid, to, calldata, proposalId } = await daoSpace.proposeEdit({ name: "Add new entity", ops, author: "0x1234...", daoSpaceAddress: "0xDAOSpaceContractAddress...", callerSpaceId: "0xCallerBytes16SpaceId...", daoSpaceId: "0xDAOBytes16SpaceId...", }); await walletClient.sendTransaction({ to, data: calldata });
Full Changelog: v0.4.0...v0.5.0