Skip to content

josemarinas/sdk-2.0-bolognese

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sdk-2.0-bolognese

Bolognese

To install dependencies:

bun install

To run:

bun run index.ts

Summary

This is a Viem based version of the Aragon SDK. It uses the viem client to interact with the aragon contracts. For now, it only supports creating a DAO.

Usage

import { createWalletClient, http } from "viem";
import { privateKeyToAccount } from "viem/accounts";
import { goerli } from "viem/chains";

const account = privateKeyToAccount(
  "0xe9bb9aa1a1e8aac99dc785e3b9e9d8a9d2b401b94bab48a55b65feb372935acd"
);

const client = createWalletClient({
  account,
  chain: goerli,
  transport: http(), // Add your wallet provider here
});

const daoAddress = "0x...";
const daoContract = getDaoContract({ client, address: daoAddress });

// the object contains overridden methods so we 
daoContract.write.prepareInstallation()
daoContract.read.daoURI()
// but it also contains the original Contract from viem
// that can be called directly
daoContract.contract.read.daoURI()

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published