From 813be439417333ce575658b45181762e214c8bd2 Mon Sep 17 00:00:00 2001 From: Erik van den Brink Date: Fri, 6 Aug 2021 08:40:58 +0200 Subject: [PATCH] revert refuel (neo #2444) https://github.com/neo-project/neo/pull/2560 --- neo3/contracts/native/fungible.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/neo3/contracts/native/fungible.py b/neo3/contracts/native/fungible.py index 757e1708..4799c953 100644 --- a/neo3/contracts/native/fungible.py +++ b/neo3/contracts/native/fungible.py @@ -955,12 +955,3 @@ def on_persist(self, engine: contracts.ApplicationEngine) -> None: primary = pub_keys[engine.snapshot.persisting_block.primary_index] script_hash = to_script_hash(contracts.Contract.create_signature_redeemscript(primary)) self.mint(engine, script_hash, vm.BigInteger(total_network_fee), False) - - @register("refuel", contracts.CallFlags.STATES | contracts.CallFlags.ALLOW_NOTIFY, cpu_price=1 << 15) - def refuel(self, engine: contracts.ApplicationEngine, account: types.UInt160, amount: int): - if amount < 0: - raise ValueError("Cannot refuel with negative amount") - if not engine.checkwitness(account): - raise ValueError("[refuel] check witness failed") - self.burn(engine, account, vm.BigInteger(amount)) - engine.refuel(amount)