Releases: solana-labs/solana-program-library
SPL Stake Pool - v0.1.0
Introducing SPL Stake Pools
A program for pooling together SOL to be staked by an off-chain agent running a Delegation bot which redistributes the stakes across the network and tries to maximize censorship resistance and rewards.
Please see additional documentation and CLI use-cases at: https://spl.solana.com/stake-pool
SPL Token Swap - v2.1.0
NOTE: The program built from this tag is NOT deployed to mainnet at SwaPpA9LAaLfeLi3a68M4DjnLqgtticKg6CnyNwgAC8
Changes
- Update the Solana SDK to 1.6
- Use spl-math library for
PreciseNumber
calculations
SPL Math - v0.1.0
Introducing SPL Math!
The SPL Math library contains mathematical helpers to be used in Solana on-chain programs. Currently it contains:
- support for
U256
andU192
types through the uint library - BPF instruction efficient
sqrt
calculation on integer types PreciseNumber
to mimic floating point operations using an unsigned int as data storage
@solana/spl-token v0.1.3
Fixes
Use Connection
's configured commitment
value for transaction submissions, instead of hard-coded recent
.
@solana/spl-token v0.1.2
Fixes
Resolved Buffer
incompatibility issues through an @solana/web3.js
dependency upgrade. The following errors should now be resolved:
Unhandled Rejection (TypeError): Blob.encode[programId] requires (length 32) Buffer as src
@solana/spl-token v0.1.1
Associated Token Program support
- Added
Token.createAssociatedTokenAccountInstruction
for building an instruction to create a new associated token account - Added helper method
getOrCreateAssociatedAccountInfo
for creating associated token accounts on behalf of a wallet address if it doesn't exist yet - Added helper method
getAssociatedTokenAddress
for finding the associated token address for a wallet address, token pair.
@solana/spl-token v0.1.0
- Fix type definitions
- Export browser-compatible modules
SPL Token - v3.1.0
Changes
- Normalize validation of self-transfers with that of two-party transfers
- Add
InitializeAccount2
instruction with improved CPI ergonomics
@solana/spl-token-swap - v0.1.0
Changes
- Make all layouts compatible with SPL Token Swap v2.0.0
- Specify
CurveType
on pool initialization:ConstantProduct
,ConstantPrice
, orOffset
- New instructions
depositSingleTokenTypeExactAmountIn
: deposit one token type in exchange for pool tokens, instead of both typeswithdrawSingleTokenTypeExactAmountOut
: withdraw one token type in exchange for pool tokens, instead of both types
SPL Token Swap - v2.0.0
Changes
- Add multiple curve possibilities on top of the traditional constant product / Uniswap curve
- constant price: price fixed at pool creation
- constant product with offset: adds a faked amount of liquidity on one side of the pool, useful for new coin offerings
- Add ability to deposit and withdraw a single token type, instead of both at once
- Improve calculations
Build
The token swap program contains hard-coded constraints on fees and fee account owners. For this build, available at program id SwaPpA9LAaLfeLi3a68M4DjnLqgtticKg6CnyNwgAC8
on devnet, testnet, and mainnet-beta, the fee account for any pool must be owned by HfoTxFR1Tm6kGmWgYWD6J7YHVy1UwqSULUGVLXkJqaKN
.
Run the build command from token-swap/program
:
SWAP_PROGRAM_OWNER_FEE_ADDRESS=HfoTxFR1Tm6kGmWgYWD6J7YHVy1UwqSULUGVLXkJqaKN cargo build-bpf --features=production