diff --git a/batcher/batcher.mligo b/batcher/batcher.mligo index 1314e42e..2718080b 100644 --- a/batcher/batcher.mligo +++ b/batcher/batcher.mligo @@ -395,21 +395,18 @@ let is_within_limit end - - - module Treasury = struct type storage = Storage.t - [@inline] let resolve_fees_to_mms (to_mms: (address,tez) map) (token_ops: operation list): operation list = let pay_mms (ops, (addr, amt) : operation list * (address * tez)) : operation list = if amt > 0mutez then - Treasury_Utils.transfer_fee addr amt :: ops + let op = send_add_reward amt addr in + op :: ops else ops in diff --git a/batcher/michelson/batcher-ghostnet.tz b/batcher/michelson/batcher-ghostnet.tz index fb553442..5d08963a 100644 --- a/batcher/michelson/batcher-ghostnet.tz +++ b/batcher/michelson/batcher-ghostnet.tz @@ -3244,12 +3244,11 @@ DUP 3 ; COMPARE ; GT ; - IF { DIG 2 ; - SWAP ; - CONTRACT unit ; - IF_NONE - { SWAP ; DROP ; PUSH nat 102 ; FAILWITH } - { DIG 2 ; UNIT ; TRANSFER_TOKENS } ; + IF { CONTRACT %addreward mutez ; + IF_NONE { PUSH nat 157 ; FAILWITH } {} ; + DUP 2 ; + DIG 2 ; + TRANSFER_TOKENS ; CONS } { DROP 2 } } ; PUSH mutez 0 ; diff --git a/batcher/utils.mligo b/batcher/utils.mligo index c3089b4c..fa041207 100644 --- a/batcher/utils.mligo +++ b/batcher/utils.mligo @@ -1045,3 +1045,13 @@ let send_liquidity_injection_request in Tezos.transaction liq_request 0mutez liq_req_ent +[@inline] +let send_add_reward + (amount: tez) + (vault:address) : operation = + let rew_req_ent = match Tezos.get_entrypoint_opt "%addreward" vault with + | Some ep -> ep + | None -> failwith entrypoint_does_not_exist + in + Tezos.transaction amount amount rew_req_ent +