ParaProxy EIP-2535 Operations
ParaProxy EIP-2535 Operations
The main way to interact with the ParaProxy is by using the function updateImplementation
which has the following signature
Only PoolAddressProvider
can interact with the ParaProxy updateImplemnentation
Adding New Selectors
to add new selectors, we have to call updatePoolImpl in PoolAddressProvider
implAddress: is the implementation address
action: is action enum which can be Add (0), Replace (1), Remove (2)
functionSelectors: is an array of the 4byte keccak256 of the function selectors
poolAddress: is the address of the contract to call after the addition of the selectors. this can be an initialize function like what we provided in the following line:
newPool.interface.encodeFunctionData("initialize", [ addressesProvider.address, ])
Updating Existing Selectors
to update selectors, we have to call updatePoolImpl in PoolAddressProvider
implAddress: is the implementation address
action: is action enum which can be Add (0), Replace (1), Remove (2)
functionSelectors: is an array of the 4byte keccak256 of the function selectors
poolAddress: is the address of the contract to call after the addition of the selectors. this can be an initialize function like what we provided in the following line:
newPool.interface.encodeFunctionData("initialize", [ addressesProvider.address, ])
Deleting Selectors
to delete selectors, we have to call updatePoolImpl in PoolAddressProvider
implAddress: this should be zero address
action: is action enum which can be Add (0), Replace (1), Remove (2)
functionSelectors: is an array of the 4byte keccak256 of the function selectors to delete
next argument is ZERO_ADDRESS or we can specify an implementation to call if we want then specify the exact encoded function to call.
Last updated