diff --git a/crates/autopilot/src/arguments.rs b/crates/autopilot/src/arguments.rs index 00062dfd94..8ea3903270 100644 --- a/crates/autopilot/src/arguments.rs +++ b/crates/autopilot/src/arguments.rs @@ -26,7 +26,7 @@ pub struct Arguments { #[clap( long, env, - default_value = "0x26c3801b4840dab317cedfd7aeaf9f45fdd22830" + default_value = "0x76aAf674848311C7F21fc691B0b952f016dA49F3" )] pub ethflow_contract: H160, diff --git a/crates/autopilot/src/database/events.rs b/crates/autopilot/src/database/events.rs index 9e84e5887a..b009340a89 100644 --- a/crates/autopilot/src/database/events.rs +++ b/crates/autopilot/src/database/events.rs @@ -99,7 +99,7 @@ pub fn meta_to_event_index(meta: &EventMetadata) -> EventIndex { } } -fn bytes_to_order_uid(bytes: &[u8]) -> Result { +pub fn bytes_to_order_uid(bytes: &[u8]) -> Result { bytes .try_into() .context("order_uid has wrong number of bytes") diff --git a/crates/autopilot/src/database/onchain_order_events.rs b/crates/autopilot/src/database/onchain_order_events.rs index 4c31c6cb30..3251efdd35 100644 --- a/crates/autopilot/src/database/onchain_order_events.rs +++ b/crates/autopilot/src/database/onchain_order_events.rs @@ -1,9 +1,13 @@ pub mod ethflow_events; -use super::{events::meta_to_event_index, Metrics, Postgres}; +use super::{ + events::{bytes_to_order_uid, meta_to_event_index}, + Metrics, Postgres, +}; use anyhow::{anyhow, bail, Context, Result}; use contracts::cowswap_onchain_orders::{ - event_data::OrderPlacement as ContractOrderPlacement, Event as ContractEvent, + event_data::{OrderInvalidation, OrderPlacement as ContractOrderPlacement}, + Event as ContractEvent, }; use database::{ byte_array::ByteArray, @@ -134,11 +138,14 @@ impl EventStoring range: RangeInclusive, ) -> Result<()> { let order_placement_events = events + .clone() .into_iter() .filter(|EthContractEvent { data, .. }| { matches!(data, ContractEvent::OrderPlacement(_)) }) .collect(); + let invalidation_events = get_invalidation_events(events)?; + let invalided_order_uids = extract_invalidated_order_uids(invalidation_events)?; let (custom_onchain_data, quotes, broadcasted_order_data, orders) = self .extract_custom_and_general_order_data(order_placement_events) .await?; @@ -157,6 +164,20 @@ impl EventStoring .await .context("mark_onchain_order_events failed")?; + database::onchain_invalidations::delete_invalidations( + &mut transaction, + *range.start() as i64, + ) + .await + .context("invalidating_onchain_order_events failed")?; + + database::onchain_invalidations::insert_onchain_invalidations( + &mut transaction, + invalided_order_uids.as_slice(), + ) + .await + .context("insert_onchain_invalidations failed")?; + self.custom_onchain_data_parser .append_custom_order_info_to_db(&mut transaction, custom_onchain_data) .await @@ -182,11 +203,14 @@ impl EventStoring async fn append_events(&mut self, events: Vec>) -> Result<()> { let order_placement_events = events + .clone() .into_iter() .filter(|EthContractEvent { data, .. }| { matches!(data, ContractEvent::OrderPlacement(_)) }) .collect(); + let invalidation_events = get_invalidation_events(events)?; + let invalided_order_uids = extract_invalidated_order_uids(invalidation_events)?; let (custom_order_data, quotes, broadcasted_order_data, orders) = self .extract_custom_and_general_order_data(order_placement_events) .await?; @@ -197,6 +221,12 @@ impl EventStoring .start_timer(); let mut transaction = self.db.0.begin().await?; + database::onchain_invalidations::insert_onchain_invalidations( + &mut transaction, + invalided_order_uids.as_slice(), + ) + .await + .context("insert_onchain_invalidations failed")?; database::onchain_broadcasted_orders::append( &mut transaction, broadcasted_order_data.as_slice(), @@ -294,6 +324,45 @@ impl OnchainOrderParser { } } +fn get_invalidation_events( + events: Vec>, +) -> Result> { + events + .into_iter() + .filter_map(|EthContractEvent { data, meta }| { + let meta = match meta { + Some(meta) => meta, + None => return Some(Err(anyhow!("invalidation event without metadata"))), + }; + let data = match data { + ContractEvent::OrderInvalidation(event) => event, + _ => { + return None; + } + }; + Some(Ok((meta_to_event_index(&meta), data))) + }) + .collect() +} + +fn extract_invalidated_order_uids( + invalidations: Vec<(EventIndex, OrderInvalidation)>, +) -> Result> { + invalidations + .into_iter() + .map(|(event_index, invalidation)| { + Ok(( + event_index, + // The following conversion should not error, as the contract + // enforces that the enough bytes are sent + // If the error happens anyways, we want to stop indexing and + // hence escalate the error + bytes_to_order_uid(invalidation.order_uid.0.as_slice())?, + )) + }) + .collect() +} + type GeneralOnchainOrderPlacementData = ( EventIndex, database::orders::Quote, diff --git a/crates/contracts/artifacts/CoWSwapEthFlow.json b/crates/contracts/artifacts/CoWSwapEthFlow.json index 9d1b70d560..50effce44f 100644 --- a/crates/contracts/artifacts/CoWSwapEthFlow.json +++ b/crates/contracts/artifacts/CoWSwapEthFlow.json @@ -1 +1 @@ -{"abi":[{"inputs":[{"internalType":"contract ICoWSwapSettlement","name":"_cowSwapSettlement","type":"address"},{"internalType":"contract IWrappedNativeToken","name":"_wrappedNativeToken","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"EthTransferFailed","type":"error"},{"inputs":[],"name":"IncorrectEthAmount","type":"error"},{"inputs":[{"internalType":"bytes32","name":"orderHash","type":"bytes32"}],"name":"NotAllowedToInvalidateOrder","type":"error"},{"inputs":[],"name":"NotAllowedZeroSellAmount","type":"error"},{"inputs":[{"internalType":"bytes32","name":"orderHash","type":"bytes32"}],"name":"OrderIsAlreadyOwned","type":"error"},{"inputs":[],"name":"ReceiverMustBeSet","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes","name":"orderUid","type":"bytes"}],"name":"OrderInvalidation","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"components":[{"internalType":"contract IERC20","name":"sellToken","type":"address"},{"internalType":"contract IERC20","name":"buyToken","type":"address"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"sellAmount","type":"uint256"},{"internalType":"uint256","name":"buyAmount","type":"uint256"},{"internalType":"uint32","name":"validTo","type":"uint32"},{"internalType":"bytes32","name":"appData","type":"bytes32"},{"internalType":"uint256","name":"feeAmount","type":"uint256"},{"internalType":"bytes32","name":"kind","type":"bytes32"},{"internalType":"bool","name":"partiallyFillable","type":"bool"},{"internalType":"bytes32","name":"sellTokenBalance","type":"bytes32"},{"internalType":"bytes32","name":"buyTokenBalance","type":"bytes32"}],"indexed":false,"internalType":"struct GPv2Order.Data","name":"order","type":"tuple"},{"components":[{"internalType":"enum ICoWSwapOnchainOrders.OnchainSigningScheme","name":"scheme","type":"uint8"},{"internalType":"bytes","name":"data","type":"bytes"}],"indexed":false,"internalType":"struct ICoWSwapOnchainOrders.OnchainSignature","name":"signature","type":"tuple"},{"indexed":false,"internalType":"bytes","name":"data","type":"bytes"}],"name":"OrderPlacement","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes","name":"orderUid","type":"bytes"},{"indexed":true,"internalType":"address","name":"refunder","type":"address"}],"name":"OrderRefund","type":"event"},{"inputs":[],"name":"cowSwapSettlement","outputs":[{"internalType":"contract ICoWSwapSettlement","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"contract IERC20","name":"buyToken","type":"address"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"sellAmount","type":"uint256"},{"internalType":"uint256","name":"buyAmount","type":"uint256"},{"internalType":"bytes32","name":"appData","type":"bytes32"},{"internalType":"uint256","name":"feeAmount","type":"uint256"},{"internalType":"uint32","name":"validTo","type":"uint32"},{"internalType":"bool","name":"partiallyFillable","type":"bool"},{"internalType":"int64","name":"quoteId","type":"int64"}],"internalType":"struct EthFlowOrder.Data","name":"order","type":"tuple"}],"name":"createOrder","outputs":[{"internalType":"bytes32","name":"orderHash","type":"bytes32"}],"stateMutability":"payable","type":"function"},{"inputs":[{"components":[{"internalType":"contract IERC20","name":"buyToken","type":"address"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"sellAmount","type":"uint256"},{"internalType":"uint256","name":"buyAmount","type":"uint256"},{"internalType":"bytes32","name":"appData","type":"bytes32"},{"internalType":"uint256","name":"feeAmount","type":"uint256"},{"internalType":"uint32","name":"validTo","type":"uint32"},{"internalType":"bool","name":"partiallyFillable","type":"bool"},{"internalType":"int64","name":"quoteId","type":"int64"}],"internalType":"struct EthFlowOrder.Data","name":"order","type":"tuple"}],"name":"invalidateOrder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"contract IERC20","name":"buyToken","type":"address"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"sellAmount","type":"uint256"},{"internalType":"uint256","name":"buyAmount","type":"uint256"},{"internalType":"bytes32","name":"appData","type":"bytes32"},{"internalType":"uint256","name":"feeAmount","type":"uint256"},{"internalType":"uint32","name":"validTo","type":"uint32"},{"internalType":"bool","name":"partiallyFillable","type":"bool"},{"internalType":"int64","name":"quoteId","type":"int64"}],"internalType":"struct EthFlowOrder.Data[]","name":"orderArray","type":"tuple[]"}],"name":"invalidateOrdersIgnoringNotAllowed","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"orderHash","type":"bytes32"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"isValidSignature","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"orders","outputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint32","name":"validTo","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"unwrap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"wrap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"wrapAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"wrappedNativeToken","outputs":[{"internalType":"contract IWrappedNativeToken","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}],"bytecode":"0x60e06040523480156200001157600080fd5b5060405162001afa38038062001afa83398101604081905262000034916200021e565b816200004b816200015260201b6200084c1760201c565b608052506001600160a01b0380831660a081905290821660c081905260408051634daa966160e11b81529051919263095ea7b3929091639b552cc291600480830192602092919082900301816000875af1158015620000ae573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000d491906200025d565b6040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260001960248201526044016020604051808303816000875af115801562000123573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000149919062000284565b505050620002a8565b604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527f6c85c0337eba1661327f94f3bf46c8a7f9311a563f4d5c948362567f5d8ed60c918101919091527ff9446b8e937d86f0bc87cac73923491692b123ca5f8761908494703758206adf606082015246608082018190526001600160a01b03831660a083015260009160c00160405160208183030381529060405280519060200120915050919050565b6001600160a01b03811681146200021b57600080fd5b50565b600080604083850312156200023257600080fd5b82516200023f8162000205565b6020840151909250620002528162000205565b809150509250929050565b6000602082840312156200027057600080fd5b81516200027d8162000205565b9392505050565b6000602082840312156200029757600080fd5b815180151581146200027d57600080fd5b60805160a05160c0516117f16200030960003960008181610129015281816105b00152818161075e015281816107d601528181610be40152610fdb0152600081816102ce0152610ef5015260008181610ba80152610c8a01526117f16000f3fe6080604052600436106100b55760003560e01c80637bc41b9611610069578063de0e9a3e1161004e578063de0e9a3e1461027c578063ea598cb01461029c578063ec30bb88146102bc57600080fd5b80637bc41b96146101c85780639c3f1e90146101e857600080fd5b8063322bba211161009a578063322bba21146101705780634c84c1c8146101915780634cb76498146101a857600080fd5b80631626ba7e146100c157806317fcb39b1461011757600080fd5b366100bc57005b600080fd5b3480156100cd57600080fd5b506100e16100dc366004611218565b6102f0565b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020015b60405180910390f35b34801561012357600080fd5b5061014b7f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161010e565b61018361017e3660046112d5565b6103de565b60405190815260200161010e565b34801561019d57600080fd5b506101a66106d1565b005b3480156101b457600080fd5b506101a66101c33660046112ee565b6106dc565b3480156101d457600080fd5b506101a66101e33660046112d5565b610721565b3480156101f457600080fd5b5061024b610203366004611364565b60006020819052908152604090205473ffffffffffffffffffffffffffffffffffffffff81169074010000000000000000000000000000000000000000900463ffffffff1682565b6040805173ffffffffffffffffffffffffffffffffffffffff909316835263ffffffff90911660208301520161010e565b34801561028857600080fd5b506101a6610297366004611364565b61072f565b3480156102a857600080fd5b506101a66102b7366004611364565b6107d2565b3480156102c857600080fd5b5061014b7f000000000000000000000000000000000000000000000000000000000000000081565b60008281526020818152604080832081518083019092525473ffffffffffffffffffffffffffffffffffffffff81168083527401000000000000000000000000000000000000000090910463ffffffff1692820192909252901580159061036f5750805173ffffffffffffffffffffffffffffffffffffffff90811614155b8015610385575042816020015163ffffffff1610155b156103b357507f1626ba7e0000000000000000000000000000000000000000000000000000000090506103d8565b507fffffffff0000000000000000000000000000000000000000000000000000000090505b92915050565b60006103f260a083013560408401356113ac565b341461042a576040517f8b6ebb4d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8160400135600003610468576040517feaec5c9d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b604080518082019091523381526000906020810161048c60e0860160c087016113d8565b63ffffffff1690526040805180820190915290915060009080828152602001306040516020016104e7919060609190911b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016815260140190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291905290529050600061052d6101208601610100870161140c565b60208085015160405161057493920160c09290921b825260e01b7fffffffff00000000000000000000000000000000000000000000000000000000166008820152600c0190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291905283519091506105eb906105e47f00000000000000000000000000000000000000000000000000000000000000006105de368a90038a018a61145b565b9061090c565b8484610adb565b60008181526020819052604090205490945073ffffffffffffffffffffffffffffffffffffffff1615610652576040517f56a1d2b2000000000000000000000000000000000000000000000000000000008152600481018590526024015b60405180910390fd5b505060008281526020818152604090912082518154929093015163ffffffff1674010000000000000000000000000000000000000000027fffffffffffffffff00000000000000000000000000000000000000000000000090921673ffffffffffffffffffffffffffffffffffffffff90931692909217179055919050565b6106da476107d2565b565b60005b8181101561071c5761070a8383838181106106fc576106fc6114f5565b905061012002016000610bdd565b8061071481611524565b9150506106df565b505050565b61072c816001610bdd565b50565b6040517f2e1a7d4d000000000000000000000000000000000000000000000000000000008152600481018290527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1690632e1a7d4d90602401600060405180830381600087803b1580156107b757600080fd5b505af11580156107cb573d6000803e3d6000fd5b5050505050565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168260405160006040518083038185875af1925050503d80600081146107cb576040519150601f19603f3d011682016040523d82523d6000602084013e6107cb565b604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527f6c85c0337eba1661327f94f3bf46c8a7f9311a563f4d5c948362567f5d8ed60c918101919091527ff9446b8e937d86f0bc87cac73923491692b123ca5f8761908494703758206adf6060820152466080820181905273ffffffffffffffffffffffffffffffffffffffff831660a083015260009160c00160405160208183030381529060405280519060200120915050919050565b604080516101808101825260008082526020808301829052928201819052606082018190526080820181905260a0820181905260c0820181905260e082018190526101008201819052610120820181905261014082018190526101608201529083015173ffffffffffffffffffffffffffffffffffffffff166109bb576040517fefc9ccdf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040518061018001604052808373ffffffffffffffffffffffffffffffffffffffff168152602001846000015173ffffffffffffffffffffffffffffffffffffffff168152602001846020015173ffffffffffffffffffffffffffffffffffffffff168152602001846040015181526020018460600151815260200163ffffffff80168152602001846080015181526020018460a0015181526020017ff3b277728b3fee749481eb3e0b3b48980dbbab78658fc419025cb16eee34677581526020018460e00151151581526020017f5a28e9363bb942b639270062aa6bb295f434bcdfc42c97267bf003f272060dc981526020017f5a28e9363bb942b639270062aa6bb295f434bcdfc42c97267bf003f272060dc9815250905092915050565b60008473ffffffffffffffffffffffffffffffffffffffff167fcf5f9de2984132265203b5c335b25727702ca77262ff622e136baa7362bf1da9858585604051610b279392919061162a565b60405180910390a25050507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe00180517fd5a25ba2e97094ad7d83dc28a6572da797d6b3e7fc6663bd93efb789fc17e48982526101a0822091526040517f190100000000000000000000000000000000000000000000000000000000000081527f00000000000000000000000000000000000000000000000000000000000000006002820152602281019190915260429020919050565b6000610c127f00000000000000000000000000000000000000000000000000000000000000006105de3686900386018661145b565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0810180517fd5a25ba2e97094ad7d83dc28a6572da797d6b3e7fc6663bd93efb789fc17e48982526101a082209152604080517f190100000000000000000000000000000000000000000000000000000000000081527f0000000000000000000000000000000000000000000000000000000000000000600282015260228101929092526042909120600081815260208181529083902083518085019094525473ffffffffffffffffffffffffffffffffffffffff8082168086527401000000000000000000000000000000000000000090920463ffffffff1692850183905294955091934290911015911480610d3e5750815173ffffffffffffffffffffffffffffffffffffffff16155b80610d685750808015610d685750815173ffffffffffffffffffffffffffffffffffffffff163314155b15610db0578415610da8576040517ff8cc70ce00000000000000000000000000000000000000000000000000000000815260048101849052602401610649565b505050505050565b60008381526020818152604080832080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff1790558051603880825260608201909252918201818036833750505060a0860151909150610e2b908290869030906110f3565b8115610e745780604051610e3f9190611744565b604051908190038120907fb8bad102ac8bbacfef31ff1c906ec6d951c230b4dce750bb0376b812ad35852a90600090a2610eb5565b6040513390610e84908390611744565b604051908190038120907f195271068a288191e4b265c641a56b9832919f69e9e7d6c2f31ba40278aeb85a90600090a35b6040517f2479fb6e00000000000000000000000000000000000000000000000000000000815260009073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690632479fb6e90610f2a908590600401611760565b6020604051808303816000875af1158015610f49573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f6d9190611773565b90506000808760600151838960e001510281610f8b57610f8b61178c565b048860e001510390508083896060015103019150508047101561104e576040517f2e1a7d4d00000000000000000000000000000000000000000000000000000000815247820360048201819052907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1690632e1a7d4d90602401600060405180830381600087803b15801561103457600080fd5b505af1158015611048573d6000803e3d6000fd5b50505050505b845160405160009173ffffffffffffffffffffffffffffffffffffffff169083908381818185875af1925050503d80600081146110a7576040519150601f19603f3d011682016040523d82523d6000602084013e6110ac565b606091505b50509050806110e7576040517f6d963f8800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505050505050505050565b603884511461115e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f475076323a2075696420627566666572206f766572666c6f77000000000000006044820152606401610649565b60388401526034830152602090910152565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051610120810167ffffffffffffffff811182821017156111c3576111c3611170565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff8111828210171561121057611210611170565b604052919050565b6000806040838503121561122b57600080fd5b8235915060208084013567ffffffffffffffff8082111561124b57600080fd5b818601915086601f83011261125f57600080fd5b81358181111561127157611271611170565b6112a1847fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116016111c9565b915080825287848285010111156112b757600080fd5b80848401858401376000848284010152508093505050509250929050565b600061012082840312156112e857600080fd5b50919050565b6000806020838503121561130157600080fd5b823567ffffffffffffffff8082111561131957600080fd5b818501915085601f83011261132d57600080fd5b81358181111561133c57600080fd5b8660206101208302850101111561135257600080fd5b60209290920196919550909350505050565b60006020828403121561137657600080fd5b5035919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b808201808211156103d8576103d861137d565b803563ffffffff811681146113d357600080fd5b919050565b6000602082840312156113ea57600080fd5b6113f3826113bf565b9392505050565b8035600781900b81146113d357600080fd5b60006020828403121561141e57600080fd5b6113f3826113fa565b803573ffffffffffffffffffffffffffffffffffffffff811681146113d357600080fd5b803580151581146113d357600080fd5b6000610120828403121561146e57600080fd5b61147661119f565b61147f83611427565b815261148d60208401611427565b602082015260408301356040820152606083013560608201526080830135608082015260a083013560a08201526114c660c084016113bf565b60c08201526114d760e0840161144b565b60e08201526101006114ea8185016113fa565b908201529392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036115555761155561137d565b5060010190565b60005b8381101561157757818101518382015260200161155f565b50506000910152565b6000815180845261159881602086016020860161155c565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6000815160028110611605577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b808452506020820151604060208501526116226040850182611580565b949350505050565b835173ffffffffffffffffffffffffffffffffffffffff16815260006101c06020860151611670602085018273ffffffffffffffffffffffffffffffffffffffff169052565b506040860151611698604085018273ffffffffffffffffffffffffffffffffffffffff169052565b50606086015160608401526080860151608084015260a08601516116c460a085018263ffffffff169052565b5060c086015160c084015260e086015160e0840152610100808701518185015250610120808701516116f98286018215159052565b5050610140868101519084015261016080870151908401526101808301819052611725818401866115ca565b90508281036101a084015261173a8185611580565b9695505050505050565b6000825161175681846020870161155c565b9190910192915050565b6020815260006113f36020830184611580565b60006020828403121561178557600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fdfea26469706673582212205b6135e323b9cd4e440438a6a5e4f742f5be5ac4e34377a2372b76349fdb112c64736f6c63430008100033"} \ No newline at end of file +{"abi":[{"inputs":[{"internalType":"contract ICoWSwapSettlement","name":"_cowSwapSettlement","type":"address"},{"internalType":"contract IWrappedNativeToken","name":"_wrappedNativeToken","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"EthTransferFailed","type":"error"},{"inputs":[],"name":"IncorrectEthAmount","type":"error"},{"inputs":[{"internalType":"bytes32","name":"orderHash","type":"bytes32"}],"name":"NotAllowedToInvalidateOrder","type":"error"},{"inputs":[],"name":"NotAllowedZeroSellAmount","type":"error"},{"inputs":[{"internalType":"bytes32","name":"orderHash","type":"bytes32"}],"name":"OrderIsAlreadyOwned","type":"error"},{"inputs":[],"name":"ReceiverMustBeSet","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes","name":"orderUid","type":"bytes"}],"name":"OrderInvalidation","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"components":[{"internalType":"contract IERC20","name":"sellToken","type":"address"},{"internalType":"contract IERC20","name":"buyToken","type":"address"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"sellAmount","type":"uint256"},{"internalType":"uint256","name":"buyAmount","type":"uint256"},{"internalType":"uint32","name":"validTo","type":"uint32"},{"internalType":"bytes32","name":"appData","type":"bytes32"},{"internalType":"uint256","name":"feeAmount","type":"uint256"},{"internalType":"bytes32","name":"kind","type":"bytes32"},{"internalType":"bool","name":"partiallyFillable","type":"bool"},{"internalType":"bytes32","name":"sellTokenBalance","type":"bytes32"},{"internalType":"bytes32","name":"buyTokenBalance","type":"bytes32"}],"indexed":false,"internalType":"struct GPv2Order.Data","name":"order","type":"tuple"},{"components":[{"internalType":"enum ICoWSwapOnchainOrders.OnchainSigningScheme","name":"scheme","type":"uint8"},{"internalType":"bytes","name":"data","type":"bytes"}],"indexed":false,"internalType":"struct ICoWSwapOnchainOrders.OnchainSignature","name":"signature","type":"tuple"},{"indexed":false,"internalType":"bytes","name":"data","type":"bytes"}],"name":"OrderPlacement","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes","name":"orderUid","type":"bytes"},{"indexed":true,"internalType":"address","name":"refunder","type":"address"}],"name":"OrderRefund","type":"event"},{"inputs":[],"name":"cowSwapSettlement","outputs":[{"internalType":"contract ICoWSwapSettlement","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"contract IERC20","name":"buyToken","type":"address"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"sellAmount","type":"uint256"},{"internalType":"uint256","name":"buyAmount","type":"uint256"},{"internalType":"bytes32","name":"appData","type":"bytes32"},{"internalType":"uint256","name":"feeAmount","type":"uint256"},{"internalType":"uint32","name":"validTo","type":"uint32"},{"internalType":"bool","name":"partiallyFillable","type":"bool"},{"internalType":"int64","name":"quoteId","type":"int64"}],"internalType":"struct EthFlowOrder.Data","name":"order","type":"tuple"}],"name":"createOrder","outputs":[{"internalType":"bytes32","name":"orderHash","type":"bytes32"}],"stateMutability":"payable","type":"function"},{"inputs":[{"components":[{"internalType":"contract IERC20","name":"buyToken","type":"address"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"sellAmount","type":"uint256"},{"internalType":"uint256","name":"buyAmount","type":"uint256"},{"internalType":"bytes32","name":"appData","type":"bytes32"},{"internalType":"uint256","name":"feeAmount","type":"uint256"},{"internalType":"uint32","name":"validTo","type":"uint32"},{"internalType":"bool","name":"partiallyFillable","type":"bool"},{"internalType":"int64","name":"quoteId","type":"int64"}],"internalType":"struct EthFlowOrder.Data","name":"order","type":"tuple"}],"name":"invalidateOrder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"contract IERC20","name":"buyToken","type":"address"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"sellAmount","type":"uint256"},{"internalType":"uint256","name":"buyAmount","type":"uint256"},{"internalType":"bytes32","name":"appData","type":"bytes32"},{"internalType":"uint256","name":"feeAmount","type":"uint256"},{"internalType":"uint32","name":"validTo","type":"uint32"},{"internalType":"bool","name":"partiallyFillable","type":"bool"},{"internalType":"int64","name":"quoteId","type":"int64"}],"internalType":"struct EthFlowOrder.Data[]","name":"orderArray","type":"tuple[]"}],"name":"invalidateOrdersIgnoringNotAllowed","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"orderHash","type":"bytes32"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"isValidSignature","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"orders","outputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint32","name":"validTo","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"unwrap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"wrap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"wrapAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"wrappedNativeToken","outputs":[{"internalType":"contract IWrappedNativeToken","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}],"bytecode":"0x60e06040523480156200001157600080fd5b5060405162001af338038062001af383398101604081905262000034916200021e565b816200004b816200015260201b6200084c1760201c565b608052506001600160a01b0380831660a081905290821660c081905260408051634daa966160e11b81529051919263095ea7b3929091639b552cc291600480830192602092919082900301816000875af1158015620000ae573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000d491906200025d565b6040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260001960248201526044016020604051808303816000875af115801562000123573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000149919062000284565b505050620002a8565b604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527f6c85c0337eba1661327f94f3bf46c8a7f9311a563f4d5c948362567f5d8ed60c918101919091527ff9446b8e937d86f0bc87cac73923491692b123ca5f8761908494703758206adf606082015246608082018190526001600160a01b03831660a083015260009160c00160405160208183030381529060405280519060200120915050919050565b6001600160a01b03811681146200021b57600080fd5b50565b600080604083850312156200023257600080fd5b82516200023f8162000205565b6020840151909250620002528162000205565b809150509250929050565b6000602082840312156200027057600080fd5b81516200027d8162000205565b9392505050565b6000602082840312156200029757600080fd5b815180151581146200027d57600080fd5b60805160a05160c0516117ea6200030960003960008181610129015281816105b00152818161075e015281816107d601528181610be40152610fd40152600081816102ce0152610eee015260008181610ba80152610c8a01526117ea6000f3fe6080604052600436106100b55760003560e01c80637bc41b9611610069578063de0e9a3e1161004e578063de0e9a3e1461027c578063ea598cb01461029c578063ec30bb88146102bc57600080fd5b80637bc41b96146101c85780639c3f1e90146101e857600080fd5b8063322bba211161009a578063322bba21146101705780634c84c1c8146101915780634cb76498146101a857600080fd5b80631626ba7e146100c157806317fcb39b1461011757600080fd5b366100bc57005b600080fd5b3480156100cd57600080fd5b506100e16100dc366004611211565b6102f0565b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020015b60405180910390f35b34801561012357600080fd5b5061014b7f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161010e565b61018361017e3660046112ce565b6103de565b60405190815260200161010e565b34801561019d57600080fd5b506101a66106d1565b005b3480156101b457600080fd5b506101a66101c33660046112e7565b6106dc565b3480156101d457600080fd5b506101a66101e33660046112ce565b610721565b3480156101f457600080fd5b5061024b61020336600461135d565b60006020819052908152604090205473ffffffffffffffffffffffffffffffffffffffff81169074010000000000000000000000000000000000000000900463ffffffff1682565b6040805173ffffffffffffffffffffffffffffffffffffffff909316835263ffffffff90911660208301520161010e565b34801561028857600080fd5b506101a661029736600461135d565b61072f565b3480156102a857600080fd5b506101a66102b736600461135d565b6107d2565b3480156102c857600080fd5b5061014b7f000000000000000000000000000000000000000000000000000000000000000081565b60008281526020818152604080832081518083019092525473ffffffffffffffffffffffffffffffffffffffff81168083527401000000000000000000000000000000000000000090910463ffffffff1692820192909252901580159061036f5750805173ffffffffffffffffffffffffffffffffffffffff90811614155b8015610385575042816020015163ffffffff1610155b156103b357507f1626ba7e0000000000000000000000000000000000000000000000000000000090506103d8565b507fffffffff0000000000000000000000000000000000000000000000000000000090505b92915050565b60006103f260a083013560408401356113a5565b341461042a576040517f8b6ebb4d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8160400135600003610468576040517feaec5c9d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b604080518082019091523381526000906020810161048c60e0860160c087016113d1565b63ffffffff1690526040805180820190915290915060009080828152602001306040516020016104e7919060609190911b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016815260140190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291905290529050600061052d61012086016101008701611405565b60208085015160405161057493920160c09290921b825260e01b7fffffffff00000000000000000000000000000000000000000000000000000000166008820152600c0190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291905283519091506105eb906105e47f00000000000000000000000000000000000000000000000000000000000000006105de368a90038a018a611454565b9061090c565b8484610adb565b60008181526020819052604090205490945073ffffffffffffffffffffffffffffffffffffffff1615610652576040517f56a1d2b2000000000000000000000000000000000000000000000000000000008152600481018590526024015b60405180910390fd5b505060008281526020818152604090912082518154929093015163ffffffff1674010000000000000000000000000000000000000000027fffffffffffffffff00000000000000000000000000000000000000000000000090921673ffffffffffffffffffffffffffffffffffffffff90931692909217179055919050565b6106da476107d2565b565b60005b8181101561071c5761070a8383838181106106fc576106fc6114ee565b905061012002016000610bdd565b806107148161151d565b9150506106df565b505050565b61072c816001610bdd565b50565b6040517f2e1a7d4d000000000000000000000000000000000000000000000000000000008152600481018290527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1690632e1a7d4d90602401600060405180830381600087803b1580156107b757600080fd5b505af11580156107cb573d6000803e3d6000fd5b5050505050565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168260405160006040518083038185875af1925050503d80600081146107cb576040519150601f19603f3d011682016040523d82523d6000602084013e6107cb565b604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527f6c85c0337eba1661327f94f3bf46c8a7f9311a563f4d5c948362567f5d8ed60c918101919091527ff9446b8e937d86f0bc87cac73923491692b123ca5f8761908494703758206adf6060820152466080820181905273ffffffffffffffffffffffffffffffffffffffff831660a083015260009160c00160405160208183030381529060405280519060200120915050919050565b604080516101808101825260008082526020808301829052928201819052606082018190526080820181905260a0820181905260c0820181905260e082018190526101008201819052610120820181905261014082018190526101608201529083015173ffffffffffffffffffffffffffffffffffffffff166109bb576040517fefc9ccdf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040518061018001604052808373ffffffffffffffffffffffffffffffffffffffff168152602001846000015173ffffffffffffffffffffffffffffffffffffffff168152602001846020015173ffffffffffffffffffffffffffffffffffffffff168152602001846040015181526020018460600151815260200163ffffffff80168152602001846080015181526020018460a0015181526020017ff3b277728b3fee749481eb3e0b3b48980dbbab78658fc419025cb16eee34677581526020018460e00151151581526020017f5a28e9363bb942b639270062aa6bb295f434bcdfc42c97267bf003f272060dc981526020017f5a28e9363bb942b639270062aa6bb295f434bcdfc42c97267bf003f272060dc9815250905092915050565b60008473ffffffffffffffffffffffffffffffffffffffff167fcf5f9de2984132265203b5c335b25727702ca77262ff622e136baa7362bf1da9858585604051610b2793929190611623565b60405180910390a25050507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe00180517fd5a25ba2e97094ad7d83dc28a6572da797d6b3e7fc6663bd93efb789fc17e48982526101a0822091526040517f190100000000000000000000000000000000000000000000000000000000000081527f00000000000000000000000000000000000000000000000000000000000000006002820152602281019190915260429020919050565b6000610c127f00000000000000000000000000000000000000000000000000000000000000006105de36869003860186611454565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0810180517fd5a25ba2e97094ad7d83dc28a6572da797d6b3e7fc6663bd93efb789fc17e48982526101a082209152604080517f190100000000000000000000000000000000000000000000000000000000000081527f0000000000000000000000000000000000000000000000000000000000000000600282015260228101929092526042909120600081815260208181529083902083518085019094525473ffffffffffffffffffffffffffffffffffffffff8082168086527401000000000000000000000000000000000000000090920463ffffffff1692850183905294955091934290911015911480610d3e5750815173ffffffffffffffffffffffffffffffffffffffff16155b80610d685750808015610d685750815173ffffffffffffffffffffffffffffffffffffffff163314155b15610db0578415610da8576040517ff8cc70ce00000000000000000000000000000000000000000000000000000000815260048101849052602401610649565b505050505050565b60008381526020818152604080832080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff1790558051603880825260608201909252918201818036833750505060a0860151909150610e2b908290869030906110ec565b8115610e6d577fb8bad102ac8bbacfef31ff1c906ec6d951c230b4dce750bb0376b812ad35852a81604051610e60919061173d565b60405180910390a1610eae565b6040513390610e7d908390611750565b604051908190038120907f195271068a288191e4b265c641a56b9832919f69e9e7d6c2f31ba40278aeb85a90600090a35b6040517f2479fb6e00000000000000000000000000000000000000000000000000000000815260009073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690632479fb6e90610f2390859060040161173d565b6020604051808303816000875af1158015610f42573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f66919061176c565b90506000808760600151838960e001510281610f8457610f84611785565b048860e0015103905080838960600151030191505080471015611047576040517f2e1a7d4d00000000000000000000000000000000000000000000000000000000815247820360048201819052907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1690632e1a7d4d90602401600060405180830381600087803b15801561102d57600080fd5b505af1158015611041573d6000803e3d6000fd5b50505050505b845160405160009173ffffffffffffffffffffffffffffffffffffffff169083908381818185875af1925050503d80600081146110a0576040519150601f19603f3d011682016040523d82523d6000602084013e6110a5565b606091505b50509050806110e0576040517f6d963f8800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505050505050505050565b6038845114611157576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f475076323a2075696420627566666572206f766572666c6f77000000000000006044820152606401610649565b60388401526034830152602090910152565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051610120810167ffffffffffffffff811182821017156111bc576111bc611169565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff8111828210171561120957611209611169565b604052919050565b6000806040838503121561122457600080fd5b8235915060208084013567ffffffffffffffff8082111561124457600080fd5b818601915086601f83011261125857600080fd5b81358181111561126a5761126a611169565b61129a847fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116016111c2565b915080825287848285010111156112b057600080fd5b80848401858401376000848284010152508093505050509250929050565b600061012082840312156112e157600080fd5b50919050565b600080602083850312156112fa57600080fd5b823567ffffffffffffffff8082111561131257600080fd5b818501915085601f83011261132657600080fd5b81358181111561133557600080fd5b8660206101208302850101111561134b57600080fd5b60209290920196919550909350505050565b60006020828403121561136f57600080fd5b5035919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b808201808211156103d8576103d8611376565b803563ffffffff811681146113cc57600080fd5b919050565b6000602082840312156113e357600080fd5b6113ec826113b8565b9392505050565b8035600781900b81146113cc57600080fd5b60006020828403121561141757600080fd5b6113ec826113f3565b803573ffffffffffffffffffffffffffffffffffffffff811681146113cc57600080fd5b803580151581146113cc57600080fd5b6000610120828403121561146757600080fd5b61146f611198565b61147883611420565b815261148660208401611420565b602082015260408301356040820152606083013560608201526080830135608082015260a083013560a08201526114bf60c084016113b8565b60c08201526114d060e08401611444565b60e08201526101006114e38185016113f3565b908201529392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361154e5761154e611376565b5060010190565b60005b83811015611570578181015183820152602001611558565b50506000910152565b60008151808452611591816020860160208601611555565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60008151600281106115fe577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b8084525060208201516040602085015261161b6040850182611579565b949350505050565b835173ffffffffffffffffffffffffffffffffffffffff16815260006101c06020860151611669602085018273ffffffffffffffffffffffffffffffffffffffff169052565b506040860151611691604085018273ffffffffffffffffffffffffffffffffffffffff169052565b50606086015160608401526080860151608084015260a08601516116bd60a085018263ffffffff169052565b5060c086015160c084015260e086015160e0840152610100808701518185015250610120808701516116f28286018215159052565b505061014086810151908401526101608087015190840152610180830181905261171e818401866115c3565b90508281036101a08401526117338185611579565b9695505050505050565b6020815260006113ec6020830184611579565b60008251611762818460208701611555565b9190910192915050565b60006020828403121561177e57600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fdfea264697066735822122046f95448a02f3bbbe69b3336195f806f0943ca68722c6add2b8b682a8adff08264736f6c63430008100033"} diff --git a/crates/contracts/artifacts/CoWSwapOnchainOrders.json b/crates/contracts/artifacts/CoWSwapOnchainOrders.json index e834de9d2c..39359dbe9f 100644 --- a/crates/contracts/artifacts/CoWSwapOnchainOrders.json +++ b/crates/contracts/artifacts/CoWSwapOnchainOrders.json @@ -1 +1 @@ -{"abi":[{"inputs":[{"internalType":"address","name":"settlementContractAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes","name":"orderUid","type":"bytes"}],"name":"OrderInvalidation","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"components":[{"internalType":"contract IERC20","name":"sellToken","type":"address"},{"internalType":"contract IERC20","name":"buyToken","type":"address"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"sellAmount","type":"uint256"},{"internalType":"uint256","name":"buyAmount","type":"uint256"},{"internalType":"uint32","name":"validTo","type":"uint32"},{"internalType":"bytes32","name":"appData","type":"bytes32"},{"internalType":"uint256","name":"feeAmount","type":"uint256"},{"internalType":"bytes32","name":"kind","type":"bytes32"},{"internalType":"bool","name":"partiallyFillable","type":"bool"},{"internalType":"bytes32","name":"sellTokenBalance","type":"bytes32"},{"internalType":"bytes32","name":"buyTokenBalance","type":"bytes32"}],"indexed":false,"internalType":"struct GPv2Order.Data","name":"order","type":"tuple"},{"components":[{"internalType":"enum ICoWSwapOnchainOrders.OnchainSigningScheme","name":"scheme","type":"uint8"},{"internalType":"bytes","name":"data","type":"bytes"}],"indexed":false,"internalType":"struct ICoWSwapOnchainOrders.OnchainSignature","name":"signature","type":"tuple"},{"indexed":false,"internalType":"bytes","name":"data","type":"bytes"}],"name":"OrderPlacement","type":"event"}]} \ No newline at end of file +{"abi":[{"inputs":[{"internalType":"address","name":"settlementContractAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes","name":"orderUid","type":"bytes"}],"name":"OrderInvalidation","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"components":[{"internalType":"contract IERC20","name":"sellToken","type":"address"},{"internalType":"contract IERC20","name":"buyToken","type":"address"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"sellAmount","type":"uint256"},{"internalType":"uint256","name":"buyAmount","type":"uint256"},{"internalType":"uint32","name":"validTo","type":"uint32"},{"internalType":"bytes32","name":"appData","type":"bytes32"},{"internalType":"uint256","name":"feeAmount","type":"uint256"},{"internalType":"bytes32","name":"kind","type":"bytes32"},{"internalType":"bool","name":"partiallyFillable","type":"bool"},{"internalType":"bytes32","name":"sellTokenBalance","type":"bytes32"},{"internalType":"bytes32","name":"buyTokenBalance","type":"bytes32"}],"indexed":false,"internalType":"struct GPv2Order.Data","name":"order","type":"tuple"},{"components":[{"internalType":"enum ICoWSwapOnchainOrders.OnchainSigningScheme","name":"scheme","type":"uint8"},{"internalType":"bytes","name":"data","type":"bytes"}],"indexed":false,"internalType":"struct ICoWSwapOnchainOrders.OnchainSignature","name":"signature","type":"tuple"},{"indexed":false,"internalType":"bytes","name":"data","type":"bytes"}],"name":"OrderPlacement","type":"event"}]} \ No newline at end of file diff --git a/crates/contracts/src/bin/vendor.rs b/crates/contracts/src/bin/vendor.rs index 000c1d545b..f810c27960 100644 --- a/crates/contracts/src/bin/vendor.rs +++ b/crates/contracts/src/bin/vendor.rs @@ -131,6 +131,11 @@ fn run() -> Result<()> { "balancer-labs/balancer-v2-monorepo/903d34e491a5e9c5d59dabf512c7addf1ccf9bbd/\ pkg/deployments/tasks/20220609-stable-pool-v2/abi/StablePoolFactory.json", )? + .github( + "CoWSwapOnchainOrders", + "cowprotocol/ethflowcontract/0.0.0-rc.2\ + -artifacts/artifacts/CoWSwapOnchainOrders.sol/CoWSwapOnchainOrders.json" + )? .npm( "ERC20", "@openzeppelin/contracts@3.3.0/build/contracts/ERC20.json", diff --git a/crates/refunder/src/arguments.rs b/crates/refunder/src/arguments.rs index 9d9922b8fa..b759931d3b 100644 --- a/crates/refunder/src/arguments.rs +++ b/crates/refunder/src/arguments.rs @@ -41,7 +41,7 @@ pub struct Arguments { #[clap( long, env, - default_value = "0x26c3801b4840dab317cedfd7aeaf9f45fdd22830" + default_value = "0x76aAf674848311C7F21fc691B0b952f016dA49F3" )] pub ethflow_contract: H160,