diff --git a/broadcast/DeployArbitrage.s.sol/84532/run-1737660458.json b/broadcast/DeployArbitrage.s.sol/84532/run-1737660458.json new file mode 100644 index 0000000..4abf925 --- /dev/null +++ b/broadcast/DeployArbitrage.s.sol/84532/run-1737660458.json @@ -0,0 +1,57 @@ +{ + "transactions": [ + { + "hash": "0x268e19ea340eb00a768a98f4286fb09ed7aa1307c053a19d00f73667805f27e4", + "transactionType": "CREATE", + "contractName": "Arbitrage", + "contractAddress": "0xce94b1e3e08a64a6cd0bafbfc09091b3378dba19", + "function": null, + "arguments": null, + "transaction": { + "from": "0x12b2434a1022d5787bf06056f2885fe35de62bf8", + "gas": "0x115141", + "value": "0x0", + "input": "0x608060405234801561001057600080fd5b50600080546001600160a01b03191633179055610e6d806100326000396000f3fe60806040526004361061003f5760003560e01c80638da5cb5b146100445780639da11c9b14610081578063b4b9c57b146100a2578063f04f2707146100c4575b600080fd5b34801561005057600080fd5b50600054610064906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b61009461008f366004610794565b6100e4565b604051908152602001610078565b3480156100ae57600080fd5b506100c26100bd3660046108e3565b610260565b005b3480156100d057600080fd5b506100c26100df366004610a2c565b6103c2565b60405163095ea7b360e01b81526001600160a01b038781166004830152602482018690526000919087169063095ea7b3906044016020604051808303816000875af1158015610137573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061015b9190610b37565b5060408051610100810182526001600160a01b0388811682528681166020830190815262ffffff8681168486019081523060608601908152426080870190815260a087018d815260c088018c8152600060e08a01908152995163414bf38960e01b815289518916600482015296518816602488015293519094166044860152905185166064850152516084840152905160a48301525160c48201529251811660e484015290919089169063414bf3899034906101040160206040518083038185885af115801561022f573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906102549190610b60565b98975050505050505050565b600060405180606001604052808681526020018581526020018462ffffff168152506040516020016102929190610bbd565b60408051601f19818403018152600180845283830190925292506000919060208083019080368337019050509050846000815181106102d3576102d3610c12565b6020026020010151816000815181106102ee576102ee610c12565b6001600160a01b039290921660209283029190910190910152604080516001808252818301909252600091816020016020820280368337019050509050838160008151811061033f5761033f610c12565b6020908102919091010152604051632e1c224f60e11b815273ba12222222228d8ba445958a75a0704d566bf2c890635c38449e90610387903090869086908990600401610c6e565b600060405180830381600087803b1580156103a157600080fd5b505af11580156103b5573d6000803e3d6000fd5b5050505050505050505050565b3373ba12222222228d8ba445958a75a0704d566bf2c8146103e257600080fd5b6000818060200190518101906103f89190610d79565b905060008460008151811061040f5761040f610c12565b60200260200101519050610486826000015160008151811061043357610433610c12565b6020026020010151836020015160008151811061045257610452610c12565b602002602001015183856020015160018151811061047257610472610c12565b6020026020010151600087604001516100e4565b5061057d82600001516001815181106104a1576104a1610c12565b602002602001015183602001516001815181106104c0576104c0610c12565b602002602001015184602001516001815181106104df576104df610c12565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa15801561052f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105539190610b60565b856020015160008151811061056a5761056a610c12565b60200260200101518587604001516100e4565b50816020015160008151811061059557610595610c12565b602090810291909101015160405163a9059cbb60e01b815273ba12222222228d8ba445958a75a0704d566bf2c86004820152602481018390526001600160a01b039091169063a9059cbb906044016020604051808303816000875af1158015610602573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106269190610b37565b50816020015160008151811061063e5761063e610c12565b60200260200101516001600160a01b031663a9059cbb60008054906101000a90046001600160a01b0316846020015160008151811061067f5761067f610c12565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa1580156106cf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106f39190610b60565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af115801561073e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107629190610b37565b50505050505050565b6001600160a01b038116811461078057600080fd5b50565b62ffffff8116811461078057600080fd5b60008060008060008060c087890312156107ad57600080fd5b86356107b88161076b565b955060208701356107c88161076b565b94506040870135935060608701356107df8161076b565b92506080870135915060a08701356107f681610783565b809150509295509295509295565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561084357610843610804565b604052919050565b600067ffffffffffffffff82111561086557610865610804565b5060051b60200190565b600082601f83011261088057600080fd5b813560206108956108908361084b565b61081a565b82815260059290921b840181019181810190868411156108b457600080fd5b8286015b848110156108d85780356108cb8161076b565b83529183019183016108b8565b509695505050505050565b600080600080608085870312156108f957600080fd5b843567ffffffffffffffff8082111561091157600080fd5b61091d8883890161086f565b9550602087013591508082111561093357600080fd5b506109408782880161086f565b935050604085013561095181610783565b9396929550929360600135925050565b600082601f83011261097257600080fd5b813560206109826108908361084b565b82815260059290921b840181019181810190868411156109a157600080fd5b8286015b848110156108d857803583529183019183016109a5565b600082601f8301126109cd57600080fd5b813567ffffffffffffffff8111156109e7576109e7610804565b6109fa601f8201601f191660200161081a565b818152846020838601011115610a0f57600080fd5b816020850160208301376000918101602001919091529392505050565b60008060008060808587031215610a4257600080fd5b843567ffffffffffffffff80821115610a5a57600080fd5b818701915087601f830112610a6e57600080fd5b81356020610a7e6108908361084b565b82815260059290921b8401810191818101908b841115610a9d57600080fd5b948201945b83861015610ac4578535610ab58161076b565b82529482019490820190610aa2565b98505088013592505080821115610ada57600080fd5b610ae688838901610961565b94506040870135915080821115610afc57600080fd5b610b0888838901610961565b93506060870135915080821115610b1e57600080fd5b50610b2b878288016109bc565b91505092959194509250565b600060208284031215610b4957600080fd5b81518015158114610b5957600080fd5b9392505050565b600060208284031215610b7257600080fd5b5051919050565b600081518084526020808501945080840160005b83811015610bb25781516001600160a01b031687529582019590820190600101610b8d565b509495945050505050565b602081526000825160606020840152610bd96080840182610b79565b90506020840151601f19848303016040850152610bf68282610b79565b91505062ffffff60408501511660608401528091505092915050565b634e487b7160e01b600052603260045260246000fd5b6000815180845260005b81811015610c4e57602081850181015186830182015201610c32565b506000602082860101526020601f19601f83011685010191505092915050565b6001600160a01b0385811682526080602080840182905286519184018290526000928782019290919060a0860190855b81811015610cbc578551851683529483019491830191600101610c9e565b5050858103604087015287518082529082019350915080870160005b83811015610cf457815185529382019390820190600101610cd8565b505050508281036060840152610d0a8185610c28565b979650505050505050565b600082601f830112610d2657600080fd5b81516020610d366108908361084b565b82815260059290921b84018101918181019086841115610d5557600080fd5b8286015b848110156108d8578051610d6c8161076b565b8352918301918301610d59565b600060208284031215610d8b57600080fd5b815167ffffffffffffffff80821115610da357600080fd5b9083019060608286031215610db757600080fd5b604051606081018181108382111715610dd257610dd2610804565b604052825182811115610de457600080fd5b610df087828601610d15565b825250602083015182811115610e0557600080fd5b610e1187828601610d15565b60208301525060408301519250610e2783610783565b604081019290925250939250505056fea2646970667358221220de0ec4125f8e141e6af2a24b3985ce866178d26fa3e40210010e364cfdf58f1a64736f6c63430008120033", + "nonce": "0x1cc", + "chainId": "0x14a34" + }, + "additionalContracts": [], + "isFixedGasLimit": false + } + ], + "receipts": [ + { + "status": "0x1", + "cumulativeGasUsed": "0x43c042", + "logs": [], + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "type": "0x2", + "transactionHash": "0x268e19ea340eb00a768a98f4286fb09ed7aa1307c053a19d00f73667805f27e4", + "transactionIndex": "0x18", + "blockHash": "0x761a911fe4a430cbe7f466f53e5a0697f3806a9dba8ef3c5e5a3828c7f3d10fe", + "blockNumber": "0x13f9ca5", + "gasUsed": "0xd5232", + "effectiveGasPrice": "0x62b89e", + "from": "0x12b2434a1022d5787bf06056f2885fe35de62bf8", + "to": null, + "contractAddress": "0xce94b1e3e08a64a6cd0bafbfc09091b3378dba19", + "l1BaseFeeScalar": "0x44d", + "l1BlobBaseFee": "0x3f5694c1f", + "l1BlobBaseFeeScalar": "0xa118b", + "l1Fee": "0x160c65c48318", + "l1GasPrice": "0x256ded344", + "l1GasUsed": "0x84f4" + } + ], + "libraries": [], + "pending": [], + "returns": { + "0": { + "internal_type": "contract Arbitrage", + "value": "0xCE94B1E3e08A64A6Cd0BAfbFc09091B3378dBa19" + } + }, + "timestamp": 1737660458, + "chain": 84532, + "commit": "523a596" +} \ No newline at end of file diff --git a/broadcast/DeployArbitrage.s.sol/84532/run-1737661165.json b/broadcast/DeployArbitrage.s.sol/84532/run-1737661165.json new file mode 100644 index 0000000..1c84ca9 --- /dev/null +++ b/broadcast/DeployArbitrage.s.sol/84532/run-1737661165.json @@ -0,0 +1,57 @@ +{ + "transactions": [ + { + "hash": "0x76aafbf4f1737ea99b0de4f373bcc84da9422358145caae60d3daf76d3c21e6c", + "transactionType": "CREATE", + "contractName": "Arbitrage", + "contractAddress": "0xb734d543d84a7ea8e6b603ed6c8d12fcd2ba7982", + "function": null, + "arguments": null, + "transaction": { + "from": "0x12b2434a1022d5787bf06056f2885fe35de62bf8", + "gas": "0x115d25", + "value": "0x0", + "input": "0x608060405234801561001057600080fd5b50600080546001600160a01b03191633179055610e78806100326000396000f3fe6080604052600436106100435760003560e01c80638da5cb5b1461004f5780639da11c9b1461008c578063b4b9c57b146100ad578063f04f2707146100cf57600080fd5b3661004a57005b600080fd5b34801561005b57600080fd5b5060005461006f906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b61009f61009a36600461079f565b6100ef565b604051908152602001610083565b3480156100b957600080fd5b506100cd6100c83660046108ee565b61026b565b005b3480156100db57600080fd5b506100cd6100ea366004610a37565b6103cd565b60405163095ea7b360e01b81526001600160a01b038781166004830152602482018690526000919087169063095ea7b3906044016020604051808303816000875af1158015610142573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101669190610b42565b5060408051610100810182526001600160a01b0388811682528681166020830190815262ffffff8681168486019081523060608601908152426080870190815260a087018d815260c088018c8152600060e08a01908152995163414bf38960e01b815289518916600482015296518816602488015293519094166044860152905185166064850152516084840152905160a48301525160c48201529251811660e484015290919089169063414bf3899034906101040160206040518083038185885af115801561023a573d6000803e3d6000fd5b50505050506040513d601f19601f8201168201806040525081019061025f9190610b6b565b98975050505050505050565b600060405180606001604052808681526020018581526020018462ffffff1681525060405160200161029d9190610bc8565b60408051601f19818403018152600180845283830190925292506000919060208083019080368337019050509050846000815181106102de576102de610c1d565b6020026020010151816000815181106102f9576102f9610c1d565b6001600160a01b039290921660209283029190910190910152604080516001808252818301909252600091816020016020820280368337019050509050838160008151811061034a5761034a610c1d565b6020908102919091010152604051632e1c224f60e11b815273ba12222222228d8ba445958a75a0704d566bf2c890635c38449e90610392903090869086908990600401610c79565b600060405180830381600087803b1580156103ac57600080fd5b505af11580156103c0573d6000803e3d6000fd5b5050505050505050505050565b3373ba12222222228d8ba445958a75a0704d566bf2c8146103ed57600080fd5b6000818060200190518101906104039190610d84565b905060008460008151811061041a5761041a610c1d565b60200260200101519050610491826000015160008151811061043e5761043e610c1d565b6020026020010151836020015160008151811061045d5761045d610c1d565b602002602001015183856020015160018151811061047d5761047d610c1d565b6020026020010151600087604001516100ef565b5061058882600001516001815181106104ac576104ac610c1d565b602002602001015183602001516001815181106104cb576104cb610c1d565b602002602001015184602001516001815181106104ea576104ea610c1d565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa15801561053a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061055e9190610b6b565b856020015160008151811061057557610575610c1d565b60200260200101518587604001516100ef565b5081602001516000815181106105a0576105a0610c1d565b602090810291909101015160405163a9059cbb60e01b815273ba12222222228d8ba445958a75a0704d566bf2c86004820152602481018390526001600160a01b039091169063a9059cbb906044016020604051808303816000875af115801561060d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106319190610b42565b50816020015160008151811061064957610649610c1d565b60200260200101516001600160a01b031663a9059cbb60008054906101000a90046001600160a01b0316846020015160008151811061068a5761068a610c1d565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa1580156106da573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106fe9190610b6b565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015610749573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061076d9190610b42565b50505050505050565b6001600160a01b038116811461078b57600080fd5b50565b62ffffff8116811461078b57600080fd5b60008060008060008060c087890312156107b857600080fd5b86356107c381610776565b955060208701356107d381610776565b94506040870135935060608701356107ea81610776565b92506080870135915060a08701356108018161078e565b809150509295509295509295565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561084e5761084e61080f565b604052919050565b600067ffffffffffffffff8211156108705761087061080f565b5060051b60200190565b600082601f83011261088b57600080fd5b813560206108a061089b83610856565b610825565b82815260059290921b840181019181810190868411156108bf57600080fd5b8286015b848110156108e35780356108d681610776565b83529183019183016108c3565b509695505050505050565b6000806000806080858703121561090457600080fd5b843567ffffffffffffffff8082111561091c57600080fd5b6109288883890161087a565b9550602087013591508082111561093e57600080fd5b5061094b8782880161087a565b935050604085013561095c8161078e565b9396929550929360600135925050565b600082601f83011261097d57600080fd5b8135602061098d61089b83610856565b82815260059290921b840181019181810190868411156109ac57600080fd5b8286015b848110156108e357803583529183019183016109b0565b600082601f8301126109d857600080fd5b813567ffffffffffffffff8111156109f2576109f261080f565b610a05601f8201601f1916602001610825565b818152846020838601011115610a1a57600080fd5b816020850160208301376000918101602001919091529392505050565b60008060008060808587031215610a4d57600080fd5b843567ffffffffffffffff80821115610a6557600080fd5b818701915087601f830112610a7957600080fd5b81356020610a8961089b83610856565b82815260059290921b8401810191818101908b841115610aa857600080fd5b948201945b83861015610acf578535610ac081610776565b82529482019490820190610aad565b98505088013592505080821115610ae557600080fd5b610af18883890161096c565b94506040870135915080821115610b0757600080fd5b610b138883890161096c565b93506060870135915080821115610b2957600080fd5b50610b36878288016109c7565b91505092959194509250565b600060208284031215610b5457600080fd5b81518015158114610b6457600080fd5b9392505050565b600060208284031215610b7d57600080fd5b5051919050565b600081518084526020808501945080840160005b83811015610bbd5781516001600160a01b031687529582019590820190600101610b98565b509495945050505050565b602081526000825160606020840152610be46080840182610b84565b90506020840151601f19848303016040850152610c018282610b84565b91505062ffffff60408501511660608401528091505092915050565b634e487b7160e01b600052603260045260246000fd5b6000815180845260005b81811015610c5957602081850181015186830182015201610c3d565b506000602082860101526020601f19601f83011685010191505092915050565b6001600160a01b0385811682526080602080840182905286519184018290526000928782019290919060a0860190855b81811015610cc7578551851683529483019491830191600101610ca9565b5050858103604087015287518082529082019350915080870160005b83811015610cff57815185529382019390820190600101610ce3565b505050508281036060840152610d158185610c33565b979650505050505050565b600082601f830112610d3157600080fd5b81516020610d4161089b83610856565b82815260059290921b84018101918181019086841115610d6057600080fd5b8286015b848110156108e3578051610d7781610776565b8352918301918301610d64565b600060208284031215610d9657600080fd5b815167ffffffffffffffff80821115610dae57600080fd5b9083019060608286031215610dc257600080fd5b604051606081018181108382111715610ddd57610ddd61080f565b604052825182811115610def57600080fd5b610dfb87828601610d20565b825250602083015182811115610e1057600080fd5b610e1c87828601610d20565b60208301525060408301519250610e328361078e565b604081019290925250939250505056fea2646970667358221220e46285241157206e2ef3ca14f7e859a65045cc8a0654a3d3392c82a004f7a7a564736f6c63430008120033", + "nonce": "0x1ce", + "chainId": "0x14a34" + }, + "additionalContracts": [], + "isFixedGasLimit": false + } + ], + "receipts": [ + { + "status": "0x1", + "cumulativeGasUsed": "0x1391440", + "logs": [], + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "type": "0x2", + "transactionHash": "0x76aafbf4f1737ea99b0de4f373bcc84da9422358145caae60d3daf76d3c21e6c", + "transactionIndex": "0x1a", + "blockHash": "0x09766df89e59b19213598c6934f304e39b95dc1cd4876190405417c46167e125", + "blockNumber": "0x13f9e06", + "gasUsed": "0xd5b58", + "effectiveGasPrice": "0x11f8b24", + "from": "0x12b2434a1022d5787bf06056f2885fe35de62bf8", + "to": null, + "contractAddress": "0xb734d543d84a7ea8e6b603ed6c8d12fcd2ba7982", + "l1BaseFeeScalar": "0x44d", + "l1BlobBaseFee": "0x112d00d34d4", + "l1BlobBaseFeeScalar": "0xa118b", + "l1Fee": "0x5dd2e2a6a2e3b", + "l1GasPrice": "0x1bdc65e82", + "l1GasUsed": "0x846e" + } + ], + "libraries": [], + "pending": [], + "returns": { + "0": { + "internal_type": "contract Arbitrage", + "value": "0xB734D543d84a7Ea8E6b603Ed6C8D12fcD2Ba7982" + } + }, + "timestamp": 1737661165, + "chain": 84532, + "commit": "523a596" +} \ No newline at end of file diff --git a/broadcast/DeployArbitrage.s.sol/84532/run-latest.json b/broadcast/DeployArbitrage.s.sol/84532/run-latest.json new file mode 100644 index 0000000..d265ecd --- /dev/null +++ b/broadcast/DeployArbitrage.s.sol/84532/run-latest.json @@ -0,0 +1,59 @@ +{ + "transactions": [ + { + "hash": "0x1e82793b2ab392ef8baa0aef312f2f9bd41aec1704394ad3fcc52044c0366161", + "transactionType": "CREATE", + "contractName": "Arbitrage", + "contractAddress": "0xec42914d61327d6fd38014f4f51b2dec5c35579a", + "function": null, + "arguments": [ + "0xC5290058841028F1614F3A6F0F5816cAd0df5E27" + ], + "transaction": { + "from": "0x12b2434a1022d5787bf06056f2885fe35de62bf8", + "gas": "0x140533", + "value": "0x0", + "input": "0x608060405234801561001057600080fd5b5060405161111438038061111483398101604081905261002f91610062565b60008054336001600160a01b031991821617909155600180549091166001600160a01b0392909216919091179055610092565b60006020828403121561007457600080fd5b81516001600160a01b038116811461008b57600080fd5b9392505050565b611073806100a16000396000f3fe6080604052600436106100595760003560e01c80634db4a352146100655780638da5cb5b146100a25780639da11c9b146100c2578063b4b9c57b146100f0578063e07589c914610112578063f04f27071461013257600080fd5b3661006057005b600080fd5b34801561007157600080fd5b50600154610085906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100ae57600080fd5b50600054610085906001600160a01b031681565b3480156100ce57600080fd5b506100e26100dd3660046108f5565b610152565b604051908152602001610099565b3480156100fc57600080fd5b5061011061010b366004610a44565b6102f7565b005b34801561011e57600080fd5b506100e261012d366004610ac2565b610459565b34801561013e57600080fd5b5061011061014d366004610be0565b610523565b60405163095ea7b360e01b81526001600160a01b038781166004830152602482018690526000919087169063095ea7b3906044016020604051808303816000875af11580156101a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101c99190610ceb565b5060408051610100810182526001600160a01b0380891682528616602082015262ffffff84169181019190915230606082015242608082015260a0810186905260c08101849052600060e0820181905261022588878987610459565b6040805163414bf38960e01b815284516001600160a01b0390811660048301526020860151811660248301529185015162ffffff1660448201526060850151821660648201526080850151608482015260a085015160a482015260c085015160c482015260e0850151821660e48201529192508a169063414bf3899083906101040160206040518083038185885af11580156102c5573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906102ea9190610d14565b9998505050505050505050565b600060405180606001604052808681526020018581526020018462ffffff168152506040516020016103299190610d71565b60408051601f198184030181526001808452838301909252925060009190602080830190803683370190505090508460008151811061036a5761036a610dc6565b60200260200101518160008151811061038557610385610dc6565b6001600160a01b03929092166020928302919091019091015260408051600180825281830190925260009181602001602082028036833701905050905083816000815181106103d6576103d6610dc6565b6020908102919091010152604051632e1c224f60e11b815273ba12222222228d8ba445958a75a0704d566bf2c890635c38449e9061041e903090869086908990600401610e22565b600060405180830381600087803b15801561043857600080fd5b505af115801561044c573d6000803e3d6000fd5b5050505050505050505050565b6040805160a0810182526001600160a01b0386811682528581166020830190815282840186815262ffffff868116606086019081526000608087018181526001549851636352813560e11b81528851881660048201529551871660248701529351604486015290519091166064840152905183166084830152939091169063c6a5026a9060a4016080604051808303816000875af11580156104ff573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102ea9190610ec9565b3373ba12222222228d8ba445958a75a0704d566bf2c81461054357600080fd5b6000818060200190518101906105599190610f7f565b905060008460008151811061057057610570610dc6565b602002602001015190506105e7826000015160008151811061059457610594610dc6565b602002602001015183602001516000815181106105b3576105b3610dc6565b60200260200101518385602001516001815181106105d3576105d3610dc6565b602002602001015160008760400151610152565b506106de826000015160018151811061060257610602610dc6565b6020026020010151836020015160018151811061062157610621610dc6565b6020026020010151846020015160018151811061064057610640610dc6565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015610690573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106b49190610d14565b85602001516000815181106106cb576106cb610dc6565b6020026020010151858760400151610152565b5081602001516000815181106106f6576106f6610dc6565b602090810291909101015160405163a9059cbb60e01b815273ba12222222228d8ba445958a75a0704d566bf2c86004820152602481018390526001600160a01b039091169063a9059cbb906044016020604051808303816000875af1158015610763573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107879190610ceb565b50816020015160008151811061079f5761079f610dc6565b60200260200101516001600160a01b031663a9059cbb60008054906101000a90046001600160a01b031684602001516000815181106107e0576107e0610dc6565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015610830573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108549190610d14565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af115801561089f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108c39190610ceb565b50505050505050565b6001600160a01b03811681146108e157600080fd5b50565b62ffffff811681146108e157600080fd5b60008060008060008060c0878903121561090e57600080fd5b8635610919816108cc565b95506020870135610929816108cc565b9450604087013593506060870135610940816108cc565b92506080870135915060a0870135610957816108e4565b809150509295509295509295565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156109a4576109a4610965565b604052919050565b600067ffffffffffffffff8211156109c6576109c6610965565b5060051b60200190565b600082601f8301126109e157600080fd5b813560206109f66109f1836109ac565b61097b565b82815260059290921b84018101918181019086841115610a1557600080fd5b8286015b84811015610a39578035610a2c816108cc565b8352918301918301610a19565b509695505050505050565b60008060008060808587031215610a5a57600080fd5b843567ffffffffffffffff80821115610a7257600080fd5b610a7e888389016109d0565b95506020870135915080821115610a9457600080fd5b50610aa1878288016109d0565b9350506040850135610ab2816108e4565b9396929550929360600135925050565b60008060008060808587031215610ad857600080fd5b8435610ae3816108cc565b93506020850135610af3816108cc565b9250604085013591506060850135610b0a816108e4565b939692955090935050565b600082601f830112610b2657600080fd5b81356020610b366109f1836109ac565b82815260059290921b84018101918181019086841115610b5557600080fd5b8286015b84811015610a395780358352918301918301610b59565b600082601f830112610b8157600080fd5b813567ffffffffffffffff811115610b9b57610b9b610965565b610bae601f8201601f191660200161097b565b818152846020838601011115610bc357600080fd5b816020850160208301376000918101602001919091529392505050565b60008060008060808587031215610bf657600080fd5b843567ffffffffffffffff80821115610c0e57600080fd5b818701915087601f830112610c2257600080fd5b81356020610c326109f1836109ac565b82815260059290921b8401810191818101908b841115610c5157600080fd5b948201945b83861015610c78578535610c69816108cc565b82529482019490820190610c56565b98505088013592505080821115610c8e57600080fd5b610c9a88838901610b15565b94506040870135915080821115610cb057600080fd5b610cbc88838901610b15565b93506060870135915080821115610cd257600080fd5b50610cdf87828801610b70565b91505092959194509250565b600060208284031215610cfd57600080fd5b81518015158114610d0d57600080fd5b9392505050565b600060208284031215610d2657600080fd5b5051919050565b600081518084526020808501945080840160005b83811015610d665781516001600160a01b031687529582019590820190600101610d41565b509495945050505050565b602081526000825160606020840152610d8d6080840182610d2d565b90506020840151601f19848303016040850152610daa8282610d2d565b91505062ffffff60408501511660608401528091505092915050565b634e487b7160e01b600052603260045260246000fd5b6000815180845260005b81811015610e0257602081850181015186830182015201610de6565b506000602082860101526020601f19601f83011685010191505092915050565b6001600160a01b0385811682526080602080840182905286519184018290526000928782019290919060a0860190855b81811015610e70578551851683529483019491830191600101610e52565b5050858103604087015287518082529082019350915080870160005b83811015610ea857815185529382019390820190600101610e8c565b505050508281036060840152610ebe8185610ddc565b979650505050505050565b60008060008060808587031215610edf57600080fd5b845193506020850151610ef1816108cc565b604086015190935063ffffffff81168114610f0b57600080fd5b6060959095015193969295505050565b600082601f830112610f2c57600080fd5b81516020610f3c6109f1836109ac565b82815260059290921b84018101918181019086841115610f5b57600080fd5b8286015b84811015610a39578051610f72816108cc565b8352918301918301610f5f565b600060208284031215610f9157600080fd5b815167ffffffffffffffff80821115610fa957600080fd5b9083019060608286031215610fbd57600080fd5b604051606081018181108382111715610fd857610fd8610965565b604052825182811115610fea57600080fd5b610ff687828601610f1b565b82525060208301518281111561100b57600080fd5b61101787828601610f1b565b6020830152506040830151925061102d836108e4565b604081019290925250939250505056fea2646970667358221220ac57d6081d8b1f60d7458f25032de2da851f71eadf03283a282a8af2e26527a064736f6c63430008120033000000000000000000000000c5290058841028f1614f3a6f0f5816cad0df5e27", + "nonce": "0x1d4", + "chainId": "0x14a34" + }, + "additionalContracts": [], + "isFixedGasLimit": false + } + ], + "receipts": [ + { + "status": "0x1", + "cumulativeGasUsed": "0x561899", + "logs": [], + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "type": "0x2", + "transactionHash": "0x1e82793b2ab392ef8baa0aef312f2f9bd41aec1704394ad3fcc52044c0366161", + "transactionIndex": "0x2c", + "blockHash": "0x17ff7fe2d32fe6a02522533c3cd3168b4c31bc8a80c754605908da382411350d", + "blockNumber": "0x13fa21d", + "gasUsed": "0xf6676", + "effectiveGasPrice": "0x1294e96", + "from": "0x12b2434a1022d5787bf06056f2885fe35de62bf8", + "to": null, + "contractAddress": "0xec42914d61327d6fd38014f4f51b2dec5c35579a", + "l1BaseFeeScalar": "0x44d", + "l1BlobBaseFee": "0x56b5ee0c5", + "l1BlobBaseFeeScalar": "0xa118b", + "l1Fee": "0x22a8145578d5", + "l1GasPrice": "0xe1f62145", + "l1GasUsed": "0x9a64" + } + ], + "libraries": [], + "pending": [], + "returns": { + "0": { + "internal_type": "contract Arbitrage", + "value": "0xeC42914d61327D6FD38014f4f51b2DEc5c35579a" + } + }, + "timestamp": 1737663259, + "chain": 84532, + "commit": "523a596" +} \ No newline at end of file diff --git a/broadcast/Swap.s.sol/84532/run-1737667405.json b/broadcast/Swap.s.sol/84532/run-1737667405.json new file mode 100644 index 0000000..d07f208 --- /dev/null +++ b/broadcast/Swap.s.sol/84532/run-1737667405.json @@ -0,0 +1,161 @@ +{ + "transactions": [ + { + "hash": "0xe71bb65cb38e96e63bc5b970553b46a95515fe8424b3193472e6653da89520d0", + "transactionType": "CALL", + "contractName": null, + "contractAddress": "0x036cbd53842c5426634e7929541ec2318f3dcf7e", + "function": "approve(address,uint256)", + "arguments": [ + "0x94cC0AaC535CCDB3C01d6787D6413C739ae12bc4", + "1000000" + ], + "transaction": { + "from": "0x12b2434a1022d5787bf06056f2885fe35de62bf8", + "to": "0x036cbd53842c5426634e7929541ec2318f3dcf7e", + "gas": "0x12b1b", + "value": "0x0", + "input": "0x095ea7b300000000000000000000000094cc0aac535ccdb3c01d6787d6413c739ae12bc400000000000000000000000000000000000000000000000000000000000f4240", + "nonce": "0x1de", + "chainId": "0x14a34" + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0xb94bbe7495d0edcd015bb0bdc3b757d4b809efb1bd5df33e1a9411cefdb41096", + "transactionType": "CALL", + "contractName": null, + "contractAddress": "0x94cc0aac535ccdb3c01d6787d6413c739ae12bc4", + "function": "exactInputSingle((address,address,uint24,address,uint256,uint256,uint160))", + "arguments": [ + "(0x036CbD53842c5426634e7929541eC2318f3dCF7e, 0x4200000000000000000000000000000000000006, 3000, 0x12B2434a1022d5787bf06056F2885Fe35De62Bf8, 1000000, 0, 0)" + ], + "transaction": { + "from": "0x12b2434a1022d5787bf06056f2885fe35de62bf8", + "to": "0x94cc0aac535ccdb3c01d6787d6413c739ae12bc4", + "gas": "0x26135", + "value": "0x38d7ea4c68000", + "input": "0x04e45aaf000000000000000000000000036cbd53842c5426634e7929541ec2318f3dcf7e00000000000000000000000042000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000bb800000000000000000000000012b2434a1022d5787bf06056f2885fe35de62bf800000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "nonce": "0x1df", + "chainId": "0x14a34" + }, + "additionalContracts": [], + "isFixedGasLimit": false + } + ], + "receipts": [ + { + "status": "0x1", + "cumulativeGasUsed": "0x7cc18d", + "logs": [ + { + "address": "0x036cbd53842c5426634e7929541ec2318f3dcf7e", + "topics": [ + "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925", + "0x00000000000000000000000012b2434a1022d5787bf06056f2885fe35de62bf8", + "0x00000000000000000000000094cc0aac535ccdb3c01d6787d6413c739ae12bc4" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000f4240", + "blockHash": "0xb18d82f311983a775dd701def568acb61ea9515b5e8d083e4697be037bb7b4dd", + "blockNumber": "0x13faa36", + "transactionHash": "0xe71bb65cb38e96e63bc5b970553b46a95515fe8424b3193472e6653da89520d0", + "transactionIndex": "0x21", + "logIndex": "0x63", + "removed": false + } + ], + "logsBloom": "0x00000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000200000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000010020000000000000000000000000000008000000400000000000000000000000000000000000000000000000000000000000000001000000000000000000000000010000000000000000000000020000000000000000000000000000000000000", + "type": "0x2", + "transactionHash": "0xe71bb65cb38e96e63bc5b970553b46a95515fe8424b3193472e6653da89520d0", + "transactionIndex": "0x21", + "blockHash": "0xb18d82f311983a775dd701def568acb61ea9515b5e8d083e4697be037bb7b4dd", + "blockNumber": "0x13faa36", + "gasUsed": "0xd88d", + "effectiveGasPrice": "0x10e36c5", + "from": "0x12b2434a1022d5787bf06056f2885fe35de62bf8", + "to": "0x036cbd53842c5426634e7929541ec2318f3dcf7e", + "contractAddress": null, + "l1BaseFeeScalar": "0x44d", + "l1BlobBaseFee": "0x5ead5bf", + "l1BlobBaseFeeScalar": "0xa118b", + "l1Fee": "0x24af6444f", + "l1GasPrice": "0x6f8cd759", + "l1GasUsed": "0x640" + }, + { + "status": "0x1", + "cumulativeGasUsed": "0x7e7a9c", + "logs": [ + { + "address": "0x4200000000000000000000000000000000000006", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x00000000000000000000000046880b404cd35c165eddeff7421019f8dd25f4ad", + "0x00000000000000000000000012b2434a1022d5787bf06056f2885fe35de62bf8" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000b1c8e4fb", + "blockHash": "0xb18d82f311983a775dd701def568acb61ea9515b5e8d083e4697be037bb7b4dd", + "blockNumber": "0x13faa36", + "transactionHash": "0xb94bbe7495d0edcd015bb0bdc3b757d4b809efb1bd5df33e1a9411cefdb41096", + "transactionIndex": "0x22", + "logIndex": "0x64", + "removed": false + }, + { + "address": "0x036cbd53842c5426634e7929541ec2318f3dcf7e", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x00000000000000000000000012b2434a1022d5787bf06056f2885fe35de62bf8", + "0x00000000000000000000000046880b404cd35c165eddeff7421019f8dd25f4ad" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000f4240", + "blockHash": "0xb18d82f311983a775dd701def568acb61ea9515b5e8d083e4697be037bb7b4dd", + "blockNumber": "0x13faa36", + "transactionHash": "0xb94bbe7495d0edcd015bb0bdc3b757d4b809efb1bd5df33e1a9411cefdb41096", + "transactionIndex": "0x22", + "logIndex": "0x65", + "removed": false + }, + { + "address": "0x46880b404cd35c165eddeff7421019f8dd25f4ad", + "topics": [ + "0xc42079f94a6350d7e6235f29174924f928cc2ac818eb64fed8004e115fbcca67", + "0x00000000000000000000000094cc0aac535ccdb3c01d6787d6413c739ae12bc4", + "0x00000000000000000000000012b2434a1022d5787bf06056f2885fe35de62bf8" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000f4240ffffffffffffffffffffffffffffffffffffffffffffffffffffffff4e371b050000000000000000000000000000000000000036b24e73a52b8fbb06cbb6f6d40000000000000000000000000000000000000000000000000023ac4b2c29a25000000000000000000000000000000000000000000000000000000000000138a7", + "blockHash": "0xb18d82f311983a775dd701def568acb61ea9515b5e8d083e4697be037bb7b4dd", + "blockNumber": "0x13faa36", + "transactionHash": "0xb94bbe7495d0edcd015bb0bdc3b757d4b809efb1bd5df33e1a9411cefdb41096", + "transactionIndex": "0x22", + "logIndex": "0x66", + "removed": false + } + ], + "logsBloom": "0x00000000040000000000000000000400000000000000000000040000000000000000000000000000000000100000000000000000000020000000400000000000000000000000000800000008200000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000010000800000000000000000000000000000000000000000400002000000000000000000010000000004000000000000000000000008000000400000000000000008000000000000002020000000000000000000000000000001000000000000000000100000000000000000000000000000020000000000000000000000000000000000000", + "type": "0x2", + "transactionHash": "0xb94bbe7495d0edcd015bb0bdc3b757d4b809efb1bd5df33e1a9411cefdb41096", + "transactionIndex": "0x22", + "blockHash": "0xb18d82f311983a775dd701def568acb61ea9515b5e8d083e4697be037bb7b4dd", + "blockNumber": "0x13faa36", + "gasUsed": "0x1b90f", + "effectiveGasPrice": "0x10e36c5", + "from": "0x12b2434a1022d5787bf06056f2885fe35de62bf8", + "to": "0x94cc0aac535ccdb3c01d6787d6413c739ae12bc4", + "contractAddress": null, + "l1BaseFeeScalar": "0x44d", + "l1BlobBaseFee": "0x5ead5bf", + "l1BlobBaseFeeScalar": "0xa118b", + "l1Fee": "0x339509e2d", + "l1GasPrice": "0x6f8cd759", + "l1GasUsed": "0x8c9" + } + ], + "libraries": [], + "pending": [], + "returns": {}, + "timestamp": 1737667405, + "chain": 84532, + "commit": "7e6cd68" +} \ No newline at end of file diff --git a/broadcast/Swap.s.sol/84532/run-latest.json b/broadcast/Swap.s.sol/84532/run-latest.json new file mode 100644 index 0000000..d07f208 --- /dev/null +++ b/broadcast/Swap.s.sol/84532/run-latest.json @@ -0,0 +1,161 @@ +{ + "transactions": [ + { + "hash": "0xe71bb65cb38e96e63bc5b970553b46a95515fe8424b3193472e6653da89520d0", + "transactionType": "CALL", + "contractName": null, + "contractAddress": "0x036cbd53842c5426634e7929541ec2318f3dcf7e", + "function": "approve(address,uint256)", + "arguments": [ + "0x94cC0AaC535CCDB3C01d6787D6413C739ae12bc4", + "1000000" + ], + "transaction": { + "from": "0x12b2434a1022d5787bf06056f2885fe35de62bf8", + "to": "0x036cbd53842c5426634e7929541ec2318f3dcf7e", + "gas": "0x12b1b", + "value": "0x0", + "input": "0x095ea7b300000000000000000000000094cc0aac535ccdb3c01d6787d6413c739ae12bc400000000000000000000000000000000000000000000000000000000000f4240", + "nonce": "0x1de", + "chainId": "0x14a34" + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0xb94bbe7495d0edcd015bb0bdc3b757d4b809efb1bd5df33e1a9411cefdb41096", + "transactionType": "CALL", + "contractName": null, + "contractAddress": "0x94cc0aac535ccdb3c01d6787d6413c739ae12bc4", + "function": "exactInputSingle((address,address,uint24,address,uint256,uint256,uint160))", + "arguments": [ + "(0x036CbD53842c5426634e7929541eC2318f3dCF7e, 0x4200000000000000000000000000000000000006, 3000, 0x12B2434a1022d5787bf06056F2885Fe35De62Bf8, 1000000, 0, 0)" + ], + "transaction": { + "from": "0x12b2434a1022d5787bf06056f2885fe35de62bf8", + "to": "0x94cc0aac535ccdb3c01d6787d6413c739ae12bc4", + "gas": "0x26135", + "value": "0x38d7ea4c68000", + "input": "0x04e45aaf000000000000000000000000036cbd53842c5426634e7929541ec2318f3dcf7e00000000000000000000000042000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000bb800000000000000000000000012b2434a1022d5787bf06056f2885fe35de62bf800000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "nonce": "0x1df", + "chainId": "0x14a34" + }, + "additionalContracts": [], + "isFixedGasLimit": false + } + ], + "receipts": [ + { + "status": "0x1", + "cumulativeGasUsed": "0x7cc18d", + "logs": [ + { + "address": "0x036cbd53842c5426634e7929541ec2318f3dcf7e", + "topics": [ + "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925", + "0x00000000000000000000000012b2434a1022d5787bf06056f2885fe35de62bf8", + "0x00000000000000000000000094cc0aac535ccdb3c01d6787d6413c739ae12bc4" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000f4240", + "blockHash": "0xb18d82f311983a775dd701def568acb61ea9515b5e8d083e4697be037bb7b4dd", + "blockNumber": "0x13faa36", + "transactionHash": "0xe71bb65cb38e96e63bc5b970553b46a95515fe8424b3193472e6653da89520d0", + "transactionIndex": "0x21", + "logIndex": "0x63", + "removed": false + } + ], + "logsBloom": "0x00000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000200000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000010020000000000000000000000000000008000000400000000000000000000000000000000000000000000000000000000000000001000000000000000000000000010000000000000000000000020000000000000000000000000000000000000", + "type": "0x2", + "transactionHash": "0xe71bb65cb38e96e63bc5b970553b46a95515fe8424b3193472e6653da89520d0", + "transactionIndex": "0x21", + "blockHash": "0xb18d82f311983a775dd701def568acb61ea9515b5e8d083e4697be037bb7b4dd", + "blockNumber": "0x13faa36", + "gasUsed": "0xd88d", + "effectiveGasPrice": "0x10e36c5", + "from": "0x12b2434a1022d5787bf06056f2885fe35de62bf8", + "to": "0x036cbd53842c5426634e7929541ec2318f3dcf7e", + "contractAddress": null, + "l1BaseFeeScalar": "0x44d", + "l1BlobBaseFee": "0x5ead5bf", + "l1BlobBaseFeeScalar": "0xa118b", + "l1Fee": "0x24af6444f", + "l1GasPrice": "0x6f8cd759", + "l1GasUsed": "0x640" + }, + { + "status": "0x1", + "cumulativeGasUsed": "0x7e7a9c", + "logs": [ + { + "address": "0x4200000000000000000000000000000000000006", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x00000000000000000000000046880b404cd35c165eddeff7421019f8dd25f4ad", + "0x00000000000000000000000012b2434a1022d5787bf06056f2885fe35de62bf8" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000b1c8e4fb", + "blockHash": "0xb18d82f311983a775dd701def568acb61ea9515b5e8d083e4697be037bb7b4dd", + "blockNumber": "0x13faa36", + "transactionHash": "0xb94bbe7495d0edcd015bb0bdc3b757d4b809efb1bd5df33e1a9411cefdb41096", + "transactionIndex": "0x22", + "logIndex": "0x64", + "removed": false + }, + { + "address": "0x036cbd53842c5426634e7929541ec2318f3dcf7e", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x00000000000000000000000012b2434a1022d5787bf06056f2885fe35de62bf8", + "0x00000000000000000000000046880b404cd35c165eddeff7421019f8dd25f4ad" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000f4240", + "blockHash": "0xb18d82f311983a775dd701def568acb61ea9515b5e8d083e4697be037bb7b4dd", + "blockNumber": "0x13faa36", + "transactionHash": "0xb94bbe7495d0edcd015bb0bdc3b757d4b809efb1bd5df33e1a9411cefdb41096", + "transactionIndex": "0x22", + "logIndex": "0x65", + "removed": false + }, + { + "address": "0x46880b404cd35c165eddeff7421019f8dd25f4ad", + "topics": [ + "0xc42079f94a6350d7e6235f29174924f928cc2ac818eb64fed8004e115fbcca67", + "0x00000000000000000000000094cc0aac535ccdb3c01d6787d6413c739ae12bc4", + "0x00000000000000000000000012b2434a1022d5787bf06056f2885fe35de62bf8" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000f4240ffffffffffffffffffffffffffffffffffffffffffffffffffffffff4e371b050000000000000000000000000000000000000036b24e73a52b8fbb06cbb6f6d40000000000000000000000000000000000000000000000000023ac4b2c29a25000000000000000000000000000000000000000000000000000000000000138a7", + "blockHash": "0xb18d82f311983a775dd701def568acb61ea9515b5e8d083e4697be037bb7b4dd", + "blockNumber": "0x13faa36", + "transactionHash": "0xb94bbe7495d0edcd015bb0bdc3b757d4b809efb1bd5df33e1a9411cefdb41096", + "transactionIndex": "0x22", + "logIndex": "0x66", + "removed": false + } + ], + "logsBloom": "0x00000000040000000000000000000400000000000000000000040000000000000000000000000000000000100000000000000000000020000000400000000000000000000000000800000008200000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000010000800000000000000000000000000000000000000000400002000000000000000000010000000004000000000000000000000008000000400000000000000008000000000000002020000000000000000000000000000001000000000000000000100000000000000000000000000000020000000000000000000000000000000000000", + "type": "0x2", + "transactionHash": "0xb94bbe7495d0edcd015bb0bdc3b757d4b809efb1bd5df33e1a9411cefdb41096", + "transactionIndex": "0x22", + "blockHash": "0xb18d82f311983a775dd701def568acb61ea9515b5e8d083e4697be037bb7b4dd", + "blockNumber": "0x13faa36", + "gasUsed": "0x1b90f", + "effectiveGasPrice": "0x10e36c5", + "from": "0x12b2434a1022d5787bf06056f2885fe35de62bf8", + "to": "0x94cc0aac535ccdb3c01d6787d6413c739ae12bc4", + "contractAddress": null, + "l1BaseFeeScalar": "0x44d", + "l1BlobBaseFee": "0x5ead5bf", + "l1BlobBaseFeeScalar": "0xa118b", + "l1Fee": "0x339509e2d", + "l1GasPrice": "0x6f8cd759", + "l1GasUsed": "0x8c9" + } + ], + "libraries": [], + "pending": [], + "returns": {}, + "timestamp": 1737667405, + "chain": 84532, + "commit": "7e6cd68" +} \ No newline at end of file diff --git a/script/DeployArbitrage.s.sol b/script/DeployArbitrage.s.sol new file mode 100644 index 0000000..ce63534 --- /dev/null +++ b/script/DeployArbitrage.s.sol @@ -0,0 +1,24 @@ +// SPDX-License-Identifier: UNLICENSED +pragma solidity ^0.8.13; + +import {Script, console} from "forge-std/Script.sol"; +import {Arbitrage} from "../src/Arbitrage.sol"; +import {HelperConfig} from "../script/HelperConfig.s.sol"; + +contract DeployArbitrage is Script { + HelperConfig public helperConfig; + HelperConfig.NetworkConfig currentConfig; + Arbitrage public arbitrage; + + function setUp() public { + helperConfig = new HelperConfig(); + currentConfig = helperConfig.getBaseSepoliaConfig(); + } + + function run() public returns (Arbitrage) { + vm.startBroadcast(); + arbitrage = new Arbitrage(currentConfig.uniswapQuoter); + vm.stopBroadcast(); + return arbitrage; + } +} diff --git a/script/HelperConfig.s.sol b/script/HelperConfig.s.sol new file mode 100644 index 0000000..3d32037 --- /dev/null +++ b/script/HelperConfig.s.sol @@ -0,0 +1,90 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.18; + +import {Script, console2} from "forge-std/Script.sol"; + +contract HelperConfig is Script { + /*////////////////////////////////////////////////////////////// + ERRORS + //////////////////////////////////////////////////////////////*/ + error HelperConfig__InvalidChainId(); + + /*////////////////////////////////////////////////////////////// + TYPES + //////////////////////////////////////////////////////////////*/ + struct NetworkConfig { + address usdc; + address uniswapFactory; //Uniswap V3 + address uniswapRouter; //Uniswap V3 + address sushiswapFactory; + address sushiswapRouter; + address uniswapQuoter; + } + + /*////////////////////////////////////////////////////////////// + CONFIGS + //////////////////////////////////////////////////////////////*/ + function getBaseSepoliaConfig() public pure returns (NetworkConfig memory) { + NetworkConfig memory SepoliaConfig = NetworkConfig({ + usdc: 0x036CbD53842c5426634e7929541eC2318f3dCF7e, + uniswapFactory: 0x4752ba5DBc23f44D87826276BF6Fd6b1C372aD24, + uniswapRouter: 0x94cC0AaC535CCDB3C01d6787D6413C739ae12bc4, + sushiswapFactory: address(0), + sushiswapRouter: address(0), + uniswapQuoter: 0xC5290058841028F1614F3A6F0F5816cAd0df5E27 + }); + return SepoliaConfig; + } + + function getETHSepoliaConfig() public pure returns (NetworkConfig memory) { + NetworkConfig memory SepoliaConfig = NetworkConfig({ + usdc: 0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238, + uniswapFactory: 0x0227628f3F023bb0B980b67D528571c95c6DaC1c, + uniswapRouter: 0x3bFA4769FB09eefC5a80d6E87c3B9C650f7Ae48E, + sushiswapFactory: address(0), + sushiswapRouter: 0x93c31c9C729A249b2877F7699e178F4720407733, + uniswapQuoter: address(0) + }); + return SepoliaConfig; + } + + function getModeSepoliaConfig() public pure returns (NetworkConfig memory) { + NetworkConfig memory SepoliaConfig = NetworkConfig({ + usdc: address(0), + uniswapFactory: 0x879A0F1E8402E37ECC56C53C55B6E02EB704eDD4, + uniswapRouter: 0x9eE1289c21321E212994B23Bf0b4Cdc453C17EEE, + sushiswapFactory: address(0), + sushiswapRouter: address(0), + uniswapQuoter: address(0) + }); + return SepoliaConfig; + } + + function getModeMainnetConfig() public pure returns (NetworkConfig memory) { + NetworkConfig memory SepoliaConfig = NetworkConfig({ + usdc: 0xd988097fb8612cc24eeC14542bC03424c656005f, + uniswapFactory: address(0), + uniswapRouter: address(0), + sushiswapFactory: address(0), + sushiswapRouter: 0xf2614A233c7C3e7f08b1F887Ba133a13f1eb2c55, + uniswapQuoter: address(0) + }); + return SepoliaConfig; + } + + /*////////////////////////////////////////////////////////////// + LOCAL CONFIG + //////////////////////////////////////////////////////////////*/ + function getAnvilConfig() public pure returns (NetworkConfig memory) { + console2.log("Testing On Anvil Network"); + NetworkConfig memory AnvilConfig = NetworkConfig({ + usdc: address(1), + uniswapFactory: address(2), + uniswapRouter: address(3), + sushiswapFactory: address(4), + sushiswapRouter: address(5), + uniswapQuoter: address(6) + }); + return AnvilConfig; + } +} diff --git a/script/Swap.s.sol b/script/Swap.s.sol new file mode 100644 index 0000000..6c6f85c --- /dev/null +++ b/script/Swap.s.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: UNLICENSED +pragma solidity ^0.8.13; + +import {Script, console} from "forge-std/Script.sol"; +import {Arbitrage} from "../src/Arbitrage.sol"; +import {DeployArbitrage} from "../script/DeployArbitrage.s.sol"; +import {HelperConfig} from "../script/HelperConfig.s.sol"; +import {ISwapRouter} from "@uniswap/v3-periphery/contracts/interfaces/ISwapRouter.sol"; +import {IQuoterV2} from "@uniswap/v3-periphery/contracts/interfaces/IQuoterV2.sol"; +import {IERC20} from "@openzeppelin/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol"; + +contract Swap is Script { + Arbitrage public arbitrage; + HelperConfig public helperConfig; + HelperConfig.NetworkConfig currentConfig; + + function setUp() public { + helperConfig = new HelperConfig(); + currentConfig = helperConfig.getBaseSepoliaConfig(); + arbitrage = Arbitrage(payable(address(0))); + } + + function run() public { + vm.startBroadcast(); + bool success = IERC20(currentConfig.usdc).transfer(address(arbitrage), 2000000); + + console.log("transfer usdc to arbitrage contract", success); + + uint256 amountOut = arbitrage._swapOnV3( + currentConfig.uniswapRouter, + currentConfig.usdc, + 2000000, + 0x4200000000000000000000000000000000000006, + 0, + 3000 + ); + + console.log("amount swapped", amountOut); + vm.stopBroadcast(); + } +} diff --git a/src/Arbitrage.sol b/src/Arbitrage.sol index eba8a0b..5b7cfb3 100644 --- a/src/Arbitrage.sol +++ b/src/Arbitrage.sol @@ -4,11 +4,14 @@ pragma solidity 0.8.18; import "@balancer/balancer-v2-monorepo/pkg/interfaces/contracts/vault/IVault.sol"; import "@balancer/balancer-v2-monorepo/pkg/interfaces/contracts/vault/IFlashLoanRecipient.sol"; import {ISwapRouter} from "@uniswap/v3-periphery/contracts/interfaces/ISwapRouter.sol"; +import {ISwapRouter02} from "./interfaces/ISwapRouter02.sol"; +import {IQuoterV2} from "@uniswap/v3-periphery/contracts/interfaces/IQuoterV2.sol"; contract Arbitrage is IFlashLoanRecipient { IVault private constant vault = IVault(0xBA12222222228d8Ba445958a75a0704d566BF2C8); address public owner; + IQuoterV2 public uniswapQuoter; struct Trade { address[] routerPath; @@ -16,8 +19,9 @@ contract Arbitrage is IFlashLoanRecipient { uint24 fee; } - constructor() { + constructor(address _quoter) { owner = msg.sender; + uniswapQuoter = IQuoterV2(_quoter); } function executeTrade(address[] memory _routerPath, address[] memory _tokenPath, uint24 _fee, uint256 _flashAmount) @@ -82,23 +86,41 @@ contract Arbitrage is IFlashLoanRecipient { address _tokenOut, uint256 _amountOut, uint24 _fee - ) internal { + ) public returns (uint256 amountOut) { // Approve token to swap IERC20(_tokenIn).approve(_router, _amountIn); // Setup swap parameters - ISwapRouter.ExactInputSingleParams memory params = ISwapRouter.ExactInputSingleParams({ + ISwapRouter02.ExactInputSingleParams memory params = ISwapRouter02.ExactInputSingleParams({ tokenIn: _tokenIn, tokenOut: _tokenOut, fee: _fee, recipient: address(this), - deadline: block.timestamp, amountIn: _amountIn, amountOutMinimum: _amountOut, sqrtPriceLimitX96: 0 }); + // Get fee amount + uint256 fee = getUniswapFeeQuote(_tokenIn, _tokenOut, _amountIn, _fee); + // Perform swap - ISwapRouter(_router).exactInputSingle(params); + amountOut = ISwapRouter02(_router).exactInputSingle{value: fee}(params); + } + + function getUniswapFeeQuote(address _tokenIn, address _tokenOut, uint256 amountIn, uint24 _fee) + public + returns (uint256 fee) + { + IQuoterV2.QuoteExactInputSingleParams memory params = IQuoterV2.QuoteExactInputSingleParams({ + tokenIn: _tokenIn, + tokenOut: _tokenOut, + amountIn: amountIn, + fee: _fee, + sqrtPriceLimitX96: 0 + }); + (,,, fee) = uniswapQuoter.quoteExactInputSingle(params); } + + receive() external payable {} } diff --git a/src/interfaces/ISwapRouter02.sol b/src/interfaces/ISwapRouter02.sol new file mode 100644 index 0000000..33f3b2a --- /dev/null +++ b/src/interfaces/ISwapRouter02.sol @@ -0,0 +1,16 @@ +// SPDX-License-Identifier: Unlicense +pragma solidity 0.8.18; + +interface ISwapRouter02 { + struct ExactInputSingleParams { + address tokenIn; + address tokenOut; + uint24 fee; + address recipient; + uint256 amountIn; + uint256 amountOutMinimum; + uint160 sqrtPriceLimitX96; + } + + function exactInputSingle(ExactInputSingleParams calldata params) external payable returns (uint256 amountOut); +} diff --git a/test/unit/ArbitrageTest.t.sol b/test/unit/ArbitrageTest.t.sol new file mode 100644 index 0000000..75ca049 --- /dev/null +++ b/test/unit/ArbitrageTest.t.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: UNLICENSED +pragma solidity 0.8.18; + +import {Test, console} from "forge-std/Test.sol"; +import {StdUtils} from "forge-std/StdUtils.sol"; +import {Arbitrage} from "../../src/Arbitrage.sol"; +import {HelperConfig} from "../../script/HelperConfig.s.sol"; +import {IERC20} from "@openzeppelin/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol"; +import {ISwapRouter} from "@uniswap/v3-periphery/contracts/interfaces/ISwapRouter.sol"; + +contract ArbitrageTest is Test { + Arbitrage public arbitrage; + HelperConfig public helperConfig; + HelperConfig.NetworkConfig currentConfig; + + address owner = address(1); + address weth = 0x4200000000000000000000000000000000000006; + + uint256 sepoliaFork; + uint256 baseSepoliaFork; + + string ETH_SEPOLIA_RPC_URL = vm.envString("ETH_SEPOLIA_RPC_URL"); + string BASE_SEPOLIA_RPC_URL = vm.envString("BASE_SEPOLIA_RPC_URL"); + + function setUp() public { + helperConfig = new HelperConfig(); + currentConfig = helperConfig.getBaseSepoliaConfig(); + + baseSepoliaFork = vm.createFork(BASE_SEPOLIA_RPC_URL); + vm.selectFork(baseSepoliaFork); + + vm.startPrank(owner); + arbitrage = new Arbitrage(currentConfig.uniswapQuoter); + vm.stopPrank(); + + deal(currentConfig.usdc, owner, 69); + deal(currentConfig.usdc, address(arbitrage), 69); + vm.deal(owner, 1 ether); + vm.deal(address(arbitrage), 1 ether); + } + + function test_swapOnV3_uniswap() public { + vm.selectFork(baseSepoliaFork); + vm.startPrank(owner); + uint256 amountOut = arbitrage._swapOnV3(currentConfig.uniswapRouter, currentConfig.usdc, 10, weth, 0, 3000); + vm.stopPrank(); + assertGt(amountOut, 0); + } + + function test_swapOnV3_sushiswap() public {} + + function test_getUniswapFeeQuote() public { + vm.selectFork(baseSepoliaFork); + vm.startPrank(owner); + uint256 fee = arbitrage.getUniswapFeeQuote(currentConfig.usdc, weth, 10, 3000); + vm.stopPrank(); + assertGt(fee, 0); + } + + function test_receiveFlashLoan() public {} +}