Skip to content

Disperse is a smart contract that allows to send money in different forms to separate users on the gno.land blockchain

Notifications You must be signed in to change notification settings

agherasie/gno-disperse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Disperse - Gno

This repo contains the gno version of disperse, a simple way to send various amounts of coins or tokens to separate addresses on the blockchain.

alt text

Installation

git clone https://github.com/agherasie/gno-disperse.git

Frontend

cd front/
bun install
bun run dev

app available @ http://localhost:5173 by default

Api

gnodev api/

docs available @ http://localhost:8888/r/demo/disperse by default

Usage

Gnot dispersing

You can disperse GNOTs by simply filling the addresses and corresponding amounts that you wish to send inside the webapp.

alt text

You can also use the cli by specifying the total amount with the send parameter :

gnokey maketx call -pkgpath "gno.land/r/demo/disperse" -func "DisperseGnotString" -gas-fee 1000000ugnot -gas-wanted 2000000 -send "200ugnot" -broadcast -chainid "dev" -args "g1dmt3sa5ucvecxuhf3j6ne5r0e3z4x7h6c03xc0,g1akeqsvhucjt8gf5yupyzjxsjd29wv8fayng37c" -args "100,100" -remote "tcp://127.0.0.1:26657" MyKey

Token dispersing

Before using the token disperse functionality, you must first grant an allowance to the r/demo/disperse contract so that it can use your funds.

alt text

or, if you're using gnokey,

gnokey maketx call -pkgpath "gno.land/r/demo/grc20factory" -func "Approve" -gas-fee 1000000ugnot -gas-wanted 2000000 -send "" -broadcast -chainid "dev" -args "TEST" -args "g1yryw6qs8h9anvguu4dfdc0u7zh4gvv8vqf59sj" -args "200" -remote "tcp://127.0.0.1:26657" MyKey

Once you have granted disperse the allowance, you can proceed by clicking the "disperse token" button or you can run the following command using gnokey :

gnokey maketx call -pkgpath "gno.land/r/demo/disperse" -func "DisperseTokenString" -gas-fee 1000000ugnot -gas-wanted 2000000 -send "" -broadcast -chainid "dev" -args "TEST" -args "g1dmt3sa5ucvecxuhf3j6ne5r0e3z4x7h6c03xc0,g1akeqsvhucjt8gf5yupyzjxsjd29wv8fayng37c" -args "100,100" -remote "tcp://127.0.0.1:26657" MyKey

About

Disperse is a smart contract that allows to send money in different forms to separate users on the gno.land blockchain

Resources

Stars

Watchers

Forks