-
Notifications
You must be signed in to change notification settings - Fork 509
Console: ERC20 and Native Token Staking Manager Setup + Operations
#2880
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: master
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…uilders-hub into console/staking-manager-setup
Console: ERC20 and Native Token Staking Manager Setup
Console: ERC20 and Native Token Staking Manager SetupConsole: ERC20 and Native Token Staking Manager Setup + Operations
| } | ||
|
|
||
| export function ValidatorsList({ validators, onChange, l1TotalInitializedWeight = null, userPChainBalanceNavax = null }: Props) { | ||
| export function ValidatorsList({ validators, onChange, l1TotalInitializedWeight = null, userPChainBalanceNavax = null, hideConsensusWeight = false }: Props) { |
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.
do we default to false because you can only go from PoA to PoS?
| }); | ||
|
|
||
| // Step 2: Get validation ID from contract using nodeID | ||
| // For StakingManager, we need to query the underlying ValidatorManager |
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.
maybe lets change the name of the directory to Validator Manager - since now also the operations for permissionless l1s are in a permissioned l1s folder
| let validationIdQueryAddress = validatorManagerAddress; | ||
|
|
||
| if (useStakingManager && contractOwner) { | ||
| // Get the underlying ValidatorManager address from StakingManager settings | ||
| try { | ||
| const settings = await publicClient.readContract({ | ||
| address: contractOwner as `0x${string}`, | ||
| abi: nativeTokenStakingManagerAbi.abi, | ||
| functionName: 'getStakingManagerSettings', | ||
| }) as any; | ||
|
|
||
| validationIdQueryAddress = settings.manager; // This is the actual ValidatorManager | ||
| console.log('[StakingManager] Querying ValidatorManager for validation ID:', validationIdQueryAddress); | ||
| } catch (err) { | ||
| console.warn("Failed to get ValidatorManager from StakingManager settings, using default:", err); | ||
| } | ||
| } | ||
|
|
||
| console.log('[CompleteValidatorRegistration] Querying validation ID from:', validationIdQueryAddress); |
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 need to store the validator manager address in a validationIdQueryAddress variable that then we set to the response of the rpc call?
in other words i think we can just delete line 142 i think
No description provided.