github.com/mysteriumnetwork/node@v0.0.0-20240516044423-365054f76801/session/pingpong/noop/hermes_promise_settler.go (about) 1 /* 2 * Copyright (C) 2020 The "MysteriumNetwork/node" Authors. 3 * 4 * This program is free software: you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License as published by 6 * the Free Software Foundation, either version 3 of the License, or 7 * (at your option) any later version. 8 * 9 * This program is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details. 13 * 14 * You should have received a copy of the GNU General Public License 15 * along with this program. If not, see <http://www.gnu.org/licenses/>. 16 */ 17 18 package noop 19 20 import ( 21 "math/big" 22 23 "github.com/ethereum/go-ethereum/common" 24 "github.com/mysteriumnetwork/node/identity" 25 ) 26 27 // NoopHermesPromiseSettler doesn't do much. 28 type NoopHermesPromiseSettler struct { 29 } 30 31 // ForceSettle does nothing. 32 func (n *NoopHermesPromiseSettler) ForceSettle(chainID int64, _ identity.Identity, _ ...common.Address) error { 33 return nil 34 } 35 36 // SettleIntoStake does nothing. 37 func (n *NoopHermesPromiseSettler) SettleIntoStake(chainID int64, providerID identity.Identity, accountantID ...common.Address) error { 38 return nil 39 } 40 41 // SettleWithBeneficiary does nothing. 42 func (n *NoopHermesPromiseSettler) SettleWithBeneficiary(chainID int64, _ identity.Identity, _, _ common.Address) error { 43 return nil 44 } 45 46 // GetHermesFee does absolutely nothing. 47 func (n *NoopHermesPromiseSettler) GetHermesFee(chainID int64, _ common.Address) (uint16, error) { 48 return 0, nil 49 } 50 51 // Withdraw does absolutely nothing. 52 func (n *NoopHermesPromiseSettler) Withdraw(fromChainID int64, toChainID int64, providerID identity.Identity, hermesID, beneficiary common.Address, amount *big.Int) error { 53 return nil 54 } 55 56 // CheckLatestWithdrawal does absolutely nothing. 57 func (n *NoopHermesPromiseSettler) CheckLatestWithdrawal(chainID int64, providerID identity.Identity, hermesID common.Address) (*big.Int, string, error) { 58 return nil, "", nil 59 } 60 61 // RetryWithdrawLatest does absolutely nothing. 62 func (n *NoopHermesPromiseSettler) RetryWithdrawLatest(chainID int64, amountToWithdraw *big.Int, chid string, beneficiary common.Address, providerID identity.Identity) error { 63 return nil 64 }