SEP-0041 Token
Exposes the interface of the SEP-0041 Token alongside a mock token contract.
SEP-0041 Definition: https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0041.md
Safety
This is experimental software and is provided on an "as is" and "as available" basis.
We do not give any warranties and will not be liable for any loss incurred through any use of this codebase.
Getting Started
Add the package to your Cargo.toml:
[]
= "<desired version>"
You can optionally include the testutils feature in your dev-dependencies to deploy a mock version of the sep-41-token for testing:
[]
= { = "<desired version>", = ["testutils"] }
Client and Traits
This package exposes 3 different token clients based on your usage.
TokenClientis theSEP-0041standard and is derived from the traitTokenStellarAssetClientexposes the functions implemented by the Stellar Asset Contract and is derived from the traitStellarAssetExtension
Mock Token
This package exposes an example Soroban token implementation of the SEP-0041 standard that can be used to test protocol interactions with Soroban tokens. This is important to test as interacting with Soroban tokens has a much larger cost impact than interacting with the Stellar Asset Contract.
A WASM version of the contract can be deployed as follows:
use ;
use ;
let env = default;
let admin = generate;
let token_id = env.register_contract_wasm;
let token_client = new;
token_client.initialize;