diff --git a/cmd/mempool/config/validators.go b/cmd/mempool/config/validators.go index 5185f54..64e9f4f 100644 --- a/cmd/mempool/config/validators.go +++ b/cmd/mempool/config/validators.go @@ -41,7 +41,7 @@ func (cfg MempoolDataSource) Validate() error { func (cfg Filters) Validate() error { switch { case len(cfg.Kinds) == 0: - cfg.Kinds = append(cfg.Kinds, node.KindTransaction) + cfg.Kinds = []string{node.KindTransaction} default: if err := validateKinds(cfg.Kinds...); err != nil { return err @@ -62,7 +62,7 @@ func validateKinds(kinds ...string) error { for _, valid := range []string{ node.KindActivation, node.KindBallot, node.KindDelegation, node.KindDoubleBaking, node.KindDoubleEndorsing, node.KindEndorsement, node.KindNonceRevelation, node.KindOrigination, node.KindProposal, - node.KindReveal, node.KindTransaction, + node.KindReveal, node.KindTransaction, node.KindRegisterGlobalConstant, } { if kind == valid { found = true diff --git a/cmd/mempool/handlers.go b/cmd/mempool/handlers.go index 673d330..1d8fdfa 100644 --- a/cmd/mempool/handlers.go +++ b/cmd/mempool/handlers.go @@ -178,6 +178,8 @@ func (indexer *Indexer) handleContent(db *gorm.DB, content node.Content, operati return handleReveal(db, content, operation, indexer.filters.Accounts...) case node.KindTransaction: return handleTransaction(db, content, operation, indexer.filters.Accounts...) + case node.KindRegisterGlobalConstant: + return handleRegisterGloabalConstant(db, content, operation) default: return errors.Wrap(node.ErrUnknownKind, content.Kind) } @@ -345,6 +347,15 @@ func handleProposal(db *gorm.DB, content node.Content, operation models.MempoolO return nil } +func handleRegisterGloabalConstant(db *gorm.DB, content node.Content, operation models.MempoolOperation) error { + var registerGlobalConstant models.RegisterGlobalConstant + if err := json.Unmarshal(content.Body, ®isterGlobalConstant); err != nil { + return err + } + registerGlobalConstant.MempoolOperation = operation + return db.Clauses(clause.OnConflict{DoNothing: true}).Create(®isterGlobalConstant).Error +} + func (indexer *Indexer) isKindAvailiable(kind string) bool { for _, availiable := range indexer.filters.Kinds { if strings.HasPrefix(kind, availiable) { diff --git a/cmd/mempool/models/mempool_operation.go b/cmd/mempool/models/mempool_operation.go index b711b61..97a0a18 100644 --- a/cmd/mempool/models/mempool_operation.go +++ b/cmd/mempool/models/mempool_operation.go @@ -192,6 +192,8 @@ func getModelByKind(kind string) (interface{}, error) { return &Reveal{}, nil case node.KindTransaction: return &Transaction{}, nil + case node.KindRegisterGlobalConstant: + return &RegisterGlobalConstant{}, nil default: return nil, errors.Wrap(node.ErrUnknownKind, kind) } diff --git a/cmd/mempool/models/register_global_constant.go b/cmd/mempool/models/register_global_constant.go new file mode 100644 index 0000000..df59fa2 --- /dev/null +++ b/cmd/mempool/models/register_global_constant.go @@ -0,0 +1,19 @@ +package models + +import "gorm.io/datatypes" + +// RegisterGlobalConstant - +type RegisterGlobalConstant struct { + MempoolOperation + Source string `json:"source"` + Fee string `json:"fee"` + Counter string `json:"counter"` + GasLimit string `json:"gas_limit"` + StorageLimit string `json:"storage_limit"` + Value datatypes.JSON `json:"value"` +} + +// TableName - +func (RegisterGlobalConstant) TableName() string { + return "register_global_constant" +} diff --git a/cmd/mempool/tzkt/tzkt.go b/cmd/mempool/tzkt/tzkt.go index da5f953..f646b75 100644 --- a/cmd/mempool/tzkt/tzkt.go +++ b/cmd/mempool/tzkt/tzkt.go @@ -114,29 +114,16 @@ func (tzkt *TzKT) Blocks() <-chan BlockMessage { func (tzkt *TzKT) handleBlockMessage(msg events.Message) error { switch msg.Type { case events.MessageTypeData: - data, ok := msg.Body.([]interface{}) - if !ok { - return errors.Wrapf(ErrInvalidBlockType, "%v", msg.Body) - } - if len(data) == 0 { + if msg.Body == nil { return nil } - blockData, ok := data[0].(map[string]interface{}) - if !ok { - return errors.Wrapf(ErrInvalidBlockType, "%v", data[0]) - } - hash, err := getString(blockData, "hash") - if err != nil { - return err - } - level, err := getUint64(blockData, "level") - if err != nil { - return err - } - tzkt.blocks <- BlockMessage{ - Hash: hash, - Level: level, - Type: msg.Type, + blocks := msg.Body.([]events.Block) + for i := range blocks { + tzkt.blocks <- BlockMessage{ + Hash: blocks[i].Hash, + Level: blocks[i].Level, + Type: msg.Type, + } } case events.MessageTypeState, events.MessageTypeReorg: tzkt.blocks <- BlockMessage{ @@ -153,7 +140,11 @@ func (tzkt *TzKT) handleBlockMessage(msg events.Message) error { func (tzkt *TzKT) handleOperationMessage(msg events.Message) error { switch msg.Type { case events.MessageTypeData: - return tzkt.handleUpdateMessage(msg) + if msg.Body == nil { + return nil + } + operations := msg.Body.([]interface{}) + return tzkt.handleUpdateMessage(operations) case events.MessageTypeState, events.MessageTypeReorg: default: return errors.Wrapf(ErrUnknownMessageType, "%d", msg.Type) @@ -162,19 +153,11 @@ func (tzkt *TzKT) handleOperationMessage(msg events.Message) error { return nil } -func (tzkt *TzKT) handleUpdateMessage(msg events.Message) error { +func (tzkt *TzKT) handleUpdateMessage(operations []interface{}) error { message := newOperationMessage() - body, ok := msg.Body.([]interface{}) - if !ok { - return errors.Wrapf(ErrInvalidBodyType, "%T", msg.Body) - } - for i := range body { - operation, ok := body[i].(map[string]interface{}) - if !ok { - return errors.Wrapf(ErrInvalidOperationType, "%T", body[i]) - } - if err := tzkt.processOperation(operation, &message); err != nil { + for i := range operations { + if err := tzkt.processOperation(operations[i], &message); err != nil { return err } } @@ -184,33 +167,81 @@ func (tzkt *TzKT) handleUpdateMessage(msg events.Message) error { return nil } -func getString(data map[string]interface{}, key string) (string, error) { - value, ok := data[key] - if !ok { - return "", errors.Wrapf(ErrOperationDoesNotContain, "field=%s data=%v", key, data) - } - s, ok := value.(string) - if !ok { - return "", errors.Wrapf(ErrInvalidFieldType, "field=%s expected_type=string type=%T data=%v", key, value, value) - } - return s, nil -} +func (tzkt *TzKT) getAPIOperation(data interface{}) (api.Operation, error) { + switch operation := data.(type) { + + case *events.Delegation: + tx := api.Operation{ + ID: operation.ID, + Level: operation.Level, + Hash: operation.Hash, + Kind: toNodeKinds[operation.Type], + Block: operation.Block, + GasUsed: &operation.GasUsed, + BakerFee: &operation.BakerFee, + } + if operation.NewDelegate != nil { + tx.Delegate = &api.Address{ + Alias: operation.NewDelegate.Alias, + Address: operation.NewDelegate.Address, + } + } + return tx, nil + + case *events.Origination: + tx := api.Operation{ + ID: operation.ID, + Level: operation.Level, + Hash: operation.Hash, + Kind: toNodeKinds[operation.Type], + Block: operation.Block, + GasUsed: &operation.GasUsed, + BakerFee: &operation.BakerFee, + } + return tx, nil + + case *events.Reveal: + tx := api.Operation{ + ID: operation.ID, + Level: operation.Level, + Hash: operation.Hash, + Kind: toNodeKinds[operation.Type], + Block: operation.Block, + GasUsed: &operation.GasUsed, + BakerFee: &operation.BakerFee, + } + return tx, nil + + case *events.Transaction: + tx := api.Operation{ + ID: operation.ID, + Level: operation.Level, + Hash: operation.Hash, + Kind: toNodeKinds[operation.Type], + Block: operation.Block, + GasUsed: &operation.GasUsed, + BakerFee: &operation.BakerFee, + } + if operation.Parameter != nil { + tx.Parameters = &api.Parameters{ + Entrypoint: operation.Parameter.Entrypoint, + Value: operation.Parameter.Value, + } + } + return tx, nil -func getUint64(data map[string]interface{}, key string) (uint64, error) { - value, ok := data[key] - if !ok { - return 0, errors.Wrapf(ErrOperationDoesNotContain, "field=%s data=%v", key, data) - } - f, ok := value.(float64) - if !ok { - return 0, errors.Wrapf(ErrInvalidFieldType, "field=%s expected_type=float64 type=%T data=%v", key, value, value) + case map[string]interface{}: + var general api.Operation + err := mapstructure.Decode(data, &general) + return general, err + default: + return api.Operation{}, errors.Wrapf(ErrInvalidOperationType, "%T", data) } - return uint64(f), nil } -func (tzkt *TzKT) processOperation(data map[string]interface{}, message *OperationMessage) error { - var operation api.Operation - if err := mapstructure.Decode(data, &operation); err != nil { +func (tzkt *TzKT) processOperation(data interface{}, message *OperationMessage) error { + operation, err := tzkt.getAPIOperation(data) + if err != nil { return err } operation.Kind = toNodeKinds[operation.Kind] diff --git a/go.mod b/go.mod index 1aa9b70..9dbb4b0 100644 --- a/go.mod +++ b/go.mod @@ -3,10 +3,8 @@ module github.com/dipdup-net/mempool go 1.15 require ( - github.com/allegro/bigcache v1.2.1 // indirect github.com/btcsuite/btcutil v1.0.2 - github.com/dipdup-net/go-lib v0.1.26 - github.com/gofrs/uuid v4.0.0+incompatible // indirect + github.com/dipdup-net/go-lib v0.1.30 github.com/json-iterator/go v1.1.12 // indirect github.com/karlseguin/ccache v2.0.3+incompatible github.com/karlseguin/expect v1.0.8 // indirect @@ -15,13 +13,12 @@ require ( github.com/pkg/errors v0.9.1 github.com/sirupsen/logrus v1.8.1 github.com/stretchr/testify v1.7.0 - github.com/syndtr/goleveldb v1.0.0 // indirect github.com/ubiq/go-ubiq v3.0.1+incompatible golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 - golang.org/x/sys v0.0.0-20210923061019-b8560ed6a9b7 // indirect + golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect gorm.io/datatypes v1.0.2 - gorm.io/driver/postgres v1.1.1 // indirect - gorm.io/gorm v1.21.15 + gorm.io/driver/postgres v1.1.2 // indirect + gorm.io/gorm v1.21.16 ) diff --git a/go.sum b/go.sum index bb1308b..9ef7587 100644 --- a/go.sum +++ b/go.sum @@ -13,8 +13,6 @@ github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuy github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/allegro/bigcache v1.2.1 h1:hg1sY1raCwic3Vnsvje6TT7/pnZba83LeFck5NrFKSc= -github.com/allegro/bigcache v1.2.1/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= @@ -60,16 +58,11 @@ github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2 github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/denisenkom/go-mssqldb v0.9.0 h1:RSohk2RsiZqLZ0zCjtfn3S4Gp4exhpBWHyQ7D0yGjAk= -github.com/denisenkom/go-mssqldb v0.9.0/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU= +github.com/denisenkom/go-mssqldb v0.10.0 h1:QykgLZBorFE95+gO3u9esLd0BmbvpWp0/waNNZfHBM8= github.com/denisenkom/go-mssqldb v0.10.0/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/dipdup-net/go-lib v0.1.20 h1:YCv0ijd3OCQT6JwRM6xII9cSYUa9Ug5n20P8VaEC0v0= -github.com/dipdup-net/go-lib v0.1.20/go.mod h1:8HmLvEu4KKzJAJpvs/yQwEv53tS+ma6gypxSrcNw1/g= -github.com/dipdup-net/go-lib v0.1.25 h1:J0l6Z6RAZv9DrLg8CNCOu5bJihhHgkRrfCCNg3v9MqI= -github.com/dipdup-net/go-lib v0.1.25/go.mod h1:8HmLvEu4KKzJAJpvs/yQwEv53tS+ma6gypxSrcNw1/g= -github.com/dipdup-net/go-lib v0.1.26 h1:NmiroC60gS+UPow4Pwu8JK1qhCWExVi0WqBDPl5FP3s= -github.com/dipdup-net/go-lib v0.1.26/go.mod h1:8HmLvEu4KKzJAJpvs/yQwEv53tS+ma6gypxSrcNw1/g= +github.com/dipdup-net/go-lib v0.1.30 h1:O8psBi6rTBHKoXCsgQmf/6Zut9X+0zFh/Sv0qmITES0= +github.com/dipdup-net/go-lib v0.1.30/go.mod h1:i3p/qLTxQ43aiHxlg30FTLeysryjPlk5sT8fY3PxgUY= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= @@ -182,6 +175,7 @@ github.com/jackc/pgio v1.0.0/go.mod h1:oP+2QK2wFfUWgr+gxjoBH9KGBb31Eio69xUb0w5bY github.com/jackc/pgmock v0.0.0-20190831213851-13a1b77aafa2 h1:JVX6jT/XfzNqIjye4717ITLaNwV9mWbJx0dLCpcRzdA= github.com/jackc/pgmock v0.0.0-20190831213851-13a1b77aafa2/go.mod h1:fGZlG77KXmcq05nJLRkk0+p82V8B8Dw8KN2/V9c/OAE= github.com/jackc/pgmock v0.0.0-20201204152224-4fe30f7445fd/go.mod h1:hrBW0Enj2AZTNpt/7Y5rr2xe/9Mn757Wtb2xeBzPv2c= +github.com/jackc/pgmock v0.0.0-20210724152146-4ad1a8207f65 h1:DadwsjnMwFjfWc9y5Wi/+Zz7xoE5ALHsRQlOctkOiHc= github.com/jackc/pgmock v0.0.0-20210724152146-4ad1a8207f65/go.mod h1:5R2h2EEX+qri8jOWMbJCtaPWkrrNc7OHwsp2TCqp7ak= github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM= github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg= @@ -193,8 +187,6 @@ github.com/jackc/pgproto3/v2 v2.0.0-rc3/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvW github.com/jackc/pgproto3/v2 v2.0.0-rc3.0.20190831210041-4c03ce451f29/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvWKnT95C46ckYeM= github.com/jackc/pgproto3/v2 v2.0.1/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= github.com/jackc/pgproto3/v2 v2.0.6/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= -github.com/jackc/pgproto3/v2 v2.1.0 h1:h2yg3kjIyAGSZKDijYn1/gXHlYLCwl9ZjEh2PU0yVxE= -github.com/jackc/pgproto3/v2 v2.1.0/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= github.com/jackc/pgproto3/v2 v2.1.1 h1:7PQ/4gLoqnl87ZxL7xjO0DR5gYuviDCZxQJsUlFW1eI= github.com/jackc/pgproto3/v2 v2.1.1/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= github.com/jackc/pgservicefile v0.0.0-20200307190119-3430c5407db8/go.mod h1:vsD4gTJCa9TptPL8sPkXrLZ+hDuNrZCnj29CQpr4X1E= @@ -242,8 +234,6 @@ github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCV github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.11 h1:uVUAXhF2To8cbw/3xN3pxj6kk7TYKs98NIrTqPlMWAQ= -github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= @@ -270,6 +260,7 @@ github.com/lib/pq v1.1.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.3.0 h1:/qkRGz8zljWiDcFvgpwUpwIAPu3r07TDvs3Rws+o/pU= github.com/lib/pq v1.3.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/lib/pq v1.10.2 h1:AqzbZs4ZoCBp+GtejcpCpcxM3zlSMx29dXbUSeVtJb8= github.com/lib/pq v1.10.2/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= @@ -287,8 +278,6 @@ github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2y github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-sqlite3 v1.14.5/go.mod h1:WVKg1VTActs4Qso6iwGbiFih2UIHo0ENGwNd0Lj+XmI= -github.com/mattn/go-sqlite3 v1.14.7 h1:fxWBnXkxfM6sRiuH3bqJ4CfzZojMOLVc0UTsTglEghA= -github.com/mattn/go-sqlite3 v1.14.7/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= github.com/mattn/go-sqlite3 v1.14.8 h1:gDp86IdQsN/xWjIEmr9MF6o9mpksUgh0fu+9ByFxzIU= github.com/mattn/go-sqlite3 v1.14.8/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= @@ -379,6 +368,7 @@ github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNX github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4= github.com/shopspring/decimal v0.0.0-20200227202807-02e2044944cc h1:jUIKcSPO9MoMJBbEoyE/RJoE8vz7Mb8AjvifMMwSyvY= github.com/shopspring/decimal v0.0.0-20200227202807-02e2044944cc/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= +github.com/shopspring/decimal v1.2.0 h1:abSATXmQEYyShuxI4/vyW3tV1MrKAJzCZ/0zLUXYbsQ= github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= @@ -406,8 +396,6 @@ github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81P github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/syndtr/goleveldb v1.0.0 h1:fBdIW9lB4Iz0n9khmH8w27SJ3QEJ7+IgjPEwGSZiFdE= -github.com/syndtr/goleveldb v1.0.0/go.mod h1:ZVVdQEZoIme9iO1Ch2Jdy24qqXrMMOU6lpPAyBWyWuQ= github.com/tidwall/gjson v1.8.1/go.mod h1:5/xDoumyyDNerp2U36lyolv46b3uF/9Bu6OfyQ9GImk= github.com/tidwall/match v1.0.3/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= github.com/tidwall/pretty v1.1.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= @@ -453,8 +441,6 @@ golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201203163018-be400aefbc4c/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a h1:kr2P4QFmQr29mSLA43kwrOcgcReGTfbE9N577tCTuBc= -golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8= golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= @@ -517,8 +503,8 @@ golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1 h1:SrN+KX8Art/Sf4HNj6Zcz06G7VEz+7w9tdXTPOZ7+l4= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210923061019-b8560ed6a9b7 h1:c20P3CcPbopVp2f7099WLOqSNKURf30Z0uq66HpijZY= -golang.org/x/sys v0.0.0-20210923061019-b8560ed6a9b7/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac h1:oN6lz7iLW/YC7un8pq+9bOLyXrprv2+DKfkJY+2LJJw= +golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -593,38 +579,31 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gorm.io/datatypes v1.0.1 h1:6npnXbBtjpSb7FFVA2dG/llyTN8tvZfbUqs+WyLrYgQ= -gorm.io/datatypes v1.0.1/go.mod h1:HEHoUU3/PO5ZXfAJcVWl11+zWlE16+O0X2DgJEb4Ixs= gorm.io/datatypes v1.0.2 h1:ChZ5VfWGB23qEr1kZosidvG9CF9HIczwoxLhBS7Ebs4= gorm.io/datatypes v1.0.2/go.mod h1:1O1JVE4grFGcQTOGQbIBitiXUP6Sv84/KZU7eWeUv1k= gorm.io/driver/mysql v1.0.5/go.mod h1:N1OIhHAIhx5SunkMGqWbGFVeh4yTNWKmMo1GOAsohLI= -gorm.io/driver/mysql v1.1.0 h1:3PgFPJlFq5Xt/0WRiRjxIVaXjeHY+2TQ5feXgpSpEC4= -gorm.io/driver/mysql v1.1.0/go.mod h1:KdrTanmfLPPyAOeYGyG+UpDys7/7eeWT1zCq+oekYnU= gorm.io/driver/mysql v1.1.2 h1:OofcyE2lga734MxwcCW9uB4mWNXMr50uaGRVwQL2B0M= gorm.io/driver/mysql v1.1.2/go.mod h1:4P/X9vSc3WTrhTLZ259cpFd6xKNYiSSdSZngkSBGIMM= gorm.io/driver/postgres v1.0.8/go.mod h1:4eOzrI1MUfm6ObJU/UcmbXyiHSs8jSwH95G5P5dxcAg= gorm.io/driver/postgres v1.1.0 h1:afBljg7PtJ5lA6YUWluV2+xovIPhS+YiInuL3kUjrbk= gorm.io/driver/postgres v1.1.0/go.mod h1:hXQIwafeRjJvUm+OMxcFWyswJ/vevcpPLlGocwAwuqw= -gorm.io/driver/postgres v1.1.1 h1:tWLmqYCyaoh89fi7DhM6QggujrOnmfo3H98AzgNAAu0= -gorm.io/driver/postgres v1.1.1/go.mod h1:tpe2xN7aCst1NUdYyWQyxPtnHC+Zfp6NEux9PXD1OU0= +gorm.io/driver/postgres v1.1.2 h1:Amy3hCvLqM+/ICzjCnQr8wKFLVJTeOTdlMT7kCP+J1Q= +gorm.io/driver/postgres v1.1.2/go.mod h1:/AGV0zvqF3mt9ZtzLzQmXWQ/5vr+1V1TyHZGZVjzmwI= gorm.io/driver/sqlite v1.1.4 h1:PDzwYE+sI6De2+mxAneV9Xs11+ZyKV6oxD3wDGkaNvM= gorm.io/driver/sqlite v1.1.4/go.mod h1:mJCeTFr7+crvS+TRnWc5Z3UvwxUN1BGBLMrf5LA9DYw= -gorm.io/driver/sqlserver v1.0.7 h1:uwUtb0kdFwW5PkRbd2KJ2h4wlsqvLSjox1XVg/RnzRE= -gorm.io/driver/sqlserver v1.0.7/go.mod h1:ng66aHI47ZIKz/vvnxzDoonzmTS8HXP+JYlgg67wOog= +gorm.io/driver/sqlserver v1.0.9 h1:P7Dm/BKqsrOjyhRSnLXvG2g1W/eJUgxdrdBwgJw3tEg= gorm.io/driver/sqlserver v1.0.9/go.mod h1:iBdxY2CepkTt9Q1r84RbZA1qCai300Qlp8kQf9qE9II= gorm.io/gorm v1.20.7/go.mod h1:0HFTzE/SqkGTzK6TlDPPQbAYCluiVvhzoA1+aVyzenw= gorm.io/gorm v1.20.12/go.mod h1:0HFTzE/SqkGTzK6TlDPPQbAYCluiVvhzoA1+aVyzenw= gorm.io/gorm v1.21.3/go.mod h1:0HFTzE/SqkGTzK6TlDPPQbAYCluiVvhzoA1+aVyzenw= -gorm.io/gorm v1.21.4/go.mod h1:0HFTzE/SqkGTzK6TlDPPQbAYCluiVvhzoA1+aVyzenw= -gorm.io/gorm v1.21.6/go.mod h1:F+OptMscr0P2F2qU97WT1WimdH9GaQPoDW7AYd5i2Y0= gorm.io/gorm v1.21.8/go.mod h1:F+OptMscr0P2F2qU97WT1WimdH9GaQPoDW7AYd5i2Y0= gorm.io/gorm v1.21.9/go.mod h1:F+OptMscr0P2F2qU97WT1WimdH9GaQPoDW7AYd5i2Y0= -gorm.io/gorm v1.21.11 h1:CxkXW6Cc+VIBlL8yJEHq+Co4RYXdSLiMKNvgoZPjLK4= -gorm.io/gorm v1.21.11/go.mod h1:F+OptMscr0P2F2qU97WT1WimdH9GaQPoDW7AYd5i2Y0= gorm.io/gorm v1.21.12/go.mod h1:F+OptMscr0P2F2qU97WT1WimdH9GaQPoDW7AYd5i2Y0= gorm.io/gorm v1.21.14/go.mod h1:F+OptMscr0P2F2qU97WT1WimdH9GaQPoDW7AYd5i2Y0= gorm.io/gorm v1.21.15 h1:gAyaDoPw0lCyrSFWhBlahbUA1U4P5RViC1uIqoB+1Rk= gorm.io/gorm v1.21.15/go.mod h1:F+OptMscr0P2F2qU97WT1WimdH9GaQPoDW7AYd5i2Y0= +gorm.io/gorm v1.21.16 h1:YBIQLtP5PLfZQz59qfrq7xbrK7KWQ+JsXXCH/THlMqs= +gorm.io/gorm v1.21.16/go.mod h1:F+OptMscr0P2F2qU97WT1WimdH9GaQPoDW7AYd5i2Y0= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=