Developer Guide
Tokens, and Token Factory
Tokens
The Tokens, and Token Factory developer guide will describe the following functions:
- Create a Token
- Mint revocable compliance tokens
- Transfer revocable compliance tokens
- Set Compliance for revocable compliance tokens
- 1
Mint revocable compliance tokens
Use IERC20RevocableCompliance interface's mint function to mint tokens.
function mint(address to, uint256 tokens) external;
Parameters
to
Address to mint tokens.
tokens
Number of tokens to mint.
- 2
Transfer revocable compliance tokens
Use IERC20RevocableCompliance interface's transfer function to transfer tokens.
function transfer(address to, uint tokens) external returns (bool success);
Parameters
to
Address to mint tokens.
tokens
Number of tokens to mint.
- 3
Set Compliance for revocable compliance tokens
Use IERC20RevocableCompliance interface's setCompliance function to set compliance.
function setCompliance(address context) external;
Parameters
context
Whitelist or whitelist compliance context address.
Token Factory
Create a Token
Use ITokensFactorySetters interface's createTokenWithOwner function to create a new Token.
To retrieve the token address; list the transaction receipt and collect the TokenCreated event.
function createTokenWithOwner(
string calldata name,
string calldata symbol,
uint8 decimals,
uint totalSupply,
bytes32 tokenStandard,
address tokenOwner,
string memory issuerName
) external returns (address);
Note: Address returned will be the token smart contract address.
Parameters
name
Name of the token eg. "Google Inc."
symbol
Symbol of the token eg. "MMF"
decimals
Number of decimals eg. 18
totalSupply
Total supply of the token eg. 10000
tokenStandard
Token strategy eg. "ERC-20-Rev-Compliance-Strategy"
tokenOwner
Address of the token owner.
issuerName
Name of the issuer. eg. "Google"
Contact our sales team for more information
View answers to the most common questions about our platforms and services