馃 Motivation
The till pattern that utilizes transient storage is useful for many DeFi protocols.
馃摑 Details
Create a base contract that implements the till pattern, that can be inherited by other contracts. In this pattern:
- A caller calls the contract and then receives a callback with a new ID
- Within the callback, the caller can make any number of changes (need a modifier and helper function to get current caller ID and prevent calling other methods without a lock)
- At the end of the till, run some abstract validation to ensure the initial call can return successfully
- Note in this pattern, re-entrance is allowed and the nested caller gets a new ID
- Caller must be able to specify input to the callback and receive output from the callback
馃 Motivation
The till pattern that utilizes transient storage is useful for many DeFi protocols.
馃摑 Details
Create a base contract that implements the till pattern, that can be inherited by other contracts. In this pattern: