If inside fallback function i use delegatecall to execute some code in a helper contract .. after asserting data is correct the returned data consist of items to pay (eth or erc20 ) and nft quantity to mint ..
Not sure payable modifier should be for the mint function in helper contract and fallback is giving error when sending eth without adding payable , and if i add payable and send value , then helper contract ask to add receive function or payable for the called function (mint) but there is another logic for diff selectors being done inside the fallback , and i dont want the payable for all .. stuck in that loop.. when the data returned from delegate call , if selector was mint then i call _mintAnPay for payout and mint!!
Nov 28, 2023, 8:04 PM
_mintAndpay is internal in the calling contract
@geomad
Nov 30, 2023, 7:38 AM