Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: New Adapter - Reimbursement #412

Merged
merged 64 commits into from
Dec 3, 2021
Merged

feat: New Adapter - Reimbursement #412

merged 64 commits into from
Dec 3, 2021

Conversation

adridadou
Copy link
Member

@adridadou adridadou commented Oct 1, 2021

Proposed changes

  • Every function call can be reimbursed to the caller, just need to make sure the function is using the correct modifier: reimbursable
  • The reimbursable is protected against reentrancy attacks and calculates the cost of the tx to send the eth back to the caller if the transaction is successfully executed
  • If there are no ETH available for reimbursements, the transaction is executed as usual and no funds are reimbursed.
  • Every adapter that submits & process proposals were updated to allow reimbursements.

@codecov
Copy link

codecov bot commented Oct 1, 2021

Codecov Report

Merging #412 (0704637) into master (7650d3f) will decrease coverage by 1.66%.
The diff coverage is 56.48%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #412      +/-   ##
==========================================
- Coverage   83.75%   82.09%   -1.67%     
==========================================
  Files          49       55       +6     
  Lines        1767     1882     +115     
  Branches      414      438      +24     
==========================================
+ Hits         1480     1545      +65     
- Misses        287      337      +50     
Impacted Files Coverage Δ
contracts/adapters/Configuration.sol 100.00% <ø> (ø)
contracts/adapters/Distribute.sol 98.52% <ø> (ø)
contracts/adapters/Financing.sol 100.00% <ø> (ø)
contracts/adapters/GuildKick.sol 95.65% <ø> (ø)
contracts/adapters/Managing.sol 100.00% <ø> (ø)
contracts/adapters/Onboarding.sol 98.63% <ø> (ø)
contracts/adapters/Signatures.sol 100.00% <ø> (ø)
contracts/adapters/Tribute.sol 97.14% <ø> (ø)
contracts/adapters/voting/OffchainVoting.sol 41.42% <ø> (ø)
contracts/adapters/voting/Voting.sol 87.50% <ø> (ø)
... and 14 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7650d3f...0704637. Read the comment docs.

test/adapters/reimbursement.test.js Outdated Show resolved Hide resolved
contracts/extensions/bank/Bank.sol Outdated Show resolved Hide resolved
contracts/companion/Reimbursement.sol Show resolved Hide resolved
contracts/adapters/modifiers/Reimbursable.sol Outdated Show resolved Hide resolved
Copy link
Contributor

@fforbeck fforbeck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added some minor comments that we already discussed on discord.

@fforbeck fforbeck merged commit 683d444 into master Dec 3, 2021
@fforbeck fforbeck deleted the adapter-reimbursement branch December 3, 2021 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants