Skip to content

Commit

Permalink
Update integration test interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
austinborn committed Sep 14, 2023
1 parent 206cc95 commit 7c93caa
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions integration-tests/contracts/contract_models.go
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,6 @@ type MercuryVerifier interface {

type MercuryVerifierProxy interface {
Address() string
Verify(signedReport []byte, value *big.Int) (*types.Transaction, error)
VerifyBulk(signedReports [][]byte, value *big.Int) (*types.Transaction, error)
Verify(signedReport []byte, feePayload []byte, value *big.Int) (*types.Transaction, error)
VerifyBulk(signedReports [][]byte, feePayload []byte, value *big.Int) (*types.Transaction, error)
}
10 changes: 5 additions & 5 deletions integration-tests/contracts/ethereum_contracts.go
Original file line number Diff line number Diff line change
Expand Up @@ -2257,7 +2257,7 @@ func (e *EthereumMercuryVerifier) Address() string {
return e.address.Hex()
}

func (e *EthereumMercuryVerifier) Verify(signedReport []byte, sender common.Address) error {
func (e *EthereumMercuryVerifier) Verify(signedReport []byte, feePayload []byte, sender common.Address) error {
opts, err := e.client.TransactionOpts(e.client.GetDefaultWallet())
if err != nil {
return err
Expand All @@ -2279,30 +2279,30 @@ func (e *EthereumMercuryVerifierProxy) Address() string {
return e.address.Hex()
}

func (e *EthereumMercuryVerifierProxy) Verify(signedReport []byte, value *big.Int) (*types.Transaction, error) {
func (e *EthereumMercuryVerifierProxy) Verify(signedReport []byte, feePayload []byte, value *big.Int) (*types.Transaction, error) {
opts, err := e.client.TransactionOpts(e.client.GetDefaultWallet())
if value != nil {
opts.Value = value
}
if err != nil {
return nil, err
}
tx, err := e.instance.Verify(opts, signedReport)
tx, err := e.instance.Verify(opts, feePayload, signedReport)
if err != nil {
return nil, err
}
return tx, e.client.ProcessTransaction(tx)
}

func (e *EthereumMercuryVerifierProxy) VerifyBulk(signedReports [][]byte, value *big.Int) (*types.Transaction, error) {
func (e *EthereumMercuryVerifierProxy) VerifyBulk(signedReports [][]byte, feePayload []byte, value *big.Int) (*types.Transaction, error) {
opts, err := e.client.TransactionOpts(e.client.GetDefaultWallet())
if value != nil {
opts.Value = value
}
if err != nil {
return nil, err
}
tx, err := e.instance.VerifyBulk(opts, signedReports)
tx, err := e.instance.VerifyBulk(opts, signedReports, feePayload)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 7c93caa

Please sign in to comment.