Skip to content

Commit

Permalink
fix for prod rizzolver address executing barn trade
Browse files Browse the repository at this point in the history
  • Loading branch information
harisang committed Oct 21, 2024
1 parent fe11663 commit 39077e4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
5 changes: 4 additions & 1 deletion src/sql/orderbook/barn_batch_rewards.sql
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,10 @@ SELECT
when tx_hash is NULL then NULL
else concat('0x', encode(tx_hash, 'hex'))
end as tx_hash,
concat('0x', encode(solver, 'hex')) as solver,
case
when solver='\x9DFc9Bb0FfF2dc96728D2bb94eaCee6ba3592351' then concat('0x', encode('\x26B5e3bF135D3Dd05A220508dD61f25BF1A47cBD', 'hex'))
else concat('0x', encode(solver, 'hex'))
end as solver,
execution_cost :: text as execution_cost,
surplus :: text as surplus,
protocol_fee :: text as protocol_fee,
Expand Down
10 changes: 8 additions & 2 deletions src/sql/orderbook/barn_order_rewards.sql
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,10 @@ order_protocol_fee_prices AS (
),
winning_quotes as (
SELECT
concat('0x', encode(oq.solver, 'hex')) as quote_solver,
case
when oq.solver='\x9DFc9Bb0FfF2dc96728D2bb94eaCee6ba3592351' then concat('0x', encode('\x26B5e3bF135D3Dd05A220508dD61f25BF1A47cBD', 'hex'))
else concat('0x', encode(oq.solver, 'hex'))
end as quote_solver,
oq.order_uid
FROM
trades t
Expand Down Expand Up @@ -351,7 +354,10 @@ winning_quotes as (
select
trade_hashes.block_number as block_number,
concat('0x', encode(trade_hashes.order_uid, 'hex')) as order_uid,
concat('0x', encode(oq.solver, 'hex')) as solver,
case
when solver='\x9DFc9Bb0FfF2dc96728D2bb94eaCee6ba3592351' then concat('0x', encode('\x26B5e3bF135D3Dd05A220508dD61f25BF1A47cBD', 'hex'))
else concat('0x', encode(solver, 'hex'))
end as solver,
quote_solver,
concat('0x', encode(trade_hashes.tx_hash, 'hex')) as tx_hash,
coalesce(surplus_fee, 0) :: text as surplus_fee,
Expand Down

0 comments on commit 39077e4

Please sign in to comment.