-
Notifications
You must be signed in to change notification settings - Fork 2
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
script: distribute yield from treasury to staked locker #17
base: main
Are you sure you want to change the base?
Conversation
To be honest, I'm not quite sure where this revert comes from:
See |
it seems that in this case the gac have not being initiliased, so on the test file requires also to call the following:
|
thanks, missed that part. added it to the config of the test, passing now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
|
||
def distribute_yield(self, asset, mantissa): | ||
assert mantissa > 0 | ||
asset = interface.ERC20(asset, owner=self.safe.account) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
imo better to use Contract/safe.contract
opposed to interface.ERC20
since asset
is variable and might cause trouble in the future when trying to access functions outside of erc20 interface
) | ||
|
||
|
||
def test_distribute(cvx): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
now that posting was included in the distribute_yield script breaks the test. i will say just relay treasury_vault.citadel.distribute_yield(...)
for the test
def test_distribute(cvx): | |
def test_distribute(treasury_vault, cvx): | |
treasury_vault.citadel.distribute_yield(cvx.address, 123e18) |
No description provided.