Skip to content

Commit

Permalink
Adjusted vault process response
Browse files Browse the repository at this point in the history
  • Loading branch information
glottologist committed Oct 30, 2023
1 parent ff06943 commit f1a85c8
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion batcher/michelson/btctz-vault-ghostnet.tz
Original file line number Diff line number Diff line change
Expand Up @@ -1632,7 +1632,7 @@
(list (pair (pair %request (address %owner) (nat %token_id)) (nat %balance))))) ;
DUP 2 ;
CONTRACT %balance_response_fa2
(pair (pair %request (address %owner) (nat %token_id)) (nat %balance)) ;
(list (pair (pair %request (address %owner) (nat %token_id)) (nat %balance))) ;
DIG 3 ;
CONTRACT %getbalance (pair (contract %callback nat) (address %owner)) ;
DIG 3 ;
Expand Down
2 changes: 1 addition & 1 deletion batcher/michelson/eurl-vault-ghostnet.tz
Original file line number Diff line number Diff line change
Expand Up @@ -1632,7 +1632,7 @@
(list (pair (pair %request (address %owner) (nat %token_id)) (nat %balance))))) ;
DUP 2 ;
CONTRACT %balance_response_fa2
(pair (pair %request (address %owner) (nat %token_id)) (nat %balance)) ;
(list (pair (pair %request (address %owner) (nat %token_id)) (nat %balance))) ;
DIG 3 ;
CONTRACT %getbalance (pair (contract %callback nat) (address %owner)) ;
DIG 3 ;
Expand Down
2 changes: 1 addition & 1 deletion batcher/michelson/tzbtc-vault-ghostnet.tz
Original file line number Diff line number Diff line change
Expand Up @@ -1632,7 +1632,7 @@
(list (pair (pair %request (address %owner) (nat %token_id)) (nat %balance))))) ;
DUP 2 ;
CONTRACT %balance_response_fa2
(pair (pair %request (address %owner) (nat %token_id)) (nat %balance)) ;
(list (pair (pair %request (address %owner) (nat %token_id)) (nat %balance))) ;
DIG 3 ;
CONTRACT %getbalance (pair (contract %callback nat) (address %owner)) ;
DIG 3 ;
Expand Down
2 changes: 1 addition & 1 deletion batcher/michelson/usdt-vault-ghostnet.tz
Original file line number Diff line number Diff line change
Expand Up @@ -1632,7 +1632,7 @@
(list (pair (pair %request (address %owner) (nat %token_id)) (nat %balance))))) ;
DUP 2 ;
CONTRACT %balance_response_fa2
(pair (pair %request (address %owner) (nat %token_id)) (nat %balance)) ;
(list (pair (pair %request (address %owner) (nat %token_id)) (nat %balance))) ;
DIG 3 ;
CONTRACT %getbalance (pair (contract %callback nat) (address %owner)) ;
DIG 3 ;
Expand Down
2 changes: 1 addition & 1 deletion batcher/michelson/usdtz-vault-ghostnet.tz
Original file line number Diff line number Diff line change
Expand Up @@ -1632,7 +1632,7 @@
(list (pair (pair %request (address %owner) (nat %token_id)) (nat %balance))))) ;
DUP 2 ;
CONTRACT %balance_response_fa2
(pair (pair %request (address %owner) (nat %token_id)) (nat %balance)) ;
(list (pair (pair %request (address %owner) (nat %token_id)) (nat %balance))) ;
DIG 3 ;
CONTRACT %getbalance (pair (contract %callback nat) (address %owner)) ;
DIG 3 ;
Expand Down
2 changes: 1 addition & 1 deletion batcher/types.mligo
Original file line number Diff line number Diff line change
Expand Up @@ -639,5 +639,5 @@ type balance_of_responses = balance_of_response list
type balance_of =
[@layout:comb] {
requests : balance_request list;
callback : balance_of_response list contract;
callback : balance_of_responses contract;
}
4 changes: 2 additions & 2 deletions batcher/utils.mligo
Original file line number Diff line number Diff line change
Expand Up @@ -1070,7 +1070,7 @@ let entrypoints_exist
(token_fa12_addr: address)
(token_fa2_addr: address) : bool * bool * bool * bool =
let bo_fa2_opt: balance_of contract option = Tezos.get_entrypoint_opt "%balance_of" token_fa2_addr in
let cb_fa2_opt: balance_of_response contract option = Tezos.get_entrypoint_opt "%balance_response_fa2" callback in
let cb_fa2_opt: balance_of_responses contract option = Tezos.get_entrypoint_opt "%balance_response_fa2" callback in
let bo_fa12_opt: get_balance_request contract option = Tezos.get_entrypoint_opt "%getbalance" token_fa12_addr in
let cb_fa12_opt: nat contract option = Tezos.get_entrypoint_opt "%balance_response_fa12" callback in
(is_some bo_fa2_opt),(is_some cb_fa2_opt),(is_some bo_fa12_opt),(is_some cb_fa12_opt)
Expand All @@ -1087,7 +1087,7 @@ let entrypoints_exist
token_id = token_id;
} in
let bo_opt: balance_of contract option = Tezos.get_entrypoint_opt "%balance_of" token_addr in
let cb_opt: balance_of_response list contract option = Tezos.get_entrypoint_opt "%balance_response_fa2" callback in
let cb_opt: balance_of_responses contract option = Tezos.get_entrypoint_opt "%balance_response_fa2" callback in
match cb_opt,bo_opt with
| None, _ -> failwith unable_to_get_balance_response_fa2_entrypoint_from_vault
| _, None -> failwith unable_to_get_balance_of_entrypoint_from_fa2_token
Expand Down

0 comments on commit f1a85c8

Please sign in to comment.