PlatON
Truffle documentation
latest
  • Truffle QuickStart
    • Creating a project
    • Exploring the project
    • Testing
    • Compiling
    • Migrating
    • Interacting with the contract
    • Continue learning

Getting-started

  • Installation
    • Requirements
  • Creating a project
  • Compiling Contracts
    • Location
    • Command
    • Build artifacts
    • Dependencies
      • Importing dependencies via file name
  • Running migrations
    • Command for solidity
    • Migration files
      • artifacts.require()
      • module.exports
    • Initial migration
    • Deployer
    • Network considerations
    • Available accounts
    • Deployer API
      • deployer.deploy(contract, args…, options)
      • deployer.link(library, destinations)
      • deployer.then(function() {…})
    • Command for wasm
  • Interacting with your contracts
    • Introduction
    • Reading and writing data
      • Transactions
      • Calls
    • Introducing abstractions
    • Executing contract functions
      • Making a transaction
      • Making a call
      • Processing transaction results
      • Catching events
      • Add a new contract to the network
      • Use a contract at a specific address
      • Sending lat to a contract
    • Special methods on Truffle contract objects
    • Further reading
  • Using platon-truffle console
    • Why console?
    • Commands
      • Console
    • Features
      • Commands available
  • Writing external scripts
    • Command
    • File structure

Testing

  • Testing your contracts
    • Framework
    • Location
    • Command
  • Writing solidity contract tests in javascript
    • Use contract() instead of describe()
    • Use contract abstractions within your tests
    • Using artifacts.require()
    • Using web3
    • Examples
      • Using .then
      • Using async/await
    • Specifying tests
    • TypeScript File Support
  • Writing wasm contract tests in javascript
    • Use contract() instead of describe()
    • Using global contract object
    • Using web3
    • Examples
    • Specifying contract
  • Writing test in solidity
    • Example
    • Test structure
      • Assertions
      • Deployed addresses
      • Test contract names
      • Test function names
      • before / after hooks
    • Advanced features
      • Testing for exceptions
      • Testing lat transactions

Advanced

  • Networks and APP deployment
    • Configuration
    • Specifying a network
    • Specifying a wasm contract
    • Build artifacts
    • Application deployment
  • Build Processes
    • Running an external command
    • Providing a custom function
    • Creating a custom module
    • Bootstrapping your application

Reference

  • Configuration
    • Location
    • General options
      • build
      • networks
        • Providers
      • contracts_directory
      • contracts_build_directory
      • migrations_directory
      • mocha
    • Compiler configuration
      • solc
      • external compilers
      • wasm
  • Contract abstractions
    • Usage
  • API
    • Contract Abstraction API
      • MyContract.new([arg1, arg2, ...], [tx params])
      • MyContract.at(address)
      • MyContract.deployed()
      • MyContract.link(instance)
      • MyContract.link(name, address)
      • MyContract.link(object)
      • MyContract.networks()
      • MyContract.setProvider(provider)
      • MyContract.setNetwork(network_id)
      • MyContract.hasNetwork(network_id)
      • MyContract.defaults([new_defaults])
      • MyContract.clone(network_id)
      • MyContract.numberFormat = number_type
      • MyContract.timeout(block_timeout)
      • MyContract.autoGas = <boolean>
      • MyContract.gasMultiplier(gas_multiplier)
    • Contract Instance API
      • Making a transaction via a contract function
      • Explicitly making a call instead of a transaction
      • Calling getters
      • Processing transaction results
      • Sending Lat / Triggering the fallback function
      • Estimating gas usage
  • Truffle commands
    • Usage
    • Available commands
      • compile
      • config
      • console
      • create
      • deploy
      • exec
      • help
      • init
      • migrate
      • networks
      • opcode
      • test
      • version

Related documents

  • Solidity
  • js sdk
  • Truffle documentation
    • Docs »
    • Search
    • Edit on GitHub


    © Copyright 2019, PlatON Revision dfaed381.

    Built with Sphinx using a theme provided by Read the Docs.