Feat: added chain IDs to injected parameters #50
Merged
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.
Changes
arbitrableChainID
andarbitratorChainID
parametersv8-sandbox
Notice
The changes here are supposed to be backwards compatible, so it will be released as a minor version.
New functionality
As recently discussed on the ERC-1497 original issue, we need some new functionality on
@kleros/archon
.The updated proposal introduces, among other things, 2 new fields for the
MetaEvidence
JSON file:arbitrableChainID
arbitratorChainID
Those fields are important to enable multi-chain
MetaEvidence
and are crucial in a cross-chain arbitration flow. Furthermore, they prevent issues when using deterministic contract addresses (CREATE2
), which could cause aMetaEvidence
for a specific chain being considered valid for a different one.Such parameters can also be injected as
scriptParameters
when callingarchon.arbitrable.getMetaEvidence()
, which will be used when the parameters above are not set in the JSON file. However the primary source of truth is still the values declared in theMetaEvidence
JSON.The following table summarizes the behavior when both fields above are present (✅) or absent (❌) in the JSON file and the
scriptParameters
option:arbitrableChainID
param is different from the value in JSONarbitrableChainID
param is different from the value in JSONarbitrableChainID
param is different from the value in JSONarbitratorChainID
param is different from the value in JSONarbitratorChainID
param is different from the value in JSONarbitrableChainID
assumes the same value asarbitratorChainID
; invalid ifarbitratorChainID
param is different from the value in JSONarbitrableChainID
assumes the same value asarbitratorChainID
; Always validarbitrableChainID
assumes the same value asarbitratorChainID
; Always valid