anchor

    [Solana - Native vs Anchor] #3. Account 생성하기

    목차 Account 생성하기 프로그램 구조 Native 프로그래밍 Anchor 프로그래밍 Account 생성하기 이전 포스팅인 [Solana - Native vs Anchor] Account 생성하기에서 Account 하나를 생성하기 위해 Client에서 System Program으로 곧바로 생성을 요청했습니다. 이번 글 "Account 생성하기"에서는 Client가 Server Program으로 Account 생성을 요청하고, Server Program에서 System Program의 create_account Instruction을 호출해 Account를 생성하는 과정을 살펴보겠습니다. 이런 방법은 Solana에서 CPI(Cross-Program Invocation)라고 불립니다. CPI는 하나의 P..

    [Solana - Native vs Anchor] #2. Account 확인하기

    목차 Account 확인하기 프로그램 구조 Native 프로그래밍 Anchor 프로그래밍 Account 확인하기 Account 확인하기 에서는 우리의 Program이 소유하는 Account를 하나 생성하고, Account가 생성됐는지 확인해보겠습니다. Account가 생성된 것인지 아닌지에 대해 확인하기 위해, Client에서 생성할 Account와 이미 생성한 Account 두 개의 키쌍을 Instruction으로 보낼 것입니다. 이 "생성한" Account 하나는 Client에서 미리 SystemProgram에 생성을 요청하고, 다른 하나의 Account는 생성을 요청하지 않는 키쌍입니다. Server Program은 이 두 개의 Account에 대해 몇 가지 확인하는 작업을 갖고 있습니다. 두 Ac..

    [Solana - Native vs Anchor] #1. Hello Solana

    목차 Hello Solana 프로그램 구조 Native 프로그래밍 Anchor 프로그래밍 Hello Solana [Solana - Native vs Anchor] 시리즈에서는 솔라나 프로그래밍을 하는 두 가지 방법에 대해 알아봅니다. 하나는 솔라나에서 지원하는 Rust Crate인 solana-program을 이용한 Native 프로그래밍 방식이고, 다른 하나는 솔라나 프로그래밍을 좀 더 편하게 해주는 Anchor 프레임워크를 이용한 방식입니다. 이 글은 Hello Solana 예제를 다루는 [Solana - Native vs Anchor] 시리즈의 첫 번째 글입니다. 향후 포스팅되는 다른 글들에서는 다양한 예제를 코드와 로직에 집중해 살펴보겠지만, 이 글에서는 프로그램을 빌드하고 솔라나 로컬넷에 배포하..