Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Temp fix for week when Barter using same address in staging and prod #109

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -405,7 +405,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 ='\xC7899Ff6A3aC2FF59261bD960A8C880DF06E1041' THEN concat('0x', encode('\x5f7A6aeec3D3E80558278632954DA4b730996F83', 'hex')) -- workaround for week where Barter used a single account for testing colocation in staging and then used the same account for prod
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
12 changes: 9 additions & 3 deletions src/sql/orderbook/barn_order_rewards.sql
Original file line number Diff line number Diff line change
Expand Up @@ -323,8 +323,11 @@ order_protocol_fee_prices AS (
),
winning_quotes as (
SELECT
concat('0x', encode(oq.solver, 'hex')) as quote_solver,
oq.order_uid
CASE
WHEN solver ='\xC7899Ff6A3aC2FF59261bD960A8C880DF06E1041' THEN concat('0x', encode('\x5f7A6aeec3D3E80558278632954DA4b730996F83', 'hex')) -- workaround for week where Barter used a single account for testing colocation in staging and then used the same account for prod
ELSE concat('0x', encode(solver, 'hex'))
END as quote_solver,
oq.order_uid
FROM
trades t
INNER JOIN orders o ON order_uid = uid
Expand All @@ -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 trade_hashes.solver ='\xC7899Ff6A3aC2FF59261bD960A8C880DF06E1041' THEN concat('0x', encode('\x5f7A6aeec3D3E80558278632954DA4b730996F83', 'hex')) -- workaround for week where Barter used a single account for testing colocation in staging and then used the same account for prod
ELSE concat('0x', encode(trade_hashes.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
Loading