-
Notifications
You must be signed in to change notification settings - Fork 320
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
adpthegreat
committed
Nov 28, 2024
1 parent
f2b20c3
commit 4482c4d
Showing
19 changed files
with
1,816 additions
and
67 deletions.
There are no files selected for viewing
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,32 @@ | ||
[toolchain] | ||
|
||
[features] | ||
resolution = true | ||
skip-lint = false | ||
|
||
[programs.localnet] | ||
create_tokens = "6xsCBfTAhmH8JQ6cXN69cvWaiDUG723k76MDMjt9fRah" | ||
|
||
[registry] | ||
url = "https://api.apr.dev" | ||
|
||
[provider] | ||
cluster = "Localnet" | ||
wallet = "~/.config/solana/id.json" | ||
|
||
[scripts] | ||
test = "pnpm run ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.ts" | ||
|
||
[test] | ||
startup_wait = 5000 | ||
shutdown_wait = 2000 | ||
upgradeable = false | ||
|
||
[test.validator] | ||
bind_address = "0.0.0.0" | ||
url = "https://api.mainnet-beta.solana.com" | ||
ledger = ".anchor/test-ledger" | ||
rpc_port = 8899 | ||
|
||
[[test.validator.clone]] | ||
address = "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s" |
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
16 changes: 0 additions & 16 deletions
16
tokens/create-token/poseidon/create_tokens/programs/create_tokens/src/lib.rs
This file was deleted.
Oops, something went wrong.
16 changes: 0 additions & 16 deletions
16
tokens/create-token/poseidon/create_tokens/tests/create_tokens.ts
This file was deleted.
Oops, something went wrong.
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,76 @@ | ||
#!/bin/bash | ||
|
||
# Exit immediately if a command exits with a non-zero status | ||
set -e | ||
|
||
# Mainnet URL | ||
MAINNET_URL="https://api.mainnet-beta.solana.com" | ||
|
||
# Function to check Solana installation | ||
check_solana_installation() { | ||
if ! command -v solana &> /dev/null; then | ||
echo "Error: Solana CLI is not installed or not in PATH" | ||
return 1 | ||
fi | ||
|
||
if ! solana --version &> /dev/null; then | ||
echo "Error: Solana CLI is available but returned an error" | ||
return 1 | ||
fi | ||
|
||
return 0 | ||
} | ||
|
||
# Function to check and set Solana network to mainnet | ||
check_and_set_mainnet() { | ||
# Get current cluster | ||
current_cluster=$(solana config get | grep "RPC URL" | awk '{print $3}') | ||
|
||
# If not on mainnet, switch to mainnet | ||
if [[ "$current_cluster" != "$MAINNET_URL" ]]; then | ||
echo "Switching Solana network to mainnet..." | ||
solana config set --url "$MAINNET_URL" | ||
fi | ||
} | ||
|
||
# Function to check if Solana test validator is running | ||
check_test_validator() { | ||
# Check if solana-test-validator process is running | ||
if ! pgrep -f "solana-test-validator" &> /dev/null; then | ||
echo "Error: Solana test validator is not running." | ||
echo "Please start Solana test validator in a new terminal in this directory:" | ||
echo "cd $(pwd) && solana-test-validator" | ||
return 1 | ||
fi | ||
|
||
return 0 | ||
} | ||
|
||
# Main script | ||
main() { | ||
# Check if Solana is installed | ||
if ! check_solana_installation; then | ||
echo "Solana check failed" | ||
exit 1 | ||
fi | ||
|
||
# Check and set to mainnet if needed | ||
check_and_set_mainnet | ||
|
||
# Check if test validator is running | ||
if ! check_test_validator; then | ||
exit 1 | ||
fi | ||
|
||
# Dump Solana program | ||
if ! solana program dump metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s mpl_token_metadata.so; then | ||
echo "Failed to dump Solana program" | ||
exit 1 | ||
fi | ||
|
||
echo "Solana program dumped successfully" | ||
} | ||
|
||
# Run the main function | ||
main | ||
|
File renamed without changes.
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
Oops, something went wrong.