diff --git a/broadcast/DeployArbitrage.s.sol/11155111/run-1738193695.json b/broadcast/DeployArbitrage.s.sol/11155111/run-1738193695.json new file mode 100644 index 0000000..c28110d --- /dev/null +++ b/broadcast/DeployArbitrage.s.sol/11155111/run-1738193695.json @@ -0,0 +1,51 @@ +{ + "transactions": [ + { + "hash": "0xfa7ed5eb17e14d9b42e33fdd903aa4cbe14acf10a4452377c67a59a3ce717af1", + "transactionType": "CREATE", + "contractName": "Arbitrage", + "contractAddress": "0xf86ecfe27a6960b293524fd9b7463a7d4c955bec", + "function": null, + "arguments": null, + "transaction": { + "from": "0xfe63ba8189215e5c975e73643b96066b6ad41a45", + "gas": "0x1166b6", + "value": "0x0", + "input": "0x608060405234801561001057600080fd5b50600080546001600160a01b03191633179055610e80806100326000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c806361fe164b146100465780638da5cb5b1461005b578063f04f27071461008a575b600080fd5b6100596100543660046108a4565b61009d565b005b60005461006e906001600160a01b031681565b6040516001600160a01b03909116815260200160405180910390f35b610059610098366004610a12565b610206565b600060405180608001604052808781526020018681526020018581526020018462ffffff168152506040516020016100d59190610b61565b60408051601f198184030181526001808452838301909252925060009190602080830190803683370190505090508460008151811061011657610116610bd5565b60200260200101518160008151811061013157610131610bd5565b6001600160a01b039290921660209283029190910190910152604080516001808252818301909252600091816020016020820280368337019050509050838160008151811061018257610182610bd5565b6020908102919091010152604051632e1c224f60e11b815273ba12222222228d8ba445958a75a0704d566bf2c890635c38449e906101ca903090869086908990600401610c31565b600060405180830381600087803b1580156101e457600080fd5b505af11580156101f8573d6000803e3d6000fd5b505050505050505050505050565b3373ba12222222228d8ba445958a75a0704d566bf2c81461022657600080fd5b60008180602001905181019061023c9190610d3c565b905060008460008151811061025357610253610bd5565b602002602001015190506102ca826000015160008151811061027757610277610bd5565b6020026020010151836040015160008151811061029657610296610bd5565b60200260200101518385604001516001815181106102b6576102b6610bd5565b6020026020010151600087606001516105ad565b6103c082600001516001815181106102e4576102e4610bd5565b6020026020010151836040015160018151811061030357610303610bd5565b6020026020010151846040015160018151811061032257610322610bd5565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015610372573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103969190610e08565b85604001516000815181106103ad576103ad610bd5565b60200260200101518587606001516105ad565b81604001516000815181106103d7576103d7610bd5565b602090810291909101015160405163a9059cbb60e01b815273ba12222222228d8ba445958a75a0704d566bf2c86004820152602481018390526001600160a01b039091169063a9059cbb906044016020604051808303816000875af1158015610444573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104689190610e21565b50816040015160008151811061048057610480610bd5565b60200260200101516001600160a01b031663a9059cbb60008054906101000a90046001600160a01b031684604001516000815181106104c1576104c1610bd5565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015610511573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105359190610e08565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015610580573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105a49190610e21565b50505050505050565b60405163095ea7b360e01b81526001600160a01b0387811660048301526024820186905286169063095ea7b3906044016020604051808303816000875af11580156105fc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106209190610e21565b5060408051610100810182526001600160a01b0387811682528581166020830190815262ffffff8581168486019081523060608601908152426080870190815260a087018c815260c088018b8152600060e08a01908152995163414bf38960e01b815289518916600482015296518816602488015293519094166044860152905185166064850152516084840152905160a48301525160c48201529251811660e484015290919088169063414bf38990610104016020604051808303816000875af11580156106f3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107179190610e08565b50604080516001600160a01b03808916825286166020820152908101869052606081018490527f25f1d03755df23c30e25db2dbd3891e31ce084bdfbfc46f9fe5e446ee5f9b2d49060800160405180910390a150505050505050565b634e487b7160e01b600052604160045260246000fd5b6040516080810167ffffffffffffffff811182821017156107ac576107ac610773565b60405290565b604051601f8201601f1916810167ffffffffffffffff811182821017156107db576107db610773565b604052919050565b600067ffffffffffffffff8211156107fd576107fd610773565b5060051b60200190565b6001600160a01b038116811461081c57600080fd5b50565b600082601f83011261083057600080fd5b81356020610845610840836107e3565b6107b2565b82815260059290921b8401810191818101908684111561086457600080fd5b8286015b8481101561088857803561087b81610807565b8352918301918301610868565b509695505050505050565b62ffffff8116811461081c57600080fd5b600080600080600060a086880312156108bc57600080fd5b853567ffffffffffffffff808211156108d457600080fd5b6108e089838a0161081f565b965060208801359150808211156108f657600080fd5b61090289838a0161081f565b9550604088013591508082111561091857600080fd5b506109258882890161081f565b935050606086013561093681610893565b949793965091946080013592915050565b600082601f83011261095857600080fd5b81356020610968610840836107e3565b82815260059290921b8401810191818101908684111561098757600080fd5b8286015b84811015610888578035835291830191830161098b565b600082601f8301126109b357600080fd5b813567ffffffffffffffff8111156109cd576109cd610773565b6109e0601f8201601f19166020016107b2565b8181528460208386010111156109f557600080fd5b816020850160208301376000918101602001919091529392505050565b60008060008060808587031215610a2857600080fd5b843567ffffffffffffffff80821115610a4057600080fd5b818701915087601f830112610a5457600080fd5b81356020610a64610840836107e3565b82815260059290921b8401810191818101908b841115610a8357600080fd5b948201945b83861015610aaa578535610a9b81610807565b82529482019490820190610a88565b98505088013592505080821115610ac057600080fd5b610acc88838901610947565b94506040870135915080821115610ae257600080fd5b610aee88838901610947565b93506060870135915080821115610b0457600080fd5b50610b11878288016109a2565b91505092959194509250565b600081518084526020808501945080840160005b83811015610b565781516001600160a01b031687529582019590820190600101610b31565b509495945050505050565b602081526000825160806020840152610b7d60a0840182610b1d565b90506020840151601f1980858403016040860152610b9b8383610b1d565b9250604086015191508085840301606086015250610bb98282610b1d565b91505062ffffff60608501511660808401528091505092915050565b634e487b7160e01b600052603260045260246000fd5b6000815180845260005b81811015610c1157602081850181015186830182015201610bf5565b506000602082860101526020601f19601f83011685010191505092915050565b6001600160a01b0385811682526080602080840182905286519184018290526000928782019290919060a0860190855b81811015610c7f578551851683529483019491830191600101610c61565b5050858103604087015287518082529082019350915080870160005b83811015610cb757815185529382019390820190600101610c9b565b505050508281036060840152610ccd8185610beb565b979650505050505050565b600082601f830112610ce957600080fd5b81516020610cf9610840836107e3565b82815260059290921b84018101918181019086841115610d1857600080fd5b8286015b84811015610888578051610d2f81610807565b8352918301918301610d1c565b600060208284031215610d4e57600080fd5b815167ffffffffffffffff80821115610d6657600080fd5b9083019060808286031215610d7a57600080fd5b610d82610789565b825182811115610d9157600080fd5b610d9d87828601610cd8565b825250602083015182811115610db257600080fd5b610dbe87828601610cd8565b602083015250604083015182811115610dd657600080fd5b610de287828601610cd8565b60408301525060608301519250610df883610893565b6060810192909252509392505050565b600060208284031215610e1a57600080fd5b5051919050565b600060208284031215610e3357600080fd5b81518015158114610e4357600080fd5b939250505056fea264697066735822122051e80441e89853f9f77fb1bf6cb3cbc4fba3462cc76862049360440e5414516264736f6c63430008120033", + "nonce": "0x6f", + "chainId": "0xaa36a7" + }, + "additionalContracts": [], + "isFixedGasLimit": false + } + ], + "receipts": [ + { + "status": "0x1", + "cumulativeGasUsed": "0x9a0341", + "logs": [], + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "type": "0x2", + "transactionHash": "0xfa7ed5eb17e14d9b42e33fdd903aa4cbe14acf10a4452377c67a59a3ce717af1", + "transactionIndex": "0x39", + "blockHash": "0x4b85407f8f8182e36d0746e5cd91781c9c9c183d2faf728dcc0c207b7a7529d0", + "blockNumber": "0x73f47c", + "gasUsed": "0xd62b4", + "effectiveGasPrice": "0x3fc8434f", + "from": "0xfe63ba8189215e5c975e73643b96066b6ad41a45", + "to": null, + "contractAddress": "0xf86ecfe27a6960b293524fd9b7463a7d4c955bec" + } + ], + "libraries": [], + "pending": [], + "returns": { + "0": { + "internal_type": "contract Arbitrage", + "value": "0xf86ecFe27a6960b293524fD9B7463A7D4c955bEC" + } + }, + "timestamp": 1738193695, + "chain": 11155111, + "commit": "9e0eaed" +} \ No newline at end of file diff --git a/broadcast/DeployArbitrage.s.sol/11155111/run-1738193749.json b/broadcast/DeployArbitrage.s.sol/11155111/run-1738193749.json new file mode 100644 index 0000000..a3c22c4 --- /dev/null +++ b/broadcast/DeployArbitrage.s.sol/11155111/run-1738193749.json @@ -0,0 +1,51 @@ +{ + "transactions": [ + { + "hash": "0x0a1539603504ad4b32d16519ee00e885c08259c2c59d6d4ae5326c43ac8ac45a", + "transactionType": "CREATE", + "contractName": "Arbitrage", + "contractAddress": "0x617270b4d0f635a6d4def5017434dc9b4895381e", + "function": null, + "arguments": null, + "transaction": { + "from": "0xfe63ba8189215e5c975e73643b96066b6ad41a45", + "gas": "0x1166b6", + "value": "0x0", + "input": "0x608060405234801561001057600080fd5b50600080546001600160a01b03191633179055610e80806100326000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c806361fe164b146100465780638da5cb5b1461005b578063f04f27071461008a575b600080fd5b6100596100543660046108a4565b61009d565b005b60005461006e906001600160a01b031681565b6040516001600160a01b03909116815260200160405180910390f35b610059610098366004610a12565b610206565b600060405180608001604052808781526020018681526020018581526020018462ffffff168152506040516020016100d59190610b61565b60408051601f198184030181526001808452838301909252925060009190602080830190803683370190505090508460008151811061011657610116610bd5565b60200260200101518160008151811061013157610131610bd5565b6001600160a01b039290921660209283029190910190910152604080516001808252818301909252600091816020016020820280368337019050509050838160008151811061018257610182610bd5565b6020908102919091010152604051632e1c224f60e11b815273ba12222222228d8ba445958a75a0704d566bf2c890635c38449e906101ca903090869086908990600401610c31565b600060405180830381600087803b1580156101e457600080fd5b505af11580156101f8573d6000803e3d6000fd5b505050505050505050505050565b3373ba12222222228d8ba445958a75a0704d566bf2c81461022657600080fd5b60008180602001905181019061023c9190610d3c565b905060008460008151811061025357610253610bd5565b602002602001015190506102ca826000015160008151811061027757610277610bd5565b6020026020010151836040015160008151811061029657610296610bd5565b60200260200101518385604001516001815181106102b6576102b6610bd5565b6020026020010151600087606001516105ad565b6103c082600001516001815181106102e4576102e4610bd5565b6020026020010151836040015160018151811061030357610303610bd5565b6020026020010151846040015160018151811061032257610322610bd5565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015610372573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103969190610e08565b85604001516000815181106103ad576103ad610bd5565b60200260200101518587606001516105ad565b81604001516000815181106103d7576103d7610bd5565b602090810291909101015160405163a9059cbb60e01b815273ba12222222228d8ba445958a75a0704d566bf2c86004820152602481018390526001600160a01b039091169063a9059cbb906044016020604051808303816000875af1158015610444573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104689190610e21565b50816040015160008151811061048057610480610bd5565b60200260200101516001600160a01b031663a9059cbb60008054906101000a90046001600160a01b031684604001516000815181106104c1576104c1610bd5565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015610511573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105359190610e08565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015610580573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105a49190610e21565b50505050505050565b60405163095ea7b360e01b81526001600160a01b0387811660048301526024820186905286169063095ea7b3906044016020604051808303816000875af11580156105fc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106209190610e21565b5060408051610100810182526001600160a01b0387811682528581166020830190815262ffffff8581168486019081523060608601908152426080870190815260a087018c815260c088018b8152600060e08a01908152995163414bf38960e01b815289518916600482015296518816602488015293519094166044860152905185166064850152516084840152905160a48301525160c48201529251811660e484015290919088169063414bf38990610104016020604051808303816000875af11580156106f3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107179190610e08565b50604080516001600160a01b03808916825286166020820152908101869052606081018490527f25f1d03755df23c30e25db2dbd3891e31ce084bdfbfc46f9fe5e446ee5f9b2d49060800160405180910390a150505050505050565b634e487b7160e01b600052604160045260246000fd5b6040516080810167ffffffffffffffff811182821017156107ac576107ac610773565b60405290565b604051601f8201601f1916810167ffffffffffffffff811182821017156107db576107db610773565b604052919050565b600067ffffffffffffffff8211156107fd576107fd610773565b5060051b60200190565b6001600160a01b038116811461081c57600080fd5b50565b600082601f83011261083057600080fd5b81356020610845610840836107e3565b6107b2565b82815260059290921b8401810191818101908684111561086457600080fd5b8286015b8481101561088857803561087b81610807565b8352918301918301610868565b509695505050505050565b62ffffff8116811461081c57600080fd5b600080600080600060a086880312156108bc57600080fd5b853567ffffffffffffffff808211156108d457600080fd5b6108e089838a0161081f565b965060208801359150808211156108f657600080fd5b61090289838a0161081f565b9550604088013591508082111561091857600080fd5b506109258882890161081f565b935050606086013561093681610893565b949793965091946080013592915050565b600082601f83011261095857600080fd5b81356020610968610840836107e3565b82815260059290921b8401810191818101908684111561098757600080fd5b8286015b84811015610888578035835291830191830161098b565b600082601f8301126109b357600080fd5b813567ffffffffffffffff8111156109cd576109cd610773565b6109e0601f8201601f19166020016107b2565b8181528460208386010111156109f557600080fd5b816020850160208301376000918101602001919091529392505050565b60008060008060808587031215610a2857600080fd5b843567ffffffffffffffff80821115610a4057600080fd5b818701915087601f830112610a5457600080fd5b81356020610a64610840836107e3565b82815260059290921b8401810191818101908b841115610a8357600080fd5b948201945b83861015610aaa578535610a9b81610807565b82529482019490820190610a88565b98505088013592505080821115610ac057600080fd5b610acc88838901610947565b94506040870135915080821115610ae257600080fd5b610aee88838901610947565b93506060870135915080821115610b0457600080fd5b50610b11878288016109a2565b91505092959194509250565b600081518084526020808501945080840160005b83811015610b565781516001600160a01b031687529582019590820190600101610b31565b509495945050505050565b602081526000825160806020840152610b7d60a0840182610b1d565b90506020840151601f1980858403016040860152610b9b8383610b1d565b9250604086015191508085840301606086015250610bb98282610b1d565b91505062ffffff60608501511660808401528091505092915050565b634e487b7160e01b600052603260045260246000fd5b6000815180845260005b81811015610c1157602081850181015186830182015201610bf5565b506000602082860101526020601f19601f83011685010191505092915050565b6001600160a01b0385811682526080602080840182905286519184018290526000928782019290919060a0860190855b81811015610c7f578551851683529483019491830191600101610c61565b5050858103604087015287518082529082019350915080870160005b83811015610cb757815185529382019390820190600101610c9b565b505050508281036060840152610ccd8185610beb565b979650505050505050565b600082601f830112610ce957600080fd5b81516020610cf9610840836107e3565b82815260059290921b84018101918181019086841115610d1857600080fd5b8286015b84811015610888578051610d2f81610807565b8352918301918301610d1c565b600060208284031215610d4e57600080fd5b815167ffffffffffffffff80821115610d6657600080fd5b9083019060808286031215610d7a57600080fd5b610d82610789565b825182811115610d9157600080fd5b610d9d87828601610cd8565b825250602083015182811115610db257600080fd5b610dbe87828601610cd8565b602083015250604083015182811115610dd657600080fd5b610de287828601610cd8565b60408301525060608301519250610df883610893565b6060810192909252509392505050565b600060208284031215610e1a57600080fd5b5051919050565b600060208284031215610e3357600080fd5b81518015158114610e4357600080fd5b939250505056fea264697066735822122051e80441e89853f9f77fb1bf6cb3cbc4fba3462cc76862049360440e5414516264736f6c63430008120033", + "nonce": "0x70", + "chainId": "0xaa36a7" + }, + "additionalContracts": [], + "isFixedGasLimit": false + } + ], + "receipts": [ + { + "status": "0x1", + "cumulativeGasUsed": "0xba05d6", + "logs": [], + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "type": "0x2", + "transactionHash": "0x0a1539603504ad4b32d16519ee00e885c08259c2c59d6d4ae5326c43ac8ac45a", + "transactionIndex": "0x43", + "blockHash": "0x089b0bc6a82b1adec534df1e9bf619c612ae9955fa8cedc9e0ea69193ec17f87", + "blockNumber": "0x73f489", + "gasUsed": "0xd62b4", + "effectiveGasPrice": "0x463b5e78", + "from": "0xfe63ba8189215e5c975e73643b96066b6ad41a45", + "to": null, + "contractAddress": "0x617270b4d0f635a6d4def5017434dc9b4895381e" + } + ], + "libraries": [], + "pending": [], + "returns": { + "0": { + "internal_type": "contract Arbitrage", + "value": "0x617270b4d0f635A6d4dEF5017434dc9b4895381e" + } + }, + "timestamp": 1738193749, + "chain": 11155111, + "commit": "9e0eaed" +} \ No newline at end of file diff --git a/broadcast/DeployArbitrage.s.sol/11155111/run-1738193797.json b/broadcast/DeployArbitrage.s.sol/11155111/run-1738193797.json new file mode 100644 index 0000000..7985110 --- /dev/null +++ b/broadcast/DeployArbitrage.s.sol/11155111/run-1738193797.json @@ -0,0 +1,51 @@ +{ + "transactions": [ + { + "hash": "0x0a1539603504ad4b32d16519ee00e885c08259c2c59d6d4ae5326c43ac8ac45a", + "transactionType": "CREATE", + "contractName": "Arbitrage", + "contractAddress": "0x617270b4d0f635a6d4def5017434dc9b4895381e", + "function": null, + "arguments": null, + "transaction": { + "from": "0xfe63ba8189215e5c975e73643b96066b6ad41a45", + "gas": "0x1166b6", + "value": "0x0", + "input": "0x608060405234801561001057600080fd5b50600080546001600160a01b03191633179055610e80806100326000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c806361fe164b146100465780638da5cb5b1461005b578063f04f27071461008a575b600080fd5b6100596100543660046108a4565b61009d565b005b60005461006e906001600160a01b031681565b6040516001600160a01b03909116815260200160405180910390f35b610059610098366004610a12565b610206565b600060405180608001604052808781526020018681526020018581526020018462ffffff168152506040516020016100d59190610b61565b60408051601f198184030181526001808452838301909252925060009190602080830190803683370190505090508460008151811061011657610116610bd5565b60200260200101518160008151811061013157610131610bd5565b6001600160a01b039290921660209283029190910190910152604080516001808252818301909252600091816020016020820280368337019050509050838160008151811061018257610182610bd5565b6020908102919091010152604051632e1c224f60e11b815273ba12222222228d8ba445958a75a0704d566bf2c890635c38449e906101ca903090869086908990600401610c31565b600060405180830381600087803b1580156101e457600080fd5b505af11580156101f8573d6000803e3d6000fd5b505050505050505050505050565b3373ba12222222228d8ba445958a75a0704d566bf2c81461022657600080fd5b60008180602001905181019061023c9190610d3c565b905060008460008151811061025357610253610bd5565b602002602001015190506102ca826000015160008151811061027757610277610bd5565b6020026020010151836040015160008151811061029657610296610bd5565b60200260200101518385604001516001815181106102b6576102b6610bd5565b6020026020010151600087606001516105ad565b6103c082600001516001815181106102e4576102e4610bd5565b6020026020010151836040015160018151811061030357610303610bd5565b6020026020010151846040015160018151811061032257610322610bd5565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015610372573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103969190610e08565b85604001516000815181106103ad576103ad610bd5565b60200260200101518587606001516105ad565b81604001516000815181106103d7576103d7610bd5565b602090810291909101015160405163a9059cbb60e01b815273ba12222222228d8ba445958a75a0704d566bf2c86004820152602481018390526001600160a01b039091169063a9059cbb906044016020604051808303816000875af1158015610444573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104689190610e21565b50816040015160008151811061048057610480610bd5565b60200260200101516001600160a01b031663a9059cbb60008054906101000a90046001600160a01b031684604001516000815181106104c1576104c1610bd5565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015610511573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105359190610e08565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015610580573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105a49190610e21565b50505050505050565b60405163095ea7b360e01b81526001600160a01b0387811660048301526024820186905286169063095ea7b3906044016020604051808303816000875af11580156105fc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106209190610e21565b5060408051610100810182526001600160a01b0387811682528581166020830190815262ffffff8581168486019081523060608601908152426080870190815260a087018c815260c088018b8152600060e08a01908152995163414bf38960e01b815289518916600482015296518816602488015293519094166044860152905185166064850152516084840152905160a48301525160c48201529251811660e484015290919088169063414bf38990610104016020604051808303816000875af11580156106f3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107179190610e08565b50604080516001600160a01b03808916825286166020820152908101869052606081018490527f25f1d03755df23c30e25db2dbd3891e31ce084bdfbfc46f9fe5e446ee5f9b2d49060800160405180910390a150505050505050565b634e487b7160e01b600052604160045260246000fd5b6040516080810167ffffffffffffffff811182821017156107ac576107ac610773565b60405290565b604051601f8201601f1916810167ffffffffffffffff811182821017156107db576107db610773565b604052919050565b600067ffffffffffffffff8211156107fd576107fd610773565b5060051b60200190565b6001600160a01b038116811461081c57600080fd5b50565b600082601f83011261083057600080fd5b81356020610845610840836107e3565b6107b2565b82815260059290921b8401810191818101908684111561086457600080fd5b8286015b8481101561088857803561087b81610807565b8352918301918301610868565b509695505050505050565b62ffffff8116811461081c57600080fd5b600080600080600060a086880312156108bc57600080fd5b853567ffffffffffffffff808211156108d457600080fd5b6108e089838a0161081f565b965060208801359150808211156108f657600080fd5b61090289838a0161081f565b9550604088013591508082111561091857600080fd5b506109258882890161081f565b935050606086013561093681610893565b949793965091946080013592915050565b600082601f83011261095857600080fd5b81356020610968610840836107e3565b82815260059290921b8401810191818101908684111561098757600080fd5b8286015b84811015610888578035835291830191830161098b565b600082601f8301126109b357600080fd5b813567ffffffffffffffff8111156109cd576109cd610773565b6109e0601f8201601f19166020016107b2565b8181528460208386010111156109f557600080fd5b816020850160208301376000918101602001919091529392505050565b60008060008060808587031215610a2857600080fd5b843567ffffffffffffffff80821115610a4057600080fd5b818701915087601f830112610a5457600080fd5b81356020610a64610840836107e3565b82815260059290921b8401810191818101908b841115610a8357600080fd5b948201945b83861015610aaa578535610a9b81610807565b82529482019490820190610a88565b98505088013592505080821115610ac057600080fd5b610acc88838901610947565b94506040870135915080821115610ae257600080fd5b610aee88838901610947565b93506060870135915080821115610b0457600080fd5b50610b11878288016109a2565b91505092959194509250565b600081518084526020808501945080840160005b83811015610b565781516001600160a01b031687529582019590820190600101610b31565b509495945050505050565b602081526000825160806020840152610b7d60a0840182610b1d565b90506020840151601f1980858403016040860152610b9b8383610b1d565b9250604086015191508085840301606086015250610bb98282610b1d565b91505062ffffff60608501511660808401528091505092915050565b634e487b7160e01b600052603260045260246000fd5b6000815180845260005b81811015610c1157602081850181015186830182015201610bf5565b506000602082860101526020601f19601f83011685010191505092915050565b6001600160a01b0385811682526080602080840182905286519184018290526000928782019290919060a0860190855b81811015610c7f578551851683529483019491830191600101610c61565b5050858103604087015287518082529082019350915080870160005b83811015610cb757815185529382019390820190600101610c9b565b505050508281036060840152610ccd8185610beb565b979650505050505050565b600082601f830112610ce957600080fd5b81516020610cf9610840836107e3565b82815260059290921b84018101918181019086841115610d1857600080fd5b8286015b84811015610888578051610d2f81610807565b8352918301918301610d1c565b600060208284031215610d4e57600080fd5b815167ffffffffffffffff80821115610d6657600080fd5b9083019060808286031215610d7a57600080fd5b610d82610789565b825182811115610d9157600080fd5b610d9d87828601610cd8565b825250602083015182811115610db257600080fd5b610dbe87828601610cd8565b602083015250604083015182811115610dd657600080fd5b610de287828601610cd8565b60408301525060608301519250610df883610893565b6060810192909252509392505050565b600060208284031215610e1a57600080fd5b5051919050565b600060208284031215610e3357600080fd5b81518015158114610e4357600080fd5b939250505056fea264697066735822122051e80441e89853f9f77fb1bf6cb3cbc4fba3462cc76862049360440e5414516264736f6c63430008120033", + "nonce": "0x70", + "chainId": "0xaa36a7" + }, + "additionalContracts": [], + "isFixedGasLimit": false + } + ], + "receipts": [ + { + "status": "0x1", + "cumulativeGasUsed": "0xba05d6", + "logs": [], + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "type": "0x2", + "transactionHash": "0x0a1539603504ad4b32d16519ee00e885c08259c2c59d6d4ae5326c43ac8ac45a", + "transactionIndex": "0x43", + "blockHash": "0x089b0bc6a82b1adec534df1e9bf619c612ae9955fa8cedc9e0ea69193ec17f87", + "blockNumber": "0x73f489", + "gasUsed": "0xd62b4", + "effectiveGasPrice": "0x463b5e78", + "from": "0xfe63ba8189215e5c975e73643b96066b6ad41a45", + "to": null, + "contractAddress": "0x617270b4d0f635a6d4def5017434dc9b4895381e" + } + ], + "libraries": [], + "pending": [], + "returns": { + "0": { + "internal_type": "contract Arbitrage", + "value": "0x617270b4d0f635A6d4dEF5017434dc9b4895381e" + } + }, + "timestamp": 1738193797, + "chain": 11155111, + "commit": "9e0eaed" +} \ No newline at end of file diff --git a/broadcast/DeployArbitrage.s.sol/11155111/run-1738193824.json b/broadcast/DeployArbitrage.s.sol/11155111/run-1738193824.json new file mode 100644 index 0000000..d0dacc2 --- /dev/null +++ b/broadcast/DeployArbitrage.s.sol/11155111/run-1738193824.json @@ -0,0 +1,51 @@ +{ + "transactions": [ + { + "hash": "0x0a1539603504ad4b32d16519ee00e885c08259c2c59d6d4ae5326c43ac8ac45a", + "transactionType": "CREATE", + "contractName": "Arbitrage", + "contractAddress": "0x617270b4d0f635a6d4def5017434dc9b4895381e", + "function": null, + "arguments": null, + "transaction": { + "from": "0xfe63ba8189215e5c975e73643b96066b6ad41a45", + "gas": "0x1166b6", + "value": "0x0", + "input": "0x608060405234801561001057600080fd5b50600080546001600160a01b03191633179055610e80806100326000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c806361fe164b146100465780638da5cb5b1461005b578063f04f27071461008a575b600080fd5b6100596100543660046108a4565b61009d565b005b60005461006e906001600160a01b031681565b6040516001600160a01b03909116815260200160405180910390f35b610059610098366004610a12565b610206565b600060405180608001604052808781526020018681526020018581526020018462ffffff168152506040516020016100d59190610b61565b60408051601f198184030181526001808452838301909252925060009190602080830190803683370190505090508460008151811061011657610116610bd5565b60200260200101518160008151811061013157610131610bd5565b6001600160a01b039290921660209283029190910190910152604080516001808252818301909252600091816020016020820280368337019050509050838160008151811061018257610182610bd5565b6020908102919091010152604051632e1c224f60e11b815273ba12222222228d8ba445958a75a0704d566bf2c890635c38449e906101ca903090869086908990600401610c31565b600060405180830381600087803b1580156101e457600080fd5b505af11580156101f8573d6000803e3d6000fd5b505050505050505050505050565b3373ba12222222228d8ba445958a75a0704d566bf2c81461022657600080fd5b60008180602001905181019061023c9190610d3c565b905060008460008151811061025357610253610bd5565b602002602001015190506102ca826000015160008151811061027757610277610bd5565b6020026020010151836040015160008151811061029657610296610bd5565b60200260200101518385604001516001815181106102b6576102b6610bd5565b6020026020010151600087606001516105ad565b6103c082600001516001815181106102e4576102e4610bd5565b6020026020010151836040015160018151811061030357610303610bd5565b6020026020010151846040015160018151811061032257610322610bd5565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015610372573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103969190610e08565b85604001516000815181106103ad576103ad610bd5565b60200260200101518587606001516105ad565b81604001516000815181106103d7576103d7610bd5565b602090810291909101015160405163a9059cbb60e01b815273ba12222222228d8ba445958a75a0704d566bf2c86004820152602481018390526001600160a01b039091169063a9059cbb906044016020604051808303816000875af1158015610444573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104689190610e21565b50816040015160008151811061048057610480610bd5565b60200260200101516001600160a01b031663a9059cbb60008054906101000a90046001600160a01b031684604001516000815181106104c1576104c1610bd5565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015610511573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105359190610e08565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015610580573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105a49190610e21565b50505050505050565b60405163095ea7b360e01b81526001600160a01b0387811660048301526024820186905286169063095ea7b3906044016020604051808303816000875af11580156105fc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106209190610e21565b5060408051610100810182526001600160a01b0387811682528581166020830190815262ffffff8581168486019081523060608601908152426080870190815260a087018c815260c088018b8152600060e08a01908152995163414bf38960e01b815289518916600482015296518816602488015293519094166044860152905185166064850152516084840152905160a48301525160c48201529251811660e484015290919088169063414bf38990610104016020604051808303816000875af11580156106f3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107179190610e08565b50604080516001600160a01b03808916825286166020820152908101869052606081018490527f25f1d03755df23c30e25db2dbd3891e31ce084bdfbfc46f9fe5e446ee5f9b2d49060800160405180910390a150505050505050565b634e487b7160e01b600052604160045260246000fd5b6040516080810167ffffffffffffffff811182821017156107ac576107ac610773565b60405290565b604051601f8201601f1916810167ffffffffffffffff811182821017156107db576107db610773565b604052919050565b600067ffffffffffffffff8211156107fd576107fd610773565b5060051b60200190565b6001600160a01b038116811461081c57600080fd5b50565b600082601f83011261083057600080fd5b81356020610845610840836107e3565b6107b2565b82815260059290921b8401810191818101908684111561086457600080fd5b8286015b8481101561088857803561087b81610807565b8352918301918301610868565b509695505050505050565b62ffffff8116811461081c57600080fd5b600080600080600060a086880312156108bc57600080fd5b853567ffffffffffffffff808211156108d457600080fd5b6108e089838a0161081f565b965060208801359150808211156108f657600080fd5b61090289838a0161081f565b9550604088013591508082111561091857600080fd5b506109258882890161081f565b935050606086013561093681610893565b949793965091946080013592915050565b600082601f83011261095857600080fd5b81356020610968610840836107e3565b82815260059290921b8401810191818101908684111561098757600080fd5b8286015b84811015610888578035835291830191830161098b565b600082601f8301126109b357600080fd5b813567ffffffffffffffff8111156109cd576109cd610773565b6109e0601f8201601f19166020016107b2565b8181528460208386010111156109f557600080fd5b816020850160208301376000918101602001919091529392505050565b60008060008060808587031215610a2857600080fd5b843567ffffffffffffffff80821115610a4057600080fd5b818701915087601f830112610a5457600080fd5b81356020610a64610840836107e3565b82815260059290921b8401810191818101908b841115610a8357600080fd5b948201945b83861015610aaa578535610a9b81610807565b82529482019490820190610a88565b98505088013592505080821115610ac057600080fd5b610acc88838901610947565b94506040870135915080821115610ae257600080fd5b610aee88838901610947565b93506060870135915080821115610b0457600080fd5b50610b11878288016109a2565b91505092959194509250565b600081518084526020808501945080840160005b83811015610b565781516001600160a01b031687529582019590820190600101610b31565b509495945050505050565b602081526000825160806020840152610b7d60a0840182610b1d565b90506020840151601f1980858403016040860152610b9b8383610b1d565b9250604086015191508085840301606086015250610bb98282610b1d565b91505062ffffff60608501511660808401528091505092915050565b634e487b7160e01b600052603260045260246000fd5b6000815180845260005b81811015610c1157602081850181015186830182015201610bf5565b506000602082860101526020601f19601f83011685010191505092915050565b6001600160a01b0385811682526080602080840182905286519184018290526000928782019290919060a0860190855b81811015610c7f578551851683529483019491830191600101610c61565b5050858103604087015287518082529082019350915080870160005b83811015610cb757815185529382019390820190600101610c9b565b505050508281036060840152610ccd8185610beb565b979650505050505050565b600082601f830112610ce957600080fd5b81516020610cf9610840836107e3565b82815260059290921b84018101918181019086841115610d1857600080fd5b8286015b84811015610888578051610d2f81610807565b8352918301918301610d1c565b600060208284031215610d4e57600080fd5b815167ffffffffffffffff80821115610d6657600080fd5b9083019060808286031215610d7a57600080fd5b610d82610789565b825182811115610d9157600080fd5b610d9d87828601610cd8565b825250602083015182811115610db257600080fd5b610dbe87828601610cd8565b602083015250604083015182811115610dd657600080fd5b610de287828601610cd8565b60408301525060608301519250610df883610893565b6060810192909252509392505050565b600060208284031215610e1a57600080fd5b5051919050565b600060208284031215610e3357600080fd5b81518015158114610e4357600080fd5b939250505056fea264697066735822122051e80441e89853f9f77fb1bf6cb3cbc4fba3462cc76862049360440e5414516264736f6c63430008120033", + "nonce": "0x70", + "chainId": "0xaa36a7" + }, + "additionalContracts": [], + "isFixedGasLimit": false + } + ], + "receipts": [ + { + "status": "0x1", + "cumulativeGasUsed": "0xba05d6", + "logs": [], + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "type": "0x2", + "transactionHash": "0x0a1539603504ad4b32d16519ee00e885c08259c2c59d6d4ae5326c43ac8ac45a", + "transactionIndex": "0x43", + "blockHash": "0x089b0bc6a82b1adec534df1e9bf619c612ae9955fa8cedc9e0ea69193ec17f87", + "blockNumber": "0x73f489", + "gasUsed": "0xd62b4", + "effectiveGasPrice": "0x463b5e78", + "from": "0xfe63ba8189215e5c975e73643b96066b6ad41a45", + "to": null, + "contractAddress": "0x617270b4d0f635a6d4def5017434dc9b4895381e" + } + ], + "libraries": [], + "pending": [], + "returns": { + "0": { + "internal_type": "contract Arbitrage", + "value": "0x617270b4d0f635A6d4dEF5017434dc9b4895381e" + } + }, + "timestamp": 1738193824, + "chain": 11155111, + "commit": "9e0eaed" +} \ No newline at end of file diff --git a/broadcast/DeployArbitrage.s.sol/11155111/run-1738193891.json b/broadcast/DeployArbitrage.s.sol/11155111/run-1738193891.json new file mode 100644 index 0000000..e5788aa --- /dev/null +++ b/broadcast/DeployArbitrage.s.sol/11155111/run-1738193891.json @@ -0,0 +1,51 @@ +{ + "transactions": [ + { + "hash": "0x0a1539603504ad4b32d16519ee00e885c08259c2c59d6d4ae5326c43ac8ac45a", + "transactionType": "CREATE", + "contractName": "Arbitrage", + "contractAddress": "0x617270b4d0f635a6d4def5017434dc9b4895381e", + "function": null, + "arguments": null, + "transaction": { + "from": "0xfe63ba8189215e5c975e73643b96066b6ad41a45", + "gas": "0x1166b6", + "value": "0x0", + "input": "0x608060405234801561001057600080fd5b50600080546001600160a01b03191633179055610e80806100326000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c806361fe164b146100465780638da5cb5b1461005b578063f04f27071461008a575b600080fd5b6100596100543660046108a4565b61009d565b005b60005461006e906001600160a01b031681565b6040516001600160a01b03909116815260200160405180910390f35b610059610098366004610a12565b610206565b600060405180608001604052808781526020018681526020018581526020018462ffffff168152506040516020016100d59190610b61565b60408051601f198184030181526001808452838301909252925060009190602080830190803683370190505090508460008151811061011657610116610bd5565b60200260200101518160008151811061013157610131610bd5565b6001600160a01b039290921660209283029190910190910152604080516001808252818301909252600091816020016020820280368337019050509050838160008151811061018257610182610bd5565b6020908102919091010152604051632e1c224f60e11b815273ba12222222228d8ba445958a75a0704d566bf2c890635c38449e906101ca903090869086908990600401610c31565b600060405180830381600087803b1580156101e457600080fd5b505af11580156101f8573d6000803e3d6000fd5b505050505050505050505050565b3373ba12222222228d8ba445958a75a0704d566bf2c81461022657600080fd5b60008180602001905181019061023c9190610d3c565b905060008460008151811061025357610253610bd5565b602002602001015190506102ca826000015160008151811061027757610277610bd5565b6020026020010151836040015160008151811061029657610296610bd5565b60200260200101518385604001516001815181106102b6576102b6610bd5565b6020026020010151600087606001516105ad565b6103c082600001516001815181106102e4576102e4610bd5565b6020026020010151836040015160018151811061030357610303610bd5565b6020026020010151846040015160018151811061032257610322610bd5565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015610372573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103969190610e08565b85604001516000815181106103ad576103ad610bd5565b60200260200101518587606001516105ad565b81604001516000815181106103d7576103d7610bd5565b602090810291909101015160405163a9059cbb60e01b815273ba12222222228d8ba445958a75a0704d566bf2c86004820152602481018390526001600160a01b039091169063a9059cbb906044016020604051808303816000875af1158015610444573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104689190610e21565b50816040015160008151811061048057610480610bd5565b60200260200101516001600160a01b031663a9059cbb60008054906101000a90046001600160a01b031684604001516000815181106104c1576104c1610bd5565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015610511573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105359190610e08565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015610580573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105a49190610e21565b50505050505050565b60405163095ea7b360e01b81526001600160a01b0387811660048301526024820186905286169063095ea7b3906044016020604051808303816000875af11580156105fc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106209190610e21565b5060408051610100810182526001600160a01b0387811682528581166020830190815262ffffff8581168486019081523060608601908152426080870190815260a087018c815260c088018b8152600060e08a01908152995163414bf38960e01b815289518916600482015296518816602488015293519094166044860152905185166064850152516084840152905160a48301525160c48201529251811660e484015290919088169063414bf38990610104016020604051808303816000875af11580156106f3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107179190610e08565b50604080516001600160a01b03808916825286166020820152908101869052606081018490527f25f1d03755df23c30e25db2dbd3891e31ce084bdfbfc46f9fe5e446ee5f9b2d49060800160405180910390a150505050505050565b634e487b7160e01b600052604160045260246000fd5b6040516080810167ffffffffffffffff811182821017156107ac576107ac610773565b60405290565b604051601f8201601f1916810167ffffffffffffffff811182821017156107db576107db610773565b604052919050565b600067ffffffffffffffff8211156107fd576107fd610773565b5060051b60200190565b6001600160a01b038116811461081c57600080fd5b50565b600082601f83011261083057600080fd5b81356020610845610840836107e3565b6107b2565b82815260059290921b8401810191818101908684111561086457600080fd5b8286015b8481101561088857803561087b81610807565b8352918301918301610868565b509695505050505050565b62ffffff8116811461081c57600080fd5b600080600080600060a086880312156108bc57600080fd5b853567ffffffffffffffff808211156108d457600080fd5b6108e089838a0161081f565b965060208801359150808211156108f657600080fd5b61090289838a0161081f565b9550604088013591508082111561091857600080fd5b506109258882890161081f565b935050606086013561093681610893565b949793965091946080013592915050565b600082601f83011261095857600080fd5b81356020610968610840836107e3565b82815260059290921b8401810191818101908684111561098757600080fd5b8286015b84811015610888578035835291830191830161098b565b600082601f8301126109b357600080fd5b813567ffffffffffffffff8111156109cd576109cd610773565b6109e0601f8201601f19166020016107b2565b8181528460208386010111156109f557600080fd5b816020850160208301376000918101602001919091529392505050565b60008060008060808587031215610a2857600080fd5b843567ffffffffffffffff80821115610a4057600080fd5b818701915087601f830112610a5457600080fd5b81356020610a64610840836107e3565b82815260059290921b8401810191818101908b841115610a8357600080fd5b948201945b83861015610aaa578535610a9b81610807565b82529482019490820190610a88565b98505088013592505080821115610ac057600080fd5b610acc88838901610947565b94506040870135915080821115610ae257600080fd5b610aee88838901610947565b93506060870135915080821115610b0457600080fd5b50610b11878288016109a2565b91505092959194509250565b600081518084526020808501945080840160005b83811015610b565781516001600160a01b031687529582019590820190600101610b31565b509495945050505050565b602081526000825160806020840152610b7d60a0840182610b1d565b90506020840151601f1980858403016040860152610b9b8383610b1d565b9250604086015191508085840301606086015250610bb98282610b1d565b91505062ffffff60608501511660808401528091505092915050565b634e487b7160e01b600052603260045260246000fd5b6000815180845260005b81811015610c1157602081850181015186830182015201610bf5565b506000602082860101526020601f19601f83011685010191505092915050565b6001600160a01b0385811682526080602080840182905286519184018290526000928782019290919060a0860190855b81811015610c7f578551851683529483019491830191600101610c61565b5050858103604087015287518082529082019350915080870160005b83811015610cb757815185529382019390820190600101610c9b565b505050508281036060840152610ccd8185610beb565b979650505050505050565b600082601f830112610ce957600080fd5b81516020610cf9610840836107e3565b82815260059290921b84018101918181019086841115610d1857600080fd5b8286015b84811015610888578051610d2f81610807565b8352918301918301610d1c565b600060208284031215610d4e57600080fd5b815167ffffffffffffffff80821115610d6657600080fd5b9083019060808286031215610d7a57600080fd5b610d82610789565b825182811115610d9157600080fd5b610d9d87828601610cd8565b825250602083015182811115610db257600080fd5b610dbe87828601610cd8565b602083015250604083015182811115610dd657600080fd5b610de287828601610cd8565b60408301525060608301519250610df883610893565b6060810192909252509392505050565b600060208284031215610e1a57600080fd5b5051919050565b600060208284031215610e3357600080fd5b81518015158114610e4357600080fd5b939250505056fea264697066735822122051e80441e89853f9f77fb1bf6cb3cbc4fba3462cc76862049360440e5414516264736f6c63430008120033", + "nonce": "0x70", + "chainId": "0xaa36a7" + }, + "additionalContracts": [], + "isFixedGasLimit": false + } + ], + "receipts": [ + { + "status": "0x1", + "cumulativeGasUsed": "0xba05d6", + "logs": [], + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "type": "0x2", + "transactionHash": "0x0a1539603504ad4b32d16519ee00e885c08259c2c59d6d4ae5326c43ac8ac45a", + "transactionIndex": "0x43", + "blockHash": "0x089b0bc6a82b1adec534df1e9bf619c612ae9955fa8cedc9e0ea69193ec17f87", + "blockNumber": "0x73f489", + "gasUsed": "0xd62b4", + "effectiveGasPrice": "0x463b5e78", + "from": "0xfe63ba8189215e5c975e73643b96066b6ad41a45", + "to": null, + "contractAddress": "0x617270b4d0f635a6d4def5017434dc9b4895381e" + } + ], + "libraries": [], + "pending": [], + "returns": { + "0": { + "internal_type": "contract Arbitrage", + "value": "0x617270b4d0f635A6d4dEF5017434dc9b4895381e" + } + }, + "timestamp": 1738193891, + "chain": 11155111, + "commit": "9e0eaed" +} \ No newline at end of file diff --git a/broadcast/DeployArbitrage.s.sol/11155111/run-1738194037.json b/broadcast/DeployArbitrage.s.sol/11155111/run-1738194037.json new file mode 100644 index 0000000..c2247d9 --- /dev/null +++ b/broadcast/DeployArbitrage.s.sol/11155111/run-1738194037.json @@ -0,0 +1,51 @@ +{ + "transactions": [ + { + "hash": "0x0a1539603504ad4b32d16519ee00e885c08259c2c59d6d4ae5326c43ac8ac45a", + "transactionType": "CREATE", + "contractName": "Arbitrage", + "contractAddress": "0x617270b4d0f635a6d4def5017434dc9b4895381e", + "function": null, + "arguments": null, + "transaction": { + "from": "0xfe63ba8189215e5c975e73643b96066b6ad41a45", + "gas": "0x1166b6", + "value": "0x0", + "input": "0x608060405234801561001057600080fd5b50600080546001600160a01b03191633179055610e80806100326000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c806361fe164b146100465780638da5cb5b1461005b578063f04f27071461008a575b600080fd5b6100596100543660046108a4565b61009d565b005b60005461006e906001600160a01b031681565b6040516001600160a01b03909116815260200160405180910390f35b610059610098366004610a12565b610206565b600060405180608001604052808781526020018681526020018581526020018462ffffff168152506040516020016100d59190610b61565b60408051601f198184030181526001808452838301909252925060009190602080830190803683370190505090508460008151811061011657610116610bd5565b60200260200101518160008151811061013157610131610bd5565b6001600160a01b039290921660209283029190910190910152604080516001808252818301909252600091816020016020820280368337019050509050838160008151811061018257610182610bd5565b6020908102919091010152604051632e1c224f60e11b815273ba12222222228d8ba445958a75a0704d566bf2c890635c38449e906101ca903090869086908990600401610c31565b600060405180830381600087803b1580156101e457600080fd5b505af11580156101f8573d6000803e3d6000fd5b505050505050505050505050565b3373ba12222222228d8ba445958a75a0704d566bf2c81461022657600080fd5b60008180602001905181019061023c9190610d3c565b905060008460008151811061025357610253610bd5565b602002602001015190506102ca826000015160008151811061027757610277610bd5565b6020026020010151836040015160008151811061029657610296610bd5565b60200260200101518385604001516001815181106102b6576102b6610bd5565b6020026020010151600087606001516105ad565b6103c082600001516001815181106102e4576102e4610bd5565b6020026020010151836040015160018151811061030357610303610bd5565b6020026020010151846040015160018151811061032257610322610bd5565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015610372573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103969190610e08565b85604001516000815181106103ad576103ad610bd5565b60200260200101518587606001516105ad565b81604001516000815181106103d7576103d7610bd5565b602090810291909101015160405163a9059cbb60e01b815273ba12222222228d8ba445958a75a0704d566bf2c86004820152602481018390526001600160a01b039091169063a9059cbb906044016020604051808303816000875af1158015610444573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104689190610e21565b50816040015160008151811061048057610480610bd5565b60200260200101516001600160a01b031663a9059cbb60008054906101000a90046001600160a01b031684604001516000815181106104c1576104c1610bd5565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015610511573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105359190610e08565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015610580573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105a49190610e21565b50505050505050565b60405163095ea7b360e01b81526001600160a01b0387811660048301526024820186905286169063095ea7b3906044016020604051808303816000875af11580156105fc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106209190610e21565b5060408051610100810182526001600160a01b0387811682528581166020830190815262ffffff8581168486019081523060608601908152426080870190815260a087018c815260c088018b8152600060e08a01908152995163414bf38960e01b815289518916600482015296518816602488015293519094166044860152905185166064850152516084840152905160a48301525160c48201529251811660e484015290919088169063414bf38990610104016020604051808303816000875af11580156106f3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107179190610e08565b50604080516001600160a01b03808916825286166020820152908101869052606081018490527f25f1d03755df23c30e25db2dbd3891e31ce084bdfbfc46f9fe5e446ee5f9b2d49060800160405180910390a150505050505050565b634e487b7160e01b600052604160045260246000fd5b6040516080810167ffffffffffffffff811182821017156107ac576107ac610773565b60405290565b604051601f8201601f1916810167ffffffffffffffff811182821017156107db576107db610773565b604052919050565b600067ffffffffffffffff8211156107fd576107fd610773565b5060051b60200190565b6001600160a01b038116811461081c57600080fd5b50565b600082601f83011261083057600080fd5b81356020610845610840836107e3565b6107b2565b82815260059290921b8401810191818101908684111561086457600080fd5b8286015b8481101561088857803561087b81610807565b8352918301918301610868565b509695505050505050565b62ffffff8116811461081c57600080fd5b600080600080600060a086880312156108bc57600080fd5b853567ffffffffffffffff808211156108d457600080fd5b6108e089838a0161081f565b965060208801359150808211156108f657600080fd5b61090289838a0161081f565b9550604088013591508082111561091857600080fd5b506109258882890161081f565b935050606086013561093681610893565b949793965091946080013592915050565b600082601f83011261095857600080fd5b81356020610968610840836107e3565b82815260059290921b8401810191818101908684111561098757600080fd5b8286015b84811015610888578035835291830191830161098b565b600082601f8301126109b357600080fd5b813567ffffffffffffffff8111156109cd576109cd610773565b6109e0601f8201601f19166020016107b2565b8181528460208386010111156109f557600080fd5b816020850160208301376000918101602001919091529392505050565b60008060008060808587031215610a2857600080fd5b843567ffffffffffffffff80821115610a4057600080fd5b818701915087601f830112610a5457600080fd5b81356020610a64610840836107e3565b82815260059290921b8401810191818101908b841115610a8357600080fd5b948201945b83861015610aaa578535610a9b81610807565b82529482019490820190610a88565b98505088013592505080821115610ac057600080fd5b610acc88838901610947565b94506040870135915080821115610ae257600080fd5b610aee88838901610947565b93506060870135915080821115610b0457600080fd5b50610b11878288016109a2565b91505092959194509250565b600081518084526020808501945080840160005b83811015610b565781516001600160a01b031687529582019590820190600101610b31565b509495945050505050565b602081526000825160806020840152610b7d60a0840182610b1d565b90506020840151601f1980858403016040860152610b9b8383610b1d565b9250604086015191508085840301606086015250610bb98282610b1d565b91505062ffffff60608501511660808401528091505092915050565b634e487b7160e01b600052603260045260246000fd5b6000815180845260005b81811015610c1157602081850181015186830182015201610bf5565b506000602082860101526020601f19601f83011685010191505092915050565b6001600160a01b0385811682526080602080840182905286519184018290526000928782019290919060a0860190855b81811015610c7f578551851683529483019491830191600101610c61565b5050858103604087015287518082529082019350915080870160005b83811015610cb757815185529382019390820190600101610c9b565b505050508281036060840152610ccd8185610beb565b979650505050505050565b600082601f830112610ce957600080fd5b81516020610cf9610840836107e3565b82815260059290921b84018101918181019086841115610d1857600080fd5b8286015b84811015610888578051610d2f81610807565b8352918301918301610d1c565b600060208284031215610d4e57600080fd5b815167ffffffffffffffff80821115610d6657600080fd5b9083019060808286031215610d7a57600080fd5b610d82610789565b825182811115610d9157600080fd5b610d9d87828601610cd8565b825250602083015182811115610db257600080fd5b610dbe87828601610cd8565b602083015250604083015182811115610dd657600080fd5b610de287828601610cd8565b60408301525060608301519250610df883610893565b6060810192909252509392505050565b600060208284031215610e1a57600080fd5b5051919050565b600060208284031215610e3357600080fd5b81518015158114610e4357600080fd5b939250505056fea264697066735822122051e80441e89853f9f77fb1bf6cb3cbc4fba3462cc76862049360440e5414516264736f6c63430008120033", + "nonce": "0x70", + "chainId": "0xaa36a7" + }, + "additionalContracts": [], + "isFixedGasLimit": false + } + ], + "receipts": [ + { + "status": "0x1", + "cumulativeGasUsed": "0xba05d6", + "logs": [], + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "type": "0x2", + "transactionHash": "0x0a1539603504ad4b32d16519ee00e885c08259c2c59d6d4ae5326c43ac8ac45a", + "transactionIndex": "0x43", + "blockHash": "0x089b0bc6a82b1adec534df1e9bf619c612ae9955fa8cedc9e0ea69193ec17f87", + "blockNumber": "0x73f489", + "gasUsed": "0xd62b4", + "effectiveGasPrice": "0x463b5e78", + "from": "0xfe63ba8189215e5c975e73643b96066b6ad41a45", + "to": null, + "contractAddress": "0x617270b4d0f635a6d4def5017434dc9b4895381e" + } + ], + "libraries": [], + "pending": [], + "returns": { + "0": { + "internal_type": "contract Arbitrage", + "value": "0x617270b4d0f635A6d4dEF5017434dc9b4895381e" + } + }, + "timestamp": 1738194037, + "chain": 11155111, + "commit": "9e0eaed" +} \ No newline at end of file diff --git a/broadcast/DeployArbitrage.s.sol/11155111/run-latest.json b/broadcast/DeployArbitrage.s.sol/11155111/run-latest.json new file mode 100644 index 0000000..c2247d9 --- /dev/null +++ b/broadcast/DeployArbitrage.s.sol/11155111/run-latest.json @@ -0,0 +1,51 @@ +{ + "transactions": [ + { + "hash": "0x0a1539603504ad4b32d16519ee00e885c08259c2c59d6d4ae5326c43ac8ac45a", + "transactionType": "CREATE", + "contractName": "Arbitrage", + "contractAddress": "0x617270b4d0f635a6d4def5017434dc9b4895381e", + "function": null, + "arguments": null, + "transaction": { + "from": "0xfe63ba8189215e5c975e73643b96066b6ad41a45", + "gas": "0x1166b6", + "value": "0x0", + "input": "0x608060405234801561001057600080fd5b50600080546001600160a01b03191633179055610e80806100326000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c806361fe164b146100465780638da5cb5b1461005b578063f04f27071461008a575b600080fd5b6100596100543660046108a4565b61009d565b005b60005461006e906001600160a01b031681565b6040516001600160a01b03909116815260200160405180910390f35b610059610098366004610a12565b610206565b600060405180608001604052808781526020018681526020018581526020018462ffffff168152506040516020016100d59190610b61565b60408051601f198184030181526001808452838301909252925060009190602080830190803683370190505090508460008151811061011657610116610bd5565b60200260200101518160008151811061013157610131610bd5565b6001600160a01b039290921660209283029190910190910152604080516001808252818301909252600091816020016020820280368337019050509050838160008151811061018257610182610bd5565b6020908102919091010152604051632e1c224f60e11b815273ba12222222228d8ba445958a75a0704d566bf2c890635c38449e906101ca903090869086908990600401610c31565b600060405180830381600087803b1580156101e457600080fd5b505af11580156101f8573d6000803e3d6000fd5b505050505050505050505050565b3373ba12222222228d8ba445958a75a0704d566bf2c81461022657600080fd5b60008180602001905181019061023c9190610d3c565b905060008460008151811061025357610253610bd5565b602002602001015190506102ca826000015160008151811061027757610277610bd5565b6020026020010151836040015160008151811061029657610296610bd5565b60200260200101518385604001516001815181106102b6576102b6610bd5565b6020026020010151600087606001516105ad565b6103c082600001516001815181106102e4576102e4610bd5565b6020026020010151836040015160018151811061030357610303610bd5565b6020026020010151846040015160018151811061032257610322610bd5565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015610372573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103969190610e08565b85604001516000815181106103ad576103ad610bd5565b60200260200101518587606001516105ad565b81604001516000815181106103d7576103d7610bd5565b602090810291909101015160405163a9059cbb60e01b815273ba12222222228d8ba445958a75a0704d566bf2c86004820152602481018390526001600160a01b039091169063a9059cbb906044016020604051808303816000875af1158015610444573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104689190610e21565b50816040015160008151811061048057610480610bd5565b60200260200101516001600160a01b031663a9059cbb60008054906101000a90046001600160a01b031684604001516000815181106104c1576104c1610bd5565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015610511573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105359190610e08565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015610580573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105a49190610e21565b50505050505050565b60405163095ea7b360e01b81526001600160a01b0387811660048301526024820186905286169063095ea7b3906044016020604051808303816000875af11580156105fc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106209190610e21565b5060408051610100810182526001600160a01b0387811682528581166020830190815262ffffff8581168486019081523060608601908152426080870190815260a087018c815260c088018b8152600060e08a01908152995163414bf38960e01b815289518916600482015296518816602488015293519094166044860152905185166064850152516084840152905160a48301525160c48201529251811660e484015290919088169063414bf38990610104016020604051808303816000875af11580156106f3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107179190610e08565b50604080516001600160a01b03808916825286166020820152908101869052606081018490527f25f1d03755df23c30e25db2dbd3891e31ce084bdfbfc46f9fe5e446ee5f9b2d49060800160405180910390a150505050505050565b634e487b7160e01b600052604160045260246000fd5b6040516080810167ffffffffffffffff811182821017156107ac576107ac610773565b60405290565b604051601f8201601f1916810167ffffffffffffffff811182821017156107db576107db610773565b604052919050565b600067ffffffffffffffff8211156107fd576107fd610773565b5060051b60200190565b6001600160a01b038116811461081c57600080fd5b50565b600082601f83011261083057600080fd5b81356020610845610840836107e3565b6107b2565b82815260059290921b8401810191818101908684111561086457600080fd5b8286015b8481101561088857803561087b81610807565b8352918301918301610868565b509695505050505050565b62ffffff8116811461081c57600080fd5b600080600080600060a086880312156108bc57600080fd5b853567ffffffffffffffff808211156108d457600080fd5b6108e089838a0161081f565b965060208801359150808211156108f657600080fd5b61090289838a0161081f565b9550604088013591508082111561091857600080fd5b506109258882890161081f565b935050606086013561093681610893565b949793965091946080013592915050565b600082601f83011261095857600080fd5b81356020610968610840836107e3565b82815260059290921b8401810191818101908684111561098757600080fd5b8286015b84811015610888578035835291830191830161098b565b600082601f8301126109b357600080fd5b813567ffffffffffffffff8111156109cd576109cd610773565b6109e0601f8201601f19166020016107b2565b8181528460208386010111156109f557600080fd5b816020850160208301376000918101602001919091529392505050565b60008060008060808587031215610a2857600080fd5b843567ffffffffffffffff80821115610a4057600080fd5b818701915087601f830112610a5457600080fd5b81356020610a64610840836107e3565b82815260059290921b8401810191818101908b841115610a8357600080fd5b948201945b83861015610aaa578535610a9b81610807565b82529482019490820190610a88565b98505088013592505080821115610ac057600080fd5b610acc88838901610947565b94506040870135915080821115610ae257600080fd5b610aee88838901610947565b93506060870135915080821115610b0457600080fd5b50610b11878288016109a2565b91505092959194509250565b600081518084526020808501945080840160005b83811015610b565781516001600160a01b031687529582019590820190600101610b31565b509495945050505050565b602081526000825160806020840152610b7d60a0840182610b1d565b90506020840151601f1980858403016040860152610b9b8383610b1d565b9250604086015191508085840301606086015250610bb98282610b1d565b91505062ffffff60608501511660808401528091505092915050565b634e487b7160e01b600052603260045260246000fd5b6000815180845260005b81811015610c1157602081850181015186830182015201610bf5565b506000602082860101526020601f19601f83011685010191505092915050565b6001600160a01b0385811682526080602080840182905286519184018290526000928782019290919060a0860190855b81811015610c7f578551851683529483019491830191600101610c61565b5050858103604087015287518082529082019350915080870160005b83811015610cb757815185529382019390820190600101610c9b565b505050508281036060840152610ccd8185610beb565b979650505050505050565b600082601f830112610ce957600080fd5b81516020610cf9610840836107e3565b82815260059290921b84018101918181019086841115610d1857600080fd5b8286015b84811015610888578051610d2f81610807565b8352918301918301610d1c565b600060208284031215610d4e57600080fd5b815167ffffffffffffffff80821115610d6657600080fd5b9083019060808286031215610d7a57600080fd5b610d82610789565b825182811115610d9157600080fd5b610d9d87828601610cd8565b825250602083015182811115610db257600080fd5b610dbe87828601610cd8565b602083015250604083015182811115610dd657600080fd5b610de287828601610cd8565b60408301525060608301519250610df883610893565b6060810192909252509392505050565b600060208284031215610e1a57600080fd5b5051919050565b600060208284031215610e3357600080fd5b81518015158114610e4357600080fd5b939250505056fea264697066735822122051e80441e89853f9f77fb1bf6cb3cbc4fba3462cc76862049360440e5414516264736f6c63430008120033", + "nonce": "0x70", + "chainId": "0xaa36a7" + }, + "additionalContracts": [], + "isFixedGasLimit": false + } + ], + "receipts": [ + { + "status": "0x1", + "cumulativeGasUsed": "0xba05d6", + "logs": [], + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "type": "0x2", + "transactionHash": "0x0a1539603504ad4b32d16519ee00e885c08259c2c59d6d4ae5326c43ac8ac45a", + "transactionIndex": "0x43", + "blockHash": "0x089b0bc6a82b1adec534df1e9bf619c612ae9955fa8cedc9e0ea69193ec17f87", + "blockNumber": "0x73f489", + "gasUsed": "0xd62b4", + "effectiveGasPrice": "0x463b5e78", + "from": "0xfe63ba8189215e5c975e73643b96066b6ad41a45", + "to": null, + "contractAddress": "0x617270b4d0f635a6d4def5017434dc9b4895381e" + } + ], + "libraries": [], + "pending": [], + "returns": { + "0": { + "internal_type": "contract Arbitrage", + "value": "0x617270b4d0f635A6d4dEF5017434dc9b4895381e" + } + }, + "timestamp": 1738194037, + "chain": 11155111, + "commit": "9e0eaed" +} \ No newline at end of file diff --git a/script/Counter.s.sol b/script/Counter.s.sol deleted file mode 100644 index cdc1fe9..0000000 --- a/script/Counter.s.sol +++ /dev/null @@ -1,19 +0,0 @@ -// SPDX-License-Identifier: UNLICENSED -pragma solidity ^0.8.13; - -import {Script, console} from "forge-std/Script.sol"; -import {Counter} from "../src/Counter.sol"; - -contract CounterScript is Script { - Counter public counter; - - function setUp() public {} - - function run() public { - vm.startBroadcast(); - - counter = new Counter(); - - vm.stopBroadcast(); - } -} diff --git a/script/DeployArbitrage.s.sol b/script/DeployArbitrage.s.sol index 458d7dd..a883ddb 100644 --- a/script/DeployArbitrage.s.sol +++ b/script/DeployArbitrage.s.sol @@ -1,24 +1,27 @@ // SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.13; -import {Script, console} from "forge-std/Script.sol"; +import {Script, console2} 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; + HelperConfig.NetworkConfig modeConfig; + HelperConfig.ForkNetworkConfig SepoliaConfig; Arbitrage public arbitrage; function setUp() public { helperConfig = new HelperConfig(); - currentConfig = helperConfig.getBaseSepoliaConfig(); + SepoliaConfig = helperConfig.getSepoliaETHConfig(); } function run() public returns (Arbitrage) { vm.startBroadcast(); arbitrage = new Arbitrage(); vm.stopBroadcast(); + + console2.log("Arbitrage contract deployed to:", address(arbitrage)); return arbitrage; } } diff --git a/script/HelperConfig.s.sol b/script/HelperConfig.s.sol index 295bdb6..1c95932 100644 --- a/script/HelperConfig.s.sol +++ b/script/HelperConfig.s.sol @@ -12,90 +12,87 @@ contract HelperConfig is Script { /*////////////////////////////////////////////////////////////// TYPES //////////////////////////////////////////////////////////////*/ + struct ForkNetworkConfig { + address weth; // Base Network WETH + address usdc; // Base Network USDC + address uniswapFactory; // Uniswap V3 + address uniswapRouter; // Uniswap V3 + address uniswapQuoter; // Uniswap V3 + address pancakeSwapFactory; // PankcakeSwap V3 + address pancakeSwapRouter; // PankcakeSwap V3 + address pancakeSwapQuoter; // PankcakeSwap V3 + } + struct NetworkConfig { - address weth; - address usdc; - address uniswapFactory; //Uniswap V3 - address uniswapRouter; //Uniswap V3 - address uniswapQuoter; - address sushiswapFactory; - address sushiswapRouter; - address sushiswapQuoter; + address weth; // Mode Network WETH + address usdc; // Mode Network USDC + address velodromeFinanceFactory; // Need To Find Mode Supported DEX + address velodromeFinanceRouter; //Need To Find Mode Supported DEX + address velodromeFinanceQuoter; // Need To Find Mode Supported DEX + address sushiSwapFactory; // Sushiswap V3 + address sushiSwapRouter; // Sushiswap V3 + address sushiSwapQuoter; // Sushiswap V3 } /*////////////////////////////////////////////////////////////// CONFIGS //////////////////////////////////////////////////////////////*/ - function getBaseSepoliaConfig() public pure returns (NetworkConfig memory) { - NetworkConfig memory SepoliaConfig = NetworkConfig({ + function getSepoliaETHConfig() public pure returns (ForkNetworkConfig memory) { + ForkNetworkConfig memory SepoliaConfig = ForkNetworkConfig({ weth: 0x4200000000000000000000000000000000000006, - usdc: 0x036CbD53842c5426634e7929541eC2318f3dCF7e, - uniswapFactory: 0x4752ba5DBc23f44D87826276BF6Fd6b1C372aD24, - uniswapRouter: 0x94cC0AaC535CCDB3C01d6787D6413C739ae12bc4, - uniswapQuoter: 0xC5290058841028F1614F3A6F0F5816cAd0df5E27, - sushiswapFactory: address(0), - sushiswapRouter: address(0), - sushiswapQuoter: address(0) - }); - return SepoliaConfig; - } - - function getETHSepoliaConfig() public pure returns (NetworkConfig memory) { - NetworkConfig memory SepoliaConfig = NetworkConfig({ - weth: 0xfFf9976782d46CC05630D1f6eBAb18b2324d6B14, usdc: 0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238, uniswapFactory: 0x0227628f3F023bb0B980b67D528571c95c6DaC1c, uniswapRouter: 0x3bFA4769FB09eefC5a80d6E87c3B9C650f7Ae48E, uniswapQuoter: 0xEd1f6473345F45b75F8179591dd5bA1888cf2FB3, - sushiswapFactory: address(0), - sushiswapRouter: 0x93c31c9C729A249b2877F7699e178F4720407733, - sushiswapQuoter: 0x039e87AB90205F9d87c5b40d4B28e2Be45dA4a20 + pancakeSwapFactory: 0x0BFbCF9fa4f9C56B0F40a671Ad40E0805A091865, + pancakeSwapRouter: 0x1b81D678ffb9C0263b24A97847620C99d213eB14, + pancakeSwapQuoter: 0xB048Bbc1Ee6b733FFfCFb9e9CeF7375518e25997 }); return SepoliaConfig; } - function getModeSepoliaConfig() public pure returns (NetworkConfig memory) { - NetworkConfig memory SepoliaConfig = NetworkConfig({ - weth: address(0), - usdc: address(0), - uniswapFactory: 0x879A0F1E8402E37ECC56C53C55B6E02EB704eDD4, - uniswapRouter: 0x9eE1289c21321E212994B23Bf0b4Cdc453C17EEE, - uniswapQuoter: address(0), - sushiswapFactory: address(0), - sushiswapRouter: address(0), - sushiswapQuoter: address(0) + function getBaseSepoliaConfig() public pure returns (ForkNetworkConfig memory) { + ForkNetworkConfig memory BaseSepoliaConfig = ForkNetworkConfig({ + weth: 0x4200000000000000000000000000000000000006, + usdc: 0x036CbD53842c5426634e7929541eC2318f3dCF7e, + uniswapFactory: 0x4752ba5DBc23f44D87826276BF6Fd6b1C372aD24, + uniswapRouter: 0x94cC0AaC535CCDB3C01d6787D6413C739ae12bc4, + uniswapQuoter: 0xC5290058841028F1614F3A6F0F5816cAd0df5E27, + pancakeSwapFactory: 0x0BFbCF9fa4f9C56B0F40a671Ad40E0805A091865, + pancakeSwapRouter: 0x1b81D678ffb9C0263b24A97847620C99d213eB14, + pancakeSwapQuoter: 0xB048Bbc1Ee6b733FFfCFb9e9CeF7375518e25997 }); - return SepoliaConfig; + return BaseSepoliaConfig; } function getModeMainnetConfig() public pure returns (NetworkConfig memory) { - NetworkConfig memory SepoliaConfig = NetworkConfig({ + NetworkConfig memory ModeConfig = NetworkConfig({ weth: address(0), usdc: 0xd988097fb8612cc24eeC14542bC03424c656005f, - uniswapFactory: address(0), - uniswapRouter: address(0), - uniswapQuoter: address(0), - sushiswapFactory: address(0), - sushiswapRouter: 0xf2614A233c7C3e7f08b1F887Ba133a13f1eb2c55, - sushiswapQuoter: address(0) + velodromeFinanceFactory: 0xCc0bDDB707055e04e497aB22a59c2aF4391cd12F, + velodromeFinanceRouter: 0x0792a633F0c19c351081CF4B211F68F79bCc9676, + velodromeFinanceQuoter: 0x89D8218ed5fF1e46d8dcd33fb0bbeE3be1621466, + sushiSwapFactory: address(0), + sushiSwapRouter: 0xf2614A233c7C3e7f08b1F887Ba133a13f1eb2c55, + sushiSwapQuoter: address(0) }); - return SepoliaConfig; + return ModeConfig; } /*////////////////////////////////////////////////////////////// LOCAL CONFIG //////////////////////////////////////////////////////////////*/ - function getAnvilConfig() public pure returns (NetworkConfig memory) { + function getAnvilConfig() public pure returns (ForkNetworkConfig memory) { console2.log("Testing On Anvil Network"); - NetworkConfig memory AnvilConfig = NetworkConfig({ + ForkNetworkConfig memory AnvilConfig = ForkNetworkConfig({ weth: address(0), usdc: address(1), uniswapFactory: address(2), uniswapRouter: address(3), uniswapQuoter: address(6), - sushiswapFactory: address(4), - sushiswapRouter: address(5), - sushiswapQuoter: address(6) + pancakeSwapFactory: address(4), + pancakeSwapRouter: address(5), + pancakeSwapQuoter: address(6) }); return AnvilConfig; } diff --git a/script/PriceManipulation.s.sol b/script/PriceManipulation.s.sol new file mode 100644 index 0000000..f4b46ea --- /dev/null +++ b/script/PriceManipulation.s.sol @@ -0,0 +1,97 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.18; + +import {Script, console} from "forge-std/Script.sol"; +import {HelperConfig} from "./HelperConfig.s.sol"; +import {IERC20} from "@openzeppelin/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol"; +import {ISwapRouter} from "@uniswap/v3-periphery/contracts/interfaces/ISwapRouter.sol"; +import {IQuoterV2} from "@uniswap/v3-periphery/contracts/interfaces/IQuoterV2.sol"; + +contract PriceManipulation is Script { + // Configuration + HelperConfig.ForkNetworkConfig public networkConfig; + HelperConfig public helperConfig; + + // Constants + uint24 constant POOL_FEE = 500; + uint256 constant MANIPULATION_AMOUNT = 1000 ether; // Large swap to create price impact + address constant UNLOCKED_ACCOUNT = 0xb2cc224c1c9feE385f8ad6a55b4d94E92359DC59; // EOS address + + function setUp() public { + console.log("Starting setup..."); + helperConfig = new HelperConfig(); + networkConfig = helperConfig.getSepoliaETHConfig(); + console.log("Setup complete. Config loaded."); + console.log("WETH address:", networkConfig.weth); + console.log("PancakeSwap Router:", networkConfig.pancakeSwapRouter); + } + + function getPriceQuote(address tokenIn, address tokenOut) internal returns (uint256) { + IQuoterV2 quoter = IQuoterV2(networkConfig.pancakeSwapQuoter); + + IQuoterV2.QuoteExactInputSingleParams memory params = IQuoterV2.QuoteExactInputSingleParams({ + tokenIn: tokenIn, + tokenOut: tokenOut, + amountIn: 1 ether, // Quote for 1 WETH + fee: POOL_FEE, + sqrtPriceLimitX96: 0 + }); + + (uint256 amountOut,,,) = quoter.quoteExactInputSingle(params); + return amountOut; + } + + function run() public { + console.log("Starting script execution..."); + + console.log("Dealing ETH to whale..."); + // Only need ETH for gas + vm.deal(UNLOCKED_ACCOUNT, 1 ether); + + // Log initial balances and price + uint256 initialWethBalance = IERC20(networkConfig.weth).balanceOf(UNLOCKED_ACCOUNT); + uint256 initialUsdcBalance = IERC20(networkConfig.usdc).balanceOf(UNLOCKED_ACCOUNT); + uint256 initialPrice = getPriceQuote(networkConfig.weth, networkConfig.usdc); + + console.log("Initial WETH Balance:", initialWethBalance / 1e18, "WETH"); + console.log("Initial USDC Balance:", initialUsdcBalance / 1e6, "USDC"); + console.log("Initial WETH/USDC Price:", initialPrice / 1e6); + + // Impersonate account + vm.startPrank(UNLOCKED_ACCOUNT); + + // Get token contract and approve + IERC20(networkConfig.weth).approve(networkConfig.pancakeSwapRouter, MANIPULATION_AMOUNT); + + // Create a large swap to impact price + ISwapRouter router = ISwapRouter(networkConfig.pancakeSwapRouter); + + ISwapRouter.ExactInputSingleParams memory params = ISwapRouter.ExactInputSingleParams({ + tokenIn: networkConfig.weth, + tokenOut: networkConfig.usdc, + fee: POOL_FEE, + recipient: UNLOCKED_ACCOUNT, + deadline: block.timestamp + 20 minutes, + amountIn: MANIPULATION_AMOUNT, + amountOutMinimum: 0, + sqrtPriceLimitX96: 0 + }); + + router.exactInputSingle(params); + + // Log final balances and price + uint256 finalWethBalance = IERC20(networkConfig.weth).balanceOf(UNLOCKED_ACCOUNT); + uint256 finalUsdcBalance = IERC20(networkConfig.usdc).balanceOf(UNLOCKED_ACCOUNT); + uint256 finalPrice = getPriceQuote(networkConfig.weth, networkConfig.usdc); + + console.log("\nFinal WETH Balance:", finalWethBalance / 1e18, "WETH"); + console.log("Final USDC Balance:", finalUsdcBalance / 1e6, "USDC"); + console.log("Final WETH/USDC Price:", finalPrice / 1e6); + int256 priceImpact = ((int256(finalPrice) - int256(initialPrice)) * 100) / int256(initialPrice); + console.log("Price Impact:"); + console.logInt(priceImpact); + console.log("%"); + + vm.stopPrank(); + } +} diff --git a/script/Swap.s.sol b/script/Swap.s.sol index 3177c04..6b4b558 100644 --- a/script/Swap.s.sol +++ b/script/Swap.s.sol @@ -14,32 +14,32 @@ contract Swap is Script { HelperConfig public helperConfig; HelperConfig.NetworkConfig currentConfig; - function setUp() public { - helperConfig = new HelperConfig(); - currentConfig = helperConfig.getBaseSepoliaConfig(); - arbitrage = Arbitrage(payable(address(0))); - } + // 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 - ); + // function run() public { + // vm.startBroadcast(); + // bool success = IERC20(currentConfig.usdc).transfer( + // address(arbitrage), + // 2000000 + // ); - console.log("transfer usdc to arbitrage contract", success); + // console.log("transfer usdc to arbitrage contract", success); - uint256 amountOut = arbitrage._swapOnV3( - currentConfig.uniswapRouter, - currentConfig.uniswapQuoter, - currentConfig.usdc, - 2000000, - 0x4200000000000000000000000000000000000006, - 0, - 3000 - ); + // uint256 amountOut = arbitrage._swapOnV3( + // currentConfig.uniswapRouter, + // currentConfig.uniswapQuoter, + // currentConfig.usdc, + // 2000000, + // 0x4200000000000000000000000000000000000006, + // 0, + // 3000 + // ); - console.log("amount swapped", amountOut); - vm.stopBroadcast(); - } + // console.log("amount swapped", amountOut); + // vm.stopBroadcast(); + // } } diff --git a/src/Arbitrage.sol b/src/Arbitrage.sol index ed6eaf5..5381ec2 100644 --- a/src/Arbitrage.sol +++ b/src/Arbitrage.sol @@ -4,7 +4,6 @@ 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"; /** @@ -13,11 +12,9 @@ import {IQuoterV2} from "@uniswap/v3-periphery/contracts/interfaces/IQuoterV2.so * @notice Earn arbitrage between two DEX's using balancer Flash Loans. * @dev DEX's supported currently are the ones that share the same interface as uniswap(i.e. a fork). */ - contract Arbitrage is IFlashLoanRecipient { /// @notice Balancer Vault instance. - IVault private constant vault = - IVault(0xBA12222222228d8Ba445958a75a0704d566BF2C8); + IVault private constant vault = IVault(0xBA12222222228d8Ba445958a75a0704d566BF2C8); address public owner; @@ -29,14 +26,7 @@ contract Arbitrage is IFlashLoanRecipient { uint24 fee; } - event TokensSwapped( - address tokenIn, - address tokenOut, - uint256 amountIn, - uint256 minAmountOut, - uint256 quotedFee, - uint256 amountOut - ); + event TokensSwapped(address tokenIn, address tokenOut, uint256 amountIn, uint256 minAmountOut); constructor() { owner = msg.sender; @@ -49,14 +39,8 @@ contract Arbitrage is IFlashLoanRecipient { uint24 _fee, uint256 _flashAmount ) external { - bytes memory data = abi.encode( - Trade({ - routerPath: _routerPath, - quoterPath: _quoterPath, - tokenPath: _tokenPath, - fee: _fee - }) - ); + bytes memory data = + abi.encode(Trade({routerPath: _routerPath, quoterPath: _quoterPath, tokenPath: _tokenPath, fee: _fee})); // Token to flash loan, by default we are flash loaning 1 token. IERC20[] memory tokens = new IERC20[](1); @@ -85,22 +69,13 @@ contract Arbitrage is IFlashLoanRecipient { // We perform the 1st swap. // We swap the flashAmount of token0 and expect to get X amount of token1 - _swapOnV3( - trade.routerPath[0], - trade.quoterPath[0], - trade.tokenPath[0], - flashAmount, - trade.tokenPath[1], - 0, - trade.fee - ); + _swapOnV3(trade.routerPath[0], trade.tokenPath[0], flashAmount, trade.tokenPath[1], 0, trade.fee); // We perform the 2nd swap. // We swap the contract balance of token1 and // expect to at least get the flashAmount of token0 _swapOnV3( trade.routerPath[1], - trade.quoterPath[1], trade.tokenPath[1], IERC20(trade.tokenPath[1]).balanceOf(address(this)), trade.tokenPath[0], @@ -112,77 +87,37 @@ contract Arbitrage is IFlashLoanRecipient { IERC20(trade.tokenPath[0]).transfer(address(vault), flashAmount); // Transfer any excess tokens [i.e. profits] to owner - IERC20(trade.tokenPath[0]).transfer( - owner, - IERC20(trade.tokenPath[0]).balanceOf(address(this)) - ); + IERC20(trade.tokenPath[0]).transfer(owner, IERC20(trade.tokenPath[0]).balanceOf(address(this))); } // -- INTERNAL FUNCTIONS -- // function _swapOnV3( address _router, - address _quoter, address _tokenIn, uint256 _amountIn, address _tokenOut, uint256 _amountOut, uint24 _fee - ) public returns (uint256 amountOut) { + ) internal { // Approve token to swap IERC20(_tokenIn).approve(_router, _amountIn); // Setup swap parameters - ISwapRouter02.ExactInputSingleParams memory params = ISwapRouter02 - .ExactInputSingleParams({ - tokenIn: _tokenIn, - tokenOut: _tokenOut, - fee: _fee, - recipient: address(this), - amountIn: _amountIn, - amountOutMinimum: _amountOut, - sqrtPriceLimitX96: 0 - }); - - // Get fee amount - uint256 fee = getFeeQuote( - _quoter, - _tokenIn, - _tokenOut, - _amountIn, - _fee - ); + ISwapRouter.ExactInputSingleParams memory params = ISwapRouter.ExactInputSingleParams({ + tokenIn: _tokenIn, + tokenOut: _tokenOut, + fee: _fee, + recipient: address(this), + deadline: block.timestamp, + amountIn: _amountIn, + amountOutMinimum: _amountOut, + sqrtPriceLimitX96: 0 + }); // Perform swap - amountOut = ISwapRouter02(_router).exactInputSingle{value: fee}(params); - - emit TokensSwapped( - _tokenIn, - _tokenOut, - _amountIn, - _amountOut, - fee, - amountOut - ); - } + ISwapRouter(_router).exactInputSingle(params); - function getFeeQuote( - address _quoter, - 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) = IQuoterV2(_quoter).quoteExactInputSingle(params); + emit TokensSwapped(_tokenIn, _tokenOut, _amountIn, _amountOut); } - - receive() external payable {} } diff --git a/src/Counter.sol b/src/Counter.sol deleted file mode 100644 index aded799..0000000 --- a/src/Counter.sol +++ /dev/null @@ -1,14 +0,0 @@ -// SPDX-License-Identifier: UNLICENSED -pragma solidity ^0.8.13; - -contract Counter { - uint256 public number; - - function setNumber(uint256 newNumber) public { - number = newNumber; - } - - function increment() public { - number++; - } -} diff --git a/test/Counter.t.sol b/test/Counter.t.sol deleted file mode 100644 index 54b724f..0000000 --- a/test/Counter.t.sol +++ /dev/null @@ -1,24 +0,0 @@ -// SPDX-License-Identifier: UNLICENSED -pragma solidity ^0.8.13; - -import {Test, console} from "forge-std/Test.sol"; -import {Counter} from "../src/Counter.sol"; - -contract CounterTest is Test { - Counter public counter; - - function setUp() public { - counter = new Counter(); - counter.setNumber(0); - } - - function test_Increment() public { - counter.increment(); - assertEq(counter.number(), 1); - } - - function testFuzz_SetNumber(uint256 x) public { - counter.setNumber(x); - assertEq(counter.number(), x); - } -} diff --git a/test/fork/PriceManipulationTest.t.sol b/test/fork/PriceManipulationTest.t.sol new file mode 100644 index 0000000..8574de6 --- /dev/null +++ b/test/fork/PriceManipulationTest.t.sol @@ -0,0 +1,115 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.18; + +import {Test, console} from "forge-std/Test.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"; +import {IQuoterV2} from "@uniswap/v3-periphery/contracts/interfaces/IQuoterV2.sol"; + +contract PriceManipulationTest is Test { + // Configuration + HelperConfig.ForkNetworkConfig public networkConfig; + HelperConfig public helperConfig; + + // Constants + uint24 constant PANCAKE_FEE = 100; // 0.05% for PancakeSwap + uint24 constant UNISWAP_FEE = 500; // 0.05% for Uniswap + uint256 constant MANIPULATION_AMOUNT = 1 ether; // Large swap to create price impact + uint256 constant USDC_AMOUNT = 1 * 1e6; // 1000 USDC for testing + address constant UNLOCKED_ACCOUNT = 0x0172e05392aba65366C4dbBb70D958BbF43304E4; // EOS address + + function setUp() public { + console.log("Starting setup..."); + helperConfig = new HelperConfig(); + networkConfig = helperConfig.getSepoliaETHConfig(); + + // Verify fork creation + string memory rpcUrl = vm.envString("BASE_RPC_URL"); + vm.createSelectFork(rpcUrl, 25699770); + console.log("Fork created"); + + // Verify network config + console.log("WETH address:", networkConfig.weth); + console.log("USDC address:", networkConfig.usdc); + console.log("PancakeSwap Router:", networkConfig.pancakeSwapRouter); + console.log("Uniswap Router:", networkConfig.uniswapRouter); + } + + // ======================== + // UniSwap Tests + // ======================== + // function testUniswapWethToUsdc() public { + // vm.startPrank(UNLOCKED_ACCOUNT); + + // // 1. Check WETH balance + // uint256 wethBalance = IERC20(networkConfig.weth).balanceOf(UNLOCKED_ACCOUNT); + // require(wethBalance >= 1 ether, "Insufficient WETH balance"); + + // // 2. Approve WETH + // IERC20(networkConfig.weth).approve(networkConfig.uniswapRouter, 1 ether); + + // // 3. Get quote to validate output + // (uint256 quotedAmount,,,) = IQuoterV2(networkConfig.uniswapQuoter).quoteExactInputSingle( + // IQuoterV2.QuoteExactInputSingleParams({ + // tokenIn: networkConfig.weth, + // tokenOut: networkConfig.usdc, + // amountIn: 1 ether, + // fee: 500, + // sqrtPriceLimitX96: 0 + // }) + // ); + // require(quotedAmount > 0, "Invalid quote"); + + // // 4. Execute swap + // ISwapRouter.ExactInputSingleParams memory params = ISwapRouter.ExactInputSingleParams({ + // tokenIn: networkConfig.weth, + // tokenOut: networkConfig.usdc, + // fee: 500, + // recipient: UNLOCKED_ACCOUNT, + // deadline: block.timestamp + 20 minutes, + // amountIn: 1 ether, + // amountOutMinimum: 1, // Allow any output + // sqrtPriceLimitX96: 0 + // }); + + // uint256 amountOut = ISwapRouter(networkConfig.uniswapRouter).exactInputSingle(params); + // console.log("USDC Received:", amountOut); + // vm.stopPrank(); + // } + + // // ======================== + // // PancakeSwap Tests + // // ======================== + // function testPancakeSwapUsdcToWeth() public { + // vm.startPrank(UNLOCKED_ACCOUNT); + + // uint256 initialUsdc = IERC20(networkConfig.usdc).balanceOf(UNLOCKED_ACCOUNT); + // uint256 initialWeth = IERC20(networkConfig.weth).balanceOf(UNLOCKED_ACCOUNT); + + // // 1. Approve USDC + // IERC20(networkConfig.usdc).approve(networkConfig.pancakeSwapRouter, USDC_AMOUNT); + + // // 2. Execute Swap + // ISwapRouter.ExactInputSingleParams memory params = ISwapRouter.ExactInputSingleParams({ + // tokenIn: networkConfig.usdc, + // tokenOut: networkConfig.weth, + // fee: PANCAKE_FEE, + // recipient: UNLOCKED_ACCOUNT, + // deadline: block.timestamp + 20 minutes, + // amountIn: USDC_AMOUNT, + // amountOutMinimum: 1, // ✅ Match Hardhat script + // sqrtPriceLimitX96: 0 + // }); + + // // 3. Perform swap + // uint256 amountOut = ISwapRouter(networkConfig.pancakeSwapRouter).exactInputSingle(params); + + // // 4. Verify balances + // assertLt(IERC20(networkConfig.usdc).balanceOf(UNLOCKED_ACCOUNT), initialUsdc); + // assertGt(IERC20(networkConfig.weth).balanceOf(UNLOCKED_ACCOUNT), initialWeth); + // vm.stopPrank(); + // } + + function test_receiveFlashLoan() public {} +} diff --git a/test/unit/ArbitrageTest.t.sol b/test/unit/ArbitrageTest.t.sol index 710b969..79de255 100644 --- a/test/unit/ArbitrageTest.t.sol +++ b/test/unit/ArbitrageTest.t.sol @@ -11,7 +11,7 @@ import {ISwapRouter} from "@uniswap/v3-periphery/contracts/interfaces/ISwapRoute contract ArbitrageTest is Test { Arbitrage public arbitrage; HelperConfig public helperConfig; - HelperConfig.NetworkConfig currentConfig; + HelperConfig.ForkNetworkConfig public networkConfig; address owner = address(1); @@ -23,7 +23,7 @@ contract ArbitrageTest is Test { function setUp() public { helperConfig = new HelperConfig(); - currentConfig = helperConfig.getETHSepoliaConfig(); + networkConfig = helperConfig.getSepoliaETHConfig(); baseSepoliaFork = vm.createSelectFork(ETH_SEPOLIA_RPC_URL); @@ -31,28 +31,28 @@ contract ArbitrageTest is Test { arbitrage = new Arbitrage(); vm.stopPrank(); - deal(currentConfig.usdc, owner, 69); - deal(currentConfig.usdc, address(arbitrage), 69); + deal(networkConfig.usdc, owner, 69); + deal(networkConfig.usdc, address(arbitrage), 69); vm.deal(owner, 1 ether); vm.deal(address(arbitrage), 1 ether); } - function test_swapOnV3_uniswap() public { - vm.startPrank(owner); - uint256 amountOut = arbitrage._swapOnV3( - currentConfig.uniswapRouter, - currentConfig.uniswapQuoter, - currentConfig.usdc, - 10, - currentConfig.weth, - 0, - 3000 - ); - vm.stopPrank(); - assertGt(amountOut, 0); - assertGt(IERC20(currentConfig.weth).balanceOf(address(arbitrage)), 0); - assertLt(IERC20(currentConfig.usdc).balanceOf(address(arbitrage)), 69); - } + // function test_swapOnV3_uniswap() public { + // vm.startPrank(owner); + // uint256 amountOut = arbitrage._swapOnV3( + // currentConfig.uniswapRouter, + // currentConfig.uniswapQuoter, + // currentConfig.usdc, + // 10, + // currentConfig.weth, + // 0, + // 3000 + // ); + // vm.stopPrank(); + // assertGt(amountOut, 0); + // assertGt(IERC20(currentConfig.weth).balanceOf(address(arbitrage)), 0); + // assertLt(IERC20(currentConfig.usdc).balanceOf(address(arbitrage)), 69); + // } // function test_swapOnV3_sushiswap() public { // vm.startPrank(owner); @@ -71,28 +71,18 @@ contract ArbitrageTest is Test { // assertLt(IERC20(currentConfig.usdc).balanceOf(address(arbitrage)), 69); // } - function test_getUniswapFeeQuote() public { - vm.startPrank(owner); - uint256 fee = arbitrage.getFeeQuote( - currentConfig.uniswapQuoter, - currentConfig.usdc, - currentConfig.weth, - 10, - 3000 - ); - vm.stopPrank(); - assertGt(fee, 0); - } + // function test_getUniswapFeeQuote() public { + // vm.startPrank(owner); + // uint256 fee = + // arbitrage.getFeeQuote(currentConfig.uniswapQuoter, currentConfig.usdc, currentConfig.weth, 10, 3000); + // vm.stopPrank(); + // assertGt(fee, 0); + // } // function test_getSushiswapFeeQuote() public { // vm.startPrank(owner); - // uint256 fee = arbitrage.getFeeQuote( - // currentConfig.sushiswapQuoter, - // currentConfig.usdc, - // currentConfig.weth, - // 10000000, - // 3000 - // ); + // uint256 fee = + // arbitrage.getFeeQuote(currentConfig.sushiswapQuoter, currentConfig.usdc, currentConfig.weth, 10000000, 3000); // vm.stopPrank(); // assertGt(fee, 0); // }