Comment on page
ERC2771 Migration Guide
How to migrate to the new Gelato Relay ERC2771 contracts
This only applies if you are using
@gelatonetwork/relay-sdkv3 or contracts from the package
Gelato Relay ERC2771 proxy contracts are immutable for security reasons. We have deployed new versions of our ERC2771 proxy contracts with enhanced security:
GelatoRelay1BalanceERC2771.sol, new addresses of which you can find here.
To support these new contracts, Relay Context Contracts found in the package
@gelatonetwork/relay-contexthave been updated to version v3, along with the Gelato Relay SDK package
@gelatonetwork/relay-sdk, which has been updated to version v4.
Gelato Relay continues to support ERC2771 contracts that inherit from the legacy
@gelatonetwork/relay-contextv2, so you can upgrade at your own convenience. Nevertheless we recommend you to upgrade as soon as possible to ensure optimal security, features and support.
To illustrate package and contract compatibility please refer to the following matrix:
@gelatonetwork/relay-sdkv3 with contracts inheriting from
@gelatonetwork/relay-contextv3, or using
@gelatonetwork/relay-sdkv4 with contracts inheriting from
@gelatonetwork/relay-contextv2 won't work, as they refer to different Gelato Relay ERC2771 contracts.
- 1.If you deployed contracts that inherit from
@gelatonetwork/relay-context- update the package version and either upgrade or redeploy your contracts.
- If you are using
sponsoredCallERC2771in combination with
ERC2771Context.sol- make sure to use the new
GelatoRelay1BalanceERC2771.solcontract address as the
trustedForwarderwhich you can find here.
- 2.If you are using
@gelatonetwork/relay-sdk- update the package version in your project.
- 3.Make sure you use your newly upgraded/deployed contract addresses with the updated Gelato Relay SDK package.