@sudobility/contracts 1.11.1 → 1.12.0
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/artifacts/contracts/Mailer.sol/Mailer.d.ts +120 -2
- package/artifacts/contracts/Mailer.sol/Mailer.dbg.json +1 -1
- package/artifacts/contracts/Mailer.sol/Mailer.json +120 -2
- package/artifacts/contracts/MockUSDC.sol/MockUSDC.dbg.json +1 -1
- package/artifacts/contracts/interfaces/IERC20.sol/IERC20.dbg.json +1 -1
- package/dist/evm/src/evm/index.d.ts +1 -1
- package/dist/evm/src/evm/index.d.ts.map +1 -1
- package/dist/evm/src/evm/index.js +1 -1
- package/dist/evm/src/evm/index.js.map +1 -1
- package/dist/evm/src/evm/mailer-client.d.ts +936 -180
- package/dist/evm/src/evm/mailer-client.d.ts.map +1 -1
- package/dist/evm/src/evm/mailer-client.js +451 -249
- package/dist/evm/src/evm/mailer-client.js.map +1 -1
- package/dist/evm/typechain-types/Mailer.d.ts +81 -11
- package/dist/evm/typechain-types/Mailer.d.ts.map +1 -1
- package/dist/evm/typechain-types/factories/Mailer__factory.d.ts +93 -1
- package/dist/evm/typechain-types/factories/Mailer__factory.d.ts.map +1 -1
- package/dist/evm/typechain-types/factories/Mailer__factory.js +119 -1
- package/dist/evm/typechain-types/factories/Mailer__factory.js.map +1 -1
- package/dist/solana/solana/index.d.ts +1 -1
- package/dist/solana/solana/index.d.ts.map +1 -1
- package/dist/solana/solana/index.js +3 -1
- package/dist/solana/solana/index.js.map +1 -1
- package/dist/solana/solana/mailer-client.d.ts +86 -20
- package/dist/solana/solana/mailer-client.d.ts.map +1 -1
- package/dist/solana/solana/mailer-client.js +290 -58
- package/dist/solana/solana/mailer-client.js.map +1 -1
- package/dist/unified/src/evm/index.d.ts +1 -1
- package/dist/unified/src/evm/index.d.ts.map +1 -1
- package/dist/unified/src/evm/index.js +1 -1
- package/dist/unified/src/evm/index.js.map +1 -1
- package/dist/unified/src/evm/mailer-client.d.ts +936 -180
- package/dist/unified/src/evm/mailer-client.d.ts.map +1 -1
- package/dist/unified/src/evm/mailer-client.js +451 -249
- package/dist/unified/src/evm/mailer-client.js.map +1 -1
- package/dist/unified/src/solana/index.d.ts +1 -1
- package/dist/unified/src/solana/index.d.ts.map +1 -1
- package/dist/unified/src/solana/index.js +3 -1
- package/dist/unified/src/solana/index.js.map +1 -1
- package/dist/unified/src/solana/mailer-client.d.ts +86 -20
- package/dist/unified/src/solana/mailer-client.d.ts.map +1 -1
- package/dist/unified/src/solana/mailer-client.js +290 -58
- package/dist/unified/src/solana/mailer-client.js.map +1 -1
- package/dist/unified/src/unified/onchain-mailer-client.d.ts +25 -0
- package/dist/unified/src/unified/onchain-mailer-client.d.ts.map +1 -1
- package/dist/unified/src/unified/onchain-mailer-client.js +147 -4
- package/dist/unified/src/unified/onchain-mailer-client.js.map +1 -1
- package/dist/unified/typechain-types/Mailer.d.ts +81 -11
- package/dist/unified/typechain-types/Mailer.d.ts.map +1 -1
- package/dist/unified/typechain-types/factories/Mailer__factory.d.ts +93 -1
- package/dist/unified/typechain-types/factories/Mailer__factory.d.ts.map +1 -1
- package/dist/unified/typechain-types/factories/Mailer__factory.js +119 -1
- package/dist/unified/typechain-types/factories/Mailer__factory.js.map +1 -1
- package/dist/unified-esm/src/evm/index.d.ts +1 -1
- package/dist/unified-esm/src/evm/index.d.ts.map +1 -1
- package/dist/unified-esm/src/evm/index.js +1 -1
- package/dist/unified-esm/src/evm/index.js.map +1 -1
- package/dist/unified-esm/src/evm/mailer-client.d.ts +936 -180
- package/dist/unified-esm/src/evm/mailer-client.d.ts.map +1 -1
- package/dist/unified-esm/src/evm/mailer-client.js +453 -251
- package/dist/unified-esm/src/evm/mailer-client.js.map +1 -1
- package/dist/unified-esm/src/solana/index.d.ts +1 -1
- package/dist/unified-esm/src/solana/index.d.ts.map +1 -1
- package/dist/unified-esm/src/solana/index.js +1 -1
- package/dist/unified-esm/src/solana/index.js.map +1 -1
- package/dist/unified-esm/src/solana/mailer-client.d.ts +86 -20
- package/dist/unified-esm/src/solana/mailer-client.d.ts.map +1 -1
- package/dist/unified-esm/src/solana/mailer-client.js +291 -59
- package/dist/unified-esm/src/solana/mailer-client.js.map +1 -1
- package/dist/unified-esm/src/unified/onchain-mailer-client.d.ts +25 -0
- package/dist/unified-esm/src/unified/onchain-mailer-client.d.ts.map +1 -1
- package/dist/unified-esm/src/unified/onchain-mailer-client.js +147 -4
- package/dist/unified-esm/src/unified/onchain-mailer-client.js.map +1 -1
- package/dist/unified-esm/typechain-types/Mailer.d.ts +81 -11
- package/dist/unified-esm/typechain-types/Mailer.d.ts.map +1 -1
- package/dist/unified-esm/typechain-types/factories/Mailer__factory.d.ts +93 -1
- package/dist/unified-esm/typechain-types/factories/Mailer__factory.d.ts.map +1 -1
- package/dist/unified-esm/typechain-types/factories/Mailer__factory.js +119 -1
- package/dist/unified-esm/typechain-types/factories/Mailer__factory.js.map +1 -1
- package/package.json +1 -1
- package/typechain-types/Mailer.ts +137 -9
- package/typechain-types/factories/Mailer__factory.ts +119 -1
|
@@ -1,210 +1,966 @@
|
|
|
1
|
-
import { Account, Address, Hash, PublicClient, WalletClient } from
|
|
1
|
+
import { Account, Address, Hash, PublicClient, WalletClient } from 'viem';
|
|
2
|
+
type RecipientClaim = {
|
|
3
|
+
amount: bigint;
|
|
4
|
+
expiresAt: bigint;
|
|
5
|
+
isExpired: boolean;
|
|
6
|
+
};
|
|
2
7
|
/**
|
|
3
|
-
*
|
|
4
|
-
* @description High-level TypeScript client for the Mailer contract using viem
|
|
5
|
-
* @notice Provides easy-to-use methods for sending messages with USDC fees and revenue sharing
|
|
6
|
-
*
|
|
7
|
-
* ## Key Features:
|
|
8
|
-
* - **Delegation Management**: Delegate mail handling with rejection capability
|
|
9
|
-
* - **Priority Messages**: Full fee (0.1 USDC) with 90% revenue share to recipient
|
|
10
|
-
* - **Standard Messages**: 10% fee only (0.01 USDC) with no revenue share
|
|
11
|
-
* - **Revenue Claims**: 60-day claim period for priority message revenue shares
|
|
12
|
-
*
|
|
13
|
-
* ## Usage Examples:
|
|
14
|
-
* ```typescript
|
|
15
|
-
* // Connect to existing contract
|
|
16
|
-
* import { createPublicClient, createWalletClient, http } from 'viem';
|
|
17
|
-
* import { mainnet } from 'viem/chains';
|
|
18
|
-
*
|
|
19
|
-
* const publicClient = createPublicClient({
|
|
20
|
-
* chain: mainnet,
|
|
21
|
-
* transport: http()
|
|
22
|
-
* });
|
|
23
|
-
*
|
|
24
|
-
* const mailer = new MailerClient('CONTRACT_ADDRESS', publicClient);
|
|
25
|
-
*
|
|
26
|
-
* // Send message with revenue sharing to recipient
|
|
27
|
-
* const walletClient = createWalletClient({
|
|
28
|
-
* chain: mainnet,
|
|
29
|
-
* transport: http()
|
|
30
|
-
* });
|
|
31
|
-
*
|
|
32
|
-
* await mailer.send('0x...', 'Subject', 'Body', true, walletClient, account);
|
|
33
|
-
*
|
|
34
|
-
* // Claim your revenue share (as recipient)
|
|
35
|
-
* await mailer.claimRecipientShare(walletClient, account);
|
|
36
|
-
* ```
|
|
8
|
+
* Gas estimation options for transactions
|
|
37
9
|
*/
|
|
38
|
-
export
|
|
39
|
-
private contractAddress;
|
|
40
|
-
private publicClient;
|
|
10
|
+
export interface GasOptions {
|
|
41
11
|
/**
|
|
42
|
-
*
|
|
43
|
-
* @
|
|
44
|
-
* @param publicClient Viem public client for reading blockchain state
|
|
12
|
+
* Gas multiplier to apply to estimated gas (e.g., 1.2 for 20% buffer)
|
|
13
|
+
* @default 1.2
|
|
45
14
|
*/
|
|
46
|
-
|
|
15
|
+
gasMultiplier?: number;
|
|
47
16
|
/**
|
|
48
|
-
*
|
|
49
|
-
* @param walletClient Viem wallet client with deployment permissions
|
|
50
|
-
* @param account Account to deploy from
|
|
51
|
-
* @param usdcTokenAddress Address of the USDC token contract
|
|
52
|
-
* @param ownerAddress Address that will own the deployed contract
|
|
53
|
-
* @returns Promise resolving to a MailerClient instance
|
|
17
|
+
* Maximum gas limit to use (prevents excessive gas usage)
|
|
54
18
|
*/
|
|
55
|
-
|
|
19
|
+
maxGasLimit?: bigint;
|
|
56
20
|
/**
|
|
57
|
-
*
|
|
58
|
-
* @notice Two modes:
|
|
59
|
-
* - revenueShareToReceiver=true: Sender pays 0.1 USDC, recipient gets 90% claimable
|
|
60
|
-
* - revenueShareToReceiver=false: Sender pays 0.01 USDC only
|
|
61
|
-
* @param to Recipient address who receives the message and potential revenue share
|
|
62
|
-
* @param subject Message subject line
|
|
63
|
-
* @param body Message content
|
|
64
|
-
* @param revenueShareToReceiver If true, recipient gets 90% revenue share; if false, no revenue share
|
|
65
|
-
* @param resolveSenderToName If true, resolve sender address to name via off-chain service
|
|
66
|
-
* @param walletClient Viem wallet client for transaction
|
|
67
|
-
* @param account Account to send from
|
|
68
|
-
* @returns Promise resolving to transaction hash
|
|
69
|
-
* @example
|
|
70
|
-
* ```typescript
|
|
71
|
-
* // Send with revenue share to recipient
|
|
72
|
-
* const hash = await mailer.send('0x...', 'Subject', 'Priority message', true, false, walletClient, account);
|
|
73
|
-
* // Send standard message (no revenue share)
|
|
74
|
-
* const hash2 = await mailer.send('0x...', 'Subject', 'Standard message', false, false, walletClient, account);
|
|
75
|
-
* await publicClient.waitForTransactionReceipt({ hash });
|
|
76
|
-
* ```
|
|
21
|
+
* Skip gas estimation and use provided gas limit
|
|
77
22
|
*/
|
|
78
|
-
|
|
23
|
+
gasLimit?: bigint;
|
|
79
24
|
/**
|
|
80
|
-
*
|
|
81
|
-
* @notice Two modes:
|
|
82
|
-
* - revenueShareToReceiver=true: Sender pays 0.1 USDC, recipient gets 90% claimable
|
|
83
|
-
* - revenueShareToReceiver=false: Sender pays 0.01 USDC only
|
|
84
|
-
* @param to Recipient address who receives the message and potential revenue share
|
|
85
|
-
* @param mailId Pre-prepared message identifier
|
|
86
|
-
* @param revenueShareToReceiver If true, recipient gets 90% revenue share; if false, no revenue share
|
|
87
|
-
* @param resolveSenderToName If true, resolve sender address to name via off-chain service
|
|
88
|
-
* @param walletClient Viem wallet client for transaction
|
|
89
|
-
* @param account Account to send from
|
|
90
|
-
* @returns Promise resolving to transaction hash
|
|
25
|
+
* Max fee per gas for EIP-1559 transactions
|
|
91
26
|
*/
|
|
92
|
-
|
|
93
|
-
getSendFee(): Promise<bigint>;
|
|
94
|
-
getUsdcToken(): Promise<Address>;
|
|
95
|
-
getAddress(): Address;
|
|
96
|
-
claimRecipientShare(walletClient: WalletClient, account: Account | Address): Promise<Hash>;
|
|
97
|
-
claimOwnerShare(walletClient: WalletClient, account: Account | Address): Promise<Hash>;
|
|
98
|
-
claimExpiredShares(recipient: string, walletClient: WalletClient, account: Account | Address): Promise<Hash>;
|
|
99
|
-
getRecipientClaimable(recipient: string): Promise<{
|
|
100
|
-
amount: bigint;
|
|
101
|
-
expiresAt: bigint;
|
|
102
|
-
isExpired: boolean;
|
|
103
|
-
}>;
|
|
104
|
-
getOwnerClaimable(): Promise<bigint>;
|
|
27
|
+
maxFeePerGas?: bigint;
|
|
105
28
|
/**
|
|
106
|
-
*
|
|
107
|
-
* @param delegate Address to delegate to (or 0x0 to clear delegation)
|
|
108
|
-
* @param walletClient Connected wallet client
|
|
109
|
-
* @param account Account to send transaction from
|
|
110
|
-
* @returns Transaction hash
|
|
29
|
+
* Max priority fee per gas for EIP-1559 transactions
|
|
111
30
|
*/
|
|
112
|
-
|
|
31
|
+
maxPriorityFeePerGas?: bigint;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Transaction result with gas estimation details
|
|
35
|
+
*/
|
|
36
|
+
export interface TransactionResult {
|
|
113
37
|
/**
|
|
114
|
-
*
|
|
115
|
-
* @param delegatingAddress Address that delegated to you
|
|
116
|
-
* @param walletClient Connected wallet client
|
|
117
|
-
* @param account Account to send transaction from
|
|
118
|
-
* @returns Transaction hash
|
|
38
|
+
* Transaction hash
|
|
119
39
|
*/
|
|
120
|
-
|
|
40
|
+
hash: Hash;
|
|
121
41
|
/**
|
|
122
|
-
*
|
|
123
|
-
* @returns Delegation fee amount
|
|
42
|
+
* Estimated gas used
|
|
124
43
|
*/
|
|
125
|
-
|
|
44
|
+
estimatedGas?: bigint;
|
|
126
45
|
/**
|
|
127
|
-
*
|
|
128
|
-
* @param newFee New fee amount in USDC (6 decimals)
|
|
129
|
-
* @param walletClient Connected wallet client
|
|
130
|
-
* @param account Account to send transaction from
|
|
131
|
-
* @returns Transaction hash
|
|
46
|
+
* Actual gas limit used
|
|
132
47
|
*/
|
|
133
|
-
|
|
48
|
+
gasLimit?: bigint;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* High-level client for interacting with the EVM Mailer contract.
|
|
52
|
+
* Exposes every callable contract function with type-safe wrappers.
|
|
53
|
+
* Includes automatic gas estimation with configurable buffer for all transactions.
|
|
54
|
+
*/
|
|
55
|
+
export declare class MailerClient {
|
|
56
|
+
static readonly abi: readonly [{
|
|
57
|
+
readonly inputs: readonly [{
|
|
58
|
+
readonly internalType: "address";
|
|
59
|
+
readonly name: "_usdcToken";
|
|
60
|
+
readonly type: "address";
|
|
61
|
+
}, {
|
|
62
|
+
readonly internalType: "address";
|
|
63
|
+
readonly name: "_owner";
|
|
64
|
+
readonly type: "address";
|
|
65
|
+
}];
|
|
66
|
+
readonly stateMutability: "nonpayable";
|
|
67
|
+
readonly type: "constructor";
|
|
68
|
+
}, {
|
|
69
|
+
readonly inputs: readonly [];
|
|
70
|
+
readonly name: "ClaimPeriodNotExpired";
|
|
71
|
+
readonly type: "error";
|
|
72
|
+
}, {
|
|
73
|
+
readonly inputs: readonly [];
|
|
74
|
+
readonly name: "ContractIsPaused";
|
|
75
|
+
readonly type: "error";
|
|
76
|
+
}, {
|
|
77
|
+
readonly inputs: readonly [];
|
|
78
|
+
readonly name: "ContractNotPaused";
|
|
79
|
+
readonly type: "error";
|
|
80
|
+
}, {
|
|
81
|
+
readonly inputs: readonly [];
|
|
82
|
+
readonly name: "FeePaymentRequired";
|
|
83
|
+
readonly type: "error";
|
|
84
|
+
}, {
|
|
85
|
+
readonly inputs: readonly [];
|
|
86
|
+
readonly name: "InvalidAddress";
|
|
87
|
+
readonly type: "error";
|
|
88
|
+
}, {
|
|
89
|
+
readonly inputs: readonly [];
|
|
90
|
+
readonly name: "InvalidPercentage";
|
|
91
|
+
readonly type: "error";
|
|
92
|
+
}, {
|
|
93
|
+
readonly inputs: readonly [];
|
|
94
|
+
readonly name: "MathOverflow";
|
|
95
|
+
readonly type: "error";
|
|
96
|
+
}, {
|
|
97
|
+
readonly inputs: readonly [];
|
|
98
|
+
readonly name: "NoClaimableAmount";
|
|
99
|
+
readonly type: "error";
|
|
100
|
+
}, {
|
|
101
|
+
readonly inputs: readonly [];
|
|
102
|
+
readonly name: "OnlyOwner";
|
|
103
|
+
readonly type: "error";
|
|
104
|
+
}, {
|
|
105
|
+
readonly inputs: readonly [];
|
|
106
|
+
readonly name: "ReentrancyGuard";
|
|
107
|
+
readonly type: "error";
|
|
108
|
+
}, {
|
|
109
|
+
readonly inputs: readonly [];
|
|
110
|
+
readonly name: "TransferFailed";
|
|
111
|
+
readonly type: "error";
|
|
112
|
+
}, {
|
|
113
|
+
readonly inputs: readonly [];
|
|
114
|
+
readonly name: "UnpermittedPayer";
|
|
115
|
+
readonly type: "error";
|
|
116
|
+
}, {
|
|
117
|
+
readonly anonymous: false;
|
|
118
|
+
readonly inputs: readonly [];
|
|
119
|
+
readonly name: "ContractPaused";
|
|
120
|
+
readonly type: "event";
|
|
121
|
+
}, {
|
|
122
|
+
readonly anonymous: false;
|
|
123
|
+
readonly inputs: readonly [];
|
|
124
|
+
readonly name: "ContractUnpaused";
|
|
125
|
+
readonly type: "event";
|
|
126
|
+
}, {
|
|
127
|
+
readonly anonymous: false;
|
|
128
|
+
readonly inputs: readonly [{
|
|
129
|
+
readonly indexed: true;
|
|
130
|
+
readonly internalType: "address";
|
|
131
|
+
readonly name: "account";
|
|
132
|
+
readonly type: "address";
|
|
133
|
+
}, {
|
|
134
|
+
readonly indexed: false;
|
|
135
|
+
readonly internalType: "uint256";
|
|
136
|
+
readonly name: "percentage";
|
|
137
|
+
readonly type: "uint256";
|
|
138
|
+
}];
|
|
139
|
+
readonly name: "CustomFeePercentageSet";
|
|
140
|
+
readonly type: "event";
|
|
141
|
+
}, {
|
|
142
|
+
readonly anonymous: false;
|
|
143
|
+
readonly inputs: readonly [{
|
|
144
|
+
readonly indexed: false;
|
|
145
|
+
readonly internalType: "uint256";
|
|
146
|
+
readonly name: "oldFee";
|
|
147
|
+
readonly type: "uint256";
|
|
148
|
+
}, {
|
|
149
|
+
readonly indexed: false;
|
|
150
|
+
readonly internalType: "uint256";
|
|
151
|
+
readonly name: "newFee";
|
|
152
|
+
readonly type: "uint256";
|
|
153
|
+
}];
|
|
154
|
+
readonly name: "DelegationFeeUpdated";
|
|
155
|
+
readonly type: "event";
|
|
156
|
+
}, {
|
|
157
|
+
readonly anonymous: false;
|
|
158
|
+
readonly inputs: readonly [{
|
|
159
|
+
readonly indexed: true;
|
|
160
|
+
readonly internalType: "address";
|
|
161
|
+
readonly name: "delegator";
|
|
162
|
+
readonly type: "address";
|
|
163
|
+
}, {
|
|
164
|
+
readonly indexed: true;
|
|
165
|
+
readonly internalType: "address";
|
|
166
|
+
readonly name: "delegate";
|
|
167
|
+
readonly type: "address";
|
|
168
|
+
}];
|
|
169
|
+
readonly name: "DelegationSet";
|
|
170
|
+
readonly type: "event";
|
|
171
|
+
}, {
|
|
172
|
+
readonly anonymous: false;
|
|
173
|
+
readonly inputs: readonly [];
|
|
174
|
+
readonly name: "EmergencyUnpaused";
|
|
175
|
+
readonly type: "event";
|
|
176
|
+
}, {
|
|
177
|
+
readonly anonymous: false;
|
|
178
|
+
readonly inputs: readonly [{
|
|
179
|
+
readonly indexed: true;
|
|
180
|
+
readonly internalType: "address";
|
|
181
|
+
readonly name: "recipient";
|
|
182
|
+
readonly type: "address";
|
|
183
|
+
}, {
|
|
184
|
+
readonly indexed: false;
|
|
185
|
+
readonly internalType: "uint256";
|
|
186
|
+
readonly name: "amount";
|
|
187
|
+
readonly type: "uint256";
|
|
188
|
+
}];
|
|
189
|
+
readonly name: "ExpiredSharesClaimed";
|
|
190
|
+
readonly type: "event";
|
|
191
|
+
}, {
|
|
192
|
+
readonly anonymous: false;
|
|
193
|
+
readonly inputs: readonly [{
|
|
194
|
+
readonly indexed: false;
|
|
195
|
+
readonly internalType: "uint256";
|
|
196
|
+
readonly name: "oldFee";
|
|
197
|
+
readonly type: "uint256";
|
|
198
|
+
}, {
|
|
199
|
+
readonly indexed: false;
|
|
200
|
+
readonly internalType: "uint256";
|
|
201
|
+
readonly name: "newFee";
|
|
202
|
+
readonly type: "uint256";
|
|
203
|
+
}];
|
|
204
|
+
readonly name: "FeeUpdated";
|
|
205
|
+
readonly type: "event";
|
|
206
|
+
}, {
|
|
207
|
+
readonly anonymous: false;
|
|
208
|
+
readonly inputs: readonly [{
|
|
209
|
+
readonly indexed: true;
|
|
210
|
+
readonly internalType: "address";
|
|
211
|
+
readonly name: "recipient";
|
|
212
|
+
readonly type: "address";
|
|
213
|
+
}, {
|
|
214
|
+
readonly indexed: false;
|
|
215
|
+
readonly internalType: "uint256";
|
|
216
|
+
readonly name: "amount";
|
|
217
|
+
readonly type: "uint256";
|
|
218
|
+
}];
|
|
219
|
+
readonly name: "FundsDistributed";
|
|
220
|
+
readonly type: "event";
|
|
221
|
+
}, {
|
|
222
|
+
readonly anonymous: false;
|
|
223
|
+
readonly inputs: readonly [{
|
|
224
|
+
readonly indexed: true;
|
|
225
|
+
readonly internalType: "address";
|
|
226
|
+
readonly name: "from";
|
|
227
|
+
readonly type: "address";
|
|
228
|
+
}, {
|
|
229
|
+
readonly indexed: true;
|
|
230
|
+
readonly internalType: "address";
|
|
231
|
+
readonly name: "to";
|
|
232
|
+
readonly type: "address";
|
|
233
|
+
}, {
|
|
234
|
+
readonly indexed: false;
|
|
235
|
+
readonly internalType: "string";
|
|
236
|
+
readonly name: "subject";
|
|
237
|
+
readonly type: "string";
|
|
238
|
+
}, {
|
|
239
|
+
readonly indexed: false;
|
|
240
|
+
readonly internalType: "string";
|
|
241
|
+
readonly name: "body";
|
|
242
|
+
readonly type: "string";
|
|
243
|
+
}, {
|
|
244
|
+
readonly indexed: false;
|
|
245
|
+
readonly internalType: "bool";
|
|
246
|
+
readonly name: "revenueShareToReceiver";
|
|
247
|
+
readonly type: "bool";
|
|
248
|
+
}, {
|
|
249
|
+
readonly indexed: false;
|
|
250
|
+
readonly internalType: "bool";
|
|
251
|
+
readonly name: "resolveSenderToName";
|
|
252
|
+
readonly type: "bool";
|
|
253
|
+
}];
|
|
254
|
+
readonly name: "MailSent";
|
|
255
|
+
readonly type: "event";
|
|
256
|
+
}, {
|
|
257
|
+
readonly anonymous: false;
|
|
258
|
+
readonly inputs: readonly [{
|
|
259
|
+
readonly indexed: true;
|
|
260
|
+
readonly internalType: "address";
|
|
261
|
+
readonly name: "from";
|
|
262
|
+
readonly type: "address";
|
|
263
|
+
}, {
|
|
264
|
+
readonly indexed: false;
|
|
265
|
+
readonly internalType: "string";
|
|
266
|
+
readonly name: "toEmail";
|
|
267
|
+
readonly type: "string";
|
|
268
|
+
}, {
|
|
269
|
+
readonly indexed: false;
|
|
270
|
+
readonly internalType: "string";
|
|
271
|
+
readonly name: "subject";
|
|
272
|
+
readonly type: "string";
|
|
273
|
+
}, {
|
|
274
|
+
readonly indexed: false;
|
|
275
|
+
readonly internalType: "string";
|
|
276
|
+
readonly name: "body";
|
|
277
|
+
readonly type: "string";
|
|
278
|
+
}];
|
|
279
|
+
readonly name: "MailSentToEmail";
|
|
280
|
+
readonly type: "event";
|
|
281
|
+
}, {
|
|
282
|
+
readonly anonymous: false;
|
|
283
|
+
readonly inputs: readonly [{
|
|
284
|
+
readonly indexed: false;
|
|
285
|
+
readonly internalType: "uint256";
|
|
286
|
+
readonly name: "amount";
|
|
287
|
+
readonly type: "uint256";
|
|
288
|
+
}];
|
|
289
|
+
readonly name: "OwnerClaimed";
|
|
290
|
+
readonly type: "event";
|
|
291
|
+
}, {
|
|
292
|
+
readonly anonymous: false;
|
|
293
|
+
readonly inputs: readonly [{
|
|
294
|
+
readonly indexed: true;
|
|
295
|
+
readonly internalType: "address";
|
|
296
|
+
readonly name: "contractAddress";
|
|
297
|
+
readonly type: "address";
|
|
298
|
+
}, {
|
|
299
|
+
readonly indexed: true;
|
|
300
|
+
readonly internalType: "address";
|
|
301
|
+
readonly name: "wallet";
|
|
302
|
+
readonly type: "address";
|
|
303
|
+
}];
|
|
304
|
+
readonly name: "PermissionGranted";
|
|
305
|
+
readonly type: "event";
|
|
306
|
+
}, {
|
|
307
|
+
readonly anonymous: false;
|
|
308
|
+
readonly inputs: readonly [{
|
|
309
|
+
readonly indexed: true;
|
|
310
|
+
readonly internalType: "address";
|
|
311
|
+
readonly name: "contractAddress";
|
|
312
|
+
readonly type: "address";
|
|
313
|
+
}, {
|
|
314
|
+
readonly indexed: true;
|
|
315
|
+
readonly internalType: "address";
|
|
316
|
+
readonly name: "wallet";
|
|
317
|
+
readonly type: "address";
|
|
318
|
+
}];
|
|
319
|
+
readonly name: "PermissionRevoked";
|
|
320
|
+
readonly type: "event";
|
|
321
|
+
}, {
|
|
322
|
+
readonly anonymous: false;
|
|
323
|
+
readonly inputs: readonly [{
|
|
324
|
+
readonly indexed: true;
|
|
325
|
+
readonly internalType: "address";
|
|
326
|
+
readonly name: "from";
|
|
327
|
+
readonly type: "address";
|
|
328
|
+
}, {
|
|
329
|
+
readonly indexed: true;
|
|
330
|
+
readonly internalType: "address";
|
|
331
|
+
readonly name: "to";
|
|
332
|
+
readonly type: "address";
|
|
333
|
+
}, {
|
|
334
|
+
readonly indexed: true;
|
|
335
|
+
readonly internalType: "string";
|
|
336
|
+
readonly name: "mailId";
|
|
337
|
+
readonly type: "string";
|
|
338
|
+
}, {
|
|
339
|
+
readonly indexed: false;
|
|
340
|
+
readonly internalType: "bool";
|
|
341
|
+
readonly name: "revenueShareToReceiver";
|
|
342
|
+
readonly type: "bool";
|
|
343
|
+
}, {
|
|
344
|
+
readonly indexed: false;
|
|
345
|
+
readonly internalType: "bool";
|
|
346
|
+
readonly name: "resolveSenderToName";
|
|
347
|
+
readonly type: "bool";
|
|
348
|
+
}];
|
|
349
|
+
readonly name: "PreparedMailSent";
|
|
350
|
+
readonly type: "event";
|
|
351
|
+
}, {
|
|
352
|
+
readonly anonymous: false;
|
|
353
|
+
readonly inputs: readonly [{
|
|
354
|
+
readonly indexed: true;
|
|
355
|
+
readonly internalType: "address";
|
|
356
|
+
readonly name: "from";
|
|
357
|
+
readonly type: "address";
|
|
358
|
+
}, {
|
|
359
|
+
readonly indexed: false;
|
|
360
|
+
readonly internalType: "string";
|
|
361
|
+
readonly name: "toEmail";
|
|
362
|
+
readonly type: "string";
|
|
363
|
+
}, {
|
|
364
|
+
readonly indexed: true;
|
|
365
|
+
readonly internalType: "string";
|
|
366
|
+
readonly name: "mailId";
|
|
367
|
+
readonly type: "string";
|
|
368
|
+
}];
|
|
369
|
+
readonly name: "PreparedMailSentToEmail";
|
|
370
|
+
readonly type: "event";
|
|
371
|
+
}, {
|
|
372
|
+
readonly anonymous: false;
|
|
373
|
+
readonly inputs: readonly [{
|
|
374
|
+
readonly indexed: true;
|
|
375
|
+
readonly internalType: "address";
|
|
376
|
+
readonly name: "recipient";
|
|
377
|
+
readonly type: "address";
|
|
378
|
+
}, {
|
|
379
|
+
readonly indexed: false;
|
|
380
|
+
readonly internalType: "uint256";
|
|
381
|
+
readonly name: "amount";
|
|
382
|
+
readonly type: "uint256";
|
|
383
|
+
}];
|
|
384
|
+
readonly name: "RecipientClaimed";
|
|
385
|
+
readonly type: "event";
|
|
386
|
+
}, {
|
|
387
|
+
readonly anonymous: false;
|
|
388
|
+
readonly inputs: readonly [{
|
|
389
|
+
readonly indexed: true;
|
|
390
|
+
readonly internalType: "address";
|
|
391
|
+
readonly name: "recipient";
|
|
392
|
+
readonly type: "address";
|
|
393
|
+
}, {
|
|
394
|
+
readonly indexed: false;
|
|
395
|
+
readonly internalType: "uint256";
|
|
396
|
+
readonly name: "recipientAmount";
|
|
397
|
+
readonly type: "uint256";
|
|
398
|
+
}, {
|
|
399
|
+
readonly indexed: false;
|
|
400
|
+
readonly internalType: "uint256";
|
|
401
|
+
readonly name: "ownerAmount";
|
|
402
|
+
readonly type: "uint256";
|
|
403
|
+
}];
|
|
404
|
+
readonly name: "SharesRecorded";
|
|
405
|
+
readonly type: "event";
|
|
406
|
+
}, {
|
|
407
|
+
readonly anonymous: false;
|
|
408
|
+
readonly inputs: readonly [{
|
|
409
|
+
readonly indexed: true;
|
|
410
|
+
readonly internalType: "address";
|
|
411
|
+
readonly name: "from";
|
|
412
|
+
readonly type: "address";
|
|
413
|
+
}, {
|
|
414
|
+
readonly indexed: true;
|
|
415
|
+
readonly internalType: "address";
|
|
416
|
+
readonly name: "to";
|
|
417
|
+
readonly type: "address";
|
|
418
|
+
}, {
|
|
419
|
+
readonly indexed: true;
|
|
420
|
+
readonly internalType: "string";
|
|
421
|
+
readonly name: "webhookId";
|
|
422
|
+
readonly type: "string";
|
|
423
|
+
}, {
|
|
424
|
+
readonly indexed: false;
|
|
425
|
+
readonly internalType: "bool";
|
|
426
|
+
readonly name: "revenueShareToReceiver";
|
|
427
|
+
readonly type: "bool";
|
|
428
|
+
}, {
|
|
429
|
+
readonly indexed: false;
|
|
430
|
+
readonly internalType: "bool";
|
|
431
|
+
readonly name: "resolveSenderToName";
|
|
432
|
+
readonly type: "bool";
|
|
433
|
+
}];
|
|
434
|
+
readonly name: "WebhookMailSent";
|
|
435
|
+
readonly type: "event";
|
|
436
|
+
}, {
|
|
437
|
+
readonly inputs: readonly [];
|
|
438
|
+
readonly name: "CLAIM_PERIOD";
|
|
439
|
+
readonly outputs: readonly [{
|
|
440
|
+
readonly internalType: "uint256";
|
|
441
|
+
readonly name: "";
|
|
442
|
+
readonly type: "uint256";
|
|
443
|
+
}];
|
|
444
|
+
readonly stateMutability: "view";
|
|
445
|
+
readonly type: "function";
|
|
446
|
+
}, {
|
|
447
|
+
readonly inputs: readonly [];
|
|
448
|
+
readonly name: "OWNER_SHARE";
|
|
449
|
+
readonly outputs: readonly [{
|
|
450
|
+
readonly internalType: "uint256";
|
|
451
|
+
readonly name: "";
|
|
452
|
+
readonly type: "uint256";
|
|
453
|
+
}];
|
|
454
|
+
readonly stateMutability: "view";
|
|
455
|
+
readonly type: "function";
|
|
456
|
+
}, {
|
|
457
|
+
readonly inputs: readonly [];
|
|
458
|
+
readonly name: "RECIPIENT_SHARE";
|
|
459
|
+
readonly outputs: readonly [{
|
|
460
|
+
readonly internalType: "uint256";
|
|
461
|
+
readonly name: "";
|
|
462
|
+
readonly type: "uint256";
|
|
463
|
+
}];
|
|
464
|
+
readonly stateMutability: "view";
|
|
465
|
+
readonly type: "function";
|
|
466
|
+
}, {
|
|
467
|
+
readonly inputs: readonly [{
|
|
468
|
+
readonly internalType: "address";
|
|
469
|
+
readonly name: "recipient";
|
|
470
|
+
readonly type: "address";
|
|
471
|
+
}];
|
|
472
|
+
readonly name: "claimExpiredShares";
|
|
473
|
+
readonly outputs: readonly [];
|
|
474
|
+
readonly stateMutability: "nonpayable";
|
|
475
|
+
readonly type: "function";
|
|
476
|
+
}, {
|
|
477
|
+
readonly inputs: readonly [];
|
|
478
|
+
readonly name: "claimOwnerShare";
|
|
479
|
+
readonly outputs: readonly [];
|
|
480
|
+
readonly stateMutability: "nonpayable";
|
|
481
|
+
readonly type: "function";
|
|
482
|
+
}, {
|
|
483
|
+
readonly inputs: readonly [];
|
|
484
|
+
readonly name: "claimRecipientShare";
|
|
485
|
+
readonly outputs: readonly [];
|
|
486
|
+
readonly stateMutability: "nonpayable";
|
|
487
|
+
readonly type: "function";
|
|
488
|
+
}, {
|
|
489
|
+
readonly inputs: readonly [{
|
|
490
|
+
readonly internalType: "address";
|
|
491
|
+
readonly name: "account";
|
|
492
|
+
readonly type: "address";
|
|
493
|
+
}];
|
|
494
|
+
readonly name: "clearCustomFeePercentage";
|
|
495
|
+
readonly outputs: readonly [];
|
|
496
|
+
readonly stateMutability: "nonpayable";
|
|
497
|
+
readonly type: "function";
|
|
498
|
+
}, {
|
|
499
|
+
readonly inputs: readonly [{
|
|
500
|
+
readonly internalType: "address";
|
|
501
|
+
readonly name: "";
|
|
502
|
+
readonly type: "address";
|
|
503
|
+
}];
|
|
504
|
+
readonly name: "customFeeDiscount";
|
|
505
|
+
readonly outputs: readonly [{
|
|
506
|
+
readonly internalType: "uint256";
|
|
507
|
+
readonly name: "";
|
|
508
|
+
readonly type: "uint256";
|
|
509
|
+
}];
|
|
510
|
+
readonly stateMutability: "view";
|
|
511
|
+
readonly type: "function";
|
|
512
|
+
}, {
|
|
513
|
+
readonly inputs: readonly [{
|
|
514
|
+
readonly internalType: "address";
|
|
515
|
+
readonly name: "delegate";
|
|
516
|
+
readonly type: "address";
|
|
517
|
+
}];
|
|
518
|
+
readonly name: "delegateTo";
|
|
519
|
+
readonly outputs: readonly [];
|
|
520
|
+
readonly stateMutability: "nonpayable";
|
|
521
|
+
readonly type: "function";
|
|
522
|
+
}, {
|
|
523
|
+
readonly inputs: readonly [];
|
|
524
|
+
readonly name: "delegationFee";
|
|
525
|
+
readonly outputs: readonly [{
|
|
526
|
+
readonly internalType: "uint256";
|
|
527
|
+
readonly name: "";
|
|
528
|
+
readonly type: "uint256";
|
|
529
|
+
}];
|
|
530
|
+
readonly stateMutability: "view";
|
|
531
|
+
readonly type: "function";
|
|
532
|
+
}, {
|
|
533
|
+
readonly inputs: readonly [{
|
|
534
|
+
readonly internalType: "address";
|
|
535
|
+
readonly name: "recipient";
|
|
536
|
+
readonly type: "address";
|
|
537
|
+
}];
|
|
538
|
+
readonly name: "distributeClaimableFunds";
|
|
539
|
+
readonly outputs: readonly [];
|
|
540
|
+
readonly stateMutability: "nonpayable";
|
|
541
|
+
readonly type: "function";
|
|
542
|
+
}, {
|
|
543
|
+
readonly inputs: readonly [];
|
|
544
|
+
readonly name: "emergencyUnpause";
|
|
545
|
+
readonly outputs: readonly [];
|
|
546
|
+
readonly stateMutability: "nonpayable";
|
|
547
|
+
readonly type: "function";
|
|
548
|
+
}, {
|
|
549
|
+
readonly inputs: readonly [{
|
|
550
|
+
readonly internalType: "address";
|
|
551
|
+
readonly name: "account";
|
|
552
|
+
readonly type: "address";
|
|
553
|
+
}];
|
|
554
|
+
readonly name: "getCustomFeePercentage";
|
|
555
|
+
readonly outputs: readonly [{
|
|
556
|
+
readonly internalType: "uint256";
|
|
557
|
+
readonly name: "";
|
|
558
|
+
readonly type: "uint256";
|
|
559
|
+
}];
|
|
560
|
+
readonly stateMutability: "view";
|
|
561
|
+
readonly type: "function";
|
|
562
|
+
}, {
|
|
563
|
+
readonly inputs: readonly [];
|
|
564
|
+
readonly name: "getDelegationFee";
|
|
565
|
+
readonly outputs: readonly [{
|
|
566
|
+
readonly internalType: "uint256";
|
|
567
|
+
readonly name: "";
|
|
568
|
+
readonly type: "uint256";
|
|
569
|
+
}];
|
|
570
|
+
readonly stateMutability: "view";
|
|
571
|
+
readonly type: "function";
|
|
572
|
+
}, {
|
|
573
|
+
readonly inputs: readonly [];
|
|
574
|
+
readonly name: "getFee";
|
|
575
|
+
readonly outputs: readonly [{
|
|
576
|
+
readonly internalType: "uint256";
|
|
577
|
+
readonly name: "";
|
|
578
|
+
readonly type: "uint256";
|
|
579
|
+
}];
|
|
580
|
+
readonly stateMutability: "view";
|
|
581
|
+
readonly type: "function";
|
|
582
|
+
}, {
|
|
583
|
+
readonly inputs: readonly [];
|
|
584
|
+
readonly name: "getOwnerClaimable";
|
|
585
|
+
readonly outputs: readonly [{
|
|
586
|
+
readonly internalType: "uint256";
|
|
587
|
+
readonly name: "";
|
|
588
|
+
readonly type: "uint256";
|
|
589
|
+
}];
|
|
590
|
+
readonly stateMutability: "view";
|
|
591
|
+
readonly type: "function";
|
|
592
|
+
}, {
|
|
593
|
+
readonly inputs: readonly [{
|
|
594
|
+
readonly internalType: "address";
|
|
595
|
+
readonly name: "recipient";
|
|
596
|
+
readonly type: "address";
|
|
597
|
+
}];
|
|
598
|
+
readonly name: "getRecipientClaimable";
|
|
599
|
+
readonly outputs: readonly [{
|
|
600
|
+
readonly internalType: "uint256";
|
|
601
|
+
readonly name: "amount";
|
|
602
|
+
readonly type: "uint256";
|
|
603
|
+
}, {
|
|
604
|
+
readonly internalType: "uint256";
|
|
605
|
+
readonly name: "expiresAt";
|
|
606
|
+
readonly type: "uint256";
|
|
607
|
+
}, {
|
|
608
|
+
readonly internalType: "bool";
|
|
609
|
+
readonly name: "isExpired";
|
|
610
|
+
readonly type: "bool";
|
|
611
|
+
}];
|
|
612
|
+
readonly stateMutability: "view";
|
|
613
|
+
readonly type: "function";
|
|
614
|
+
}, {
|
|
615
|
+
readonly inputs: readonly [];
|
|
616
|
+
readonly name: "isPaused";
|
|
617
|
+
readonly outputs: readonly [{
|
|
618
|
+
readonly internalType: "bool";
|
|
619
|
+
readonly name: "";
|
|
620
|
+
readonly type: "bool";
|
|
621
|
+
}];
|
|
622
|
+
readonly stateMutability: "view";
|
|
623
|
+
readonly type: "function";
|
|
624
|
+
}, {
|
|
625
|
+
readonly inputs: readonly [];
|
|
626
|
+
readonly name: "owner";
|
|
627
|
+
readonly outputs: readonly [{
|
|
628
|
+
readonly internalType: "address";
|
|
629
|
+
readonly name: "";
|
|
630
|
+
readonly type: "address";
|
|
631
|
+
}];
|
|
632
|
+
readonly stateMutability: "view";
|
|
633
|
+
readonly type: "function";
|
|
634
|
+
}, {
|
|
635
|
+
readonly inputs: readonly [];
|
|
636
|
+
readonly name: "ownerClaimable";
|
|
637
|
+
readonly outputs: readonly [{
|
|
638
|
+
readonly internalType: "uint256";
|
|
639
|
+
readonly name: "";
|
|
640
|
+
readonly type: "uint256";
|
|
641
|
+
}];
|
|
642
|
+
readonly stateMutability: "view";
|
|
643
|
+
readonly type: "function";
|
|
644
|
+
}, {
|
|
645
|
+
readonly inputs: readonly [];
|
|
646
|
+
readonly name: "pause";
|
|
647
|
+
readonly outputs: readonly [];
|
|
648
|
+
readonly stateMutability: "nonpayable";
|
|
649
|
+
readonly type: "function";
|
|
650
|
+
}, {
|
|
651
|
+
readonly inputs: readonly [];
|
|
652
|
+
readonly name: "paused";
|
|
653
|
+
readonly outputs: readonly [{
|
|
654
|
+
readonly internalType: "bool";
|
|
655
|
+
readonly name: "";
|
|
656
|
+
readonly type: "bool";
|
|
657
|
+
}];
|
|
658
|
+
readonly stateMutability: "view";
|
|
659
|
+
readonly type: "function";
|
|
660
|
+
}, {
|
|
661
|
+
readonly inputs: readonly [{
|
|
662
|
+
readonly internalType: "address";
|
|
663
|
+
readonly name: "";
|
|
664
|
+
readonly type: "address";
|
|
665
|
+
}, {
|
|
666
|
+
readonly internalType: "address";
|
|
667
|
+
readonly name: "";
|
|
668
|
+
readonly type: "address";
|
|
669
|
+
}];
|
|
670
|
+
readonly name: "permissions";
|
|
671
|
+
readonly outputs: readonly [{
|
|
672
|
+
readonly internalType: "bool";
|
|
673
|
+
readonly name: "";
|
|
674
|
+
readonly type: "bool";
|
|
675
|
+
}];
|
|
676
|
+
readonly stateMutability: "view";
|
|
677
|
+
readonly type: "function";
|
|
678
|
+
}, {
|
|
679
|
+
readonly inputs: readonly [{
|
|
680
|
+
readonly internalType: "address";
|
|
681
|
+
readonly name: "";
|
|
682
|
+
readonly type: "address";
|
|
683
|
+
}];
|
|
684
|
+
readonly name: "recipientClaims";
|
|
685
|
+
readonly outputs: readonly [{
|
|
686
|
+
readonly internalType: "uint256";
|
|
687
|
+
readonly name: "amount";
|
|
688
|
+
readonly type: "uint256";
|
|
689
|
+
}, {
|
|
690
|
+
readonly internalType: "uint256";
|
|
691
|
+
readonly name: "timestamp";
|
|
692
|
+
readonly type: "uint256";
|
|
693
|
+
}];
|
|
694
|
+
readonly stateMutability: "view";
|
|
695
|
+
readonly type: "function";
|
|
696
|
+
}, {
|
|
697
|
+
readonly inputs: readonly [{
|
|
698
|
+
readonly internalType: "address";
|
|
699
|
+
readonly name: "delegatingAddress";
|
|
700
|
+
readonly type: "address";
|
|
701
|
+
}];
|
|
702
|
+
readonly name: "rejectDelegation";
|
|
703
|
+
readonly outputs: readonly [];
|
|
704
|
+
readonly stateMutability: "nonpayable";
|
|
705
|
+
readonly type: "function";
|
|
706
|
+
}, {
|
|
707
|
+
readonly inputs: readonly [{
|
|
708
|
+
readonly internalType: "address";
|
|
709
|
+
readonly name: "contractAddress";
|
|
710
|
+
readonly type: "address";
|
|
711
|
+
}];
|
|
712
|
+
readonly name: "removePermission";
|
|
713
|
+
readonly outputs: readonly [];
|
|
714
|
+
readonly stateMutability: "nonpayable";
|
|
715
|
+
readonly type: "function";
|
|
716
|
+
}, {
|
|
717
|
+
readonly inputs: readonly [{
|
|
718
|
+
readonly internalType: "address";
|
|
719
|
+
readonly name: "to";
|
|
720
|
+
readonly type: "address";
|
|
721
|
+
}, {
|
|
722
|
+
readonly internalType: "string";
|
|
723
|
+
readonly name: "subject";
|
|
724
|
+
readonly type: "string";
|
|
725
|
+
}, {
|
|
726
|
+
readonly internalType: "string";
|
|
727
|
+
readonly name: "body";
|
|
728
|
+
readonly type: "string";
|
|
729
|
+
}, {
|
|
730
|
+
readonly internalType: "address";
|
|
731
|
+
readonly name: "payer";
|
|
732
|
+
readonly type: "address";
|
|
733
|
+
}, {
|
|
734
|
+
readonly internalType: "bool";
|
|
735
|
+
readonly name: "revenueShareToReceiver";
|
|
736
|
+
readonly type: "bool";
|
|
737
|
+
}, {
|
|
738
|
+
readonly internalType: "bool";
|
|
739
|
+
readonly name: "resolveSenderToName";
|
|
740
|
+
readonly type: "bool";
|
|
741
|
+
}];
|
|
742
|
+
readonly name: "send";
|
|
743
|
+
readonly outputs: readonly [];
|
|
744
|
+
readonly stateMutability: "nonpayable";
|
|
745
|
+
readonly type: "function";
|
|
746
|
+
}, {
|
|
747
|
+
readonly inputs: readonly [];
|
|
748
|
+
readonly name: "sendFee";
|
|
749
|
+
readonly outputs: readonly [{
|
|
750
|
+
readonly internalType: "uint256";
|
|
751
|
+
readonly name: "";
|
|
752
|
+
readonly type: "uint256";
|
|
753
|
+
}];
|
|
754
|
+
readonly stateMutability: "view";
|
|
755
|
+
readonly type: "function";
|
|
756
|
+
}, {
|
|
757
|
+
readonly inputs: readonly [{
|
|
758
|
+
readonly internalType: "address";
|
|
759
|
+
readonly name: "to";
|
|
760
|
+
readonly type: "address";
|
|
761
|
+
}, {
|
|
762
|
+
readonly internalType: "string";
|
|
763
|
+
readonly name: "mailId";
|
|
764
|
+
readonly type: "string";
|
|
765
|
+
}, {
|
|
766
|
+
readonly internalType: "address";
|
|
767
|
+
readonly name: "payer";
|
|
768
|
+
readonly type: "address";
|
|
769
|
+
}, {
|
|
770
|
+
readonly internalType: "bool";
|
|
771
|
+
readonly name: "revenueShareToReceiver";
|
|
772
|
+
readonly type: "bool";
|
|
773
|
+
}, {
|
|
774
|
+
readonly internalType: "bool";
|
|
775
|
+
readonly name: "resolveSenderToName";
|
|
776
|
+
readonly type: "bool";
|
|
777
|
+
}];
|
|
778
|
+
readonly name: "sendPrepared";
|
|
779
|
+
readonly outputs: readonly [];
|
|
780
|
+
readonly stateMutability: "nonpayable";
|
|
781
|
+
readonly type: "function";
|
|
782
|
+
}, {
|
|
783
|
+
readonly inputs: readonly [{
|
|
784
|
+
readonly internalType: "string";
|
|
785
|
+
readonly name: "toEmail";
|
|
786
|
+
readonly type: "string";
|
|
787
|
+
}, {
|
|
788
|
+
readonly internalType: "string";
|
|
789
|
+
readonly name: "mailId";
|
|
790
|
+
readonly type: "string";
|
|
791
|
+
}, {
|
|
792
|
+
readonly internalType: "address";
|
|
793
|
+
readonly name: "payer";
|
|
794
|
+
readonly type: "address";
|
|
795
|
+
}];
|
|
796
|
+
readonly name: "sendPreparedToEmailAddress";
|
|
797
|
+
readonly outputs: readonly [];
|
|
798
|
+
readonly stateMutability: "nonpayable";
|
|
799
|
+
readonly type: "function";
|
|
800
|
+
}, {
|
|
801
|
+
readonly inputs: readonly [{
|
|
802
|
+
readonly internalType: "address";
|
|
803
|
+
readonly name: "to";
|
|
804
|
+
readonly type: "address";
|
|
805
|
+
}, {
|
|
806
|
+
readonly internalType: "string";
|
|
807
|
+
readonly name: "webhookId";
|
|
808
|
+
readonly type: "string";
|
|
809
|
+
}, {
|
|
810
|
+
readonly internalType: "address";
|
|
811
|
+
readonly name: "payer";
|
|
812
|
+
readonly type: "address";
|
|
813
|
+
}, {
|
|
814
|
+
readonly internalType: "bool";
|
|
815
|
+
readonly name: "revenueShareToReceiver";
|
|
816
|
+
readonly type: "bool";
|
|
817
|
+
}, {
|
|
818
|
+
readonly internalType: "bool";
|
|
819
|
+
readonly name: "resolveSenderToName";
|
|
820
|
+
readonly type: "bool";
|
|
821
|
+
}];
|
|
822
|
+
readonly name: "sendThroughWebhook";
|
|
823
|
+
readonly outputs: readonly [];
|
|
824
|
+
readonly stateMutability: "nonpayable";
|
|
825
|
+
readonly type: "function";
|
|
826
|
+
}, {
|
|
827
|
+
readonly inputs: readonly [{
|
|
828
|
+
readonly internalType: "string";
|
|
829
|
+
readonly name: "toEmail";
|
|
830
|
+
readonly type: "string";
|
|
831
|
+
}, {
|
|
832
|
+
readonly internalType: "string";
|
|
833
|
+
readonly name: "subject";
|
|
834
|
+
readonly type: "string";
|
|
835
|
+
}, {
|
|
836
|
+
readonly internalType: "string";
|
|
837
|
+
readonly name: "body";
|
|
838
|
+
readonly type: "string";
|
|
839
|
+
}, {
|
|
840
|
+
readonly internalType: "address";
|
|
841
|
+
readonly name: "payer";
|
|
842
|
+
readonly type: "address";
|
|
843
|
+
}];
|
|
844
|
+
readonly name: "sendToEmailAddress";
|
|
845
|
+
readonly outputs: readonly [];
|
|
846
|
+
readonly stateMutability: "nonpayable";
|
|
847
|
+
readonly type: "function";
|
|
848
|
+
}, {
|
|
849
|
+
readonly inputs: readonly [{
|
|
850
|
+
readonly internalType: "address";
|
|
851
|
+
readonly name: "account";
|
|
852
|
+
readonly type: "address";
|
|
853
|
+
}, {
|
|
854
|
+
readonly internalType: "uint256";
|
|
855
|
+
readonly name: "percentage";
|
|
856
|
+
readonly type: "uint256";
|
|
857
|
+
}];
|
|
858
|
+
readonly name: "setCustomFeePercentage";
|
|
859
|
+
readonly outputs: readonly [];
|
|
860
|
+
readonly stateMutability: "nonpayable";
|
|
861
|
+
readonly type: "function";
|
|
862
|
+
}, {
|
|
863
|
+
readonly inputs: readonly [{
|
|
864
|
+
readonly internalType: "uint256";
|
|
865
|
+
readonly name: "usdcAmount";
|
|
866
|
+
readonly type: "uint256";
|
|
867
|
+
}];
|
|
868
|
+
readonly name: "setDelegationFee";
|
|
869
|
+
readonly outputs: readonly [];
|
|
870
|
+
readonly stateMutability: "nonpayable";
|
|
871
|
+
readonly type: "function";
|
|
872
|
+
}, {
|
|
873
|
+
readonly inputs: readonly [{
|
|
874
|
+
readonly internalType: "uint256";
|
|
875
|
+
readonly name: "usdcAmount";
|
|
876
|
+
readonly type: "uint256";
|
|
877
|
+
}];
|
|
878
|
+
readonly name: "setFee";
|
|
879
|
+
readonly outputs: readonly [];
|
|
880
|
+
readonly stateMutability: "nonpayable";
|
|
881
|
+
readonly type: "function";
|
|
882
|
+
}, {
|
|
883
|
+
readonly inputs: readonly [{
|
|
884
|
+
readonly internalType: "address";
|
|
885
|
+
readonly name: "contractAddress";
|
|
886
|
+
readonly type: "address";
|
|
887
|
+
}];
|
|
888
|
+
readonly name: "setPermission";
|
|
889
|
+
readonly outputs: readonly [];
|
|
890
|
+
readonly stateMutability: "nonpayable";
|
|
891
|
+
readonly type: "function";
|
|
892
|
+
}, {
|
|
893
|
+
readonly inputs: readonly [];
|
|
894
|
+
readonly name: "unpause";
|
|
895
|
+
readonly outputs: readonly [];
|
|
896
|
+
readonly stateMutability: "nonpayable";
|
|
897
|
+
readonly type: "function";
|
|
898
|
+
}, {
|
|
899
|
+
readonly inputs: readonly [];
|
|
900
|
+
readonly name: "usdcToken";
|
|
901
|
+
readonly outputs: readonly [{
|
|
902
|
+
readonly internalType: "contract IERC20";
|
|
903
|
+
readonly name: "";
|
|
904
|
+
readonly type: "address";
|
|
905
|
+
}];
|
|
906
|
+
readonly stateMutability: "view";
|
|
907
|
+
readonly type: "function";
|
|
908
|
+
}];
|
|
909
|
+
static readonly bytecode: `0x${string}`;
|
|
910
|
+
private readonly contractAddress;
|
|
911
|
+
private readonly publicClient;
|
|
912
|
+
private readonly defaultGasMultiplier;
|
|
913
|
+
constructor(contractAddress: string | Address, publicClient: PublicClient);
|
|
134
914
|
/**
|
|
135
|
-
*
|
|
136
|
-
* @notice Charges only 10% owner fee since recipient wallet is unknown
|
|
137
|
-
* @param toEmail Email address of the recipient
|
|
138
|
-
* @param subject Message subject line
|
|
139
|
-
* @param body Message content
|
|
140
|
-
* @param walletClient Viem wallet client for transaction
|
|
141
|
-
* @param account Account to send from
|
|
142
|
-
* @returns Promise resolving to transaction hash
|
|
143
|
-
* @example
|
|
144
|
-
* ```typescript
|
|
145
|
-
* // Send to email address
|
|
146
|
-
* const hash = await mailer.sendToEmailAddress('user@example.com', 'Subject', 'Body', walletClient, account);
|
|
147
|
-
* await publicClient.waitForTransactionReceipt({ hash });
|
|
148
|
-
* ```
|
|
915
|
+
* Helper method to estimate gas for a transaction with optional buffer
|
|
149
916
|
*/
|
|
150
|
-
|
|
917
|
+
private estimateGasWithBuffer;
|
|
151
918
|
/**
|
|
152
|
-
*
|
|
153
|
-
* @notice Charges only 10% owner fee since recipient wallet is unknown
|
|
154
|
-
* @param toEmail Email address of the recipient
|
|
155
|
-
* @param mailId Pre-prepared message identifier
|
|
156
|
-
* @param walletClient Viem wallet client for transaction
|
|
157
|
-
* @param account Account to send from
|
|
158
|
-
* @returns Promise resolving to transaction hash
|
|
919
|
+
* Helper method to build transaction parameters with gas options
|
|
159
920
|
*/
|
|
160
|
-
|
|
921
|
+
private buildTxParams;
|
|
161
922
|
/**
|
|
162
|
-
*
|
|
163
|
-
* @param newFee New fee amount in USDC (6 decimals)
|
|
164
|
-
* @param walletClient Viem wallet client for transaction
|
|
165
|
-
* @param account Account to send from (must be owner)
|
|
166
|
-
* @returns Promise resolving to transaction hash
|
|
923
|
+
* Deploy a fresh Mailer contract instance with gas estimation.
|
|
167
924
|
*/
|
|
168
|
-
|
|
925
|
+
static deploy(walletClient: WalletClient, publicClient: PublicClient, account: Account | Address, usdcTokenAddress: string | Address, ownerAddress: string | Address, gasOptions?: GasOptions): Promise<{
|
|
926
|
+
client: MailerClient;
|
|
927
|
+
result: TransactionResult;
|
|
928
|
+
}>;
|
|
929
|
+
getAddress(): Address;
|
|
169
930
|
/**
|
|
170
|
-
*
|
|
171
|
-
* @returns Current send fee in USDC (6 decimals)
|
|
931
|
+
* Core message send with explicit payer control and gas estimation.
|
|
172
932
|
*/
|
|
933
|
+
send(to: Address | string, subject: string, body: string, payer: Address | string, revenueShareToReceiver: boolean, resolveSenderToName: boolean, walletClient: WalletClient, account: Account | Address, gasOptions?: GasOptions): Promise<TransactionResult>;
|
|
934
|
+
sendPrepared(to: Address | string, mailId: string, payer: Address | string, revenueShareToReceiver: boolean, resolveSenderToName: boolean, walletClient: WalletClient, account: Account | Address, gasOptions?: GasOptions): Promise<TransactionResult>;
|
|
935
|
+
sendThroughWebhook(to: Address | string, webhookId: string, payer: Address | string, revenueShareToReceiver: boolean, resolveSenderToName: boolean, walletClient: WalletClient, account: Account | Address, gasOptions?: GasOptions): Promise<TransactionResult>;
|
|
936
|
+
sendToEmailAddress(toEmail: string, subject: string, body: string, payer: Address | string, walletClient: WalletClient, account: Account | Address, gasOptions?: GasOptions): Promise<TransactionResult>;
|
|
937
|
+
sendPreparedToEmailAddress(toEmail: string, mailId: string, payer: Address | string, walletClient: WalletClient, account: Account | Address, gasOptions?: GasOptions): Promise<TransactionResult>;
|
|
173
938
|
getFee(): Promise<bigint>;
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
* @returns True if contract is paused, false otherwise
|
|
198
|
-
*/
|
|
939
|
+
getSendFee(): Promise<bigint>;
|
|
940
|
+
setFee(newFee: bigint, walletClient: WalletClient, account: Account | Address, gasOptions?: GasOptions): Promise<TransactionResult>;
|
|
941
|
+
getUsdcToken(): Promise<Address>;
|
|
942
|
+
getOwner(): Promise<Address>;
|
|
943
|
+
claimRecipientShare(walletClient: WalletClient, account: Account | Address, gasOptions?: GasOptions): Promise<TransactionResult>;
|
|
944
|
+
claimOwnerShare(walletClient: WalletClient, account: Account | Address, gasOptions?: GasOptions): Promise<TransactionResult>;
|
|
945
|
+
claimExpiredShares(recipient: Address | string, walletClient: WalletClient, account: Account | Address, gasOptions?: GasOptions): Promise<TransactionResult>;
|
|
946
|
+
getRecipientClaimable(recipient: Address | string): Promise<RecipientClaim>;
|
|
947
|
+
getOwnerClaimable(): Promise<bigint>;
|
|
948
|
+
delegateTo(delegate: Address | string, walletClient: WalletClient, account: Account | Address, gasOptions?: GasOptions): Promise<TransactionResult>;
|
|
949
|
+
rejectDelegation(delegatingAddress: Address | string, walletClient: WalletClient, account: Account | Address, gasOptions?: GasOptions): Promise<TransactionResult>;
|
|
950
|
+
getDelegationFee(): Promise<bigint>;
|
|
951
|
+
setDelegationFee(newFee: bigint, walletClient: WalletClient, account: Account | Address, gasOptions?: GasOptions): Promise<TransactionResult>;
|
|
952
|
+
setCustomFeePercentage(target: Address | string, percentage: number, walletClient: WalletClient, account: Account | Address, gasOptions?: GasOptions): Promise<TransactionResult>;
|
|
953
|
+
clearCustomFeePercentage(target: Address | string, walletClient: WalletClient, account: Account | Address, gasOptions?: GasOptions): Promise<TransactionResult>;
|
|
954
|
+
getCustomFeePercentage(target: Address | string): Promise<number>;
|
|
955
|
+
getCustomFeeDiscount(target: Address | string): Promise<number>;
|
|
956
|
+
setPermission(contractAddress: Address | string, walletClient: WalletClient, account: Account | Address, gasOptions?: GasOptions): Promise<TransactionResult>;
|
|
957
|
+
removePermission(contractAddress: Address | string, walletClient: WalletClient, account: Account | Address, gasOptions?: GasOptions): Promise<TransactionResult>;
|
|
958
|
+
hasPermission(contractAddress: Address | string, wallet: Address | string): Promise<boolean>;
|
|
959
|
+
pause(walletClient: WalletClient, account: Account | Address, gasOptions?: GasOptions): Promise<TransactionResult>;
|
|
960
|
+
unpause(walletClient: WalletClient, account: Account | Address, gasOptions?: GasOptions): Promise<TransactionResult>;
|
|
961
|
+
emergencyUnpause(walletClient: WalletClient, account: Account | Address, gasOptions?: GasOptions): Promise<TransactionResult>;
|
|
199
962
|
isPaused(): Promise<boolean>;
|
|
200
|
-
|
|
201
|
-
* Distribute a specific recipient's claimable funds during pause
|
|
202
|
-
* Anyone can call this function when contract is paused
|
|
203
|
-
* @param recipient Address to distribute funds for
|
|
204
|
-
* @param walletClient Viem wallet client for transaction
|
|
205
|
-
* @param account Account to send from
|
|
206
|
-
* @returns Promise resolving to transaction hash
|
|
207
|
-
*/
|
|
208
|
-
distributeClaimableFunds(recipient: string, walletClient: WalletClient, account: Account | Address): Promise<Hash>;
|
|
963
|
+
distributeClaimableFunds(recipient: Address | string, walletClient: WalletClient, account: Account | Address, gasOptions?: GasOptions): Promise<TransactionResult>;
|
|
209
964
|
}
|
|
965
|
+
export {};
|
|
210
966
|
//# sourceMappingURL=mailer-client.d.ts.map
|