일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 |
- API
- error
- JavaScript
- REACT
- web
- typeScript
- node.js
- express.js
- 삶
- nextJS
- 기준
- concept
- bitcoin
- CLASS
- blockchain
- hardhat
- useState
- built in object
- Redux
- Ethereum
- middleware
- solidity
- evm
- CSS
- tailwindcss
- Interface
- Props
- SSR
- HTML
- graphQL
- Today
- Total
목록hardhat (11)
ReasonJun
import { ethers } from "hardhat"; const contractAddress = "0x5FbDB2315678afecb367f032d93F642f64180aa3"; async function purchase(amount: number) { const VendingMachine = await ethers.getContractFactory("VendingMachine"); const vendingMachine = await VendingMachine.attach(contractAddress); const topic = [vendingMachine.filters.Purchase().topics!].toString(); const filter = { address: contractAddre..
import { loadFixture } from '@nomicfoundation/hardhat-network-helpers'; import { expect } from 'chai'; import { ethers } from 'hardhat'; describe('VendingMachine', function () { // We define a fixture to reuse the same setup in every test. // We use loadFixture to run this setup once, snapshot that state, // and reset Hardhat Network to that snapshot in every test. async function VendingMachineF..
import { loadFixture } from '@nomicfoundation/hardhat-network-helpers'; import { expect } from 'chai'; import { ethers } from 'hardhat'; describe('VendingMachine', function () { // We define a fixture to reuse the same setup in every test. // We use loadFixture to run this setup once, snapshot that state, // and reset Hardhat Network to that snapshot in every test. async function VendingMachineF..
import { ethers } from "hardhat"; describe("VendingMachine", function () { // We define a fixture to reuse the same setup in every test. // We use loadFixture to run this setup once, snapshot that state, // and reset Hardhat Network to that snapshot in every test. async function VendingMachineFixture() { // Contracts are deployed using the first signer/account by default const [owner, otherAccou..
import { ethers } from "hardhat"; async function main() { console.log('deploying vendingMachine contract') const VendingMachine = await ethers.getContractFactory("VendingMachine"); const vendingMachine = await VendingMachine.deploy(); await vendingMachine.deployed(); console.log(`vendingMachine contract is deployed to ${vendingMachine.address}`); } // We recommend this pattern to be able to use ..