@dolomite-exchange/dolomite-margin
Version:
Ethereum Smart Contracts and TypeScript library used for the DolomiteMargin trading protocol
32 lines • 1.08 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Permissions = void 0;
class Permissions {
constructor(contracts) {
this.contracts = contracts;
}
async setOperators(operatorArgs, options) {
return this.contracts.callContractFunction(this.contracts.dolomiteMargin.methods.setOperators(operatorArgs), options);
}
async approveOperator(operator, options) {
if (!operator) {
console.error('cannot find operator!');
}
return this.contracts.callContractFunction(this.contracts.dolomiteMargin.methods.setOperators([
{
operator,
trusted: true,
},
]), options);
}
async disapproveOperator(operator, options) {
return this.contracts.callContractFunction(this.contracts.dolomiteMargin.methods.setOperators([
{
operator,
trusted: false,
},
]), options);
}
}
exports.Permissions = Permissions;
//# sourceMappingURL=Permissions.js.map