The Finance package provides simple token transfer functionality between Gen6 accounts.
Overview
Purpose: Transfer GSX between accounts.
Location: src/packages/finance/
Note: Finance uses only blockchain extrinsics.
Blockchain Extrinsic
Transfer Tokens (Keep Alive)
Transfer tokens while ensuring the sender's account remains above the existential deposit.
Extrinsic: api.tx.balances.transferKeepAlive()
Parameters:
recipientAddress: SS58-355 encoded Gen6 address
amount: BN (BigNumber) - Amount in smallest unit
Important: transferKeepAlive ensures the sender account doesn't get reaped (deleted) by maintaining the minimum balance required to keep an account alive.
Implementation:
Usage:
Balance Queries
Get Account Balance
Blockchain Query: api.query.system.account()
Parameters:
address: SS58-355 encoded address
Implementation:
Response:
Usage:
Existential Deposit
The existential deposit is the minimum balance required to keep an account active on the blockchain.
Why It Matters
Accounts below the existential deposit are reaped (deleted)
All funds in a reaped account are lost
transferKeepAlive prevents this by rejecting transfers that would drop the sender below the existential deposit