@@ -130,7 +130,7 @@ def deposit(self, xfer: gtxn.AssetTransferTransaction, nonce: arc4.UInt64) -> No
130130 assert xfer .asset_amount > 0
131131
132132 self .listings [key ].deposited = arc4 .UInt64 (
133- self .listings [key ].deposited .native + xfer .asset_amount
133+ self .listings [key ].deposited .as_uint64 () + xfer .asset_amount
134134 )
135135
136136 @abimethod
@@ -161,14 +161,14 @@ def buy(
161161 listing = self .listings [key ].copy ()
162162
163163 amount_to_be_paid = self .quantity_price (
164- quantity , listing .unitary_price .native , asset .decimals
164+ quantity , listing .unitary_price .as_uint64 () , asset .decimals
165165 )
166166
167167 assert buy_pay .sender == Txn .sender
168168 assert buy_pay .receiver .bytes == owner .bytes
169169 assert buy_pay .amount == amount_to_be_paid
170170
171- self .listings [key ].deposited = arc4 .UInt64 (listing .deposited .native - quantity )
171+ self .listings [key ].deposited = arc4 .UInt64 (listing .deposited .as_uint64 () - quantity )
172172
173173 itxn .AssetTransfer (
174174 xfer_asset = asset ,
@@ -187,8 +187,8 @@ def withdraw(self, asset: Asset, nonce: arc4.UInt64) -> None:
187187 listing = self .listings [key ].copy ()
188188 if listing .bidder != arc4 .Address ():
189189 current_bid_deposit = self .quantity_price (
190- listing .bid .native ,
191- listing .bid_unitary_price .native ,
190+ listing .bid .as_uint64 () ,
191+ listing .bid_unitary_price .as_uint64 () ,
192192 asset .decimals ,
193193 )
194194 itxn .Payment (receiver = listing .bidder .native , amount = current_bid_deposit ).submit ()
@@ -200,7 +200,7 @@ def withdraw(self, asset: Asset, nonce: arc4.UInt64) -> None:
200200 itxn .AssetTransfer (
201201 xfer_asset = asset ,
202202 asset_receiver = Txn .sender ,
203- asset_amount = listing .deposited .native ,
203+ asset_amount = listing .deposited .as_uint64 () ,
204204 ).submit ()
205205
206206 @abimethod
@@ -220,13 +220,13 @@ def bid( # noqa: PLR0913
220220 assert unitary_price > listing .bid_unitary_price
221221
222222 current_bid_amount = self .quantity_price (
223- listing .bid .native , listing .bid_unitary_price .native , asset .decimals
223+ listing .bid .as_uint64 () , listing .bid_unitary_price .as_uint64 () , asset .decimals
224224 )
225225
226226 itxn .Payment (receiver = listing .bidder .native , amount = current_bid_amount ).submit ()
227227
228228 amount_to_be_bid = self .quantity_price (
229- quantity .native , unitary_price .native , asset .decimals
229+ quantity .as_uint64 () , unitary_price .as_uint64 () , asset .decimals
230230 )
231231
232232 assert bid_pay .sender == Txn .sender
@@ -245,12 +245,12 @@ def accept_bid(self, asset: Asset, nonce: arc4.UInt64) -> None:
245245 assert listing .bidder != arc4 .Address ()
246246
247247 min_quantity = (
248- listing .deposited .native
249- if listing .deposited .native < listing .bid .native
250- else listing .bid .native
248+ listing .deposited .as_uint64 ()
249+ if listing .deposited .as_uint64 () < listing .bid .as_uint64 ()
250+ else listing .bid .as_uint64 ()
251251 )
252252 best_bid_amount = self .quantity_price (
253- min_quantity , listing .bid_unitary_price .native , asset .decimals
253+ min_quantity , listing .bid_unitary_price .as_uint64 () , asset .decimals
254254 )
255255
256256 itxn .Payment (receiver = Txn .sender , amount = best_bid_amount ).submit ()
@@ -262,6 +262,6 @@ def accept_bid(self, asset: Asset, nonce: arc4.UInt64) -> None:
262262 ).submit ()
263263
264264 self .listings [key ].deposited = arc4 .UInt64 (
265- self .listings [key ].deposited .native - min_quantity
265+ self .listings [key ].deposited .as_uint64 () - min_quantity
266266 )
267- self .listings [key ].bid = arc4 .UInt64 (self .listings [key ].bid .native - min_quantity )
267+ self .listings [key ].bid = arc4 .UInt64 (self .listings [key ].bid .as_uint64 () - min_quantity )
0 commit comments