This repository has been archived by the owner on Nov 27, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
feat: account logic and script for delegating governance tokens from account #497
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dd0sxx
reviewed
Nov 30, 2023
we also might want to write a simple guard which checks to make sure actions are calling the delegation script and not anything else since this requires permissioning the arbitrary execution function on accounts |
…llamaxyz/llama into austin/account-token-delegation
AustinGreen
changed the title
feat: create script for delegating governance tokens in LlamaAccount to instance's executor
feat: account logic and script for delegating governance tokens from account
Dec 12, 2023
AustinGreen
commented
Dec 12, 2023
AustinGreen
commented
Dec 12, 2023
AustinGreen
commented
Dec 13, 2023
0xrajath
reviewed
Dec 18, 2023
0xrajath
reviewed
Dec 18, 2023
0xrajath
reviewed
Dec 18, 2023
dd0sxx
approved these changes
Dec 18, 2023
0xrajath
approved these changes
Dec 18, 2023
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Motivation:
Llama accounts can contain
ERC20Votes
andERC721Votes
tokens. These must be delegated to the instancesLlamaExecutor
for the instance to vote on governance proposals. This PR introduces aLlamaAccountTokenDelegationScript
that can be used to delegate tokens custodied in aLlamaAccount
to the instance's executor or any other address.Modifications:
Created a
LlamaAccountTokenDelegationScript.sol
script that includes a function that uses the account's arbitrary execute function to call the delegate function on the voting token. It accepts an account, token, and delegatee address as parameters.I also created an account logic called
LlamaAccountWithDelegation.sol
that inherits fromLlamaAccount.sol
. It extendsLlamaAccount
with a delegate and batchDelegate function.Result:
Instances will be able to delegate tokens in their accounts for token voting.