Published in


Tozex Smart Contract Library


The development of a smart contract code requires deep expertise in computer science, cryptography, and programming languages. The development must be accurate and optimized because each piece of code has an impact on cost execution and security. Rigorous testing and prototyping must be done before deploying a tradable token contract for crowdfunding or distribution.

Tozex library is open source, allowing anyone to check, audit, and contribute to our development. The first programming language of our library is based on Solidity to allow for deployment first on the Ethereum (ETH), Ethereum Classic (ETC), and RootStock (RSK) blockchain networks. The second programming language will be Java to allow portability for our library on the Credits blockchain network.

Deploying a smart contract (STO, ICO, or BRO) through our interface is very simple. The user can use his existing wallet (hardware or software wallet) through the Tozex platform to deploy the selected contract within the blockchain network of his choice without compromising his private key.

Basic Token Contract (TO)

The platform requires the parameters of token name, symbol, total supply, and decimal to generate an ERC20 tradable token contract. The user grants permission to proceed to deployment by signing the transaction. After that, the contract is deployed on the blockchain network, and the platform returns all the information (status, ABI, TXID, etc.) as illustrated in Figure 1.

Figure 1. ERC20 tradable token contract.

Tokens will never achieve broad adoption until their functionality extends beyond the mere ability to facilitate trades. While multiple smart contract standards have been proposed to foster increased liquidity and enable on-chain security ownership, limited progress has been made in making these tokens fully functional. We have developed a framework that extends the security standards by enabling users to make dividend or interest payments, conduct shareholder votes, redeem or repurchase outstanding securities, and restrict transfers.

Once the smart contract is deployed, the user can interact with it directly without the need to use the TOZEX platform. Indeed, the user remains the owner of the deployed smart contract and can call external functions, such as “TransferOwnership” to transfer the ownership, “Transfer” to transfer the minted tokens, or any other function illustrated in Figures 2–9:

Figure 2. Transfer function.
Figure 3. Transfer ownership function.
Figure 4. Transfer from function.
Figure 5. Allowance function.
Figure 6. Approve function.
Figure 7. Balance of function.
Figure 8. Decrease approval function.
Figure 9. Increase approval function

Crowdfunding Contract (ICO)

Deploying a crowdfunding tradable token contract is similar to deploying a basic contract, but it requires more parameters because the crowdfunding mechanism is coded with presale and public-sale conditions, bringing more transparency for all stakeholders.

The platform requires all the basic ERC20 parameters (token name, symbol, total supply, and decimal) and specific crowdfunding parameters (amount to raise, bonus, period, addresses [team, founders, etc.], rate, etc.). Dedicated documentation will be provided in the future.

Figure 10. Crowdfunding contract (ICO).

Once deployed, the user can interact with the contract directly without the obligation to use the TOZEX platform. Indeed, the user remains the owner of the deployed smart contract and can call external functions, such as “startPresale” to start the presale phase of his crowdfunding campaign or “stopPresale” to stop it.

Our crowdfunding smart contract is scalable in terms of functionality, allowing users to define their crowdfunding strategies without technical difficulties implementing it.

The TOZEX platform also offers to manage all smart contract interactions with a friendly interface and without compromising the security of the entire process.

Figure 11. Start presale function.
Figure 12. Presale purchase function.
Figure 13. Crowdsale purchase function.
Figure 14. Stop presale function.
Figure 15. Start ICO function.
Figure 16. Stop ICO function.
Figure 17. Refund function.
Figure 18. Mint token function.
Figure 19. Forward funds function.
Figure 20. Withdraw function.

See more at



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store


Tozex is a crypto asset platform which allows to manage token sale, investment and trading in the same ecosystem. #blockchain #token #crypto #eth