https://github.com/btc415/solana-transfer-program
https://github.com/btc415/solana-transfer-program
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/btc415/solana-transfer-program
- Owner: BTC415
- License: mit
- Created: 2025-01-19T07:53:17.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-01-20T08:51:15.000Z (over 1 year ago)
- Last Synced: 2025-01-29T15:19:10.413Z (over 1 year ago)
- Language: Rust
- Size: 28.3 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Solana Token Transfer Program
A secure and efficient Solana program for transferring SPL Token-2022 tokens between accounts.
## Overview
This program implements a token transfer mechanism using the Token-2022 program on Solana blockchain. It enables secure transfers of SPL tokens between token accounts while maintaining all necessary checks and balances.
## Features
- Supports Token-2022 standard
- Implements checked transfer operations
- Handles decimal precision automatically
- Built with Anchor framework
- Complete account validation
## Technical Details
### Program ID
```6GmLK8Qz9hBnCa89jcaVoX4b8nKCYc62p4hUbZ5XrsBL```
### Account Structure
The program requires the following accounts for execution:
- `from`: Signer account initiating the transfer
- `from_ata`: Source token account
- `to_ata`: Destination token account
- `mint`: Token mint account
- `token_program`: Token-2022 program
### Instructions
- `transfer_token2022`: Transfers specified amount of tokens between accounts
## Development
### Prerequisites
- Solana Tool Suite
- Anchor Framework
- Rust
### Building
```bash
anchor build
```
### Testing
```
anchor test
```
### Security
The program implements several security measures:
- Checked transfers to prevent decimal precision errors
- Signer verification
- Mutable account constraints
- Token account ownership validation
### License
MIT