@ape.swap/bonds-sdk 1.0.470 → 1.0.474
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/Modals/BondModal/BondModal.d.ts +6 -2
- package/dist/components/Modals/BondModal/BondModal.js +6 -7
- package/dist/components/YourBondsModal/YourBondsModal.d.ts +6 -2
- package/dist/components/YourBondsModal/YourBondsModal.js +8 -9
- package/dist/config/abi/bondNft.json +424 -0
- package/dist/config/abi/ens-public-resolver.json +816 -0
- package/dist/config/abi/ens-registrar.json +422 -0
- package/dist/config/abi/erc20_bytes32.json +30 -0
- package/dist/config/abi/jungleChef.json +291 -0
- package/dist/config/abi/launchBonds.json +2014 -0
- package/dist/config/abi/lockVeAbond.json +2198 -0
- package/dist/config/abi/migrationBond.json +1639 -0
- package/dist/config/abi/migrationFveAbond.json +160 -0
- package/dist/config/abi/multicallv3.json +92 -0
- package/dist/config/abi/sousChef.json +649 -0
- package/dist/config/abi/types/Banana.d.ts +417 -0
- package/dist/config/abi/types/Banana.js +1 -0
- package/dist/config/abi/types/Bond.d.ts +803 -0
- package/dist/config/abi/types/Bond.js +1 -0
- package/dist/config/abi/types/BondNft.d.ts +603 -0
- package/dist/config/abi/types/BondNft.js +1 -0
- package/dist/config/abi/types/EnsPublicResolver.d.ts +513 -0
- package/dist/config/abi/types/EnsPublicResolver.js +1 -0
- package/dist/config/abi/types/EnsRegistrar.d.ts +274 -0
- package/dist/config/abi/types/EnsRegistrar.js +1 -0
- package/dist/config/abi/types/Erc20.d.ts +168 -0
- package/dist/config/abi/types/Erc20.js +1 -0
- package/dist/config/abi/types/Erc20_bytes32.d.ts +50 -0
- package/dist/config/abi/types/Erc20_bytes32.js +1 -0
- package/dist/config/abi/types/JungleChef.d.ts +260 -0
- package/dist/config/abi/types/JungleChef.js +1 -0
- package/dist/config/abi/types/LaunchBonds.d.ts +1362 -0
- package/dist/config/abi/types/LaunchBonds.js +1 -0
- package/dist/config/abi/types/LensContract.d.ts +295 -0
- package/dist/config/abi/types/LensContract.js +1 -0
- package/dist/config/abi/types/LockVeAbond.d.ts +1279 -0
- package/dist/config/abi/types/LockVeAbond.js +1 -0
- package/dist/config/abi/types/MigrationBond.d.ts +1136 -0
- package/dist/config/abi/types/MigrationBond.js +1 -0
- package/dist/config/abi/types/MigrationFveAbond.d.ts +290 -0
- package/dist/config/abi/types/MigrationFveAbond.js +1 -0
- package/dist/config/abi/types/MiniComplexRewarder.d.ts +469 -0
- package/dist/config/abi/types/MiniComplexRewarder.js +1 -0
- package/dist/config/abi/types/Multicallv2.d.ts +150 -0
- package/dist/config/abi/types/Multicallv2.js +1 -0
- package/dist/config/abi/types/Multicallv3.d.ts +98 -0
- package/dist/config/abi/types/Multicallv3.js +1 -0
- package/dist/config/abi/types/NonFungibleApes.d.ts +532 -0
- package/dist/config/abi/types/NonFungibleApes.js +1 -0
- package/dist/config/abi/types/NonFungibleBananas.d.ts +505 -0
- package/dist/config/abi/types/NonFungibleBananas.js +1 -0
- package/dist/config/abi/types/PriceGetter.d.ts +713 -0
- package/dist/config/abi/types/PriceGetter.js +1 -0
- package/dist/config/abi/types/PriceGetterLinea.d.ts +789 -0
- package/dist/config/abi/types/PriceGetterLinea.js +1 -0
- package/dist/config/abi/types/PriceGetterV2.d.ts +729 -0
- package/dist/config/abi/types/PriceGetterV2.js +1 -0
- package/dist/config/abi/types/SousChef.d.ts +579 -0
- package/dist/config/abi/types/SousChef.js +1 -0
- package/dist/config/abi/types/Treasury.d.ts +277 -0
- package/dist/config/abi/types/Treasury.js +1 -0
- package/dist/config/abi/types/Weth.d.ts +221 -0
- package/dist/config/abi/types/Weth.js +1 -0
- package/dist/config/abi/types/Zap.d.ts +528 -0
- package/dist/config/abi/types/Zap.js +1 -0
- package/dist/config/abi/types/common.d.ts +22 -0
- package/dist/config/abi/types/common.js +1 -0
- package/dist/config/abi/types/factories/Banana__factory.d.ts +475 -0
- package/dist/config/abi/types/factories/Banana__factory.js +628 -0
- package/dist/config/abi/types/factories/BondNft__factory.d.ts +723 -0
- package/dist/config/abi/types/factories/BondNft__factory.js +951 -0
- package/dist/config/abi/types/factories/Bond__factory.d.ts +799 -0
- package/dist/config/abi/types/factories/Bond__factory.js +1042 -0
- package/dist/config/abi/types/factories/EnsPublicResolver__factory.d.ts +649 -0
- package/dist/config/abi/types/factories/EnsPublicResolver__factory.js +833 -0
- package/dist/config/abi/types/factories/EnsRegistrar__factory.d.ts +338 -0
- package/dist/config/abi/types/factories/EnsRegistrar__factory.js +439 -0
- package/dist/config/abi/types/factories/Erc20__factory.d.ts +175 -0
- package/dist/config/abi/types/factories/Erc20__factory.js +239 -0
- package/dist/config/abi/types/factories/Erc20_bytes32__factory.d.ts +30 -0
- package/dist/config/abi/types/factories/Erc20_bytes32__factory.js +47 -0
- package/dist/config/abi/types/factories/JungleChef__factory.d.ts +247 -0
- package/dist/config/abi/types/factories/JungleChef__factory.js +326 -0
- package/dist/config/abi/types/factories/LaunchBonds__factory.d.ts +1560 -0
- package/dist/config/abi/types/factories/LaunchBonds__factory.js +2031 -0
- package/dist/config/abi/types/factories/LensContract__factory.d.ts +254 -0
- package/dist/config/abi/types/factories/LensContract__factory.js +338 -0
- package/dist/config/abi/types/factories/LockVeAbond__factory.d.ts +1698 -0
- package/dist/config/abi/types/factories/LockVeAbond__factory.js +2215 -0
- package/dist/config/abi/types/factories/MigrationBond__factory.d.ts +1268 -0
- package/dist/config/abi/types/factories/MigrationBond__factory.js +1656 -0
- package/dist/config/abi/types/factories/MigrationFveAbond__factory.d.ts +262 -0
- package/dist/config/abi/types/factories/MigrationFveAbond__factory.js +346 -0
- package/dist/config/abi/types/factories/MiniComplexRewarder__factory.d.ts +448 -0
- package/dist/config/abi/types/factories/MiniComplexRewarder__factory.js +586 -0
- package/dist/config/abi/types/factories/Multicallv2__factory.d.ts +115 -0
- package/dist/config/abi/types/factories/Multicallv2__factory.js +160 -0
- package/dist/config/abi/types/factories/Multicallv3__factory.d.ts +76 -0
- package/dist/config/abi/types/factories/Multicallv3__factory.js +109 -0
- package/dist/config/abi/types/factories/NonFungibleApes__factory.d.ts +617 -0
- package/dist/config/abi/types/factories/NonFungibleApes__factory.js +810 -0
- package/dist/config/abi/types/factories/NonFungibleBananas__factory.d.ts +576 -0
- package/dist/config/abi/types/factories/NonFungibleBananas__factory.js +756 -0
- package/dist/config/abi/types/factories/PriceGetterLinea__factory.d.ts +1105 -0
- package/dist/config/abi/types/factories/PriceGetterLinea__factory.js +1465 -0
- package/dist/config/abi/types/factories/PriceGetterV2__factory.d.ts +1027 -0
- package/dist/config/abi/types/factories/PriceGetterV2__factory.js +1364 -0
- package/dist/config/abi/types/factories/PriceGetter__factory.d.ts +999 -0
- package/dist/config/abi/types/factories/PriceGetter__factory.js +1326 -0
- package/dist/config/abi/types/factories/SousChef__factory.d.ts +511 -0
- package/dist/config/abi/types/factories/SousChef__factory.js +666 -0
- package/dist/config/abi/types/factories/Treasury__factory.d.ts +235 -0
- package/dist/config/abi/types/factories/Treasury__factory.js +309 -0
- package/dist/config/abi/types/factories/Weth__factory.d.ts +220 -0
- package/dist/config/abi/types/factories/Weth__factory.js +296 -0
- package/dist/config/abi/types/factories/Zap__factory.d.ts +695 -0
- package/dist/config/abi/types/factories/Zap__factory.js +889 -0
- package/dist/config/abi/types/factories/index.d.ts +25 -0
- package/dist/config/abi/types/factories/index.js +28 -0
- package/dist/config/abi/types/index.d.ts +51 -0
- package/dist/config/abi/types/index.js +26 -0
- package/dist/config/abi/weth.json +279 -0
- package/dist/hooks/useClaimBill.d.ts +4 -0
- package/dist/hooks/useClaimBill.js +59 -0
- package/dist/hooks/useContract.d.ts +25 -0
- package/dist/hooks/useContract.js +107 -0
- package/dist/pages/Bonds/Bonds.d.ts +6 -1
- package/dist/pages/Bonds/Bonds.js +12 -13
- package/dist/pages/YourBonds/YourBonds.js +37 -10
- package/dist/utils/index.d.ts +16 -0
- package/dist/utils/index.js +127 -0
- package/dist/utils/track.d.ts +7 -0
- package/dist/utils/track.js +17 -0
- package/package.json +1 -1
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
/** @jsxImportSource theme-ui */
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import '../../../scss/BondModal.scss';
|
|
4
|
-
|
|
4
|
+
interface BondModalProps {
|
|
5
|
+
account: string;
|
|
6
|
+
accountChainId: number;
|
|
7
|
+
isActive: boolean;
|
|
5
8
|
isOpen: boolean;
|
|
6
9
|
onClose: () => void;
|
|
7
10
|
bondAddress: string | null;
|
|
8
|
-
}
|
|
11
|
+
}
|
|
12
|
+
declare const BondModal: React.FC<BondModalProps>;
|
|
9
13
|
export default BondModal;
|
|
@@ -49,7 +49,6 @@ import { jsxs as _jsxs, jsx as _jsx } from "theme-ui/jsx-runtime";
|
|
|
49
49
|
/** @jsxImportSource theme-ui */
|
|
50
50
|
import React, { useEffect, useState } from 'react';
|
|
51
51
|
import { Flex, Input, ThemeUIProvider } from 'theme-ui';
|
|
52
|
-
import { useWeb3React } from '@web3-react/core';
|
|
53
52
|
import { defaultTheme } from '../../../theme';
|
|
54
53
|
import getTimePeriods from '../../../utils/getTimePeriods';
|
|
55
54
|
import axios from 'axios';
|
|
@@ -68,12 +67,12 @@ import { NETWORK_ICONS } from '../../../config/constants/chains';
|
|
|
68
67
|
import { formatUSDNumber, getPremiumColor, premium, youGet, youGetUSD, youSpend, youSpendUSD } from './helper';
|
|
69
68
|
import '../../../scss/BondModal.scss';
|
|
70
69
|
var BondModal = function (_a) {
|
|
71
|
-
var isOpen = _a.isOpen, onClose = _a.onClose, bondAddress = _a.bondAddress;
|
|
70
|
+
var account = _a.account, accountChainId = _a.accountChainId, isActive = _a.isActive, isOpen = _a.isOpen, onClose = _a.onClose, bondAddress = _a.bondAddress;
|
|
72
71
|
if (!isOpen)
|
|
73
72
|
return null;
|
|
74
|
-
|
|
75
|
-
var
|
|
76
|
-
var
|
|
73
|
+
//const { account, isActive } = useWeb3React();
|
|
74
|
+
var _b = useState([]), bondData = _b[0], setBondData = _b[1];
|
|
75
|
+
var _c = useState(false), approvalStatus = _c[0], setApprovalStatus = _c[1];
|
|
77
76
|
//This is a temp solution, but we will force approval each time, and then once set we will set status here and allow
|
|
78
77
|
//user to buy
|
|
79
78
|
//Check with Fede if this needs to be temp, if we force approval everytime, isn't this fine?
|
|
@@ -180,11 +179,11 @@ var BondModal = function (_a) {
|
|
|
180
179
|
var singlePurchaseLimit = new BigNumber((_c = bond === null || bond === void 0 ? void 0 : bond.maxPayout) !== null && _c !== void 0 ? _c : 0).div(new BigNumber(10).pow((_d = bond === null || bond === void 0 ? void 0 : bond.payoutTokenDecimals) !== null && _d !== void 0 ? _d : 18));
|
|
181
180
|
return !available ? 0 : (singlePurchaseLimit.lt(safeAvailable) ? singlePurchaseLimit : safeAvailable);
|
|
182
181
|
};
|
|
183
|
-
var
|
|
182
|
+
var _d = useState(''), inputValue = _d[0], setInputValue = _d[1];
|
|
184
183
|
var handleInputChange = function (event) {
|
|
185
184
|
setInputValue(event.target.value);
|
|
186
185
|
};
|
|
187
|
-
var
|
|
186
|
+
var _e = useState(null), selectedBond = _e[0], setSelectedBond = _e[1];
|
|
188
187
|
var navigate = useNavigate();
|
|
189
188
|
var projectInfo = function (bond) {
|
|
190
189
|
setSelectedBond(bond);
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
/** @jsxImportSource theme-ui */
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import '../../scss/YourBondsModal.scss';
|
|
4
|
-
|
|
4
|
+
interface BondModalProps {
|
|
5
|
+
account: string;
|
|
6
|
+
accountChainId: number;
|
|
7
|
+
isActive: boolean;
|
|
5
8
|
isOpen: boolean;
|
|
6
9
|
onClose: () => void;
|
|
7
10
|
bondAddress: string | null;
|
|
8
|
-
}
|
|
11
|
+
}
|
|
12
|
+
declare const YourBondsModal: React.FC<BondModalProps>;
|
|
9
13
|
export default YourBondsModal;
|
|
@@ -49,7 +49,6 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "theme-ui/jsx-
|
|
|
49
49
|
/** @jsxImportSource theme-ui */
|
|
50
50
|
import React, { useEffect, useState } from 'react';
|
|
51
51
|
import { Flex, ThemeUIProvider } from 'theme-ui';
|
|
52
|
-
import { useWeb3React } from '@web3-react/core';
|
|
53
52
|
import { defaultTheme } from '../../theme';
|
|
54
53
|
import '../../scss/YourBondsModal.scss';
|
|
55
54
|
import axios from 'axios';
|
|
@@ -66,13 +65,13 @@ import { StyledHeadingText, TraitsContentContainer } from '../Modals/YourBondsMo
|
|
|
66
65
|
import { AnimatePresence, motion } from 'framer-motion';
|
|
67
66
|
import { fetchUserOwnedBillsDataAsync } from '../../pages/YourBonds/fetchBillsUser';
|
|
68
67
|
var YourBondsModal = function (_a) {
|
|
69
|
-
var isOpen = _a.isOpen, onClose = _a.onClose, bondAddress = _a.bondAddress;
|
|
68
|
+
var account = _a.account, accountChainId = _a.accountChainId, isActive = _a.isActive, isOpen = _a.isOpen, onClose = _a.onClose, bondAddress = _a.bondAddress;
|
|
70
69
|
if (!isOpen)
|
|
71
70
|
return null;
|
|
72
|
-
|
|
71
|
+
// const { account, chainId, isActive } = useWeb3React();
|
|
73
72
|
// Fetch data for user owned bill
|
|
74
|
-
var
|
|
75
|
-
var
|
|
73
|
+
var _b = useState([]), bondData = _b[0], setBondData = _b[1];
|
|
74
|
+
var _c = useState([]), userOwnedBillsData = _c[0], setUserOwnedBillsData = _c[1];
|
|
76
75
|
useEffect(function () {
|
|
77
76
|
axios.get('https://realtime-api.ape.bond/bonds').then(function (response) {
|
|
78
77
|
var bond = response.data.bonds.filter(function (x) {
|
|
@@ -109,19 +108,19 @@ var YourBondsModal = function (_a) {
|
|
|
109
108
|
// Functions to calculate display values for modal
|
|
110
109
|
var totalPending = function (userBill) {
|
|
111
110
|
var _a, _b, _c, _d;
|
|
112
|
-
return getBalanceNumber(new BigNumber((_a = userBill === null || userBill === void 0 ? void 0 : userBill.payout) !== null && _a !== void 0 ? _a : 0), (_d = (_c = (_b = userBill.bond.earnToken) === null || _b === void 0 ? void 0 : _b.decimals) === null || _c === void 0 ? void 0 : _c[
|
|
111
|
+
return getBalanceNumber(new BigNumber((_a = userBill === null || userBill === void 0 ? void 0 : userBill.payout) !== null && _a !== void 0 ? _a : 0), (_d = (_c = (_b = userBill.bond.earnToken) === null || _b === void 0 ? void 0 : _b.decimals) === null || _c === void 0 ? void 0 : _c[accountChainId]) !== null && _d !== void 0 ? _d : 18);
|
|
113
112
|
};
|
|
114
113
|
var claimable = function (userBill) {
|
|
115
114
|
var _a, _b, _c;
|
|
116
|
-
return getBalanceNumber(new BigNumber(userBill.pendingRewards), (_c = (_b = (_a = userBill.bond.earnToken) === null || _a === void 0 ? void 0 : _a.decimals) === null || _b === void 0 ? void 0 : _b[
|
|
115
|
+
return getBalanceNumber(new BigNumber(userBill.pendingRewards), (_c = (_b = (_a = userBill.bond.earnToken) === null || _a === void 0 ? void 0 : _a.decimals) === null || _b === void 0 ? void 0 : _b[accountChainId]) !== null && _c !== void 0 ? _c : 18);
|
|
117
116
|
};
|
|
118
117
|
var earnTokenPrice = function (bond) {
|
|
119
118
|
var _a;
|
|
120
119
|
return getFirstNonZeroDigits(parseFloat((_a = bond === null || bond === void 0 ? void 0 : bond.payoutTokenPrice) !== null && _a !== void 0 ? _a : '0'));
|
|
121
120
|
};
|
|
122
121
|
var BILL_ATTRIBUTES = ['The Legend', 'The Location', 'The Moment', 'The Trend', 'The Innovation'];
|
|
123
|
-
var
|
|
124
|
-
var
|
|
122
|
+
var _d = useState(false), isOpenTraits = _d[0], setIsOpenTraits = _d[1];
|
|
123
|
+
var _e = useState(false), billRendered = _e[0], setBillRendered = _e[1];
|
|
125
124
|
useEffect(function () {
|
|
126
125
|
if (userOwnedBillsData.length > 0) {
|
|
127
126
|
setBillRendered(true);
|
|
@@ -0,0 +1,424 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"anonymous": false,
|
|
4
|
+
"inputs": [
|
|
5
|
+
{ "indexed": true, "internalType": "address", "name": "owner", "type": "address" },
|
|
6
|
+
{ "indexed": true, "internalType": "address", "name": "approved", "type": "address" },
|
|
7
|
+
{ "indexed": true, "internalType": "uint256", "name": "tokenId", "type": "uint256" }
|
|
8
|
+
],
|
|
9
|
+
"name": "Approval",
|
|
10
|
+
"type": "event"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"anonymous": false,
|
|
14
|
+
"inputs": [
|
|
15
|
+
{ "indexed": true, "internalType": "address", "name": "owner", "type": "address" },
|
|
16
|
+
{ "indexed": true, "internalType": "address", "name": "operator", "type": "address" },
|
|
17
|
+
{ "indexed": false, "internalType": "bool", "name": "approved", "type": "bool" }
|
|
18
|
+
],
|
|
19
|
+
"name": "ApprovalForAll",
|
|
20
|
+
"type": "event"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"anonymous": false,
|
|
24
|
+
"inputs": [{ "indexed": false, "internalType": "string", "name": "newUri", "type": "string" }],
|
|
25
|
+
"name": "BaseTokenUriChanged",
|
|
26
|
+
"type": "event"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"anonymous": false,
|
|
30
|
+
"inputs": [
|
|
31
|
+
{ "indexed": true, "internalType": "bytes32", "name": "role", "type": "bytes32" },
|
|
32
|
+
{ "indexed": true, "internalType": "bytes32", "name": "previousAdminRole", "type": "bytes32" },
|
|
33
|
+
{ "indexed": true, "internalType": "bytes32", "name": "newAdminRole", "type": "bytes32" }
|
|
34
|
+
],
|
|
35
|
+
"name": "RoleAdminChanged",
|
|
36
|
+
"type": "event"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"anonymous": false,
|
|
40
|
+
"inputs": [
|
|
41
|
+
{ "indexed": true, "internalType": "bytes32", "name": "role", "type": "bytes32" },
|
|
42
|
+
{ "indexed": true, "internalType": "address", "name": "account", "type": "address" },
|
|
43
|
+
{ "indexed": true, "internalType": "address", "name": "sender", "type": "address" }
|
|
44
|
+
],
|
|
45
|
+
"name": "RoleGranted",
|
|
46
|
+
"type": "event"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"anonymous": false,
|
|
50
|
+
"inputs": [
|
|
51
|
+
{ "indexed": true, "internalType": "bytes32", "name": "role", "type": "bytes32" },
|
|
52
|
+
{ "indexed": true, "internalType": "address", "name": "account", "type": "address" },
|
|
53
|
+
{ "indexed": true, "internalType": "address", "name": "sender", "type": "address" }
|
|
54
|
+
],
|
|
55
|
+
"name": "RoleRevoked",
|
|
56
|
+
"type": "event"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"anonymous": false,
|
|
60
|
+
"inputs": [
|
|
61
|
+
{ "indexed": true, "internalType": "address", "name": "from", "type": "address" },
|
|
62
|
+
{ "indexed": true, "internalType": "address", "name": "to", "type": "address" },
|
|
63
|
+
{ "indexed": true, "internalType": "uint256", "name": "tokenId", "type": "uint256" }
|
|
64
|
+
],
|
|
65
|
+
"name": "Transfer",
|
|
66
|
+
"type": "event"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"anonymous": false,
|
|
70
|
+
"inputs": [{ "indexed": false, "internalType": "bool", "name": "locked", "type": "bool" }],
|
|
71
|
+
"name": "UriLocked",
|
|
72
|
+
"type": "event"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"inputs": [],
|
|
76
|
+
"name": "DEFAULT_ADMIN_ROLE",
|
|
77
|
+
"outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }],
|
|
78
|
+
"stateMutability": "view",
|
|
79
|
+
"type": "function"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"inputs": [],
|
|
83
|
+
"name": "FACTORY_ROLE",
|
|
84
|
+
"outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }],
|
|
85
|
+
"stateMutability": "view",
|
|
86
|
+
"type": "function"
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"inputs": [],
|
|
90
|
+
"name": "MINTER_ROLE",
|
|
91
|
+
"outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }],
|
|
92
|
+
"stateMutability": "view",
|
|
93
|
+
"type": "function"
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"inputs": [],
|
|
97
|
+
"name": "URI_SETTER_ROLE",
|
|
98
|
+
"outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }],
|
|
99
|
+
"stateMutability": "view",
|
|
100
|
+
"type": "function"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"inputs": [{ "internalType": "address", "name": "minter", "type": "address" }],
|
|
104
|
+
"name": "addMinter",
|
|
105
|
+
"outputs": [],
|
|
106
|
+
"stateMutability": "nonpayable",
|
|
107
|
+
"type": "function"
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"inputs": [{ "internalType": "address", "name": "owner", "type": "address" }],
|
|
111
|
+
"name": "allTokensDataOfOwner",
|
|
112
|
+
"outputs": [
|
|
113
|
+
{
|
|
114
|
+
"components": [
|
|
115
|
+
{ "internalType": "uint256", "name": "tokenId", "type": "uint256" },
|
|
116
|
+
{ "internalType": "address", "name": "billAddress", "type": "address" }
|
|
117
|
+
],
|
|
118
|
+
"internalType": "struct BillNft.TokenData[]",
|
|
119
|
+
"name": "",
|
|
120
|
+
"type": "tuple[]"
|
|
121
|
+
}
|
|
122
|
+
],
|
|
123
|
+
"stateMutability": "view",
|
|
124
|
+
"type": "function"
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"inputs": [
|
|
128
|
+
{ "internalType": "address", "name": "to", "type": "address" },
|
|
129
|
+
{ "internalType": "uint256", "name": "tokenId", "type": "uint256" }
|
|
130
|
+
],
|
|
131
|
+
"name": "approve",
|
|
132
|
+
"outputs": [],
|
|
133
|
+
"stateMutability": "nonpayable",
|
|
134
|
+
"type": "function"
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"inputs": [{ "internalType": "address", "name": "owner", "type": "address" }],
|
|
138
|
+
"name": "balanceOf",
|
|
139
|
+
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
|
|
140
|
+
"stateMutability": "view",
|
|
141
|
+
"type": "function"
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"inputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
|
|
145
|
+
"name": "billAddresses",
|
|
146
|
+
"outputs": [{ "internalType": "address", "name": "", "type": "address" }],
|
|
147
|
+
"stateMutability": "view",
|
|
148
|
+
"type": "function"
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"inputs": [{ "internalType": "uint256", "name": "tokenId", "type": "uint256" }],
|
|
152
|
+
"name": "getApproved",
|
|
153
|
+
"outputs": [{ "internalType": "address", "name": "", "type": "address" }],
|
|
154
|
+
"stateMutability": "view",
|
|
155
|
+
"type": "function"
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"inputs": [{ "internalType": "bytes32", "name": "role", "type": "bytes32" }],
|
|
159
|
+
"name": "getRoleAdmin",
|
|
160
|
+
"outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }],
|
|
161
|
+
"stateMutability": "view",
|
|
162
|
+
"type": "function"
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"inputs": [
|
|
166
|
+
{ "internalType": "bytes32", "name": "role", "type": "bytes32" },
|
|
167
|
+
{ "internalType": "uint256", "name": "index", "type": "uint256" }
|
|
168
|
+
],
|
|
169
|
+
"name": "getRoleMember",
|
|
170
|
+
"outputs": [{ "internalType": "address", "name": "", "type": "address" }],
|
|
171
|
+
"stateMutability": "view",
|
|
172
|
+
"type": "function"
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
"inputs": [{ "internalType": "bytes32", "name": "role", "type": "bytes32" }],
|
|
176
|
+
"name": "getRoleMemberCount",
|
|
177
|
+
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
|
|
178
|
+
"stateMutability": "view",
|
|
179
|
+
"type": "function"
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
"inputs": [
|
|
183
|
+
{ "internalType": "address", "name": "owner", "type": "address" },
|
|
184
|
+
{ "internalType": "uint256", "name": "start", "type": "uint256" },
|
|
185
|
+
{ "internalType": "uint256", "name": "end", "type": "uint256" }
|
|
186
|
+
],
|
|
187
|
+
"name": "getTokensOfOwnerByIndexes",
|
|
188
|
+
"outputs": [
|
|
189
|
+
{
|
|
190
|
+
"components": [
|
|
191
|
+
{ "internalType": "uint256", "name": "tokenId", "type": "uint256" },
|
|
192
|
+
{ "internalType": "address", "name": "billAddress", "type": "address" }
|
|
193
|
+
],
|
|
194
|
+
"internalType": "struct BillNft.TokenData[]",
|
|
195
|
+
"name": "",
|
|
196
|
+
"type": "tuple[]"
|
|
197
|
+
}
|
|
198
|
+
],
|
|
199
|
+
"stateMutability": "view",
|
|
200
|
+
"type": "function"
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
"inputs": [
|
|
204
|
+
{ "internalType": "bytes32", "name": "role", "type": "bytes32" },
|
|
205
|
+
{ "internalType": "address", "name": "account", "type": "address" }
|
|
206
|
+
],
|
|
207
|
+
"name": "grantRole",
|
|
208
|
+
"outputs": [],
|
|
209
|
+
"stateMutability": "nonpayable",
|
|
210
|
+
"type": "function"
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
"inputs": [
|
|
214
|
+
{ "internalType": "bytes32", "name": "role", "type": "bytes32" },
|
|
215
|
+
{ "internalType": "address", "name": "account", "type": "address" }
|
|
216
|
+
],
|
|
217
|
+
"name": "hasRole",
|
|
218
|
+
"outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
|
|
219
|
+
"stateMutability": "view",
|
|
220
|
+
"type": "function"
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
"inputs": [
|
|
224
|
+
{ "internalType": "string", "name": "name", "type": "string" },
|
|
225
|
+
{ "internalType": "string", "name": "symbol", "type": "string" },
|
|
226
|
+
{ "internalType": "string", "name": "baseTokenURI", "type": "string" },
|
|
227
|
+
{ "internalType": "address", "name": "factory", "type": "address" },
|
|
228
|
+
{ "internalType": "address", "name": "owner", "type": "address" }
|
|
229
|
+
],
|
|
230
|
+
"name": "initialize",
|
|
231
|
+
"outputs": [],
|
|
232
|
+
"stateMutability": "nonpayable",
|
|
233
|
+
"type": "function"
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
"inputs": [
|
|
237
|
+
{ "internalType": "address", "name": "owner", "type": "address" },
|
|
238
|
+
{ "internalType": "address", "name": "operator", "type": "address" }
|
|
239
|
+
],
|
|
240
|
+
"name": "isApprovedForAll",
|
|
241
|
+
"outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
|
|
242
|
+
"stateMutability": "view",
|
|
243
|
+
"type": "function"
|
|
244
|
+
},
|
|
245
|
+
{ "inputs": [], "name": "lockURI", "outputs": [], "stateMutability": "nonpayable", "type": "function" },
|
|
246
|
+
{
|
|
247
|
+
"inputs": [
|
|
248
|
+
{ "internalType": "address", "name": "to", "type": "address" },
|
|
249
|
+
{ "internalType": "address", "name": "billAddress", "type": "address" }
|
|
250
|
+
],
|
|
251
|
+
"name": "mint",
|
|
252
|
+
"outputs": [{ "internalType": "uint256", "name": "newTokenId", "type": "uint256" }],
|
|
253
|
+
"stateMutability": "nonpayable",
|
|
254
|
+
"type": "function"
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
"inputs": [
|
|
258
|
+
{ "internalType": "uint256", "name": "amount", "type": "uint256" },
|
|
259
|
+
{ "internalType": "address", "name": "to", "type": "address" },
|
|
260
|
+
{ "internalType": "address", "name": "billAddress", "type": "address" }
|
|
261
|
+
],
|
|
262
|
+
"name": "mintMany",
|
|
263
|
+
"outputs": [],
|
|
264
|
+
"stateMutability": "nonpayable",
|
|
265
|
+
"type": "function"
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
"inputs": [],
|
|
269
|
+
"name": "name",
|
|
270
|
+
"outputs": [{ "internalType": "string", "name": "", "type": "string" }],
|
|
271
|
+
"stateMutability": "view",
|
|
272
|
+
"type": "function"
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
"inputs": [{ "internalType": "uint256", "name": "tokenId", "type": "uint256" }],
|
|
276
|
+
"name": "ownerOf",
|
|
277
|
+
"outputs": [{ "internalType": "address", "name": "", "type": "address" }],
|
|
278
|
+
"stateMutability": "view",
|
|
279
|
+
"type": "function"
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
"inputs": [
|
|
283
|
+
{ "internalType": "bytes32", "name": "role", "type": "bytes32" },
|
|
284
|
+
{ "internalType": "address", "name": "account", "type": "address" }
|
|
285
|
+
],
|
|
286
|
+
"name": "renounceRole",
|
|
287
|
+
"outputs": [],
|
|
288
|
+
"stateMutability": "nonpayable",
|
|
289
|
+
"type": "function"
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
"inputs": [
|
|
293
|
+
{ "internalType": "bytes32", "name": "role", "type": "bytes32" },
|
|
294
|
+
{ "internalType": "address", "name": "account", "type": "address" }
|
|
295
|
+
],
|
|
296
|
+
"name": "revokeRole",
|
|
297
|
+
"outputs": [],
|
|
298
|
+
"stateMutability": "nonpayable",
|
|
299
|
+
"type": "function"
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
"inputs": [
|
|
303
|
+
{ "internalType": "address", "name": "from", "type": "address" },
|
|
304
|
+
{ "internalType": "address", "name": "to", "type": "address" },
|
|
305
|
+
{ "internalType": "uint256", "name": "tokenId", "type": "uint256" }
|
|
306
|
+
],
|
|
307
|
+
"name": "safeTransferFrom",
|
|
308
|
+
"outputs": [],
|
|
309
|
+
"stateMutability": "nonpayable",
|
|
310
|
+
"type": "function"
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
"inputs": [
|
|
314
|
+
{ "internalType": "address", "name": "from", "type": "address" },
|
|
315
|
+
{ "internalType": "address", "name": "to", "type": "address" },
|
|
316
|
+
{ "internalType": "uint256", "name": "tokenId", "type": "uint256" },
|
|
317
|
+
{ "internalType": "bytes", "name": "_data", "type": "bytes" }
|
|
318
|
+
],
|
|
319
|
+
"name": "safeTransferFrom",
|
|
320
|
+
"outputs": [],
|
|
321
|
+
"stateMutability": "nonpayable",
|
|
322
|
+
"type": "function"
|
|
323
|
+
},
|
|
324
|
+
{
|
|
325
|
+
"inputs": [
|
|
326
|
+
{ "internalType": "address", "name": "operator", "type": "address" },
|
|
327
|
+
{ "internalType": "bool", "name": "approved", "type": "bool" }
|
|
328
|
+
],
|
|
329
|
+
"name": "setApprovalForAll",
|
|
330
|
+
"outputs": [],
|
|
331
|
+
"stateMutability": "nonpayable",
|
|
332
|
+
"type": "function"
|
|
333
|
+
},
|
|
334
|
+
{
|
|
335
|
+
"inputs": [{ "internalType": "string", "name": "baseTokenURI", "type": "string" }],
|
|
336
|
+
"name": "setBaseURI",
|
|
337
|
+
"outputs": [],
|
|
338
|
+
"stateMutability": "nonpayable",
|
|
339
|
+
"type": "function"
|
|
340
|
+
},
|
|
341
|
+
{
|
|
342
|
+
"inputs": [{ "internalType": "bytes4", "name": "interfaceId", "type": "bytes4" }],
|
|
343
|
+
"name": "supportsInterface",
|
|
344
|
+
"outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
|
|
345
|
+
"stateMutability": "view",
|
|
346
|
+
"type": "function"
|
|
347
|
+
},
|
|
348
|
+
{
|
|
349
|
+
"inputs": [],
|
|
350
|
+
"name": "symbol",
|
|
351
|
+
"outputs": [{ "internalType": "string", "name": "", "type": "string" }],
|
|
352
|
+
"stateMutability": "view",
|
|
353
|
+
"type": "function"
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
"inputs": [{ "internalType": "uint256", "name": "index", "type": "uint256" }],
|
|
357
|
+
"name": "tokenByIndex",
|
|
358
|
+
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
|
|
359
|
+
"stateMutability": "view",
|
|
360
|
+
"type": "function"
|
|
361
|
+
},
|
|
362
|
+
{
|
|
363
|
+
"inputs": [
|
|
364
|
+
{ "internalType": "address", "name": "owner", "type": "address" },
|
|
365
|
+
{ "internalType": "uint256", "name": "index", "type": "uint256" }
|
|
366
|
+
],
|
|
367
|
+
"name": "tokenDataOfOwnerByIndex",
|
|
368
|
+
"outputs": [
|
|
369
|
+
{
|
|
370
|
+
"components": [
|
|
371
|
+
{ "internalType": "uint256", "name": "tokenId", "type": "uint256" },
|
|
372
|
+
{ "internalType": "address", "name": "billAddress", "type": "address" }
|
|
373
|
+
],
|
|
374
|
+
"internalType": "struct BillNft.TokenData",
|
|
375
|
+
"name": "tokenData",
|
|
376
|
+
"type": "tuple"
|
|
377
|
+
}
|
|
378
|
+
],
|
|
379
|
+
"stateMutability": "view",
|
|
380
|
+
"type": "function"
|
|
381
|
+
},
|
|
382
|
+
{
|
|
383
|
+
"inputs": [
|
|
384
|
+
{ "internalType": "address", "name": "owner", "type": "address" },
|
|
385
|
+
{ "internalType": "uint256", "name": "index", "type": "uint256" }
|
|
386
|
+
],
|
|
387
|
+
"name": "tokenOfOwnerByIndex",
|
|
388
|
+
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
|
|
389
|
+
"stateMutability": "view",
|
|
390
|
+
"type": "function"
|
|
391
|
+
},
|
|
392
|
+
{
|
|
393
|
+
"inputs": [{ "internalType": "uint256", "name": "tokenId", "type": "uint256" }],
|
|
394
|
+
"name": "tokenURI",
|
|
395
|
+
"outputs": [{ "internalType": "string", "name": "", "type": "string" }],
|
|
396
|
+
"stateMutability": "view",
|
|
397
|
+
"type": "function"
|
|
398
|
+
},
|
|
399
|
+
{
|
|
400
|
+
"inputs": [],
|
|
401
|
+
"name": "totalSupply",
|
|
402
|
+
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
|
|
403
|
+
"stateMutability": "view",
|
|
404
|
+
"type": "function"
|
|
405
|
+
},
|
|
406
|
+
{
|
|
407
|
+
"inputs": [
|
|
408
|
+
{ "internalType": "address", "name": "from", "type": "address" },
|
|
409
|
+
{ "internalType": "address", "name": "to", "type": "address" },
|
|
410
|
+
{ "internalType": "uint256", "name": "tokenId", "type": "uint256" }
|
|
411
|
+
],
|
|
412
|
+
"name": "transferFrom",
|
|
413
|
+
"outputs": [],
|
|
414
|
+
"stateMutability": "nonpayable",
|
|
415
|
+
"type": "function"
|
|
416
|
+
},
|
|
417
|
+
{
|
|
418
|
+
"inputs": [],
|
|
419
|
+
"name": "uriLocked",
|
|
420
|
+
"outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
|
|
421
|
+
"stateMutability": "view",
|
|
422
|
+
"type": "function"
|
|
423
|
+
}
|
|
424
|
+
]
|