smart-transaction / stxn-contracts-core

Other
35 stars 1 forks source link

timeturner: Clearing balances after calls #2

Open laudiacay opened 1 year ago

laudiacay commented 1 year ago

how do we clear ERC20 and Ethereum balances?

ethereum is easy, we just wipe balances at end of each verify call with all the rest of the cleanup. maybe we even wipe it at the start. (why)

we don't know how to wipe ERC20s and NFTs either- he says "needs a non-ABI interface". i think we should just not worry about this... mayb.

laudiacay commented 1 year ago

nice solution is "fee recipient/coinbase is allowed to call on behalf of the timeturner when the portal is not open"

think about implementing this later- it lets them clean out the portal if there's anything in there :)

is a stress-test that lets people call each other and be more adversarial. cool.

laudiacay commented 1 year ago

this will make it so that "onlyTimeturner" is dangerous without checking that the portal is open. need to provide developer guidance on this if we go this route.