-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
77cdd3e
commit e151b75
Showing
18 changed files
with
164 additions
and
2 deletions.
There are no files selected for viewing
Submodule memo
deleted from
cfb9ed
Submodule token
deleted from
cfb9ed
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
[package] | ||
name = "mollusk-memo" | ||
version = "0.1.0" | ||
edition = "2021" | ||
|
||
[features] | ||
default = ["memo", "memo-v1"] | ||
memo = [] | ||
memo-v1 = [] | ||
|
||
[lib] | ||
|
||
[dependencies] | ||
mollusk-svm = { workspace = true } | ||
solana-sdk = { workspace = true } |
Binary file not shown.
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// Last updated at mainnet-beta slot height: 298485997 | ||
#[cfg(feature = "memo")] | ||
pub mod memo; | ||
#[cfg(feature = "memo-v1")] | ||
pub mod memo_v1; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
use { | ||
mollusk_svm::Mollusk, | ||
solana_sdk::{account::AccountSharedData, pubkey::Pubkey}, | ||
}; | ||
|
||
pub const ID: Pubkey = solana_sdk::pubkey!("MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"); | ||
|
||
pub fn add_program(mollusk: &mut Mollusk) { | ||
mollusk.add_program_with_elf_and_loader( | ||
&ID, | ||
include_bytes!("elf/memo.so"), | ||
&mollusk_svm::program::loader_keys::LOADER_V2, | ||
); | ||
} | ||
|
||
pub fn account() -> AccountSharedData { | ||
mollusk_svm::program::create_program_account_loader_v3(&ID) | ||
} | ||
|
||
/// Get the key and account for the system program. | ||
pub fn keyed_account() -> (Pubkey, AccountSharedData) { | ||
(ID, account()) | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
use { | ||
mollusk_svm::Mollusk, | ||
solana_sdk::{account::AccountSharedData, pubkey::Pubkey}, | ||
}; | ||
|
||
pub const ID: Pubkey = solana_sdk::pubkey!("Memo1UhkJRfHyvLMcVucJwxXeuD728EqVDDwQDxFMNo"); | ||
|
||
pub fn add_program(mollusk: &mut Mollusk) { | ||
//BPFLoader1111111111111111111111111111111111 | ||
mollusk.add_program_with_elf_and_loader( | ||
&ID, | ||
include_bytes!("elf/memo-v1.so"), | ||
&mollusk_svm::program::loader_keys::LOADER_V1, | ||
); | ||
} | ||
|
||
/// Get the key and account for the system program. | ||
pub fn keyed_account() -> (Pubkey, AccountSharedData) { | ||
( | ||
ID, | ||
mollusk_svm::program::create_program_account_loader_v3(&ID), | ||
) | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
solana program dump MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr ./src/elf/memo.so -u mainnet-beta | ||
solana program dump Memo1UhkJRfHyvLMcVucJwxXeuD728EqVDDwQDxFMNo ./src/elf/memo-v1.so -u mainnet-beta | ||
solana slot -u mainnet-beta | xargs -I {} sed -i '' 's|// Last updated at mainnet-beta slot height: .*|// Last updated at mainnet-beta slot height: {}|' ./src/lib.rs |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
[package] | ||
name = "mollusk-token" | ||
version = "0.1.0" | ||
edition = "2021" | ||
|
||
[features] | ||
default = ["token", "associated-token", "token-2022"] | ||
token = [] | ||
associated-token = [] | ||
token-2022 = [] | ||
|
||
[lib] | ||
|
||
[dependencies] | ||
mollusk-svm = { workspace = true } | ||
solana-sdk = { workspace = true } |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
use { | ||
mollusk_svm::Mollusk, | ||
solana_sdk::{account::AccountSharedData, pubkey::Pubkey}, | ||
}; | ||
|
||
pub const ID: Pubkey = solana_sdk::pubkey!("ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"); | ||
|
||
pub fn add_program(mollusk: &mut Mollusk) { | ||
mollusk.add_program_with_elf_and_loader( | ||
&ID, | ||
include_bytes!("elf/associated_token.so"), | ||
&mollusk_svm::program::loader_keys::LOADER_V2, | ||
); | ||
} | ||
|
||
/// Get the key and account for the system program. | ||
pub fn keyed_account() -> (Pubkey, AccountSharedData) { | ||
( | ||
ID, | ||
mollusk_svm::program::create_program_account_loader_v3(&ID), | ||
) | ||
} |
Binary file not shown.
Binary file not shown.
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#[cfg(feature = "associated-token")] | ||
pub mod associated_token; | ||
// Last updated at mainnet-beta slot height: 298486032 | ||
#[cfg(feature = "token")] | ||
pub mod token; | ||
#[cfg(feature = "token-2022")] | ||
pub mod token2022; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
use { | ||
mollusk_svm::Mollusk, | ||
solana_sdk::{account::AccountSharedData, pubkey::Pubkey}, | ||
}; | ||
|
||
pub const ID: Pubkey = solana_sdk::pubkey!("TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"); | ||
|
||
pub fn add_program(mollusk: &mut Mollusk) { | ||
mollusk.add_program_with_elf_and_loader( | ||
&ID, | ||
include_bytes!("elf/token.so"), | ||
&mollusk_svm::program::loader_keys::LOADER_V2, | ||
); | ||
} | ||
|
||
pub fn account() -> AccountSharedData { | ||
mollusk_svm::program::create_program_account_loader_v3(&ID) | ||
} | ||
|
||
/// Get the key and account for the system program. | ||
pub fn keyed_account() -> (Pubkey, AccountSharedData) { | ||
(ID, account()) | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
use { | ||
mollusk_svm::Mollusk, | ||
solana_sdk::{account::AccountSharedData, pubkey::Pubkey}, | ||
}; | ||
|
||
pub const ID: Pubkey = solana_sdk::pubkey!("TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"); | ||
|
||
pub fn add_program(mollusk: &mut Mollusk) { | ||
mollusk.add_program_with_elf_and_loader( | ||
&ID, | ||
include_bytes!("elf/token_2022.so"), | ||
&mollusk_svm::program::loader_keys::LOADER_V2, | ||
); | ||
} | ||
|
||
pub fn account() -> AccountSharedData { | ||
mollusk_svm::program::create_program_account_loader_v3(&ID) | ||
} | ||
|
||
/// Get the key and account for the system program. | ||
pub fn keyed_account() -> (Pubkey, AccountSharedData) { | ||
(ID, account()) | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
solana program dump TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA ./src/elf/token.so -u mainnet-beta | ||
solana program dump TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb ./src/elf/token_2022.so -u mainnet-beta | ||
solana program dump ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL ./src/elf/associated_token.so -u mainnet-beta | ||
solana slot -u mainnet-beta | xargs -I {} sed -i '' 's|// Last updated at mainnet-beta slot height: .*|// Last updated at mainnet-beta slot height: {}|' ./src/lib.rs |