RedirectAll.solin the editor window.
TradeableCashflow.solis our main contract, which inherits
RedirectAllfrom the local file, and the
ERC721contract from the Open Zeppelin Github repo.
_changeReceiver()which will redirect the incoming flows.
_changeReceiver()does in the contract
RedirectAll.sol. The first step is to delete the current flow from the Super App to the current reciever.
@superfluid-finance/js-sdkto perform the same action:
_changeReveiver(), the Super App starts a new flow to the new reciever, or new NFT owner:
RedirectAll.solwe can start to see all the callbacks. The fist one is
afterAgreementCreated(). This function is called any time a new agreement is created which involves the SuperApp.
onlyExpectedallows use to only execute this when the agreement is a Constant Flow Agreement, and the token address matches the
_updateOutFlowwhich combines the new incoming flow and creates the new flow
TradeableCashflow.solin the editor window.
0.7.0and hit "compile".
transferFrom(). Since there is only a single NFT, the
tokenIdwill be always be