-
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
chore/VRF-325 - Added smoke test for direct funding on VRFv2 #11690
Conversation
I see that you haven't updated any CHANGELOG files. Would it make sense to do so? |
7a6b291
to
afaec69
Compare
@@ -108,6 +108,7 @@ package gethwrappers | |||
//go:generate go run ./generation/generate/wrap.go ../../contracts/solc/v0.8.6/VRFV2Wrapper/VRFV2Wrapper.abi ../../contracts/solc/v0.8.6/VRFV2Wrapper/VRFV2Wrapper.bin VRFV2Wrapper vrfv2_wrapper | |||
//go:generate go run ./generation/generate/wrap.go ../../contracts/solc/v0.8.6/VRFV2WrapperInterface/VRFV2WrapperInterface.abi ../../contracts/solc/v0.8.6/VRFV2WrapperInterface/VRFV2WrapperInterface.bin VRFV2WrapperInterface vrfv2_wrapper_interface | |||
//go:generate go run ./generation/generate/wrap.go ../../contracts/solc/v0.8.6/VRFV2WrapperConsumerExample/VRFV2WrapperConsumerExample.abi ../../contracts/solc/v0.8.6/VRFV2WrapperConsumerExample/VRFV2WrapperConsumerExample.bin VRFV2WrapperConsumerExample vrfv2_wrapper_consumer_example | |||
//go:generate go run ./generation/generate/wrap.go ../../contracts/solc/v0.8.6/VRFV2WrapperLoadTestConsumer/VRFV2WrapperLoadTestConsumer.abi ../../contracts/solc/v0.8.6/VRFV2WrapperLoadTestConsumer/VRFV2WrapperLoadTestConsumer.bin VRFV2WrapperLoadTestConsumer vrfv2_wrapper_load_test_consumer |
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.
Why is everything commented out here? You uncomment and run a specific line only when you need it?
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.
its just how it works, it should be commented out. check https://go.dev/blog/generate.
so //go:generate will be invoked when "go generate" cmd will be invoked from cli. Which in turn you need to invoke from make command - https://github.com/smartcontractkit/chainlink/blob/develop/contracts/GNUmakefile#L72C1-L72C1
So whenever you add a solidity contract or update it, you need to invoke make wrappers-all
from contracts folder.
In case if you have added new contract, then afterwards you need to ensure that you have added the contracts' golang binding, in this case it's vrfv2_wrapper_load_test_consumer.go
. you need to add it from git unversioned files
if err != nil { | ||
return nil, nil, err | ||
} | ||
err = env.EVMClient.WaitForEvents() |
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 there a way to do assignment expressions in Go (assign the variable and check the condition in one line)? Or this is the standard way to do error handling in Go? Just curious if anyone knows... I have very little knowledge of Go.
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 guess it would look smth like this:
if err := env.EVMClient.WaitForEvents(); err != nil {
return nil, nil, fmt.Errorf("%s, err %w", ErrWaitTXsComplete, err)
}
but its matter of preference
SonarQube Quality Gate 0 Bugs No Coverage information |
Added smoke tests for direct funding invoking randomness on VRFv2