Transaction manager
const txMgr = maker.service('transactionManager');
// instance of transactionManager
const open = maker.service('cdp').openCdp();
// open is a promise--note the absence of `await`txMgr.listen(open, {
pending: tx => {
// do something when tx is pending
},
mined: tx => {
// do something when tx is mined
},
confirmed: tx => {
// do something when tx is confirmed
},
error: tx => {
// do someting when tx fails
}
});
await txMgr.confirm(open);
// 'confirmed' callback will fire after 5 blocksTransaction Metadata
Transaction Object Methods
Last updated