Skip to content
Available on private testnetTestnet: yesMainnet: Not availableSoftware: Core bad4a06ea · protocol pqwerai-v8-testnet/1Updated

Payable functions

Native PQAI behaves exactly like ether in the EVM: msg.value is in wei (1 PQAI = 10^18 wei).

function tip(address to) external payable { … }          // accepts PQAI with a call
receive() external payable { … }                          // plain transfers with empty calldata
  • A non-payable function reverts if msg.value > 0.
  • Pull, don't push. Credit balances and let recipients withdraw(); set state to zero before sending (TipJar.withdraw, ServiceEscrow.withdraw). A recipient that reverts then cannot block others.
  • Use call{value: amount}("") and check the result; transfer/send forward only 2300 gas.
  • The tested TipJar shows a payable function, a basis-point fee via a library and a pull withdrawal.
  • SELFDESTRUCT can force PQAI into a contract without calling it; never rely on address(this).balance for accounting.

Found a problem? Report a documentation issue · Build testnet-rc1+72057fe3ec