Git Product home page Git Product logo

obyte-cascading-donations's Introduction

Obyte Cascading Donations AA

Allow github repos to receive donations and forward them (or part thereof) down to other repos they depend upon and want to support.

kivach.org

Methods

Set rules

Set the donation distribution rules on a repo

trigger.data.set_rules - set this to 1
trigger.data.repo - repository to set rules on (owner/project). The first part of the repo (the owner) must be the attested github user for trigger.address
trigger.data.rules - object with distribution rules. Omit this param to receive 100% of donations

{
	'owner1/repo1' : 10,
	'owner2/repo2' : 20,
	...
}

Maximum number of nested repos is 10. The remainder of the undistributed funds will be sent to the owner.

Set notification AA

Set the address of an AA to be notified about each new donation

trigger.data.repo - repository to set the notification AA for. The first part of the repo (the owner) must be the attested github user for trigger.address
trigger.data.notification_aa - address of the notification AA

Example notification AA: https://oscript.org/s/ayduFGpeBpnB7UYu7PUGYWorBL4UMkKS

Donate

Send a donation to a repository. The donation can be in any asset.

trigger.data.donate - set this to 1
trigger.data.repo - repository to send donation to. Example: `owner/repo`

Distribute

Distribute the undistributed pool of a repository. If trigger.address is the attested owner of the repo, the owner will receive his payment. Otherwise, it will be stored in the repo's unclaimed pool.

trigger.data.distribute - set this to 1
trigger.data.repo - repository to trigger pool distribution on
trigger.data.asset - specifies asset to distribute. Default is `base`
trigger.data.to - optional address. The attested owner can specify the addres that will receive payment instead of him.

Set nickname

Associate a donor's nickname with trigger.address. Previous nickname (if any) will be freed.

trigger.data.nickname - nickname string

State Vars

var[${repo}*rules] - distribution rules of repo
var[${repo}*notification_aa] - optional notification AA of the repo to notify about the received donations
var[${repo}*pool*${asset}] - repo's undistributed pool in asset
var[${repo}*total_received*${asset}] - total received by repo in asset
var[${repo}*total_received_from_other_repos*${asset}] - total received by repo from other repos in asset
var[${repo1_or_user_address}*to*${repo2}*${asset}] - total received or forwarded from repo1_or_user_address to repo2 in asset
var[${repo2}*from*${repo1_or_user_address}*${asset}] - total received or forwarded from repo1_or_user_address to repo2 in asset
var[${repo_or_user_address}*total_donated*${asset}] - total donated by user or repo in asset
var[total_donated*${asset}] - grand total donated in asset
var[paid_to*${address}*${asset}] - total paid to repo owner
var[${repo}*unclaimed*${asset}] - unclaimed funds of attested owner
var[nickname*${address}] - donor ranking nickname
var[nickname_owner*${nickname}] - nickanme's owner address

Donations

Kivach uses itself :) to accept donations and forward a portion of them to other open-source projects that made Kivach possible.

Kivach

obyte-cascading-donations's People

Contributors

taump avatar tonyofbyteball avatar valyakin avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

taump

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.