Skip to content

Commit

Permalink
revert refuel (neo #2444) neo-project/neo#2560
Browse files Browse the repository at this point in the history
  • Loading branch information
ixje committed Aug 6, 2021
1 parent 48eb623 commit 813be43
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions neo3/contracts/native/fungible.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit 813be43

Please sign in to comment.