Download full-stack-ethereum/scripts/deploy.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 698 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/full-stack-ethereum/scripts/deploy.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset@1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/full-stack-ethereum/scripts/deploy.js
-
curl -L -o deploy.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/full-stack-ethereum/scripts/deploy.js
698 Bytes
| const hre = require("hardhat"); | |
| async function main() { | |
| const [deployer] = await hre.ethers.getSigners(); | |
| console.log( | |
| "Deploying contracts with the account:", | |
| deployer.address | |
| ); | |
| const Greeter = await hre.ethers.getContractFactory("Greeter"); | |
| const greeter = await Greeter.deploy("Hello, World!"); | |
| const Token = await hre.ethers.getContractFactory("Token"); | |
| const token = await Token.deploy(); | |
| await greeter.deployed(); | |
| await token.deployed(); | |
| console.log("Greeter deployed to:", greeter.address); | |
| console.log("Token deployed to:", token.address); | |
| } | |
| main() | |
| .then(() => process.exit(0)) | |
| .catch(error => { | |
| console.error(error); | |
| process.exit(1); | |
| }); |