Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
logger.debug('**** contract address: ' + txReceipt.logs[i].address + ' at log index(' + i + ') in TxHash: ' + txReceipt.transactionHash + '');
if (!currContractAddrFromReciept) {
logger.error('**** No contract found for contract address: ' + txReceipt.logs[i].address + ' at log index(' + i + ') in TxHash: ' + txReceipt.transactionHash + '');
continue;
}
// ABI not found
if (!contractAbi) {
logger.error("ABI not found for contract: "+contractAddr);
return;
}
relevantLogs.push(txReceipt.logs[i]);
abiDecoder.addABI(contractAbi);
}
if(relevantLogs.length > 0) {
decodedEvents = abiDecoder.decodeLogs(relevantLogs);
}
}
return this.getFormattedEvents(decodedEvents);
}
addWatch(options) {
options.logger.info('addWatch starting Peepeth %s ( from block %s)', metaData.contract, metaData.startblock);
const contract = new options.web3.eth.Contract(metaData.abi, metaData.contract);
abiDecoder.addABI(metaData.abi);
this.options = options;
this.highestBlock = 0;
this.eventCount = 0;
this.pinCount = 0;
this.picHashes = [];
this.defaultTtl = 60 * 60 * 24 * 365 * 10; // 10 years
contract.events.allEvents({
fromBlock: metaData.startblock,
}, (error, result) => {
if (error == null) {
options.web3.eth.getTransaction(result.transactionHash).then((transaction) => {
if (transaction.blockNumber > this.highestBlock) {
this.highestBlock = transaction.blockNumber;
beforeAll(() => {
ABIDecoder.addABI(coreContract.abi);
});
tokenHolderProxy,
0,
logoutExData,
0,
0,
0,
0,
config.NULL_ADDRESS,
config.NULL_ADDRESS,
ownerSignature.signature,
txOptions
);
const txReceipt = await auxiliaryWeb3.eth.getTransactionReceipt(result.transactionHash);
abiDecoder.addABI(abiBinProvider.getABI('GnosisSafe'));
abiDecoder.addABI(abiBinProvider.getABI('TokenHolder'));
const decodedResult = abiDecoder.decodeLogs(txReceipt.logs);
const sessionsLoggedOutEvent = JSON.parse(JSON.stringify(decodedResult));
assert.strictEqual(sessionsLoggedOutEvent[0].name, 'SessionsLoggedOut', 'Incorrect event emitted');
assert.strictEqual(sessionsLoggedOutEvent[0].events[0].value, '2', 'Incorrect sessionwindow value');
});
beforeAll(() => {
ABIDecoder.addABI(coreContract.abi);
});
debtOrder = await adaptersApi.simpleInterestLoan.toDebtOrder({
debtor: DEBTOR,
creditor: CREDITOR,
principalAmount: Units.ether(1),
principalTokenSymbol: "REP",
interestRate: new BigNumber(0.14),
amortizationUnit: scenario.amortizationUnit,
termLength: scenario.termLength,
});
debtOrder.debtorSignature = await signerApi.asDebtor(debtOrder);
issuanceHash = await orderApi.getIssuanceHash(debtOrder);
ABIDecoder.addABI(repaymentRouter.abi);
});
ADD_CONTRACT: (state, payload) => {
console.log('ADD_CONTRACT', { payload });
Vue.set(state.contracts, payload.address.toLowerCase(), payload);
Vue.set(state.logs, `contract|${payload.address}`, {
time: +new Date(),
type: 'contract',
address: payload.address,
});
AbiDecoder.addABI(payload.abi);
},
},
const Component = require('react').Component
const connect = require('react-redux').connect
const h = require('react-hyperscript')
const PropTypes = require('prop-types')
const clone = require('clone')
const abi = require('human-standard-token-abi')
const abiDecoder = require('abi-decoder')
abiDecoder.addABI(abi)
const inherits = require('util').inherits
const actions = require('../../actions')
const util = require('../../util')
const ConfirmSendEther = require('./confirm-send-ether')
const ConfirmSendToken = require('./confirm-send-token')
const ConfirmDeployContract = require('./confirm-deploy-contract')
const Loading = require('../loading')
const TX_TYPES = {
DEPLOY_CONTRACT: 'deploy_contract',
SEND_ETHER: 'send_ether',
SEND_TOKEN: 'send_token',
}
module.exports = connect(mapStateToProps, mapDispatchToProps)(PendingTx)