123456789101112131415161718 |
- LEDGER Paypal {
- VAR withdraw_enabled = false;
- VAR deposits = {};
- ON tag = "approved" (tx) {
- withdraw_enabled[tx.to[0].to] = true;
- }
- Deposit(tx) {
- deposits[tx.to[0].to] += 1
- }
-
- Withdraw(tx) {
- IF despits[tx.from[0].from] == 1 && NOT withdraw_enabled(tx.from[0].from) {
- FAIL "Withdrawals are not enabled";
- }
- }
- }
|