@gearbox-protocol/sdk 1.15.9 → 1.15.11
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/lib/rewards/poolRewardParams.js +4 -4
- package/lib/types/@gearbox-protocol/core-v2/contracts/interfaces/IAirdropDistributor.sol/IAirdropDistributor.d.ts +36 -26
- package/lib/types/@gearbox-protocol/core-v2/contracts/interfaces/IAirdropDistributor.sol/IAirdropDistributorEvents.d.ts +14 -9
- package/lib/types/common.d.ts +1 -0
- package/lib/types/factories/@gearbox-protocol/core-v2/contracts/interfaces/IAirdropDistributor.sol/IAirdropDistributorEvents__factory.js +7 -1
- package/lib/types/factories/@gearbox-protocol/core-v2/contracts/interfaces/IAirdropDistributor.sol/IAirdropDistributor__factory.js +7 -6
- package/package.json +1 -1
|
@@ -28,14 +28,14 @@ exports.GEAR_PER_BLOCK = {
|
|
|
28
28
|
};
|
|
29
29
|
exports.GOERLI_BLOCK = 7694030;
|
|
30
30
|
exports.poolRewardsPerBlock.Goerli.dDAI.addValue(exports.GOERLI_BLOCK, ethers_1.BigNumber.from(10).pow(18).mul(exports.GEAR_PER_BLOCK.dDAI).div(100));
|
|
31
|
-
exports.poolRewardsPerBlock.Goerli.dUSDC.addValue(exports.GOERLI_BLOCK, ethers_1.BigNumber.from(10).pow(
|
|
31
|
+
exports.poolRewardsPerBlock.Goerli.dUSDC.addValue(exports.GOERLI_BLOCK, ethers_1.BigNumber.from(10).pow(18).mul(exports.GEAR_PER_BLOCK.dUSDC).div(100));
|
|
32
32
|
exports.poolRewardsPerBlock.Goerli.dWETH.addValue(exports.GOERLI_BLOCK, ethers_1.BigNumber.from(10).pow(18).mul(exports.GEAR_PER_BLOCK.dWETH).div(100));
|
|
33
|
-
exports.poolRewardsPerBlock.Goerli.dWBTC.addValue(exports.GOERLI_BLOCK, ethers_1.BigNumber.from(10).pow(
|
|
33
|
+
exports.poolRewardsPerBlock.Goerli.dWBTC.addValue(exports.GOERLI_BLOCK, ethers_1.BigNumber.from(10).pow(18).mul(exports.GEAR_PER_BLOCK.dWBTC).div(100));
|
|
34
34
|
exports.poolRewardsPerBlock.Goerli.dwstETH.addValue(exports.GOERLI_BLOCK, ethers_1.BigNumber.from(10).pow(18).mul(exports.GEAR_PER_BLOCK.dwstETH).div(100));
|
|
35
35
|
exports.MAINNET_BLOCK = 15820000;
|
|
36
36
|
exports.poolRewardsPerBlock.Mainnet.dDAI.addValue(exports.MAINNET_BLOCK, ethers_1.BigNumber.from(10).pow(18).mul(exports.GEAR_PER_BLOCK.dDAI).div(100));
|
|
37
|
-
exports.poolRewardsPerBlock.Mainnet.dUSDC.addValue(exports.MAINNET_BLOCK, ethers_1.BigNumber.from(10).pow(
|
|
37
|
+
exports.poolRewardsPerBlock.Mainnet.dUSDC.addValue(exports.MAINNET_BLOCK, ethers_1.BigNumber.from(10).pow(18).mul(exports.GEAR_PER_BLOCK.dUSDC).div(100));
|
|
38
38
|
exports.poolRewardsPerBlock.Mainnet.dWETH.addValue(exports.MAINNET_BLOCK, ethers_1.BigNumber.from(10).pow(18).mul(exports.GEAR_PER_BLOCK.dWETH).div(100));
|
|
39
|
-
exports.poolRewardsPerBlock.Mainnet.dWBTC.addValue(exports.MAINNET_BLOCK, ethers_1.BigNumber.from(10).pow(
|
|
39
|
+
exports.poolRewardsPerBlock.Mainnet.dWBTC.addValue(exports.MAINNET_BLOCK, ethers_1.BigNumber.from(10).pow(18).mul(exports.GEAR_PER_BLOCK.dWBTC).div(100));
|
|
40
40
|
exports.poolRewardsPerBlock.Mainnet.dwstETH.addValue(exports.MAINNET_BLOCK, ethers_1.BigNumber.from(10).pow(18).mul(exports.GEAR_PER_BLOCK.dwstETH).div(100));
|
|
41
41
|
// poolRewardsPerBlock.Goerli.dDAI.addValue(90000, BigNumber.from(0));
|
|
@@ -1,17 +1,22 @@
|
|
|
1
1
|
import type { BaseContract, BigNumber, BigNumberish, BytesLike, CallOverrides, ContractTransaction, Overrides, PopulatedTransaction, Signer, utils } from "ethers";
|
|
2
2
|
import type { FunctionFragment, Result, EventFragment } from "@ethersproject/abi";
|
|
3
3
|
import type { Listener, Provider } from "@ethersproject/providers";
|
|
4
|
-
import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from "../../../../../common";
|
|
4
|
+
import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent, PromiseOrValue } from "../../../../../common";
|
|
5
5
|
export interface IAirdropDistributorInterface extends utils.Interface {
|
|
6
6
|
functions: {
|
|
7
|
-
"claim(uint256,address,uint256,
|
|
7
|
+
"claim(uint256,address,uint256,bytes32[])": FunctionFragment;
|
|
8
8
|
"claimed(address)": FunctionFragment;
|
|
9
9
|
"merkleRoot()": FunctionFragment;
|
|
10
10
|
"token()": FunctionFragment;
|
|
11
11
|
};
|
|
12
12
|
getFunction(nameOrSignatureOrTopic: "claim" | "claimed" | "merkleRoot" | "token"): FunctionFragment;
|
|
13
|
-
encodeFunctionData(functionFragment: "claim", values: [
|
|
14
|
-
|
|
13
|
+
encodeFunctionData(functionFragment: "claim", values: [
|
|
14
|
+
PromiseOrValue<BigNumberish>,
|
|
15
|
+
PromiseOrValue<string>,
|
|
16
|
+
PromiseOrValue<BigNumberish>,
|
|
17
|
+
PromiseOrValue<BytesLike>[]
|
|
18
|
+
]): string;
|
|
19
|
+
encodeFunctionData(functionFragment: "claimed", values: [PromiseOrValue<string>]): string;
|
|
15
20
|
encodeFunctionData(functionFragment: "merkleRoot", values?: undefined): string;
|
|
16
21
|
encodeFunctionData(functionFragment: "token", values?: undefined): string;
|
|
17
22
|
decodeFunctionResult(functionFragment: "claim", data: BytesLike): Result;
|
|
@@ -19,7 +24,7 @@ export interface IAirdropDistributorInterface extends utils.Interface {
|
|
|
19
24
|
decodeFunctionResult(functionFragment: "merkleRoot", data: BytesLike): Result;
|
|
20
25
|
decodeFunctionResult(functionFragment: "token", data: BytesLike): Result;
|
|
21
26
|
events: {
|
|
22
|
-
"Claimed(address,uint256)": EventFragment;
|
|
27
|
+
"Claimed(address,uint256,bool)": EventFragment;
|
|
23
28
|
"RootUpdated(bytes32,bytes32)": EventFragment;
|
|
24
29
|
"TokenAllocated(address,uint8,uint256)": EventFragment;
|
|
25
30
|
};
|
|
@@ -30,8 +35,13 @@ export interface IAirdropDistributorInterface extends utils.Interface {
|
|
|
30
35
|
export interface ClaimedEventObject {
|
|
31
36
|
account: string;
|
|
32
37
|
amount: BigNumber;
|
|
38
|
+
historic: boolean;
|
|
33
39
|
}
|
|
34
|
-
export declare type ClaimedEvent = TypedEvent<[
|
|
40
|
+
export declare type ClaimedEvent = TypedEvent<[
|
|
41
|
+
string,
|
|
42
|
+
BigNumber,
|
|
43
|
+
boolean
|
|
44
|
+
], ClaimedEventObject>;
|
|
35
45
|
export declare type ClaimedEventFilter = TypedEventFilter<ClaimedEvent>;
|
|
36
46
|
export interface RootUpdatedEventObject {
|
|
37
47
|
oldRoot: string;
|
|
@@ -68,46 +78,46 @@ export interface IAirdropDistributor extends BaseContract {
|
|
|
68
78
|
once: OnEvent<this>;
|
|
69
79
|
removeListener: OnEvent<this>;
|
|
70
80
|
functions: {
|
|
71
|
-
claim(index: BigNumberish
|
|
72
|
-
from?:
|
|
81
|
+
claim(index: PromiseOrValue<BigNumberish>, account: PromiseOrValue<string>, totalAmount: PromiseOrValue<BigNumberish>, merkleProof: PromiseOrValue<BytesLike>[], overrides?: Overrides & {
|
|
82
|
+
from?: PromiseOrValue<string>;
|
|
73
83
|
}): Promise<ContractTransaction>;
|
|
74
|
-
claimed(user: string
|
|
84
|
+
claimed(user: PromiseOrValue<string>, overrides?: CallOverrides): Promise<[BigNumber]>;
|
|
75
85
|
merkleRoot(overrides?: CallOverrides): Promise<[string]>;
|
|
76
86
|
token(overrides?: CallOverrides): Promise<[string]>;
|
|
77
87
|
};
|
|
78
|
-
claim(index: BigNumberish
|
|
79
|
-
from?:
|
|
88
|
+
claim(index: PromiseOrValue<BigNumberish>, account: PromiseOrValue<string>, totalAmount: PromiseOrValue<BigNumberish>, merkleProof: PromiseOrValue<BytesLike>[], overrides?: Overrides & {
|
|
89
|
+
from?: PromiseOrValue<string>;
|
|
80
90
|
}): Promise<ContractTransaction>;
|
|
81
|
-
claimed(user: string
|
|
91
|
+
claimed(user: PromiseOrValue<string>, overrides?: CallOverrides): Promise<BigNumber>;
|
|
82
92
|
merkleRoot(overrides?: CallOverrides): Promise<string>;
|
|
83
93
|
token(overrides?: CallOverrides): Promise<string>;
|
|
84
94
|
callStatic: {
|
|
85
|
-
claim(index: BigNumberish
|
|
86
|
-
claimed(user: string
|
|
95
|
+
claim(index: PromiseOrValue<BigNumberish>, account: PromiseOrValue<string>, totalAmount: PromiseOrValue<BigNumberish>, merkleProof: PromiseOrValue<BytesLike>[], overrides?: CallOverrides): Promise<void>;
|
|
96
|
+
claimed(user: PromiseOrValue<string>, overrides?: CallOverrides): Promise<BigNumber>;
|
|
87
97
|
merkleRoot(overrides?: CallOverrides): Promise<string>;
|
|
88
98
|
token(overrides?: CallOverrides): Promise<string>;
|
|
89
99
|
};
|
|
90
100
|
filters: {
|
|
91
|
-
"Claimed(address,uint256)"(account?: string | null, amount?:
|
|
92
|
-
Claimed(account?: string | null, amount?:
|
|
93
|
-
"RootUpdated(bytes32,bytes32)"(oldRoot?: null, newRoot?: BytesLike | null): RootUpdatedEventFilter;
|
|
94
|
-
RootUpdated(oldRoot?: null, newRoot?: BytesLike | null): RootUpdatedEventFilter;
|
|
95
|
-
"TokenAllocated(address,uint8,uint256)"(account?: string | null, campaignId?: BigNumberish | null, amount?: null): TokenAllocatedEventFilter;
|
|
96
|
-
TokenAllocated(account?: string | null, campaignId?: BigNumberish | null, amount?: null): TokenAllocatedEventFilter;
|
|
101
|
+
"Claimed(address,uint256,bool)"(account?: PromiseOrValue<string> | null, amount?: null, historic?: PromiseOrValue<boolean> | null): ClaimedEventFilter;
|
|
102
|
+
Claimed(account?: PromiseOrValue<string> | null, amount?: null, historic?: PromiseOrValue<boolean> | null): ClaimedEventFilter;
|
|
103
|
+
"RootUpdated(bytes32,bytes32)"(oldRoot?: null, newRoot?: PromiseOrValue<BytesLike> | null): RootUpdatedEventFilter;
|
|
104
|
+
RootUpdated(oldRoot?: null, newRoot?: PromiseOrValue<BytesLike> | null): RootUpdatedEventFilter;
|
|
105
|
+
"TokenAllocated(address,uint8,uint256)"(account?: PromiseOrValue<string> | null, campaignId?: PromiseOrValue<BigNumberish> | null, amount?: null): TokenAllocatedEventFilter;
|
|
106
|
+
TokenAllocated(account?: PromiseOrValue<string> | null, campaignId?: PromiseOrValue<BigNumberish> | null, amount?: null): TokenAllocatedEventFilter;
|
|
97
107
|
};
|
|
98
108
|
estimateGas: {
|
|
99
|
-
claim(index: BigNumberish
|
|
100
|
-
from?:
|
|
109
|
+
claim(index: PromiseOrValue<BigNumberish>, account: PromiseOrValue<string>, totalAmount: PromiseOrValue<BigNumberish>, merkleProof: PromiseOrValue<BytesLike>[], overrides?: Overrides & {
|
|
110
|
+
from?: PromiseOrValue<string>;
|
|
101
111
|
}): Promise<BigNumber>;
|
|
102
|
-
claimed(user: string
|
|
112
|
+
claimed(user: PromiseOrValue<string>, overrides?: CallOverrides): Promise<BigNumber>;
|
|
103
113
|
merkleRoot(overrides?: CallOverrides): Promise<BigNumber>;
|
|
104
114
|
token(overrides?: CallOverrides): Promise<BigNumber>;
|
|
105
115
|
};
|
|
106
116
|
populateTransaction: {
|
|
107
|
-
claim(index: BigNumberish
|
|
108
|
-
from?:
|
|
117
|
+
claim(index: PromiseOrValue<BigNumberish>, account: PromiseOrValue<string>, totalAmount: PromiseOrValue<BigNumberish>, merkleProof: PromiseOrValue<BytesLike>[], overrides?: Overrides & {
|
|
118
|
+
from?: PromiseOrValue<string>;
|
|
109
119
|
}): Promise<PopulatedTransaction>;
|
|
110
|
-
claimed(user: string
|
|
120
|
+
claimed(user: PromiseOrValue<string>, overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
111
121
|
merkleRoot(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
112
122
|
token(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
113
123
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { BaseContract, BigNumber, BigNumberish, BytesLike, Signer, utils } from "ethers";
|
|
2
2
|
import type { EventFragment } from "@ethersproject/abi";
|
|
3
3
|
import type { Listener, Provider } from "@ethersproject/providers";
|
|
4
|
-
import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from "../../../../../common";
|
|
4
|
+
import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent, PromiseOrValue } from "../../../../../common";
|
|
5
5
|
export interface IAirdropDistributorEventsInterface extends utils.Interface {
|
|
6
6
|
functions: {};
|
|
7
7
|
events: {
|
|
8
|
-
"Claimed(address,uint256)": EventFragment;
|
|
8
|
+
"Claimed(address,uint256,bool)": EventFragment;
|
|
9
9
|
"RootUpdated(bytes32,bytes32)": EventFragment;
|
|
10
10
|
"TokenAllocated(address,uint8,uint256)": EventFragment;
|
|
11
11
|
};
|
|
@@ -16,8 +16,13 @@ export interface IAirdropDistributorEventsInterface extends utils.Interface {
|
|
|
16
16
|
export interface ClaimedEventObject {
|
|
17
17
|
account: string;
|
|
18
18
|
amount: BigNumber;
|
|
19
|
+
historic: boolean;
|
|
19
20
|
}
|
|
20
|
-
export declare type ClaimedEvent = TypedEvent<[
|
|
21
|
+
export declare type ClaimedEvent = TypedEvent<[
|
|
22
|
+
string,
|
|
23
|
+
BigNumber,
|
|
24
|
+
boolean
|
|
25
|
+
], ClaimedEventObject>;
|
|
21
26
|
export declare type ClaimedEventFilter = TypedEventFilter<ClaimedEvent>;
|
|
22
27
|
export interface RootUpdatedEventObject {
|
|
23
28
|
oldRoot: string;
|
|
@@ -56,12 +61,12 @@ export interface IAirdropDistributorEvents extends BaseContract {
|
|
|
56
61
|
functions: {};
|
|
57
62
|
callStatic: {};
|
|
58
63
|
filters: {
|
|
59
|
-
"Claimed(address,uint256)"(account?: string | null, amount?:
|
|
60
|
-
Claimed(account?: string | null, amount?:
|
|
61
|
-
"RootUpdated(bytes32,bytes32)"(oldRoot?: null, newRoot?: BytesLike | null): RootUpdatedEventFilter;
|
|
62
|
-
RootUpdated(oldRoot?: null, newRoot?: BytesLike | null): RootUpdatedEventFilter;
|
|
63
|
-
"TokenAllocated(address,uint8,uint256)"(account?: string | null, campaignId?: BigNumberish | null, amount?: null): TokenAllocatedEventFilter;
|
|
64
|
-
TokenAllocated(account?: string | null, campaignId?: BigNumberish | null, amount?: null): TokenAllocatedEventFilter;
|
|
64
|
+
"Claimed(address,uint256,bool)"(account?: PromiseOrValue<string> | null, amount?: null, historic?: PromiseOrValue<boolean> | null): ClaimedEventFilter;
|
|
65
|
+
Claimed(account?: PromiseOrValue<string> | null, amount?: null, historic?: PromiseOrValue<boolean> | null): ClaimedEventFilter;
|
|
66
|
+
"RootUpdated(bytes32,bytes32)"(oldRoot?: null, newRoot?: PromiseOrValue<BytesLike> | null): RootUpdatedEventFilter;
|
|
67
|
+
RootUpdated(oldRoot?: null, newRoot?: PromiseOrValue<BytesLike> | null): RootUpdatedEventFilter;
|
|
68
|
+
"TokenAllocated(address,uint8,uint256)"(account?: PromiseOrValue<string> | null, campaignId?: PromiseOrValue<BigNumberish> | null, amount?: null): TokenAllocatedEventFilter;
|
|
69
|
+
TokenAllocated(account?: PromiseOrValue<string> | null, campaignId?: PromiseOrValue<BigNumberish> | null, amount?: null): TokenAllocatedEventFilter;
|
|
65
70
|
};
|
|
66
71
|
estimateGas: {};
|
|
67
72
|
populateTransaction: {};
|
package/lib/types/common.d.ts
CHANGED
|
@@ -18,4 +18,5 @@ export declare type MinEthersFactory<C, ARGS> = {
|
|
|
18
18
|
};
|
|
19
19
|
export declare type GetContractTypeFromFactory<F> = F extends MinEthersFactory<infer C, any> ? C : never;
|
|
20
20
|
export declare type GetARGsTypeFromFactory<F> = F extends MinEthersFactory<any, any> ? Parameters<F["deploy"]> : never;
|
|
21
|
+
export declare type PromiseOrValue<T> = T | Promise<T>;
|
|
21
22
|
export {};
|
|
@@ -16,11 +16,17 @@ var _abi = [
|
|
|
16
16
|
type: "address",
|
|
17
17
|
},
|
|
18
18
|
{
|
|
19
|
-
indexed:
|
|
19
|
+
indexed: false,
|
|
20
20
|
internalType: "uint256",
|
|
21
21
|
name: "amount",
|
|
22
22
|
type: "uint256",
|
|
23
23
|
},
|
|
24
|
+
{
|
|
25
|
+
indexed: true,
|
|
26
|
+
internalType: "bool",
|
|
27
|
+
name: "historic",
|
|
28
|
+
type: "bool",
|
|
29
|
+
},
|
|
24
30
|
],
|
|
25
31
|
name: "Claimed",
|
|
26
32
|
type: "event",
|
|
@@ -16,11 +16,17 @@ var _abi = [
|
|
|
16
16
|
type: "address",
|
|
17
17
|
},
|
|
18
18
|
{
|
|
19
|
-
indexed:
|
|
19
|
+
indexed: false,
|
|
20
20
|
internalType: "uint256",
|
|
21
21
|
name: "amount",
|
|
22
22
|
type: "uint256",
|
|
23
23
|
},
|
|
24
|
+
{
|
|
25
|
+
indexed: true,
|
|
26
|
+
internalType: "bool",
|
|
27
|
+
name: "historic",
|
|
28
|
+
type: "bool",
|
|
29
|
+
},
|
|
24
30
|
],
|
|
25
31
|
name: "Claimed",
|
|
26
32
|
type: "event",
|
|
@@ -86,11 +92,6 @@ var _abi = [
|
|
|
86
92
|
name: "totalAmount",
|
|
87
93
|
type: "uint256",
|
|
88
94
|
},
|
|
89
|
-
{
|
|
90
|
-
internalType: "uint256",
|
|
91
|
-
name: "claimedAmount",
|
|
92
|
-
type: "uint256",
|
|
93
|
-
},
|
|
94
95
|
{
|
|
95
96
|
internalType: "bytes32[]",
|
|
96
97
|
name: "merkleProof",
|