inflearn logo
강의

Khóa học

Chia sẻ kiến thức

Tạo Dapp bất động sản trên blockchain Ethereum - Phần cơ bản

Truffle & Triển khai Contract II (Sử dụng Truffle console)

web3.eth.accounts 에서 주소리스트가 안나옵니다.

437

junwoong22049

1 câu hỏi đã được viết

0

Accounts {

currentProvider: [Getter/Setter],

_requestManager:

RequestManager {

provider:

HttpProvider {

host: 'http://127.0.0.1:9545/',

httpAgent: [Agent],

timeout: 0,

headers: undefined,

connected: true,

send: [Function],

_alreadyWrapped: true },

providers:

{ WebsocketProvider: [Function: Websoc

HttpProvider: [Function: HttpProvide

IpcProvider: [Function: IpcProvider]

subscriptions: {} },

givenProvider: null,

providers:

{ WebsocketProvider: [Function: Websocket

HttpProvider: [Function: HttpProvider],

IpcProvider: [Function: IpcProvider] },

_provider:

HttpProvider {

host: 'http://127.0.0.1:9545/',

httpAgent:

Agent {

domain: null,

_events: [Object],

_eventsCount: 1,

_maxListeners: undefined,

defaultPort: 80,

protocol: 'http:',

options: [Object],

requests: {},

sockets: {},

freeSockets: {},

keepAliveMsecs: 1000,

keepAlive: false,

maxSockets: Infinity,

maxFreeSockets: 256 },

timeout: 0,

headers: undefined,

connected: true,

send: [Function],

_alreadyWrapped: true },

setProvider: [Function],

_ethereumCall:

{ getId:

{ [Function: send]

method: [Method],

request: [Function: bound ],

call: 'net_version' },

getGasPrice:

{ [Function: send]

method: [Method],

request: [Function: bound ],

call: 'eth_gasPrice' },

getTransactionCount:

{ [Function: send]

method: [Method],

request: [Function: bound ],

call: 'eth_getTransactionCount' } },

wallet:

Wallet {

_accounts: [Circular],

length: 0,

 이런식으로 뜹니다. web3.eth.getAccounts() 이렇게 하면 똑같이 리스트는 뜨는데 인덱스의 건을 가져오지를 못하네요.

web3는 1.0.0-beta37 입니다. 트러플은 5.0입니다.

Ethereum dapp blockchain

Câu trả lời 2

6

hanumoka

web3.eth.getAccounts().then(function(res){ return web3.eth.getBalance(res[0]).then(function(res2){ return web3.utils.fromWei(res2, 'ether')})})

0

SEJONG IT EDU

버전 명시해주셔서 감사합니다. 환경설정하시면서 트러플 설치할 때 버전 4가 요구됩니다. 해당강좌 밑에 필독사항 보시면 자세히 나와있습니다.

[긴급] 전체 소스코드 파일 있었던거 같은데 어디서 받나요?

0

275

2

블록체인 강의

0

205

2

강의내용 질문입니다 메타마스크

0

300

1

truffle develop 명령 오류

0

440

0

메타마스크 창이 안뜨네요 ㅜ

0

487

2

전제 소스 코드

1

284

0

miner.stop() 오류

0

307

0

매입 실행 시 메타마스크와 연동이 안되고 창이 안뜨고 있네요

0

676

2

코드가 다운받아지지 않습니다.

0

269

1

git에 올리신 자료 관련

0

337

2

geth rpc 에러입니다.

0

563

2

수업 자료

1

294

1

truffle 버전

2

259

0

Geth의 버전이 업데이트 되면서 실행되지 않았습니다. 의 해결법 (nodestart)

1

398

1

TypeError: Contracts.compile is not a function / powershell에 migrate 시 오류발생

0

383

1

./nodestrart.cmd

0

283

1

truffle migrate 실행 시 오류

0

266

0

nodestart.cmd 파일 실행시 오류

0

773

1

필드 초기화 질문

0

228

0

truffle 이렇다는데,, 업데이트 하게되면 강의를 들을수 있나요..?

0

218

0

puppeth 명령어 실행이 안됩니다.

0

454

1

truffle init 시 에러

0

213

0

nodestart 질문

0

498

1

메타마스크 질문

0

182

0