mirror of
https://github.com/eosswedenorg/thalos
synced 2026-06-16 04:24:56 +02:00
Merge branch '10-actiontrace-message-encoding'
This commit is contained in:
commit
2f215d121d
12 changed files with 155 additions and 1355 deletions
|
|
@ -4,12 +4,11 @@ go 1.18
|
|||
|
||||
require (
|
||||
github.com/alicebob/miniredis/v2 v2.30.2
|
||||
github.com/eosswedenorg-go/jsontime v0.0.0-20230509125027-08422d6236c7
|
||||
github.com/go-redis/redis/v8 v8.11.5
|
||||
github.com/go-redis/redismock/v8 v8.11.5
|
||||
github.com/liamylian/jsontime/v2 v2.0.0
|
||||
github.com/shamaton/msgpack/v2 v2.1.0
|
||||
github.com/shamaton/msgpackgen v0.3.0
|
||||
github.com/stretchr/testify v1.8.2
|
||||
github.com/ugorji/go/codec v1.2.11
|
||||
)
|
||||
|
||||
require (
|
||||
|
|
@ -17,9 +16,9 @@ require (
|
|||
github.com/cespare/xxhash/v2 v2.1.2 // indirect
|
||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
|
||||
github.com/json-iterator/go v1.1.9 // indirect
|
||||
github.com/json-iterator/go v1.1.12 // indirect
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
||||
github.com/modern-go/reflect2 v1.0.1 // indirect
|
||||
github.com/modern-go/reflect2 v1.0.2 // indirect
|
||||
github.com/pmezard/go-difflib v1.0.0 // indirect
|
||||
github.com/yuin/gopher-lua v1.1.0 // indirect
|
||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||
|
|
|
|||
20
api/go.sum
20
api/go.sum
|
|
@ -7,12 +7,13 @@ github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XL
|
|||
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
|
||||
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
|
||||
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
|
||||
github.com/dave/jennifer v1.4.1/go.mod h1:7jEdnm+qBcxl8PC0zyp7vxcpSRnzXSt9r39tpTVGlwA=
|
||||
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/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78=
|
||||
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc=
|
||||
github.com/eosswedenorg-go/jsontime v0.0.0-20230509125027-08422d6236c7 h1:rLPu++RHaxg4WmUOXeWYioZuafWs0PVcYuvzOWbOJjk=
|
||||
github.com/eosswedenorg-go/jsontime v0.0.0-20230509125027-08422d6236c7/go.mod h1:eNUkVOymzgl0lViUhmm08PkutzqLnOQ6Dr+RUnf+Mq0=
|
||||
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
|
||||
github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4=
|
||||
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
|
||||
|
|
@ -38,16 +39,13 @@ github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/
|
|||
github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
|
||||
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
|
||||
github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
|
||||
github.com/json-iterator/go v1.1.9 h1:9yzud/Ht36ygwatGx56VwCZtlI/2AD15T1X2sjSuGns=
|
||||
github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
|
||||
github.com/liamylian/jsontime/v2 v2.0.0 h1:3if2kDW/boymUdO+4Qj/m4uaXMBSF6np9KEgg90cwH0=
|
||||
github.com/liamylian/jsontime/v2 v2.0.0/go.mod h1:UHp1oAPqCBfspokvGmaGe0IAl2IgOpgOgDaKPcvcGGY=
|
||||
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/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
|
||||
github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI=
|
||||
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
|
||||
github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
|
||||
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
|
||||
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
|
||||
github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE=
|
||||
github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU=
|
||||
|
|
@ -64,10 +62,6 @@ github.com/onsi/gomega v1.18.1 h1:M1GfJqGRrBrrGGsbxzV5dqM2U2ApXefZCQpkukxYRLE=
|
|||
github.com/onsi/gomega v1.18.1/go.mod h1:0q+aL8jAiMXy9hbwj2mr5GziHiwhAIQpFmmtT5hitRs=
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/shamaton/msgpack/v2 v2.1.0 h1:9jJ2eGZw2Wa9KExPX3KaDDckVjgr4zhXGFCfWagUWqg=
|
||||
github.com/shamaton/msgpack/v2 v2.1.0/go.mod h1:aTUEmh31ziGX1Ml7wMPLVY0f4vT3CRsCvZRoSCs+VGg=
|
||||
github.com/shamaton/msgpackgen v0.3.0 h1:q6o7prOEJFdF9BAPgkOtfzJbs55pQi7g44RUnEVUxtM=
|
||||
github.com/shamaton/msgpackgen v0.3.0/go.mod h1:fd99fDDuxuTiWzkHC59uEGzrt/WDu+ltGZTbEWwVXIc=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
|
||||
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
|
||||
|
|
@ -77,6 +71,8 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/
|
|||
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
|
||||
github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8=
|
||||
github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
|
||||
github.com/ugorji/go/codec v1.2.11 h1:BMaWp1Bb6fHwEtbplGBGJ498wD+LKlNSl25MjdZY4dU=
|
||||
github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg=
|
||||
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/gopher-lua v1.1.0 h1:BojcDhfyDWgU2f2TOzYK/g5p2gxMrku8oupLDqlnSqE=
|
||||
github.com/yuin/gopher-lua v1.1.0/go.mod h1:GBR0iDaNXjAgGg9zfCvksxSRnQx76gclCIb7kdAd1Pw=
|
||||
|
|
|
|||
|
|
@ -3,17 +3,21 @@ package json
|
|||
import (
|
||||
"time"
|
||||
|
||||
jsontime "github.com/eosswedenorg-go/jsontime/v2"
|
||||
"github.com/eosswedenorg/thalos/api/message"
|
||||
jsontime "github.com/liamylian/jsontime/v2/v2"
|
||||
)
|
||||
|
||||
var json_codec = jsontime.ConfigWithCustomTimeFormat
|
||||
var (
|
||||
json_codec = jsontime.ConfigWithCustomTimeFormat
|
||||
encoder = json_codec.Marshal
|
||||
decoder = json_codec.Unmarshal
|
||||
)
|
||||
|
||||
func init() {
|
||||
jsontime.SetDefaultTimeFormat("2006-01-02T15:04:05.000", time.UTC)
|
||||
|
||||
message.RegisterCodec("json", message.Codec{
|
||||
Encoder: json_codec.Marshal,
|
||||
Decoder: json_codec.Unmarshal,
|
||||
Encoder: encoder,
|
||||
Decoder: decoder,
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
package json
|
||||
|
||||
import (
|
||||
"encoding/hex"
|
||||
"encoding/json"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
|
|
@ -11,14 +9,6 @@ import (
|
|||
)
|
||||
|
||||
func TestJson_EncodeActionTrace(t *testing.T) {
|
||||
dataJson, err := json.Marshal(map[string]string{
|
||||
"from": "account1",
|
||||
"to": "account2",
|
||||
"quantity": "1000.0000 WAX",
|
||||
})
|
||||
|
||||
assert.NoError(t, err)
|
||||
|
||||
msg := message.ActionTrace{
|
||||
TxID: "ed3b8e853647971cf8296f004c3a1aeac255f082b2cb3c12cc3222e2d7c174ab",
|
||||
BlockNum: 267372365,
|
||||
|
|
@ -26,8 +16,11 @@ func TestJson_EncodeActionTrace(t *testing.T) {
|
|||
Name: "transfer",
|
||||
Contract: "eosio",
|
||||
Receiver: "account2",
|
||||
Data: dataJson,
|
||||
HexData: hex.EncodeToString(dataJson),
|
||||
Data: map[string]interface{}{
|
||||
"from": "account1",
|
||||
"to": "account2",
|
||||
"quantity": "1000.0000 WAX",
|
||||
},
|
||||
Authorization: []message.PermissionLevel{
|
||||
{Actor: "account1", Permission: "active"},
|
||||
},
|
||||
|
|
@ -36,22 +29,14 @@ func TestJson_EncodeActionTrace(t *testing.T) {
|
|||
Return: []byte{0xde, 0xad, 0xbe, 0xef},
|
||||
}
|
||||
|
||||
expected := `{"tx_id":"ed3b8e853647971cf8296f004c3a1aeac255f082b2cb3c12cc3222e2d7c174ab","blocknum":267372365,"blocktimestamp":"2003-03-21T17:23:09.500","name":"transfer","contract":"eosio","receiver":"account2","data":"eyJmcm9tIjoiYWNjb3VudDEiLCJxdWFudGl0eSI6IjEwMDAuMDAwMCBXQVgiLCJ0byI6ImFjY291bnQyIn0=","hex_data":"7b2266726f6d223a226163636f756e7431222c227175616e74697479223a22313030302e3030303020574158222c22746f223a226163636f756e7432227d","authorization":[{"actor":"account1","permission":"active"}],"except":"errstr","error":2,"return":"3q2+7w=="}`
|
||||
expected := `{"tx_id":"ed3b8e853647971cf8296f004c3a1aeac255f082b2cb3c12cc3222e2d7c174ab","blocknum":267372365,"blocktimestamp":"2003-03-21T17:23:09.500","name":"transfer","contract":"eosio","receiver":"account2","data":{"from":"account1","quantity":"1000.0000 WAX","to":"account2"},"authorization":[{"actor":"account1","permission":"active"}],"except":"errstr","error":2,"return":"3q2+7w=="}`
|
||||
|
||||
data, err := json_codec.Marshal(msg)
|
||||
data, err := encoder(msg)
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, expected, string(data))
|
||||
}
|
||||
|
||||
func TestJson_DecodeActionTrace(t *testing.T) {
|
||||
dataJson, err := json.Marshal(map[string]string{
|
||||
"from": "account1",
|
||||
"to": "account2",
|
||||
"quantity": "1000.0000 WAX",
|
||||
})
|
||||
|
||||
assert.NoError(t, err)
|
||||
|
||||
expected := message.ActionTrace{
|
||||
TxID: "952989f7464237b6cf9926e533ecd331df6794ed07564bd052bc368cbd65b4bc",
|
||||
BlockNum: 8723971,
|
||||
|
|
@ -59,8 +44,11 @@ func TestJson_DecodeActionTrace(t *testing.T) {
|
|||
Name: "transfer",
|
||||
Contract: "eosio",
|
||||
Receiver: "account2",
|
||||
Data: dataJson,
|
||||
HexData: hex.EncodeToString(dataJson),
|
||||
Data: map[string]interface{}{
|
||||
"from": "account1",
|
||||
"to": "account2",
|
||||
"quantity": "1000.0000 WAX",
|
||||
},
|
||||
Authorization: []message.PermissionLevel{
|
||||
{Actor: "account1", Permission: "active"},
|
||||
},
|
||||
|
|
@ -69,10 +57,10 @@ func TestJson_DecodeActionTrace(t *testing.T) {
|
|||
Return: []byte{0xde, 0xad, 0xbe, 0xef},
|
||||
}
|
||||
|
||||
input := `{"tx_id":"952989f7464237b6cf9926e533ecd331df6794ed07564bd052bc368cbd65b4bc","blocknum":8723971,"blocktimestamp":"2024-06-21T08:08:26.500","name":"transfer","contract":"eosio","receiver":"account2","data":"eyJmcm9tIjoiYWNjb3VudDEiLCJxdWFudGl0eSI6IjEwMDAuMDAwMCBXQVgiLCJ0byI6ImFjY291bnQyIn0=","hex_data":"7b2266726f6d223a226163636f756e7431222c227175616e74697479223a22313030302e3030303020574158222c22746f223a226163636f756e7432227d","authorization":[{"actor":"account1","permission":"active"}],"except":"errstr","error":2,"return":"3q2+7w=="}`
|
||||
input := `{"tx_id":"952989f7464237b6cf9926e533ecd331df6794ed07564bd052bc368cbd65b4bc","blocknum":8723971,"blocktimestamp":"2024-06-21T08:08:26.500","name":"transfer","contract":"eosio","receiver":"account2","data":{"from":"account1","quantity":"1000.0000 WAX","to":"account2"},"authorization":[{"actor":"account1","permission":"active"}],"except":"errstr","error":2,"return":"3q2+7w=="}`
|
||||
|
||||
msg := message.ActionTrace{}
|
||||
err = json_codec.Unmarshal([]byte(input), &msg)
|
||||
err := decoder([]byte(input), &msg)
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, expected, msg)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,18 +1,34 @@
|
|||
package msgpack
|
||||
|
||||
import (
|
||||
"github.com/shamaton/msgpack/v2"
|
||||
"reflect"
|
||||
|
||||
"github.com/ugorji/go/codec"
|
||||
|
||||
"github.com/eosswedenorg/thalos/api/message"
|
||||
)
|
||||
|
||||
//go:generate msgpackgen -v -input-file ../types.go -output-file msgpack.go
|
||||
var mh codec.MsgpackHandle
|
||||
|
||||
func encode(a any) ([]byte, error) {
|
||||
var b []byte
|
||||
return b, codec.NewEncoderBytes(&b, &mh).Encode(a)
|
||||
}
|
||||
|
||||
func decode(b []byte, a any) error {
|
||||
return codec.NewDecoderBytes(b, &mh).Decode(a)
|
||||
}
|
||||
|
||||
func init() {
|
||||
RegisterGeneratedResolver()
|
||||
mh.MapType = reflect.TypeOf(map[string]any(nil))
|
||||
mh.Canonical = true
|
||||
|
||||
// Wierd name but this is needed for the newest version of msgpack
|
||||
// that has support for time and string datatypes etc.
|
||||
mh.WriteExt = true
|
||||
|
||||
message.RegisterCodec("msgpack", message.Codec{
|
||||
Encoder: msgpack.Marshal,
|
||||
Decoder: msgpack.Unmarshal,
|
||||
Encoder: encode,
|
||||
Decoder: decode,
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,35 +1,14 @@
|
|||
package msgpack
|
||||
|
||||
import (
|
||||
"encoding/hex"
|
||||
"encoding/json"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/eosswedenorg/thalos/api/message"
|
||||
"github.com/shamaton/msgpack/v2"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestMsgpack_EncodeActionTrace(t *testing.T) {
|
||||
RegisterGeneratedResolver()
|
||||
|
||||
dataJson, err := json.Marshal(map[string]interface{}{
|
||||
"item": map[string]interface{}{
|
||||
"id": "2131242",
|
||||
"name": "Great Sword",
|
||||
"str": "100",
|
||||
"agi": "20",
|
||||
"dur": "100",
|
||||
"qual": "epic",
|
||||
},
|
||||
"from": "account1",
|
||||
"to": "account2",
|
||||
"amount": "1000.0000 SCAM",
|
||||
})
|
||||
|
||||
assert.NoError(t, err)
|
||||
|
||||
msg := message.ActionTrace{
|
||||
TxID: "edc06dce6320459fd644756972048da453b2816b0a434c37ddffde36778dcab3",
|
||||
BlockNum: 12345,
|
||||
|
|
@ -37,8 +16,19 @@ func TestMsgpack_EncodeActionTrace(t *testing.T) {
|
|||
Name: "sellitem",
|
||||
Contract: "mygame",
|
||||
Receiver: "eosio",
|
||||
Data: dataJson,
|
||||
HexData: "d0fa1b2ab8a6fd0d1b0173df91aa9ffd277642d05780cf750",
|
||||
Data: map[string]any{
|
||||
"item": map[string]any{
|
||||
"id": 2131242,
|
||||
"name": "Great Sword",
|
||||
"str": "100",
|
||||
"agi": "20",
|
||||
"dur": "100",
|
||||
"qual": "epic",
|
||||
},
|
||||
"from": "account1",
|
||||
"to": "account2",
|
||||
"amount": "1000.0000 SCAM",
|
||||
},
|
||||
Authorization: []message.PermissionLevel{
|
||||
{Actor: "mygame", Permission: "active"},
|
||||
},
|
||||
|
|
@ -47,102 +37,82 @@ func TestMsgpack_EncodeActionTrace(t *testing.T) {
|
|||
Return: []byte{0xde, 0xad, 0xbe, 0xef},
|
||||
}
|
||||
|
||||
data, err := msgpack.Marshal(msg)
|
||||
data, err := encode(msg)
|
||||
assert.NoError(t, err)
|
||||
|
||||
expected := []byte{
|
||||
0x8c, 0xa5, 0x74, 0x78, 0x5f, 0x69, 0x64, 0xd9,
|
||||
0x40, 0x65, 0x64, 0x63, 0x30, 0x36, 0x64, 0x63,
|
||||
0x65, 0x36, 0x33, 0x32, 0x30, 0x34, 0x35, 0x39,
|
||||
0x66, 0x64, 0x36, 0x34, 0x34, 0x37, 0x35, 0x36,
|
||||
0x39, 0x37, 0x32, 0x30, 0x34, 0x38, 0x64, 0x61,
|
||||
0x34, 0x35, 0x33, 0x62, 0x32, 0x38, 0x31, 0x36,
|
||||
0x62, 0x30, 0x61, 0x34, 0x33, 0x34, 0x63, 0x33,
|
||||
0x37, 0x64, 0x64, 0x66, 0x66, 0x64, 0x65, 0x33,
|
||||
0x36, 0x37, 0x37, 0x38, 0x64, 0x63, 0x61, 0x62,
|
||||
0x33, 0xa8, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x6e,
|
||||
0x75, 0x6d, 0xcd, 0x30, 0x39, 0xae, 0x62, 0x6c,
|
||||
0x6f, 0x63, 0x6b, 0x74, 0x69, 0x6d, 0x65, 0x73,
|
||||
0x74, 0x61, 0x6d, 0x70, 0xd7, 0xff, 0x77, 0x35,
|
||||
0x94, 0x00, 0x65, 0x4e, 0x19, 0xff, 0xa4, 0x6e,
|
||||
0x61, 0x6d, 0x65, 0xa8, 0x73, 0x65, 0x6c, 0x6c,
|
||||
0x69, 0x74, 0x65, 0x6d, 0xa8, 0x63, 0x6f, 0x6e,
|
||||
0x74, 0x72, 0x61, 0x63, 0x74, 0xa6, 0x6d, 0x79,
|
||||
0x67, 0x61, 0x6d, 0x65, 0xa8, 0x72, 0x65, 0x63,
|
||||
0x65, 0x69, 0x76, 0x65, 0x72, 0xa5, 0x65, 0x6f,
|
||||
0x73, 0x69, 0x6f, 0xa4, 0x64, 0x61, 0x74, 0x61,
|
||||
0xc4, 0x9b, 0x7b, 0x22, 0x61, 0x6d, 0x6f, 0x75,
|
||||
0x6e, 0x74, 0x22, 0x3a, 0x22, 0x31, 0x30, 0x30,
|
||||
0x30, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x20, 0x53,
|
||||
0x43, 0x41, 0x4d, 0x22, 0x2c, 0x22, 0x66, 0x72,
|
||||
0x6f, 0x6d, 0x22, 0x3a, 0x22, 0x61, 0x63, 0x63,
|
||||
0x6f, 0x75, 0x6e, 0x74, 0x31, 0x22, 0x2c, 0x22,
|
||||
0x69, 0x74, 0x65, 0x6d, 0x22, 0x3a, 0x7b, 0x22,
|
||||
0x61, 0x67, 0x69, 0x22, 0x3a, 0x22, 0x32, 0x30,
|
||||
0x22, 0x2c, 0x22, 0x64, 0x75, 0x72, 0x22, 0x3a,
|
||||
0x22, 0x31, 0x30, 0x30, 0x22, 0x2c, 0x22, 0x69,
|
||||
0x64, 0x22, 0x3a, 0x22, 0x32, 0x31, 0x33, 0x31,
|
||||
0x32, 0x34, 0x32, 0x22, 0x2c, 0x22, 0x6e, 0x61,
|
||||
0x6d, 0x65, 0x22, 0x3a, 0x22, 0x47, 0x72, 0x65,
|
||||
0x61, 0x74, 0x20, 0x53, 0x77, 0x6f, 0x72, 0x64,
|
||||
0x22, 0x2c, 0x22, 0x71, 0x75, 0x61, 0x6c, 0x22,
|
||||
0x3a, 0x22, 0x65, 0x70, 0x69, 0x63, 0x22, 0x2c,
|
||||
0x22, 0x73, 0x74, 0x72, 0x22, 0x3a, 0x22, 0x31,
|
||||
0x30, 0x30, 0x22, 0x7d, 0x2c, 0x22, 0x74, 0x6f,
|
||||
0x22, 0x3a, 0x22, 0x61, 0x63, 0x63, 0x6f, 0x75,
|
||||
0x6e, 0x74, 0x32, 0x22, 0x7d, 0xa8, 0x68, 0x65,
|
||||
0x78, 0x5f, 0x64, 0x61, 0x74, 0x61, 0xd9, 0x31,
|
||||
0x64, 0x30, 0x66, 0x61, 0x31, 0x62, 0x32, 0x61,
|
||||
0x62, 0x38, 0x61, 0x36, 0x66, 0x64, 0x30, 0x64,
|
||||
0x31, 0x62, 0x30, 0x31, 0x37, 0x33, 0x64, 0x66,
|
||||
0x39, 0x31, 0x61, 0x61, 0x39, 0x66, 0x66, 0x64,
|
||||
0x32, 0x37, 0x37, 0x36, 0x34, 0x32, 0x64, 0x30,
|
||||
0x35, 0x37, 0x38, 0x30, 0x63, 0x66, 0x37, 0x35,
|
||||
0x30, 0xad, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72,
|
||||
0x8b, 0xad, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72,
|
||||
0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x91,
|
||||
0x82, 0xa5, 0x61, 0x63, 0x74, 0x6f, 0x72, 0xa6,
|
||||
0x6d, 0x79, 0x67, 0x61, 0x6d, 0x65, 0xaa, 0x70,
|
||||
0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f,
|
||||
0x6e, 0xa6, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65,
|
||||
0xa6, 0x65, 0x78, 0x63, 0x65, 0x70, 0x74, 0xa6,
|
||||
0x65, 0x72, 0x72, 0x73, 0x74, 0x72, 0xa5, 0x65,
|
||||
0x72, 0x72, 0x6f, 0x72, 0x02, 0xa6, 0x72, 0x65,
|
||||
0xa8, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x6e, 0x75,
|
||||
0x6d, 0xcd, 0x30, 0x39, 0xae, 0x62, 0x6c, 0x6f,
|
||||
0x63, 0x6b, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74,
|
||||
0x61, 0x6d, 0x70, 0xd7, 0xff, 0x77, 0x35, 0x94,
|
||||
0x00, 0x65, 0x4e, 0x19, 0xff, 0xa8, 0x63, 0x6f,
|
||||
0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0xa6, 0x6d,
|
||||
0x79, 0x67, 0x61, 0x6d, 0x65, 0xa4, 0x64, 0x61,
|
||||
0x74, 0x61, 0x84, 0xa6, 0x61, 0x6d, 0x6f, 0x75,
|
||||
0x6e, 0x74, 0xae, 0x31, 0x30, 0x30, 0x30, 0x2e,
|
||||
0x30, 0x30, 0x30, 0x30, 0x20, 0x53, 0x43, 0x41,
|
||||
0x4d, 0xa4, 0x66, 0x72, 0x6f, 0x6d, 0xa8, 0x61,
|
||||
0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x31, 0xa4,
|
||||
0x69, 0x74, 0x65, 0x6d, 0x86, 0xa3, 0x61, 0x67,
|
||||
0x69, 0xa2, 0x32, 0x30, 0xa3, 0x64, 0x75, 0x72,
|
||||
0xa3, 0x31, 0x30, 0x30, 0xa2, 0x69, 0x64, 0xd2,
|
||||
0x00, 0x20, 0x85, 0x2a, 0xa4, 0x6e, 0x61, 0x6d,
|
||||
0x65, 0xab, 0x47, 0x72, 0x65, 0x61, 0x74, 0x20,
|
||||
0x53, 0x77, 0x6f, 0x72, 0x64, 0xa4, 0x71, 0x75,
|
||||
0x61, 0x6c, 0xa4, 0x65, 0x70, 0x69, 0x63, 0xa3,
|
||||
0x73, 0x74, 0x72, 0xa3, 0x31, 0x30, 0x30, 0xa2,
|
||||
0x74, 0x6f, 0xa8, 0x61, 0x63, 0x63, 0x6f, 0x75,
|
||||
0x6e, 0x74, 0x32, 0xa5, 0x65, 0x72, 0x72, 0x6f,
|
||||
0x72, 0x02, 0xa6, 0x65, 0x78, 0x63, 0x65, 0x70,
|
||||
0x74, 0xa6, 0x65, 0x72, 0x72, 0x73, 0x74, 0x72,
|
||||
0xa4, 0x6e, 0x61, 0x6d, 0x65, 0xa8, 0x73, 0x65,
|
||||
0x6c, 0x6c, 0x69, 0x74, 0x65, 0x6d, 0xa8, 0x72,
|
||||
0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0xa5,
|
||||
0x65, 0x6f, 0x73, 0x69, 0x6f, 0xa6, 0x72, 0x65,
|
||||
0x74, 0x75, 0x72, 0x6e, 0xc4, 0x04, 0xde, 0xad,
|
||||
0xbe, 0xef,
|
||||
0xbe, 0xef, 0xa5, 0x74, 0x78, 0x5f, 0x69, 0x64,
|
||||
0xd9, 0x40, 0x65, 0x64, 0x63, 0x30, 0x36, 0x64,
|
||||
0x63, 0x65, 0x36, 0x33, 0x32, 0x30, 0x34, 0x35,
|
||||
0x39, 0x66, 0x64, 0x36, 0x34, 0x34, 0x37, 0x35,
|
||||
0x36, 0x39, 0x37, 0x32, 0x30, 0x34, 0x38, 0x64,
|
||||
0x61, 0x34, 0x35, 0x33, 0x62, 0x32, 0x38, 0x31,
|
||||
0x36, 0x62, 0x30, 0x61, 0x34, 0x33, 0x34, 0x63,
|
||||
0x33, 0x37, 0x64, 0x64, 0x66, 0x66, 0x64, 0x65,
|
||||
0x33, 0x36, 0x37, 0x37, 0x38, 0x64, 0x63, 0x61,
|
||||
0x62, 0x33,
|
||||
}
|
||||
|
||||
assert.Equal(t, expected, data)
|
||||
}
|
||||
|
||||
func TestMsgpack_Decode(t *testing.T) {
|
||||
RegisterGeneratedResolver()
|
||||
|
||||
data := []byte("\x8c\xa5tx_id\xd9@edc06dce6320459fd644756972048da453b2816b0a434c37ddffde36778dcab3\xa8blocknum\xce\x00\x85F7\xaeblocktimestamp\xd6\xffH\xf1U\x1f\xa4name\xa4drop\xa8contract\xa6mygame\xa8receiver\xa8account1\xa4dataċ{\"dropped_from_id\":674562,\"item\":{\"dur\":145,\"id\":49623,\"name\":\"Shadowmourne\",\"qual\":\"legendary\",\"sta\":198,\"str\":223},\"receiver\":\"account1\"}\xa8hex_data\xda\x01\x167b2264726f707065645f66726f6d5f6964223a3637343536322c226974656d223a7b22647572223a3134352c226964223a34393632332c226e616d65223a22536861646f776d6f75726e65222c227175616c223a226c6567656e64617279222c22737461223a3139382c22737472223a3232337d2c227265636569766572223a226163636f756e7431227d\xadauthorization\x91\x82\xa5actor\xa6mygame\xaapermission\xa6active\xa6except\xa6errstr\xa5error\x02\xa6return\xc4\x04ޭ\xbe\xef")
|
||||
|
||||
dataJson, err := json.Marshal(map[string]interface{}{
|
||||
"item": map[string]interface{}{
|
||||
"id": 49623,
|
||||
"name": "Shadowmourne",
|
||||
"str": 223,
|
||||
"sta": 198,
|
||||
"dur": 145,
|
||||
"qual": "legendary",
|
||||
},
|
||||
"dropped_from_id": 674562,
|
||||
"receiver": "account1",
|
||||
})
|
||||
|
||||
assert.NoError(t, err)
|
||||
data := []byte("\x8b\xadauthorization\x91\x82\xa5actor\xa6mygame\xaapermission\xa6active\xa8blocknum\xce\x00\x85F7\xaeblocktimestamp\xd6\xffH\xf1U\x1f\xa8contract\xa6mygame\xa4data\x83\xafdropped_from_id\xd2\x00\nK\x02\xa4item\x86\xa3dur\xd1\x00\x91\xa2id\xd2\x00\x00\xc1פname\xacShadowmourne\xa4qual\xa9legendary\xa3sta\xd1\x00ƣstr\xd1\x00ߨreceiver\xa8account1\xa5error\x02\xa6except\xa6errstr\xa4name\xa4drop\xa8receiver\xa8account1\xa6return\xc4\x04ޭ\xbe\xef\xa5tx_id\xd9@edc06dce6320459fd644756972048da453b2816b0a434c37ddffde36778dcab3")
|
||||
|
||||
expected := message.ActionTrace{
|
||||
TxID: "edc06dce6320459fd644756972048da453b2816b0a434c37ddffde36778dcab3",
|
||||
BlockNum: 8734263,
|
||||
Timestamp: time.Unix(1223775519, 0),
|
||||
Timestamp: time.Unix(1223775519, 0).UTC(),
|
||||
Name: "drop",
|
||||
Contract: "mygame",
|
||||
Receiver: "account1",
|
||||
Data: dataJson,
|
||||
HexData: hex.EncodeToString(dataJson),
|
||||
Data: map[string]any{
|
||||
"item": map[string]any{
|
||||
"id": int64(49623),
|
||||
"name": "Shadowmourne",
|
||||
"str": int64(223),
|
||||
"sta": int64(198),
|
||||
"dur": int64(145),
|
||||
"qual": "legendary",
|
||||
},
|
||||
"dropped_from_id": int64(674562),
|
||||
"receiver": "account1",
|
||||
},
|
||||
Authorization: []message.PermissionLevel{
|
||||
{Actor: "mygame", Permission: "active"},
|
||||
},
|
||||
|
|
@ -152,22 +122,20 @@ func TestMsgpack_Decode(t *testing.T) {
|
|||
}
|
||||
|
||||
res := message.ActionTrace{}
|
||||
err = msgpack.Unmarshal(data, &res)
|
||||
err := decode(data, &res)
|
||||
assert.NoError(t, err)
|
||||
|
||||
assert.Equal(t, expected, res)
|
||||
}
|
||||
|
||||
func TestMsgpack_EncodeHeartbeat(t *testing.T) {
|
||||
RegisterGeneratedResolver()
|
||||
|
||||
msg := message.HeartBeat{
|
||||
BlockNum: 1234,
|
||||
HeadBlockNum: 1235,
|
||||
LastIrreversibleBlockNum: 1236,
|
||||
}
|
||||
|
||||
data, err := msgpack.Marshal(msg)
|
||||
data, err := encode(msg)
|
||||
assert.NoError(t, err)
|
||||
|
||||
assert.Equal(t, data, []byte{0x83, 0xa8, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x6e, 0x75, 0x6d, 0xcd, 0x4, 0xd2, 0xad, 0x68, 0x65, 0x61, 0x64, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x6e, 0x75, 0x6d, 0xcd, 0x4, 0xd3, 0xba, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x69, 0x72, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x6e, 0x75, 0x6d, 0xcd, 0x4, 0xd4})
|
||||
|
|
@ -183,7 +151,7 @@ func TestMsgpack_DecodeHeartbeat(t *testing.T) {
|
|||
}
|
||||
|
||||
msg := message.HeartBeat{}
|
||||
err := msgpack.Unmarshal(data, &msg)
|
||||
err := decode(data, &msg)
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, expected, msg)
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -1,7 +1,7 @@
|
|||
package message
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"time"
|
||||
)
|
||||
|
||||
|
|
@ -29,9 +29,8 @@ type ActionTrace struct {
|
|||
// Contract account.
|
||||
Contract string `json:"contract" msgpack:"contract"`
|
||||
|
||||
Receiver string `json:"receiver" msgpack:"receiver"`
|
||||
Data []byte `json:"data" msgpack:"data"`
|
||||
HexData string `json:"hex_data" msgpack:"hex_data"`
|
||||
Receiver string `json:"receiver" msgpack:"receiver"`
|
||||
Data interface{} `json:"data" msgpack:"data"`
|
||||
|
||||
Authorization []PermissionLevel `json:"authorization" msgpack:"authorization"`
|
||||
|
||||
|
|
@ -40,7 +39,9 @@ type ActionTrace struct {
|
|||
Return []byte `json:"return" msgpack:"return"`
|
||||
}
|
||||
|
||||
func (act ActionTrace) GetData() (map[string]interface{}, error) {
|
||||
data := map[string]interface{}{}
|
||||
return data, json.Unmarshal(act.Data, &data)
|
||||
func (act ActionTrace) GetData() (map[string]any, error) {
|
||||
if data, ok := act.Data.(map[string]any); ok {
|
||||
return data, nil
|
||||
}
|
||||
return nil, errors.New("failed to convert data to map")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,14 +8,17 @@ import (
|
|||
|
||||
func TestTypes_ActionTraceGetData(t *testing.T) {
|
||||
act := ActionTrace{
|
||||
Data: []byte(`{"one": 1234, "two": "string"}`),
|
||||
Data: map[string]any{
|
||||
"one": 1234,
|
||||
"two": "string",
|
||||
},
|
||||
}
|
||||
|
||||
actual, err := act.GetData()
|
||||
assert.NoError(t, err)
|
||||
|
||||
exptected := map[string]interface{}{
|
||||
"one": float64(1234),
|
||||
"one": 1234,
|
||||
"two": "string",
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package app
|
||||
|
||||
import (
|
||||
"encoding/hex"
|
||||
"encoding/json"
|
||||
|
||||
"github.com/eosswedenorg/thalos/api"
|
||||
"github.com/eosswedenorg/thalos/api/message"
|
||||
|
|
@ -9,6 +9,7 @@ import (
|
|||
|
||||
log "github.com/sirupsen/logrus"
|
||||
|
||||
"github.com/eoscanada/eos-go"
|
||||
"github.com/eoscanada/eos-go/ship"
|
||||
shipclient "github.com/eosswedenorg-go/antelope-ship-client"
|
||||
)
|
||||
|
|
@ -66,6 +67,14 @@ func (processor *ShipProcessor) encodeQueue(channel api.Channel, v interface{})
|
|||
return false
|
||||
}
|
||||
|
||||
func decode(abi *eos.ABI, act *ship.Action, v any) error {
|
||||
jsondata, err := abi.DecodeAction(act.Data, act.Name)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return json.Unmarshal(jsondata, v)
|
||||
}
|
||||
|
||||
func (processor *ShipProcessor) processBlock(block *ship.GetBlocksResultV0) {
|
||||
if block.ThisBlock.BlockNum%100 == 0 {
|
||||
log.Infof("Current: %d, Head: %d", block.ThisBlock.BlockNum, block.Head.BlockNum)
|
||||
|
|
@ -118,7 +127,6 @@ func (processor *ShipProcessor) processBlock(block *ship.GetBlocksResultV0) {
|
|||
Name: act_trace.Act.Name.String(),
|
||||
Contract: act_trace.Act.Account.String(),
|
||||
Receiver: act_trace.Receiver.String(),
|
||||
HexData: hex.EncodeToString(act_trace.Act.Data),
|
||||
}
|
||||
|
||||
for _, auth := range act_trace.Act.Authorization {
|
||||
|
|
@ -130,11 +138,9 @@ func (processor *ShipProcessor) processBlock(block *ship.GetBlocksResultV0) {
|
|||
|
||||
ABI, err := processor.abi.GetAbi(act_trace.Act.Account)
|
||||
if err == nil {
|
||||
data, err := ABI.DecodeAction(act_trace.Act.Data, act_trace.Act.Name)
|
||||
if err != nil {
|
||||
if err = decode(ABI, act_trace.Act, &act.Data); err != nil {
|
||||
log.WithError(err).Warn("Failed to decode action")
|
||||
}
|
||||
act.Data = data
|
||||
} else {
|
||||
log.WithError(err).Errorf("Failed to get abi for contract %s", act_trace.Act.Account)
|
||||
}
|
||||
|
|
|
|||
5
go.mod
5
go.mod
|
|
@ -23,12 +23,12 @@ require (
|
|||
github.com/cespare/xxhash/v2 v2.2.0 // indirect
|
||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
|
||||
github.com/eosswedenorg-go/jsontime v0.0.0-20230509125027-08422d6236c7 // indirect
|
||||
github.com/fsnotify/fsnotify v1.6.0 // indirect
|
||||
github.com/go-telegram-bot-api/telegram-bot-api v4.6.4+incompatible // indirect
|
||||
github.com/gorilla/websocket v1.5.0 // indirect
|
||||
github.com/json-iterator/go v1.1.12 // indirect
|
||||
github.com/klauspost/compress v1.16.5 // indirect
|
||||
github.com/liamylian/jsontime/v2 v2.0.0 // indirect
|
||||
github.com/logrusorgru/aurora v2.0.3+incompatible // indirect
|
||||
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
||||
|
|
@ -36,13 +36,12 @@ require (
|
|||
github.com/onsi/gomega v1.27.6 // indirect
|
||||
github.com/pkg/errors v0.9.1 // indirect
|
||||
github.com/pmezard/go-difflib v1.0.0 // indirect
|
||||
github.com/shamaton/msgpack/v2 v2.1.0 // indirect
|
||||
github.com/shamaton/msgpackgen v0.3.0 // indirect
|
||||
github.com/streamingfast/logging v0.0.0-20221209193439-bff11742bf4c // indirect
|
||||
github.com/technoweenie/multipartstreamer v1.0.1 // indirect
|
||||
github.com/tidwall/gjson v1.14.4 // indirect
|
||||
github.com/tidwall/match v1.1.1 // indirect
|
||||
github.com/tidwall/pretty v1.2.1 // indirect
|
||||
github.com/ugorji/go/codec v1.2.11 // indirect
|
||||
github.com/vmihailenco/go-tinylfu v0.2.2 // indirect
|
||||
github.com/vmihailenco/msgpack/v5 v5.3.5 // indirect
|
||||
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
|
||||
|
|
|
|||
14
go.sum
14
go.sum
|
|
@ -12,7 +12,6 @@ github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWR
|
|||
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
|
||||
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
|
||||
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
|
||||
github.com/dave/jennifer v1.4.1/go.mod h1:7jEdnm+qBcxl8PC0zyp7vxcpSRnzXSt9r39tpTVGlwA=
|
||||
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=
|
||||
|
|
@ -24,6 +23,8 @@ github.com/eoscanada/eos-go v0.10.3-0.20230413154640-bb75101dc2f6 h1:93LUOgAmRkm
|
|||
github.com/eoscanada/eos-go v0.10.3-0.20230413154640-bb75101dc2f6/go.mod h1:L3avCf8OkDrjlUeNy9DdoV67TCmDNj2dSlc5Xp3DNNk=
|
||||
github.com/eosswedenorg-go/antelope-ship-client v0.2.3 h1:08HOQj3YtlEYVsm0RoNZ27JsZWikrUISKAUli6H1Qac=
|
||||
github.com/eosswedenorg-go/antelope-ship-client v0.2.3/go.mod h1:kZ/4gkAIdAq4/WiZlVaSONpELcDCMJQJMmlikLUGCb8=
|
||||
github.com/eosswedenorg-go/jsontime v0.0.0-20230509125027-08422d6236c7 h1:rLPu++RHaxg4WmUOXeWYioZuafWs0PVcYuvzOWbOJjk=
|
||||
github.com/eosswedenorg-go/jsontime v0.0.0-20230509125027-08422d6236c7/go.mod h1:eNUkVOymzgl0lViUhmm08PkutzqLnOQ6Dr+RUnf+Mq0=
|
||||
github.com/eosswedenorg-go/pid v1.0.1 h1:W4AEnnNwb041SpNR1uTZ/KbJ0OTA5eqiqIR1Q5Ah6A0=
|
||||
github.com/eosswedenorg-go/pid v1.0.1/go.mod h1:wiOB/JXGt4YA3+T0j0xmCGSc3Jxzb7Ti/Ftli1fgWu4=
|
||||
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
|
||||
|
|
@ -64,7 +65,6 @@ github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpO
|
|||
github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
|
||||
github.com/jarcoal/httpmock v1.2.0 h1:gSvTxxFR/MEMfsGrvRbdfpRUMBStovlSRLw0Ep1bwwc=
|
||||
github.com/jordan-wright/email v4.0.1-0.20210109023952-943e75fe5223+incompatible h1:jdpOPRN1zP63Td1hDQbZW73xKmzDvZHzVdNYxhnTMDA=
|
||||
github.com/json-iterator/go v1.1.9/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/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk=
|
||||
|
|
@ -78,8 +78,6 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
|||
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
||||
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
|
||||
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
|
||||
github.com/liamylian/jsontime/v2 v2.0.0 h1:3if2kDW/boymUdO+4Qj/m4uaXMBSF6np9KEgg90cwH0=
|
||||
github.com/liamylian/jsontime/v2 v2.0.0/go.mod h1:UHp1oAPqCBfspokvGmaGe0IAl2IgOpgOgDaKPcvcGGY=
|
||||
github.com/logrusorgru/aurora v2.0.3+incompatible h1:tOpm7WcpBTn4fjmVfgpQq0EfczGlG91VSDkswnjF5A8=
|
||||
github.com/logrusorgru/aurora v2.0.3+incompatible/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4=
|
||||
github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJJ2JqpQmpLJOu07cU=
|
||||
|
|
@ -87,8 +85,6 @@ github.com/mitchellh/go-testing-interface v1.14.1/go.mod h1:gfgS7OtZj6MA4U1UrDRp
|
|||
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
|
||||
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
|
||||
github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
|
||||
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
|
||||
github.com/nikoksr/notify v0.38.1 h1:+WjA3nUMMhfxKuFFYmTIgDOykdI7GPP3ZWWg3SLuQyo=
|
||||
|
|
@ -118,10 +114,6 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb
|
|||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
|
||||
github.com/rogpeppe/go-internal v1.8.1 h1:geMPLpDpQOgVyCg5z5GoRwLHepNdb71NXb67XFkP+Eg=
|
||||
github.com/shamaton/msgpack/v2 v2.1.0 h1:9jJ2eGZw2Wa9KExPX3KaDDckVjgr4zhXGFCfWagUWqg=
|
||||
github.com/shamaton/msgpack/v2 v2.1.0/go.mod h1:aTUEmh31ziGX1Ml7wMPLVY0f4vT3CRsCvZRoSCs+VGg=
|
||||
github.com/shamaton/msgpackgen v0.3.0 h1:q6o7prOEJFdF9BAPgkOtfzJbs55pQi7g44RUnEVUxtM=
|
||||
github.com/shamaton/msgpackgen v0.3.0/go.mod h1:fd99fDDuxuTiWzkHC59uEGzrt/WDu+ltGZTbEWwVXIc=
|
||||
github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0=
|
||||
github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
|
||||
github.com/streamingfast/logging v0.0.0-20221209193439-bff11742bf4c h1:dV1ye/S2PiW9uIWvLtMrxWoTLcZS+yhjZDSKEV102Ho=
|
||||
|
|
@ -148,6 +140,8 @@ github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JT
|
|||
github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU=
|
||||
github.com/tidwall/pretty v1.2.1 h1:qjsOFOWWQl+N3RsoF5/ssm1pHmJJwhjlSbZ51I6wMl4=
|
||||
github.com/tidwall/pretty v1.2.1/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU=
|
||||
github.com/ugorji/go/codec v1.2.11 h1:BMaWp1Bb6fHwEtbplGBGJ498wD+LKlNSl25MjdZY4dU=
|
||||
github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg=
|
||||
github.com/vmihailenco/go-tinylfu v0.2.2 h1:H1eiG6HM36iniK6+21n9LLpzx1G9R3DJa2UjUjbynsI=
|
||||
github.com/vmihailenco/go-tinylfu v0.2.2/go.mod h1:CutYi2Q9puTxfcolkliPq4npPuofg9N9t8JVrjzwa3Q=
|
||||
github.com/vmihailenco/msgpack/v5 v5.3.4/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc=
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue