-
Notifications
You must be signed in to change notification settings - Fork 33
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
Arbitrum SDK #1116
Arbitrum SDK #1116
Changes from 26 commits
f57b68b
2f67189
07e0c27
4796cd9
9cd2969
42105ed
b51a1b1
1878483
22d292a
81fbabe
a7cac0e
81f5504
adc439b
106e84e
76278d9
1e07031
a6f343b
bb9e88c
865179e
53dae85
f7d9992
f50c1a8
8eb138d
dadf7aa
3c147fd
1452abf
a4e3fa2
75c7fc8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,7 @@ import ( | |
"github.com/synapsecns/sanguine/agents/domains" | ||
"github.com/synapsecns/sanguine/agents/testutil/agentstestcontract" | ||
"github.com/synapsecns/sanguine/agents/types" | ||
"github.com/synapsecns/sanguine/core" | ||
"github.com/synapsecns/sanguine/ethergo/backends" | ||
"github.com/synapsecns/sanguine/ethergo/backends/anvil" | ||
signerConfig "github.com/synapsecns/sanguine/ethergo/signer/config" | ||
|
@@ -725,6 +726,11 @@ func (g *GuardSuite) TestUpdateAgentStatusOnRemote() { | |
// This test requires a call to anvil's evm.IncreaseTime() cheat code, so we should | ||
// set up the backends with anvil. | ||
|
||
// TODO: no need for this when anvil CI issues are fixed | ||
if core.GetEnvBool("CI", false) { | ||
return | ||
} | ||
|
||
testDone := false | ||
defer func() { | ||
testDone = true | ||
Comment on lines
726
to
736
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The tests are comprehensive and cover a wide range of fraud detection scenarios. Consider refactoring to improve maintainability and readability, such as breaking down large test functions into smaller, more focused tests or using helper functions for repetitive setup tasks. Additionally, ensure that all external dependencies and mock contracts are adequately documented to facilitate understanding and future updates. |
||
|
Original file line number | Diff line number | Diff line change | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -36,6 +36,11 @@ func NewAnvilSuite(tb testing.TB) *AnvilSuite { | |||||||||||||||||||
func (a *AnvilSuite) SetupSuite() { | ||||||||||||||||||||
a.TestSuite.SetupSuite() | ||||||||||||||||||||
|
||||||||||||||||||||
// TODO: no need for this when anvil CI issues are fixed | ||||||||||||||||||||
if core.GetEnvBool("CI", false) { | ||||||||||||||||||||
return | ||||||||||||||||||||
} | ||||||||||||||||||||
Comment on lines
+39
to
+42
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The conditional check to skip setup actions when running in a CI environment is implemented correctly. However, consider adding a log statement to indicate that the setup is being skipped due to the CI environment. This can improve the visibility of test behavior in CI logs. if core.GetEnvBool("CI", false) {
+ log.Println("Skipping setup due to CI environment")
return
} Committable suggestion
Suggested change
|
||||||||||||||||||||
|
||||||||||||||||||||
a.forkAddress = core.GetEnv("ETHEREUM_RPC_URI", "https://1rpc.io/eth") | ||||||||||||||||||||
options := anvil.NewAnvilOptionBuilder() | ||||||||||||||||||||
err := options.SetForkURL(a.forkAddress) | ||||||||||||||||||||
|
@@ -58,5 +63,9 @@ func (a *AnvilSuite) SetupSuite() { | |||||||||||||||||||
} | ||||||||||||||||||||
|
||||||||||||||||||||
func TestAnvilSuite(t *testing.T) { | ||||||||||||||||||||
// TODO: no need for this when anvil CI issues are fixed | ||||||||||||||||||||
if core.GetEnvBool("CI", false) { | ||||||||||||||||||||
return | ||||||||||||||||||||
} | ||||||||||||||||||||
Comment on lines
+66
to
+69
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Similar to the previous comment, the conditional check to skip the test suite execution in a CI environment is correctly implemented. Again, adding a log statement here would enhance visibility and debugging capabilities in CI logs. if core.GetEnvBool("CI", false) {
+ log.Println("Skipping TestAnvilSuite due to CI environment")
return
} Committable suggestion
Suggested change
|
||||||||||||||||||||
suite.Run(t, NewAnvilSuite(t)) | ||||||||||||||||||||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Chain | ||
|
||
The chain module contains deprecated implementations of many commom utilities for interacting with the chain. While this module will be excised in due course from internal libs, it should not be used in any new code. | ||
|
||
Feel free to duplicate any functionality from this module on the assumption it will be deleted. |
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 conditional check to skip the test when running in a CI environment is implemented correctly. As with the previous file, consider adding a log statement to indicate that the test is being skipped due to the CI environment. This can aid in understanding test behavior in CI logs.
if core.GetEnvBool("CI", false) { + log.Println("Skipping TestSendManagerMessage due to CI environment") return }
Committable suggestion