This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> Program logged: "transaction_accounts" | |
> Program logged: "EfmgwpRCoUCdiq9Pn1CTaB49L3PnTKTCMvP8hzoo1XWX" | |
> Program logged: "dadFk6r2haaNUqduEK3rS8kwhFcqi5mA6qbFY6gzeFG" | |
> Program logged: "(writable, signer)" | |
> Program logged: "fezASqo1FtBKTKCyzZNbA8eJvHWfHGEJMrjRRRxy77j" | |
> Program logged: "(writable)" | |
> Program logged: "4H5odRYyikgqXJXbYby95vKsDMFJkuBPdEAfeE8kSVKJ" | |
> Program logged: "(writable)" | |
> Program logged: "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s" | |
> Program logged: "5w2Ce8fTMeKE2WvZLP257qrqxnAd2sJbCXH8PXbgFQhe" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> Program logged: "source_account (writable, signer):" | |
> Program logged: "4H5odRYyikgqXJXbYby95vKsDMFJkuBPdEAfeE8kSVKJ" | |
> Program logged: "destination_account (writable):" | |
> Program logged: "dadFk6r2haaNUqduEK3rS8kwhFcqi5mA6qbFY6gzeFG" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> Program logged: "source_account (writable, signer):" | |
> Program logged: "4H5odRYyikgqXJXbYby95vKsDMFJkuBPdEAfeE8kSVKJ" | |
> Program logged: "destination_account (writable):" | |
> Program logged: "dadFk6r2haaNUqduEK3rS8kwhFcqi5mA6qbFY6gzeFG" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static uint64_t util_transfer_lamports_signed(SolPubkey *source_account, SolPubkey *destination_account, | |
uint64_t lamports, SolSignerSeeds *seeds, int seeds_len, | |
SolAccountInfo *transaction_accounts, int transaction_accounts_len) | |
{ | |
SolAccountMeta account_metas[] = | |
/// 0. `[writable, signer]` The source account. | |
{ { source_account, true, true }, | |
/// 1. `[writable]` The destination account. | |
{ destination_account, true, false } }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
typedef struct __attribute__((packed)) | |
{ | |
uint32_t instruction_code; // 2 for Transfer | |
uint64_t amount; | |
} util_SystemTransferData; | |
static uint64_t util_transfer_lamports_signed(SolPubkey *source_account, SolPubkey *destination_account, | |
uint64_t lamports, SolSignerSeeds *seeds, int seeds_len, | |
SolAccountInfo *transaction_accounts, int transaction_accounts_len) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
```c | |
typedef struct __attribute__((packed)) | |
{ | |
uint32_t instruction_code; // 2 for Transfer | |
uint64_t amount; | |
} util_SystemTransferData; | |
static uint64_t util_transfer_lamports_signed(SolPubkey *source_account, SolPubkey *destination_account, | |
uint64_t lamports, SolSignerSeeds *seeds, int seeds_len, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
typedef struct __attribute__((packed)) | |
{ | |
uint32_t instruction_code; // 2 for Transfer | |
uint64_t amount; | |
} util_SystemTransferData; | |
static uint64_t util_transfer_lamports_signed(SolPubkey *source_account, SolPubkey *destination_account, | |
uint64_t lamports, SolSignerSeeds *seeds, int seeds_len, | |
SolAccountInfo *transaction_accounts, int transaction_accounts_len) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Metaplex implementation | |
pub fn create_or_allocate_account_raw<'a>( | |
program_id: Pubkey, | |
new_account_info: &AccountInfo<'a>, | |
rent_sysvar_info: &AccountInfo<'a>, | |
system_program_info: &AccountInfo<'a>, | |
payer_info: &AccountInfo<'a>, | |
size: usize, | |
signer_seeds: &[&[u8]], | |
) -> ProgramResult { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"name":"Foo Token","symbol":"Foo","description":"Foo Token, no decimals","image":"https://sc04.alicdn.com/kf/HTB1jQ9KRXXXXXc3XXXX760XFXXXk.png"} |