-
Notifications
You must be signed in to change notification settings - Fork 598
feat: allow custom addresses to be prefunded with fee juice in local network #21000
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
Changes from all commits
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 |
|---|---|---|
|
|
@@ -19,6 +19,8 @@ export type GenesisStateConfig = { | |
| testAccounts: boolean; | ||
| /** Whether to populate the genesis state with initial fee juice for the sponsored FPC */ | ||
| sponsoredFPC: boolean; | ||
| /** Additional addresses to prefund with fee juice at genesis */ | ||
| prefundAddresses: string[]; | ||
| }; | ||
|
|
||
| export type L1ContractsConfig = { | ||
|
|
@@ -259,6 +261,16 @@ export const genesisStateConfigMappings: ConfigMappingsType<GenesisStateConfig> | |
| description: 'Whether to populate the genesis state with initial fee juice for the sponsored FPC.', | ||
| ...booleanConfigHelper(false), | ||
| }, | ||
| prefundAddresses: { | ||
| env: 'PREFUND_ADDRESSES', | ||
| description: 'Comma-separated list of Aztec addresses to prefund with fee juice at genesis.', | ||
| parseEnv: (val: string) => | ||
| val | ||
| .split(',') | ||
| .map(a => a.trim()) | ||
| .filter(a => a.length > 0), | ||
| defaultValue: [], | ||
| }, | ||
|
Comment on lines
+264
to
+273
Contributor
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. I'd rather make this a list of AztecAddress rather than strings, and have the
Contributor
Author
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. We'd end up with circular deps indeed (without further refactoring) |
||
| }; | ||
|
|
||
| export function getL1ContractsConfigEnvVars(): L1ContractsConfig { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,6 +5,8 @@ export type SharedNodeConfig = { | |
| testAccounts: boolean; | ||
| /** Whether to populate the genesis state with initial fee juice for the sponsored FPC */ | ||
| sponsoredFPC: boolean; | ||
| /** Additional addresses to prefund with fee juice at genesis */ | ||
| prefundAddresses: string[]; | ||
| /** Sync mode: full to always sync via L1, snapshot to download a snapshot if there is no local data, force-snapshot to download even if there is local data. */ | ||
| syncMode: 'full' | 'snapshot' | 'force-snapshot'; | ||
| /** Base URLs for snapshots index. Index file will be searched at `SNAPSHOTS_BASE_URL/aztec-L1_CHAIN_ID-VERSION-ROLLUP_ADDRESS/index.json` */ | ||
|
|
@@ -35,6 +37,16 @@ export const sharedNodeConfigMappings: ConfigMappingsType<SharedNodeConfig> = { | |
| description: 'Whether to populate the genesis state with initial fee juice for the sponsored FPC.', | ||
| ...booleanConfigHelper(false), | ||
| }, | ||
| prefundAddresses: { | ||
| env: 'PREFUND_ADDRESSES', | ||
| description: 'Comma-separated list of Aztec addresses to prefund with fee juice at genesis.', | ||
| parseEnv: (val: string) => | ||
| val | ||
| .split(',') | ||
| .map(a => a.trim()) | ||
| .filter(a => a.length > 0), | ||
| defaultValue: [], | ||
| }, | ||
|
Comment on lines
+40
to
+49
Contributor
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. I hate that we have duplicate config across the board.
Contributor
Author
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. ;( |
||
| syncMode: { | ||
| env: 'SYNC_MODE', | ||
| description: | ||
|
|
||
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
bananaFPCis still a think when users start our local network? Wow.