Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Example: Fungible Token (FT)

This is a fork of fungible-token-example that adapts it to this library's #[contract] attribute.

Example implementation of a Fungible Token contract which uses contract-standards and simulation tests.

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.

Building

To build run:

./build.sh

Testing

To test run:

cargo test --all
cargo run --example heavy

Documentation

To see the doc:

cargo doc --no-deps --open -p contract-interface -p contract-standards -p fungible-token -p defi

Then on the bottom-left you can choose the package.

Changelog

1.0.0