-
Notifications
You must be signed in to change notification settings - Fork 41
feat: (foc-localnet-v1-rc) Add Localnet Support to Curio #858
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
base: pdpv0
Are you sure you want to change the base?
feat: (foc-localnet-v1-rc) Add Localnet Support to Curio #858
Conversation
|
This is not going to be accepted without significant changes. Many settings should be a layer you define outside the code. Is there a reason the current pdp configurability is insufficient (as we have been using them to test)? |
|
Env vars in |
LexLuthr
left a comment
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.
All contract ENVs should handle debug along with 2k.
Changes to config is not an option. Please check how Curio's devnet is run under docker directory.
| return common.HexToAddress(MultiCallAddressCalibnet), nil | ||
| case build.BuildMainnet: | ||
| return common.HexToAddress(MultiCallAddressMainnet), nil | ||
| case build.Build2k: |
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.
We also need this for debug build.
| } | ||
| case build.Build2k: | ||
| // For 2k, require environment variables | ||
| payAddr := os.Getenv("FOC_CONTRACT_PAY") |
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 do we have another FOC variable here outside of payment package?
| panic("FOC_CONTRACT_PAY must be a valid hex address") | ||
| } | ||
|
|
||
| pdpVerifierAddr := os.Getenv("FOC_PDP_VERIFIER_PROXY") |
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.
Curio doesn't care PROXY vs Main. Just use PDP_VERIFIER. No FOC either.
| } | ||
| fmt.Fprintf(os.Stderr, "[2K] FOC_CONTRACT_FWSS=%s\n", fwssAddr) | ||
|
|
||
| simpleAddr := os.Getenv("FOC_CONTRACT_SIMPLE") |
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.
This is not FOC. Please stop adding FOC everywhere.
|
|
||
| fmt.Fprintf(os.Stderr, "[2K] FOC_PDP_VERIFIER_PROXY=%s\n", pdpVerifierAddr) | ||
|
|
||
| fwssAddr := os.Getenv("FOC_CONTRACT_FWSS") |
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.
Not FOC. Just FWSS is enough.
| if !common.IsHexAddress(usdfc) { | ||
| return common.Address{}, xerrors.Errorf("FOC_CONTRACT_USDFC must be a valid hex address") | ||
| } | ||
| fmt.Fprintf(os.Stderr, "[2K] FOC_CONTRACT_USDFC=%s\n", usdfc) |
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.
Please use logging and don't print on StdErr.
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.
This is not really used anymore. Use SDK.
Enable 2K mode to work well with foc-localnet-v1-rc