@ape.swap/bonds-sdk 1.0.355 → 1.0.356
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.
- package/dist/components/BondModal/BondModal.js +20 -11
- package/dist/components/YourBonds/YourBonds.js +43 -62
- package/dist/components/YourBonds/fetchBillsUser.d.ts +3 -3
- package/dist/components/YourBonds/fetchBillsUser.js +4 -4
- package/dist/types/bonds.d.ts +0 -62
- package/dist/types/yourbonds.d.ts +0 -4
- package/package.json +1 -1
- package/dist/config/abi/erc20.json +0 -117
- package/dist/config/abi/price-getter-linea.json +0 -1448
- package/dist/config/abi/price-getter.json +0 -1309
- package/dist/enum/abis.d.ts +0 -80
- package/dist/enum/abis.js +0 -1
- package/dist/hooks/PriceGetter/usePricesFromPriceGetter.d.ts +0 -17
- package/dist/hooks/PriceGetter/usePricesFromPriceGetter.js +0 -205
- package/dist/state/bills/cleanBillsData.d.ts +0 -5
- package/dist/state/bills/cleanBillsData.js +0 -41
- package/dist/state/bills/fetchBills.d.ts +0 -4
- package/dist/state/bills/fetchBills.js +0 -61
- package/dist/state/bills/fetchBillsCalls.d.ts +0 -4
- package/dist/state/bills/fetchBillsCalls.js +0 -27
- package/dist/state/bills/fetchBillsUser.d.ts +0 -15
- package/dist/state/bills/fetchBillsUser.js +0 -171
- package/dist/state/bills/getBillNftData.d.ts +0 -9
- package/dist/state/bills/getBillNftData.js +0 -109
- package/dist/state/bills/hooks.d.ts +0 -4
- package/dist/state/bills/hooks.js +0 -142
- package/dist/state/bills/index.d.ts +0 -48
- package/dist/state/bills/index.js +0 -293
- package/dist/state/bills/types.d.ts +0 -168
- package/dist/state/bills/types.js +0 -1
- package/dist/state/tokenPrices/fetchTokenPricesForMultipleChains.d.ts +0 -4
- package/dist/state/tokenPrices/fetchTokenPricesForMultipleChains.js +0 -68
- package/dist/state/tokenPrices/getAllTokenPrices.d.ts +0 -5
- package/dist/state/tokenPrices/getAllTokenPrices.js +0 -288
- package/dist/state/tokenPrices/useTokenPricesNew.d.ts +0 -11
- package/dist/state/tokenPrices/useTokenPricesNew.js +0 -72
- package/dist/types/dexFactories.d.ts +0 -11
- package/dist/types/dexFactories.js +0 -2
|
@@ -62,9 +62,10 @@ import { TooltipText } from '../../enum/tooltips';
|
|
|
62
62
|
import { formatNumberSI } from '../../utils/formatNumber';
|
|
63
63
|
import { ethers } from 'ethers';
|
|
64
64
|
import { adjustDecimals } from "../../utils/convertToTokenValue";
|
|
65
|
-
import { BondAbi } from '../../enum/abis';
|
|
66
65
|
import TokenImage from '../uikit-sdk/TokenImage';
|
|
67
66
|
import '../../scss/BondModal.scss';
|
|
67
|
+
import BOND_ABI from '../../config/abi/bond.json';
|
|
68
|
+
import ERC_20_ABI from '../../config/abi/bond.json';
|
|
68
69
|
var BondModal = function (_a) {
|
|
69
70
|
var isOpen = _a.isOpen, onClose = _a.onClose, bondAddress = _a.bondAddress;
|
|
70
71
|
if (!isOpen)
|
|
@@ -115,6 +116,8 @@ var BondModal = function (_a) {
|
|
|
115
116
|
setSelectedBond(bond);
|
|
116
117
|
navigate("/bondsingle/".concat(bond.billAddress));
|
|
117
118
|
};
|
|
119
|
+
//Note to Gordon: Can we put all this in a helper file or something so the code in here is less?
|
|
120
|
+
/////////////////////
|
|
118
121
|
function formatNumber(input) {
|
|
119
122
|
var number = new BigNumber(input);
|
|
120
123
|
if (number.isNaN())
|
|
@@ -166,6 +169,9 @@ var BondModal = function (_a) {
|
|
|
166
169
|
var getPremium = premium(bond);
|
|
167
170
|
return parseFloat(getPremium) < 0 ? 'premium-negative' : 'premium-positive';
|
|
168
171
|
};
|
|
172
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
173
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
174
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
169
175
|
var handleBuy = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
170
176
|
var provider, signer, bondContract, maxPrice, amount, tx, error_1;
|
|
171
177
|
return __generator(this, function (_a) {
|
|
@@ -179,7 +185,7 @@ var BondModal = function (_a) {
|
|
|
179
185
|
}
|
|
180
186
|
provider = new ethers.providers.Web3Provider(window.ethereum);
|
|
181
187
|
signer = provider.getSigner();
|
|
182
|
-
bondContract = new ethers.Contract(bondAddress !== null && bondAddress !== void 0 ? bondAddress : "",
|
|
188
|
+
bondContract = new ethers.Contract(bondAddress !== null && bondAddress !== void 0 ? bondAddress : "", BOND_ABI, signer);
|
|
183
189
|
_a.label = 1;
|
|
184
190
|
case 1:
|
|
185
191
|
_a.trys.push([1, 4, , 5]);
|
|
@@ -202,10 +208,12 @@ var BondModal = function (_a) {
|
|
|
202
208
|
}
|
|
203
209
|
});
|
|
204
210
|
}); };
|
|
211
|
+
//You approve the token, not the contract (this code will have to be updated for zap)
|
|
205
212
|
var handleApprove = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
206
213
|
var provider, signer, bondContract, amount, tx, error_2;
|
|
207
|
-
|
|
208
|
-
|
|
214
|
+
var _a;
|
|
215
|
+
return __generator(this, function (_b) {
|
|
216
|
+
switch (_b.label) {
|
|
209
217
|
case 0:
|
|
210
218
|
console.log('handle approve clicked');
|
|
211
219
|
if (!window.ethereum) {
|
|
@@ -213,24 +221,25 @@ var BondModal = function (_a) {
|
|
|
213
221
|
alert('No Ethereum provider found');
|
|
214
222
|
return [2 /*return*/];
|
|
215
223
|
}
|
|
224
|
+
console.log(selectedBond === null || selectedBond === void 0 ? void 0 : selectedBond.principalToken);
|
|
216
225
|
provider = new ethers.providers.Web3Provider(window.ethereum);
|
|
217
226
|
signer = provider.getSigner();
|
|
218
|
-
bondContract = new ethers.Contract(
|
|
219
|
-
|
|
227
|
+
bondContract = new ethers.Contract((_a = selectedBond === null || selectedBond === void 0 ? void 0 : selectedBond.principalToken) !== null && _a !== void 0 ? _a : "", ERC_20_ABI, signer);
|
|
228
|
+
_b.label = 1;
|
|
220
229
|
case 1:
|
|
221
|
-
|
|
230
|
+
_b.trys.push([1, 4, , 5]);
|
|
222
231
|
amount = adjustDecimals(inputValue);
|
|
223
|
-
return [4 /*yield*/, bondContract.approve(
|
|
232
|
+
return [4 /*yield*/, bondContract.approve(bondAddress, amount)];
|
|
224
233
|
case 2:
|
|
225
|
-
tx =
|
|
234
|
+
tx = _b.sent();
|
|
226
235
|
return [4 /*yield*/, tx.wait()];
|
|
227
236
|
case 3:
|
|
228
|
-
|
|
237
|
+
_b.sent();
|
|
229
238
|
setApprovalStatus(true);
|
|
230
239
|
alert('Approve Successful');
|
|
231
240
|
return [3 /*break*/, 5];
|
|
232
241
|
case 4:
|
|
233
|
-
error_2 =
|
|
242
|
+
error_2 = _b.sent();
|
|
234
243
|
console.error('Approval error', error_2);
|
|
235
244
|
alert('Approval Failed');
|
|
236
245
|
return [3 /*break*/, 5];
|
|
@@ -69,7 +69,6 @@ import { formatNumberSI } from '../../utils/formatNumber';
|
|
|
69
69
|
import useCurrentTime from '../../hooks/useTimer';
|
|
70
70
|
import { getPendingVesting } from '../../hooks/usePendingVesting';
|
|
71
71
|
import axios from 'axios';
|
|
72
|
-
import { fetchUserOwnedBillNftData } from './fetchBillsUser';
|
|
73
72
|
var YourBonds = function (_a) {
|
|
74
73
|
var connectionString = _a.connectionString;
|
|
75
74
|
var _b = useWeb3React(), account = _b.account, isActive = _b.isActive;
|
|
@@ -161,16 +160,26 @@ var YourBonds = function (_a) {
|
|
|
161
160
|
setIsModalOpen(true);
|
|
162
161
|
navigate("/YourBonds/?bondAddress=".concat(bond.billAddress, "&bondChain=").concat(bond.chainId), { replace: true });
|
|
163
162
|
};
|
|
163
|
+
// const usePollUserBills = () => {
|
|
164
|
+
// const { slowRefresh } = useRefresh()
|
|
165
|
+
// // const dispatch = useAppDispatch()
|
|
166
|
+
// const { account, isActive } = useWeb3React();
|
|
167
|
+
// useEffect(() => {
|
|
168
|
+
// if (account) {
|
|
169
|
+
// MAINNET_CHAINS.map((chain) => fetchUserOwnedBillsDataAsync(chain as number, account))
|
|
170
|
+
// }
|
|
171
|
+
// }, [account, slowRefresh])
|
|
172
|
+
// }
|
|
164
173
|
var currentTime = useCurrentTime() / 1000;
|
|
165
174
|
var vestingTimeRemaining = function (userBill) {
|
|
166
175
|
return getTimePeriods(parseInt(userBill.lastBlockTimestamp) + parseInt(userBill.vesting) - currentTime, true);
|
|
167
176
|
};
|
|
168
177
|
var fetchUserOwnedBillsDataAsync = function (chainId, account) { return __awaiter(void 0, void 0, void 0, function () {
|
|
169
|
-
var bonds, userOwnedBills_1, mapUserOwnedBills_1, userOwnedBillsData_1,
|
|
178
|
+
var bonds, userOwnedBills_1, mapUserOwnedBills_1, userOwnedBillsData_1, error_2;
|
|
170
179
|
return __generator(this, function (_a) {
|
|
171
180
|
switch (_a.label) {
|
|
172
181
|
case 0:
|
|
173
|
-
_a.trys.push([0,
|
|
182
|
+
_a.trys.push([0, 2, , 3]);
|
|
174
183
|
bonds = bondData.filter(function (bond) {
|
|
175
184
|
return bond.billVersion !== BillVersion.FixedPrice &&
|
|
176
185
|
(bond === null || bond === void 0 ? void 0 : bond.chainId) === chainId &&
|
|
@@ -187,41 +196,41 @@ var YourBonds = function (_a) {
|
|
|
187
196
|
index: bill.index,
|
|
188
197
|
userOwnedBills: mapUserOwnedBills_1[i],
|
|
189
198
|
}); });
|
|
190
|
-
|
|
191
|
-
return bs.map(function (b) {
|
|
192
|
-
return { id: b.id, billNftAddress: b.billNftAddress, contractAddress: b.address };
|
|
193
|
-
});
|
|
194
|
-
});
|
|
195
|
-
return [4 /*yield*/, fetchUserOwnedBillNftData(ownedBillsData, chainId, bonds)
|
|
196
|
-
// Merge userBillNftData into userOwnedBillsData
|
|
197
|
-
];
|
|
199
|
+
return [2 /*return*/, Promise.resolve(userOwnedBillsData_1)];
|
|
198
200
|
case 2:
|
|
199
|
-
userBillNftData_1 = _a.sent();
|
|
200
|
-
combinedData = userOwnedBillsData_1.map(function (data) {
|
|
201
|
-
var enrichedUserBills = data.userOwnedBills.map(function (bill) {
|
|
202
|
-
var nftData = userBillNftData_1.find(function (nft) { return nft.id === parseInt(bill.id); });
|
|
203
|
-
return __assign(__assign({}, bill), (nftData ? { image: nftData.data.image, attributes: nftData.data.attributes } : {}));
|
|
204
|
-
});
|
|
205
|
-
return __assign(__assign({}, data), { userOwnedBills: enrichedUserBills });
|
|
206
|
-
});
|
|
207
|
-
// console.log("userBillNftData");
|
|
208
|
-
// console.log(userBillNftData);
|
|
209
|
-
// console.log("userBillNftData");
|
|
210
|
-
// console.log("userOwnedBillsData");
|
|
211
|
-
// console.log(userOwnedBillsData);
|
|
212
|
-
// console.log("userOwnedBillsData");
|
|
213
|
-
console.log("combinedData");
|
|
214
|
-
console.log(combinedData);
|
|
215
|
-
console.log("combinedData");
|
|
216
|
-
return [2 /*return*/, Promise.resolve(combinedData)];
|
|
217
|
-
case 3:
|
|
218
201
|
error_2 = _a.sent();
|
|
219
202
|
console.error('Error fetching user owned bills data:', error_2);
|
|
220
203
|
return [2 /*return*/, Promise.reject(error_2)];
|
|
221
|
-
case
|
|
204
|
+
case 3: return [2 /*return*/];
|
|
222
205
|
}
|
|
223
206
|
});
|
|
224
207
|
}); };
|
|
208
|
+
var _g = useState([]), userOwnedBillsData = _g[0], setUserOwnedBillsData = _g[1];
|
|
209
|
+
useEffect(function () {
|
|
210
|
+
var fetchData = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
211
|
+
var results, error_3;
|
|
212
|
+
return __generator(this, function (_a) {
|
|
213
|
+
switch (_a.label) {
|
|
214
|
+
case 0:
|
|
215
|
+
if (!account) return [3 /*break*/, 4];
|
|
216
|
+
_a.label = 1;
|
|
217
|
+
case 1:
|
|
218
|
+
_a.trys.push([1, 3, , 4]);
|
|
219
|
+
return [4 /*yield*/, Promise.all(MAINNET_CHAINS.map(function (chain) { return fetchUserOwnedBillsDataAsync(chain, account); }))];
|
|
220
|
+
case 2:
|
|
221
|
+
results = _a.sent();
|
|
222
|
+
setUserOwnedBillsData(results);
|
|
223
|
+
return [3 /*break*/, 4];
|
|
224
|
+
case 3:
|
|
225
|
+
error_3 = _a.sent();
|
|
226
|
+
console.error('Error fetching user owned bills data:', error_3);
|
|
227
|
+
return [3 /*break*/, 4];
|
|
228
|
+
case 4: return [2 /*return*/];
|
|
229
|
+
}
|
|
230
|
+
});
|
|
231
|
+
}); };
|
|
232
|
+
fetchData();
|
|
233
|
+
}, [account]);
|
|
225
234
|
var fetchUserOwnedBills = function (chainId, account, bonds) { return __awaiter(void 0, void 0, void 0, function () {
|
|
226
235
|
var billIdCalls, billIds, billsPendingRewardCall, billDataCalls, billVersions, billData, pendingRewardsCall, result, i, billDataPos, data;
|
|
227
236
|
var _a, _b, _c, _d, _e;
|
|
@@ -298,32 +307,6 @@ var YourBonds = function (_a) {
|
|
|
298
307
|
}
|
|
299
308
|
});
|
|
300
309
|
}); };
|
|
301
|
-
var _g = useState([]), userOwnedBillsData = _g[0], setUserOwnedBillsData = _g[1];
|
|
302
|
-
useEffect(function () {
|
|
303
|
-
var fetchData = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
304
|
-
var results, error_3;
|
|
305
|
-
return __generator(this, function (_a) {
|
|
306
|
-
switch (_a.label) {
|
|
307
|
-
case 0:
|
|
308
|
-
if (!account) return [3 /*break*/, 4];
|
|
309
|
-
_a.label = 1;
|
|
310
|
-
case 1:
|
|
311
|
-
_a.trys.push([1, 3, , 4]);
|
|
312
|
-
return [4 /*yield*/, Promise.all(MAINNET_CHAINS.map(function (chain) { return fetchUserOwnedBillsDataAsync(chain, account); }))];
|
|
313
|
-
case 2:
|
|
314
|
-
results = _a.sent();
|
|
315
|
-
setUserOwnedBillsData(results);
|
|
316
|
-
return [3 /*break*/, 4];
|
|
317
|
-
case 3:
|
|
318
|
-
error_3 = _a.sent();
|
|
319
|
-
console.error('Error fetching user owned bills data:', error_3);
|
|
320
|
-
return [3 /*break*/, 4];
|
|
321
|
-
case 4: return [2 /*return*/];
|
|
322
|
-
}
|
|
323
|
-
});
|
|
324
|
-
}); };
|
|
325
|
-
fetchData();
|
|
326
|
-
}, [account]);
|
|
327
310
|
var chainId = useWeb3React().chainId;
|
|
328
311
|
var totalPending = function (userBill) {
|
|
329
312
|
var _a, _b, _c, _d;
|
|
@@ -344,9 +327,6 @@ var YourBonds = function (_a) {
|
|
|
344
327
|
fontWeight: 600,
|
|
345
328
|
width: '100%',
|
|
346
329
|
} }, { children: "Claim All" })) }))] }))] })), userOwnedBillsData.flat().map(function (data) {
|
|
347
|
-
console.log("ROWDATA");
|
|
348
|
-
console.log(data);
|
|
349
|
-
console.log("ROWDATA");
|
|
350
330
|
var sortedBills = data.userOwnedBills.sort(function (a, b) {
|
|
351
331
|
var claimableDifference = claimable(b) - claimable(a);
|
|
352
332
|
if (claimableDifference !== 0) {
|
|
@@ -354,9 +334,10 @@ var YourBonds = function (_a) {
|
|
|
354
334
|
}
|
|
355
335
|
return totalPending(b) - totalPending(a);
|
|
356
336
|
});
|
|
337
|
+
console.log(sortedBills);
|
|
357
338
|
return sortedBills.map(function (bill) {
|
|
358
|
-
var _a, _b
|
|
359
|
-
return (_jsxs(Flex, __assign({ className: "container bondrow-container", onClick: function () { return rowClick(bill.bond); } }, { children: [_jsx(Flex, __assign({ className: "column column-tokens" }, { children:
|
|
339
|
+
var _a, _b;
|
|
340
|
+
return (_jsxs(Flex, __assign({ className: "container bondrow-container", onClick: function () { return rowClick(bill.bond); } }, { children: [_jsx(Flex, __assign({ className: "column column-tokens" }, { children: _jsx(Flex, __assign({ className: "column column-tokeninfoname" }, { children: _jsx(TokenInfoAndName, { bill: bill.bond, vestEnds: "Ends in ".concat(getPendingVesting(bill.lastBlockTimestamp, bill.vesting)) }) })) })), _jsxs(Flex, __assign({ className: "column column-bondinfo" }, { children: [_jsxs(Flex, __assign({ className: "column column-claimable" }, { children: [formatNumberSI(parseFloat(claimable(bill).toFixed(3)), 0), "($".concat((claimable(bill) * ((_a = parseFloat(earnTokenPrice(bill.bond))) !== null && _a !== void 0 ? _a : 0)).toFixed(2), ")")] })), _jsxs(Flex, __assign({ className: "column column-pending" }, { children: [formatNumberSI(parseFloat(totalPending(bill).toFixed(0)), 0), "($".concat((totalPending(bill) * ((_b = parseFloat(earnTokenPrice(bill.bond))) !== null && _b !== void 0 ? _b : 0)).toFixed(2), ")")] })), _jsx(Flex, __assign({ className: "column column-term" }, { children: "".concat(vestingTimeRemaining(bill).days, "d, ").concat(vestingTimeRemaining(bill).hours, "h, ").concat(vestingTimeRemaining(bill).minutes, "m") })), _jsx(Flex, __assign({ className: "column column-claimall" }, { children: _jsx(Flex, __assign({ className: "column-claimall button" }, { children: _jsx(Button, __assign({ disabled: !account, sx: {
|
|
360
341
|
height: ['36px', '36px', '36px', '26px'],
|
|
361
342
|
lineHeight: '12px',
|
|
362
343
|
fontSize: '14px',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { ChainId } from '@ape.swap/apeswap-lists';
|
|
2
|
+
import { Bills, CleanedBondsState, UserBill } from '../../types/bonds';
|
|
3
3
|
/**
|
|
4
4
|
* Fetches user-owned bill NFT data for a given set of owned bills data, chain ID, and bills.
|
|
5
5
|
* @param ownedBillsData An array of objects containing the ID, bill NFT address, and contract address of the owned bills.
|
|
@@ -11,5 +11,5 @@ export declare const fetchUserOwnedBillNftData: (ownedBillsData: {
|
|
|
11
11
|
id: string;
|
|
12
12
|
billNftAddress: string;
|
|
13
13
|
contractAddress: string;
|
|
14
|
-
}[], chainId: ChainId, bills:
|
|
14
|
+
}[], chainId: ChainId, bills: (CleanedBondsState | Bills)[]) => Promise<any[]>;
|
|
15
15
|
export declare const fetchUserOwnedBills: (chainId: ChainId, account: string, bills: CleanedBondsState[]) => Promise<UserBill[]>;
|
|
@@ -37,8 +37,8 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
37
37
|
import billAbi from '../../config/abi/bond.json';
|
|
38
38
|
import BigNumber from 'bignumber.js';
|
|
39
39
|
import { getBillNftBatchData } from './getBillNftData';
|
|
40
|
+
import { BillVersion } from '@ape.swap/apeswap-lists';
|
|
40
41
|
import multicall from '../../utils/multicall';
|
|
41
|
-
import { BillVersion } from '../../enum/apeswaplists';
|
|
42
42
|
/**
|
|
43
43
|
* Fetches user-owned bill NFT data for a given set of owned bills data, chain ID, and bills.
|
|
44
44
|
* @param ownedBillsData An array of objects containing the ID, bill NFT address, and contract address of the owned bills.
|
|
@@ -55,10 +55,10 @@ export var fetchUserOwnedBillNftData = function (ownedBillsData, chainId, bills)
|
|
|
55
55
|
billsFetched = [];
|
|
56
56
|
// Loop through each owned bill and check if it exists in the bills array
|
|
57
57
|
ownedBillsData === null || ownedBillsData === void 0 ? void 0 : ownedBillsData.forEach(function (_a) {
|
|
58
|
+
var _b, _c;
|
|
58
59
|
var id = _a.id, billNftAddress = _a.billNftAddress, contractAddress = _a.contractAddress;
|
|
59
|
-
var bill = bills
|
|
60
|
-
.find(function (b) { return b.
|
|
61
|
-
// ?.userOwnedBillsNftData?.find((u) => +u.tokenId === +id)
|
|
60
|
+
var bill = (_c = (_b = bills
|
|
61
|
+
.find(function (b) { return b.contractAddress[chainId] === contractAddress; })) === null || _b === void 0 ? void 0 : _b.userOwnedBillsNftData) === null || _c === void 0 ? void 0 : _c.find(function (u) { return +u.tokenId === +id; });
|
|
62
62
|
// If the bill exists in the bills array, add it to the billsFetched array
|
|
63
63
|
if (bill) {
|
|
64
64
|
billsFetched.push({ id: id, data: bill });
|
package/dist/types/bonds.d.ts
CHANGED
|
@@ -46,68 +46,6 @@ export interface UserBillNft {
|
|
|
46
46
|
value: string;
|
|
47
47
|
}[];
|
|
48
48
|
}
|
|
49
|
-
export interface UserBillNftData {
|
|
50
|
-
id: number;
|
|
51
|
-
data: {
|
|
52
|
-
name: string;
|
|
53
|
-
description: string;
|
|
54
|
-
tokenId: number;
|
|
55
|
-
image: string;
|
|
56
|
-
attributes: {
|
|
57
|
-
trait_type: string;
|
|
58
|
-
value: string;
|
|
59
|
-
}[];
|
|
60
|
-
data: {
|
|
61
|
-
billContract: string;
|
|
62
|
-
billNftAddress: string;
|
|
63
|
-
payout: number;
|
|
64
|
-
deposit: number;
|
|
65
|
-
createTransactionHash: string;
|
|
66
|
-
billNftId: number;
|
|
67
|
-
expires: number;
|
|
68
|
-
vestingPeriodSeconds: number;
|
|
69
|
-
payoutToken: string;
|
|
70
|
-
principalToken: string;
|
|
71
|
-
type: string;
|
|
72
|
-
pairName: string;
|
|
73
|
-
payoutTokenData: {
|
|
74
|
-
address: string;
|
|
75
|
-
name: string;
|
|
76
|
-
symbol: string;
|
|
77
|
-
decimals: {
|
|
78
|
-
[chainId: number]: number;
|
|
79
|
-
};
|
|
80
|
-
};
|
|
81
|
-
token0: {
|
|
82
|
-
address: string;
|
|
83
|
-
symbol: string;
|
|
84
|
-
name: string;
|
|
85
|
-
decimals: {
|
|
86
|
-
[chainId: number]: number;
|
|
87
|
-
};
|
|
88
|
-
};
|
|
89
|
-
token1: {
|
|
90
|
-
address: string;
|
|
91
|
-
symbol: string;
|
|
92
|
-
name: string;
|
|
93
|
-
decimals: {
|
|
94
|
-
[chainId: number]: number;
|
|
95
|
-
};
|
|
96
|
-
};
|
|
97
|
-
dollarValue: number;
|
|
98
|
-
chainId: ChainId;
|
|
99
|
-
blockNumber: number;
|
|
100
|
-
bondArtCollection: string;
|
|
101
|
-
bondPartner: string;
|
|
102
|
-
bondVersion: string;
|
|
103
|
-
createdAddressOwner: string;
|
|
104
|
-
createdAt: number;
|
|
105
|
-
payoutTokenPrice: string;
|
|
106
|
-
};
|
|
107
|
-
contractAddress: string;
|
|
108
|
-
chainId: ChainId;
|
|
109
|
-
};
|
|
110
|
-
}
|
|
111
49
|
export interface UserBill {
|
|
112
50
|
address: string;
|
|
113
51
|
id: string;
|
package/package.json
CHANGED
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
[
|
|
2
|
-
{
|
|
3
|
-
"constant": true,
|
|
4
|
-
"inputs": [],
|
|
5
|
-
"name": "name",
|
|
6
|
-
"outputs": [{ "name": "", "type": "string" }],
|
|
7
|
-
"payable": false,
|
|
8
|
-
"stateMutability": "view",
|
|
9
|
-
"type": "function"
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
"constant": false,
|
|
13
|
-
"inputs": [
|
|
14
|
-
{ "name": "_spender", "type": "address" },
|
|
15
|
-
{ "name": "_value", "type": "uint256" }
|
|
16
|
-
],
|
|
17
|
-
"name": "approve",
|
|
18
|
-
"outputs": [{ "name": "", "type": "bool" }],
|
|
19
|
-
"payable": false,
|
|
20
|
-
"stateMutability": "nonpayable",
|
|
21
|
-
"type": "function"
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
"constant": true,
|
|
25
|
-
"inputs": [],
|
|
26
|
-
"name": "totalSupply",
|
|
27
|
-
"outputs": [{ "name": "", "type": "uint256" }],
|
|
28
|
-
"payable": false,
|
|
29
|
-
"stateMutability": "view",
|
|
30
|
-
"type": "function"
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
"constant": false,
|
|
34
|
-
"inputs": [
|
|
35
|
-
{ "name": "_from", "type": "address" },
|
|
36
|
-
{ "name": "_to", "type": "address" },
|
|
37
|
-
{ "name": "_value", "type": "uint256" }
|
|
38
|
-
],
|
|
39
|
-
"name": "transferFrom",
|
|
40
|
-
"outputs": [{ "name": "", "type": "bool" }],
|
|
41
|
-
"payable": false,
|
|
42
|
-
"stateMutability": "nonpayable",
|
|
43
|
-
"type": "function"
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
"constant": true,
|
|
47
|
-
"inputs": [],
|
|
48
|
-
"name": "decimals",
|
|
49
|
-
"outputs": [{ "name": "", "type": "uint8" }],
|
|
50
|
-
"payable": false,
|
|
51
|
-
"stateMutability": "view",
|
|
52
|
-
"type": "function"
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
"constant": true,
|
|
56
|
-
"inputs": [{ "name": "_owner", "type": "address" }],
|
|
57
|
-
"name": "balanceOf",
|
|
58
|
-
"outputs": [{ "name": "balance", "type": "uint256" }],
|
|
59
|
-
"payable": false,
|
|
60
|
-
"stateMutability": "view",
|
|
61
|
-
"type": "function"
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
"constant": true,
|
|
65
|
-
"inputs": [],
|
|
66
|
-
"name": "symbol",
|
|
67
|
-
"outputs": [{ "name": "", "type": "string" }],
|
|
68
|
-
"payable": false,
|
|
69
|
-
"stateMutability": "view",
|
|
70
|
-
"type": "function"
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
"constant": false,
|
|
74
|
-
"inputs": [
|
|
75
|
-
{ "name": "_to", "type": "address" },
|
|
76
|
-
{ "name": "_value", "type": "uint256" }
|
|
77
|
-
],
|
|
78
|
-
"name": "transfer",
|
|
79
|
-
"outputs": [{ "name": "", "type": "bool" }],
|
|
80
|
-
"payable": false,
|
|
81
|
-
"stateMutability": "nonpayable",
|
|
82
|
-
"type": "function"
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
"constant": true,
|
|
86
|
-
"inputs": [
|
|
87
|
-
{ "name": "_owner", "type": "address" },
|
|
88
|
-
{ "name": "_spender", "type": "address" }
|
|
89
|
-
],
|
|
90
|
-
"name": "allowance",
|
|
91
|
-
"outputs": [{ "name": "", "type": "uint256" }],
|
|
92
|
-
"payable": false,
|
|
93
|
-
"stateMutability": "view",
|
|
94
|
-
"type": "function"
|
|
95
|
-
},
|
|
96
|
-
{ "payable": true, "stateMutability": "payable", "type": "fallback" },
|
|
97
|
-
{
|
|
98
|
-
"anonymous": false,
|
|
99
|
-
"inputs": [
|
|
100
|
-
{ "indexed": true, "name": "owner", "type": "address" },
|
|
101
|
-
{ "indexed": true, "name": "spender", "type": "address" },
|
|
102
|
-
{ "indexed": false, "name": "value", "type": "uint256" }
|
|
103
|
-
],
|
|
104
|
-
"name": "Approval",
|
|
105
|
-
"type": "event"
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
"anonymous": false,
|
|
109
|
-
"inputs": [
|
|
110
|
-
{ "indexed": true, "name": "from", "type": "address" },
|
|
111
|
-
{ "indexed": true, "name": "to", "type": "address" },
|
|
112
|
-
{ "indexed": false, "name": "value", "type": "uint256" }
|
|
113
|
-
],
|
|
114
|
-
"name": "Transfer",
|
|
115
|
-
"type": "event"
|
|
116
|
-
}
|
|
117
|
-
]
|