Skip to content

Commit

Permalink
Update E2E Mercury contract model (#11967)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszcl authored Feb 8, 2024
1 parent 78c48a9 commit 484011f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions integration-tests/contracts/contract_models.go
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,7 @@ type MercuryVerifierProxy interface {

type MercuryFeeManager interface {
Address() common.Address
UpdateSubscriberDiscount(subscriber common.Address, feedId [32]byte, token common.Address, discount uint64) (*types.Transaction, error)
}

type MercuryRewardManager interface {
Expand Down
13 changes: 13 additions & 0 deletions integration-tests/contracts/ethereum_contracts.go
Original file line number Diff line number Diff line change
Expand Up @@ -2408,6 +2408,19 @@ func (e *EthereumMercuryFeeManager) Address() common.Address {
return e.address
}

func (e *EthereumMercuryFeeManager) UpdateSubscriberDiscount(subscriber common.Address, feedId [32]byte, token common.Address, discount uint64) (*types.Transaction, error) {
opts, err := e.client.TransactionOpts(e.client.GetDefaultWallet())
if err != nil {
return nil, err
}
tx, err := e.instance.UpdateSubscriberDiscount(opts, subscriber, feedId, token, discount)
e.l.Info().Err(err).Msg("Called EthereumMercuryFeeManager.UpdateSubscriberDiscount()")
if err != nil {
return nil, err
}
return tx, e.client.ProcessTransaction(tx)
}

type EthereumMercuryRewardManager struct {
address common.Address
client blockchain.EVMClient
Expand Down

0 comments on commit 484011f

Please sign in to comment.