일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 31 |
- solidity
- built in object
- API
- typeScript
- error
- web
- REACT
- tailwindcss
- Ethereum
- HTML
- blockchain
- CSS
- express.js
- 삶
- 기준
- evm
- useState
- JavaScript
- Props
- CLASS
- Redux
- middleware
- bitcoin
- nextJS
- hardhat
- graphQL
- Interface
- SSR
- node.js
- concept
- Today
- Total
목록전체 글 (369)
ReasonJun
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/9ZVMG/btsyTfJHOjA/fDQ3wdsId9KoyA93TUAF6K/img.png)
Solidity-coverage is a tool that can be used to measure the code coverage of Solidity smart contracts. Code coverage is a measure of how much of the code in a program has been executed. This can be used to identify areas of the code that are not being tested, and to improve the quality of the test suite. Solidity-coverage works by instrumenting the Solidity code with coverage probes. These probe..
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 ..
The error message invalid opcode: PUSH0 means that the Ethereum Virtual Machine (EVM) does not recognize the PUSH0 opcode. This opcode was introduced in Solidity compiler version 0.8.20, but it is not yet supported by all EVM implementations. If you are trying to deploy a contract that uses the PUSH0 opcode, you will need to make sure that you are deploying it to an EVM implementation that suppo..
// SPDX-License-Identifier: MIT pragma solidity >= 0.7.0 금액 mapping (address => uint) public balance; event log(bytes data); function deposit() public payable returns (uint) { balance[msg.sender] += msg.value; return msg.value; } function withdrawByCall(address payable _addr, uint _amount) public { require(balance[msg.sender] > _amount, "Insufficient Balanc..
The main difference between fallback() and receive() in Solidity is that fallback() is called when a contract receives Ether without any calldata, while receive() is called when a contract receives Ether with empty calldata. In other words, fallback() is called when a user sends Ether to a contract directly, while receive() is called when a user calls a function on a contract without passing any..
The receive() function in Solidity is a special function that is called automatically when a contract receives Ether without any calldata. This can happen when Ether is sent to the contract using the transfer() function or when a user sends Ether to the contract directly. The receive() function cannot have any arguments or return a value. It can only contain code that interacts with the contract..