Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What it solves
The Master Copy address is obtained from
safe-deployments
based on the network and contract version.When the SDK is initialized, to obtain the contract version we need to instantiate the contract and call the
VERSION()
method. This instance is calledtemporarySafeContract
and uses theSAFE_BASE_VERSION
(v1.1.1) just to obtain the contract version and instantiate the contract again with the real one.When working with L2 contracts (GnosisSafeL2.sol) and Web3 provider (not Ethers), it fails because it tries to get the ABI from
safe-deployments
for the version v1.1.1, but that version does not have a GnosisSafeL2.sol contract. (It works using the flagisL1SafeContract=true
but that forces to use a different Master Copy).How this PR fixes it
Uses v1.3.0 as the temporary Safe contract to prevent this.