19.02.19 03:22 작성
·
327
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입니다.
답변 2
0
2019. 02. 19. 04:52
버전 명시해주셔서 감사합니다. 환경설정하시면서 트러플 설치할 때 버전 4가 요구됩니다. 해당강좌 밑에 필독사항 보시면 자세히 나와있습니다.