DonationHandlercontract relays public donations during a match-funding round- to the respective projects and records the details of this contribution i.e the amount, the token used and the contributor address- in the
The Donation Handler also points to the currently active round contract and the whitelist contract. These pointers can be changed by the DAO through a proposal.
donateentrypoint of the contract is responsible for relaying the donations- either in tez or FA1.2 compliant tokens to the project's address and thereafter- call the
contributeentrypoint of the currently active round contract. A call to
donateterminates with an error if no round is currently active.
donatetakes in a
token_identifieras parameter. The token identifier could represent either of these-
Michelson PACKof the string
Michelson PACKof the address of the FA1.2 token being contributed to a project.
The first value is supplied if the contribution is being made in tez, whereas the second value is supplied for a FA1.2 token contribution. The entrypoint handles the donation accordingly based on the token identifier value.
The token_identifier is a
bytestype and using it makes it convenient to put both tez and token contributions under a single entrypoint.
donatemakes a call to the
verify_whitelistedentrypoint of the
Whitelistregistry contract to confirm that the contributor is whitelisted. This is done to prevent an uncontrolled number of pseudonymous identities from showing up on Kickflow. Therefore, if a non-whitelisted address tries to make a contribution, the operation simple fails with an error message.
Match-funding rounds on Kickflow happen periodically, and the DonationHandler could possibly not be pointing to any round contract if there is no ongoing funding round. This would result in an operation failure.
Contributions must be made between the
contribution_endtimestamps of the
MatchingRoundcontract. Contributions made outside of this time period would fail.
Each whitelisted Tezos address can only contribute once to a specific entry in a match-funding round. Any subsequent contributions to the same entry would result in a failure.
token_identifiermust be present in the
token_setof the round contract. Attempts to contribute in any other token would result in a failure.
entry_addressprovided, must belong to one of the entries in the
Last modified 1yr ago