How to migrate to the new Gelato Relay ERC2771 contract
@gelatonetwork/relay-sdk
v3 or contracts from the package @gelatonetwork/relay-context
v2GelatoRelayERC2771.sol
and GelatoRelay1BalanceERC2771.sol
, new addresses of which you can find here.
To support these new contracts, Relay Context Contracts found in the package @gelatonetwork/relay-context
have 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-context
v2, 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.
@gelatonetwork/relay-sdk
v3 with contracts inheriting from @gelatonetwork/relay-context
v3, or using @gelatonetwork/relay-sdk
v4 with contracts inheriting from @gelatonetwork/relay-context
v2 won’t work, as they refer to different Gelato Relay ERC2771 contracts. @gelatonetwork/relay-context
- update the package version and either upgrade or redeploy your contracts.
sponsoredCallERC2771
in combination with ERC2771Context.sol
- make sure to use the new GelatoRelay1BalanceERC2771.sol
contract address as the trustedForwarder which you can find here.
@gelatonetwork/relay-sdk
- update the package version in your project.