@georgeroman/wyvern-v2-sdk
Version:
Wyvern V2 SDK
21 lines • 801 B
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const contracts_1 = require("@ethersproject/contracts");
const Weth_json_1 = __importDefault(require("../abis/Weth.json"));
class WethHelper {
static async deposit(depositor, weth, value) {
return new contracts_1.Contract(weth, Weth_json_1.default)
.connect(depositor)
.deposit({ value });
}
static async withdraw(withdrawer, weth, value) {
return new contracts_1.Contract(weth, Weth_json_1.default)
.connect(withdrawer)
.withdraw(value);
}
}
exports.default = WethHelper;
//# sourceMappingURL=weth.js.map