Dappman is a Golang CLI toolkit for compiling, deploying, and managing Algorand applications. It is a thin wrapper built on top of goal app
Clone Dappman in a directory outside of GOPATH, as in the following example:
mkdir $HOME/src
cd $HOME/src
git clone https://github.com/connorjcantrell/dappman.git
cd dappman
go install
ALGORAND_PASSPHRASE
ALGOD_ADDRESS
ALGOD_TOKEN
Initialize dappman inside of your project directory:
dappman init --name my-app --global-byteslices 0 -global-ints 0 --local-byteslices 0 --local-ints 0 --pyteal
or use the shorthand, dappman init 0 0 0 0 --pyteal
This will generate the following project structure:
project
│ .config.json
│
└───public
│
└───src
│ approval_program.py
│ clear_state_program.py
.config.json
is a local representation of the application details that exist on the Algorand Blockchain. This file will be referenced/ modified during create
, update
and delete
commands.
Application ID is initially set to 0
to signify the app has not yet been created.
Do not manually modify .config.json
{
"name": "my-app",
"application_id": 0,
"global_schema": {
"byteslices": 0,
"ints": 0
},
"local_schema": {
"byteslices": 0,
"ints": 0
},
"revision": 0,
"deleted": 0
}
dappman compile pyteal
- Searches for
approval_program.py
andclear_state_program.py
in/src
directory - Compiles PyTeal down to TEAL, writes TEAL programs to
/public
directory
project
│ .config.json
│
└───public
│ │ approval_program.teal
│ │ clear_state_program.teal
│
└───src
│ approval_program.py
│ clear_state_program.py
Issue a transaction that creates an application using values provided in .config.json
and reading teal programs located inside /public
directory.
dappman create --name my-app
application_id
will be changed from 0
revision
will be increased by 1
Issue a transaction that updates an application's ApprovalProgram and ClearStateProgram by reading teal programs located in /public
directory.
dappman update --name my-app
revision
will be increased by 1
dappman delete --name my-app
deleted
changed to true
Erase current local application state and re-initialize, thus abondoning the application that exists on chain.
dappman reset --name my-app
Please feel free to share your thoughts on this idea and whether or not the Algorand development community would find this tool useful.
One area of concern is storing the secret passphrase in an environment variable. I am open for suggestions in this area specifically. Perhaps there is a way to sign transactions securely via a command line interface.