@@ -35,20 +35,19 @@ export function createDisputeFromEvent(event: DisputeCreation): void {
3535}
3636
3737// source: contracts/src/arbitration/interfaces/IArbitrableV2.sol
38- const DisputeRequest = "DisputeRequest(address,uint256,uint256,uint256,string )" ;
38+ const DisputeRequest = "DisputeRequest(address,uint256,uint256)" ;
3939const DisputeRequestSignature = crypto . keccak256 ( ByteArray . fromUTF8 ( DisputeRequest ) ) ;
4040
4141// note : we are using bytes32 in place of string as strings cannot be decoded and it breaks the function.
4242// It is okay for us, as we are only interested in the uint256 in frontend.
43- const DisputeRequestTypestring = "(uint256,uint256,bytes32 )" ; // _externalDisputeId, _templateId,_templateUri
43+ const DisputeRequestTypestring = "(uint256)" ; // _templateId
4444
4545// source: contracts/src/gateway/interfaces/IHomeGateway.sol
46- const CrossChainDisputeIncoming =
47- "CrossChainDisputeIncoming(address,uint256,address,uint256,uint256,uint256,uint256,string)" ;
46+ const CrossChainDisputeIncoming = "CrossChainDisputeIncoming(address,uint256,address,uint256,uint256,uint256)" ;
4847const CrossChainDisputeIncomingSignature = crypto . keccak256 ( ByteArray . fromUTF8 ( CrossChainDisputeIncoming ) ) ;
4948
5049// note : arbitrable is an indexed arg, so it will topic[1]
51- const CrossChainDisputeIncomingTypestring = "(address,uint256,uint256,uint256,string )" ; // arbitrator, _arbitrableChainId, _externalDisputeId, _templateId, _templateUri
50+ const CrossChainDisputeIncomingTypestring = "(address,uint256,uint256)" ; // arbitrator, _arbitrableChainId, _templateId
5251
5352export const updateDisputeRequestData = ( event : DisputeCreation ) : void => {
5453 const dispute = Dispute . load ( event . params . _disputeID . toString ( ) ) ;
@@ -96,8 +95,7 @@ export const updateDisputeRequestData = (event: DisputeCreation): void => {
9695 if ( ! decoded ) return ;
9796 dispute . isCrossChain = true ;
9897 dispute . arbitrableChainId = decoded . toTuple ( ) [ 1 ] . toBigInt ( ) ;
99- dispute . externalDisputeId = decoded . toTuple ( ) [ 2 ] . toBigInt ( ) ;
100- dispute . templateId = decoded . toTuple ( ) [ 3 ] . toBigInt ( ) ;
98+ dispute . templateId = decoded . toTuple ( ) [ 2 ] . toBigInt ( ) ;
10199 dispute . save ( ) ;
102100 return ;
103101 } else if ( disputeRequestEventIndex !== - 1 ) {
@@ -107,8 +105,7 @@ export const updateDisputeRequestData = (event: DisputeCreation): void => {
107105 if ( ! decoded ) return ;
108106 dispute . isCrossChain = false ;
109107 dispute . arbitrableChainId = getHomeChainId ( dataSource . network ( ) ) ;
110- dispute . externalDisputeId = decoded . toTuple ( ) [ 0 ] . toBigInt ( ) ;
111- dispute . templateId = decoded . toTuple ( ) [ 1 ] . toBigInt ( ) ;
108+ dispute . templateId = decoded . toTuple ( ) [ 0 ] . toBigInt ( ) ;
112109 dispute . save ( ) ;
113110 return ;
114111 }
0 commit comments