Skip to content

Commit

Permalink
feat: add sample dynamicFee hook
Browse files Browse the repository at this point in the history
  • Loading branch information
chefburger committed Aug 21, 2024
1 parent 2c630a3 commit 2dae20c
Show file tree
Hide file tree
Showing 9 changed files with 423 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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"
}
48 changes: 48 additions & 0 deletions broadcast/04_DeploySampleCLDynamicFeeHook.s.sol/97/run-latest.json
Original file line number Diff line number Diff line change
@@ -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"
}
Loading

0 comments on commit 2dae20c

Please sign in to comment.