Skip to content

Commit f16b399

Browse files
authored
revert refuel (neo #2444) neo-project/neo#2560 (#122)
1 parent 58c1da7 commit f16b399

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

neo3/contracts/native/fungible.py

-9
Original file line numberDiff line numberDiff line change
@@ -947,12 +947,3 @@ def on_persist(self, engine: contracts.ApplicationEngine) -> None:
947947
primary = pub_keys[engine.snapshot.persisting_block.primary_index]
948948
script_hash = to_script_hash(contracts.Contract.create_signature_redeemscript(primary))
949949
self.mint(engine, script_hash, vm.BigInteger(total_network_fee), False)
950-
951-
@register("refuel", contracts.CallFlags.STATES | contracts.CallFlags.ALLOW_NOTIFY, cpu_price=1 << 15)
952-
def refuel(self, engine: contracts.ApplicationEngine, account: types.UInt160, amount: int):
953-
if amount < 0:
954-
raise ValueError("Cannot refuel with negative amount")
955-
if not engine.checkwitness(account):
956-
raise ValueError("[refuel] check witness failed")
957-
self.burn(engine, account, vm.BigInteger(amount))
958-
engine.refuel(amount)

0 commit comments

Comments
 (0)