我用下面的Json一個問題:驗證ABI JSON(復仇)
[ { constant: false,
inputs: [Object],
name: 'set',
outputs: [],
type: 'function'
}, {
constant: true,
inputs: [],
name: 'get',
outputs: [Object],
type: 'function'
}, {
anonymous: false,
inputs: [Object],
name: 'ItBlinks',
type: 'event'
},
set: {
[Function: bound]
request: [Function: bound],
call: [Function: bound],
sendTransaction: [Function: bound],
estimateGas: [Function: bound],
getData: [Function: bound],
uint256: [Circular]
},
get: {
[Function: bound]
request: [Function: bound],
call: [Function: bound],
sendTransaction: [Function: bound],
estimateGas: [Function: bound],
getData: [Function: bound],
'': [Circular]
},
allEvents: [Function: bound],
ItBlinks: {
[Function: bound] uint256: [Function: bound]
}
}
此JSON是ABI這應該是添加到我的合同到我的錢包(錢包復仇)發送信息(在這種情況下,在我的覆盆子PI上發生了眨眼事件)
當我將這些行添加到我的以太坊錢包中的合同中時,它告訴我我的Json不正確。
我試着驗證,但它給了我一個錯誤,我無法解決它。 (我是JSon的初學者)
有人可以幫助我驗證get/set方法嗎?成爲一個有效的JSon格式?
這是coinbase全額返還(地址和coinbase被修改):
coinbase : 0x20408a19c567a475545947600a95130f24f7C123
{ _eth:
Eth {
_requestManager: { provider: [Object], polls: {}, timeout: null },
getBalance: { [Function] request: [Function: bound ], call: 'eth_getBalance' },
getStorageAt: { [Function] request: [Function: bound ], call: 'eth_getStorageAt' },
getCode: { [Function] request: [Function: bound ], call: 'eth_getCode' },
getBlock: { [Function] request: [Function: bound ], call: [Function] },
getUncle: { [Function] request: [Function: bound ], call: [Function] },
getCompilers: { [Function] request: [Function: bound ], call: 'eth_getCompilers' },
getBlockTransactionCount: { [Function] request: [Function: bound ], call: [Function] },
getBlockUncleCount: { [Function] request: [Function: bound ], call: [Function] },
getTransaction:
{ [Function]
request: [Function: bound ],
call: 'eth_getTransactionByHash' },
getTransactionFromBlock: { [Function] request: [Function: bound ], call: [Function] },
getTransactionReceipt:
{ [Function]
request: [Function: bound ],
call: 'eth_getTransactionReceipt' },
getTransactionCount: { [Function] request: [Function: bound ], call: 'eth_getTransactionCount' },
call: { [Function] request: [Function: bound ], call: 'eth_call' },
estimateGas: { [Function] request: [Function: bound ], call: 'eth_estimateGas' },
sendRawTransaction: { [Function] request: [Function: bound ], call: 'eth_sendRawTransaction' },
signTransaction: { [Function] request: [Function: bound ], call: 'eth_signTransaction' },
sendTransaction: { [Function] request: [Function: bound ], call: 'eth_sendTransaction' },
sign: { [Function] request: [Function: bound ], call: 'eth_sign' },
compile: { solidity: [Object], lll: [Object], serpent: [Object] },
submitWork: { [Function] request: [Function: bound ], call: 'eth_submitWork' },
getWork: { [Function] request: [Function: bound ], call: 'eth_getWork' },
coinbase: [Getter],
getCoinbase: { [Function] request: [Function: bound ] },
mining: [Getter],
getMining: { [Function] request: [Function: bound ] },
hashrate: [Getter],
getHashrate: { [Function] request: [Function: bound ] },
syncing: [Getter],
getSyncing: { [Function] request: [Function: bound ] },
gasPrice: [Getter],
getGasPrice: { [Function] request: [Function: bound ] },
accounts: [Getter],
getAccounts: { [Function] request: [Function: bound ] },
blockNumber: [Getter],
getBlockNumber: { [Function] request: [Function: bound ] },
protocolVersion: [Getter],
getProtocolVersion: { [Function] request: [Function: bound ] },
iban:
{ [Function]
fromAddress: [Function],
fromBban: [Function],
createIndirect: [Function],
isValid: [Function] },
sendIBANTransaction: [Function: bound ] },
transactionHash: null,
address: '0x9535eb707582edb3317dfdcdb365ce4186500C123',
abi:
[ { constant: false,
inputs: [Object],
name: 'set',
outputs: [],
type: 'function' },
{ constant: true,
inputs: [],
name: 'get',
outputs: [Object],
type: 'function' },
{ anonymous: false,
inputs: [Object],
name: 'ItBlinks',
type: 'event' } ],
set:
{ [Function: bound ]
request: [Function: bound ],
call: [Function: bound ],
sendTransaction: [Function: bound ],
estimateGas: [Function: bound ],
getData: [Function: bound ],
uint256: [Circular] },
get:
{ [Function: bound ]
request: [Function: bound ],
call: [Function: bound ],
sendTransaction: [Function: bound ],
estimateGas: [Function: bound ],
getData: [Function: bound ],
'': [Circular] },
allEvents: [Function: bound ],
ItBlinks: { [Function: bound ] uint256: [Function: bound ] }
}