Skip to content
This repository was archived by the owner on Feb 22, 2026. It is now read-only.

Commit b008de1

Browse files
authored
Merge pull request #587 from morgoth-bauglier/ft/deduct_nominal_fees
deduct nominal fees
2 parents 4b6de37 + be06fc7 commit b008de1

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

py-be/deduct.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
async def generate_contract(user_wallet, contract_data):
2+
fee_amount = calculate_fee(contract_data)
3+
4+
try:
5+
tx_hash = await deduct_fee(user_wallet, fee_amount)
6+
except FeeDeductionError as e:
7+
return {"status": "failed", "reason": str(e)}
8+
9+
contract_address = await deploy_contract(contract_data)
10+
return {"status": "success", "tx_hash": tx_hash, "contract_address": contract_address}

0 commit comments

Comments
 (0)