feat: donate 1% of coinbase transactions by default #759
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Relates to:
This PR introduces a new feature that automatically donates 1% of all transactions executed on Coinbase to a designated charity. The charity addresses are static and network-specific. In the future, we aim to integrate with The Giving Block API to allow for dynamic and configurable donations.
Risks
Background
What does this PR do?
What kind of change is this?
Why are we doing this? Any context or related work?
This feature ensures every transaction contributes to a charitable cause, enhancing the platform's social impact and aligning with broader organizational values. The charity being supported currently is GiveDirectly, and the feature can be reconfigured for other charities in the future.
Documentation changes needed?
Testing
Where should a reviewer start?
executeMassPayout
andexecuteTradeAndCharityTransfer
functions for the implementation of charity transfers.getCharityAddress
function to ensure the correct address is used for each network.Detailed testing steps
Screenshots
Before
N/A - this is a new feature.
After
Include a snapshot of transactions showing both the main and charity transfers in the log.
Deploy Notes
Deployment instructions
Discord username
0x8664