Solana integration
Overview
How to read a Solana account from an EVM chain
const [configKey] = PublicKey.findProgramAddressSync([Buffer.from("config", "utf-8")], snapshotter.programId)
const systemProgram = new PublicKey("11111111111111111111111111111111")
await snapshotter.methods
.subscribe(systemProgram)
.accounts({
config: configKey,
} as any)
.rpc()const [configKey] = PublicKey.findProgramAddressSync([Buffer.from("config", "utf-8")], snapshotter.programId)
const batch = new anchor.BN(0) // must be equal to the current batch
await snapshotter.methods
.calculateRoot(batch)
.accounts({
config: configKey,
} as any)
.remainingAccounts(batchAccounts)
.rpc()Last updated
Was this helpful?