@dripfi/drip-sdk 1.2.7 → 1.2.9
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/DripConfig.d.ts +1 -0
- package/dist/DripConfig.js +4 -0
- package/dist/DripSdk.d.ts +10 -0
- package/dist/DripSdk.js +121 -0
- package/dist/contracts/PerqVestingContract.d.ts +12 -0
- package/dist/contracts/PerqVestingContract.js +79 -0
- package/dist/contracts/abi/PerqVestingAbi.json +640 -0
- package/dist/types/VestingInfo.d.ts +7 -0
- package/dist/types/VestingInfo.js +2 -0
- package/package.json +1 -1
package/dist/DripConfig.d.ts
CHANGED
@@ -14,6 +14,7 @@ export declare class DripConfig {
|
|
14
14
|
dripTokenAddress: string;
|
15
15
|
dripTokenRecyclerAddress: string;
|
16
16
|
dripSwapAndRecyclerAddress: string;
|
17
|
+
perqVestingAddress: string;
|
17
18
|
constructor(chain: Chain, dripRoute?: string);
|
18
19
|
getSwapAndDepositContractAddress(signer: Signer): Promise<string>;
|
19
20
|
getSmartVaultManagerAddress(signer: Signer): Promise<string>;
|
package/dist/DripConfig.js
CHANGED
@@ -21,10 +21,12 @@ var Chain;
|
|
21
21
|
const SUBGRAPH_URL_SEPOLIA = 'https://subgraph.satsuma-prod.com/49eb322da234/solidant/spool-v2-sepolia/api';
|
22
22
|
const RECYCLER_ADDRESS_SEPOLIA = '0x07F2264E199D62afe07E8288eC9D36d155fc3f24';
|
23
23
|
const SWAP_AND_RECYCLER_ADDRESS_SEPOLIA = '0xA4ed357FF233731860Ec8D0446FD95756d564014';
|
24
|
+
const VESTING_ADDRESS_SEPOLIA = '0xE780CE624Efe0523a24578e3AA7d6CA9F2C3CADc';
|
24
25
|
const DRIP_TOKEN_ADDRESS_SEPOLIA = '0x707B4Cc05645713d8Ea04FBC7192A0f2c1503d6E';
|
25
26
|
const SUBGRAPH_URL_MAINNET = 'https://subgraph.satsuma-prod.com/49eb322da234/solidant/spool-v2/api';
|
26
27
|
// const RECYCLER_ADDRESS_MAINNET = '';
|
27
28
|
// const SWAP_AND_RECYCLER_ADDRESS_MAINNET = '0xA4ed357FF233731860Ec8D0446FD95756d564014';
|
29
|
+
// const VESTING_ADDRESS_MAINNET = '0x1234'
|
28
30
|
const DRIP_TOKEN_ADDRESS_MAINNET = '0x2a414884a549ef5716bc1a4e648d3dc03f08b2cf';
|
29
31
|
const DEV_BACKEND_ROUTE = 'https://dev.drip.fi.io';
|
30
32
|
const PROD_BACKEND_ROUTE = 'https://perq.finance';
|
@@ -37,6 +39,7 @@ class DripConfig {
|
|
37
39
|
this.dripTokenAddress = DRIP_TOKEN_ADDRESS_MAINNET;
|
38
40
|
this.dripTokenRecyclerAddress = exports.NULL_ADDRESS;
|
39
41
|
this.dripSwapAndRecyclerAddress = exports.NULL_ADDRESS;
|
42
|
+
this.perqVestingAddress = exports.NULL_ADDRESS;
|
40
43
|
break;
|
41
44
|
case Chain.SEPOLIA:
|
42
45
|
this.internalConfig = (0, spool_v2_sdk_1.getSepoliaConfig)(SUBGRAPH_URL_SEPOLIA);
|
@@ -44,6 +47,7 @@ class DripConfig {
|
|
44
47
|
this.dripTokenAddress = DRIP_TOKEN_ADDRESS_SEPOLIA;
|
45
48
|
this.dripTokenRecyclerAddress = RECYCLER_ADDRESS_SEPOLIA;
|
46
49
|
this.dripSwapAndRecyclerAddress = SWAP_AND_RECYCLER_ADDRESS_SEPOLIA;
|
50
|
+
this.perqVestingAddress = VESTING_ADDRESS_SEPOLIA;
|
47
51
|
break;
|
48
52
|
}
|
49
53
|
}
|
package/dist/DripSdk.d.ts
CHANGED
@@ -12,11 +12,13 @@ import { Chain } from './DripConfig';
|
|
12
12
|
import { BeansBalance } from './types/BeansBalance';
|
13
13
|
import { PerqToBeansSwapInfo } from './types/PerqToBeansSwapInfo';
|
14
14
|
import BeanEntry from './types/BeanEntry';
|
15
|
+
import { VestingInfo } from './types/VestingInfo';
|
15
16
|
export default class DripSdk {
|
16
17
|
private dripApi;
|
17
18
|
private dripTokenContract;
|
18
19
|
private dripTokenRecyclerContract;
|
19
20
|
private dripSwapAndRecyclerContract;
|
21
|
+
private perqVestingContract;
|
20
22
|
private spoolSdk?;
|
21
23
|
private signer?;
|
22
24
|
private dripConfig;
|
@@ -65,6 +67,14 @@ export default class DripSdk {
|
|
65
67
|
getDripTokenContractAddress(): string;
|
66
68
|
getSwapPerqForBeansInfo(): Promise<PerqToBeansSwapInfo>;
|
67
69
|
transferErc20Token(tokenAddress: string, amount: string, receiver: string): Promise<string>;
|
70
|
+
getVestingStart(): Promise<string>;
|
71
|
+
getVestingEnd(): Promise<string>;
|
72
|
+
getVestedAmount(beneficiary: string): Promise<string>;
|
73
|
+
getReleasableAmount(beneficiary: string): Promise<string>;
|
74
|
+
getReleasableTotalAmount(beneficiary: string): Promise<string>;
|
75
|
+
getAllVestingInfo(beneficiaryAddress: string): Promise<VestingInfo>;
|
76
|
+
claimVestedPerq(amount: string): Promise<string>;
|
77
|
+
burnVestedPerq(amount: string, price: string, deadline: string, signature: string): Promise<string>;
|
68
78
|
private generateRedeemBagStruct;
|
69
79
|
private getERC20Precission;
|
70
80
|
private calculatePendingDeposits;
|
package/dist/DripSdk.js
CHANGED
@@ -21,6 +21,8 @@ const js_cookie_1 = __importDefault(require("js-cookie"));
|
|
21
21
|
const DripTokenContract_1 = __importDefault(require("./contracts/DripTokenContract"));
|
22
22
|
const DripTokenRecyclerContract_1 = __importDefault(require("./contracts/DripTokenRecyclerContract"));
|
23
23
|
const DripSwapAndRecyclerContract_1 = __importDefault(require("./contracts/DripSwapAndRecyclerContract"));
|
24
|
+
const PerqVestingContract_1 = __importDefault(require("./contracts/PerqVestingContract"));
|
25
|
+
const utils_1 = require("ethers/lib/utils");
|
24
26
|
class DripSdk {
|
25
27
|
constructor(chain, signer, dripRoute) {
|
26
28
|
this.signer = signer;
|
@@ -32,6 +34,7 @@ class DripSdk {
|
|
32
34
|
this.dripTokenContract = new DripTokenContract_1.default(this.dripConfig.dripTokenAddress, signer);
|
33
35
|
this.dripTokenRecyclerContract = new DripTokenRecyclerContract_1.default(this.dripConfig.dripTokenRecyclerAddress, signer);
|
34
36
|
this.dripSwapAndRecyclerContract = new DripSwapAndRecyclerContract_1.default(this.dripConfig.dripSwapAndRecyclerAddress, signer);
|
37
|
+
this.perqVestingContract = new PerqVestingContract_1.default(this.dripConfig.perqVestingAddress, signer);
|
35
38
|
}
|
36
39
|
getAllVaults() {
|
37
40
|
return __awaiter(this, void 0, void 0, function* () {
|
@@ -536,6 +539,124 @@ class DripSdk {
|
|
536
539
|
return receipt.transactionHash;
|
537
540
|
});
|
538
541
|
}
|
542
|
+
getVestingStart() {
|
543
|
+
return __awaiter(this, void 0, void 0, function* () {
|
544
|
+
try {
|
545
|
+
const startBigNumber = yield this.perqVestingContract.start();
|
546
|
+
return startBigNumber.toString();
|
547
|
+
}
|
548
|
+
catch (error) {
|
549
|
+
if (error instanceof Error) {
|
550
|
+
throw new Error(`Failed to get vesting start time: ${error.message}`);
|
551
|
+
}
|
552
|
+
throw new Error('Failed to get vesting start time: Unknown error');
|
553
|
+
}
|
554
|
+
});
|
555
|
+
}
|
556
|
+
getVestingEnd() {
|
557
|
+
return __awaiter(this, void 0, void 0, function* () {
|
558
|
+
try {
|
559
|
+
const endBigNumber = yield this.perqVestingContract.end();
|
560
|
+
return endBigNumber.toString();
|
561
|
+
}
|
562
|
+
catch (error) {
|
563
|
+
if (error instanceof Error) {
|
564
|
+
throw new Error(`Failed to get vesting end time: ${error.message}`);
|
565
|
+
}
|
566
|
+
throw new Error('Failed to get vesting end time: Unknown error');
|
567
|
+
}
|
568
|
+
});
|
569
|
+
}
|
570
|
+
getVestedAmount(beneficiary) {
|
571
|
+
return __awaiter(this, void 0, void 0, function* () {
|
572
|
+
try {
|
573
|
+
const vestedAmount = yield this.perqVestingContract.vested(beneficiary);
|
574
|
+
return (0, utils_1.formatUnits)(vestedAmount, 18);
|
575
|
+
}
|
576
|
+
catch (error) {
|
577
|
+
if (error instanceof Error) {
|
578
|
+
throw new Error(`Failed to get vested amount: ${error.message}`);
|
579
|
+
}
|
580
|
+
throw new Error('Failed to get vested amount: Unknown error');
|
581
|
+
}
|
582
|
+
});
|
583
|
+
}
|
584
|
+
getReleasableAmount(beneficiary) {
|
585
|
+
return __awaiter(this, void 0, void 0, function* () {
|
586
|
+
try {
|
587
|
+
const releasableAmount = yield this.perqVestingContract.releasable(beneficiary);
|
588
|
+
return (0, utils_1.formatUnits)(releasableAmount, 18);
|
589
|
+
}
|
590
|
+
catch (error) {
|
591
|
+
if (error instanceof Error) {
|
592
|
+
throw new Error(`Failed to get releasable amount: ${error.message}`);
|
593
|
+
}
|
594
|
+
throw new Error('Failed to get releasable amount: Unknown error');
|
595
|
+
}
|
596
|
+
});
|
597
|
+
}
|
598
|
+
getReleasableTotalAmount(beneficiary) {
|
599
|
+
return __awaiter(this, void 0, void 0, function* () {
|
600
|
+
try {
|
601
|
+
const releasableTotalAmount = yield this.perqVestingContract.releasableTotal(beneficiary);
|
602
|
+
return (0, utils_1.formatUnits)(releasableTotalAmount, 18);
|
603
|
+
}
|
604
|
+
catch (error) {
|
605
|
+
if (error instanceof Error) {
|
606
|
+
throw new Error(`Failed to get total releasable amount: ${error.message}`);
|
607
|
+
}
|
608
|
+
throw new Error('Failed to get total releasable amount: Unknown error');
|
609
|
+
}
|
610
|
+
});
|
611
|
+
}
|
612
|
+
getAllVestingInfo(beneficiaryAddress) {
|
613
|
+
return __awaiter(this, void 0, void 0, function* () {
|
614
|
+
const [startTimestamp, endTimestamp, vested, releasable, releasableTotal] = yield Promise.all([
|
615
|
+
this.getVestingStart(),
|
616
|
+
this.getVestingEnd(),
|
617
|
+
this.getVestedAmount(beneficiaryAddress),
|
618
|
+
this.getReleasableAmount(beneficiaryAddress),
|
619
|
+
this.getReleasableTotalAmount(beneficiaryAddress),
|
620
|
+
]);
|
621
|
+
return {
|
622
|
+
startTimestamp,
|
623
|
+
endTimestamp,
|
624
|
+
vested,
|
625
|
+
releasable,
|
626
|
+
releasableTotal,
|
627
|
+
};
|
628
|
+
});
|
629
|
+
}
|
630
|
+
claimVestedPerq(amount) {
|
631
|
+
return __awaiter(this, void 0, void 0, function* () {
|
632
|
+
try {
|
633
|
+
const claimTx = yield this.perqVestingContract.claim(amount);
|
634
|
+
const txReceipt = yield claimTx.wait();
|
635
|
+
return txReceipt.transactionHash;
|
636
|
+
}
|
637
|
+
catch (error) {
|
638
|
+
if (error instanceof Error) {
|
639
|
+
throw new Error(`Failed to get total releasable amount: ${error.message}`);
|
640
|
+
}
|
641
|
+
throw new Error('Failed to get total releasable amount: Unknown error');
|
642
|
+
}
|
643
|
+
});
|
644
|
+
}
|
645
|
+
burnVestedPerq(amount, price, deadline, signature) {
|
646
|
+
return __awaiter(this, void 0, void 0, function* () {
|
647
|
+
try {
|
648
|
+
const burnTx = yield this.perqVestingContract.burn(amount, price, deadline, signature);
|
649
|
+
const txReceipt = yield burnTx.wait();
|
650
|
+
return txReceipt.transactionHash;
|
651
|
+
}
|
652
|
+
catch (error) {
|
653
|
+
if (error instanceof Error) {
|
654
|
+
throw new Error(`Failed to get total releasable amount: ${error.message}`);
|
655
|
+
}
|
656
|
+
throw new Error('Failed to get total releasable amount: Unknown error');
|
657
|
+
}
|
658
|
+
});
|
659
|
+
}
|
539
660
|
generateRedeemBagStruct(vault, signerAddress, amountToWithdraw) {
|
540
661
|
return __awaiter(this, void 0, void 0, function* () {
|
541
662
|
if (!this.spoolSdk) {
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import { BigNumber, ContractTransaction, ethers } from 'ethers';
|
2
|
+
import BaseDripContract from './BaseDripContract';
|
3
|
+
export default class PerqVestingContract extends BaseDripContract {
|
4
|
+
constructor(address: string, signer?: ethers.Signer);
|
5
|
+
start(): Promise<BigNumber>;
|
6
|
+
end(): Promise<BigNumber>;
|
7
|
+
vested(beneficiary: string): Promise<BigNumber>;
|
8
|
+
releasable(beneficiary: string): Promise<BigNumber>;
|
9
|
+
releasableTotal(beneficiary: string): Promise<BigNumber>;
|
10
|
+
claim(amount: string): Promise<ContractTransaction>;
|
11
|
+
burn(amount: string, price: string, deadline: string, signature: string): Promise<ContractTransaction>;
|
12
|
+
}
|
@@ -0,0 +1,79 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
9
|
+
});
|
10
|
+
};
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
13
|
+
};
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
15
|
+
const ethers_1 = require("ethers");
|
16
|
+
const PerqVestingAbi_json_1 = __importDefault(require("./abi/PerqVestingAbi.json"));
|
17
|
+
const BaseDripContract_1 = __importDefault(require("./BaseDripContract"));
|
18
|
+
class PerqVestingContract extends BaseDripContract_1.default {
|
19
|
+
constructor(address, signer) {
|
20
|
+
super(address, new ethers_1.ethers.utils.Interface(PerqVestingAbi_json_1.default), signer);
|
21
|
+
}
|
22
|
+
start() {
|
23
|
+
return __awaiter(this, void 0, void 0, function* () {
|
24
|
+
if (!this.contract.signer) {
|
25
|
+
throw Error('No signer provided');
|
26
|
+
}
|
27
|
+
return yield this.contract.start();
|
28
|
+
});
|
29
|
+
}
|
30
|
+
end() {
|
31
|
+
return __awaiter(this, void 0, void 0, function* () {
|
32
|
+
if (!this.contract.signer) {
|
33
|
+
throw Error('No signer provided');
|
34
|
+
}
|
35
|
+
return yield this.contract.end();
|
36
|
+
});
|
37
|
+
}
|
38
|
+
vested(beneficiary) {
|
39
|
+
return __awaiter(this, void 0, void 0, function* () {
|
40
|
+
if (!this.contract.signer) {
|
41
|
+
throw Error('No signer provided');
|
42
|
+
}
|
43
|
+
return yield this.contract.vested(beneficiary);
|
44
|
+
});
|
45
|
+
}
|
46
|
+
releasable(beneficiary) {
|
47
|
+
return __awaiter(this, void 0, void 0, function* () {
|
48
|
+
if (!this.contract.signer) {
|
49
|
+
throw Error('No signer provided');
|
50
|
+
}
|
51
|
+
return yield this.contract.releasable(beneficiary);
|
52
|
+
});
|
53
|
+
}
|
54
|
+
releasableTotal(beneficiary) {
|
55
|
+
return __awaiter(this, void 0, void 0, function* () {
|
56
|
+
if (!this.contract.signer) {
|
57
|
+
throw Error('No signer provided');
|
58
|
+
}
|
59
|
+
return yield this.contract.releasableTotal(beneficiary);
|
60
|
+
});
|
61
|
+
}
|
62
|
+
claim(amount) {
|
63
|
+
return __awaiter(this, void 0, void 0, function* () {
|
64
|
+
if (!this.contract.signer) {
|
65
|
+
throw Error('No signer provided');
|
66
|
+
}
|
67
|
+
return yield this.contract.claim(amount);
|
68
|
+
});
|
69
|
+
}
|
70
|
+
burn(amount, price, deadline, signature) {
|
71
|
+
return __awaiter(this, void 0, void 0, function* () {
|
72
|
+
if (!this.contract.signer) {
|
73
|
+
throw Error('No signer provided');
|
74
|
+
}
|
75
|
+
return yield this.contract.burn(amount, price, deadline, signature);
|
76
|
+
});
|
77
|
+
}
|
78
|
+
}
|
79
|
+
exports.default = PerqVestingContract;
|
@@ -0,0 +1,640 @@
|
|
1
|
+
[
|
2
|
+
{
|
3
|
+
"inputs": [],
|
4
|
+
"stateMutability": "nonpayable",
|
5
|
+
"type": "constructor"
|
6
|
+
},
|
7
|
+
{
|
8
|
+
"inputs": [],
|
9
|
+
"name": "AccessControlBadConfirmation",
|
10
|
+
"type": "error"
|
11
|
+
},
|
12
|
+
{
|
13
|
+
"inputs": [
|
14
|
+
{
|
15
|
+
"internalType": "address",
|
16
|
+
"name": "account",
|
17
|
+
"type": "address"
|
18
|
+
},
|
19
|
+
{
|
20
|
+
"internalType": "bytes32",
|
21
|
+
"name": "neededRole",
|
22
|
+
"type": "bytes32"
|
23
|
+
}
|
24
|
+
],
|
25
|
+
"name": "AccessControlUnauthorizedAccount",
|
26
|
+
"type": "error"
|
27
|
+
},
|
28
|
+
{
|
29
|
+
"inputs": [
|
30
|
+
{
|
31
|
+
"internalType": "address",
|
32
|
+
"name": "target",
|
33
|
+
"type": "address"
|
34
|
+
}
|
35
|
+
],
|
36
|
+
"name": "AddressEmptyCode",
|
37
|
+
"type": "error"
|
38
|
+
},
|
39
|
+
{
|
40
|
+
"inputs": [
|
41
|
+
{
|
42
|
+
"internalType": "address",
|
43
|
+
"name": "account",
|
44
|
+
"type": "address"
|
45
|
+
}
|
46
|
+
],
|
47
|
+
"name": "AddressInsufficientBalance",
|
48
|
+
"type": "error"
|
49
|
+
},
|
50
|
+
{
|
51
|
+
"inputs": [],
|
52
|
+
"name": "FailedInnerCall",
|
53
|
+
"type": "error"
|
54
|
+
},
|
55
|
+
{
|
56
|
+
"inputs": [],
|
57
|
+
"name": "InvalidInitialization",
|
58
|
+
"type": "error"
|
59
|
+
},
|
60
|
+
{
|
61
|
+
"inputs": [],
|
62
|
+
"name": "NotInitializing",
|
63
|
+
"type": "error"
|
64
|
+
},
|
65
|
+
{
|
66
|
+
"inputs": [
|
67
|
+
{
|
68
|
+
"internalType": "address",
|
69
|
+
"name": "token",
|
70
|
+
"type": "address"
|
71
|
+
}
|
72
|
+
],
|
73
|
+
"name": "SafeERC20FailedOperation",
|
74
|
+
"type": "error"
|
75
|
+
},
|
76
|
+
{
|
77
|
+
"anonymous": false,
|
78
|
+
"inputs": [
|
79
|
+
{
|
80
|
+
"indexed": true,
|
81
|
+
"internalType": "address",
|
82
|
+
"name": "sender",
|
83
|
+
"type": "address"
|
84
|
+
},
|
85
|
+
{
|
86
|
+
"indexed": false,
|
87
|
+
"internalType": "uint256",
|
88
|
+
"name": "burnedAmount",
|
89
|
+
"type": "uint256"
|
90
|
+
}
|
91
|
+
],
|
92
|
+
"name": "Burned",
|
93
|
+
"type": "event"
|
94
|
+
},
|
95
|
+
{
|
96
|
+
"anonymous": false,
|
97
|
+
"inputs": [
|
98
|
+
{
|
99
|
+
"indexed": true,
|
100
|
+
"internalType": "address",
|
101
|
+
"name": "sender",
|
102
|
+
"type": "address"
|
103
|
+
},
|
104
|
+
{
|
105
|
+
"indexed": false,
|
106
|
+
"internalType": "uint256",
|
107
|
+
"name": "claimedAmount",
|
108
|
+
"type": "uint256"
|
109
|
+
}
|
110
|
+
],
|
111
|
+
"name": "Claimed",
|
112
|
+
"type": "event"
|
113
|
+
},
|
114
|
+
{
|
115
|
+
"anonymous": false,
|
116
|
+
"inputs": [
|
117
|
+
{
|
118
|
+
"indexed": false,
|
119
|
+
"internalType": "uint64",
|
120
|
+
"name": "version",
|
121
|
+
"type": "uint64"
|
122
|
+
}
|
123
|
+
],
|
124
|
+
"name": "Initialized",
|
125
|
+
"type": "event"
|
126
|
+
},
|
127
|
+
{
|
128
|
+
"anonymous": false,
|
129
|
+
"inputs": [
|
130
|
+
{
|
131
|
+
"indexed": true,
|
132
|
+
"internalType": "bytes32",
|
133
|
+
"name": "role",
|
134
|
+
"type": "bytes32"
|
135
|
+
},
|
136
|
+
{
|
137
|
+
"indexed": true,
|
138
|
+
"internalType": "bytes32",
|
139
|
+
"name": "previousAdminRole",
|
140
|
+
"type": "bytes32"
|
141
|
+
},
|
142
|
+
{
|
143
|
+
"indexed": true,
|
144
|
+
"internalType": "bytes32",
|
145
|
+
"name": "newAdminRole",
|
146
|
+
"type": "bytes32"
|
147
|
+
}
|
148
|
+
],
|
149
|
+
"name": "RoleAdminChanged",
|
150
|
+
"type": "event"
|
151
|
+
},
|
152
|
+
{
|
153
|
+
"anonymous": false,
|
154
|
+
"inputs": [
|
155
|
+
{
|
156
|
+
"indexed": true,
|
157
|
+
"internalType": "bytes32",
|
158
|
+
"name": "role",
|
159
|
+
"type": "bytes32"
|
160
|
+
},
|
161
|
+
{
|
162
|
+
"indexed": true,
|
163
|
+
"internalType": "address",
|
164
|
+
"name": "account",
|
165
|
+
"type": "address"
|
166
|
+
},
|
167
|
+
{
|
168
|
+
"indexed": true,
|
169
|
+
"internalType": "address",
|
170
|
+
"name": "sender",
|
171
|
+
"type": "address"
|
172
|
+
}
|
173
|
+
],
|
174
|
+
"name": "RoleGranted",
|
175
|
+
"type": "event"
|
176
|
+
},
|
177
|
+
{
|
178
|
+
"anonymous": false,
|
179
|
+
"inputs": [
|
180
|
+
{
|
181
|
+
"indexed": true,
|
182
|
+
"internalType": "bytes32",
|
183
|
+
"name": "role",
|
184
|
+
"type": "bytes32"
|
185
|
+
},
|
186
|
+
{
|
187
|
+
"indexed": true,
|
188
|
+
"internalType": "address",
|
189
|
+
"name": "account",
|
190
|
+
"type": "address"
|
191
|
+
},
|
192
|
+
{
|
193
|
+
"indexed": true,
|
194
|
+
"internalType": "address",
|
195
|
+
"name": "sender",
|
196
|
+
"type": "address"
|
197
|
+
}
|
198
|
+
],
|
199
|
+
"name": "RoleRevoked",
|
200
|
+
"type": "event"
|
201
|
+
},
|
202
|
+
{
|
203
|
+
"inputs": [],
|
204
|
+
"name": "ADMIN_ROLE",
|
205
|
+
"outputs": [
|
206
|
+
{
|
207
|
+
"internalType": "bytes32",
|
208
|
+
"name": "",
|
209
|
+
"type": "bytes32"
|
210
|
+
}
|
211
|
+
],
|
212
|
+
"stateMutability": "view",
|
213
|
+
"type": "function"
|
214
|
+
},
|
215
|
+
{
|
216
|
+
"inputs": [],
|
217
|
+
"name": "DEFAULT_ADMIN_ROLE",
|
218
|
+
"outputs": [
|
219
|
+
{
|
220
|
+
"internalType": "bytes32",
|
221
|
+
"name": "",
|
222
|
+
"type": "bytes32"
|
223
|
+
}
|
224
|
+
],
|
225
|
+
"stateMutability": "view",
|
226
|
+
"type": "function"
|
227
|
+
},
|
228
|
+
{
|
229
|
+
"inputs": [
|
230
|
+
{
|
231
|
+
"internalType": "address",
|
232
|
+
"name": "",
|
233
|
+
"type": "address"
|
234
|
+
}
|
235
|
+
],
|
236
|
+
"name": "addressToAllocation",
|
237
|
+
"outputs": [
|
238
|
+
{
|
239
|
+
"internalType": "uint256",
|
240
|
+
"name": "",
|
241
|
+
"type": "uint256"
|
242
|
+
}
|
243
|
+
],
|
244
|
+
"stateMutability": "view",
|
245
|
+
"type": "function"
|
246
|
+
},
|
247
|
+
{
|
248
|
+
"inputs": [
|
249
|
+
{
|
250
|
+
"internalType": "address",
|
251
|
+
"name": "",
|
252
|
+
"type": "address"
|
253
|
+
}
|
254
|
+
],
|
255
|
+
"name": "addressToBurnedAmount",
|
256
|
+
"outputs": [
|
257
|
+
{
|
258
|
+
"internalType": "uint256",
|
259
|
+
"name": "",
|
260
|
+
"type": "uint256"
|
261
|
+
}
|
262
|
+
],
|
263
|
+
"stateMutability": "view",
|
264
|
+
"type": "function"
|
265
|
+
},
|
266
|
+
{
|
267
|
+
"inputs": [
|
268
|
+
{
|
269
|
+
"internalType": "address",
|
270
|
+
"name": "",
|
271
|
+
"type": "address"
|
272
|
+
}
|
273
|
+
],
|
274
|
+
"name": "addressToClaimedAmount",
|
275
|
+
"outputs": [
|
276
|
+
{
|
277
|
+
"internalType": "uint256",
|
278
|
+
"name": "",
|
279
|
+
"type": "uint256"
|
280
|
+
}
|
281
|
+
],
|
282
|
+
"stateMutability": "view",
|
283
|
+
"type": "function"
|
284
|
+
},
|
285
|
+
{
|
286
|
+
"inputs": [
|
287
|
+
{
|
288
|
+
"internalType": "uint256",
|
289
|
+
"name": "amount_",
|
290
|
+
"type": "uint256"
|
291
|
+
},
|
292
|
+
{
|
293
|
+
"internalType": "uint256",
|
294
|
+
"name": "price",
|
295
|
+
"type": "uint256"
|
296
|
+
},
|
297
|
+
{
|
298
|
+
"internalType": "uint256",
|
299
|
+
"name": "deadline",
|
300
|
+
"type": "uint256"
|
301
|
+
},
|
302
|
+
{
|
303
|
+
"internalType": "bytes",
|
304
|
+
"name": "signature",
|
305
|
+
"type": "bytes"
|
306
|
+
}
|
307
|
+
],
|
308
|
+
"name": "burn",
|
309
|
+
"outputs": [],
|
310
|
+
"stateMutability": "nonpayable",
|
311
|
+
"type": "function"
|
312
|
+
},
|
313
|
+
{
|
314
|
+
"inputs": [
|
315
|
+
{
|
316
|
+
"internalType": "uint256",
|
317
|
+
"name": "amount_",
|
318
|
+
"type": "uint256"
|
319
|
+
}
|
320
|
+
],
|
321
|
+
"name": "claim",
|
322
|
+
"outputs": [],
|
323
|
+
"stateMutability": "nonpayable",
|
324
|
+
"type": "function"
|
325
|
+
},
|
326
|
+
{
|
327
|
+
"inputs": [],
|
328
|
+
"name": "duration",
|
329
|
+
"outputs": [
|
330
|
+
{
|
331
|
+
"internalType": "uint64",
|
332
|
+
"name": "",
|
333
|
+
"type": "uint64"
|
334
|
+
}
|
335
|
+
],
|
336
|
+
"stateMutability": "view",
|
337
|
+
"type": "function"
|
338
|
+
},
|
339
|
+
{
|
340
|
+
"inputs": [],
|
341
|
+
"name": "end",
|
342
|
+
"outputs": [
|
343
|
+
{
|
344
|
+
"internalType": "uint64",
|
345
|
+
"name": "",
|
346
|
+
"type": "uint64"
|
347
|
+
}
|
348
|
+
],
|
349
|
+
"stateMutability": "view",
|
350
|
+
"type": "function"
|
351
|
+
},
|
352
|
+
{
|
353
|
+
"inputs": [
|
354
|
+
{
|
355
|
+
"internalType": "bytes32",
|
356
|
+
"name": "role",
|
357
|
+
"type": "bytes32"
|
358
|
+
}
|
359
|
+
],
|
360
|
+
"name": "getRoleAdmin",
|
361
|
+
"outputs": [
|
362
|
+
{
|
363
|
+
"internalType": "bytes32",
|
364
|
+
"name": "",
|
365
|
+
"type": "bytes32"
|
366
|
+
}
|
367
|
+
],
|
368
|
+
"stateMutability": "view",
|
369
|
+
"type": "function"
|
370
|
+
},
|
371
|
+
{
|
372
|
+
"inputs": [
|
373
|
+
{
|
374
|
+
"internalType": "bytes32",
|
375
|
+
"name": "role",
|
376
|
+
"type": "bytes32"
|
377
|
+
},
|
378
|
+
{
|
379
|
+
"internalType": "address",
|
380
|
+
"name": "account",
|
381
|
+
"type": "address"
|
382
|
+
}
|
383
|
+
],
|
384
|
+
"name": "grantRole",
|
385
|
+
"outputs": [],
|
386
|
+
"stateMutability": "nonpayable",
|
387
|
+
"type": "function"
|
388
|
+
},
|
389
|
+
{
|
390
|
+
"inputs": [
|
391
|
+
{
|
392
|
+
"internalType": "bytes32",
|
393
|
+
"name": "role",
|
394
|
+
"type": "bytes32"
|
395
|
+
},
|
396
|
+
{
|
397
|
+
"internalType": "address",
|
398
|
+
"name": "account",
|
399
|
+
"type": "address"
|
400
|
+
}
|
401
|
+
],
|
402
|
+
"name": "hasRole",
|
403
|
+
"outputs": [
|
404
|
+
{
|
405
|
+
"internalType": "bool",
|
406
|
+
"name": "",
|
407
|
+
"type": "bool"
|
408
|
+
}
|
409
|
+
],
|
410
|
+
"stateMutability": "view",
|
411
|
+
"type": "function"
|
412
|
+
},
|
413
|
+
{
|
414
|
+
"inputs": [
|
415
|
+
{
|
416
|
+
"internalType": "contract ITokenRecycler",
|
417
|
+
"name": "tokenRecycler_",
|
418
|
+
"type": "address"
|
419
|
+
},
|
420
|
+
{
|
421
|
+
"internalType": "address",
|
422
|
+
"name": "admin_",
|
423
|
+
"type": "address"
|
424
|
+
},
|
425
|
+
{
|
426
|
+
"internalType": "uint64",
|
427
|
+
"name": "start_",
|
428
|
+
"type": "uint64"
|
429
|
+
},
|
430
|
+
{
|
431
|
+
"internalType": "uint64",
|
432
|
+
"name": "duration_",
|
433
|
+
"type": "uint64"
|
434
|
+
},
|
435
|
+
{
|
436
|
+
"components": [
|
437
|
+
{
|
438
|
+
"internalType": "address",
|
439
|
+
"name": "beneficiary",
|
440
|
+
"type": "address"
|
441
|
+
},
|
442
|
+
{
|
443
|
+
"internalType": "uint256",
|
444
|
+
"name": "allocation",
|
445
|
+
"type": "uint256"
|
446
|
+
}
|
447
|
+
],
|
448
|
+
"internalType": "struct Beneficiary[]",
|
449
|
+
"name": "beneficiaries_",
|
450
|
+
"type": "tuple[]"
|
451
|
+
}
|
452
|
+
],
|
453
|
+
"name": "initialize",
|
454
|
+
"outputs": [],
|
455
|
+
"stateMutability": "nonpayable",
|
456
|
+
"type": "function"
|
457
|
+
},
|
458
|
+
{
|
459
|
+
"inputs": [
|
460
|
+
{
|
461
|
+
"internalType": "address",
|
462
|
+
"name": "beneficiary_",
|
463
|
+
"type": "address"
|
464
|
+
}
|
465
|
+
],
|
466
|
+
"name": "releasable",
|
467
|
+
"outputs": [
|
468
|
+
{
|
469
|
+
"internalType": "uint256",
|
470
|
+
"name": "",
|
471
|
+
"type": "uint256"
|
472
|
+
}
|
473
|
+
],
|
474
|
+
"stateMutability": "view",
|
475
|
+
"type": "function"
|
476
|
+
},
|
477
|
+
{
|
478
|
+
"inputs": [
|
479
|
+
{
|
480
|
+
"internalType": "address",
|
481
|
+
"name": "beneficiary_",
|
482
|
+
"type": "address"
|
483
|
+
}
|
484
|
+
],
|
485
|
+
"name": "releasableTotal",
|
486
|
+
"outputs": [
|
487
|
+
{
|
488
|
+
"internalType": "uint256",
|
489
|
+
"name": "",
|
490
|
+
"type": "uint256"
|
491
|
+
}
|
492
|
+
],
|
493
|
+
"stateMutability": "view",
|
494
|
+
"type": "function"
|
495
|
+
},
|
496
|
+
{
|
497
|
+
"inputs": [
|
498
|
+
{
|
499
|
+
"internalType": "bytes32",
|
500
|
+
"name": "role",
|
501
|
+
"type": "bytes32"
|
502
|
+
},
|
503
|
+
{
|
504
|
+
"internalType": "address",
|
505
|
+
"name": "callerConfirmation",
|
506
|
+
"type": "address"
|
507
|
+
}
|
508
|
+
],
|
509
|
+
"name": "renounceRole",
|
510
|
+
"outputs": [],
|
511
|
+
"stateMutability": "nonpayable",
|
512
|
+
"type": "function"
|
513
|
+
},
|
514
|
+
{
|
515
|
+
"inputs": [
|
516
|
+
{
|
517
|
+
"internalType": "bytes32",
|
518
|
+
"name": "role",
|
519
|
+
"type": "bytes32"
|
520
|
+
},
|
521
|
+
{
|
522
|
+
"internalType": "address",
|
523
|
+
"name": "account",
|
524
|
+
"type": "address"
|
525
|
+
}
|
526
|
+
],
|
527
|
+
"name": "revokeRole",
|
528
|
+
"outputs": [],
|
529
|
+
"stateMutability": "nonpayable",
|
530
|
+
"type": "function"
|
531
|
+
},
|
532
|
+
{
|
533
|
+
"inputs": [],
|
534
|
+
"name": "start",
|
535
|
+
"outputs": [
|
536
|
+
{
|
537
|
+
"internalType": "uint64",
|
538
|
+
"name": "",
|
539
|
+
"type": "uint64"
|
540
|
+
}
|
541
|
+
],
|
542
|
+
"stateMutability": "view",
|
543
|
+
"type": "function"
|
544
|
+
},
|
545
|
+
{
|
546
|
+
"inputs": [
|
547
|
+
{
|
548
|
+
"internalType": "bytes4",
|
549
|
+
"name": "interfaceId",
|
550
|
+
"type": "bytes4"
|
551
|
+
}
|
552
|
+
],
|
553
|
+
"name": "supportsInterface",
|
554
|
+
"outputs": [
|
555
|
+
{
|
556
|
+
"internalType": "bool",
|
557
|
+
"name": "",
|
558
|
+
"type": "bool"
|
559
|
+
}
|
560
|
+
],
|
561
|
+
"stateMutability": "view",
|
562
|
+
"type": "function"
|
563
|
+
},
|
564
|
+
{
|
565
|
+
"inputs": [],
|
566
|
+
"name": "token",
|
567
|
+
"outputs": [
|
568
|
+
{
|
569
|
+
"internalType": "contract IERC20",
|
570
|
+
"name": "",
|
571
|
+
"type": "address"
|
572
|
+
}
|
573
|
+
],
|
574
|
+
"stateMutability": "view",
|
575
|
+
"type": "function"
|
576
|
+
},
|
577
|
+
{
|
578
|
+
"inputs": [],
|
579
|
+
"name": "tokenRecycler",
|
580
|
+
"outputs": [
|
581
|
+
{
|
582
|
+
"internalType": "contract ITokenRecycler",
|
583
|
+
"name": "",
|
584
|
+
"type": "address"
|
585
|
+
}
|
586
|
+
],
|
587
|
+
"stateMutability": "view",
|
588
|
+
"type": "function"
|
589
|
+
},
|
590
|
+
{
|
591
|
+
"inputs": [
|
592
|
+
{
|
593
|
+
"internalType": "address",
|
594
|
+
"name": "beneficiary_",
|
595
|
+
"type": "address"
|
596
|
+
}
|
597
|
+
],
|
598
|
+
"name": "vested",
|
599
|
+
"outputs": [
|
600
|
+
{
|
601
|
+
"internalType": "uint256",
|
602
|
+
"name": "",
|
603
|
+
"type": "uint256"
|
604
|
+
}
|
605
|
+
],
|
606
|
+
"stateMutability": "view",
|
607
|
+
"type": "function"
|
608
|
+
},
|
609
|
+
{
|
610
|
+
"inputs": [
|
611
|
+
{
|
612
|
+
"internalType": "uint256",
|
613
|
+
"name": "amount_",
|
614
|
+
"type": "uint256"
|
615
|
+
}
|
616
|
+
],
|
617
|
+
"name": "withdrawETH",
|
618
|
+
"outputs": [],
|
619
|
+
"stateMutability": "nonpayable",
|
620
|
+
"type": "function"
|
621
|
+
},
|
622
|
+
{
|
623
|
+
"inputs": [
|
624
|
+
{
|
625
|
+
"internalType": "contract IERC20",
|
626
|
+
"name": "token_",
|
627
|
+
"type": "address"
|
628
|
+
},
|
629
|
+
{
|
630
|
+
"internalType": "uint256",
|
631
|
+
"name": "amount_",
|
632
|
+
"type": "uint256"
|
633
|
+
}
|
634
|
+
],
|
635
|
+
"name": "withdrawToken",
|
636
|
+
"outputs": [],
|
637
|
+
"stateMutability": "nonpayable",
|
638
|
+
"type": "function"
|
639
|
+
}
|
640
|
+
]
|