Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tomvictor/solana-blockchain-contracts
Solana contracts
https://github.com/tomvictor/solana-blockchain-contracts
Last synced: 26 days ago
JSON representation
Solana contracts
- Host: GitHub
- URL: https://github.com/tomvictor/solana-blockchain-contracts
- Owner: tomvictor
- License: mit
- Created: 2024-07-22T09:56:24.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-07-31T21:11:31.000Z (3 months ago)
- Last Synced: 2024-08-01T01:13:23.248Z (3 months ago)
- Language: Rust
- Homepage:
- Size: 81.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# dApp on Solana
Run validator
```bash
solana-test-validator
```Build the contract
```bash
anchor build
```Deploy the contract
```bash
anchor deploy
```
Note: If the deployment fails, topup the size using ``solana program extend``Generate key-pair string
```bash
cargo run -p keygen
```
paste it in the CLIENT_KEY_STR in apps/initialize and apps/incrementInitialize counter
```bash
cargo run -p initialize
```Initialize counter
```bash
cargo run -p increment
```Get config
```bash
solana config get
```Configure localhost
```bash
solana config set --url localhost
```Key Generation
```bash
solana-keygen new
```Airdrop SOL
```bash
solana airdrop 2
```Balance check
```bash
solana balance
```Address
```bash
solana address
```Deploy Rust Program
```bash
solana program deploy ./target/deploy/hello_world.so
```Show programs
```bash
solana program show --programs
```Show account info
```bash
solana account account-id
```Anchor test
```bash
anchor test --skip-local-validator
```Anchor key list
```bash
anchor keys list
```More bytes to the contract using ``solana program extend``
```bash
solana program extend AcfG5w5GjU95Ho6imbra9xBW5gvM5ujNdKN7PjNvtkfe 30000 --url "http://localhost:8899" -k ~/.config/solana/id.json
```