Skip to content

v0.4.0

Choose a tag to compare

@nikgraf nikgraf released this 30 Jan 15:24
v0.4.0
ca3e984

What's Changed

Minor Changes

  • b305747: Upgrade to the latest grc-20 version

Patch Changes

  • 474a749: Add daoSpace.createSpace function for creating DAO spaces. This function generates a space entity, uploads the initial edit to IPFS, and returns the calldata needed to submit a transaction to the DAO Space Factory contract.

    import { daoSpace } from "@geoprotocol/geo-sdk";
    
    const { to, calldata, spaceEntityId, cid } = await daoSpace.createSpace({
      name: "My DAO Space",
      votingSettings: {
        slowPathPercentageThreshold: 50, // 50% approval needed
        fastPathFlatThreshold: 3, // 3 editors for fast path
        quorum: 2, // minimum 2 editors must vote
        durationInDays: 7, // 7 day voting period
      },
      initialEditorSpaceIds: ["0x01234567890abcdef01234567890abcd"],
      author: "0x1234567890abcdef1234567890abcdef12345678",
    });
    
    // Using viem
    const hash = await walletClient.sendTransaction({
      to,
      data: calldata,
    });

Full Changelog: v0.3.1...v0.4.0