rusk icon indicating copy to clipboard operation
rusk copied to clipboard

Implement Economic Protocol scenario 3 "contract-earns-fees" scenario

Open miloszm opened this issue 10 months ago • 0 comments

Summary

We have a mechanism for "contract-pays-for-gas" scenario, now, based on similar approach we need to implement "contract-earns-fees" scenario.

Possible solution design or implementation

Make a method named "set_charge" available for contracts, and pass the charge down to the transfer contract. Transfer contract will increase contract's balance and pass down the signal for increasing the fee. Should the fee be not paid, the transaction will be rejected.

Additional context

It is important to also test the case when fee is not paid and transaction is rejected, as we'll need to make sure that the state of contract's balance is not affected in such case.

miloszm avatar Apr 10 '24 09:04 miloszm