batch
function to replace separate periphery contract
#88
Closed
smol-ninja
started this conversation in
Ideas
Replies: 2 comments 2 replies
-
Man I so wish that specifying multiple contract entrypoints were a feature supported by the EVM. This is an interesting proposal. My only concerns are is (i) security and (ii) developer UX.
My take:
|
Beta Was this translation helpful? Give feedback.
2 replies
-
Linked issues: |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Originally shared here and discussed here in details.
The idea is to include a
batch
function which can be used to construct an array of calls to multiple public functions from the core contract.The above function can be seen as a replacement of the separate periphery contract and it can be used to expose any API through the user interface.
Since it's a delegate call to itself and
batch
can only be applied to public functions, this no additional risks are introduced by it.No need to remove the
noDelegateCall
modifier. The delegate call is made from the contract itself and not from an outside proxy contract.In the above function,
address (this) == ORIGINAL
always.Example
FWIW Uniswap also has a similar function.
@sablier-labs/everybody.
Beta Was this translation helpful? Give feedback.
All reactions