| 1 | // SPDX-License-Identifier: MIT |
| 2 | pragma solidity ^0.8.20; |
| 3 | |
| 4 | library ERC6551BytecodeLib { |
| 5 | function getCreationCode( |
| 6 | address implementation_, |
| 7 | uint256 chainId_, |
| 8 | address tokenContract_, |
| 9 | uint256 tokenId_, |
| 10 | uint256 salt_ |
| 11 | ) internal pure returns (bytes memory) { |
| 12 | return |
| 13 | abi.encodePacked( |
| 14 | hex"3d60ad80600a3d3981f3363d3d373d3d3d363d73", |
| 15 | implementation_, |
| 16 | hex"5af43d82803e903d91602b57fd5bf3", |
| 17 | abi.encode(salt_, chainId_, tokenContract_, tokenId_) |
| 18 | ); |
| 19 | } |
| 20 | } |