@lukso/lsp23-contracts 0.16.3 → 0.17.1

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/README.md CHANGED
@@ -1,9 +1,106 @@
1
1
  # LSP23 Linked Contracts Factory · [![npm version](https://img.shields.io/npm/v/@lukso/lsp23-contracts.svg?style=flat)](https://www.npmjs.com/package/@lukso/lsp23-contracts)
2
2
 
3
- npm package for the LSP23 Linked Contracts Factory. It contains the JSON artifacts (ABI, bytecode, and related metadata) and the `LSP23LinkedContractsFactory` contract.
3
+ npm package for the LSP23 Linked Contracts Factory. It contains the `LSP23LinkedContractsFactory` (V1) and `LSP23LinkedContractsFactoryV2` (V2) contracts and their JSON artifacts (ABI, bytecode, and related metadata).
4
4
 
5
5
  ## Installation
6
6
 
7
7
  ```bash
8
8
  npm install @lukso/lsp23-contracts
9
9
  ```
10
+
11
+ ## V1 or V2?
12
+
13
+ Use V2 for all new profiles. Use V1 only to re-create an existing V1 profile at the same address on another chain.
14
+
15
+ | Version | Contract | Address |
16
+ | ------- | ------------------------------- | -------------------------------------------- |
17
+ | V2 | `LSP23LinkedContractsFactoryV2` | `0x2302222D55e2087a5e092E57e1D35Ed24C4123E3` |
18
+ | V1 | `LSP23LinkedContractsFactory` | `0x2300000A84D25dF63081feAa37ba6b62C4c89a30` |
19
+
20
+ Each factory has the same address on every chain where it is deployed. V2 is deployed on LUKSO and most other chains where the Universal Profile contracts exist. See [`deployments/DEPLOYED_CHAINS.md`](https://github.com/lukso-network/lsp-smart-contracts/blob/main/deployments/DEPLOYED_CHAINS.md) for the full list. To deploy it on another chain, follow the steps in [Deploy the factory on a new chain](#deploy-the-factory-on-a-new-chain).
21
+
22
+ The factory deploys two linked ERC1167 proxies, for example a Universal Profile (the primary contract) and its Key Manager (the secondary contract). It computes both addresses in advance from a salt. Both versions have the same ABI. V2 also includes the primary contract's initialization calldata in this salt.
23
+
24
+ ## Deploy the factory on a new chain
25
+
26
+ You need [Foundry](https://getfoundry.sh) (`cast`), an RPC endpoint for the chain and a funded account. Set the RPC URL and the private key of the funded account first:
27
+
28
+ ```bash
29
+ RPC_URL=https://...
30
+ DEPLOYER_PK=0x...
31
+ ```
32
+
33
+ To sign with a keystore or a Ledger instead, replace `--private-key "$DEPLOYER_PK"` in the commands below with `--account <name>` or `--ledger`.
34
+
35
+ ### Step 0: check the Nick factory
36
+
37
+ Both LSP23 factories are deployed through [Nick's factory](https://github.com/Arachnid/deterministic-deployment-proxy) at `0x4e59b44847b379578588920cA78FbF26c0B4956C`. Check that it exists:
38
+
39
+ ```bash
40
+ cast code 0x4e59b44847b379578588920cA78FbF26c0B4956C --rpc-url "$RPC_URL"
41
+ ```
42
+
43
+ If it prints `0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe03601600081602082378035828234f58015156039578182fd5b8082525050506014600cf3`, the Nick factory exists. Go to step 1.
44
+
45
+ If it prints `0x`, deploy the Nick factory:
46
+
47
+ 1. Send 0.01 of the chain's native token (for example 0.01 ETH) to the keyless deployer `0x3fab184622dc19b6109349b94811493bf2a45362`. The pre-signed transaction needs exactly this amount: 100,000 gas at 100 gwei.
48
+ 2. Broadcast the pre-signed deployment transaction. This step needs no private key.
49
+
50
+ ```bash
51
+ cast send 0x3fab184622dc19b6109349b94811493bf2a45362 --value 0.01ether --rpc-url "$RPC_URL" --private-key "$DEPLOYER_PK"
52
+
53
+ cast publish --rpc-url "$RPC_URL" 0xf8a58085174876e800830186a08080b853604580600e600039806000f350fe7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe03601600081602082378035828234f58015156039578182fd5b8082525050506014600cf31ba02222222222222222222222222222222222222222222222222222222222222222a02222222222222222222222222222222222222222222222222222222222222222
54
+ ```
55
+
56
+ Then run the `cast code` check again.
57
+
58
+ > **If `cast publish` fails:** the pre-signed transaction has no chain ID and a fixed gas price of 100 gwei. Some RPC nodes refuse transactions without a chain ID, so try another RPC endpoint. If the chain itself rejects them, or its gas price is above 100 gwei, the Nick factory cannot be deployed at its address, so the LSP23 factories cannot be deployed at their addresses either.
59
+
60
+ ### Step 1: deploy the factory
61
+
62
+ First check that the factory is not on the chain yet. `cast code <factory address> --rpc-url "$RPC_URL"` must print `0x`. If it prints code, go to step 2.
63
+
64
+ To deploy V2, send this transaction. It deploys V2 at `0x2302222D55e2087a5e092E57e1D35Ed24C4123E3`.
65
+
66
+ ```bash
67
+ cast send 0x4e59b44847b379578588920cA78FbF26c0B4956C --rpc-url "$RPC_URL" --private-key "$DEPLOYER_PK" \
68
+ 0x00000000000000000000000000000000000000000000000000000000038e431c608060405234801561001057600080fd5b5061126e806100206000396000f3fe60806040526004361061003f5760003560e01c80636a66a7531461004457806372b19d361461007b578063754b86b51461009b578063dd5940f3146100ae575b600080fd5b610057610052366004610c1a565b6100ce565b604080516001600160a01b0393841681529290911660208301520160405180910390f35b34801561008757600080fd5b50610057610096366004610c1a565b610204565b6100576100a9366004610cc3565b61028d565b3480156100ba57600080fd5b506100576100c9366004610cc3565b610324565b6000806100e086356020890135610d37565b34146100ff57604051632fd9ca9160e01b815260040160405180910390fd5b61010c878787878761047d565b9150610118868361056c565b9050806001600160a01b0316826001600160a01b03167fe20570ed9bda3b93eea277b4e5d975c8933fd5f85f2c824d0845ae96c55a54fe8989898989604051610165959493929190610df0565b60405180910390a36001600160a01b038516156101fa576040517f28c4d14e0000000000000000000000000000000000000000000000000000000081526001600160a01b038616906328c4d14e906101c7908590859089908990600401610efc565b600060405180830381600087803b1580156101e157600080fd5b505af11580156101f5573d6000803e3d6000fd5b505050505b9550959350505050565b6000806000610216888888888861071a565b905061023161022b60608a0160408b01610f33565b826107a4565b92506102806102466040890160208a01610f33565b6040516bffffffffffffffffffffffff19606087901b166020820152603401604051602081830303815290604052805190602001206107a4565b9150509550959350505050565b60008061029f86356020890135610d37565b34146102be57604051632fd9ca9160e01b815260040160405180910390fd5b6102cb8787878787610809565b91506102d78683610876565b9050806001600160a01b0316826001600160a01b03167f0e20ea3d6273aab49a7dabafc15cc94971c12dd63a07185ca810e497e4e87aa68989898989604051610165959493929190610f4e565b60008060006103368888888888610975565b90506103648161034960408b018b610fee565b604051610357929190611035565b60405180910390206109be565b9250606061037788820160408a01611045565b156103e4576103896020890189610fee565b604080516001600160a01b03881660208201520160408051601f198184030181529190526103ba60608c018c610fee565b6040516020016103ce959493929190611084565b6040516020818303038152906040529050610429565b6103f16020890189610fee565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509293505050505b6040516bffffffffffffffffffffffff19606086901b16602082015261046f906034016040516020818303038152906040528051906020012082805190602001206109be565b925050509550959350505050565b60008061048d878787878761071a565b90506104a86104a26060890160408a01610f33565b826109cb565b91506000806001600160a01b03841660208a01356104c960608c018c610fee565b6040516104d7929190611035565b60006040518083038185875af1925050503d8060008114610514576040519150601f19603f3d011682016040523d82523d6000602084013e610519565b606091505b50915091508161056057806040517f4364b6ee00000000000000000000000000000000000000000000000000000000815260040161055791906110b8565b60405180910390fd5b50505095945050505050565b60006105bb6105816040850160208601610f33565b6040516bffffffffffffffffffffffff19606086901b166020820152603401604051602081830303815290604052805190602001206109cb565b905060006105cc6040850185610fee565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929350610614925050506080850160608601611045565b1561067157604080516001600160a01b038516602082015282910160408051601f1981840301815291905261064c6080870187610fee565b60405160200161065f94939291906110eb565b60405160208183030381529060405290505b600080836001600160a01b03168660000135846040516106919190611127565b60006040518083038185875af1925050503d80600081146106ce576040519150601f19603f3d011682016040523d82523d6000602084013e6106d3565b606091505b50915091508161071157806040517f9654a85400000000000000000000000000000000000000000000000000000000815260040161055791906110b8565b50505092915050565b6000853561072b6060880188610fee565b61073b6040890160208a01610f33565b61074860408a018a610fee565b61075860808c0160608d01611045565b61076560808d018d610fee565b8c8c8c6040516020016107839c9b9a99989796959493929190611143565b60405160208183030381529060405280519060200120905095945050505050565b6040513060388201526f5af43d82803e903d91602b57fd5bf3ff602482015260148101839052733d602d80600a3d3981f3363d3d373d3d3d363d738152605881018290526037600c820120607882015260556043909101206000905b90505b92915050565b6000806108198787878787610975565b905061086b60208801358261083160408b018b610fee565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610a6892505050565b979650505050505050565b6000806108866020850185610fee565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509293506108ce925050506060850160408601611045565b1561092b57604080516001600160a01b038516602082015282910160408051601f198184030181529190526109066060870187610fee565b60405160200161091994939291906110eb565b60405160208183030381529060405290505b6040516bffffffffffffffffffffffff19606085901b16602082015261096d908535906034016040516020818303038152906040528051906020012083610a68565b949350505050565b600085356109866020870187610fee565b6109966060890160408a01611045565b6109a360608a018a610fee565b898989604051602001610783999897969594939291906111cf565b6000610800838330610b73565b6000763d602d80600a3d3981f3363d3d373d3d3d363d730000008360601b60e81c176000526e5af43d82803e903d91602b57fd5bf38360781b1760205281603760096000f590506001600160a01b0381166108035760405162461bcd60e51b815260206004820152601760248201527f455243313136373a2063726561746532206661696c65640000000000000000006044820152606401610557565b600083471015610aba5760405162461bcd60e51b815260206004820152601d60248201527f437265617465323a20696e73756666696369656e742062616c616e63650000006044820152606401610557565b8151600003610b0b5760405162461bcd60e51b815260206004820181905260248201527f437265617465323a2062797465636f6465206c656e677468206973207a65726f6044820152606401610557565b8282516020840186f590506001600160a01b038116610b6c5760405162461bcd60e51b815260206004820152601960248201527f437265617465323a204661696c6564206f6e206465706c6f79000000000000006044820152606401610557565b9392505050565b6000604051836040820152846020820152828152600b8101905060ff815360559020949350505050565b600060808284031215610baf57600080fd5b50919050565b80356001600160a01b0381168114610bcc57600080fd5b919050565b60008083601f840112610be357600080fd5b50813567ffffffffffffffff811115610bfb57600080fd5b602083019150836020828501011115610c1357600080fd5b9250929050565b600080600080600060808688031215610c3257600080fd5b853567ffffffffffffffff80821115610c4a57600080fd5b610c5689838a01610b9d565b96506020880135915080821115610c6c57600080fd5b9087019060a0828a031215610c8057600080fd5b819550610c8f60408901610bb5565b94506060880135915080821115610ca557600080fd5b50610cb288828901610bd1565b969995985093965092949392505050565b600080600080600060808688031215610cdb57600080fd5b853567ffffffffffffffff80821115610cf357600080fd5b908701906060828a031215610d0757600080fd5b90955060208701359080821115610d1d57600080fd5b610d2989838a01610b9d565b9550610c8f60408901610bb5565b80820180821115610803577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000808335601e19843603018112610d8857600080fd5b830160208101925035905067ffffffffffffffff811115610da857600080fd5b803603821315610c1357600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b80358015158114610bcc57600080fd5b6080815285356080820152602086013560a08201526000610e1360408801610bb5565b6001600160a01b0380821660c0850152610e3060608a018a610d71565b9250608060e0860152610e4861010086018483610db7565b92505083820360208501528735825280610e6460208a01610bb5565b16602083015250610e786040880188610d71565b60a06040840152610e8d60a084018284610db7565b915050610e9c60608901610de0565b15156060830152610eb06080890189610d71565b8383036080850152610ec3838284610db7565b9350505050610edd60408401876001600160a01b03169052565b8281036060840152610ef0818587610db7565b98975050505050505050565b60006001600160a01b03808716835280861660208401525060606040830152610f29606083018486610db7565b9695505050505050565b600060208284031215610f4557600080fd5b61080082610bb5565b6080815285356080820152602086013560a08201526000610f726040880188610d71565b606060c0850152610f8760e085018284610db7565b915050828103602084015286358152610fa36020880188610d71565b60806020840152610fb8608084018284610db7565b915050610fc760408901610de0565b15156040830152610fdb6060890189610d71565b8383036060850152610ec3838284610db7565b6000808335601e1984360301811261100557600080fd5b83018035915067ffffffffffffffff82111561102057600080fd5b602001915036819003821315610c1357600080fd5b8183823760009101908152919050565b60006020828403121561105757600080fd5b61080082610de0565b60005b8381101561107b578181015183820152602001611063565b50506000910152565b8486823760008582016000815285516110a1818360208a01611060565b018385823760009301928352509095945050505050565b60208152600082518060208401526110d7816040850160208701611060565b601f01601f19169190910160400192915050565b600085516110fd818460208a01611060565b855190830190611111818360208a01611060565b0183858237600093019283525090949350505050565b60008251611139818460208701611060565b9190910192915050565b8c81526101006020820152600061115f61010083018d8f610db7565b6001600160a01b03808d1660408501528382036060850152611182828c8e610db7565b9150891515608085015283820360a085015261119f82898b610db7565b90871660c085015283810360e085015290506111bc818587610db7565b9f9e505050505050505050505050505050565b89815260c0602082015260006111e960c083018a8c610db7565b8815156040840152828103606084015261120481888a610db7565b90506001600160a01b038616608084015282810360a0840152611228818587610db7565b9c9b50505050505050505050505056fea264697066735822122040b265a2cc07522abf351de646146eb357105c0ac0ef6a09f37ac3bee05609df64736f6c63430008110033
69
+ ```
70
+
71
+ To deploy V1, send this transaction. It deploys V1 at `0x2300000A84D25dF63081feAa37ba6b62C4c89a30`. Only do this to re-create existing V1 profiles on this chain.
72
+
73
+ ```bash
74
+ cast send 0x4e59b44847b379578588920cA78FbF26c0B4956C --rpc-url "$RPC_URL" --private-key "$DEPLOYER_PK" \
75
+ 0x12a6712f113536d8b01d99f72ce168c7e1090124db54cd16f03c20000022178c608060405234801561001057600080fd5b50611247806100206000396000f3fe60806040526004361061003f5760003560e01c80636a66a7531461004457806372b19d361461007b578063754b86b51461009b578063dd5940f3146100ae575b600080fd5b610057610052366004610c0b565b6100ce565b604080516001600160a01b0393841681529290911660208301520160405180910390f35b34801561008757600080fd5b50610057610096366004610c0b565b610204565b6100576100a9366004610cb4565b61028d565b3480156100ba57600080fd5b506100576100c9366004610cb4565b610324565b6000806100e086356020890135610d28565b34146100ff57604051632fd9ca9160e01b815260040160405180910390fd5b61010c878787878761047d565b9150610118868361056c565b9050806001600160a01b0316826001600160a01b03167fe20570ed9bda3b93eea277b4e5d975c8933fd5f85f2c824d0845ae96c55a54fe8989898989604051610165959493929190610de1565b60405180910390a36001600160a01b038516156101fa576040517f28c4d14e0000000000000000000000000000000000000000000000000000000081526001600160a01b038616906328c4d14e906101c7908590859089908990600401610eed565b600060405180830381600087803b1580156101e157600080fd5b505af11580156101f5573d6000803e3d6000fd5b505050505b9550959350505050565b6000806000610216888888888861071a565b905061023161022b60608a0160408b01610f24565b82610795565b92506102806102466040890160208a01610f24565b6040516bffffffffffffffffffffffff19606087901b16602082015260340160405160208183030381529060405280519060200120610795565b9150509550959350505050565b60008061029f86356020890135610d28565b34146102be57604051632fd9ca9160e01b815260040160405180910390fd5b6102cb87878787876107fa565b91506102d78683610867565b9050806001600160a01b0316826001600160a01b03167f0e20ea3d6273aab49a7dabafc15cc94971c12dd63a07185ca810e497e4e87aa68989898989604051610165959493929190610f3f565b60008060006103368888888888610966565b90506103648161034960408b018b610fdf565b604051610357929190611026565b60405180910390206109af565b9250606061037788820160408a01611036565b156103e4576103896020890189610fdf565b604080516001600160a01b03881660208201520160408051601f198184030181529190526103ba60608c018c610fdf565b6040516020016103ce959493929190611075565b6040516020818303038152906040529050610429565b6103f16020890189610fdf565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509293505050505b6040516bffffffffffffffffffffffff19606086901b16602082015261046f906034016040516020818303038152906040528051906020012082805190602001206109af565b925050509550959350505050565b60008061048d878787878761071a565b90506104a86104a26060890160408a01610f24565b826109bc565b91506000806001600160a01b03841660208a01356104c960608c018c610fdf565b6040516104d7929190611026565b60006040518083038185875af1925050503d8060008114610514576040519150601f19603f3d011682016040523d82523d6000602084013e610519565b606091505b50915091508161056057806040517f4364b6ee00000000000000000000000000000000000000000000000000000000815260040161055791906110a9565b60405180910390fd5b50505095945050505050565b60006105bb6105816040850160208601610f24565b6040516bffffffffffffffffffffffff19606086901b166020820152603401604051602081830303815290604052805190602001206109bc565b905060006105cc6040850185610fdf565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929350610614925050506080850160608601611036565b1561067157604080516001600160a01b038516602082015282910160408051601f1981840301815291905261064c6080870187610fdf565b60405160200161065f94939291906110dc565b60405160208183030381529060405290505b600080836001600160a01b03168660000135846040516106919190611118565b60006040518083038185875af1925050503d80600081146106ce576040519150601f19603f3d011682016040523d82523d6000602084013e6106d3565b606091505b50915091508161071157806040517f9654a85400000000000000000000000000000000000000000000000000000000815260040161055791906110a9565b50505092915050565b6000853561072e6040870160208801610f24565b61073b6040880188610fdf565b61074b60808a0160608b01611036565b61075860808b018b610fdf565b8a8a8a6040516020016107749a99989796959493929190611134565b60405160208183030381529060405280519060200120905095945050505050565b6040513060388201526f5af43d82803e903d91602b57fd5bf3ff602482015260148101839052733d602d80600a3d3981f3363d3d373d3d3d363d738152605881018290526037600c820120607882015260556043909101206000905b90505b92915050565b60008061080a8787878787610966565b905061085c60208801358261082260408b018b610fdf565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610a5992505050565b979650505050505050565b6000806108776020850185610fdf565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509293506108bf925050506060850160408601611036565b1561091c57604080516001600160a01b038516602082015282910160408051601f198184030181529190526108f76060870187610fdf565b60405160200161090a94939291906110dc565b60405160208183030381529060405290505b6040516bffffffffffffffffffffffff19606085901b16602082015261095e908535906034016040516020818303038152906040528051906020012083610a59565b949350505050565b600085356109776020870187610fdf565b6109876060890160408a01611036565b61099460608a018a610fdf565b898989604051602001610774999897969594939291906111a8565b60006107f1838330610b64565b6000763d602d80600a3d3981f3363d3d373d3d3d363d730000008360601b60e81c176000526e5af43d82803e903d91602b57fd5bf38360781b1760205281603760096000f590506001600160a01b0381166107f45760405162461bcd60e51b815260206004820152601760248201527f455243313136373a2063726561746532206661696c65640000000000000000006044820152606401610557565b600083471015610aab5760405162461bcd60e51b815260206004820152601d60248201527f437265617465323a20696e73756666696369656e742062616c616e63650000006044820152606401610557565b8151600003610afc5760405162461bcd60e51b815260206004820181905260248201527f437265617465323a2062797465636f6465206c656e677468206973207a65726f6044820152606401610557565b8282516020840186f590506001600160a01b038116610b5d5760405162461bcd60e51b815260206004820152601960248201527f437265617465323a204661696c6564206f6e206465706c6f79000000000000006044820152606401610557565b9392505050565b6000604051836040820152846020820152828152600b8101905060ff815360559020949350505050565b600060808284031215610ba057600080fd5b50919050565b80356001600160a01b0381168114610bbd57600080fd5b919050565b60008083601f840112610bd457600080fd5b50813567ffffffffffffffff811115610bec57600080fd5b602083019150836020828501011115610c0457600080fd5b9250929050565b600080600080600060808688031215610c2357600080fd5b853567ffffffffffffffff80821115610c3b57600080fd5b610c4789838a01610b8e565b96506020880135915080821115610c5d57600080fd5b9087019060a0828a031215610c7157600080fd5b819550610c8060408901610ba6565b94506060880135915080821115610c9657600080fd5b50610ca388828901610bc2565b969995985093965092949392505050565b600080600080600060808688031215610ccc57600080fd5b853567ffffffffffffffff80821115610ce457600080fd5b908701906060828a031215610cf857600080fd5b90955060208701359080821115610d0e57600080fd5b610d1a89838a01610b8e565b9550610c8060408901610ba6565b808201808211156107f4577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000808335601e19843603018112610d7957600080fd5b830160208101925035905067ffffffffffffffff811115610d9957600080fd5b803603821315610c0457600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b80358015158114610bbd57600080fd5b6080815285356080820152602086013560a08201526000610e0460408801610ba6565b6001600160a01b0380821660c0850152610e2160608a018a610d62565b9250608060e0860152610e3961010086018483610da8565b92505083820360208501528735825280610e5560208a01610ba6565b16602083015250610e696040880188610d62565b60a06040840152610e7e60a084018284610da8565b915050610e8d60608901610dd1565b15156060830152610ea16080890189610d62565b8383036080850152610eb4838284610da8565b9350505050610ece60408401876001600160a01b03169052565b8281036060840152610ee1818587610da8565b98975050505050505050565b60006001600160a01b03808716835280861660208401525060606040830152610f1a606083018486610da8565b9695505050505050565b600060208284031215610f3657600080fd5b6107f182610ba6565b6080815285356080820152602086013560a08201526000610f636040880188610d62565b606060c0850152610f7860e085018284610da8565b915050828103602084015286358152610f946020880188610d62565b60806020840152610fa9608084018284610da8565b915050610fb860408901610dd1565b15156040830152610fcc6060890189610d62565b8383036060850152610eb4838284610da8565b6000808335601e19843603018112610ff657600080fd5b83018035915067ffffffffffffffff82111561101157600080fd5b602001915036819003821315610c0457600080fd5b8183823760009101908152919050565b60006020828403121561104857600080fd5b6107f182610dd1565b60005b8381101561106c578181015183820152602001611054565b50506000910152565b848682376000858201600081528551611092818360208a01611051565b018385823760009301928352509095945050505050565b60208152600082518060208401526110c8816040850160208701611051565b601f01601f19169190910160400192915050565b600085516110ee818460208a01611051565b855190830190611102818360208a01611051565b0183858237600093019283525090949350505050565b6000825161112a818460208701611051565b9190910192915050565b8a815260006001600160a01b03808c16602084015260e0604084015261115e60e084018b8d610da8565b8915156060850152838103608085015261117981898b610da8565b905081871660a085015283810360c0850152611196818688610da8565b9e9d5050505050505050505050505050565b89815260c0602082015260006111c260c083018a8c610da8565b881515604084015282810360608401526111dd81888a610da8565b90506001600160a01b038616608084015282810360a0840152611201818587610da8565b9c9b50505050505050505050505056fea2646970667358221220add0ea42f8f9e02abd8c7da64d0b13eef395e008fa30377a6b79ea444e7d21bb64736f6c63430008110033
76
+ ```
77
+
78
+ The last argument is the transaction data: the 32-byte salt followed by the factory's creation bytecode. Any funded account can send it. Each deployment uses about 1.1 million gas. The Nick factory deploys the bytecode with CREATE2, so the factory address depends only on the salt and the bytecode. To use another wallet, send a transaction to `0x4e59b44847b379578588920cA78FbF26c0B4956C` with this data and no value.
79
+
80
+ ### Step 2: verify the deployment
81
+
82
+ Check that the code at the factory address has the expected Keccak-256 hash:
83
+
84
+ ```bash
85
+ # V2: must print 0xa8f444941c6f3b4e70b52b82647b82564824b69b4d4056379371c7d6087274cb
86
+ cast keccak "$(cast code 0x2302222D55e2087a5e092E57e1D35Ed24C4123E3 --rpc-url "$RPC_URL")"
87
+
88
+ # V1: must print 0xccbfdd7d69d0faf0e9200bdfd6b7db9529757dd8ca3ca174ad2de554efc3c772
89
+ cast keccak "$(cast code 0x2300000A84D25dF63081feAa37ba6b62C4c89a30 --rpc-url "$RPC_URL")"
90
+ ```
91
+
92
+ To verify the source code on a block explorer, select **Solidity (Standard JSON Input)**, compiler `v0.8.17+commit.8df45f5f`, and upload the Standard JSON input below. The factories have no constructor arguments.
93
+
94
+ | Version | Standard JSON input | Contract name |
95
+ | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ |
96
+ | V2 | [`deployments/std-json-inputs/Standard-JSON-input-LSP23LinkedContractsFactoryV2.json`](https://github.com/lukso-network/lsp-smart-contracts/blob/main/deployments/std-json-inputs/Standard-JSON-input-LSP23LinkedContractsFactoryV2.json) | `contracts/LSP23LinkedContractsFactory-v2.sol:LSP23LinkedContractsFactoryV2` |
97
+ | V1 | [`deployments/std-json-inputs/Standard-JSON-input-LSP23LinkedContractFactory.json`](https://github.com/lukso-network/lsp-smart-contracts/blob/main/deployments/std-json-inputs/Standard-JSON-input-LSP23LinkedContractFactory.json) | `contracts/LSP23LinkedContractsDeployment/LSP23LinkedContractsFactory.sol:LSP23LinkedContractsFactory` |
98
+
99
+ From a clone of the [lsp-smart-contracts](https://github.com/lukso-network/lsp-smart-contracts) repository, you can also run `bash deployments/verify-contract.sh --address <factory address> --chain "<chain name>"`. It submits the input to the chain's block explorers and to Sourcify. The chain must be listed in `deployments/chains-mainnet.json`, or in `deployments/chains-testnet.json` with `--testnet`.
100
+
101
+ ### Other ways to deploy
102
+
103
+ From a clone of the repository, these tools send the same transaction to the Nick factory. Use `LSP23LinkedContractsFactory` instead of `LSP23LinkedContractsFactoryV2` for V1.
104
+
105
+ - Foundry: run `deployments/scripts/DeployFromArtifact.s.sol` with `CONTRACT_TO_DEPLOY=LSP23LinkedContractsFactoryV2`. It checks the Nick factory and the expected address before it deploys. `deployments/scripts/DeployUniversalProfileStack.s.sol` deploys both factories and the rest of the Universal Profile stack. See the [deployment guide](https://github.com/lukso-network/lsp-smart-contracts/blob/main/deployments/README.md).
106
+ - Hardhat Ignition: add the chain to `packages/lsp23-contracts/hardhat.config.ts`, then run `npx hardhat ignition deploy ignition/modules/standardized/LSP23LinkedContractsFactoryV2.ts --network <network>` from `packages/lsp23-contracts`.
@@ -516,5 +516,5 @@
516
516
  "deployedLinkReferences": {},
517
517
  "immutableReferences": {},
518
518
  "inputSourceName": "project/contracts/ILSP23LinkedContractsFactory.sol",
519
- "buildInfoId": "solc-0_8_17-8c4c2ea990fda04bb667010949fa3affc1e1dccd"
519
+ "buildInfoId": "solc-0_8_17-20d6e71873e3eb0fa34516871f962f2cedb8d7dd"
520
520
  }
@@ -33,5 +33,5 @@
33
33
  "deployedLinkReferences": {},
34
34
  "immutableReferences": {},
35
35
  "inputSourceName": "project/contracts/IPostDeploymentModule.sol",
36
- "buildInfoId": "solc-0_8_17-8c4c2ea990fda04bb667010949fa3affc1e1dccd"
36
+ "buildInfoId": "solc-0_8_17-20d6e71873e3eb0fa34516871f962f2cedb8d7dd"
37
37
  }
@@ -543,5 +543,5 @@
543
543
  "deployedLinkReferences": {},
544
544
  "immutableReferences": {},
545
545
  "inputSourceName": "project/contracts/LSP23LinkedContractsFactory.sol",
546
- "buildInfoId": "solc-0_8_17-8c4c2ea990fda04bb667010949fa3affc1e1dccd"
546
+ "buildInfoId": "solc-0_8_17-20d6e71873e3eb0fa34516871f962f2cedb8d7dd"
547
547
  }