Ante
Ante v0.5
Ante v0.5
  • Welcome to Ante v0.5
  • How Ante works
  • Why use Ante?
    • How is Ante different?
    • What does Ante cost to use?
  • What's in Ante v0.5?
  • Using the Ante App
    • Navigating Ante
    • How to Stake
    • How to Challenge & Check Tests
    • The Decentralized Trust Score
      • Decentralized Trust Tiers
    • Deposit Limits
  • For Developers
    • Writing an Ante Test
      • Coming up with an invariant
      • Explaining IAnteTest.sol and AnteTest.sol
      • Ante Test Examples
      • Writing and Testing an Ante Test
      • Test an Ante Test Offline
      • Adding an Ante Test to Ante Github
      • Development FAQs
    • Integrating Ante
      • Integrate Ante using React
      • Integrate Ante using HTML
    • Deploying an Ante Test
      • Deploy an Ante Test
      • Create an Ante Pool
      • Verifying an Ante Pool
    • Contracts
  • About Ante
    • FAQs
    • Glossary
    • Security
    • Possible Future Work
    • Changelog
    • Terms of Service
Powered by GitBook
On this page
  • Ante's deploy script using Hardhat
  • Setup
  • Deployment
  • Verification
  • Other deployment solutions
  • After deploying your Ante Test
  1. For Developers
  2. Deploying an Ante Test

Deploy an Ante Test

Deploy a completed Ante Test to Mainnet

PreviousDeploying an Ante TestNextCreate an Ante Pool

Last updated 2 years ago

We've provided several methods to deploy your own Ante Test below, starting with our current preferred method using Hardhat.

As easier methods become available in the future, we'll link them here when we find them.

Ante's deploy script using Hardhat

Our team currently prefers to use to deploy our smart contracts. Assuming that the Ante Test has already been written, we can easily deploy an Ante Test to a network of our choosing using our prepared script scripts/deploy_test.ts in the .

Setup

First, make sure that the .env file is updated with the appropriate keys as per the readme section:

Second, in scripts/deploy_test.ts, update the testName (Line 8) and arguments (Line 10) for the Ante Test you want to deploy.

import hre from 'hardhat';
import chalk from 'chalk';

const main = async () => {
  const [deployer] = await hre.ethers.getSigners();

  // name of the contract for Ante Test
  const testName = 'AnteEthDevRugTest';
  // array of constructor arguments for Ante Test
  const args = ['0xde0b295669a9fd93d5f28d9ec85e40f4cb697bae'] as const;
// script/deploy_test.ts continues

Deployment

Once these two files have been properly set up, run either of the commands below to deploy the Ante Test:

  • npm run deploy-test -- --network [NETWORK_NAME]

    • npm run deploy-test is a user-defined command that we've set up to run the npx hardhat command below

  • npx hardhat run scripts/deploy_test.ts --network [NETWORK_NAME]

Verification

Right now, your Ante Test is only visible on Etherscan in bytecode form. In order to provide source code transparency for end users, you can verify the contract on Etherscan. Hardhat provides a plugin for doing this which you can use following the steps below:

First, make sure that the .env file is updated with your Etherscan key.

Next, run the command:

  • npx hardhat verify --network [NETWORK_NAME] [DEPLOYED_ANTE_TEST_ADDRESS] "Constructor argument 1"

If your Ante Test takes a more complex set of arguments, you can also use an arguments.js file and run the modified command:

  • npx hardhat verify --network [NETWORK_NAME] --constructor-args [ARGUMENTS_FILE] [DEPLOYED_ANTE_TEST_ADDRESS]

Other deployment solutions

Additionally, there are other solutions that can be explored to deploy the Ante Test:

After deploying your Ante Test

Make sure you record and remember the address that your Ante Test is deployed to! It will be needed to generate the Ante Pool that end users will interact with.

The documentation provides additional information on configuration options for the verify command.

The Ethereum Foundation has outlined several methods for (and in this case, an Ante Test).

The main points for deployment would be needing access to an Ethereum node, either having your own node, access to a public node, or using services like or .

Alchemy:

Infura:

Remix:

Once you've deployed your Ante Test, you can then (note: this will cost gas as well) to allow users to stake/challenge your test.

Hardhat
Ante Community Github
Configure the app
Hardhat-Etherscan plugin
deploying smart contracts
Alchemy
Infura
Hello World Smart Contract
Deploying Smart Contracts
Deploy & Run
create an Ante Pool