-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
remove oracle withdraw and allow contract owner to withdraw #11551
remove oracle withdraw and allow contract owner to withdraw #11551
Conversation
I see that you haven't updated any README files. Would it make sense to do so? |
Go solidity wrappers are out-of-date, regenerate them via the |
…he withdrawable amount
@@ -0,0 +1,60 @@ | |||
#!/usr/bin/env bash |
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.
is this needed? this is already in https://github.com/smartcontractkit/chainlink/blob/develop/contracts/scripts/native_solc_compile_all_vrf
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.
the naming convention here is defined here . I don't think maintaining a separate foundry profile (e.g. vrfv2plus) is needed
* @param publicProvingKey key that oracle can use to submit vrf fulfillments | ||
*/ | ||
function registerProvingKey(address oracle, uint256[2] calldata publicProvingKey) external onlyOwner { | ||
function registerProvingKey(uint256[2] calldata publicProvingKey) external onlyOwner { |
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.
@jinhoonbang @kidambisrinivas FYI this is a breaking change for Gauntlet commands (both for register and deregister proving key). When I use this branch, unit tests on the Gauntlet repo for proving key registration and deregistration are failing. I will fix those commands in the same PR where I would be introducing new withdrawal functions. Then, we would merge it on the Gauntlet develop branch only when this PR is merged (and after I double-check everything once again).
@@ -36,9 +36,10 @@ type CoordinatorV2_X interface { | |||
GetConfig(opts *bind.CallOpts) (Config, error) | |||
ParseLog(log types.Log) (generated.AbigenLog, error) | |||
OracleWithdraw(opts *bind.TransactOpts, recipient common.Address, amount *big.Int) (*types.Transaction, error) | |||
Withdraw(opts *bind.TransactOpts, recipient common.Address) (*types.Transaction, error) |
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.
Do we need a second method here for withdrawing native?
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.
Yeah we can add it for completeness. It seems that Withdraw() isn't used anywhere currently either
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.
In terms of test coverage, withdrawNative is tested in integration tests which uses a different interface from this one.
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.
So this interface is not tested or is just the Withdraw()
method not used/tested? And why do integration tests use a different interface?
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.
The interface is used and tested but seems that a few methods (withdraw()
and withdrawNative()
) are unused.
The integration tests use different interface but I'm not sure if we have a good reason for it. I think we have room for some refactoring in integration tests to either create a new shared interface for v2 and v2plus or use the existing one above.
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.
I'm approving the PR to unblock you this week - but please take it with a grain of salt. Also, since this is impacting only v2.5 it should not break anything and would probably be okay to patch things next week (if needed).
Testing
On-chain testing
Off-chain integration testing