블록체인/솔라나 (4) 썸네일형 리스트형 [Solana] PDA가 가진 ATA Transfer시 "signer privilege escalated" 에러 프로그램이 가지고 있는 토큰을 사용자에게 전송할 때 "signer privilege escalated ..." 에러가 발생하였다. #[account(init, seeds = [b"pool", config.key().as_ref(), mint.key().as_ref()], bump, payer = signer, space = 8 + std::mem::size_of::())] pub pool: Box>, ata의 authority를 pool로 지정 한 후 cpi를 호출하기 위해 signer seeds를 만들 때 pool을 init 할 때 지정한 seeds 이외에 bump도 추가적으로 포함시켜주어야 한다. 에러 발생 let seeds = &[ b"pool".as_ref(), ctx.accounts.config.. [Solana] Error: Stack offset of 4200 exceeded max offset of 4096 by 104 bytes... anchor build에서 다음과 같은 에러가 발생했다. Error: Function _ZN8amm_test9__private8__global13add_liquidity17h3a3c80af5dfe6038E Stack offset of 4200 exceeded max offset of 4096 by 104 bytes, please minimize large stack variables 원인 instruction에 포함되는 accounts의 크기가 너무 큰 것이 원인 해결 방법 필요한 경우가 아니라면 Account 사용 및 accounts 수를 줄임 [Solana] Anchor에서 "Error: Unable to read keypair" anchor 에서 테스트를 하려고 했을 때 Error: Unable to read keypair 라고 에러가 발생할 때는 2가지 경우가 있다. 1. solana-cli에서 keygen이 없는 경우 -> solana-keygen new 2. 다른 컴퓨터에서 기존 프로젝트를 받았을 경우 -> Anchor.toml에서 wallet = "/home/아이디/.config/solana/id.json"에서 아이디 수정 [Solana] Error processing Instruction 1: custom program error: 0x1 솔라나의 anchor에서 테스트하던 도중 Error processing Instruction 1: custom program error: 0x1 에러 발생 Initializer program state: Error: failed to send transaction: Transaction simulation failed: Error processing Instruction 1: custom program error: 0x1 at Connection.sendEncodedTransaction (node_modules/@solana/web3.js/src/connection.ts:4594:13) at processTicksAndRejections (node:internal/process/task_queues:96.. 이전 1 다음