@decent-bet/solido
Version:
Code first contract entity mapper for Solidity based blockchains like Ethereum, Vechain, Tron
21 lines (20 loc) • 588 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
function _GetEvent(name, contract) {
return contract.getEvent(name);
}
exports._GetEvent = _GetEvent;
function GetEvent(options) {
return (target, propertyKey) => {
const getEvent = function () {
const self = this;
return self.getEvent(options.name || propertyKey);
};
Object.defineProperty(target, propertyKey, {
value: getEvent,
enumerable: false,
configurable: true
});
};
}
exports.GetEvent = GetEvent;