Developer Portal
  • ThunderCore.com
  • Developers
  • Support Center
  • 🌐 简体中文

›Tools

Develop on ThunderCore

  • Deploy Your Own Game in Minutes
  • Migrate from Ethereum
  • Deploy Your Own ERC-20
  • Submit guideline for DApp
  • Token Listing
  • Developer Jumpstart Program

Tools

  • Random Number Generator
  • Develop with Truffle
  • Get More Users with Referral Library

Frequently Asked Questions

  • General Information
  • Technical FAQ

Develop with Truffle

Overview

Truffle is one of the most popular development tools in the Ethereum community. ThunderCore is fast and EVM-compatible, so developers can use Ethereum development tools, including Solidity and Truffle, to develop DApps on ThunderCore. We have prepared a Truffle box: thunder-box, for developers. This tutorial will help you to use our thunder box to quickly set up your dev environment.

Get Started

First, ensure that you are in a new and empty directory and that you have nodejs in your environment.

  1. Run the unbox command via npx and skip to step 3.
npx truffle unbox thundercore/thunder-box
  1. Alternatively, you can install Truffle globally and run the unbox command.
npm install -g truffle
truffle unbox thundercore/thunder-box
  1. Run the development console.
truffle develop
  1. Compile and migrate the smart contracts. Note that inside the development console we don't preface commands with truffle.
compile
migrate
  1. Alternatively, you can run the following to compile and migrate the smart contracts.
npm run compile
npm run migrate
  1. To clean up previously built contracts:
npm clean

Develop on Thunder Testnet and Mainnet

  1. Get Thunder Tokens. Please follow this instruction to get your tokens.

  2. To set up the control of accounts for deployment do ONE of the following:

    1. Write your 12-word mnemonic (seed phrase) to a file named .mnemonic
    2. Export your account private keys, one per line, to a file named .private-keys
# If you use private keys
mv .private-keys.template .private-keys

# in .private-keys file, copy your private keys
e59cb5e369b65eee650f90f3280cbe8039db81335943ac7a88df5f4df...
d92a96fa691a7c31b2e2891de05cacc85d562b128afa6bb8f7108aac7...

# If you prefer mnemonic
mv .mnemonic.template .mnemonic

# In .mnemonic file, copy your mnemonic, seperated by spaces
dog cat apple bird ...
  1. Compile and migrate your contract for testnet and mainnet
# Compile to testnet
npm run compile:testnet
# is equal to 
truffle compile --network thunder-testnet

# ---

# Compile to mainnet
npm run compile:mainnet
# is equal to 
truffle compile --network thunder-mainnet

# ---

# Migrate to testnet
npm run migrate:testnet
# is equal to 
truffle migrate --network thunder-testnet

# ---

# Migrate to mainnet
npm run migrate:mainnet
# is equal to 
truffle migrate --network thunder-mainnet

Reference

  • Thunder Box Repo
← Random Number GeneratorGet More Users with Referral Library →
  • Overview
  • Get Started
  • Develop on Thunder Testnet and Mainnet
  • Reference
Developer Portal
Resources
FAQStack OverflowGet in Touch on DiscordEmail Us
Community
icon_twitter_normalCreated with Sketch.icon_medium_normalCreated with Sketch.
© ThunderCore Ltd. All Rights Reserved.