Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

[experimental] Replace implementation of AdvanceNonce instruction with that from the generated System program client #2127

Closed
steveluscher opened this issue Feb 16, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@steveluscher
Copy link
Contributor

function createAdvanceNonceAccountInstruction<
TNonceAccountAddress extends string = string,
TNonceAuthorityAddress extends string = string,
>(
nonceAccountAddress: Address<TNonceAccountAddress>,
nonceAuthorityAddress: Address<TNonceAuthorityAddress>,
): AdvanceNonceAccountInstruction<TNonceAccountAddress, TNonceAuthorityAddress> {
return {
accounts: [
{ address: nonceAccountAddress, role: AccountRole.WRITABLE },
{
address: RECENT_BLOCKHASHES_SYSVAR_ADDRESS,
role: AccountRole.READONLY,
},
{ address: nonceAuthorityAddress, role: AccountRole.READONLY_SIGNER },
],
data: new Uint8Array([4, 0, 0, 0]) as AdvanceNonceAccountInstructionData,
programAddress: SYSTEM_PROGRAM_ADDRESS,
};
}

@steveluscher
Copy link
Contributor Author

This will never work because of the circular dependency it creates.

Copy link
Contributor

Because there has been no activity on this issue for 7 days since it was closed, it has been automatically locked. Please open a new issue if it requires a follow up.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants