Package Exports
- tx-inspection
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (tx-inspection) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
#BAP CHALLENGE PRODUCT
In order to use this package, first of all, you need to install
npm i tx-inspection
Create instance from tx-inspection , for example :
const tx = require('tx-inspection')
First, you need to have instance of Transaction service class,using wss://rinkeby.infura.io/ws for web3 provider:
let inspect = new tx.TransactionService(provider)
###You can also check status of an transaction with :
let status = await inspect.checkStatusTransaction(txHash)
This is an example result
{
transaction_hash: '0x398599db0d610f7550cc76fdfbe8b01015a913e7ce3c0b62a9b4d7725aec0c0a',
block_number: 4412771,
status: 1
}
status : 0 is pending, 1 is success, 2 is fail
block_number : null is pending or it will be a number of block
transaction_hash : what you put in
###You can also check status of create new contract challenge with :
let status = await mn.checkStatusCreated(txHash)
This is an example result
{
transaction_hash: '0x398599db0d610f7550cc76fdfbe8b01015a913e7ce3c0b62a9b4d7725aec0c0a',
block_number: 4412771,
status: 1,
address: '0xe44424579FFd20a198C0f7E852AD9663AB6Da11D'
}
status : 0 is pending, 1 is success, 2 is fail
blockNumber : null is pending or it will be a number of block
transaction_hash : what you put in
address : null if transaction is pending or failed, or it will be an address of challenge contract