When a closure is passed to (as-contract ...), all the subsequent calls to tx-sender refers to the contract calling this construct.
In multiple contracts, the following pattern is constructed:
(as-contract (contract-call? <token> transfer u1 (as-contract tx-sender) recipient none)))
Low-level severity issues can cause minor impact and or are just warnings that can remain unfixed for now. It would be better to fix these issues at some point in the future.
So we could just write e.g. (as-contract (contract-call? .usda-token transfer usda-amount tx-sender (contract-call? .arkadiko-dao get-payout-address) none))?
Context
When a closure is passed to
(as-contract ...)
, all the subsequent calls totx-sender
refers to the contract calling this construct. In multiple contracts, the following pattern is constructed:The inner
(as-contract ...)
is unnecessary.Instances
Low-level severity issues can cause minor impact and or are just warnings that can remain unfixed for now. It would be better to fix these issues at some point in the future.