2019-06-13 17:23:08 +00:00
|
|
|
// VulcanizeDB
|
|
|
|
// Copyright © 2019 Vulcanize
|
|
|
|
|
|
|
|
// This program is free software: you can redistribute it and/or modify
|
|
|
|
// it under the terms of the GNU Affero General Public License as published by
|
|
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
|
|
// (at your option) any later version.
|
|
|
|
|
|
|
|
// This program is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
// GNU Affero General Public License for more details.
|
|
|
|
|
|
|
|
// You should have received a copy of the GNU Affero General Public License
|
|
|
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
2019-06-06 17:55:59 +00:00
|
|
|
package config
|
|
|
|
|
2019-06-18 17:28:57 +00:00
|
|
|
import "math/big"
|
|
|
|
|
2019-06-06 17:55:59 +00:00
|
|
|
// Subscription config is used by a subscribing transformer to specifiy which data to receive from the seed node
|
|
|
|
type Subscription struct {
|
|
|
|
BackFill bool
|
|
|
|
BackFillOnly bool
|
2019-06-18 17:28:57 +00:00
|
|
|
StartingBlock *big.Int
|
|
|
|
EndingBlock *big.Int // set to 0 or a negative value to have no ending block
|
2019-06-06 17:55:59 +00:00
|
|
|
HeaderFilter HeaderFilter
|
2019-06-18 17:28:57 +00:00
|
|
|
TrxFilter TrxFilter
|
2019-06-06 17:55:59 +00:00
|
|
|
ReceiptFilter ReceiptFilter
|
2019-06-18 17:28:57 +00:00
|
|
|
StateFilter StateFilter
|
2019-06-06 17:55:59 +00:00
|
|
|
StorageFilter StorageFilter
|
|
|
|
}
|
|
|
|
|
|
|
|
type HeaderFilter struct {
|
2019-06-18 17:28:57 +00:00
|
|
|
Off bool
|
2019-06-06 17:55:59 +00:00
|
|
|
FinalOnly bool
|
|
|
|
}
|
|
|
|
|
|
|
|
type TrxFilter struct {
|
|
|
|
Off bool
|
|
|
|
Src []string
|
|
|
|
Dst []string
|
|
|
|
}
|
|
|
|
|
|
|
|
type ReceiptFilter struct {
|
2019-08-05 15:46:32 +00:00
|
|
|
Off bool
|
2019-06-20 15:59:10 +00:00
|
|
|
Contracts []string
|
2019-08-05 15:46:32 +00:00
|
|
|
Topic0s []string
|
2019-06-06 17:55:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
type StateFilter struct {
|
|
|
|
Off bool
|
|
|
|
Addresses []string // is converted to state key by taking its keccak256 hash
|
|
|
|
IntermediateNodes bool
|
|
|
|
}
|
|
|
|
|
|
|
|
type StorageFilter struct {
|
|
|
|
Off bool
|
|
|
|
Addresses []string
|
|
|
|
StorageKeys []string
|
|
|
|
IntermediateNodes bool
|
2019-06-18 17:28:57 +00:00
|
|
|
}
|