Skip to content

Commit

Permalink
fix ABI strings
Browse files Browse the repository at this point in the history
  • Loading branch information
LexLuthr committed Jan 31, 2025
1 parent 167c13b commit 0ddc513
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions market/ipni/ipni-provider/spark.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,13 @@ func (p *Provider) updateSparkContract(ctx context.Context) error {
// Parse the contract ABI
parsedABI, err := eabi.JSON(strings.NewReader(spark.GetPeerAbi))
if err != nil {
log.Fatalf("Failed to parse getPeer ABI: %v", err)
return xerrors.Errorf("Failed to parse getPeer ABI: %w", err)
}

// Encode the function call
callData, err := parsedABI.Pack("getPeerData", pInfo.SPID)
if err != nil {
log.Fatalf("Failed to pack function call data: %v", err)
return xerrors.Errorf("Failed to pack function call data: %w", err)
}

rMsg := &types.Message{
Expand Down
6 changes: 3 additions & 3 deletions market/ipni/spark/spark.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const AddPeerAbi = `[
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
}
]`

const UpdatePeerAbi = `[
Expand Down Expand Up @@ -87,7 +87,7 @@ const DeletePeerAbi = `[
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
}
]`

const GetPeerAbi = `[
Expand Down Expand Up @@ -121,5 +121,5 @@ const GetPeerAbi = `[
],
"stateMutability": "view",
"type": "function"
},
}
]`

0 comments on commit 0ddc513

Please sign in to comment.