@aastar/core 0.16.8 → 0.16.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/dist/abis/PaymasterV4_2.json +1193 -0
- package/dist/abis/SuperPaymaster.json +1 -1
- package/dist/abis/aPNTs.json +1160 -0
- package/dist/abis/abi.config.json +3 -3
- package/dist/abis/index.d.ts +15 -104
- package/dist/abis/index.js +22 -46
- package/dist/actions/account.d.ts +0 -15
- package/dist/actions/account.js +143 -108
- package/dist/actions/aggregator.d.ts +68 -7
- package/dist/actions/aggregator.js +328 -28
- package/dist/actions/dvt.d.ts +33 -5
- package/dist/actions/dvt.js +238 -38
- package/dist/actions/entryPoint.d.ts +3 -63
- package/dist/actions/entryPoint.js +52 -184
- package/dist/actions/factory.d.ts +48 -115
- package/dist/actions/factory.js +638 -438
- package/dist/actions/faucet.d.ts +23 -27
- package/dist/actions/faucet.js +150 -289
- package/dist/actions/index.d.ts +1 -2
- package/dist/actions/index.js +2 -4
- package/dist/actions/paymaster.d.ts +147 -0
- package/dist/actions/paymaster.js +706 -0
- package/dist/actions/paymasterV4.d.ts +26 -95
- package/dist/actions/paymasterV4.js +28 -121
- package/dist/actions/registry.d.ts +116 -165
- package/dist/actions/registry.js +855 -654
- package/dist/actions/reputation.d.ts +74 -52
- package/dist/actions/reputation.js +548 -242
- package/dist/actions/sbt.d.ts +90 -100
- package/dist/actions/sbt.js +801 -518
- package/dist/actions/staking.d.ts +45 -32
- package/dist/actions/staking.js +431 -260
- package/dist/actions/superPaymaster.d.ts +140 -158
- package/dist/actions/superPaymaster.js +965 -631
- package/dist/actions/tokens.d.ts +130 -108
- package/dist/actions/tokens.js +470 -414
- package/dist/actions/validators.d.ts +0 -73
- package/dist/actions/validators.js +0 -94
- package/dist/clients/BaseClient.d.ts +3 -3
- package/dist/clients/BundlerClient.d.ts +55 -0
- package/dist/clients/BundlerClient.js +92 -0
- package/dist/communities.js +2 -2
- package/dist/constants.js +1 -28
- package/dist/contract-addresses.d.ts +5 -14
- package/dist/contract-addresses.js +3 -9
- package/dist/contract-versions.d.ts +138 -0
- package/dist/contract-versions.js +328 -0
- package/dist/contracts.d.ts +6 -24
- package/dist/contracts.js +2 -2
- package/dist/errors/index.d.ts +57 -0
- package/dist/errors/index.js +123 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/requirementChecker.d.ts +35 -1
- package/dist/requirementChecker.js +39 -1
- package/dist/roles.d.ts +50 -61
- package/dist/roles.js +50 -61
- package/dist/validators/index.d.ts +35 -0
- package/dist/validators/index.js +60 -0
- package/package.json +5 -13
|
@@ -1,170 +1,101 @@
|
|
|
1
1
|
import { type Address, type PublicClient, type WalletClient, type Hex, type Hash, type Account } from 'viem';
|
|
2
2
|
export type PaymasterV4Actions = {
|
|
3
|
-
|
|
3
|
+
depositFor: (args: {
|
|
4
4
|
user: Address;
|
|
5
5
|
token: Address;
|
|
6
6
|
amount: bigint;
|
|
7
7
|
account?: Account | Address;
|
|
8
8
|
}) => Promise<Hash>;
|
|
9
|
-
|
|
9
|
+
withdraw: (args: {
|
|
10
10
|
token: Address;
|
|
11
11
|
amount: bigint;
|
|
12
12
|
account?: Account | Address;
|
|
13
13
|
}) => Promise<Hash>;
|
|
14
|
-
|
|
14
|
+
balances: (args: {
|
|
15
15
|
user: Address;
|
|
16
16
|
token: Address;
|
|
17
17
|
}) => Promise<bigint>;
|
|
18
|
-
|
|
18
|
+
setTokenPrice: (args: {
|
|
19
19
|
token: Address;
|
|
20
20
|
price: bigint;
|
|
21
21
|
account?: Account | Address;
|
|
22
22
|
}) => Promise<Hash>;
|
|
23
|
-
|
|
23
|
+
tokenPrices: (args: {
|
|
24
24
|
token: Address;
|
|
25
25
|
}) => Promise<bigint>;
|
|
26
26
|
/** @deprecated V4 uses depositFor + tokenPrices instead */
|
|
27
|
-
|
|
27
|
+
addGasToken: (args: {
|
|
28
28
|
token: Address;
|
|
29
29
|
priceFeed: Address;
|
|
30
30
|
account?: Account | Address;
|
|
31
31
|
}) => Promise<Hash>;
|
|
32
32
|
/** @deprecated V4 uses depositFor + tokenPrices instead */
|
|
33
|
-
|
|
33
|
+
removeGasToken: (args: {
|
|
34
34
|
token: Address;
|
|
35
35
|
account?: Account | Address;
|
|
36
36
|
}) => Promise<Hash>;
|
|
37
37
|
/** @deprecated V4 uses depositFor + tokenPrices instead */
|
|
38
|
-
|
|
38
|
+
getSupportedGasTokens: () => Promise<Address[]>;
|
|
39
39
|
/** @deprecated V4 uses depositFor + tokenPrices instead */
|
|
40
|
-
|
|
40
|
+
isGasTokenSupported: (args: {
|
|
41
41
|
token: Address;
|
|
42
42
|
}) => Promise<boolean>;
|
|
43
43
|
/** @deprecated V4 does not use SBT whitelist */
|
|
44
|
-
|
|
44
|
+
addSBT: (args: {
|
|
45
45
|
sbt: Address;
|
|
46
46
|
account?: Account | Address;
|
|
47
47
|
}) => Promise<Hash>;
|
|
48
48
|
/** @deprecated V4 does not use SBT whitelist */
|
|
49
|
-
|
|
49
|
+
removeSBT: (args: {
|
|
50
50
|
sbt: Address;
|
|
51
51
|
account?: Account | Address;
|
|
52
52
|
}) => Promise<Hash>;
|
|
53
53
|
/** @deprecated V4 does not use SBT whitelist */
|
|
54
|
-
|
|
54
|
+
getSupportedSBTs: () => Promise<Address[]>;
|
|
55
55
|
/** @deprecated V4 does not use SBT whitelist */
|
|
56
|
-
|
|
56
|
+
isSBTSupported: (args: {
|
|
57
57
|
sbt: Address;
|
|
58
58
|
}) => Promise<boolean>;
|
|
59
|
-
|
|
59
|
+
validatePaymasterUserOp: (args: {
|
|
60
60
|
userOp: any;
|
|
61
61
|
userOpHash: Hex;
|
|
62
62
|
maxCost: bigint;
|
|
63
63
|
}) => Promise<any>;
|
|
64
|
-
|
|
64
|
+
postOp: (args: {
|
|
65
65
|
mode: number;
|
|
66
66
|
context: Hex;
|
|
67
67
|
actualGasCost: bigint;
|
|
68
68
|
actualUserOpFeePerGas: bigint;
|
|
69
69
|
}) => Promise<void>;
|
|
70
|
-
|
|
70
|
+
deposit: (args: {
|
|
71
71
|
account?: Account | Address;
|
|
72
72
|
}) => Promise<Hash>;
|
|
73
|
-
|
|
73
|
+
withdrawTo: (args: {
|
|
74
74
|
to: Address;
|
|
75
75
|
amount: bigint;
|
|
76
76
|
account?: Account | Address;
|
|
77
77
|
}) => Promise<Hash>;
|
|
78
|
-
|
|
78
|
+
addStake: (args: {
|
|
79
79
|
unstakeDelaySec: bigint;
|
|
80
|
-
amount: bigint;
|
|
81
80
|
account?: Account | Address;
|
|
82
81
|
}) => Promise<Hash>;
|
|
83
|
-
|
|
82
|
+
unlockPaymasterStake: (args: {
|
|
84
83
|
account?: Account | Address;
|
|
85
84
|
}) => Promise<Hash>;
|
|
86
|
-
|
|
85
|
+
withdrawStake: (args: {
|
|
87
86
|
to: Address;
|
|
88
87
|
account?: Account | Address;
|
|
89
88
|
}) => Promise<Hash>;
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
89
|
+
getDeposit: () => Promise<bigint>;
|
|
90
|
+
entryPoint: () => Promise<Address>;
|
|
91
|
+
owner: () => Promise<Address>;
|
|
92
|
+
transferOwnership: (args: {
|
|
94
93
|
newOwner: Address;
|
|
95
94
|
account?: Account | Address;
|
|
96
95
|
}) => Promise<Hash>;
|
|
97
|
-
|
|
98
|
-
account?: Account | Address;
|
|
99
|
-
}) => Promise<Hash>;
|
|
100
|
-
paymasterV4Registry: () => Promise<Address>;
|
|
101
|
-
paymasterV4Treasury: () => Promise<Address>;
|
|
102
|
-
paymasterV4Paused: () => Promise<boolean>;
|
|
103
|
-
paymasterV4MaxGasCostCap: () => Promise<bigint>;
|
|
104
|
-
paymasterV4MaxEthUsdPrice: () => Promise<bigint>;
|
|
105
|
-
paymasterV4MaxGasTokens: () => Promise<bigint>;
|
|
106
|
-
paymasterV4MaxSbts: () => Promise<bigint>;
|
|
107
|
-
paymasterV4MaxServiceFee: () => Promise<bigint>;
|
|
108
|
-
paymasterV4MinEthUsdPrice: () => Promise<bigint>;
|
|
109
|
-
paymasterV4PriceStalenessThreshold: () => Promise<bigint>;
|
|
110
|
-
paymasterV4AddDeposit: (args: {
|
|
111
|
-
account?: Account | Address;
|
|
112
|
-
}) => Promise<Hash>;
|
|
113
|
-
paymasterV4UnlockStake: (args: {
|
|
114
|
-
account?: Account | Address;
|
|
115
|
-
}) => Promise<Hash>;
|
|
116
|
-
paymasterV4EthUsdPriceFeed: () => Promise<Address>;
|
|
117
|
-
paymasterV4OracleDecimals: () => Promise<number>;
|
|
118
|
-
paymasterV4TokenDecimals: (args: {
|
|
119
|
-
token: Address;
|
|
120
|
-
}) => Promise<number>;
|
|
121
|
-
paymasterV4ServiceFeeRate: () => Promise<bigint>;
|
|
122
|
-
paymasterV4CalculateCost: (args: {
|
|
123
|
-
token: Address;
|
|
124
|
-
gasCost: bigint;
|
|
125
|
-
param: any;
|
|
126
|
-
}) => Promise<bigint>;
|
|
127
|
-
paymasterV4GetRealtimeTokenCost: (args: {
|
|
128
|
-
token: Address;
|
|
129
|
-
gasCost: bigint;
|
|
130
|
-
}) => Promise<bigint>;
|
|
131
|
-
paymasterV4IsActiveInRegistry: () => Promise<boolean>;
|
|
132
|
-
paymasterV4IsRegistrySet: () => Promise<boolean>;
|
|
133
|
-
paymasterV4CachedPriceView: (args: {
|
|
134
|
-
token: Address;
|
|
135
|
-
}) => Promise<bigint>;
|
|
136
|
-
paymasterV4SetCachedPrice: (args: {
|
|
137
|
-
token: Address;
|
|
138
|
-
price: bigint;
|
|
139
|
-
account?: Account | Address;
|
|
140
|
-
}) => Promise<Hash>;
|
|
141
|
-
paymasterV4SetServiceFeeRate: (args: {
|
|
142
|
-
rate: bigint;
|
|
143
|
-
account?: Account | Address;
|
|
144
|
-
}) => Promise<Hash>;
|
|
145
|
-
paymasterV4SetMaxGasCostCap: (args: {
|
|
146
|
-
cap: bigint;
|
|
147
|
-
account?: Account | Address;
|
|
148
|
-
}) => Promise<Hash>;
|
|
149
|
-
paymasterV4SetPriceStalenessThreshold: (args: {
|
|
150
|
-
threshold: bigint;
|
|
151
|
-
account?: Account | Address;
|
|
152
|
-
}) => Promise<Hash>;
|
|
153
|
-
paymasterV4SetTreasury: (args: {
|
|
154
|
-
treasury: Address;
|
|
155
|
-
account?: Account | Address;
|
|
156
|
-
}) => Promise<Hash>;
|
|
157
|
-
paymasterV4UpdatePrice: (args: {
|
|
158
|
-
token: Address;
|
|
159
|
-
account?: Account | Address;
|
|
160
|
-
}) => Promise<Hash>;
|
|
161
|
-
paymasterV4DeactivateFromRegistry: (args: {
|
|
162
|
-
account?: Account | Address;
|
|
163
|
-
}) => Promise<Hash>;
|
|
164
|
-
paymasterV4Initialize: (args: {
|
|
165
|
-
owner: Address;
|
|
96
|
+
renounceOwnership: (args: {
|
|
166
97
|
account?: Account | Address;
|
|
167
98
|
}) => Promise<Hash>;
|
|
168
|
-
|
|
99
|
+
version: () => Promise<string>;
|
|
169
100
|
};
|
|
170
101
|
export declare const paymasterV4Actions: (address: Address) => (client: PublicClient | WalletClient) => PaymasterV4Actions;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PaymasterV4ABI } from '../abis/index.js';
|
|
2
2
|
export const paymasterV4Actions = (address) => (client) => ({
|
|
3
3
|
// === NEW: Deposit-Only Model ===
|
|
4
|
-
async
|
|
4
|
+
async depositFor({ user, token, amount, account }) {
|
|
5
5
|
return client.writeContract({
|
|
6
6
|
address,
|
|
7
7
|
abi: PaymasterV4ABI,
|
|
@@ -11,7 +11,7 @@ export const paymasterV4Actions = (address) => (client) => ({
|
|
|
11
11
|
chain: client.chain
|
|
12
12
|
});
|
|
13
13
|
},
|
|
14
|
-
async
|
|
14
|
+
async withdraw({ token, amount, account }) {
|
|
15
15
|
return client.writeContract({
|
|
16
16
|
address,
|
|
17
17
|
abi: PaymasterV4ABI,
|
|
@@ -21,7 +21,7 @@ export const paymasterV4Actions = (address) => (client) => ({
|
|
|
21
21
|
chain: client.chain
|
|
22
22
|
});
|
|
23
23
|
},
|
|
24
|
-
async
|
|
24
|
+
async balances({ user, token }) {
|
|
25
25
|
return client.readContract({
|
|
26
26
|
address,
|
|
27
27
|
abi: PaymasterV4ABI,
|
|
@@ -29,7 +29,7 @@ export const paymasterV4Actions = (address) => (client) => ({
|
|
|
29
29
|
args: [user, token]
|
|
30
30
|
});
|
|
31
31
|
},
|
|
32
|
-
async
|
|
32
|
+
async setTokenPrice({ token, price, account }) {
|
|
33
33
|
return client.writeContract({
|
|
34
34
|
address,
|
|
35
35
|
abi: PaymasterV4ABI,
|
|
@@ -39,7 +39,7 @@ export const paymasterV4Actions = (address) => (client) => ({
|
|
|
39
39
|
chain: client.chain
|
|
40
40
|
});
|
|
41
41
|
},
|
|
42
|
-
async
|
|
42
|
+
async tokenPrices({ token }) {
|
|
43
43
|
return client.readContract({
|
|
44
44
|
address,
|
|
45
45
|
abi: PaymasterV4ABI,
|
|
@@ -48,7 +48,7 @@ export const paymasterV4Actions = (address) => (client) => ({
|
|
|
48
48
|
});
|
|
49
49
|
},
|
|
50
50
|
// === DEPRECATED: Legacy Gas Token Management ===
|
|
51
|
-
async
|
|
51
|
+
async addGasToken({ token, priceFeed, account }) {
|
|
52
52
|
return client.writeContract({
|
|
53
53
|
address,
|
|
54
54
|
abi: PaymasterV4ABI,
|
|
@@ -58,7 +58,7 @@ export const paymasterV4Actions = (address) => (client) => ({
|
|
|
58
58
|
chain: client.chain
|
|
59
59
|
});
|
|
60
60
|
},
|
|
61
|
-
async
|
|
61
|
+
async removeGasToken({ token, account }) {
|
|
62
62
|
return client.writeContract({
|
|
63
63
|
address,
|
|
64
64
|
abi: PaymasterV4ABI,
|
|
@@ -68,7 +68,7 @@ export const paymasterV4Actions = (address) => (client) => ({
|
|
|
68
68
|
chain: client.chain
|
|
69
69
|
});
|
|
70
70
|
},
|
|
71
|
-
async
|
|
71
|
+
async getSupportedGasTokens() {
|
|
72
72
|
return client.readContract({
|
|
73
73
|
address,
|
|
74
74
|
abi: PaymasterV4ABI,
|
|
@@ -76,7 +76,7 @@ export const paymasterV4Actions = (address) => (client) => ({
|
|
|
76
76
|
args: []
|
|
77
77
|
});
|
|
78
78
|
},
|
|
79
|
-
async
|
|
79
|
+
async isGasTokenSupported({ token }) {
|
|
80
80
|
return client.readContract({
|
|
81
81
|
address,
|
|
82
82
|
abi: PaymasterV4ABI,
|
|
@@ -85,7 +85,7 @@ export const paymasterV4Actions = (address) => (client) => ({
|
|
|
85
85
|
});
|
|
86
86
|
},
|
|
87
87
|
// SBT Management
|
|
88
|
-
async
|
|
88
|
+
async addSBT({ sbt, account }) {
|
|
89
89
|
return client.writeContract({
|
|
90
90
|
address,
|
|
91
91
|
abi: PaymasterV4ABI,
|
|
@@ -95,7 +95,7 @@ export const paymasterV4Actions = (address) => (client) => ({
|
|
|
95
95
|
chain: client.chain
|
|
96
96
|
});
|
|
97
97
|
},
|
|
98
|
-
async
|
|
98
|
+
async removeSBT({ sbt, account }) {
|
|
99
99
|
return client.writeContract({
|
|
100
100
|
address,
|
|
101
101
|
abi: PaymasterV4ABI,
|
|
@@ -105,7 +105,7 @@ export const paymasterV4Actions = (address) => (client) => ({
|
|
|
105
105
|
chain: client.chain
|
|
106
106
|
});
|
|
107
107
|
},
|
|
108
|
-
async
|
|
108
|
+
async getSupportedSBTs() {
|
|
109
109
|
return client.readContract({
|
|
110
110
|
address,
|
|
111
111
|
abi: PaymasterV4ABI,
|
|
@@ -113,7 +113,7 @@ export const paymasterV4Actions = (address) => (client) => ({
|
|
|
113
113
|
args: []
|
|
114
114
|
});
|
|
115
115
|
},
|
|
116
|
-
async
|
|
116
|
+
async isSBTSupported({ sbt }) {
|
|
117
117
|
return client.readContract({
|
|
118
118
|
address,
|
|
119
119
|
abi: PaymasterV4ABI,
|
|
@@ -122,7 +122,7 @@ export const paymasterV4Actions = (address) => (client) => ({
|
|
|
122
122
|
});
|
|
123
123
|
},
|
|
124
124
|
// Validation
|
|
125
|
-
async
|
|
125
|
+
async validatePaymasterUserOp({ userOp, userOpHash, maxCost }) {
|
|
126
126
|
return client.readContract({
|
|
127
127
|
address,
|
|
128
128
|
abi: PaymasterV4ABI,
|
|
@@ -130,22 +130,21 @@ export const paymasterV4Actions = (address) => (client) => ({
|
|
|
130
130
|
args: [userOp, userOpHash, maxCost]
|
|
131
131
|
});
|
|
132
132
|
},
|
|
133
|
-
async
|
|
133
|
+
async postOp({ mode, context, actualGasCost, actualUserOpFeePerGas }) {
|
|
134
134
|
throw new Error('postOp is called by EntryPoint, not directly invoked');
|
|
135
135
|
},
|
|
136
|
-
// Deposit & Withdrawal
|
|
137
|
-
async
|
|
136
|
+
// Deposit & Withdrawal
|
|
137
|
+
async deposit({ account }) {
|
|
138
138
|
return client.writeContract({
|
|
139
139
|
address,
|
|
140
140
|
abi: PaymasterV4ABI,
|
|
141
141
|
functionName: 'deposit',
|
|
142
142
|
args: [],
|
|
143
143
|
account: account,
|
|
144
|
-
chain: client.chain
|
|
145
|
-
value: 0n // Assuming non-payable or handled elsewhere if payable
|
|
144
|
+
chain: client.chain
|
|
146
145
|
});
|
|
147
146
|
},
|
|
148
|
-
async
|
|
147
|
+
async withdrawTo({ to, amount, account }) {
|
|
149
148
|
return client.writeContract({
|
|
150
149
|
address,
|
|
151
150
|
abi: PaymasterV4ABI,
|
|
@@ -155,18 +154,17 @@ export const paymasterV4Actions = (address) => (client) => ({
|
|
|
155
154
|
chain: client.chain
|
|
156
155
|
});
|
|
157
156
|
},
|
|
158
|
-
async
|
|
157
|
+
async addStake({ unstakeDelaySec, account }) {
|
|
159
158
|
return client.writeContract({
|
|
160
159
|
address,
|
|
161
160
|
abi: PaymasterV4ABI,
|
|
162
161
|
functionName: 'addStake',
|
|
163
162
|
args: [unstakeDelaySec],
|
|
164
|
-
value: amount,
|
|
165
163
|
account: account,
|
|
166
164
|
chain: client.chain
|
|
167
165
|
});
|
|
168
166
|
},
|
|
169
|
-
async
|
|
167
|
+
async unlockPaymasterStake({ account }) {
|
|
170
168
|
return client.writeContract({
|
|
171
169
|
address,
|
|
172
170
|
abi: PaymasterV4ABI,
|
|
@@ -176,7 +174,7 @@ export const paymasterV4Actions = (address) => (client) => ({
|
|
|
176
174
|
chain: client.chain
|
|
177
175
|
});
|
|
178
176
|
},
|
|
179
|
-
async
|
|
177
|
+
async withdrawStake({ to, account }) {
|
|
180
178
|
return client.writeContract({
|
|
181
179
|
address,
|
|
182
180
|
abi: PaymasterV4ABI,
|
|
@@ -186,7 +184,7 @@ export const paymasterV4Actions = (address) => (client) => ({
|
|
|
186
184
|
chain: client.chain
|
|
187
185
|
});
|
|
188
186
|
},
|
|
189
|
-
async
|
|
187
|
+
async getDeposit() {
|
|
190
188
|
return client.readContract({
|
|
191
189
|
address,
|
|
192
190
|
abi: PaymasterV4ABI,
|
|
@@ -195,7 +193,7 @@ export const paymasterV4Actions = (address) => (client) => ({
|
|
|
195
193
|
});
|
|
196
194
|
},
|
|
197
195
|
// EntryPoint
|
|
198
|
-
async
|
|
196
|
+
async entryPoint() {
|
|
199
197
|
return client.readContract({
|
|
200
198
|
address,
|
|
201
199
|
abi: PaymasterV4ABI,
|
|
@@ -204,7 +202,7 @@ export const paymasterV4Actions = (address) => (client) => ({
|
|
|
204
202
|
});
|
|
205
203
|
},
|
|
206
204
|
// Ownership
|
|
207
|
-
async
|
|
205
|
+
async owner() {
|
|
208
206
|
return client.readContract({
|
|
209
207
|
address,
|
|
210
208
|
abi: PaymasterV4ABI,
|
|
@@ -212,7 +210,7 @@ export const paymasterV4Actions = (address) => (client) => ({
|
|
|
212
210
|
args: []
|
|
213
211
|
});
|
|
214
212
|
},
|
|
215
|
-
async
|
|
213
|
+
async transferOwnership({ newOwner, account }) {
|
|
216
214
|
return client.writeContract({
|
|
217
215
|
address,
|
|
218
216
|
abi: PaymasterV4ABI,
|
|
@@ -222,7 +220,7 @@ export const paymasterV4Actions = (address) => (client) => ({
|
|
|
222
220
|
chain: client.chain
|
|
223
221
|
});
|
|
224
222
|
},
|
|
225
|
-
async
|
|
223
|
+
async renounceOwnership({ account }) {
|
|
226
224
|
return client.writeContract({
|
|
227
225
|
address,
|
|
228
226
|
abi: PaymasterV4ABI,
|
|
@@ -232,98 +230,7 @@ export const paymasterV4Actions = (address) => (client) => ({
|
|
|
232
230
|
chain: client.chain
|
|
233
231
|
});
|
|
234
232
|
},
|
|
235
|
-
|
|
236
|
-
async paymasterV4Registry() {
|
|
237
|
-
return client.readContract({ address, abi: PaymasterV4ABI, functionName: 'registry', args: [] });
|
|
238
|
-
},
|
|
239
|
-
async paymasterV4Treasury() {
|
|
240
|
-
return client.readContract({ address, abi: PaymasterV4ABI, functionName: 'treasury', args: [] });
|
|
241
|
-
},
|
|
242
|
-
async paymasterV4Paused() {
|
|
243
|
-
return client.readContract({ address, abi: PaymasterV4ABI, functionName: 'paused', args: [] });
|
|
244
|
-
},
|
|
245
|
-
async paymasterV4MaxGasCostCap() {
|
|
246
|
-
return client.readContract({ address, abi: PaymasterV4ABI, functionName: 'maxGasCostCap', args: [] });
|
|
247
|
-
},
|
|
248
|
-
async paymasterV4MaxEthUsdPrice() {
|
|
249
|
-
return client.readContract({ address, abi: PaymasterV4ABI, functionName: 'MAX_ETH_USD_PRICE', args: [] });
|
|
250
|
-
},
|
|
251
|
-
async paymasterV4MaxGasTokens() {
|
|
252
|
-
return client.readContract({ address, abi: PaymasterV4ABI, functionName: 'MAX_GAS_TOKENS', args: [] });
|
|
253
|
-
},
|
|
254
|
-
async paymasterV4MaxSbts() {
|
|
255
|
-
return client.readContract({ address, abi: PaymasterV4ABI, functionName: 'MAX_SBTS', args: [] });
|
|
256
|
-
},
|
|
257
|
-
async paymasterV4MaxServiceFee() {
|
|
258
|
-
return client.readContract({ address, abi: PaymasterV4ABI, functionName: 'MAX_SERVICE_FEE', args: [] });
|
|
259
|
-
},
|
|
260
|
-
async paymasterV4MinEthUsdPrice() {
|
|
261
|
-
return client.readContract({ address, abi: PaymasterV4ABI, functionName: 'MIN_ETH_USD_PRICE', args: [] });
|
|
262
|
-
},
|
|
263
|
-
async paymasterV4PriceStalenessThreshold() {
|
|
264
|
-
return client.readContract({ address, abi: PaymasterV4ABI, functionName: 'priceStalenessThreshold', args: [] });
|
|
265
|
-
},
|
|
266
|
-
// Aliases
|
|
267
|
-
async paymasterV4AddDeposit(args) {
|
|
268
|
-
return this.paymasterV4Deposit(args);
|
|
269
|
-
},
|
|
270
|
-
async paymasterV4UnlockStake(args) {
|
|
271
|
-
return this.paymasterV4UnlockPaymasterStake(args);
|
|
272
|
-
},
|
|
273
|
-
// View Functions & Constants (Missing)
|
|
274
|
-
async paymasterV4EthUsdPriceFeed() {
|
|
275
|
-
return client.readContract({ address, abi: PaymasterV4ABI, functionName: 'ethUsdPriceFeed', args: [] });
|
|
276
|
-
},
|
|
277
|
-
async paymasterV4OracleDecimals() {
|
|
278
|
-
return client.readContract({ address, abi: PaymasterV4ABI, functionName: 'oracleDecimals', args: [] });
|
|
279
|
-
},
|
|
280
|
-
async paymasterV4TokenDecimals({ token }) {
|
|
281
|
-
return client.readContract({ address, abi: PaymasterV4ABI, functionName: 'tokenDecimals', args: [token] });
|
|
282
|
-
},
|
|
283
|
-
async paymasterV4ServiceFeeRate() {
|
|
284
|
-
return client.readContract({ address, abi: PaymasterV4ABI, functionName: 'serviceFeeRate', args: [] });
|
|
285
|
-
},
|
|
286
|
-
async paymasterV4CalculateCost({ token, gasCost, param }) {
|
|
287
|
-
return client.readContract({ address, abi: PaymasterV4ABI, functionName: 'calculateCost', args: [token, gasCost, param] });
|
|
288
|
-
},
|
|
289
|
-
async paymasterV4GetRealtimeTokenCost({ token, gasCost }) {
|
|
290
|
-
return client.readContract({ address, abi: PaymasterV4ABI, functionName: 'getRealtimeTokenCost', args: [token, gasCost] });
|
|
291
|
-
},
|
|
292
|
-
async paymasterV4IsActiveInRegistry() {
|
|
293
|
-
return client.readContract({ address, abi: PaymasterV4ABI, functionName: 'isActiveInRegistry', args: [] });
|
|
294
|
-
},
|
|
295
|
-
async paymasterV4IsRegistrySet() {
|
|
296
|
-
return client.readContract({ address, abi: PaymasterV4ABI, functionName: 'isRegistrySet', args: [] });
|
|
297
|
-
},
|
|
298
|
-
async paymasterV4CachedPriceView({ token }) {
|
|
299
|
-
return client.readContract({ address, abi: PaymasterV4ABI, functionName: 'cachedPrice', args: [token] });
|
|
300
|
-
},
|
|
301
|
-
// Admin (Missing)
|
|
302
|
-
async paymasterV4SetCachedPrice({ token, price, account }) {
|
|
303
|
-
return client.writeContract({ address, abi: PaymasterV4ABI, functionName: 'setCachedPrice', args: [token, price], account: account, chain: client.chain });
|
|
304
|
-
},
|
|
305
|
-
async paymasterV4SetServiceFeeRate({ rate, account }) {
|
|
306
|
-
return client.writeContract({ address, abi: PaymasterV4ABI, functionName: 'setServiceFeeRate', args: [rate], account: account, chain: client.chain });
|
|
307
|
-
},
|
|
308
|
-
async paymasterV4SetMaxGasCostCap({ cap, account }) {
|
|
309
|
-
return client.writeContract({ address, abi: PaymasterV4ABI, functionName: 'setMaxGasCostCap', args: [cap], account: account, chain: client.chain });
|
|
310
|
-
},
|
|
311
|
-
async paymasterV4SetPriceStalenessThreshold({ threshold, account }) {
|
|
312
|
-
return client.writeContract({ address, abi: PaymasterV4ABI, functionName: 'setPriceStalenessThreshold', args: [threshold], account: account, chain: client.chain });
|
|
313
|
-
},
|
|
314
|
-
async paymasterV4SetTreasury({ treasury, account }) {
|
|
315
|
-
return client.writeContract({ address, abi: PaymasterV4ABI, functionName: 'setTreasury', args: [treasury], account: account, chain: client.chain });
|
|
316
|
-
},
|
|
317
|
-
async paymasterV4UpdatePrice({ token, account }) {
|
|
318
|
-
return client.writeContract({ address, abi: PaymasterV4ABI, functionName: 'updatePrice', args: [token], account: account, chain: client.chain });
|
|
319
|
-
},
|
|
320
|
-
async paymasterV4DeactivateFromRegistry({ account }) {
|
|
321
|
-
return client.writeContract({ address, abi: PaymasterV4ABI, functionName: 'deactivateFromRegistry', args: [], account: account, chain: client.chain });
|
|
322
|
-
},
|
|
323
|
-
async paymasterV4Initialize({ owner, account }) {
|
|
324
|
-
return client.writeContract({ address, abi: PaymasterV4ABI, functionName: 'initialize', args: [owner], account: account, chain: client.chain });
|
|
325
|
-
},
|
|
326
|
-
async paymasterV4Version() {
|
|
233
|
+
async version() {
|
|
327
234
|
return client.readContract({
|
|
328
235
|
address,
|
|
329
236
|
abi: PaymasterV4ABI,
|