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 에서 주소리스트가 안나옵니다.

427

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

249

2

블록체인 강의

0

187

2

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

0

286

1

truffle develop 명령 오류

0

426

0

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

0

470

2

전제 소스 코드

1

279

0

miner.stop() 오류

0

301

0

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

0

662

2

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

0

260

1

git에 올리신 자료 관련

0

332

2

geth rpc 에러입니다.

0

552

2

수업 자료

1

287

1

truffle 버전

2

253

0

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

1

392

1

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

0

371

1

./nodestrart.cmd

0

275

1

truffle migrate 실행 시 오류

0

257

0

nodestart.cmd 파일 실행시 오류

0

762

1

필드 초기화 질문

0

222

0

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

0

214

0

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

0

442

1

truffle init 시 에러

0

210

0

nodestart 질문

0

492

1

메타마스크 질문

0

177

0