neozipkit 0.1.1 → 0.3.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/LICENSE +22 -0
- package/README.md +371 -200
- package/contracts/ABI.txt +889 -0
- package/contracts/Bytecode.txt +1 -0
- package/contracts/COMPILATION_NOTES.md +59 -0
- package/contracts/QUICK_DEPLOY.md +286 -0
- package/contracts/README.md +256 -0
- package/contracts/VERIFICATION.md +308 -0
- package/contracts/deploy-interactive.js +448 -0
- package/contracts/deployment-arbitrum-sepolia.json +12 -0
- package/contracts/deployment-arbitrum.json +12 -0
- package/contracts/deployment-eth-sepolia.json +12 -0
- package/contracts/hardhat.config.js +114 -0
- package/contracts/package.json +20 -0
- package/contracts/scripts/compile-and-extract.js +119 -0
- package/contracts/scripts/verify-contract.js +223 -0
- package/contracts/src/{NZIP-NFT-Private.sol → NZIP-NFT-v2.0.sol} +66 -151
- package/contracts/src/NZIP-NFT.sol +9 -15
- package/dist/{browser → blockchain/browser}/TokenVerifierBrowser.d.ts +11 -20
- package/dist/blockchain/browser/TokenVerifierBrowser.d.ts.map +1 -0
- package/dist/{browser → blockchain/browser}/TokenVerifierBrowser.js +106 -92
- package/dist/blockchain/browser/TokenVerifierBrowser.js.map +1 -0
- package/dist/blockchain/browser/WalletManagerBrowser.d.ts +98 -0
- package/dist/blockchain/browser/WalletManagerBrowser.d.ts.map +1 -0
- package/dist/blockchain/browser/WalletManagerBrowser.js +434 -0
- package/dist/blockchain/browser/WalletManagerBrowser.js.map +1 -0
- package/dist/blockchain/browser/ZipkitMinterBrowser.d.ts +58 -0
- package/dist/blockchain/browser/ZipkitMinterBrowser.d.ts.map +1 -0
- package/dist/blockchain/browser/ZipkitMinterBrowser.js +317 -0
- package/dist/blockchain/browser/ZipkitMinterBrowser.js.map +1 -0
- package/dist/blockchain/browser/index.d.ts +11 -0
- package/dist/blockchain/browser/index.d.ts.map +1 -0
- package/dist/blockchain/browser/index.js +16 -0
- package/dist/blockchain/browser/index.js.map +1 -0
- package/dist/{server/blockchain/WalletAnalyzer.d.ts → blockchain/core/WalletManager.d.ts} +69 -26
- package/dist/blockchain/core/WalletManager.d.ts.map +1 -0
- package/dist/{server/blockchain/WalletAnalyzer.js → blockchain/core/WalletManager.js} +172 -160
- package/dist/blockchain/core/WalletManager.js.map +1 -0
- package/dist/blockchain/core/ZipkitMinter.d.ts +141 -0
- package/dist/blockchain/core/ZipkitMinter.d.ts.map +1 -0
- package/dist/blockchain/core/ZipkitMinter.js +548 -0
- package/dist/blockchain/core/ZipkitMinter.js.map +1 -0
- package/dist/blockchain/core/ZipkitOTS.d.ts +126 -0
- package/dist/blockchain/core/ZipkitOTS.d.ts.map +1 -0
- package/dist/blockchain/core/ZipkitOTS.js +506 -0
- package/dist/blockchain/core/ZipkitOTS.js.map +1 -0
- package/dist/blockchain/core/ZipkitVerifier.d.ts +177 -0
- package/dist/blockchain/core/ZipkitVerifier.d.ts.map +1 -0
- package/dist/blockchain/core/ZipkitVerifier.js +632 -0
- package/dist/blockchain/core/ZipkitVerifier.js.map +1 -0
- package/dist/blockchain/core/contracts.d.ts +83 -0
- package/dist/blockchain/core/contracts.d.ts.map +1 -0
- package/dist/blockchain/core/contracts.js +341 -0
- package/dist/blockchain/core/contracts.js.map +1 -0
- package/dist/blockchain/core/index.d.ts +12 -0
- package/dist/blockchain/core/index.d.ts.map +1 -0
- package/dist/blockchain/core/index.js +59 -0
- package/dist/blockchain/core/index.js.map +1 -0
- package/dist/blockchain/index.d.ts +11 -0
- package/dist/blockchain/index.d.ts.map +1 -0
- package/dist/blockchain/index.js +34 -0
- package/dist/blockchain/index.js.map +1 -0
- package/dist/blockchain/node/WalletManagerNode.d.ts +47 -0
- package/dist/blockchain/node/WalletManagerNode.d.ts.map +1 -0
- package/dist/blockchain/node/WalletManagerNode.js +203 -0
- package/dist/blockchain/node/WalletManagerNode.js.map +1 -0
- package/dist/blockchain/node/index.d.ts +12 -0
- package/dist/blockchain/node/index.d.ts.map +1 -0
- package/dist/blockchain/node/index.js +24 -0
- package/dist/blockchain/node/index.js.map +1 -0
- package/dist/browser/ZipkitBrowser.d.ts +27 -0
- package/dist/browser/ZipkitBrowser.d.ts.map +1 -0
- package/dist/browser/{ZipKitBrowser.js → ZipkitBrowser.js} +96 -43
- package/dist/browser/ZipkitBrowser.js.map +1 -0
- package/dist/browser/index.d.ts +12 -0
- package/dist/browser/index.d.ts.map +1 -0
- package/dist/browser/index.js +42 -0
- package/dist/browser/index.js.map +1 -0
- package/dist/browser-esm/index.d.ts +12 -0
- package/dist/browser-esm/index.js +59559 -0
- package/dist/browser-esm/index.js.map +7 -0
- package/dist/browser-umd/index.d.ts +12 -0
- package/dist/browser-umd/index.js +59576 -0
- package/dist/browser-umd/index.js.map +7 -0
- package/dist/browser-umd/index.min.js +63 -0
- package/dist/browser.d.ts +8 -17
- package/dist/browser.js +13 -29
- package/dist/core/ZipCompress.d.ts +99 -0
- package/dist/core/ZipCompress.d.ts.map +1 -0
- package/dist/core/ZipCompress.js +309 -0
- package/dist/core/ZipCompress.js.map +1 -0
- package/dist/core/ZipDecompress.d.ts +58 -0
- package/dist/core/ZipDecompress.d.ts.map +1 -0
- package/dist/core/ZipDecompress.js +172 -0
- package/dist/core/ZipDecompress.js.map +1 -0
- package/dist/{shared → core}/ZipEntry.d.ts +8 -1
- package/dist/core/ZipEntry.d.ts.map +1 -0
- package/dist/{shared → core}/ZipEntry.js +224 -81
- package/dist/core/ZipEntry.js.map +1 -0
- package/dist/core/Zipkit.d.ts +315 -0
- package/dist/core/Zipkit.d.ts.map +1 -0
- package/dist/core/Zipkit.js +647 -0
- package/dist/core/Zipkit.js.map +1 -0
- package/dist/core/components/HashCalculator.d.ts +138 -0
- package/dist/core/components/HashCalculator.d.ts.map +1 -0
- package/dist/core/components/HashCalculator.js +360 -0
- package/dist/core/components/HashCalculator.js.map +1 -0
- package/dist/core/components/Logger.d.ts +73 -0
- package/dist/core/components/Logger.d.ts.map +1 -0
- package/dist/core/components/Logger.js +156 -0
- package/dist/core/components/Logger.js.map +1 -0
- package/dist/core/components/ProgressTracker.d.ts +43 -0
- package/dist/core/components/ProgressTracker.d.ts.map +1 -0
- package/dist/core/components/ProgressTracker.js +112 -0
- package/dist/core/components/ProgressTracker.js.map +1 -0
- package/dist/{shared → core}/components/Support.d.ts +1 -0
- package/dist/core/components/Support.d.ts.map +1 -0
- package/dist/{shared → core}/components/Support.js +1 -0
- package/dist/core/components/Support.js.map +1 -0
- package/dist/{shared → core}/components/Util.d.ts +7 -2
- package/dist/core/components/Util.d.ts.map +1 -0
- package/dist/{shared → core}/components/Util.js +14 -34
- package/dist/core/components/Util.js.map +1 -0
- package/dist/{shared → core}/constants/Errors.d.ts +1 -2
- package/dist/core/constants/Errors.d.ts.map +1 -0
- package/dist/{shared → core}/constants/Errors.js +1 -3
- package/dist/core/constants/Errors.js.map +1 -0
- package/dist/{shared → core}/constants/Headers.d.ts +3 -0
- package/dist/core/constants/Headers.d.ts.map +1 -0
- package/dist/{shared → core}/constants/Headers.js +20 -17
- package/dist/core/constants/Headers.js.map +1 -0
- package/dist/core/encryption/Manager.d.ts +58 -0
- package/dist/core/encryption/Manager.d.ts.map +1 -0
- package/dist/core/encryption/Manager.js +121 -0
- package/dist/core/encryption/Manager.js.map +1 -0
- package/dist/core/encryption/ZipCrypto.d.ts +172 -0
- package/dist/core/encryption/ZipCrypto.d.ts.map +1 -0
- package/dist/core/encryption/ZipCrypto.js +554 -0
- package/dist/core/encryption/ZipCrypto.js.map +1 -0
- package/dist/core/encryption/index.d.ts +9 -0
- package/dist/core/encryption/index.d.ts.map +1 -0
- package/dist/core/encryption/index.js +17 -0
- package/dist/core/encryption/index.js.map +1 -0
- package/dist/core/encryption/types.d.ts +29 -0
- package/dist/core/encryption/types.d.ts.map +1 -0
- package/dist/core/encryption/types.js +12 -0
- package/dist/core/encryption/types.js.map +1 -0
- package/dist/core/index.d.ts +24 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +57 -0
- package/dist/core/index.js.map +1 -0
- package/dist/{shared → core}/version.d.ts +1 -0
- package/dist/core/version.d.ts.map +1 -0
- package/dist/core/version.js +31 -0
- package/dist/core/version.js.map +1 -0
- package/dist/index.d.ts +8 -25
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +29 -47
- package/dist/index.js.map +1 -0
- package/dist/node/ZipCompressNode.d.ts +123 -0
- package/dist/node/ZipCompressNode.d.ts.map +1 -0
- package/dist/node/ZipCompressNode.js +576 -0
- package/dist/node/ZipCompressNode.js.map +1 -0
- package/dist/node/ZipDecompressNode.d.ts +120 -0
- package/dist/node/ZipDecompressNode.d.ts.map +1 -0
- package/dist/node/ZipDecompressNode.js +461 -0
- package/dist/node/ZipDecompressNode.js.map +1 -0
- package/dist/node/ZipkitNode.d.ts +406 -0
- package/dist/node/ZipkitNode.d.ts.map +1 -0
- package/dist/node/ZipkitNode.js +1305 -0
- package/dist/node/ZipkitNode.js.map +1 -0
- package/dist/node/index.d.ts +26 -0
- package/dist/node/index.d.ts.map +1 -0
- package/dist/node/index.js +65 -0
- package/dist/node/index.js.map +1 -0
- package/dist/types/index.d.ts +59 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +36 -1
- package/dist/types/index.js.map +1 -0
- package/examples/README.md +269 -0
- package/examples/blockchain-tokenize.ts +354 -0
- package/examples/create-zip.ts +172 -0
- package/examples/extract-zip.ts +158 -0
- package/examples/list-zip.ts +161 -0
- package/examples/test-files/data.json +116 -0
- package/examples/test-files/document.md +80 -0
- package/examples/test-files/document.txt +2 -0
- package/examples/test-files/file1.txt +48 -0
- package/examples/test-files/file2.txt +80 -0
- package/examples/tsconfig.json +44 -0
- package/examples/unzip-token.ts +6 -3
- package/examples/verify-tokenized-zip.ts +305 -0
- package/package.json +117 -23
- package/src/blockchain/README.md +222 -0
- package/src/{browser → blockchain/browser}/TokenVerifierBrowser.ts +125 -79
- package/src/blockchain/browser/WalletManagerBrowser.ts +486 -0
- package/src/blockchain/browser/ZipkitMinterBrowser.ts +400 -0
- package/src/blockchain/browser/index.ts +13 -0
- package/src/blockchain/core/WalletManager.ts +436 -0
- package/src/blockchain/core/ZipkitMinter.ts +716 -0
- package/src/blockchain/core/ZipkitOTS.ts +588 -0
- package/src/blockchain/core/ZipkitVerifier.ts +853 -0
- package/src/blockchain/core/contracts.ts +370 -0
- package/src/blockchain/core/index.ts +71 -0
- package/src/blockchain/index.ts +27 -0
- package/src/blockchain/node/WalletManagerNode.ts +171 -0
- package/src/blockchain/node/index.ts +40 -0
- package/src/browser/{ZipKitBrowser.ts → ZipkitBrowser.ts} +104 -41
- package/src/browser/index.esm.ts +37 -0
- package/src/browser/index.ts +25 -0
- package/src/core/ZipCompress.ts +398 -0
- package/src/core/ZipDecompress.ts +212 -0
- package/src/{shared → core}/ZipEntry.ts +239 -89
- package/src/core/Zipkit.ts +794 -0
- package/src/core/components/HashCalculator.ts +384 -0
- package/src/core/components/Logger.ts +180 -0
- package/src/core/components/ProgressTracker.ts +134 -0
- package/src/{shared → core}/components/Util.ts +12 -34
- package/src/{shared → core}/constants/Errors.ts +0 -4
- package/src/{shared → core}/constants/Headers.ts +19 -17
- package/src/core/encryption/Manager.ts +137 -0
- package/src/core/encryption/ZipCrypto.ts +650 -0
- package/src/core/encryption/index.ts +15 -0
- package/src/core/encryption/types.ts +33 -0
- package/src/core/index.ts +34 -0
- package/src/core/version.ts +33 -0
- package/src/index.ts +54 -32
- package/src/node/ZipCompressNode.ts +632 -0
- package/src/node/ZipDecompressNode.ts +508 -0
- package/src/node/ZipkitNode.ts +1559 -0
- package/src/node/index.ts +69 -0
- package/src/types/index.ts +131 -1
- package/src/types/opentimestamps.d.ts +1 -23
- package/contracts/Lock.sol +0 -34
- package/contracts/bytecode.txt +0 -1
- package/contracts/compile-contract.js +0 -168
- package/contracts/deploy/deploy-both-contracts.js +0 -286
- package/contracts/deploy/deploy-enhanced-contract.js +0 -197
- package/contracts/deploy/deploy-private-contract.js +0 -190
- package/contracts/deploy/deploy-public-clean.js +0 -1063
- package/contracts/deploy/deploy-public-contract.js +0 -1107
- package/contracts/deployment.config.example.js +0 -25
- package/contracts/remix-compile.js +0 -222
- package/contracts/setup-deployment.js +0 -51
- package/contracts/src/ZipFileNFT-DEPRECATED-6field.sol +0 -260
- package/contracts/src/ZipFileNFT-DEPRECATED-Enhanced.sol +0 -289
- package/dist/browser/CertificateGeneratorBrowser.d.ts +0 -75
- package/dist/browser/CertificateGeneratorBrowser.js +0 -433
- package/dist/browser/ZipKitBrowser.d.ts +0 -18
- package/dist/browser/ZipKitStampBrowser.d.ts +0 -2
- package/dist/browser/ZipKitStampBrowser.js +0 -12
- package/dist/browser-index.d.ts +0 -21
- package/dist/browser-index.js +0 -58
- package/dist/server/blockchain/CertificateToken.d.ts +0 -48
- package/dist/server/blockchain/CertificateToken.js +0 -386
- package/dist/server/blockchain/NFTMinter.d.ts +0 -41
- package/dist/server/blockchain/NFTMinter.js +0 -323
- package/dist/server/blockchain/TokenQuerier.d.ts +0 -31
- package/dist/server/blockchain/TokenQuerier.js +0 -259
- package/dist/server/blockchain/TokenVerifier.d.ts +0 -20
- package/dist/server/blockchain/TokenVerifier.js +0 -395
- package/dist/server/blockchain/WalletFormatter.d.ts +0 -39
- package/dist/server/blockchain/WalletFormatter.js +0 -196
- package/dist/server/blockchain/WalletManager.d.ts +0 -46
- package/dist/server/blockchain/WalletManager.js +0 -294
- package/dist/server/blockchain/ZipMetadata.d.ts +0 -27
- package/dist/server/blockchain/ZipMetadata.js +0 -131
- package/dist/server/blockchain/ZipTokenProcessor.d.ts +0 -44
- package/dist/server/blockchain/ZipTokenProcessor.js +0 -204
- package/dist/server/blockchain/constants.d.ts +0 -102
- package/dist/server/blockchain/constants.js +0 -968
- package/dist/server/blockchain/index.d.ts +0 -9
- package/dist/server/blockchain/index.js +0 -44
- package/dist/server/blockchain/test-certificate.d.ts +0 -8
- package/dist/server/blockchain/test-certificate.js +0 -100
- package/dist/server/blockchain/types.d.ts +0 -69
- package/dist/server/blockchain/types.js +0 -51
- package/dist/server/platform/server/ZipKitServer.d.ts +0 -105
- package/dist/server/platform/server/ZipKitServer.js +0 -437
- package/dist/server/platform/servercomponents/ZipKitOTS.d.ts +0 -91
- package/dist/server/platform/servercomponents/ZipKitOTS.js +0 -271
- package/dist/shared/ZipKit.d.ts +0 -249
- package/dist/shared/ZipKit.js +0 -789
- package/dist/shared/components/CertificateOTS.d.ts +0 -15
- package/dist/shared/components/CertificateOTS.js +0 -116
- package/dist/shared/components/FileSys.d.ts +0 -2
- package/dist/shared/components/FileSys.js +0 -113
- package/dist/shared/components/HashAccumulator.d.ts +0 -55
- package/dist/shared/components/HashAccumulator.js +0 -100
- package/dist/shared/components/ZipCrypto.d.ts +0 -3
- package/dist/shared/components/ZipCrypto.js +0 -78
- package/dist/shared/components/merkleTree.d.ts +0 -66
- package/dist/shared/components/merkleTree.js +0 -136
- package/dist/shared/types/index.d.ts +0 -21
- package/dist/shared/types/index.js +0 -3
- package/dist/shared/types.d.ts +0 -33
- package/dist/shared/types.js +0 -8
- package/dist/shared/version.js +0 -7
- package/src/browser/CertificateGeneratorBrowser.ts +0 -498
- package/src/browser/ZipKitStampBrowser.ts +0 -9
- package/src/browser-index.ts +0 -36
- package/src/server/blockchain/CertificateToken.ts +0 -444
- package/src/server/blockchain/NFTMinter.ts +0 -357
- package/src/server/blockchain/TokenQuerier.ts +0 -287
- package/src/server/blockchain/TokenVerifier.ts +0 -453
- package/src/server/blockchain/WalletAnalyzer.ts +0 -397
- package/src/server/blockchain/WalletFormatter.ts +0 -206
- package/src/server/blockchain/WalletManager.ts +0 -294
- package/src/server/blockchain/ZipMetadata.ts +0 -117
- package/src/server/blockchain/ZipTokenProcessor.ts +0 -234
- package/src/server/blockchain/constants.ts +0 -969
- package/src/server/blockchain/index.ts +0 -42
- package/src/server/blockchain/test-certificate.ts +0 -137
- package/src/server/blockchain/types.ts +0 -134
- package/src/server/platform/server/ZipKitServer.ts +0 -459
- package/src/server/platform/servercomponents/ZipKitOTS.ts +0 -313
- package/src/server/platform/servercomponents/opentimestamps.d.ts +0 -23
- package/src/shared/ZipKit.ts +0 -899
- package/src/shared/components/CertificateOTS.ts +0 -132
- package/src/shared/components/FileSys.ts +0 -87
- package/src/shared/components/HashAccumulator.ts +0 -113
- package/src/shared/components/ZipCrypto.ts +0 -91
- package/src/shared/components/merkleTree.ts +0 -162
- package/src/shared/types/index.ts +0 -25
- package/src/shared/types/modules.d.ts +0 -22
- package/src/shared/types/opentimestamps.d.ts +0 -23
- package/src/shared/types.d.ts +0 -8
- package/src/shared/types.ts +0 -43
- package/src/shared/version.ts +0 -4
- /package/src/{shared → core}/components/Support.ts +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
608060405234801561000f575f5ffd5b50336040518060400160405280601581526020017f4e656f5a69702046696c65204e46542076322e313000000000000000000000008152506040518060400160405280600481526020017f4e5a495000000000000000000000000000000000000000000000000000000000815250815f908161008b9190610423565b50806001908161009b9190610423565b5050505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361010e575f6040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081526004016101059190610531565b60405180910390fd5b61011d8161012360201b60201c565b5061054a565b5f60075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508160075f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f81519050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f600282049050600182168061026157607f821691505b6020821081036102745761027361021d565b5b50919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f600883026102d67fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8261029b565b6102e0868361029b565b95508019841693508086168417925050509392505050565b5f819050919050565b5f819050919050565b5f61032461031f61031a846102f8565b610301565b6102f8565b9050919050565b5f819050919050565b61033d8361030a565b6103516103498261032b565b8484546102a7565b825550505050565b5f5f905090565b610368610359565b610373818484610334565b505050565b5b818110156103965761038b5f82610360565b600181019050610379565b5050565b601f8211156103db576103ac8161027a565b6103b58461028c565b810160208510156103c4578190505b6103d86103d08561028c565b830182610378565b50505b505050565b5f82821c905092915050565b5f6103fb5f19846008026103e0565b1980831691505092915050565b5f61041383836103ec565b9150826002028217905092915050565b61042c826101e6565b67ffffffffffffffff811115610445576104446101f0565b5b61044f825461024a565b61045a82828561039a565b5f60209050601f83116001811461048b575f8415610479578287015190505b6104838582610408565b8655506104ea565b601f1984166104998661027a565b5f5b828110156104c05784890151825560018201915060208501945060208101905061049b565b868310156104dd57848901516104d9601f8916826103ec565b8355505b6001600288020188555050505b505050505050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61051b826104f2565b9050919050565b61052b81610511565b82525050565b5f6020820190506105445f830184610522565b92915050565b613cee806105575f395ff3fe608060405234801561000f575f5ffd5b50600436106101a6575f3560e01c806370d4d9fd116100f7578063a5e20a9c11610095578063ca3685d91161006f578063ca3685d914610518578063e985e9c51461054d578063f2fde38b1461057d578063fe974bfe14610599576101a6565b8063a5e20a9c1461049c578063b88d4fde146104cc578063c87b56dd146104e8576101a6565b806395d89b41116100d157806395d89b41146104025780639ac6180a146104205780639e8a1e7e14610450578063a22cb46514610480576101a6565b806370d4d9fd146103a9578063715018a6146103da5780638da5cb5b146103e4576101a6565b806318160ddd116101645780635cefc90b1161013e5780635cefc90b146102e85780635dce1ad8146103195780636352211e1461034957806370a0823114610379576101a6565b806318160ddd1461029257806323b872dd146102b057806342842e0e146102cc576101a6565b8062ca4f78146101aa57806301ffc9a7146101da57806306fdde031461020a578063081812fc14610228578063095ea7b3146102585780630d8e6e2c14610274575b5f5ffd5b6101c460048036038101906101bf9190612a6a565b6105c9565b6040516101d19190612ade565b60405180910390f35b6101f460048036038101906101ef9190612b4c565b6106a9565b6040516102019190612ade565b60405180910390f35b6102126106ba565b60405161021f9190612bd7565b60405180910390f35b610242600480360381019061023d9190612bf7565b610749565b60405161024f9190612c61565b60405180910390f35b610272600480360381019061026d9190612ca4565b610764565b005b61027c61077a565b6040516102899190612bd7565b60405180910390f35b61029a6107b7565b6040516102a79190612cf1565b60405180910390f35b6102ca60048036038101906102c59190612d0a565b6107c0565b005b6102e660048036038101906102e19190612d0a565b6108bf565b005b61030260048036038101906102fd9190612bf7565b6108de565b604051610310929190612d5a565b60405180910390f35b610333600480360381019061032e9190612d81565b610b1b565b6040516103409190612df3565b60405180910390f35b610363600480360381019061035e9190612bf7565b610b4d565b6040516103709190612c61565b60405180910390f35b610393600480360381019061038e9190612e0c565b610b5e565b6040516103a09190612cf1565b60405180910390f35b6103c360048036038101906103be9190612d81565b610bdd565b6040516103d1929190612e37565b60405180910390f35b6103e2610c0e565b005b6103ec610c21565b6040516103f99190612c61565b60405180910390f35b61040a610c49565b6040516104179190612bd7565b60405180910390f35b61043a60048036038101906104359190612e5e565b610cd9565b6040516104479190612cf1565b60405180910390f35b61046a60048036038101906104659190612f16565b610f59565b6040516104779190613014565b60405180910390f35b61049a6004803603810190610495919061305e565b61114c565b005b6104b660048036038101906104b191906130c6565b611162565b6040516104c39190612cf1565b60405180910390f35b6104e660048036038101906104e1919061318f565b611177565b005b61050260048036038101906104fd9190612bf7565b61119c565b60405161050f9190612bd7565b60405180910390f35b610532600480360381019061052d9190612bf7565b6111ae565b6040516105449695949392919061320f565b60405180910390f35b6105676004803603810190610562919061327c565b611311565b6040516105749190612ade565b60405180910390f35b61059760048036038101906105929190612e0c565b61139f565b005b6105b360048036038101906105ae9190612bf7565b611423565b6040516105c0919061339e565b60405180910390f35b5f5f73ffffffffffffffffffffffffffffffffffffffff166105ea84611656565b73ffffffffffffffffffffffffffffffffffffffff1603610640576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161063790613408565b60405180910390fd5b816040516020016106519190613460565b6040516020818303038152906040528051906020012060095f8581526020019081526020015f205f0160405160200161068a9190613565565b6040516020818303038152906040528051906020012014905092915050565b5f6106b38261168f565b9050919050565b60605f80546106c8906134a3565b80601f01602080910402602001604051908101604052809291908181526020018280546106f4906134a3565b801561073f5780601f106107165761010080835404028352916020019161073f565b820191905f5260205f20905b81548152906001019060200180831161072257829003601f168201915b5050505050905090565b5f610753826116ef565b5061075d82611775565b9050919050565b61077682826107716117ae565b6117b5565b5050565b60606040518060400160405280600681526020017f322e31302e300000000000000000000000000000000000000000000000000000815250905090565b5f600854905090565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610830575f6040517f64a0ae920000000000000000000000000000000000000000000000000000000081526004016108279190612c61565b60405180910390fd5b5f610843838361083e6117ae565b6117c7565b90508373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146108b9578382826040517f64283d7b0000000000000000000000000000000000000000000000000000000081526004016108b09392919061357b565b60405180910390fd5b50505050565b6108d983838360405180602001604052805f815250611177565b505050565b5f5f5f73ffffffffffffffffffffffffffffffffffffffff1661090084611656565b73ffffffffffffffffffffffffffffffffffffffff1603610956576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161094d90613408565b60405180910390fd5b5f60095f8581526020019081526020015f206040518060c00160405290815f82018054610982906134a3565b80601f01602080910402602001604051908101604052809291908181526020018280546109ae906134a3565b80156109f95780601f106109d0576101008083540402835291602001916109f9565b820191905f5260205f20905b8154815290600101906020018083116109dc57829003601f168201915b50505050508152602001600182018054610a12906134a3565b80601f0160208091040260200160405190810160405280929190818152602001828054610a3e906134a3565b8015610a895780601f10610a6057610100808354040283529160200191610a89565b820191905f5260205f20905b815481529060010190602001808311610a6c57829003601f168201915b50505050508152602001600282015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600382015481526020016004820154815260200160058201548152505090508060a0015181608001519250925050915091565b5f8282604051602001610b2f9291906135d0565b60405160208183030381529060405280519060200120905092915050565b5f610b57826116ef565b9050919050565b5f5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610bcd576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bc490613667565b60405180910390fd5b610bd6826119d2565b9050919050565b5f5f5f610bea8585610b1b565b9050600a5f8281526020019081526020015f205491505f8214159250509250929050565b610c16611a88565b610c1f5f611b0f565b565b5f60075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060018054610c58906134a3565b80601f0160208091040260200160405190810160405280929190818152602001828054610c84906134a3565b8015610ccf5780601f10610ca657610100808354040283529160200191610ccf565b820191905f5260205f20905b815481529060010190602001808311610cb257829003601f168201915b5050505050905090565b5f5f855111610d1d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d14906136cf565b60405180910390fd5b5f8411610d5f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d569061375d565b60405180910390fd5b5f610d6a8686610b1b565b90505f600a5f8381526020019081526020015f205414610dbf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610db6906137eb565b60405180910390fd5b60085f815480929190610dd190613836565b91905055505f6008549050610de63382611bd2565b5f84511115610dfa57610df98185611bef565b5b6040518060c001604052808881526020018681526020013373ffffffffffffffffffffffffffffffffffffffff1681526020018781526020014281526020014381525060095f8381526020019081526020015f205f820151815f019081610e619190613a0b565b506020820151816001019081610e779190613a0b565b506040820151816002015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550606082015181600301556080820151816004015560a0820151816005015590505080600a5f8481526020019081526020015f20819055503373ffffffffffffffffffffffffffffffffffffffff16817f299d1ab49a08efd38afac31be0898899c8f64546df24549df71e23a96843a5f08989894243604051610f44959493929190613ada565b60405180910390a38092505050949350505050565b60605f60085467ffffffffffffffff811115610f7857610f77612946565b5b604051908082528060200260200182016040528015610fa65781602001602082028036833780820191505090505b5090505f5f90505f600190505b600854811161109f575f73ffffffffffffffffffffffffffffffffffffffff16610fdc82611656565b73ffffffffffffffffffffffffffffffffffffffff161461108c57846040516020016110089190613460565b6040516020818303038152906040528051906020012060095f8381526020019081526020015f205f016040516020016110419190613565565b604051602081830303815290604052805190602001200361108b57808383815181106110705761106f613b39565b5b602002602001018181525050818061108790613836565b9250505b5b808061109790613836565b915050610fb3565b505f8167ffffffffffffffff8111156110bb576110ba612946565b5b6040519080825280602002602001820160405280156110e95781602001602082028036833780820191505090505b5090505f5f90505b828110156111405783818151811061110c5761110b613b39565b5b602002602001015182828151811061112757611126613b39565b5b60200260200101818152505080806001019150506110f1565b50809350505050919050565b61115e6111576117ae565b8383611c49565b5050565b600a602052805f5260405f205f915090505481565b6111828484846107c0565b61119661118d6117ae565b85858585611db2565b50505050565b60606111a782611f5e565b9050919050565b6009602052805f5260405f205f91509050805f0180546111cd906134a3565b80601f01602080910402602001604051908101604052809291908181526020018280546111f9906134a3565b80156112445780601f1061121b57610100808354040283529160200191611244565b820191905f5260205f20905b81548152906001019060200180831161122757829003601f168201915b505050505090806001018054611259906134a3565b80601f0160208091040260200160405190810160405280929190818152602001828054611285906134a3565b80156112d05780601f106112a7576101008083540402835291602001916112d0565b820191905f5260205f20905b8154815290600101906020018083116112b357829003601f168201915b505050505090806002015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060030154908060040154908060050154905086565b5f60055f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16905092915050565b6113a7611a88565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611417575f6040517f1e4fbdf700000000000000000000000000000000000000000000000000000000815260040161140e9190612c61565b60405180910390fd5b61142081611b0f565b50565b61142b6128a2565b5f73ffffffffffffffffffffffffffffffffffffffff1661144b83611656565b73ffffffffffffffffffffffffffffffffffffffff16036114a1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161149890613408565b60405180910390fd5b60095f8381526020019081526020015f206040518060c00160405290815f820180546114cc906134a3565b80601f01602080910402602001604051908101604052809291908181526020018280546114f8906134a3565b80156115435780601f1061151a57610100808354040283529160200191611543565b820191905f5260205f20905b81548152906001019060200180831161152657829003601f168201915b5050505050815260200160018201805461155c906134a3565b80601f0160208091040260200160405190810160405280929190818152602001828054611588906134a3565b80156115d35780601f106115aa576101008083540402835291602001916115d3565b820191905f5260205f20905b8154815290600101906020018083116115b657829003601f168201915b50505050508152602001600282015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160038201548152602001600482015481526020016005820154815250509050919050565b5f60025f8381526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b5f634906490660e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806116e857506116e782612069565b5b9050919050565b5f5f6116fa83611656565b90505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361176c57826040517f7e2732890000000000000000000000000000000000000000000000000000000081526004016117639190612cf1565b60405180910390fd5b80915050919050565b5f60045f8381526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b5f33905090565b6117c2838383600161214a565b505050565b5f5f6117d284611656565b90505f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161461181357611812818486612309565b5b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461189e576118525f855f5f61214a565b600160035f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825403925050819055505b5f73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161461191d57600160035f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055505b8460025f8681526020019081526020015f205f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550838573ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4809150509392505050565b5f5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611a43575f6040517f89c62b64000000000000000000000000000000000000000000000000000000008152600401611a3a9190612c61565b60405180910390fd5b60035f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050919050565b611a906117ae565b73ffffffffffffffffffffffffffffffffffffffff16611aae610c21565b73ffffffffffffffffffffffffffffffffffffffff1614611b0d57611ad16117ae565b6040517f118cdaa7000000000000000000000000000000000000000000000000000000008152600401611b049190612c61565b60405180910390fd5b565b5f60075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508160075f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b611beb828260405180602001604052805f8152506123cc565b5050565b8060065f8481526020019081526020015f209081611c0d9190613a0b565b507ff8e1a15aba9398e019f0b49df1a4fde98ee17ae345cb5f6b5e2c27f5033e8ce782604051611c3d9190612cf1565b60405180910390a15050565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611cb957816040517f5b08ba18000000000000000000000000000000000000000000000000000000008152600401611cb09190612c61565b60405180910390fd5b8060055f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051611da59190612ade565b60405180910390a3505050565b5f8373ffffffffffffffffffffffffffffffffffffffff163b1115611f57578273ffffffffffffffffffffffffffffffffffffffff1663150b7a02868685856040518563ffffffff1660e01b8152600401611e109493929190613bb8565b6020604051808303815f875af1925050508015611e4b57506040513d601f19601f82011682018060405250810190611e489190613c16565b60015b611ecc573d805f8114611e79576040519150601f19603f3d011682016040523d82523d5f602084013e611e7e565b606091505b505f815103611ec457836040517f64a0ae92000000000000000000000000000000000000000000000000000000008152600401611ebb9190612c61565b60405180910390fd5b805160208201fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614611f5557836040517f64a0ae92000000000000000000000000000000000000000000000000000000008152600401611f4c9190612c61565b60405180910390fd5b505b5050505050565b6060611f69826116ef565b505f60065f8481526020019081526020015f208054611f87906134a3565b80601f0160208091040260200160405190810160405280929190818152602001828054611fb3906134a3565b8015611ffe5780601f10611fd557610100808354040283529160200191611ffe565b820191905f5260205f20905b815481529060010190602001808311611fe157829003601f168201915b505050505090505f61200e6123ef565b90505f815103612022578192505050612064565b5f8251111561205657808260405160200161203e929190613c41565b60405160208183030381529060405292505050612064565b61205f84612405565b925050505b919050565b5f7f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061213357507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b8061214357506121428261246b565b5b9050919050565b808061218257505f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b156122b4575f612191846116ef565b90505f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156121fb57508273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614155b801561220e575061220c8184611311565b155b1561225057826040517fa9fbf51f0000000000000000000000000000000000000000000000000000000081526004016122479190612c61565b60405180910390fd5b81156122b257838573ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45b505b8360045f8581526020019081526020015f205f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505050565b6123148383836124d4565b6123c7575f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361238857806040517f7e27328900000000000000000000000000000000000000000000000000000000815260040161237f9190612cf1565b60405180910390fd5b81816040517f177e802f0000000000000000000000000000000000000000000000000000000081526004016123be929190613c64565b60405180910390fd5b505050565b6123d68383612594565b6123ea6123e16117ae565b5f858585611db2565b505050565b606060405180602001604052805f815250905090565b6060612410826116ef565b505f61241a6123ef565b90505f8151116124385760405180602001604052805f815250612463565b8061244284612687565b604051602001612453929190613c41565b6040516020818303038152906040525b915050919050565b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b5f5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561258b57508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16148061254c575061254b8484611311565b5b8061258a57508273ffffffffffffffffffffffffffffffffffffffff1661257283611775565b73ffffffffffffffffffffffffffffffffffffffff16145b5b90509392505050565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603612604575f6040517f64a0ae920000000000000000000000000000000000000000000000000000000081526004016125fb9190612c61565b60405180910390fd5b5f61261083835f6117c7565b90505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614612682575f6040517f73c6ac6e0000000000000000000000000000000000000000000000000000000081526004016126799190612c61565b60405180910390fd5b505050565b60605f600161269584612751565b0190505f8167ffffffffffffffff8111156126b3576126b2612946565b5b6040519080825280601f01601f1916602001820160405280156126e55781602001600182028036833780820191505090505b5090505f82602083010190505b600115612746578080600190039150507f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a858161273b5761273a613c8b565b5b0494505f85036126f2575b819350505050919050565b5f5f5f90507a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083106127ad577a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083816127a3576127a2613c8b565b5b0492506040810190505b6d04ee2d6d415b85acef810000000083106127ea576d04ee2d6d415b85acef810000000083816127e0576127df613c8b565b5b0492506020810190505b662386f26fc10000831061281957662386f26fc10000838161280f5761280e613c8b565b5b0492506010810190505b6305f5e1008310612842576305f5e100838161283857612837613c8b565b5b0492506008810190505b612710831061286757612710838161285d5761285c613c8b565b5b0492506004810190505b6064831061288a57606483816128805761287f613c8b565b5b0492506002810190505b600a8310612899576001810190505b80915050919050565b6040518060c0016040528060608152602001606081526020015f73ffffffffffffffffffffffffffffffffffffffff1681526020015f81526020015f81526020015f81525090565b5f604051905090565b5f5ffd5b5f5ffd5b5f819050919050565b61290d816128fb565b8114612917575f5ffd5b50565b5f8135905061292881612904565b92915050565b5f5ffd5b5f5ffd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b61297c82612936565b810181811067ffffffffffffffff8211171561299b5761299a612946565b5b80604052505050565b5f6129ad6128ea565b90506129b98282612973565b919050565b5f67ffffffffffffffff8211156129d8576129d7612946565b5b6129e182612936565b9050602081019050919050565b828183375f83830152505050565b5f612a0e612a09846129be565b6129a4565b905082815260208101848484011115612a2a57612a29612932565b5b612a358482856129ee565b509392505050565b5f82601f830112612a5157612a5061292e565b5b8135612a618482602086016129fc565b91505092915050565b5f5f60408385031215612a8057612a7f6128f3565b5b5f612a8d8582860161291a565b925050602083013567ffffffffffffffff811115612aae57612aad6128f7565b5b612aba85828601612a3d565b9150509250929050565b5f8115159050919050565b612ad881612ac4565b82525050565b5f602082019050612af15f830184612acf565b92915050565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b612b2b81612af7565b8114612b35575f5ffd5b50565b5f81359050612b4681612b22565b92915050565b5f60208284031215612b6157612b606128f3565b5b5f612b6e84828501612b38565b91505092915050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f612ba982612b77565b612bb38185612b81565b9350612bc3818560208601612b91565b612bcc81612936565b840191505092915050565b5f6020820190508181035f830152612bef8184612b9f565b905092915050565b5f60208284031215612c0c57612c0b6128f3565b5b5f612c198482850161291a565b91505092915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f612c4b82612c22565b9050919050565b612c5b81612c41565b82525050565b5f602082019050612c745f830184612c52565b92915050565b612c8381612c41565b8114612c8d575f5ffd5b50565b5f81359050612c9e81612c7a565b92915050565b5f5f60408385031215612cba57612cb96128f3565b5b5f612cc785828601612c90565b9250506020612cd88582860161291a565b9150509250929050565b612ceb816128fb565b82525050565b5f602082019050612d045f830184612ce2565b92915050565b5f5f5f60608486031215612d2157612d206128f3565b5b5f612d2e86828701612c90565b9350506020612d3f86828701612c90565b9250506040612d508682870161291a565b9150509250925092565b5f604082019050612d6d5f830185612ce2565b612d7a6020830184612ce2565b9392505050565b5f5f60408385031215612d9757612d966128f3565b5b5f83013567ffffffffffffffff811115612db457612db36128f7565b5b612dc085828601612a3d565b9250506020612dd18582860161291a565b9150509250929050565b5f819050919050565b612ded81612ddb565b82525050565b5f602082019050612e065f830184612de4565b92915050565b5f60208284031215612e2157612e206128f3565b5b5f612e2e84828501612c90565b91505092915050565b5f604082019050612e4a5f830185612acf565b612e576020830184612ce2565b9392505050565b5f5f5f5f60808587031215612e7657612e756128f3565b5b5f85013567ffffffffffffffff811115612e9357612e926128f7565b5b612e9f87828801612a3d565b9450506020612eb08782880161291a565b935050604085013567ffffffffffffffff811115612ed157612ed06128f7565b5b612edd87828801612a3d565b925050606085013567ffffffffffffffff811115612efe57612efd6128f7565b5b612f0a87828801612a3d565b91505092959194509250565b5f60208284031215612f2b57612f2a6128f3565b5b5f82013567ffffffffffffffff811115612f4857612f476128f7565b5b612f5484828501612a3d565b91505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b612f8f816128fb565b82525050565b5f612fa08383612f86565b60208301905092915050565b5f602082019050919050565b5f612fc282612f5d565b612fcc8185612f67565b9350612fd783612f77565b805f5b83811015613007578151612fee8882612f95565b9750612ff983612fac565b925050600181019050612fda565b5085935050505092915050565b5f6020820190508181035f83015261302c8184612fb8565b905092915050565b61303d81612ac4565b8114613047575f5ffd5b50565b5f8135905061305881613034565b92915050565b5f5f60408385031215613074576130736128f3565b5b5f61308185828601612c90565b92505060206130928582860161304a565b9150509250929050565b6130a581612ddb565b81146130af575f5ffd5b50565b5f813590506130c08161309c565b92915050565b5f602082840312156130db576130da6128f3565b5b5f6130e8848285016130b2565b91505092915050565b5f67ffffffffffffffff82111561310b5761310a612946565b5b61311482612936565b9050602081019050919050565b5f61313361312e846130f1565b6129a4565b90508281526020810184848401111561314f5761314e612932565b5b61315a8482856129ee565b509392505050565b5f82601f8301126131765761317561292e565b5b8135613186848260208601613121565b91505092915050565b5f5f5f5f608085870312156131a7576131a66128f3565b5b5f6131b487828801612c90565b94505060206131c587828801612c90565b93505060406131d68782880161291a565b925050606085013567ffffffffffffffff8111156131f7576131f66128f7565b5b61320387828801613162565b91505092959194509250565b5f60c0820190508181035f8301526132278189612b9f565b9050818103602083015261323b8188612b9f565b905061324a6040830187612c52565b6132576060830186612ce2565b6132646080830185612ce2565b61327160a0830184612ce2565b979650505050505050565b5f5f60408385031215613292576132916128f3565b5b5f61329f85828601612c90565b92505060206132b085828601612c90565b9150509250929050565b5f82825260208201905092915050565b5f6132d482612b77565b6132de81856132ba565b93506132ee818560208601612b91565b6132f781612936565b840191505092915050565b61330b81612c41565b82525050565b5f60c083015f8301518482035f86015261332b82826132ca565b9150506020830151848203602086015261334582826132ca565b915050604083015161335a6040860182613302565b50606083015161336d6060860182612f86565b5060808301516133806080860182612f86565b5060a083015161339360a0860182612f86565b508091505092915050565b5f6020820190508181035f8301526133b68184613311565b905092915050565b7f546f6b656e20646f6573206e6f742065786973740000000000000000000000005f82015250565b5f6133f2601483612b81565b91506133fd826133be565b602082019050919050565b5f6020820190508181035f83015261341f816133e6565b9050919050565b5f81905092915050565b5f61343a82612b77565b6134448185613426565b9350613454818560208601612b91565b80840191505092915050565b5f61346b8284613430565b915081905092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f60028204905060018216806134ba57607f821691505b6020821081036134cd576134cc613476565b5b50919050565b5f819050815f5260205f209050919050565b5f81546134f1816134a3565b6134fb8186613426565b9450600182165f8114613515576001811461352a5761355c565b60ff198316865281151582028601935061355c565b613533856134d3565b5f5b8381101561355457815481890152600182019150602081019050613535565b838801955050505b50505092915050565b5f61357082846134e5565b915081905092915050565b5f60608201905061358e5f830186612c52565b61359b6020830185612ce2565b6135a86040830184612c52565b949350505050565b5f819050919050565b6135ca6135c5826128fb565b6135b0565b82525050565b5f6135db8285613430565b91506135e782846135b9565b6020820191508190509392505050565b7f4552433732313a2061646472657373207a65726f206973206e6f7420612076615f8201527f6c6964206f776e65720000000000000000000000000000000000000000000000602082015250565b5f613651602983612b81565b915061365c826135f7565b604082019050919050565b5f6020820190508181035f83015261367e81613645565b9050919050565b7f4d65726b6c6520726f6f7420686173682063616e6e6f7420626520656d7074795f82015250565b5f6136b9602083612b81565b91506136c482613685565b602082019050919050565b5f6020820190508181035f8301526136e6816136ad565b9050919050565b7f4372656174696f6e2074696d657374616d70206d7573742062652067726561745f8201527f6572207468616e20300000000000000000000000000000000000000000000000602082015250565b5f613747602983612b81565b9150613752826136ed565b604082019050919050565b5f6020820190508181035f8301526137748161373b565b9050919050565b7f5a49502066696c652077697468207468697320636f6e74656e7420616e6420745f8201527f696d657374616d7020616c726561647920746f6b656e697a6564000000000000602082015250565b5f6137d5603a83612b81565b91506137e08261377b565b604082019050919050565b5f6020820190508181035f830152613802816137c9565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f613840826128fb565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361387257613871613809565b5b600182019050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f600883026138c77fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8261388c565b6138d1868361388c565b95508019841693508086168417925050509392505050565b5f819050919050565b5f61390c613907613902846128fb565b6138e9565b6128fb565b9050919050565b5f819050919050565b613925836138f2565b61393961393182613913565b848454613898565b825550505050565b5f5f905090565b613950613941565b61395b81848461391c565b505050565b5b8181101561397e576139735f82613948565b600181019050613961565b5050565b601f8211156139c357613994816134d3565b61399d8461387d565b810160208510156139ac578190505b6139c06139b88561387d565b830182613960565b50505b505050565b5f82821c905092915050565b5f6139e35f19846008026139c8565b1980831691505092915050565b5f6139fb83836139d4565b9150826002028217905092915050565b613a1482612b77565b67ffffffffffffffff811115613a2d57613a2c612946565b5b613a3782546134a3565b613a42828285613982565b5f60209050601f831160018114613a73575f8415613a61578287015190505b613a6b85826139f0565b865550613ad2565b601f198416613a81866134d3565b5f5b82811015613aa857848901518255600182019150602085019450602081019050613a83565b86831015613ac55784890151613ac1601f8916826139d4565b8355505b6001600288020188555050505b505050505050565b5f60a0820190508181035f830152613af28188612b9f565b9050613b016020830187612ce2565b8181036040830152613b138186612b9f565b9050613b226060830185612ce2565b613b2f6080830184612ce2565b9695505050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f81519050919050565b5f82825260208201905092915050565b5f613b8a82613b66565b613b948185613b70565b9350613ba4818560208601612b91565b613bad81612936565b840191505092915050565b5f608082019050613bcb5f830187612c52565b613bd86020830186612c52565b613be56040830185612ce2565b8181036060830152613bf78184613b80565b905095945050505050565b5f81519050613c1081612b22565b92915050565b5f60208284031215613c2b57613c2a6128f3565b5b5f613c3884828501613c02565b91505092915050565b5f613c4c8285613430565b9150613c588284613430565b91508190509392505050565b5f604082019050613c775f830185612c52565b613c846020830184612ce2565b9392505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffdfea26469706673582212206ec371535a7cf5b66a9f8c0399b7c2ba1e01fae0666a5f18730d64412486360264736f6c634300081e0033
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Compilation Notes
|
|
2
|
+
|
|
3
|
+
## Original Deployment Bytecode
|
|
4
|
+
|
|
5
|
+
The files `ABI.txt` and `Bytecode.txt` contain the **deployed** contract ABI and bytecode that match contracts already deployed on-chain. These files should **NEVER** be overwritten by the compilation script.
|
|
6
|
+
|
|
7
|
+
## Current Compilation Settings
|
|
8
|
+
|
|
9
|
+
The contract is currently compiled with:
|
|
10
|
+
- **Solidity Version**: 0.8.20
|
|
11
|
+
- **Optimizer**: Enabled (200 runs)
|
|
12
|
+
- **EVM Version**: Paris
|
|
13
|
+
|
|
14
|
+
## Matching Original Bytecode
|
|
15
|
+
|
|
16
|
+
**It is NOT possible to exactly match the original `Bytecode.txt`** because:
|
|
17
|
+
|
|
18
|
+
1. **Different Solidity Version**: The original bytecode was likely compiled with Solidity 0.8.19 (the contract pragma is `^0.8.19`), while current compilation uses 0.8.20 to match OpenZeppelin requirements.
|
|
19
|
+
|
|
20
|
+
2. **Different Compiler Settings**: The original deployment may have used different optimizer settings (runs, enabled/disabled) or EVM version.
|
|
21
|
+
|
|
22
|
+
3. **Different OpenZeppelin Versions**: The original deployment may have used a different version of OpenZeppelin contracts, which would affect the bytecode.
|
|
23
|
+
|
|
24
|
+
4. **Bytecode Size Difference**: The original `Bytecode.txt` is significantly larger (~48KB) than the newly compiled bytecode (~19KB), indicating different compilation settings or dependencies.
|
|
25
|
+
|
|
26
|
+
## For Future Deployments
|
|
27
|
+
|
|
28
|
+
When deploying new contracts or upgrading:
|
|
29
|
+
|
|
30
|
+
1. **Document Compiler Settings**: Always record the exact compiler settings used for each deployment:
|
|
31
|
+
- Solidity version
|
|
32
|
+
- Optimizer settings (enabled/disabled, runs)
|
|
33
|
+
- EVM version
|
|
34
|
+
- OpenZeppelin version
|
|
35
|
+
|
|
36
|
+
2. **Use Consistent Settings**: Use the same compiler settings for:
|
|
37
|
+
- Compilation
|
|
38
|
+
- Deployment
|
|
39
|
+
- Verification
|
|
40
|
+
|
|
41
|
+
3. **Version Control**: Keep deployment records in `deployment-*.json` files with:
|
|
42
|
+
- Contract address
|
|
43
|
+
- Network
|
|
44
|
+
- Compiler settings used
|
|
45
|
+
- Deployment timestamp
|
|
46
|
+
|
|
47
|
+
4. **Preserve Original Files**: Never overwrite `ABI.txt` and `Bytecode.txt` - they represent the deployed contract. Use `ABI-compiled.txt` and `Bytecode-compiled.txt` for new compilations.
|
|
48
|
+
|
|
49
|
+
## Current Deployment Information
|
|
50
|
+
|
|
51
|
+
### Arbitrum One (Chain ID: 42161)
|
|
52
|
+
- **Address**: `0x2716c4609fD97DaEdF429BC4B4Ec2faa81e2cC60`
|
|
53
|
+
- **Version**: 2.10.0
|
|
54
|
+
- **Deployed**: 2025-11-18
|
|
55
|
+
- **Explorer**: https://arbiscan.io/address/0x2716c4609fD97DaEdF429BC4B4Ec2faa81e2cC60
|
|
56
|
+
|
|
57
|
+
### Other Deployments
|
|
58
|
+
See individual `deployment-*.json` files in the contracts directory for complete deployment information.
|
|
59
|
+
|
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
# 🚀 Quick Deployment Guide - Best Methods
|
|
2
|
+
|
|
3
|
+
**Skip Remix!** Here are the **BEST** ways to deploy your bytecode:
|
|
4
|
+
|
|
5
|
+
## 🔐 Security Warning
|
|
6
|
+
|
|
7
|
+
**CRITICAL**: Contract deployment requires a private key with sufficient funds for gas fees.
|
|
8
|
+
|
|
9
|
+
- ⚠️ **NEVER** hardcode private keys in deployment scripts or command lines
|
|
10
|
+
- ⚠️ **NEVER** commit private keys to version control
|
|
11
|
+
- ✅ Use interactive prompts (recommended) or environment variables for private keys
|
|
12
|
+
- ✅ Use testnet keys for development/testing
|
|
13
|
+
- ✅ Use secure key management (HSMs, KMS) for production deployments
|
|
14
|
+
- ✅ Double-check network selection before deployment (especially for mainnet)
|
|
15
|
+
|
|
16
|
+
For complete security guidelines, see [../SECURITY.md](../SECURITY.md).
|
|
17
|
+
|
|
18
|
+
## 🎯 NEW: Interactive Deployment (EASIEST!)
|
|
19
|
+
|
|
20
|
+
**Just run and follow the prompts!**
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
cd contracts
|
|
24
|
+
node deploy-interactive.js
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
This will:
|
|
28
|
+
- ✅ Prompt for your private key (securely)
|
|
29
|
+
- ✅ Let you choose from 8 networks (ETH, ETH Sepolia, Base, Base Sepolia, Arbitrum, Arbitrum Sepolia, Polygon, Polygon Sepolia)
|
|
30
|
+
- ✅ Show a summary with all details
|
|
31
|
+
- ✅ Ask for confirmation before deploying
|
|
32
|
+
- ✅ Deploy and save deployment info
|
|
33
|
+
|
|
34
|
+
**Perfect for quick deployments!**
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## ⚡ Method 1: Ethers.js Script (Command Line - Non-Interactive)
|
|
39
|
+
|
|
40
|
+
**Already set up and ready to use!**
|
|
41
|
+
|
|
42
|
+
**SECURITY NOTE**: Using environment variables in command line can expose keys in shell history. Prefer interactive deployment for better security.
|
|
43
|
+
|
|
44
|
+
### One Command:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
cd contracts
|
|
48
|
+
PRIVATE_KEY=your_private_key_here node deploy-sepolia.js
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
**⚠️ WARNING**: Command line environment variables may be visible in:
|
|
52
|
+
- Shell history files (`.bash_history`, `.zsh_history`)
|
|
53
|
+
- Process lists (`ps` command)
|
|
54
|
+
- System logs
|
|
55
|
+
|
|
56
|
+
For better security, use the interactive deployment script instead.
|
|
57
|
+
|
|
58
|
+
That's it! The script:
|
|
59
|
+
- ✅ Automatically adds `0x` prefix to bytecode
|
|
60
|
+
- ✅ Checks your balance
|
|
61
|
+
- ✅ Estimates gas
|
|
62
|
+
- ✅ Deploys the contract
|
|
63
|
+
- ✅ Saves deployment info to JSON
|
|
64
|
+
- ✅ Shows contract address and Etherscan link
|
|
65
|
+
|
|
66
|
+
### Example:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
cd contracts
|
|
70
|
+
PRIVATE_KEY=0x1234567890abcdef... node deploy-sepolia.js
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
**Output:**
|
|
74
|
+
```
|
|
75
|
+
============================================================
|
|
76
|
+
NeoZip NFT Contract Deployment - Ethereum Sepolia
|
|
77
|
+
============================================================
|
|
78
|
+
|
|
79
|
+
📖 Reading contract files...
|
|
80
|
+
✅ Contract files loaded
|
|
81
|
+
Bytecode length: 13123 characters
|
|
82
|
+
|
|
83
|
+
🔗 Connecting to Ethereum Sepolia...
|
|
84
|
+
Deployer address: 0xYourAddress...
|
|
85
|
+
Balance: 0.5 ETH
|
|
86
|
+
|
|
87
|
+
⛽ Estimating gas...
|
|
88
|
+
Estimated gas: 2500000
|
|
89
|
+
Estimated cost: 0.001 ETH
|
|
90
|
+
|
|
91
|
+
🏗️ Creating contract factory...
|
|
92
|
+
📤 Deploying contract...
|
|
93
|
+
✅ Deployment transaction sent!
|
|
94
|
+
Transaction hash: 0x...
|
|
95
|
+
View on Etherscan: https://sepolia.etherscan.io/tx/0x...
|
|
96
|
+
|
|
97
|
+
⏳ Waiting for deployment confirmation...
|
|
98
|
+
|
|
99
|
+
============================================================
|
|
100
|
+
✅ DEPLOYMENT SUCCESSFUL!
|
|
101
|
+
============================================================
|
|
102
|
+
|
|
103
|
+
Contract Address: 0xYourContractAddress...
|
|
104
|
+
Transaction Hash: 0x...
|
|
105
|
+
Contract Version: 2.10.0
|
|
106
|
+
Deployed at Block: 12345678
|
|
107
|
+
|
|
108
|
+
📝 Deployment info saved to: contracts/deployment-sepolia.json
|
|
109
|
+
|
|
110
|
+
🔍 View contract on Etherscan:
|
|
111
|
+
https://sepolia.etherscan.io/address/0xYourContractAddress...
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
## 🔥 Method 2: Foundry Cast (ONE LINER - Super Fast!)
|
|
117
|
+
|
|
118
|
+
If you have Foundry installed:
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
cast send --rpc-url https://rpc.sepolia.org \
|
|
122
|
+
--private-key $PRIVATE_KEY \
|
|
123
|
+
--create $(cat contracts/Bytecode.txt | sed 's/^/0x/') \
|
|
124
|
+
--value 0
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
Or with explicit bytecode:
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
cast send --rpc-url https://rpc.sepolia.org \
|
|
131
|
+
--private-key $PRIVATE_KEY \
|
|
132
|
+
--create 0x$(cat contracts/Bytecode.txt) \
|
|
133
|
+
--value 0
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
**Install Foundry:**
|
|
137
|
+
```bash
|
|
138
|
+
curl -L https://foundry.paradigm.xyz | bash
|
|
139
|
+
foundryup
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
---
|
|
143
|
+
|
|
144
|
+
## 🛠️ Method 3: Hardhat (Most Professional)
|
|
145
|
+
|
|
146
|
+
### Setup (one time):
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
yarn add --dev hardhat @nomicfoundation/hardhat-toolbox
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
### Create `hardhat.config.js`:
|
|
153
|
+
|
|
154
|
+
```javascript
|
|
155
|
+
require("@nomicfoundation/hardhat-toolbox");
|
|
156
|
+
|
|
157
|
+
module.exports = {
|
|
158
|
+
solidity: "0.8.19",
|
|
159
|
+
networks: {
|
|
160
|
+
sepolia: {
|
|
161
|
+
url: process.env.SEPOLIA_RPC_URL || "https://rpc.sepolia.org",
|
|
162
|
+
accounts: process.env.PRIVATE_KEY ? [process.env.PRIVATE_KEY] : [],
|
|
163
|
+
chainId: 11155111
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
};
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
### Create `scripts/deploy-bytecode.js`:
|
|
170
|
+
|
|
171
|
+
```javascript
|
|
172
|
+
const { ethers } = require("hardhat");
|
|
173
|
+
const fs = require("fs");
|
|
174
|
+
|
|
175
|
+
async function main() {
|
|
176
|
+
let bytecode = fs.readFileSync("contracts/Bytecode.txt", "utf8").trim();
|
|
177
|
+
if (!bytecode.startsWith("0x")) bytecode = "0x" + bytecode;
|
|
178
|
+
const abi = JSON.parse(fs.readFileSync("contracts/ABI.txt", "utf8"));
|
|
179
|
+
|
|
180
|
+
const ContractFactory = await ethers.getContractFactory(abi, bytecode);
|
|
181
|
+
const contract = await ContractFactory.deploy();
|
|
182
|
+
await contract.waitForDeployment();
|
|
183
|
+
|
|
184
|
+
console.log("Deployed to:", await contract.getAddress());
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
main().catch(console.error);
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
### Deploy:
|
|
191
|
+
|
|
192
|
+
```bash
|
|
193
|
+
PRIVATE_KEY=your_key npx hardhat run scripts/deploy-bytecode.js --network sepolia
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
---
|
|
197
|
+
|
|
198
|
+
## 📋 Method 4: Direct Web3/Ethers.js (Programmatic)
|
|
199
|
+
|
|
200
|
+
If you want to integrate into your own code:
|
|
201
|
+
|
|
202
|
+
```javascript
|
|
203
|
+
const { ethers } = require("ethers");
|
|
204
|
+
const fs = require("fs");
|
|
205
|
+
|
|
206
|
+
async function deploy() {
|
|
207
|
+
const provider = new ethers.JsonRpcProvider("https://rpc.sepolia.org");
|
|
208
|
+
const wallet = new ethers.Wallet(process.env.PRIVATE_KEY, provider);
|
|
209
|
+
|
|
210
|
+
let bytecode = fs.readFileSync("contracts/Bytecode.txt", "utf8").trim();
|
|
211
|
+
if (!bytecode.startsWith("0x")) bytecode = "0x" + bytecode;
|
|
212
|
+
const abi = JSON.parse(fs.readFileSync("contracts/ABI.txt", "utf8"));
|
|
213
|
+
|
|
214
|
+
const factory = new ethers.ContractFactory(abi, bytecode, wallet);
|
|
215
|
+
const contract = await factory.deploy();
|
|
216
|
+
await contract.waitForDeployment();
|
|
217
|
+
|
|
218
|
+
console.log("Address:", await contract.getAddress());
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
deploy();
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
---
|
|
225
|
+
|
|
226
|
+
## 🎯 Which Method Should You Use?
|
|
227
|
+
|
|
228
|
+
| Method | Speed | Setup | Reliability | Best For |
|
|
229
|
+
|--------|-------|-------|-------------|----------|
|
|
230
|
+
| **Ethers.js Script** | ⚡⚡⚡ | ✅ Ready | ⭐⭐⭐⭐⭐ | **Quick deployment** |
|
|
231
|
+
| **Foundry Cast** | ⚡⚡⚡⚡ | Install Foundry | ⭐⭐⭐⭐⭐ | One-liner fans |
|
|
232
|
+
| **Hardhat** | ⚡⚡ | Some setup | ⭐⭐⭐⭐⭐ | Professional projects |
|
|
233
|
+
| **Direct Code** | ⚡⚡ | Custom code | ⭐⭐⭐⭐ | Integration |
|
|
234
|
+
|
|
235
|
+
## 🏆 RECOMMENDATION: Use Method 1 (Ethers.js Script)
|
|
236
|
+
|
|
237
|
+
**Why?**
|
|
238
|
+
- ✅ Already created and tested
|
|
239
|
+
- ✅ Zero setup required
|
|
240
|
+
- ✅ Handles all edge cases (0x prefix, gas estimation, etc.)
|
|
241
|
+
- ✅ Saves deployment info automatically
|
|
242
|
+
- ✅ Clear, helpful output
|
|
243
|
+
|
|
244
|
+
**Just run:**
|
|
245
|
+
```bash
|
|
246
|
+
cd contracts
|
|
247
|
+
PRIVATE_KEY=your_key node deploy-sepolia.js
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
---
|
|
251
|
+
|
|
252
|
+
## 🔐 Security Notes
|
|
253
|
+
|
|
254
|
+
1. **Never commit your private key** to git
|
|
255
|
+
2. **Use environment variables** or pass directly (not saved in history)
|
|
256
|
+
3. **Double-check the network** - make sure you're on Sepolia, not mainnet!
|
|
257
|
+
4. **Verify gas costs** before confirming
|
|
258
|
+
|
|
259
|
+
## 📝 After Deployment
|
|
260
|
+
|
|
261
|
+
1. **Save the contract address** from the output
|
|
262
|
+
2. **Verify on Etherscan** (optional but recommended)
|
|
263
|
+
3. **Update** `src/blockchain/core/contracts.ts` with the new address
|
|
264
|
+
4. **Test** the deployed contract
|
|
265
|
+
|
|
266
|
+
---
|
|
267
|
+
|
|
268
|
+
## 🆘 Troubleshooting
|
|
269
|
+
|
|
270
|
+
### "Insufficient funds"
|
|
271
|
+
- Get Sepolia ETH from: https://sepoliafaucet.com/
|
|
272
|
+
|
|
273
|
+
### "Invalid bytecode"
|
|
274
|
+
- The script automatically adds `0x` prefix - you shouldn't see this
|
|
275
|
+
|
|
276
|
+
### "Network error"
|
|
277
|
+
- Try a different RPC: `https://ethereum-sepolia-rpc.publicnode.com`
|
|
278
|
+
|
|
279
|
+
### "Transaction failed"
|
|
280
|
+
- Check you're on Sepolia network (Chain ID: 11155111)
|
|
281
|
+
- Verify you have enough ETH for gas
|
|
282
|
+
|
|
283
|
+
---
|
|
284
|
+
|
|
285
|
+
**That's it! The ethers.js script is the simplest and most reliable method. Just run it and you're done!** 🎉
|
|
286
|
+
|
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
# Smart Contracts
|
|
2
|
+
|
|
3
|
+
This directory contains the smart contracts and related data for the NeoZipKit library.
|
|
4
|
+
|
|
5
|
+
## Contract Files
|
|
6
|
+
|
|
7
|
+
- **`src/NZIP-NFT.sol`** - Main production contract for ZIP file tokenization
|
|
8
|
+
- **`src/NZIP-NFT-v2.0.sol`** - Version 2.0 contract implementation
|
|
9
|
+
- **`ABI.txt`** - Contract ABI (Application Binary Interface)
|
|
10
|
+
- **`Bytecode.txt`** - Contract bytecode for deployment
|
|
11
|
+
|
|
12
|
+
## Contract Information
|
|
13
|
+
|
|
14
|
+
### Current Production Contract
|
|
15
|
+
- **Address**: `0x6313074922717351986929879903441992482216`
|
|
16
|
+
- **Network**: Base Sepolia (Chain ID: 84532)
|
|
17
|
+
- **Version**: 2.10.0
|
|
18
|
+
- **Status**: ✅ Active
|
|
19
|
+
|
|
20
|
+
### Contract Features
|
|
21
|
+
- ZIP file tokenization as ERC-721 NFTs
|
|
22
|
+
- Merkle root verification for file integrity
|
|
23
|
+
- Duplicate prevention via composite key system
|
|
24
|
+
- Blockchain metadata storage
|
|
25
|
+
- Universal verification (anyone can verify tokens)
|
|
26
|
+
|
|
27
|
+
## Compilation and Deployment
|
|
28
|
+
|
|
29
|
+
### Compiling the Contract
|
|
30
|
+
|
|
31
|
+
To compile the contract and generate compiled ABI and bytecode:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
cd contracts
|
|
35
|
+
yarn install # First time only
|
|
36
|
+
yarn compile:extract # Compile and extract ABI/bytecode
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
This will:
|
|
40
|
+
- Compile `src/NZIP-NFT.sol` using Hardhat
|
|
41
|
+
- Extract the ABI and write it to `ABI-compiled.txt`
|
|
42
|
+
- Extract the bytecode and write it to `Bytecode-compiled.txt`
|
|
43
|
+
|
|
44
|
+
**⚠️ IMPORTANT:** The compilation script does NOT overwrite `ABI.txt` and `Bytecode.txt` (these are the deployed versions). The compiled files are written to `ABI-compiled.txt` and `Bytecode-compiled.txt` for review. Only manually copy them to `ABI.txt` and `Bytecode.txt` if you want to use the new compilation for deployment.
|
|
45
|
+
|
|
46
|
+
### Deploying the Contract
|
|
47
|
+
|
|
48
|
+
**SECURITY WARNING**: Contract deployment requires a private key with sufficient funds for gas fees.
|
|
49
|
+
|
|
50
|
+
- ⚠️ **NEVER** hardcode private keys in deployment scripts
|
|
51
|
+
- ⚠️ **NEVER** commit private keys to version control
|
|
52
|
+
- ✅ Use environment variables or interactive prompts for private keys
|
|
53
|
+
- ✅ Use testnet keys for development/testing
|
|
54
|
+
- ✅ Use secure key management (HSMs, KMS) for production deployments
|
|
55
|
+
- ✅ Verify network selection before deployment (especially for mainnet)
|
|
56
|
+
|
|
57
|
+
For complete security guidelines, see [../SECURITY.md](../SECURITY.md).
|
|
58
|
+
|
|
59
|
+
Deploy to any supported network using the interactive deployment script:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
cd contracts
|
|
63
|
+
node deploy-interactive.js
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
The script will prompt you for:
|
|
67
|
+
- Private key (not saved, entered securely)
|
|
68
|
+
- Network selection (ETH, ETH Sepolia, Base, Base Sepolia, Arbitrum, Arbitrum Sepolia, Polygon, Polygon Sepolia)
|
|
69
|
+
- Confirmation before deployment
|
|
70
|
+
|
|
71
|
+
**Note**: The interactive deployment script does not save your private key. It is only used during the deployment process and never stored.
|
|
72
|
+
|
|
73
|
+
### Verifying the Contract
|
|
74
|
+
|
|
75
|
+
After deployment, verify the contract on the blockchain scanner:
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
cd contracts
|
|
79
|
+
yarn verify <contractAddress> <network>
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Example:
|
|
83
|
+
```bash
|
|
84
|
+
yarn verify 0x2716c4609fD97DaEdF429BC4B4Ec2faa81e2cC60 arbitrumSepolia
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
For detailed verification instructions, see [VERIFICATION.md](./VERIFICATION.md).
|
|
88
|
+
|
|
89
|
+
## Integration
|
|
90
|
+
|
|
91
|
+
The contract ABI and bytecode are automatically imported by the NeoZipKit library for blockchain operations. No manual configuration is required for basic usage.
|
|
92
|
+
|
|
93
|
+
For advanced deployment and configuration, refer to the main project documentation.
|
|
94
|
+
|
|
95
|
+
## Testnet Faucets
|
|
96
|
+
|
|
97
|
+
**Testnets are recommended for early release versions of NeoZipKit.** Testnet tokens have no real-world value and are intended solely for development and testing purposes. Before requesting tokens, ensure your wallet is configured to connect to the appropriate testnet network. Most faucets have daily limits and rate restrictions to prevent abuse.
|
|
98
|
+
|
|
99
|
+
### Ethereum Sepolia
|
|
100
|
+
|
|
101
|
+
Ethereum Sepolia is the primary Ethereum testnet. **Note:** Sepolia testnet has been experiencing instability since the Pectra upgrade (March 2025), including transaction processing failures and RPC timeouts. Consider using Base Sepolia for more reliable testing.
|
|
102
|
+
|
|
103
|
+
#### Alchemy Faucet
|
|
104
|
+
- **URL**: https://sepoliafaucet.com/
|
|
105
|
+
- **Daily Limit**: Up to 0.5 Sepolia ETH per day
|
|
106
|
+
- **Requirements**:
|
|
107
|
+
- Alchemy account (free registration)
|
|
108
|
+
- Sign in required
|
|
109
|
+
- **Steps**:
|
|
110
|
+
1. Visit https://sepoliafaucet.com/
|
|
111
|
+
2. Sign in with your Alchemy account (create one if needed)
|
|
112
|
+
3. Enter your Ethereum wallet address
|
|
113
|
+
4. Click "Send Me ETH"
|
|
114
|
+
5. Wait for tokens to arrive (usually within minutes)
|
|
115
|
+
|
|
116
|
+
#### Chainlink Faucet
|
|
117
|
+
- **URL**: https://faucets.chain.link/sepolia
|
|
118
|
+
- **Daily Limit**: 0.5 ETH per request
|
|
119
|
+
- **Requirements**:
|
|
120
|
+
- Wallet connection (MetaMask, WalletConnect, etc.)
|
|
121
|
+
- **Steps**:
|
|
122
|
+
1. Visit https://faucets.chain.link/sepolia
|
|
123
|
+
2. Connect your wallet
|
|
124
|
+
3. Ensure your wallet is set to Sepolia network
|
|
125
|
+
4. Select "0.5 ETH" from the token options
|
|
126
|
+
5. Click "Drip" to receive tokens
|
|
127
|
+
|
|
128
|
+
#### QuickNode Faucet
|
|
129
|
+
- **URL**: https://faucet.quicknode.com/ethereum/sepolia
|
|
130
|
+
- **Daily Limit**: 0.01 ETH per 24 hours
|
|
131
|
+
- **Requirements**:
|
|
132
|
+
- MetaMask wallet
|
|
133
|
+
- Optional: Share a tweet about QuickNode to double your daily limit
|
|
134
|
+
- **Steps**:
|
|
135
|
+
1. Visit https://faucet.quicknode.com/ethereum/sepolia
|
|
136
|
+
2. Connect your MetaMask wallet
|
|
137
|
+
3. Ensure MetaMask is configured for Sepolia network (Chain ID: 11155111)
|
|
138
|
+
4. Optionally share a tweet to increase your limit
|
|
139
|
+
5. Click "Send Me ETH"
|
|
140
|
+
|
|
141
|
+
#### Stakely Faucet
|
|
142
|
+
- **URL**: https://stakely.io/faucet/ethereum-sepolia-testnet-eth
|
|
143
|
+
- **Daily Limit**: 0.5 ETH per request
|
|
144
|
+
- **Requirements**:
|
|
145
|
+
- Twitter account
|
|
146
|
+
- Public tweet with request ID
|
|
147
|
+
- **Steps**:
|
|
148
|
+
1. Visit https://stakely.io/faucet/ethereum-sepolia-testnet-eth
|
|
149
|
+
2. Enter your Ethereum Sepolia wallet address
|
|
150
|
+
3. Complete the captcha verification
|
|
151
|
+
4. Copy the provided request ID
|
|
152
|
+
5. Share a public tweet containing the request ID
|
|
153
|
+
6. Wait for processing and token delivery
|
|
154
|
+
|
|
155
|
+
#### Tatum Faucet
|
|
156
|
+
- **URL**: https://tatum.io/faucets/sepolia
|
|
157
|
+
- **Daily Limit**: 0.002 Sepolia ETH every 24 hours
|
|
158
|
+
- **Requirements**:
|
|
159
|
+
- Tatum account (free registration)
|
|
160
|
+
- Minimum 0.001 ETH in your mainnet wallet (for verification)
|
|
161
|
+
- **Steps**:
|
|
162
|
+
1. Visit https://tatum.io/faucets/sepolia
|
|
163
|
+
2. Sign up for a Tatum Dashboard account
|
|
164
|
+
3. Ensure your mainnet wallet has at least 0.001 ETH
|
|
165
|
+
4. Enter your Sepolia wallet address
|
|
166
|
+
5. Request tokens (available once every 24 hours)
|
|
167
|
+
|
|
168
|
+
### Base Sepolia
|
|
169
|
+
|
|
170
|
+
Base Sepolia is the official testnet for Base (Coinbase's L2 network). It's generally more stable than Ethereum Sepolia and recommended for testing.
|
|
171
|
+
|
|
172
|
+
#### Alchemy Faucet
|
|
173
|
+
- **URL**: https://basefaucet.com/
|
|
174
|
+
- **Daily Limit**: Up to 0.5 Base Sepolia ETH per day
|
|
175
|
+
- **Requirements**:
|
|
176
|
+
- Alchemy account (free registration)
|
|
177
|
+
- Sign in required
|
|
178
|
+
- **Steps**:
|
|
179
|
+
1. Visit https://basefaucet.com/
|
|
180
|
+
2. Sign in with your Alchemy account
|
|
181
|
+
3. Enter your Base wallet address
|
|
182
|
+
4. Click "Send Me ETH"
|
|
183
|
+
5. Wait for tokens to arrive
|
|
184
|
+
|
|
185
|
+
#### Chainlink Faucet
|
|
186
|
+
- **URL**: https://faucets.chain.link/
|
|
187
|
+
- **Daily Limit**: 0.5 ETH per request
|
|
188
|
+
- **Requirements**:
|
|
189
|
+
- Wallet connection (MetaMask, WalletConnect, etc.)
|
|
190
|
+
- **Steps**:
|
|
191
|
+
1. Visit https://faucets.chain.link/
|
|
192
|
+
2. Connect your wallet
|
|
193
|
+
3. Select "Base Sepolia" from the network dropdown
|
|
194
|
+
4. Choose "0.5 ETH" from token options
|
|
195
|
+
5. Click "Drip" to receive tokens
|
|
196
|
+
|
|
197
|
+
#### Coinbase Developer Platform Faucet
|
|
198
|
+
- **URL**: https://docs.base.org/tools/network-faucets
|
|
199
|
+
- **Daily Limit**: 1 claim per 24 hours
|
|
200
|
+
- **Requirements**:
|
|
201
|
+
- Access to Coinbase Developer Platform
|
|
202
|
+
- **Steps**:
|
|
203
|
+
1. Visit https://docs.base.org/tools/network-faucets
|
|
204
|
+
2. Navigate to the Base Sepolia faucet section
|
|
205
|
+
3. Enter your Base Sepolia wallet address
|
|
206
|
+
4. Request testnet tokens
|
|
207
|
+
5. Wait for confirmation (usually within minutes)
|
|
208
|
+
|
|
209
|
+
#### thirdweb Faucet
|
|
210
|
+
- **URL**: Available via https://docs.base.org/tools/network-faucets
|
|
211
|
+
- **Daily Limit**: 1 claim per 24 hours
|
|
212
|
+
- **Requirements**:
|
|
213
|
+
- Wallet connection via EOA (Externally Owned Account) or social logins
|
|
214
|
+
- **Steps**:
|
|
215
|
+
1. Visit the Base documentation faucet page
|
|
216
|
+
2. Access the thirdweb faucet option
|
|
217
|
+
3. Connect your wallet (EOA or social login)
|
|
218
|
+
4. Ensure your wallet is set to Base Sepolia network
|
|
219
|
+
5. Claim your testnet funds
|
|
220
|
+
|
|
221
|
+
### Arbitrum Sepolia
|
|
222
|
+
|
|
223
|
+
Arbitrum Sepolia is the testnet for Arbitrum One, an Ethereum Layer 2 scaling solution.
|
|
224
|
+
|
|
225
|
+
#### Chainlink Faucet
|
|
226
|
+
- **URL**: https://faucets.chain.link/
|
|
227
|
+
- **Daily Limit**: 0.5 ETH per request
|
|
228
|
+
- **Requirements**:
|
|
229
|
+
- Wallet connection (MetaMask, WalletConnect, etc.)
|
|
230
|
+
- **Steps**:
|
|
231
|
+
1. Visit https://faucets.chain.link/
|
|
232
|
+
2. Connect your wallet
|
|
233
|
+
3. Select "Arbitrum Sepolia" from the network dropdown
|
|
234
|
+
4. Choose "0.5 ETH" from token options
|
|
235
|
+
5. Click "Drip" to receive tokens
|
|
236
|
+
|
|
237
|
+
#### QuickNode Faucet
|
|
238
|
+
- **URL**: https://faucet.quicknode.com/
|
|
239
|
+
- **Daily Limit**: Varies by network
|
|
240
|
+
- **Requirements**:
|
|
241
|
+
- MetaMask wallet
|
|
242
|
+
- Network configuration for Arbitrum Sepolia
|
|
243
|
+
- **Steps**:
|
|
244
|
+
1. Visit https://faucet.quicknode.com/
|
|
245
|
+
2. Select "Arbitrum Sepolia" from available networks
|
|
246
|
+
3. Connect your MetaMask wallet
|
|
247
|
+
4. Ensure MetaMask is configured for Arbitrum Sepolia (Chain ID: 421614)
|
|
248
|
+
5. Request testnet tokens
|
|
249
|
+
|
|
250
|
+
### General Tips
|
|
251
|
+
|
|
252
|
+
- **Wallet Configuration**: Always ensure your wallet is set to the correct testnet network before requesting tokens
|
|
253
|
+
- **Rate Limits**: Most faucets have daily limits; plan your testing activities accordingly
|
|
254
|
+
- **Network Congestion**: If you experience delays, try again later or use an alternative faucet
|
|
255
|
+
- **Multiple Faucets**: You can use multiple faucets to accumulate more testnet tokens if needed
|
|
256
|
+
- **No Real Value**: Remember that testnet tokens have no real-world value and cannot be converted to mainnet tokens
|