-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Migrate bedrock-devnet to go #6710
Conversation
|
Current dependencies on/for this PR:
This comment was auto-generated by Graphite. |
// WriteJson writes the [target] to [path] as JSON. | ||
func WriteJson(path string, target interface{}) error { | ||
file, _ := json.MarshalIndent(target, "", " ") | ||
return ioutil.WriteFile(path, file, 0644) |
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.
ioutil.WriteFile is deprecated
return ioutil.WriteFile(path, file, 0644) | |
return os.WriteFile(path, file, 0644) |
if err != nil { | ||
return err | ||
} | ||
err = ioutil.WriteFile(devnetConfigPath, data, 0644) |
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.
ioutil.WriteFile is deprecated
err = ioutil.WriteFile(devnetConfigPath, data, 0644) | |
err = os.WriteFile(devnetConfigPath, data, 0644) |
if err != nil { | ||
return err | ||
} | ||
err = ioutil.WriteFile(devnetConfigBackup, data, 0644) |
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.
ioutil.WriteFile is deprecated
err = ioutil.WriteFile(devnetConfigBackup, data, 0644) | |
err = os.WriteFile(devnetConfigBackup, data, 0644) |
if err != nil { | ||
return err | ||
} | ||
err = ioutil.WriteFile(utils.AddressesJsonPath(monorepo), data, 0644) |
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.
ioutil.WriteFile is deprecated
err = ioutil.WriteFile(utils.AddressesJsonPath(monorepo), data, 0644) | |
err = os.WriteFile(utils.AddressesJsonPath(monorepo), data, 0644) |
devnetConfigPath := utils.DevnetConfigPath(monorepo) | ||
devnetConfigBackup := utils.DevnetConfigBackup(monorepo) | ||
|
||
data, err := ioutil.ReadFile(devnetConfigBackup) |
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.
ioutil.ReadFile is deprecated
data, err := ioutil.ReadFile(devnetConfigBackup) | |
data, err := os.ReadFile(devnetConfigBackup) |
devnetConfigPath := utils.DevnetConfigPath(monorepo) | ||
devnetConfigBackup := utils.DevnetConfigBackup(monorepo) | ||
|
||
data, err := ioutil.ReadFile(devnetConfigPath) |
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.
ioutil.ReadFile is deprecated
data, err := ioutil.ReadFile(devnetConfigPath) | |
data, err := os.ReadFile(devnetConfigPath) |
|
||
// ReadeBatchInboxAddress reads the batch inbox address from the rollup.json file. | ||
func ReadeBatchInboxAddress(monorepo string) (string, error) { | ||
data, err := ioutil.ReadFile(utils.RollupPath(monorepo)) |
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.
ioutil.ReadFile is deprecated
data, err := ioutil.ReadFile(utils.RollupPath(monorepo)) | |
data, err := os.ReadFile(utils.RollupPath(monorepo)) |
|
||
// ReadL2OutputOracleAddress reads the L2 output oracle address from the addresses.json file. | ||
func ReadL2OutputOracleAddress(monorepo string) (string, error) { | ||
data, err := ioutil.ReadFile(utils.AddressesJsonPath(monorepo)) |
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.
ioutil.ReadFile is deprecated
data, err := ioutil.ReadFile(utils.AddressesJsonPath(monorepo)) | |
data, err := os.ReadFile(utils.AddressesJsonPath(monorepo)) |
return err | ||
} | ||
|
||
data, err := ioutil.ReadFile(utils.L1DeploymentsPath(monorepo)) |
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.
ioutil.ReadFile is deprecated
data, err := ioutil.ReadFile(utils.L1DeploymentsPath(monorepo)) | |
data, err := os.ReadFile(utils.L1DeploymentsPath(monorepo)) |
if err != nil { | ||
return err | ||
} | ||
return nil |
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 am not opposed to this, its a bit easier to do async stuff in go compared to python, but it feels like a bit of thrashing because what we have already works |
53e5c5a
to
e2b9855
Compare
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## develop #6710 +/- ##
===========================================
+ Coverage 45.36% 48.35% +2.99%
===========================================
Files 383 315 -68
Lines 29945 23734 -6211
Branches 1692 0 -1692
===========================================
- Hits 13584 11477 -2107
+ Misses 14904 11230 -3674
+ Partials 1457 1027 -430
Flags with carried forward coverage won't be shown. Click here to find out more. |
This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
Description
Migrates and refactors the
bedrock-devnet/
to golangin a new
ops-devnet
package.