@neo-one/smart-contract-compiler
Version:
NEO•ONE TypeScript smart contract compiler.
19 lines (17 loc) • 742 B
JavaScript
import { tsUtils } from '@neo-one/ts-utils';
import { BuiltinMemberCall } from '../../BuiltinMemberCall';
export class AddressIsCaller extends BuiltinMemberCall {
emitCall(sb, _func, node, optionsIn) {
if (tsUtils.argumented.getArguments(node).length < 1) {
return;
}
const options = sb.pushValueOptions(optionsIn);
sb.visit(tsUtils.argumented.getArguments(node)[0], options);
sb.emitHelper(tsUtils.argumented.getArguments(node)[0], options, sb.helpers.unwrapBuffer);
sb.emitHelper(node, optionsIn, sb.helpers.isCaller);
if (optionsIn.pushValue) {
sb.emitHelper(node, options, sb.helpers.wrapBoolean);
}
}
}
//# sourceMappingURL=isCaller.js.map