Closed Wally869 closed 8 months ago
Could also set the Receiver as a proxy for balances and call methods from Summit for transfers
From discussion with @MBeliou intent is to minimize the number of contracts interacted with, so:
I think the proxy approach, with the Receiver being the one storing funds and the Summit contract handling the tracking of funds and withdrawals (and so calling receiver to do the actual sends) is the best approach
Set up the CCIPReceiver as a proxy to distribute funds in 1cd84a581770e9171d0812ec135dea14c28de6f9 A first test has been set in that commit (withdrawal after someone bought access to a paying article).
Will add more tests to validate this new feature is working properly:
Added final tests in 293a96f13d974d35acfea5f93fe44e696236b0f9 (multiple steps tests)
In current workflow, the Receiver contract is the one receiving tokens.
Need to either transfer these tokens to the Summit contract or merge Receiver and Summit contracts. Added benefit of merging is a simplified instantiation process