#dao #internet-computer #psychedelic #fleek #encryption

app bunga

A tool for interacting with the Daowabunga dao framework

2 releases

0.0.1-alpha.1 Oct 24, 2022
0.0.1-alpha.0 Oct 19, 2022

#2 in #psychedelic

MIT license

56KB
1K SLoC

Bunga CLI tool

Bunga is a tool used for interacting with Daowabunga. Using dfx to do things like create proposals and recieve motion data is very difficult and sometimes not even possible because of the way motion data is encoded. Currently Bunga is only set up to interact with multisig canister but as the other canisters are released it will be modified to interact with them as well.

Getting started

Clone this repo and run

cargo install --path . && bunga

This will install and add the bunga path. Before interacting with a multsig canister you will also need to import your dfx identity and set your multisig canister principle. You will only have to do this once. If your dfx identity is encrypted Bunga will not ever save or store it any unencrpyted way but because of that you will have to enter your password everytime you run a command using that identity

You can set your multisig principal by running

bunga multisig set-id <PRINCIPAL

you can import your dfx identity by running

bunga import-identity <PATH TO .PEM FILE>

Dfx stores your pem files ~/.config/dfx/identity/IDENTITY-NAME the pem file will be named identity.pem or identity.pem.encrypted bunga can import either version.

Commands

When running any command you can pass --network=ic after bunga to interact with a canister on mainnet. If left out bunga will default to using a local network

bunga multisig create-txn

This command will start the flow to create a txn. No args are needed

bunga multisig get txns

Returns batch motions Optionally pass --status <STATUS> to recieve only motions of a certain status

USAGE:
    bunga multisig get txns [OPTIONS] [ARGS]

ARGS:
    <INDEX>    The index to start retrieving motions from. defaults to 0 [default: 0]
    <COUNT>    How many motions you want to recieve back. defaults to 10 [default: 10]

OPTIONS:
    -h, --help               Print help information
    -s, --status <STATUS>    Get only motions with a certian status [possible values: open,
                             executing, completed, failed, rejected]

bunga multisig get txn

Will return all info on the motion including the commands

USAGE:
    bunga multisig get txn <MOTION_ID>

ARGS:
    <MOTION_ID>    The id of the motion

OPTIONS:
    -h, --help    Print help information

bunga multisig get signers

Returns info about the signers of the multisig and their voting power

USAGE:
    bunga multisig get signers

OPTIONS:
    -h, --help    Print help information

bunga multisig get id

Returns the current set Principal id of the multisig

USAGE:
    bunga multisig get id

OPTIONS:
    -h, --help    Print help information

bunga multisig set-id

Sets or updates the principle id for your multisig. Required to run before interacting with multisig

USAGE:
    bunga multisig set-id <CANISTER_ID>

ARGS:
    <CANISTER_ID>    The principle id of the multisig canister

OPTIONS:
    -h, --help    Print help information

bunga multisig approve

Cast approval on a transaction

USAGE:
    bunga multisig approve <MOTION_ID>

ARGS:
    <MOTION_ID>    The id of the motion

OPTIONS:
    -h, --help    Print help information

bunga multisig reject

Cast a rejection on a transaction

USAGE:
    bunga multisig reject <MOTION_ID>

ARGS:
    <MOTION_ID>    The id of the motion

OPTIONS:
    -h, --help    Print help information

bunga import-identity

Import in an identity

USAGE:
    bunga import-identity <PEM_FILE_PATH>

ARGS:
    <PEM_FILE_PATH>    The path to the PEM file you want to import. This will typical be
                       './Users/<name>/.config/dfx/identity/default/identity.pem' the file name
                       may be identity.pem.encrypted as well make sure you spell out the whole
                       name

OPTIONS:
    -h, --help    Print help information

Dependencies

~28–44MB
~800K SLoC