You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
332 B
17 lines
332 B
7 years ago
|
const assert = require('chai').assert;
|
||
|
|
||
|
const inLogs = async (logs, eventName) => {
|
||
|
const event = logs.find(e => e.event === eventName);
|
||
|
assert.exists(event);
|
||
|
};
|
||
|
|
||
|
const inTransaction = async (tx, eventName) => {
|
||
|
const { logs } = await tx;
|
||
|
return inLogs(logs, eventName);
|
||
|
};
|
||
|
|
||
|
module.exports = {
|
||
|
inLogs,
|
||
|
inTransaction,
|
||
|
};
|