Skip to content
This repository has been archived by the owner on Nov 27, 2024. It is now read-only.

feat: account multicall module #100

Merged
merged 40 commits into from
Apr 18, 2024
Merged

feat: account multicall module #100

merged 40 commits into from
Apr 18, 2024

Conversation

0xrajath
Copy link
Contributor

@0xrajath 0xrajath commented Apr 4, 2024

Motivation:

We need a Rewards Claimer that allows multiple rewards to be claimed with the Llama account as the caller.
This can be achieved through a generic Account Multicall module.

Modifications:

  • LlamaAccountMulticallFactory - To deploy the account multicall modules.
  • LlamaBaseAccountExtension - Base Account Extension contract with onlyDelegateCall modifier
  • LlamaAccountMulticallGuard - Guard on top of Llama Account's execute function.
  • LlamaAccountMulticallExtension - A multicall extension for the Llama Account with authorized targets and selectors
  • LlamaAccountMulticallStorage - Account Multicall Storage contract (To prevent storage collision with Llama Account while being delegate-called)
  • Account Multicall deploy scripts and input config.
  • Tests

Result:

Account Multicall module.

Gas Report:

forge test --match-test=test_Multicall --gas-report

Screen Shot 2024-04-11 at 9 44 04 PM

@0xrajath 0xrajath self-assigned this Apr 4, 2024
@0xrajath 0xrajath requested a review from AustinGreen as a code owner April 4, 2024 02:13
@0xrajath
Copy link
Contributor Author

@AustinGreen Thoughts on renaming this to Llama Account Multi Call module? That's essentially what this is at the end of the day. We could then just have this as a generalized account multicall setup that can be used for any purpose that needs the account to call directly.

@0xrajath 0xrajath changed the title feat: rewards claimer feat: account multicall module Apr 11, 2024
@0xrajath
Copy link
Contributor Author

@AustinGreen Thoughts on renaming this to Llama Account Multi Call module? That's essentially what this is at the end of the day. We could then just have this as a generalized account multicall setup that can be used for any purpose that needs the account to call directly.

I've gone ahead and done this.

justfile Outdated Show resolved Hide resolved
Copy link

Coverage after merging rajath/rewards-claim into main will be

100.00%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src/account-multicall
   LlamaAccountMulticallExtension.sol94.12%75%100%100%55
   LlamaAccountMulticallFactory.sol100%100%100%100%
   LlamaAccountMulticallGuard.sol100%100%100%100%
   LlamaAccountMulticallStorage.sol100%100%100%100%
src/token-voting
   LlamaTokenGovernor.sol99.68%98.78%100%100%830
   LlamaTokenVotingFactory.sol88.89%66.67%100%100%67–68
src/token-voting/token-adapters
   LlamaTokenAdapterVotesTimestamp.sol100%100%100%100%

@0xrajath 0xrajath merged commit d60ab2f into main Apr 18, 2024
5 checks passed
@0xrajath 0xrajath deleted the rajath/rewards-claim branch April 18, 2024 18:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants