Skip to content
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

Feat: Enable Deposits #268

Merged
merged 79 commits into from
Dec 10, 2024
Merged

Feat: Enable Deposits #268

merged 79 commits into from
Dec 10, 2024

Conversation

rickimoore
Copy link
Member

Add handling of creating and reading mnemonics, creation of BLS validator keys, deposit json and allowing uses to deposit via the CLI.

Care needs to be taken to ensure the deposit contract address is clearly written and printed to the UI so users can verify the address before sending and money.

#255

@rickimoore rickimoore marked this pull request as ready for review December 4, 2024 12:25
Copy link
Member

@AgeManning AgeManning left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had a quick look through the three files you mentioned.

Mainly had questions around the types and one about generating the withdrawal creds.


interface DepositDataJson {
amount: number
pubkey: string
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I saw in the previous file there was a Pubkey Type. If we can we should use the actual types to avoid invalid data

interface DepositDataJson {
amount: number
pubkey: string
signature: string
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similarly here, this should be a signature type (if it exists). Should be a bls sig.

amount: number
pubkey: string
signature: string
withdrawal_credentials: string
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be a hash, pretty sure. Should be the correct hash type if possible.

}

interface DepositData extends DepositDataJson {
deposit_data_root: string
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be a hash

generateDepositData: (
mnemonic: string,
index: number,
withdrawalAddress: string,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Address type if it exists

const generateDepositData = async (
mnemonic: string,
index: number,
withdrawalAddress: string,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Address type

src/hooks/useLodestarDepositData.ts Show resolved Hide resolved
isLoading: boolean
error: string
keyStore: KeyStoreData | undefined
pubKey: string
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pubkey type if it exists

src/hooks/useLodestarDepositData.ts Outdated Show resolved Hide resolved
src/hooks/useLodestarDepositData.ts Show resolved Hide resolved
src/hooks/useLodestarDepositData.ts Show resolved Hide resolved
src/hooks/useValidatorDeposit.ts Show resolved Hide resolved
src/hooks/useChainSafeKeygen.ts Show resolved Hide resolved
src/hooks/useChainSafeKeygen.ts Show resolved Hide resolved
@rickimoore rickimoore merged commit 9a6011b into unstable Dec 10, 2024
This was referenced Dec 12, 2024
rickimoore added a commit that referenced this pull request Dec 17, 2024
Co-authored-by: antondlr <anton@delaruelle.net>
AgeManning pushed a commit that referenced this pull request Dec 20, 2024
Co-authored-by: antondlr <anton@delaruelle.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants