Basic Contract

In general you can choose almost any development environment you wish as they all have their own benefits. A few of the most used environments are shown below. Using the official Ethereum documentation, you can change the network to Velocity and deploy a hello world contract.

Hardhat Deployment​

Following the Official Hardhat documentation, also how to configure Hardhat to Velocity.

  • For Velocity network Config, you have to export an object from hardhat.config.js

  • The networks config field an optional object where network names map to their configuration.

  • There are two kinds of networks in Hardhat: JSON-RPC based networks, and the built-in Hardhat Network.

  • You can customize which network is used by default when running Hardhat by setting the config's defaultNetwork field. If you omit this config, its default value is "hardhat".

Truffle Deployment​

This Tutorial on Kauri shows how to deploy a DApp to the test network. It can be adapted to the Velocity network with a few minor tweaks.

  1. For Velocity , edit the truffle.js file to the following:

require('dotenv').config();
const HDWalletProvider = require('truffle-hdwallet-provider');

module.exports = {
// See <http://truffleframework.com/docs/advanced/configuration>
// for more about customizing your Truffle configuration!
    networks: {
        velocity: {
            provider: function() {
                    return new HDWalletProvider(
                process.env.MNEMONIC,
                "https://rpc.velocitybtc.com")
            },
            network_id: **TBD**,
            gas: 1000000,
            gasPrice: 1000000000
        },
        development: {
            host: "127.0.0.1",
            port: 8545,
            network_id: "*" // Match any network id
        }
    }
};
  1. Run the Truffle deployment to Velocity .

Last updated