Closed emishur closed 3 years ago
It is useful to keep "time passed" values as int to compare timestamps with seconds added. For example, the line Tezos.now <= auction.last_bid_time + auction.round_time
only works if auction.round_time
is int.
I solve for the chance of passing negative values by giving configure_param
the following type:
type configure_param =
[@layout:comb]
{
opening_price : tez;
min_raise : tez;
round_time : nat;
asset : (tokens list);
auction_time : nat;
start_time : timestamp;
}
and then casting the nats to int as in
I also have the following line for round_time
:
I realize now I do not have a similar check for auction time. I will include that
https://github.com/tqtezos/minter/blob/9bd894ec8c7a5a5a45d166f6b0c6b49c3810ddc7/contracts/ligo/src/english_auction_tez.mligo#L23