일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- github
- git
- 스마트 컨트랙트
- Programming
- geth
- 솔리디티
- server
- NFT
- 블록체인
- 제어의역전
- erc721
- tcp
- JavaScript
- Python
- solidity
- ethers
- 이더리움
- truffle
- 네트워크
- web3.js
- web
- blockchain
- Ethereum
- ERC165
- web3
- MySQL
- erc
- Docker
- 트랜잭션
- ERC20
- Today
- Total
목록web3.js (3)
멍개의 연구소
최신 리액트 버전에서 web3를 사용할 때 다음과 같이 에러가 발생합니다. // src/App.js import Web3 from 'web3'; // 에러발생 지점 function App() { const onClickHandler = async () => { const web3 = new Web3( window?.web3?.currentProvider // 메타마스크 프로바이더 || 'http://localhost:8545' ); const accounts = await web3.eth.requestAccounts(); console.log(accounts) const tx = await web3.eth.sendTransaction({ from: accounts[0], to: '0xAd46355359a..
ethers는 web3.js처럼 이더리움 네트워크를 조회하고 조작할 수 있는 인터페이스를 제공하는 라이브러리입니다. 그렇다면 web3.js대신 ethers.js를 사용해야하는 이유는 무엇일까? ethers는 provider와 signer를 주입하는 형태로 유연한 코드 작성이 가능하다고 생각합니다. · 설치 $ npm install --save ethers ethers는 크게 4개의 객체를 제공합니다. ▶ CommonJS const { providers, Wallet, utils, Contract } = require('ethers'); ▶ ESM import { providers, Wallet, utils, Contract } from "ethers"; ▶ CDN ● providers provide..
thereum에서 block, transaction pool, state가 어디에 저장되는지 알아보도록 하겠습니다. 먼저 block, state는 levelDB를 통해 저장이 됩니다. 근데 문득 그렇다면 transaction이 발생되고 pool에 저장된 tx들은 어디에 저장되는지 궁금해져서 테스트를 해보았습니다. · 2개의 account 생성 > eth.accounts ["0xe28674672b353d2d4c80435b610734e68bcd4362", "0xbd83f6767a57da0c25b1437660adf43c3e1667be"] > eth.getBalance(eth.accounts[0]) 75000000030000000000 > eth.getBalance(eth.accounts[1]) 0 2개의 ac..