-
Notifications
You must be signed in to change notification settings - Fork 7
/
util.go
30 lines (24 loc) · 864 Bytes
/
util.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// Copyright 2021 ChainSafe Systems
// SPDX-License-Identifier: MIT
package ante
import (
"github.com/ChainSafe/chainlink-cosmos/x/chainlink/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
)
func feedRewardSchemaStrategyChecker(strategy string) error {
if strategy != "" {
_, ok := types.FeedRewardStrategyConvertor[strategy]
if !ok {
return sdkerrors.Wrap(sdkerrors.ErrUnknownRequest, "invalid feed reward strategy")
}
}
return nil
}
// TODO: chainlink pubKey against observation signature, replace with validation logic here with chainlink key algo
func pubKeySignatureValidate(chainlinkPubKey, signature []byte) bool {
return true
}
// TODO: observation data against observation signature, replace with validation logic here with chainlink key algo
func signaturePlainDataValidate(signature, data []byte) bool {
return true
}