diff --git a/broadcast/04_DeploySampleCLDynamicFeeHook.s.sol/97/run-1724226414.json b/broadcast/04_DeploySampleCLDynamicFeeHook.s.sol/97/run-1724226414.json new file mode 100644 index 0000000..1356eaf --- /dev/null +++ b/broadcast/04_DeploySampleCLDynamicFeeHook.s.sol/97/run-1724226414.json @@ -0,0 +1,48 @@ +{ + "transactions": [ + { + "hash": "0x34f434e21baa6570905035231d93102233a8d4605c914bb0209413d2865de657", + "transactionType": "CREATE", + "contractName": "SampleCLDynamicFeeHook", + "contractAddress": "0x8f3654c0ea6712c69bac45644478942cde955db2", + "function": null, + "arguments": [ + "0x40a081A39E9638fa6e2463B92A4eff4Bdf877179" + ], + "transaction": { + "from": "0xbf0135be6a39257c659fd1955324dc3cdb342f29", + "gas": "0xc8e36", + "value": "0x0", + "input": "0x60c080604052346100e557602081610b2e803803809161001f82856100fc565b8339810103126100e557516001600160a01b038116908181036100e55760805260405163fbfa77cf60e01b815290602090829060049082905afa9081156100f1575f916100ab575b5060a052610bb866ffffffffffffff195f5416175f556040516109fa9081610134823960805181818161034f01526108df015260a05181818160f001526103b30152f35b90506020813d6020116100e9575b816100c6602093836100fc565b810103126100e557516001600160a01b03811681036100e5575f610067565b5f80fd5b3d91506100b9565b6040513d5f823e3d90fd5b601f909101601f19168101906001600160401b0382119082101761011f57604052565b634e487b7160e01b5f52604160045260245ffdfe60806040526004361015610011575f80fd5b5f803560e01c9081631ffe6a581461052e5781634b6a682d146105295781635304d44e14610529578163683f7784146104f15781636f6657cb1461049d5781637aa43ce014610373578163972e19a21461043b578163ab6291fe14610378578163d533c4db14610373578163dc4c90d314610330578163e592dc9314610293578163e8246c7f146100cc578163f32b0da0146101db578163f961d1f414610117578163fbfa77cf146100d1575063fe70c9c9146100cc575f80fd5b61076d565b3461011457806003193601126101145760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b80fd5b346101d7575f3660031901126101d7576040516101c0810181811067ffffffffffffffff8211176101aa575f916101a091604052828152600160208201528260408201528260608201528260808201528260a0820152600160c08201528260e082015282610100820152826101208201528261014082015282610160820152826101808201520152602060405160428152f35b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f80fd5b346101d757366003190160e081126101d75760c0136101d757604051610200816107cc565b6004356001600160a01b03811681036101d75781526024356001600160a01b03811681036101d75760208201526044356001600160a01b03811681036101d75760408201526064356001600160a01b03811681036101d757606082015260843562ffffff811681036101d757608082015260a43560a082015260c43562ffffff811681036101d757610291916108d5565b005b346101d7576101603660031901126101d7576102ad61064f565b5060c03660231901126101d75760603660e31901126101d7576101443567ffffffffffffffff81116101d7576102e790369060040161067b565b5050606062ffffff6102f76108a2565b907fffffffff00000000000000000000000000000000000000000000000000000000604094939451941684526020840152166040820152f35b346101d7575f3660031901126101d75760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b61070e565b346101d75760203660031901126101d75760043567ffffffffffffffff81116101d7576103a990369060040161067b565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163303610413576103e760409160209361080a565b815192839181835280519182918282860152018484015e5f828201840152601f01601f19168101030190f35b7f62df0545000000000000000000000000000000000000000000000000000000005f5260045ffd5b346101d7576101203660031901126101d75761045561064f565b5060c03660231901126101d75761046a610665565b506101043567ffffffffffffffff81116101d75761048c90369060040161067b565b5050630a85dc2960e01b5f5260045ffd5b346101d7576101803660031901126101d7576104b761064f565b5060c03660231901126101d75760603660e31901126101d7576101643567ffffffffffffffff81116101d75761048c90369060040161067b565b346101d7575f3660031901126101d7575f5466ff00000000000060ff8260301c161560301b169066ff0000000000001916175f555f80f35b6106a9565b346101d7576101403660031901126101d75761054861064f565b5060c03660231901126101d75761055d610665565b50610104358060020b036101d7576101243567ffffffffffffffff81116101d75761058c90369060040161067b565b505062ffffff5f5416604051906105a2826107cc565b6024356001600160a01b03811681036101d75782526044356001600160a01b03811681036101d75760208301526064356001600160a01b03811681036101d75760408301526084356001600160a01b03811681036101d757606083015260a4359162ffffff831683036101d75761062592608082015260c43560a08201526108d5565b60206040517f972e19a2000000000000000000000000000000000000000000000000000000008152f35b600435906001600160a01b03821682036101d757565b60e435906001600160a01b03821682036101d757565b9181601f840112156101d75782359167ffffffffffffffff83116101d757602083818601950101116101d757565b346101d7576101403660031901126101d7576004356001600160a01b03811681036101d7575060c03660231901126101d7576101243567ffffffffffffffff81116101d7576106fc90369060040161067b565b905050630a85dc2960e01b5f5260045ffd5b346101d7576101a03660031901126101d7576004356001600160a01b03811681036101d7575060c03660231901126101d75760803660e31901126101d7576101843567ffffffffffffffff81116101d7576106fc90369060040161067b565b346101d7576101803660031901126101d7576004356001600160a01b03811681036101d7575060c03660231901126101d75760803660e31901126101d7576101643567ffffffffffffffff81116101d7576106fc90369060040161067b565b60c0810190811067ffffffffffffffff8211176101aa57604052565b90601f8019910116810190811067ffffffffffffffff8211176101aa57604052565b5f9182918160405192839283378101838152039082305af1903d1561089a573d9167ffffffffffffffff83116101aa5760405192610852601f8201601f1916602001856107e8565b83523d5f602085013e5b610898575080511561087057602081519101fd5b7fa40afa38000000000000000000000000000000000000000000000000000000005f5260045ffd5b565b60609161085c565b5f5460ff8160301c166108bf575063e592dc9360e01b905f905f90565b63e592dc9360e01b91624000005f9260181c1690565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690813b156101d75760e460a0915f809462ffffff60405197889687957fad4cc2d30000000000000000000000000000000000000000000000000000000087526001600160a01b0381511660048801526001600160a01b0360208201511660248801526001600160a01b0360408201511660448801526001600160a01b036060820151166064880152836080820151166084880152015160a48601521660c48401525af180156109b9576109af5750565b5f610898916107e8565b6040513d5f823e3d90fdfea26469706673582212201f22f232a68f2ecff6a2ea32d7663f03ac15302ff2fdea302cb291b9c7152c0b64736f6c634300081a003300000000000000000000000040a081a39e9638fa6e2463b92a4eff4bdf877179", + "nonce": "0x19", + "chainId": "0x61" + }, + "additionalContracts": [], + "isFixedGasLimit": false + } + ], + "receipts": [ + { + "status": "0x1", + "cumulativeGasUsed": "0x9a879", + "logs": [], + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "type": "0x0", + "transactionHash": "0x34f434e21baa6570905035231d93102233a8d4605c914bb0209413d2865de657", + "transactionIndex": "0x0", + "blockHash": "0xbea556d4029d449e1be4d18838beb981864a8b5754bc7bd5aced9c1a4148e35a", + "blockNumber": "0x292b378", + "gasUsed": "0x9a879", + "effectiveGasPrice": "0x138eca480", + "from": "0xbf0135be6a39257c659fd1955324dc3cdb342f29", + "to": null, + "contractAddress": "0x8f3654c0ea6712c69bac45644478942cde955db2" + } + ], + "libraries": [], + "pending": [], + "returns": {}, + "timestamp": 1724226414, + "chain": 97, + "commit": "2c630a3" +} \ No newline at end of file diff --git a/broadcast/04_DeploySampleCLDynamicFeeHook.s.sol/97/run-latest.json b/broadcast/04_DeploySampleCLDynamicFeeHook.s.sol/97/run-latest.json new file mode 100644 index 0000000..1356eaf --- /dev/null +++ b/broadcast/04_DeploySampleCLDynamicFeeHook.s.sol/97/run-latest.json @@ -0,0 +1,48 @@ +{ + "transactions": [ + { + "hash": "0x34f434e21baa6570905035231d93102233a8d4605c914bb0209413d2865de657", + "transactionType": "CREATE", + "contractName": "SampleCLDynamicFeeHook", + "contractAddress": "0x8f3654c0ea6712c69bac45644478942cde955db2", + "function": null, + "arguments": [ + "0x40a081A39E9638fa6e2463B92A4eff4Bdf877179" + ], + "transaction": { + "from": "0xbf0135be6a39257c659fd1955324dc3cdb342f29", + "gas": "0xc8e36", + "value": "0x0", + "input": "0x60c080604052346100e557602081610b2e803803809161001f82856100fc565b8339810103126100e557516001600160a01b038116908181036100e55760805260405163fbfa77cf60e01b815290602090829060049082905afa9081156100f1575f916100ab575b5060a052610bb866ffffffffffffff195f5416175f556040516109fa9081610134823960805181818161034f01526108df015260a05181818160f001526103b30152f35b90506020813d6020116100e9575b816100c6602093836100fc565b810103126100e557516001600160a01b03811681036100e5575f610067565b5f80fd5b3d91506100b9565b6040513d5f823e3d90fd5b601f909101601f19168101906001600160401b0382119082101761011f57604052565b634e487b7160e01b5f52604160045260245ffdfe60806040526004361015610011575f80fd5b5f803560e01c9081631ffe6a581461052e5781634b6a682d146105295781635304d44e14610529578163683f7784146104f15781636f6657cb1461049d5781637aa43ce014610373578163972e19a21461043b578163ab6291fe14610378578163d533c4db14610373578163dc4c90d314610330578163e592dc9314610293578163e8246c7f146100cc578163f32b0da0146101db578163f961d1f414610117578163fbfa77cf146100d1575063fe70c9c9146100cc575f80fd5b61076d565b3461011457806003193601126101145760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b80fd5b346101d7575f3660031901126101d7576040516101c0810181811067ffffffffffffffff8211176101aa575f916101a091604052828152600160208201528260408201528260608201528260808201528260a0820152600160c08201528260e082015282610100820152826101208201528261014082015282610160820152826101808201520152602060405160428152f35b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f80fd5b346101d757366003190160e081126101d75760c0136101d757604051610200816107cc565b6004356001600160a01b03811681036101d75781526024356001600160a01b03811681036101d75760208201526044356001600160a01b03811681036101d75760408201526064356001600160a01b03811681036101d757606082015260843562ffffff811681036101d757608082015260a43560a082015260c43562ffffff811681036101d757610291916108d5565b005b346101d7576101603660031901126101d7576102ad61064f565b5060c03660231901126101d75760603660e31901126101d7576101443567ffffffffffffffff81116101d7576102e790369060040161067b565b5050606062ffffff6102f76108a2565b907fffffffff00000000000000000000000000000000000000000000000000000000604094939451941684526020840152166040820152f35b346101d7575f3660031901126101d75760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b61070e565b346101d75760203660031901126101d75760043567ffffffffffffffff81116101d7576103a990369060040161067b565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163303610413576103e760409160209361080a565b815192839181835280519182918282860152018484015e5f828201840152601f01601f19168101030190f35b7f62df0545000000000000000000000000000000000000000000000000000000005f5260045ffd5b346101d7576101203660031901126101d75761045561064f565b5060c03660231901126101d75761046a610665565b506101043567ffffffffffffffff81116101d75761048c90369060040161067b565b5050630a85dc2960e01b5f5260045ffd5b346101d7576101803660031901126101d7576104b761064f565b5060c03660231901126101d75760603660e31901126101d7576101643567ffffffffffffffff81116101d75761048c90369060040161067b565b346101d7575f3660031901126101d7575f5466ff00000000000060ff8260301c161560301b169066ff0000000000001916175f555f80f35b6106a9565b346101d7576101403660031901126101d75761054861064f565b5060c03660231901126101d75761055d610665565b50610104358060020b036101d7576101243567ffffffffffffffff81116101d75761058c90369060040161067b565b505062ffffff5f5416604051906105a2826107cc565b6024356001600160a01b03811681036101d75782526044356001600160a01b03811681036101d75760208301526064356001600160a01b03811681036101d75760408301526084356001600160a01b03811681036101d757606083015260a4359162ffffff831683036101d75761062592608082015260c43560a08201526108d5565b60206040517f972e19a2000000000000000000000000000000000000000000000000000000008152f35b600435906001600160a01b03821682036101d757565b60e435906001600160a01b03821682036101d757565b9181601f840112156101d75782359167ffffffffffffffff83116101d757602083818601950101116101d757565b346101d7576101403660031901126101d7576004356001600160a01b03811681036101d7575060c03660231901126101d7576101243567ffffffffffffffff81116101d7576106fc90369060040161067b565b905050630a85dc2960e01b5f5260045ffd5b346101d7576101a03660031901126101d7576004356001600160a01b03811681036101d7575060c03660231901126101d75760803660e31901126101d7576101843567ffffffffffffffff81116101d7576106fc90369060040161067b565b346101d7576101803660031901126101d7576004356001600160a01b03811681036101d7575060c03660231901126101d75760803660e31901126101d7576101643567ffffffffffffffff81116101d7576106fc90369060040161067b565b60c0810190811067ffffffffffffffff8211176101aa57604052565b90601f8019910116810190811067ffffffffffffffff8211176101aa57604052565b5f9182918160405192839283378101838152039082305af1903d1561089a573d9167ffffffffffffffff83116101aa5760405192610852601f8201601f1916602001856107e8565b83523d5f602085013e5b610898575080511561087057602081519101fd5b7fa40afa38000000000000000000000000000000000000000000000000000000005f5260045ffd5b565b60609161085c565b5f5460ff8160301c166108bf575063e592dc9360e01b905f905f90565b63e592dc9360e01b91624000005f9260181c1690565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690813b156101d75760e460a0915f809462ffffff60405197889687957fad4cc2d30000000000000000000000000000000000000000000000000000000087526001600160a01b0381511660048801526001600160a01b0360208201511660248801526001600160a01b0360408201511660448801526001600160a01b036060820151166064880152836080820151166084880152015160a48601521660c48401525af180156109b9576109af5750565b5f610898916107e8565b6040513d5f823e3d90fdfea26469706673582212201f22f232a68f2ecff6a2ea32d7663f03ac15302ff2fdea302cb291b9c7152c0b64736f6c634300081a003300000000000000000000000040a081a39e9638fa6e2463b92a4eff4bdf877179", + "nonce": "0x19", + "chainId": "0x61" + }, + "additionalContracts": [], + "isFixedGasLimit": false + } + ], + "receipts": [ + { + "status": "0x1", + "cumulativeGasUsed": "0x9a879", + "logs": [], + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "type": "0x0", + "transactionHash": "0x34f434e21baa6570905035231d93102233a8d4605c914bb0209413d2865de657", + "transactionIndex": "0x0", + "blockHash": "0xbea556d4029d449e1be4d18838beb981864a8b5754bc7bd5aced9c1a4148e35a", + "blockNumber": "0x292b378", + "gasUsed": "0x9a879", + "effectiveGasPrice": "0x138eca480", + "from": "0xbf0135be6a39257c659fd1955324dc3cdb342f29", + "to": null, + "contractAddress": "0x8f3654c0ea6712c69bac45644478942cde955db2" + } + ], + "libraries": [], + "pending": [], + "returns": {}, + "timestamp": 1724226414, + "chain": 97, + "commit": "2c630a3" +} \ No newline at end of file diff --git a/broadcast/05_DeploySampleBinDynamicFeeHook.s.sol/97/run-1724225764.json b/broadcast/05_DeploySampleBinDynamicFeeHook.s.sol/97/run-1724225764.json new file mode 100644 index 0000000..3182ee3 --- /dev/null +++ b/broadcast/05_DeploySampleBinDynamicFeeHook.s.sol/97/run-1724225764.json @@ -0,0 +1,48 @@ +{ + "transactions": [ + { + "hash": "0xff382c9df73fdc3b26434092d3805a55d23a4c1034edf5b682d17f52bcad9419", + "transactionType": "CREATE", + "contractName": "SampleBinDynamicFeeHook", + "contractAddress": "0x0e647d71d3b5dfcd2ad5d77c36723ef646784664", + "function": null, + "arguments": [ + "0xc51DE4C65d6e3fb612050E383495e9457840d2c9" + ], + "transaction": { + "from": "0xbf0135be6a39257c659fd1955324dc3cdb342f29", + "gas": "0xd8ea1", + "value": "0x0", + "input": "0x60c080604052346100e557602081610c19803803809161001f82856100fc565b8339810103126100e557516001600160a01b038116908181036100e55760805260405163fbfa77cf60e01b815290602090829060049082905afa9081156100f1575f916100ab575b5060a052610bb866ffffffffffffff195f5416175f55604051610ae5908161013482396080518181816102ac01526109ca015260a05181818160e9015261032d0152f35b90506020813d6020116100e9575b816100c6602093836100fc565b810103126100e557516001600160a01b03811681036100e5575f610067565b5f80fd5b3d91506100b9565b6040513d5f823e3d90fd5b601f909101601f19168101906001600160401b0382119082101761011f57604052565b634e487b7160e01b5f52604160045260245ffdfe60806040526004361015610011575f80fd5b5f803560e01c8063081e1a8c1461053e57806309250782146106045780634b6a682d146105395780635177cb2f146105615780635250df391461053e5780635304d44e146105395780635e927caa146104ce5780636514d01f146103fb578063683f7784146103c35780636eceef08146103b5578063ab6291fe146102f2578063ae92a8e8146102d0578063dc4c90d31461028d578063f32b0da0146101d5578063f961d1f4146101105763fbfa77cf146100ca575f80fd5b3461010d578060031936011261010d5760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b80fd5b346101d1575f3660031901126101d1576040516101c0810181811067ffffffffffffffff8211176101a4575f916101a09160405282815260016020820152600160408201528260608201528260808201528260a0820152600160c08201528260e082015282610100820152826101208201528261014082015282610160820152826101808201520152602060405160468152f35b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f80fd5b346101d157366003190160e081126101d15760c0136101d1576040516101fa81610887565b6004356001600160a01b03811681036101d15781526024356001600160a01b03811681036101d15760208201526044356001600160a01b03811681036101d15760408201526064356001600160a01b03811681036101d157606082015260843562ffffff811681036101d157608082015260a43560a082015260c43562ffffff811681036101d15761028b916109c0565b005b346101d1575f3660031901126101d15760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b346101d1576102de36610826565b5050505050630a85dc2960e01b5f5260045ffd5b346101d15760203660031901126101d15760043567ffffffffffffffff81116101d157610323903690600401610681565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016330361038d57610361604091602093610928565b815192839181835280519182918282860152018484015e5f828201840152601f01601f19168101030190f35b7f62df0545000000000000000000000000000000000000000000000000000000005f5260045ffd5b346101d1576102de3661072c565b346101d1575f3660031901126101d1575f5466ff00000000000060ff8260301c161560301b169066ff0000000000001916175f555f80f35b346101d15761040936610826565b505050905062ffffff5f541660c0823603126101d15760405161042b81610887565b6104348361066d565b81526104426020840161066d565b602082015260408301356001600160a01b03811681036101d157604082015260608301356001600160a01b03811681036101d1576060820152608083013562ffffff811681036101d1576104a49360a0916080840152013560a08201526109c0565b60206040517fae92a8e8000000000000000000000000000000000000000000000000000000008152f35b346101d1576101603660031901126101d1576104e8610657565b5060c03660231901126101d1576104fd610806565b50610506610815565b506101443567ffffffffffffffff81116101d157610528903690600401610681565b5050630a85dc2960e01b5f5260045ffd5b6107a1565b346101d15761054c366106af565b505050505050630a85dc2960e01b5f5260045ffd5b346101d1576101403660031901126101d15761057b610657565b5060c03660231901126101d157610590610806565b50610599610815565b506101243567ffffffffffffffff81116101d1576105bb903690600401610681565b5050606062ffffff6105cb6108f5565b907fffffffff00000000000000000000000000000000000000000000000000000000604094939451941684526020840152166040820152f35b346101d1576106123661072c565b5050505050604062ffffff6106256108c5565b7fffffffff00000000000000000000000000000000000000000000000000000000849392935193168352166020820152f35b600435906001600160a01b03821682036101d157565b35906001600160a01b03821682036101d157565b9181601f840112156101d15782359167ffffffffffffffff83116101d157602083818601950101116101d157565b6101406003198201126101d1576004356001600160a01b03811681036101d1579160c06023198301126101d15760249160e43567ffffffffffffffff81116101d157606081830360031901126101d157600401916101043591610124359067ffffffffffffffff82116101d15761072891600401610681565b9091565b906101206003198301126101d1576004356001600160a01b03811681036101d1579160c06023198201126101d15760249160e43567ffffffffffffffff81116101d157606081840360031901126101d15760040191610104359067ffffffffffffffff82116101d15761072891600401610681565b346101d1576101403660031901126101d1576004356001600160a01b03811681036101d1575060c03660231901126101d1576101243567ffffffffffffffff81116101d1576107f4903690600401610681565b905050630a85dc2960e01b5f5260045ffd5b60e4359081151582036101d157565b610104359081600f0b82036101d157565b906101206003198301126101d1576004356001600160a01b03811681036101d1579160c06023198201126101d15760249160e43562ffffff811681036101d15791610104359067ffffffffffffffff82116101d15761072891600401610681565b60c0810190811067ffffffffffffffff8211176101a457604052565b90601f8019910116810190811067ffffffffffffffff8211176101a457604052565b5f5460ff8160301c166108e0575063049283c160e11b905f90565b906240000063049283c160e11b9260181c1690565b5f5460ff8160301c166109125750635177cb2f60e01b905f905f90565b635177cb2f60e01b91624000005f9260181c1690565b5f9182918160405192839283378101838152039082305af1903d156109b8573d9167ffffffffffffffff83116101a45760405192610970601f8201601f1916602001856108a3565b83523d5f602085013e5b6109b6575080511561098e57602081519101fd5b7fa40afa38000000000000000000000000000000000000000000000000000000005f5260045ffd5b565b60609161097a565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690813b156101d15760e460a0915f809462ffffff60405197889687957fad4cc2d30000000000000000000000000000000000000000000000000000000087526001600160a01b0381511660048801526001600160a01b0360208201511660248801526001600160a01b0360408201511660448801526001600160a01b036060820151166064880152836080820151166084880152015160a48601521660c48401525af18015610aa457610a9a5750565b5f6109b6916108a3565b6040513d5f823e3d90fdfea26469706673582212202406f8e3e87050ac6718961164a24c366bde6430c4c23c97e2772c4f7c0b064364736f6c634300081a0033000000000000000000000000c51de4c65d6e3fb612050e383495e9457840d2c9", + "nonce": "0x18", + "chainId": "0x61" + }, + "additionalContracts": [], + "isFixedGasLimit": false + } + ], + "receipts": [ + { + "status": "0x1", + "cumulativeGasUsed": "0xa6db7", + "logs": [], + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "type": "0x0", + "transactionHash": "0xff382c9df73fdc3b26434092d3805a55d23a4c1034edf5b682d17f52bcad9419", + "transactionIndex": "0x0", + "blockHash": "0x6594c800197d4790ac26b2c4eaae5ee73e9ed7fd76a994a07ed7d4326f9aa63c", + "blockNumber": "0x292b2a0", + "gasUsed": "0xa6db7", + "effectiveGasPrice": "0x12d00e280", + "from": "0xbf0135be6a39257c659fd1955324dc3cdb342f29", + "to": null, + "contractAddress": "0x0e647d71d3b5dfcd2ad5d77c36723ef646784664" + } + ], + "libraries": [], + "pending": [], + "returns": {}, + "timestamp": 1724225764, + "chain": 97, + "commit": "2c630a3" +} \ No newline at end of file diff --git a/broadcast/05_DeploySampleBinDynamicFeeHook.s.sol/97/run-latest.json b/broadcast/05_DeploySampleBinDynamicFeeHook.s.sol/97/run-latest.json new file mode 100644 index 0000000..3182ee3 --- /dev/null +++ b/broadcast/05_DeploySampleBinDynamicFeeHook.s.sol/97/run-latest.json @@ -0,0 +1,48 @@ +{ + "transactions": [ + { + "hash": "0xff382c9df73fdc3b26434092d3805a55d23a4c1034edf5b682d17f52bcad9419", + "transactionType": "CREATE", + "contractName": "SampleBinDynamicFeeHook", + "contractAddress": "0x0e647d71d3b5dfcd2ad5d77c36723ef646784664", + "function": null, + "arguments": [ + "0xc51DE4C65d6e3fb612050E383495e9457840d2c9" + ], + "transaction": { + "from": "0xbf0135be6a39257c659fd1955324dc3cdb342f29", + "gas": "0xd8ea1", + "value": "0x0", + "input": "0x60c080604052346100e557602081610c19803803809161001f82856100fc565b8339810103126100e557516001600160a01b038116908181036100e55760805260405163fbfa77cf60e01b815290602090829060049082905afa9081156100f1575f916100ab575b5060a052610bb866ffffffffffffff195f5416175f55604051610ae5908161013482396080518181816102ac01526109ca015260a05181818160e9015261032d0152f35b90506020813d6020116100e9575b816100c6602093836100fc565b810103126100e557516001600160a01b03811681036100e5575f610067565b5f80fd5b3d91506100b9565b6040513d5f823e3d90fd5b601f909101601f19168101906001600160401b0382119082101761011f57604052565b634e487b7160e01b5f52604160045260245ffdfe60806040526004361015610011575f80fd5b5f803560e01c8063081e1a8c1461053e57806309250782146106045780634b6a682d146105395780635177cb2f146105615780635250df391461053e5780635304d44e146105395780635e927caa146104ce5780636514d01f146103fb578063683f7784146103c35780636eceef08146103b5578063ab6291fe146102f2578063ae92a8e8146102d0578063dc4c90d31461028d578063f32b0da0146101d5578063f961d1f4146101105763fbfa77cf146100ca575f80fd5b3461010d578060031936011261010d5760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b80fd5b346101d1575f3660031901126101d1576040516101c0810181811067ffffffffffffffff8211176101a4575f916101a09160405282815260016020820152600160408201528260608201528260808201528260a0820152600160c08201528260e082015282610100820152826101208201528261014082015282610160820152826101808201520152602060405160468152f35b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f80fd5b346101d157366003190160e081126101d15760c0136101d1576040516101fa81610887565b6004356001600160a01b03811681036101d15781526024356001600160a01b03811681036101d15760208201526044356001600160a01b03811681036101d15760408201526064356001600160a01b03811681036101d157606082015260843562ffffff811681036101d157608082015260a43560a082015260c43562ffffff811681036101d15761028b916109c0565b005b346101d1575f3660031901126101d15760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b346101d1576102de36610826565b5050505050630a85dc2960e01b5f5260045ffd5b346101d15760203660031901126101d15760043567ffffffffffffffff81116101d157610323903690600401610681565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016330361038d57610361604091602093610928565b815192839181835280519182918282860152018484015e5f828201840152601f01601f19168101030190f35b7f62df0545000000000000000000000000000000000000000000000000000000005f5260045ffd5b346101d1576102de3661072c565b346101d1575f3660031901126101d1575f5466ff00000000000060ff8260301c161560301b169066ff0000000000001916175f555f80f35b346101d15761040936610826565b505050905062ffffff5f541660c0823603126101d15760405161042b81610887565b6104348361066d565b81526104426020840161066d565b602082015260408301356001600160a01b03811681036101d157604082015260608301356001600160a01b03811681036101d1576060820152608083013562ffffff811681036101d1576104a49360a0916080840152013560a08201526109c0565b60206040517fae92a8e8000000000000000000000000000000000000000000000000000000008152f35b346101d1576101603660031901126101d1576104e8610657565b5060c03660231901126101d1576104fd610806565b50610506610815565b506101443567ffffffffffffffff81116101d157610528903690600401610681565b5050630a85dc2960e01b5f5260045ffd5b6107a1565b346101d15761054c366106af565b505050505050630a85dc2960e01b5f5260045ffd5b346101d1576101403660031901126101d15761057b610657565b5060c03660231901126101d157610590610806565b50610599610815565b506101243567ffffffffffffffff81116101d1576105bb903690600401610681565b5050606062ffffff6105cb6108f5565b907fffffffff00000000000000000000000000000000000000000000000000000000604094939451941684526020840152166040820152f35b346101d1576106123661072c565b5050505050604062ffffff6106256108c5565b7fffffffff00000000000000000000000000000000000000000000000000000000849392935193168352166020820152f35b600435906001600160a01b03821682036101d157565b35906001600160a01b03821682036101d157565b9181601f840112156101d15782359167ffffffffffffffff83116101d157602083818601950101116101d157565b6101406003198201126101d1576004356001600160a01b03811681036101d1579160c06023198301126101d15760249160e43567ffffffffffffffff81116101d157606081830360031901126101d157600401916101043591610124359067ffffffffffffffff82116101d15761072891600401610681565b9091565b906101206003198301126101d1576004356001600160a01b03811681036101d1579160c06023198201126101d15760249160e43567ffffffffffffffff81116101d157606081840360031901126101d15760040191610104359067ffffffffffffffff82116101d15761072891600401610681565b346101d1576101403660031901126101d1576004356001600160a01b03811681036101d1575060c03660231901126101d1576101243567ffffffffffffffff81116101d1576107f4903690600401610681565b905050630a85dc2960e01b5f5260045ffd5b60e4359081151582036101d157565b610104359081600f0b82036101d157565b906101206003198301126101d1576004356001600160a01b03811681036101d1579160c06023198201126101d15760249160e43562ffffff811681036101d15791610104359067ffffffffffffffff82116101d15761072891600401610681565b60c0810190811067ffffffffffffffff8211176101a457604052565b90601f8019910116810190811067ffffffffffffffff8211176101a457604052565b5f5460ff8160301c166108e0575063049283c160e11b905f90565b906240000063049283c160e11b9260181c1690565b5f5460ff8160301c166109125750635177cb2f60e01b905f905f90565b635177cb2f60e01b91624000005f9260181c1690565b5f9182918160405192839283378101838152039082305af1903d156109b8573d9167ffffffffffffffff83116101a45760405192610970601f8201601f1916602001856108a3565b83523d5f602085013e5b6109b6575080511561098e57602081519101fd5b7fa40afa38000000000000000000000000000000000000000000000000000000005f5260045ffd5b565b60609161097a565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690813b156101d15760e460a0915f809462ffffff60405197889687957fad4cc2d30000000000000000000000000000000000000000000000000000000087526001600160a01b0381511660048801526001600160a01b0360208201511660248801526001600160a01b0360408201511660448801526001600160a01b036060820151166064880152836080820151166084880152015160a48601521660c48401525af18015610aa457610a9a5750565b5f6109b6916108a3565b6040513d5f823e3d90fdfea26469706673582212202406f8e3e87050ac6718961164a24c366bde6430c4c23c97e2772c4f7c0b064364736f6c634300081a0033000000000000000000000000c51de4c65d6e3fb612050e383495e9457840d2c9", + "nonce": "0x18", + "chainId": "0x61" + }, + "additionalContracts": [], + "isFixedGasLimit": false + } + ], + "receipts": [ + { + "status": "0x1", + "cumulativeGasUsed": "0xa6db7", + "logs": [], + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "type": "0x0", + "transactionHash": "0xff382c9df73fdc3b26434092d3805a55d23a4c1034edf5b682d17f52bcad9419", + "transactionIndex": "0x0", + "blockHash": "0x6594c800197d4790ac26b2c4eaae5ee73e9ed7fd76a994a07ed7d4326f9aa63c", + "blockNumber": "0x292b2a0", + "gasUsed": "0xa6db7", + "effectiveGasPrice": "0x12d00e280", + "from": "0xbf0135be6a39257c659fd1955324dc3cdb342f29", + "to": null, + "contractAddress": "0x0e647d71d3b5dfcd2ad5d77c36723ef646784664" + } + ], + "libraries": [], + "pending": [], + "returns": {}, + "timestamp": 1724225764, + "chain": 97, + "commit": "2c630a3" +} \ No newline at end of file diff --git a/script/03_DeployBinVeCakeExclusiveHook.s.sol b/script/03_DeployBinVeCakeExclusiveHook.s copy.sol similarity index 100% rename from script/03_DeployBinVeCakeExclusiveHook.s.sol rename to script/03_DeployBinVeCakeExclusiveHook.s copy.sol diff --git a/script/04_DeploySampleCLDynamicFeeHook.s.sol b/script/04_DeploySampleCLDynamicFeeHook.s.sol new file mode 100644 index 0000000..11a968f --- /dev/null +++ b/script/04_DeploySampleCLDynamicFeeHook.s.sol @@ -0,0 +1,30 @@ +// SPDX-License-Identifier: UNLICENSED +pragma solidity ^0.8.24; + +import "forge-std/Script.sol"; +import {BaseScript} from "./BaseScript.sol"; + +import {SampleCLDynamicFeeHook} from "../src/pool-cl/dynamic-fee/SampleCLDynamicFeeHook.sol"; +import {ICLPoolManager} from "pancake-v4-core/src/pool-cl/interfaces/ICLPoolManager.sol"; + +/** + * forge script script/04_DeploySampleCLDynamicFeeHook.s.sol:DeploySampleCLDynamicFeeHookScript -vvv \ + * --rpc-url $RPC_URL \ + * --broadcast \ + * --slow \ + * --verify + */ +contract DeploySampleCLDynamicFeeHookScript is BaseScript { + function run() public { + uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY"); + vm.startBroadcast(deployerPrivateKey); + + address clPoolManager = getAddressFromConfig("clPoolManager"); + emit log_named_address("CLPoolManager", clPoolManager); + + SampleCLDynamicFeeHook hookAddr = new SampleCLDynamicFeeHook(ICLPoolManager(clPoolManager)); + emit log_named_address("SampleCLDynamicFeeHook", address(hookAddr)); + + vm.stopBroadcast(); + } +} diff --git a/script/05_DeploySampleBinDynamicFeeHook.s.sol b/script/05_DeploySampleBinDynamicFeeHook.s.sol new file mode 100644 index 0000000..454ac97 --- /dev/null +++ b/script/05_DeploySampleBinDynamicFeeHook.s.sol @@ -0,0 +1,30 @@ +// SPDX-License-Identifier: UNLICENSED +pragma solidity ^0.8.24; + +import "forge-std/Script.sol"; +import {BaseScript} from "./BaseScript.sol"; + +import {SampleBinDynamicFeeHook} from "../src/pool-bin/dynamic-fee/SampleBinDynamicFeeHook.sol"; +import {IBinPoolManager} from "pancake-v4-core/src/pool-bin/interfaces/IBinPoolManager.sol"; + +/** + * forge script script/05_DeploySampleBinDynamicFeeHook.s.sol:DeploySampleBinDynamicFeeHookScript -vvv \ + * --rpc-url $RPC_URL \ + * --broadcast \ + * --slow \ + * --verify + */ +contract DeploySampleBinDynamicFeeHookScript is BaseScript { + function run() public { + uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY"); + vm.startBroadcast(deployerPrivateKey); + + address binPoolManager = getAddressFromConfig("binPoolManager"); + emit log_named_address("BinPoolManager", binPoolManager); + + SampleBinDynamicFeeHook feeHook = new SampleBinDynamicFeeHook(IBinPoolManager(binPoolManager)); + emit log_named_address("SampleBinDynamicFeeHook", address(feeHook)); + + vm.stopBroadcast(); + } +} diff --git a/src/pool-bin/dynamic-fee/SampleBinDynamicFeeHook.sol b/src/pool-bin/dynamic-fee/SampleBinDynamicFeeHook.sol new file mode 100644 index 0000000..e5fbeff --- /dev/null +++ b/src/pool-bin/dynamic-fee/SampleBinDynamicFeeHook.sol @@ -0,0 +1,91 @@ +pragma solidity ^0.8.19; + +import "pancake-v4-core/src/pool-cl/interfaces/ICLHooks.sol"; +import {PoolKey} from "pancake-v4-core/src/types/PoolKey.sol"; +import {PoolId, PoolIdLibrary} from "pancake-v4-core/src/types/PoolId.sol"; +import {Currency} from "pancake-v4-core/src/types/Currency.sol"; +import {IBinPoolManager} from "pancake-v4-core/src/pool-bin/interfaces/IBinPoolManager.sol"; +import {BinPoolManager} from "pancake-v4-core/src/pool-bin/BinPoolManager.sol"; +import {LPFeeLibrary} from "pancake-v4-core/src/libraries/LPFeeLibrary.sol"; +import {BeforeSwapDelta, BeforeSwapDeltaLibrary} from "pancake-v4-core/src/types/BeforeSwapDelta.sol"; +import {BinBaseHook} from "../BinBaseHook.sol"; + +contract SampleBinDynamicFeeHook is BinBaseHook { + using PoolIdLibrary for PoolKey; + + uint24 DEFAULT_LP_FEE = 3000; + uint24 FREE_LP_FEE = 0; + + bool enableLPFeeOverride = false; + + constructor(IBinPoolManager poolManager) BinBaseHook(poolManager) {} + + function toggleLPFeeOverride() external { + enableLPFeeOverride = !enableLPFeeOverride; + } + + function setDynamicLpFee(PoolKey memory key, uint24 fee) public { + poolManager.updateDynamicLPFee(key, fee); + } + + function getHooksRegistrationBitmap() external pure override returns (uint16) { + return _hooksRegistrationBitmapFrom( + Permissions({ + beforeInitialize: false, + afterInitialize: true, + beforeMint: true, + afterMint: false, + beforeBurn: false, + afterBurn: false, + beforeSwap: true, + afterSwap: false, + beforeDonate: false, + afterDonate: false, + beforeSwapReturnDelta: false, + afterSwapReturnDelta: false, + afterMintReturnDelta: false, + afterBurnReturnDelta: false + }) + ); + } + + function afterInitialize(address, PoolKey calldata key, uint24, bytes calldata) + external + override + returns (bytes4) + { + setDynamicLpFee(key, DEFAULT_LP_FEE); + return this.beforeInitialize.selector; + } + + function beforeMint(address, PoolKey calldata, IBinPoolManager.MintParams calldata, bytes calldata) + external + override + returns (bytes4, uint24) + { + // if enableLPFeeOverride, the lp fee for the ongoing inner swap will be 0 + if (enableLPFeeOverride) { + return (this.beforeMint.selector, LPFeeLibrary.OVERRIDE_FEE_FLAG & FREE_LP_FEE); + } + + // otherwise, the lp fee will just be the default value + return (this.beforeMint.selector, 0); + } + + function beforeSwap(address, PoolKey calldata, bool, int128, bytes calldata) + external + override + returns (bytes4, BeforeSwapDelta, uint24) + { + // if enableLPFeeOverride, the lp fee for the ongoing swap will be 0 + if (enableLPFeeOverride) { + return ( + this.beforeSwap.selector, + BeforeSwapDeltaLibrary.ZERO_DELTA, + LPFeeLibrary.OVERRIDE_FEE_FLAG & FREE_LP_FEE + ); + } + + return (this.beforeSwap.selector, BeforeSwapDeltaLibrary.ZERO_DELTA, 0); + } +} diff --git a/src/pool-cl/dynamic-fee/SampleCLDynamicFeeHook.sol b/src/pool-cl/dynamic-fee/SampleCLDynamicFeeHook.sol new file mode 100644 index 0000000..40d914f --- /dev/null +++ b/src/pool-cl/dynamic-fee/SampleCLDynamicFeeHook.sol @@ -0,0 +1,80 @@ +pragma solidity ^0.8.19; + +import "pancake-v4-core/src/pool-cl/interfaces/ICLHooks.sol"; +import {PoolKey} from "pancake-v4-core/src/types/PoolKey.sol"; +import {PoolId, PoolIdLibrary} from "pancake-v4-core/src/types/PoolId.sol"; +import {Currency} from "pancake-v4-core/src/types/Currency.sol"; +import {ICLPoolManager} from "pancake-v4-core/src/pool-cl/interfaces/ICLPoolManager.sol"; +import {CLPoolManager} from "pancake-v4-core/src/pool-cl/CLPoolManager.sol"; +import {LPFeeLibrary} from "pancake-v4-core/src/libraries/LPFeeLibrary.sol"; +import {BeforeSwapDelta, BeforeSwapDeltaLibrary} from "pancake-v4-core/src/types/BeforeSwapDelta.sol"; +import {CLBaseHook} from "../CLBaseHook.sol"; + +contract SampleCLDynamicFeeHook is CLBaseHook { + using PoolIdLibrary for PoolKey; + + uint24 DEFAULT_LP_FEE = 3000; + uint24 FREE_LP_FEE = 0; + + bool enableLPFeeOverride = false; + + constructor(ICLPoolManager poolManager) CLBaseHook(poolManager) {} + + function toggleLPFeeOverride() external { + enableLPFeeOverride = !enableLPFeeOverride; + } + + function setDynamicLpFee(PoolKey memory key, uint24 fee) public { + poolManager.updateDynamicLPFee(key, fee); + } + + function getHooksRegistrationBitmap() external pure override returns (uint16) { + return _hooksRegistrationBitmapFrom( + Permissions({ + beforeInitialize: false, + afterInitialize: true, + beforeAddLiquidity: false, + afterAddLiquidity: false, + beforeRemoveLiquidity: false, + afterRemoveLiquidity: false, + beforeSwap: true, + afterSwap: false, + beforeDonate: false, + afterDonate: false, + beforeSwapReturnsDelta: false, + afterSwapReturnsDelta: false, + afterAddLiquidiyReturnsDelta: false, + afterRemoveLiquidiyReturnsDelta: false + }) + ); + } + + function afterInitialize( + address sender, + PoolKey calldata key, + uint160 sqrtPriceX96, + int24 tick, + bytes calldata hookData + ) external override returns (bytes4) { + setDynamicLpFee(key, DEFAULT_LP_FEE); + return this.beforeInitialize.selector; + } + + function beforeSwap( + address sender, + PoolKey calldata key, + ICLPoolManager.SwapParams calldata params, + bytes calldata hookData + ) external override returns (bytes4, BeforeSwapDelta, uint24) { + // if enableLPFeeOverride, the lp fee for the ongoing swap will be 0 + if (enableLPFeeOverride) { + return ( + this.beforeSwap.selector, + BeforeSwapDeltaLibrary.ZERO_DELTA, + LPFeeLibrary.OVERRIDE_FEE_FLAG & FREE_LP_FEE + ); + } + + return (this.beforeSwap.selector, BeforeSwapDeltaLibrary.ZERO_DELTA, 0); + } +}