Skip to Content
Tokio Upgrade Docs are released! 🎉
Tokio V3Smart Contract Development

Smart Contract Development

Splendor V3 (Tokio) is fully compatible with Ethereum-based smart contracts, supporting Solidity and other EVM (Ethereum Virtual Machine) development frameworks. This enables seamless migration of existing Ethereum projects and a familiar development experience for blockchain developers.

Solidity on Splendor

Solidity  is the most popular programming language for developing smart contracts. Splendor’s Tokio upgrade has extensive support for Solidity, with compatibility for:

  • Solidity versions up to ^0.8.20 (constantly updating)
  • All standard Solidity features and EVM opcodes
  • ERC token standards (ERC-20, ERC-721, ERC-1155)
  • Complex contract architectures (proxies, factories, etc.)
// Example of a basic ERC-20 token on Splendor // SPDX-License-Identifier: MIT pragma solidity ^0.8.20; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract SplendorToken is ERC20, Ownable { constructor() ERC20("Splendor Demo Token", "SDEMO") Ownable(msg.sender) { _mint(msg.sender, 1000000 * 10 ** decimals()); } function mint(address to, uint256 amount) public onlyOwner { _mint(to, amount); } }

Development Frameworks

Splendor fully supports the most popular Ethereum development frameworks:

Hardhat

Hardhat  is a powerful development environment that facilitates testing, debugging, and deploying smart contracts.

Configuration Example:

// hardhat.config.js require("@nomicfoundation/hardhat-toolbox"); /** @type import('hardhat/config').HardhatUserConfig */ module.exports = { solidity: "0.8.20", networks: { splendorMainnet: { url: "https://chain.splendor.org", chainId: 232, accounts: [process.env.PRIVATE_KEY] }, splendorTestnet: { url: "https://testchain.splendor.org", chainId: 231, accounts: [process.env.PRIVATE_KEY] } } };

Foundry

Foundry  is a blazing fast, portable, and modular toolkit for Ethereum application development.

Configuration Example:

# foundry.toml [profile.default] src = "src" out = "out" libs = ["lib"] solc_version = "0.8.20" [rpc_endpoints] splendor_mainnet = "https://chain.splendor.org" splendor_testnet = "https://testchain.splendor.org"

Truffle

Truffle  is a development environment, testing framework, and asset pipeline for blockchains.

Configuration Example:

// truffle-config.js module.exports = { networks: { splendorMainnet: { host: "chain.splendor.org", port: 443, network_id: 232, protocol: 'https' }, splendorTestnet: { host: "testchain.splendor.org", port: 443, network_id: 231, protocol: 'https' } }, compilers: { solc: { version: "0.8.20", } } };

Gas Optimization

Splendor’s transaction fees are significantly lower than Ethereum, but optimizing gas usage is still important for efficient contract operation:

  • Use appropriate data types (uint8 vs uint256)
  • Batch operations when possible
  • Minimize on-chain storage
  • Use libraries for common functions
  • Consider using upgradeable contracts for future improvements

Verification

Smart contract verification allows users to review your contract’s source code, increasing transparency and trust:

  1. Deploy your contract using your preferred framework
  2. Flatten your contract if it has dependencies (tools like hardhat-flattener can help)
  3. Once our block explorer is launched, you’ll be able to verify your contract directly on the explorer

Security Best Practices

When developing on Splendor, follow these security best practices:

  • Use the latest Solidity version compatible with our chain
  • Leverage audited libraries like OpenZeppelin
  • Implement robust access control
  • Use comprehensive testing (unit tests, fuzz testing)
  • Consider formal verification for critical contracts
  • Always handle errors properly
  • Validate all inputs, especially from external calls

Gas and Transaction Fees

Splendor’s gas fees are structured similarly to Ethereum but are substantially lower:

  • Gas price is measured in gwei (1 gwei = 10^9 wei)
  • Typical gas prices range from 1-5 gwei
  • Complex contract deployments may cost 0.01-0.05 SPL
  • Most transactions cost less than 0.001 SPL

This low-fee structure makes Splendor ideal for high-frequency dApps and NFT projects.

Resources