impermax-sdk 2.1.34 → 2.1.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -7,7 +7,7 @@ const impermax_chef_1 = require("../config/contracts/impermax-chef");
|
|
|
7
7
|
const claim_aggregators_1 = require("../config/contracts/claim-aggregators");
|
|
8
8
|
const merkle_distributors_1 = require("../config/contracts/merkle-distributors");
|
|
9
9
|
// Generic
|
|
10
|
-
const
|
|
10
|
+
const ERC20_json_1 = __importDefault(require("../abis/contracts/ERC20.json"));
|
|
11
11
|
const IERC721_json_1 = __importDefault(require("../abis/contracts/IERC721.json"));
|
|
12
12
|
const IAllowanceTransfer_json_1 = __importDefault(require("../abis/contracts/IAllowanceTransfer.json"));
|
|
13
13
|
// Impermax
|
|
@@ -45,7 +45,7 @@ class OnchainContractsHelper {
|
|
|
45
45
|
constructor(onchain) {
|
|
46
46
|
this.newContract = (abi, address) => new this.onchain.web3.eth.Contract(abi, address);
|
|
47
47
|
// Generic
|
|
48
|
-
this.newERC20 = (address) => this.newContract(
|
|
48
|
+
this.newERC20 = (address) => this.newContract(ERC20_json_1.default.abi, address);
|
|
49
49
|
this.newERC721 = (address) => this.newContract(IERC721_json_1.default.abi, address);
|
|
50
50
|
this.newPermit2 = (address) => this.newContract(IAllowanceTransfer_json_1.default.abi, address);
|
|
51
51
|
// Impermax
|
|
@@ -43,7 +43,7 @@ const PERMIT2_DETAILS = [
|
|
|
43
43
|
{ name: "nonce", type: "uint48" },
|
|
44
44
|
];
|
|
45
45
|
const PERMIT2_SINGLE = [
|
|
46
|
-
{ name: "details", type:
|
|
46
|
+
{ name: "details", type: "PermitDetails" },
|
|
47
47
|
{ name: "spender", type: "address" },
|
|
48
48
|
{ name: "sigDeadline", type: "uint256" },
|
|
49
49
|
];
|
|
@@ -174,6 +174,7 @@ class OnchainPermitHelper {
|
|
|
174
174
|
if (!allowanceData)
|
|
175
175
|
throw new Error("Invalid permit2 allowance data");
|
|
176
176
|
const nonce = allowanceData.nonce;
|
|
177
|
+
console.log(allowanceData, allowanceData.nonce);
|
|
177
178
|
const permitDetailsType = 'tuple(address tokenAddress, uint160 amount, uint48 expiration, uint48 nonce)';
|
|
178
179
|
const details = {
|
|
179
180
|
token: token._address,
|