@paulstinchcombe/gasless-nft-tx 0.11.2 → 0.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/dist/KAMI-NFTs/KAMI1155CUpgradeable.sol +1069 -0
- package/dist/KAMI-NFTs/KAMI721ACUpgradable.sol +949 -0
- package/dist/KAMI-NFTs/KAMI721CUpgradeable.sol +691 -0
- package/dist/KAMI-NFTs/ProxyAdmin.sol +12 -0
- package/dist/KAMI-NFTs/TransparentUpgradeableProxy.sol +15 -0
- package/dist/KAMI-NFTs/artifacts/contracts/KAMI1155CUpgradeable.sol/KAMI1155CUpgradeable.dbg.json +4 -0
- package/dist/KAMI-NFTs/artifacts/contracts/KAMI1155CUpgradeable.sol/KAMI1155CUpgradeable.json +2207 -0
- package/dist/KAMI-NFTs/artifacts/contracts/KAMI721ACUpgradable.sol/KAMI721ACUpgradable.dbg.json +4 -0
- package/dist/KAMI-NFTs/artifacts/contracts/KAMI721ACUpgradable.sol/KAMI721ACUpgradable.json +2210 -0
- package/dist/KAMI-NFTs/artifacts/contracts/KAMI721CUpgradeable.sol/KAMI721CUpgradeable.dbg.json +4 -0
- package/dist/KAMI-NFTs/artifacts/contracts/KAMI721CUpgradeable.sol/KAMI721CUpgradeable.json +1823 -0
- package/dist/KAMI-NFTs/artifacts/contracts/ProxyAdmin.sol/KAMIProxyAdmin.dbg.json +4 -0
- package/dist/KAMI-NFTs/artifacts/contracts/ProxyAdmin.sol/KAMIProxyAdmin.json +132 -0
- package/dist/KAMI-NFTs/artifacts/contracts/TransparentUpgradeableProxy.sol/KAMITransparentUpgradeableProxy.dbg.json +4 -0
- package/dist/KAMI-NFTs/artifacts/contracts/TransparentUpgradeableProxy.sol/KAMITransparentUpgradeableProxy.json +116 -0
- package/dist/kami-sponsored-operations.d.ts.map +1 -1
- package/dist/kami-sponsored-operations.js +19 -7
- package/dist/kami-sponsored-operations.js.map +1 -1
- package/dist/kami-upgrade-manager.d.ts +65 -0
- package/dist/kami-upgrade-manager.d.ts.map +1 -0
- package/dist/kami-upgrade-manager.js +320 -0
- package/dist/kami-upgrade-manager.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,320 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @file KAMI Upgrade Manager
|
|
4
|
+
* @description Manages upgrades for upgradeable KAMI NFT contracts
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.KamiUpgradeManager = void 0;
|
|
8
|
+
const viem_1 = require("viem");
|
|
9
|
+
const accounts_1 = require("viem/accounts");
|
|
10
|
+
const chains_1 = require("viem/chains");
|
|
11
|
+
const nextjs_artifact_loader_1 = require("./nextjs-artifact-loader");
|
|
12
|
+
const ContractDeployer_1 = require("./SmartContractWallet/ContractDeployer");
|
|
13
|
+
/**
|
|
14
|
+
* KAMI Upgrade Manager
|
|
15
|
+
* Handles upgrades for upgradeable KAMI NFT contracts
|
|
16
|
+
*/
|
|
17
|
+
class KamiUpgradeManager {
|
|
18
|
+
publicClient;
|
|
19
|
+
walletClient;
|
|
20
|
+
config;
|
|
21
|
+
platformAccount;
|
|
22
|
+
constructor(config) {
|
|
23
|
+
this.config = config;
|
|
24
|
+
this.platformAccount = (0, accounts_1.privateKeyToAccount)(config.platformPrivateKey);
|
|
25
|
+
this.publicClient = (0, viem_1.createPublicClient)({
|
|
26
|
+
transport: (0, viem_1.http)(config.rpcUrl),
|
|
27
|
+
chain: config.chain || chains_1.baseSepolia,
|
|
28
|
+
});
|
|
29
|
+
this.walletClient = (0, viem_1.createWalletClient)({
|
|
30
|
+
account: this.platformAccount,
|
|
31
|
+
transport: (0, viem_1.http)(config.rpcUrl),
|
|
32
|
+
chain: config.chain || chains_1.baseSepolia,
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Get current implementation address for a proxy
|
|
37
|
+
*/
|
|
38
|
+
async getImplementation(proxyAddress) {
|
|
39
|
+
try {
|
|
40
|
+
const result = await this.publicClient.readContract({
|
|
41
|
+
address: proxyAddress,
|
|
42
|
+
abi: [
|
|
43
|
+
{
|
|
44
|
+
inputs: [],
|
|
45
|
+
name: 'implementation',
|
|
46
|
+
outputs: [{ name: '', type: 'address' }],
|
|
47
|
+
stateMutability: 'view',
|
|
48
|
+
type: 'function',
|
|
49
|
+
},
|
|
50
|
+
],
|
|
51
|
+
functionName: 'implementation',
|
|
52
|
+
});
|
|
53
|
+
return result;
|
|
54
|
+
}
|
|
55
|
+
catch (error) {
|
|
56
|
+
console.error('Failed to get implementation address:', error);
|
|
57
|
+
return null;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Get ProxyAdmin address for a proxy (if available)
|
|
62
|
+
* Note: TransparentUpgradeableProxy doesn't expose admin() directly
|
|
63
|
+
* This should be tracked during deployment
|
|
64
|
+
*/
|
|
65
|
+
async getProxyAdmin(proxyAddress) {
|
|
66
|
+
try {
|
|
67
|
+
// Try calling getProxyAdmin on ContractDeployer
|
|
68
|
+
const result = await this.publicClient.readContract({
|
|
69
|
+
address: this.config.contractDeployerAddress,
|
|
70
|
+
abi: ContractDeployer_1.CONTRACT_DEPLOYER_ABI,
|
|
71
|
+
functionName: 'getProxyAdmin',
|
|
72
|
+
args: [proxyAddress],
|
|
73
|
+
});
|
|
74
|
+
return result;
|
|
75
|
+
}
|
|
76
|
+
catch (error) {
|
|
77
|
+
console.warn('Failed to get ProxyAdmin address:', error);
|
|
78
|
+
return null;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Get proxy information
|
|
83
|
+
*/
|
|
84
|
+
async getProxyInfo(proxyAddress) {
|
|
85
|
+
const implementationAddress = await this.getImplementation(proxyAddress);
|
|
86
|
+
if (!implementationAddress) {
|
|
87
|
+
return null;
|
|
88
|
+
}
|
|
89
|
+
const proxyAdminAddress = await this.getProxyAdmin(proxyAddress);
|
|
90
|
+
return {
|
|
91
|
+
proxyAddress,
|
|
92
|
+
implementationAddress,
|
|
93
|
+
proxyAdminAddress: proxyAdminAddress || undefined,
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Deploy new implementation contract
|
|
98
|
+
*/
|
|
99
|
+
async deployNewImplementation(contractName) {
|
|
100
|
+
try {
|
|
101
|
+
console.log(`📦 Deploying new ${contractName} implementation...`);
|
|
102
|
+
const artifact = (0, nextjs_artifact_loader_1.loadArtifactForNextJS)(contractName);
|
|
103
|
+
if (!artifact) {
|
|
104
|
+
console.error(`❌ ${contractName} artifact not found`);
|
|
105
|
+
return null;
|
|
106
|
+
}
|
|
107
|
+
const implementationBytecode = artifact.bytecode;
|
|
108
|
+
// Deploy implementation via ContractDeployer
|
|
109
|
+
const deployCalldata = (0, viem_1.encodeFunctionData)({
|
|
110
|
+
abi: ContractDeployer_1.CONTRACT_DEPLOYER_ABI,
|
|
111
|
+
functionName: 'deployImplementation',
|
|
112
|
+
args: [implementationBytecode],
|
|
113
|
+
});
|
|
114
|
+
const executeCalldata = (0, viem_1.encodeFunctionData)({
|
|
115
|
+
abi: [
|
|
116
|
+
{
|
|
117
|
+
type: 'function',
|
|
118
|
+
name: 'execute',
|
|
119
|
+
inputs: [
|
|
120
|
+
{ name: 'dest', type: 'address' },
|
|
121
|
+
{ name: 'value', type: 'uint256' },
|
|
122
|
+
{ name: 'func', type: 'bytes' },
|
|
123
|
+
],
|
|
124
|
+
outputs: [],
|
|
125
|
+
},
|
|
126
|
+
],
|
|
127
|
+
functionName: 'execute',
|
|
128
|
+
args: [this.config.contractDeployerAddress, 0n, deployCalldata],
|
|
129
|
+
});
|
|
130
|
+
const txHash = await this.walletClient.sendTransaction({
|
|
131
|
+
account: this.platformAccount,
|
|
132
|
+
to: this.config.platformSimpleAccountAddress,
|
|
133
|
+
data: executeCalldata,
|
|
134
|
+
gas: 5000000n,
|
|
135
|
+
});
|
|
136
|
+
const receipt = await this.publicClient.waitForTransactionReceipt({ hash: txHash });
|
|
137
|
+
if (receipt.status !== 'success') {
|
|
138
|
+
console.error('❌ Implementation deployment failed');
|
|
139
|
+
return null;
|
|
140
|
+
}
|
|
141
|
+
// Extract implementation address from logs
|
|
142
|
+
const implementationAddress = this.extractContractAddress(receipt);
|
|
143
|
+
if (!implementationAddress) {
|
|
144
|
+
console.error('❌ Failed to extract implementation address');
|
|
145
|
+
return null;
|
|
146
|
+
}
|
|
147
|
+
console.log(`✅ New implementation deployed at: ${implementationAddress}`);
|
|
148
|
+
return implementationAddress;
|
|
149
|
+
}
|
|
150
|
+
catch (error) {
|
|
151
|
+
console.error('❌ Failed to deploy new implementation:', error);
|
|
152
|
+
return null;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Upgrade a proxy to a new implementation
|
|
157
|
+
*/
|
|
158
|
+
async upgradeProxy(proxyAddress, proxyAdminAddress, newImplementationAddress, upgradeCallData) {
|
|
159
|
+
try {
|
|
160
|
+
console.log(`🔄 Upgrading proxy ${proxyAddress}...`);
|
|
161
|
+
console.log(` Old implementation: ${await this.getImplementation(proxyAddress)}`);
|
|
162
|
+
console.log(` New implementation: ${newImplementationAddress}`);
|
|
163
|
+
// Get old implementation address
|
|
164
|
+
const oldImplementationAddress = await this.getImplementation(proxyAddress);
|
|
165
|
+
if (!oldImplementationAddress) {
|
|
166
|
+
return {
|
|
167
|
+
success: false,
|
|
168
|
+
error: 'Failed to get current implementation address',
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
// Encode upgrade call
|
|
172
|
+
const upgradeCalldata = (0, viem_1.encodeFunctionData)({
|
|
173
|
+
abi: [
|
|
174
|
+
{
|
|
175
|
+
inputs: [
|
|
176
|
+
{ name: 'proxy', type: 'address' },
|
|
177
|
+
{ name: 'implementation', type: 'address' },
|
|
178
|
+
{ name: 'data', type: 'bytes' },
|
|
179
|
+
],
|
|
180
|
+
name: 'upgradeAndCall',
|
|
181
|
+
outputs: [],
|
|
182
|
+
stateMutability: 'nonpayable',
|
|
183
|
+
type: 'function',
|
|
184
|
+
},
|
|
185
|
+
],
|
|
186
|
+
functionName: 'upgradeAndCall',
|
|
187
|
+
args: [proxyAddress, newImplementationAddress, upgradeCallData || '0x'],
|
|
188
|
+
});
|
|
189
|
+
// Execute upgrade via ProxyAdmin
|
|
190
|
+
const executeCalldata = (0, viem_1.encodeFunctionData)({
|
|
191
|
+
abi: [
|
|
192
|
+
{
|
|
193
|
+
type: 'function',
|
|
194
|
+
name: 'execute',
|
|
195
|
+
inputs: [
|
|
196
|
+
{ name: 'dest', type: 'address' },
|
|
197
|
+
{ name: 'value', type: 'uint256' },
|
|
198
|
+
{ name: 'func', type: 'bytes' },
|
|
199
|
+
],
|
|
200
|
+
outputs: [],
|
|
201
|
+
},
|
|
202
|
+
],
|
|
203
|
+
functionName: 'execute',
|
|
204
|
+
args: [proxyAdminAddress, 0n, upgradeCalldata],
|
|
205
|
+
});
|
|
206
|
+
const txHash = await this.walletClient.sendTransaction({
|
|
207
|
+
account: this.platformAccount,
|
|
208
|
+
to: this.config.platformSimpleAccountAddress,
|
|
209
|
+
data: executeCalldata,
|
|
210
|
+
gas: 5000000n,
|
|
211
|
+
});
|
|
212
|
+
const receipt = await this.publicClient.waitForTransactionReceipt({ hash: txHash });
|
|
213
|
+
if (receipt.status !== 'success') {
|
|
214
|
+
return {
|
|
215
|
+
success: false,
|
|
216
|
+
error: 'Upgrade transaction failed',
|
|
217
|
+
transactionHash: txHash,
|
|
218
|
+
};
|
|
219
|
+
}
|
|
220
|
+
// Verify upgrade succeeded
|
|
221
|
+
const newImplAddress = await this.getImplementation(proxyAddress);
|
|
222
|
+
if (newImplAddress?.toLowerCase() !== newImplementationAddress.toLowerCase()) {
|
|
223
|
+
return {
|
|
224
|
+
success: false,
|
|
225
|
+
error: 'Upgrade verification failed - implementation address mismatch',
|
|
226
|
+
transactionHash: txHash,
|
|
227
|
+
};
|
|
228
|
+
}
|
|
229
|
+
console.log(`✅ Upgrade successful!`);
|
|
230
|
+
console.log(` New implementation: ${newImplAddress}`);
|
|
231
|
+
return {
|
|
232
|
+
success: true,
|
|
233
|
+
proxyAddress,
|
|
234
|
+
oldImplementationAddress,
|
|
235
|
+
newImplementationAddress: newImplAddress,
|
|
236
|
+
transactionHash: txHash,
|
|
237
|
+
};
|
|
238
|
+
}
|
|
239
|
+
catch (error) {
|
|
240
|
+
console.error('❌ Upgrade failed:', error);
|
|
241
|
+
return {
|
|
242
|
+
success: false,
|
|
243
|
+
error: error.message || 'Unknown upgrade error',
|
|
244
|
+
};
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* Prepare and execute upgrade in one step
|
|
249
|
+
*/
|
|
250
|
+
async prepareAndUpgrade(proxyAddress, proxyAdminAddress, contractName, upgradeCallData) {
|
|
251
|
+
// Deploy new implementation
|
|
252
|
+
const newImplementationAddress = await this.deployNewImplementation(contractName);
|
|
253
|
+
if (!newImplementationAddress) {
|
|
254
|
+
return {
|
|
255
|
+
success: false,
|
|
256
|
+
error: 'Failed to deploy new implementation',
|
|
257
|
+
};
|
|
258
|
+
}
|
|
259
|
+
// Execute upgrade
|
|
260
|
+
return await this.upgradeProxy(proxyAddress, proxyAdminAddress, newImplementationAddress, upgradeCallData);
|
|
261
|
+
}
|
|
262
|
+
/**
|
|
263
|
+
* Verify upgrade compatibility (basic checks)
|
|
264
|
+
*/
|
|
265
|
+
async verifyUpgrade(proxyAddress, newImplementationAddress) {
|
|
266
|
+
try {
|
|
267
|
+
// Get current implementation
|
|
268
|
+
const currentImpl = await this.getImplementation(proxyAddress);
|
|
269
|
+
if (!currentImpl) {
|
|
270
|
+
return { compatible: false, error: 'Failed to get current implementation' };
|
|
271
|
+
}
|
|
272
|
+
// Basic verification: check that new implementation is different
|
|
273
|
+
if (currentImpl.toLowerCase() === newImplementationAddress.toLowerCase()) {
|
|
274
|
+
return { compatible: false, error: 'New implementation is the same as current implementation' };
|
|
275
|
+
}
|
|
276
|
+
// Check that new implementation has code
|
|
277
|
+
const code = await this.publicClient.getBytecode({ address: newImplementationAddress });
|
|
278
|
+
if (!code || code === '0x') {
|
|
279
|
+
return { compatible: false, error: 'New implementation has no code' };
|
|
280
|
+
}
|
|
281
|
+
// Note: More comprehensive checks (storage layout, function signatures) should be done
|
|
282
|
+
// using OpenZeppelin's upgrade plugins or similar tools
|
|
283
|
+
return { compatible: true };
|
|
284
|
+
}
|
|
285
|
+
catch (error) {
|
|
286
|
+
return { compatible: false, error: error.message || 'Verification failed' };
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
/**
|
|
290
|
+
* Extract contract address from transaction receipt
|
|
291
|
+
*/
|
|
292
|
+
extractContractAddress(receipt) {
|
|
293
|
+
// Look for ContractDeployed event
|
|
294
|
+
// Event signature: ContractDeployed(address indexed deployedAddress, address indexed deployer)
|
|
295
|
+
const eventSignature = (0, viem_1.keccak256)(Buffer.from('ContractDeployed(address,address)'));
|
|
296
|
+
for (const log of receipt.logs || []) {
|
|
297
|
+
if (log.topics && log.topics[0] === eventSignature && log.topics[1]) {
|
|
298
|
+
const deployedAddress = '0x' + log.topics[1].slice(-40);
|
|
299
|
+
return deployedAddress;
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
// Fallback: use contractAddress from receipt
|
|
303
|
+
if (receipt.contractAddress) {
|
|
304
|
+
return receipt.contractAddress;
|
|
305
|
+
}
|
|
306
|
+
// Fallback: find unique new address in logs
|
|
307
|
+
const uniqueAddresses = new Set();
|
|
308
|
+
for (const log of receipt.logs || []) {
|
|
309
|
+
if (log.address && log.address.toLowerCase() !== this.config.platformSimpleAccountAddress.toLowerCase()) {
|
|
310
|
+
uniqueAddresses.add(log.address);
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
if (uniqueAddresses.size === 1) {
|
|
314
|
+
return Array.from(uniqueAddresses)[0];
|
|
315
|
+
}
|
|
316
|
+
return null;
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
exports.KamiUpgradeManager = KamiUpgradeManager;
|
|
320
|
+
//# sourceMappingURL=kami-upgrade-manager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kami-upgrade-manager.js","sourceRoot":"","sources":["../src/kami-upgrade-manager.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,+BASc;AACd,4CAAoD;AACpD,wCAA0C;AAC1C,qEAAiE;AACjE,6EAA+E;AAc/E;;;GAGG;AACH,MAAa,kBAAkB;IACtB,YAAY,CAAM;IAClB,YAAY,CAAM;IAClB,MAAM,CAAuB;IAC7B,eAAe,CAAoB;IAE3C,YAAY,MAA4B;QACvC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,eAAe,GAAG,IAAA,8BAAmB,EAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC;QAEtE,IAAI,CAAC,YAAY,GAAG,IAAA,yBAAkB,EAAC;YACtC,SAAS,EAAE,IAAA,WAAI,EAAC,MAAM,CAAC,MAAM,CAAC;YAC9B,KAAK,EAAE,MAAM,CAAC,KAAK,IAAI,oBAAW;SAClC,CAAC,CAAC;QAEH,IAAI,CAAC,YAAY,GAAG,IAAA,yBAAkB,EAAC;YACtC,OAAO,EAAE,IAAI,CAAC,eAAe;YAC7B,SAAS,EAAE,IAAA,WAAI,EAAC,MAAM,CAAC,MAAM,CAAC;YAC9B,KAAK,EAAE,MAAM,CAAC,KAAK,IAAI,oBAAW;SAClC,CAAC,CAAC;IACJ,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,iBAAiB,CAAC,YAAqB;QAC5C,IAAI,CAAC;YACJ,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,YAAY,CAAC;gBACnD,OAAO,EAAE,YAAY;gBACrB,GAAG,EAAE;oBACJ;wBACC,MAAM,EAAE,EAAE;wBACV,IAAI,EAAE,gBAAgB;wBACtB,OAAO,EAAE,CAAC,EAAE,IA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AAO,IAAI,CAAC;IACb,CAAC;CACD;AA7VD,gDA6VC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@paulstinchcombe/gasless-nft-tx",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
4
4
|
"description": "Complete library for deploying and managing KAMI NFT contracts with truly gasless transactions using EIP-4337 Account Abstraction. Now compatible with OpenZeppelin Contracts v5.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|