UNPKG

@d3or/slotseek

Version:

A library for finding the storage slots on an ERC20 token for balances and approvals, which can be used to mock the balances and approvals of an address when estimating gas costs of transactions that would fail if the address did not have the required bal

18 lines 2.02 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.computePermit2AllowanceStorageSlot = exports.getPermit2ERC20Allowance = exports.getErc20Balance = exports.getErc20Approval = exports.getErc20BalanceStorageSlot = exports.getErc20ApprovalStorageSlot = exports.generateMockBalanceData = exports.generateMockApprovalData = exports.balanceCache = exports.approvalCache = void 0; const cache_1 = require("./cache"); Object.defineProperty(exports, "approvalCache", { enumerable: true, get: function () { return cache_1.approvalCache; } }); Object.defineProperty(exports, "balanceCache", { enumerable: true, get: function () { return cache_1.balanceCache; } }); const approval_1 = require("./approval"); Object.defineProperty(exports, "generateMockApprovalData", { enumerable: true, get: function () { return approval_1.generateMockApprovalData; } }); Object.defineProperty(exports, "getErc20Approval", { enumerable: true, get: function () { return approval_1.getErc20Approval; } }); Object.defineProperty(exports, "getErc20ApprovalStorageSlot", { enumerable: true, get: function () { return approval_1.getErc20ApprovalStorageSlot; } }); const balance_1 = require("./balance"); Object.defineProperty(exports, "generateMockBalanceData", { enumerable: true, get: function () { return balance_1.generateMockBalanceData; } }); Object.defineProperty(exports, "getErc20Balance", { enumerable: true, get: function () { return balance_1.getErc20Balance; } }); Object.defineProperty(exports, "getErc20BalanceStorageSlot", { enumerable: true, get: function () { return balance_1.getErc20BalanceStorageSlot; } }); const permit2_1 = require("./permit2"); Object.defineProperty(exports, "computePermit2AllowanceStorageSlot", { enumerable: true, get: function () { return permit2_1.computePermit2AllowanceStorageSlot; } }); Object.defineProperty(exports, "getPermit2ERC20Allowance", { enumerable: true, get: function () { return permit2_1.getPermit2ERC20Allowance; } }); //# sourceMappingURL=index.js.map