Pull a smart contract from mainnet onto your local chain.

Overview

hardhat-copy

hardhat-copy helps you import an Ethereum mainnet smart contract onto your local Hardhat node, enabling you to rapidly experiment with production smart contracts from the safety of your local environment.

๐Ÿš€ getting started

Make sure you have downloaded the Node.js library from npm and have also installed Hardhat. Then just use npx hardhat-copy to generate a project which clones and deploys your desired mainnet smart contract onto your local branch:

# Try it!
CONTRACT_ADDRESS=0xef0182dc0574cd5874494a120750fd222fdb909a npx hardhat-copy

This will create a hardhat project in your working directory, i.e.:

HardhatCopy_0xef0182dc0574cd5874494a120750fd222fdb909a/

If you cd into this project, you can execute the included Mocha unit tests using the HRE:

npx hardhat test

By default, this simply deploys the specified smart contract onto your local environment; the included unit tests can then be extended for your own experimentation!

โœŒ๏ธ license

MIT

You might also like...

Blockchain, Smart Contract, Ganache, Remix, Web3, Solidity, Java Script, MQTT, ESP32, RFID, DHT11,

Blockchain, Smart Contract, Ganache, Remix, Web3, Solidity, Java Script, MQTT, ESP32, RFID, DHT11,

May 24, 2022

SmartBuilder: A Block-based Visual Programming Framework for Smart Contract Development

SmartBuilder: A Block-based Visual Programming Framework for Smart Contract Development

SmartBuilder A Block-based Visual Programming Framework for Smart Contract Development Technology stack used SmartBuilder Framework - Google Blockly A

Mar 29, 2022

Ethereum smart contract gas cost waste pattern detection and patching tool

Ethereum smart contract gas cost waste pattern detection and patching tool

Ethereum smart contract gas cost waste pattern detection and patching tool

Mar 23, 2022

A simple multilateral escrow smart contract for ETH and ERC-20 tokens governed by Cobie.

A simple multilateral escrow smart contract for ETH and ERC-20 tokens governed by Cobie.

Multilateral Escrow Smart Contract Governed by Cobie Test Deployments Cobie's address: 0x4Cbe68d825d21cB4978F56815613eeD06Cf30152 Rinkeby: 0xFfE420602

Dec 15, 2022

This repository contains the Solidity smart contract of Enso, a detailed list of features and deployment instructions.

Enso NFT Smart Contract This repository contains the Solidity smart contract of Enso, a detailed list of features and deployment instructions. We stro

Apr 24, 2022

This is a development platform to quickly generate, develop & deploy smart contract based applications on StarkNet.

This is a development platform to quickly generate, develop & deploy smart contract based applications on StarkNet.

generator-starknet This is a development platform to quickly generate, develop, & deploy smart contract based apps on StarkNet. Installation First, in

Nov 18, 2022

๐Ÿ”†๐Ÿ”Ž๐Ÿ‘€ Smart Contract Storage Viewer, DataType Guesser, Toolbox & Transaction Decoder

๐Ÿ”†๐Ÿ”Ž๐Ÿ‘€  Smart Contract Storage Viewer, DataType Guesser, Toolbox & Transaction Decoder

๐Ÿ”† ๐Ÿ”Ž ๐Ÿ‘€ Smart Contract Storage HexViewer Demo Target - the target contract API Endpoint - your infura (or equivalent) api key Retrieves smart contrac

Nov 27, 2022

A code formatter for the Motoko smart contract language.

Motoko Formatter ยท A Prettier plugin for the Motoko programming language. Setup After making sure Node.js is installed on your local machine, run the

Dec 19, 2022

Cupcakes SDK to allow developers access to Authentication & Smart Contract Wallets

Introduction Cupcakes allow DAPPs developers access to Smart Contract Wallets. These wallets can be DAPPs specific or User specific. You must read abo

Nov 26, 2022
Owner
Alexander Thomas
โš›๏ธ https://gitcoin.co/grants/1884/react-native-web3
Alexander Thomas
๐Ÿ” Protect your Smart Contract Proxy from storage collisions upon upgrading, by running this action in a CI on each of your Pull Requests!

?? ??๏ธ Foundry Storage Upgrade Seatbelt Protect your Smart Contract Proxy from storage collisions upon upgrading, by running this action in a CI on ea

Romain Milon 11 Dec 24, 2022
Solana blockchain candy machine app boilerplate on top of Metaplex Candy Machine. NextJS, Tailwind, Anchor, SolanaLabs.React, dev/mainnet automation scripts.

NFT Candy Factory NOTE: This repo will prob only work on unix-based environments. The NFT Candy Factory project is designed to let users fork, customi

Kevin Faveri 261 Dec 30, 2022
chain-syncer is a module which allows you to synchronize your app with any ethereum-compatible blockchain/contract state. Fast. Realtime. Reliable.

Chain Syncer Chain Syncer is a JS module which allows you to synchronize your app with any ethereum-compatible blockchain/contract state. Fast. Realti

Miroslaw Shpak 10 Dec 15, 2022
An ERC-721 like NFT contract with Plutus scripts and Lucid as off-chain framework

Gatsby minimal TypeScript starter ?? Quick start Create a Gatsby site. Use the Gatsby CLI to create a new site, specifying the minimal TypeScript star

Berry 10 Sep 23, 2022
๐Ÿฅ Batch contract/on-chain queries to the same block. Multicall SDK for the Klaytn blockchain.

Klaytn Multicall Built for inevitable-changes/bento Inspired by makerdao/multicall and dopex-io/web3-multicall ?? Installation # Yarn yarn install kla

Inevitable (Bento) 4 Nov 7, 2022
Connect your Ethereum smart contract to any real world API using the oracle pattern!

Minimal Viable Oracle (MVO) - An effective way to Build your own oracle with Solidity Smart contracts cannot access off-chain data directly. This repo

Noah 9 Aug 25, 2022
Stays: book accommodation on-chain, pay in crypto, and help local communities

Stays: on-chain bookings Installation Make sure you have node and nvm installed: nvm use v16 npm install -g yarn npm install -g lerna yarn install ler

Winding Tree 8 Jun 2, 2022
First smart contract deployed on Rinkeby.

Inbox-Contract First smart contract deployed on Rinkeby. It has a basic constructor which accpets a string and assigns the string to the message varia

Stanley Moukhametzianov 1 Dec 26, 2021
Web3-citizens-app - React application based on smart contract using web3 and MetaMask extention.

Citizens App (web3-react-redux) React application based on smart contract using web3 and MetaMask extention. Start the applicarion Recomend to install

Denys Voloshyn 3 Aug 25, 2022
Aergo Timer Service schedule smart contract function calls

Aergo Timer Service โฐ Create timers to call functions on your smart contracts Schedule calls based on time interval or on specific date-times For a sm

aergo 3 Mar 10, 2022