solana program dump -u m metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s token_metadata_program.so
# This will reset the test-ledger
solana-test-validator --bpf-program metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s token_metadata_program.so --reset
spl-token create-token
spl-token create-account <TOKEN_ADDRESS>
spl-token mint <TOKEN_ADDRESS> <AMOUNT>
We use this token for following tests.
just solana
Uploaded NFT metadata on Arweave:
- Chat: https://arweave.net/6SOGM007lgaeBH1SOJ-Ifm9eUUNz4kCdRqVJe-yl9_g
- Raffle: https://arweave.net/hTlRRw2tZ2q_RpklixjRIzrR3PgAChBujAKzp6wknHs
just publish Chat https://arweave.net/6SOGM007lgaeBH1SOJ-Ifm9eUUNz4kCdRqVJe-yl9_g
just publish Raffle https://arweave.net/hTlRRw2tZ2q_RpklixjRIzrR3PgAChBujAKzp6wknHs
NFT addresses will be returned when upload succeed. Later we will use this NFT token address as bundle address.
just create-reg
To create games, a spec file in JSON is required. Replace the addresses with what you have, and save it as spec.json
.
{
"title": "<GAME TITLE>",
"reg_addr": "<REPLACE WITH THE REGISTRATION ADDRESS>",
"bundle_addr": "<REPLACE WITH THE BUNDLE ADDRESS>",
"token_addr": "<REPLACE WITH THE TOKEN ADDRESS>",
"max_players": 10,
"min_deposit": 10,
"max_deposit": 20,
"data": []
}
Create the game account with command line tool.
just create-game spec.json
Game account address will be returned.
solana-keygen new -o transactor.json
# Transfer some SOL to this new account
solana transfer --allow-unfunded-recipient <TRANSACTOR PUBKEY> 2
[transactor]
port = 12003
endpoint = "ws://localhost:12003"
chain = "solana"
address = "<REPLACE WITH GENERATED KEYPAIR'S PUBLIC KEY>"
reg_addresses = ["<REPLACE WITH THE REGISTRATION ADDRESS>"]
[solana]
keyfile = /path/to/transactor.json
rpc = "http://localhost:8899"
just dev-reg-transactor /path/to/transactor.toml
just dev-transactor /path/to/transactor.toml