- Overview
- Developer Guide
- Contract Deployment Process
- Unit Tests
- Deployed Contract Addresses
- Interacting with TokenIO Contracts
- Links to Smart Contract NatSpec Documentation
- Links to Smart Contract Source Code
- Smart Contract Use Cases
- Audit Report
The Token Smart Money (TSM) System allows for integration with several payment services and platforms. This document covers the Ethereum smart contracts architecture, provides a discussion of TSM services and fees, and discusses associated Ethereum transaction costs.
The purpose of the TSM smart contracts are to provide depository tokens that can be backed 1:1 with fiat currency held by a currency issuer, bank, or other authorized financial institution.
Token fiat currency tokens are ERC20 compliant and have an extensible storage contract to allow for future interoperability with third party systems, and to provide various financial services (e.g. currency exchange, escrow, etc.) through smart contract interfaces.
The TSM system is designed to be peer-to-peer (p2p) and business-to-business (b2b), with limited involvement of third party intermediaries.
The TSM Ethereum contracts will be deployed on the Ethereum main network. Consequentially, to interact with the TSM system on Ethereum, there is a cost that is paid to the network maintainers (i.e. transaction miners). This cost can either be paid directly by the participants in the system (institutions and end-users alike) or the cost can be paid through a proxied signing service that Token will charge a fee for.
The deployment process is different for the development and production releases of the smart contracts.
When developing the smart contracts, this repository uses truffle develop
(npm run dev
) local network to deploy, test, and interact with smart contracts.
Truffle has a migration process, truffle migrate
, which deploys contract sequences using a migration script, located in the /migrations
folder in the root of this repository.
The default script, /migrations/1_initial_migration.js
, is used internally by Truffle to keep track of the contracts deployed to the network using a Migrations.sol
contract. By default, this file should not be altered.
The remaining scripts in the /migrations
folder are used to deploy the smart contracts in a sequence. The deployment sequence of these contracts is important!
Running the command: (console)> migrate --reset
will deploy the scripts in the sequence corresponding to the pre-fixed number. However, if you need to deploy a specific smart contract, (console)> migrate -f #
is available1 where #
is the number of the script to be deployed.
(E.g. (console)> migrate -f 2
is to deploy 2_deploy_contracts.js
)
In the Truffle console, run all tests:
(console)> test
Alternatively, run a single test:
(console)> test ./test/<name_of_contract>.js
The following contracts have been deployed at the associated addresses corresponding to the Ethereum network deployed on.
Ethereum Main Network:
- TokenIOStorage.sol: 0xe8f0b03249a078cbb1cc5b58addb6c289952a036
- TokenIOAuthority.sol: 0x4cd9ce52daef9234897d7cba73857347c6b4d11b
- TokenIOCurrencyAuthority.sol: 0x768bcf023aa517054a0349939069802a006ce350
- TokenIOFeeContract.sol: 0x0149e0aaea12ed0fa6ca63175051d17fd2e5afae
- TokenIOFX.sol: 0x741090779fb989fcf39468cc3719de45666f3cc7
- TokenIOERC20.sol (USDx): 0x40d378cb3a6ae236e504482e31af36edce336daa
TokenIO provides mobile and web client applications to interact with smart contracts.
- Web Application
- Mobile Application (iOS / Android)
Alternatively, if you're a software developer, TokenIO contracts can be interacted with using the TokenIO JS Smart Contract SDK.
- Ownable
- SafeMath
- TokenIOAuthority
- TokenIOCurrencyAuthority
- TokenIOERC20
- TokenIOFeeContract
- TokenIOFX
- TokenIOLib
- TokenIONameSpace
- TokenIOStorage
- TokenIOMerchant
- Ownable
- SafeMath
- TokenIOAuthority
- TokenIOCurrencyAuthority
- TokenIOERC20
- TokenIOFeeContract
- TokenIOFX
- TokenIOLib
- TokenIONameSpace
- TokenIOStorage
- TokenIOMerchant
VERSION: v0.1.3 DISCLOSURE: This document is intended for notes, documentation, and discussion for how the source code is written at a certain software version. Token, Inc. do not guarantee the correctness of this software or the accuracy of this documentation and is not held liable for any misinterpretation, unintentional use or misuse of the software. Token, Inc. will actively identify and resolve to the best ability, within reasonable limit, any known software limitations, bugs, or other vulnerabilities that might impact this software.