Example implementation of a Fungible Token contract which uses near-contract-standards.
NOTES:
- The maximum balance value is limited by U128 (2**128 - 1).
- JSON calls should pass U128 as a base-10 string. E.g. "100".
- This does not include escrow functionality, as
ft_transfer_call
provides a superior approach. An escrow system can, of course, be added as a separate contract.
To build run:
./build.sh
To test run:
cargo test --package fungible-token -- --nocapture
- Switching
UnorderedMap
toLookupMap
. It makes it cheaper and faster due to decreased storage access.