diff --git a/go.mod b/go.mod index 82dcd6b3d6..c1c949b586 100644 --- a/go.mod +++ b/go.mod @@ -12,6 +12,7 @@ require ( github.com/cloudevents/sdk-go/binding/format/protobuf/v2 v2.15.2 github.com/cloudevents/sdk-go/v2 v2.16.0 github.com/dominikbraun/graph v0.23.0 + github.com/ethereum/go-ethereum v1.15.3 github.com/fxamacker/cbor/v2 v2.5.0 github.com/go-json-experiment/json v0.0.0-20231102232822-2e55bd4e08b0 github.com/go-playground/validator/v10 v10.4.1 @@ -60,7 +61,7 @@ require ( go.uber.org/zap v1.27.0 golang.org/x/crypto v0.36.0 golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 - golang.org/x/tools v0.26.0 + golang.org/x/tools v0.29.0 gonum.org/v1/gonum v0.15.1 google.golang.org/grpc v1.72.0 google.golang.org/protobuf v1.36.6 @@ -69,26 +70,41 @@ require ( ) require ( + github.com/Microsoft/go-winio v0.6.2 // indirect + github.com/StackExchange/wmi v1.2.1 // indirect github.com/apache/arrow-go/v18 v18.0.0 // indirect github.com/bahlo/generic-list-go v0.2.0 // indirect github.com/beorn7/perks v1.0.1 // indirect + github.com/bits-and-blooms/bitset v1.17.0 // indirect github.com/bufbuild/protocompile v0.14.1 // indirect github.com/buger/jsonparser v1.1.1 // indirect github.com/cenkalti/backoff/v4 v4.3.0 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect + github.com/consensys/bavard v0.1.22 // indirect + github.com/consensys/gnark-crypto v0.14.0 // indirect + github.com/crate-crypto/go-ipa v0.0.0-20240724233137-53bbb0ceb27a // indirect + github.com/crate-crypto/go-kzg-4844 v1.1.0 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect + github.com/deckarep/golang-set/v2 v2.6.0 // indirect + github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 // indirect + github.com/ethereum/c-kzg-4844 v1.0.3 // indirect + github.com/ethereum/go-verkle v0.2.2 // indirect github.com/fatih/color v1.17.0 // indirect + github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/go-logr/logr v1.4.2 // indirect github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-ole/go-ole v1.3.0 // indirect github.com/go-playground/locales v0.13.0 // indirect github.com/go-playground/universal-translator v0.17.0 // indirect - github.com/goccy/go-json v0.10.3 // indirect + github.com/goccy/go-json v0.10.4 // indirect github.com/goccy/go-yaml v1.12.0 // indirect github.com/golang/protobuf v1.5.4 // indirect github.com/google/flatbuffers v24.3.25+incompatible // indirect + github.com/gorilla/websocket v1.4.2 // indirect github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.1.0 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.1 // indirect github.com/hashicorp/yamux v0.1.1 // indirect + github.com/holiman/uint256 v1.3.2 // indirect github.com/jackc/chunkreader/v2 v2.0.1 // indirect github.com/jackc/pgconn v1.14.3 // indirect github.com/jackc/pgio v1.0.0 // indirect @@ -105,6 +121,7 @@ require ( github.com/mattn/go-isatty v0.0.20 // indirect github.com/mitchellh/go-wordwrap v1.0.1 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect + github.com/mmcloughlin/addchain v0.4.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/mr-tron/base58 v1.2.0 // indirect @@ -117,8 +134,12 @@ require ( github.com/prometheus/common v0.63.0 // indirect github.com/prometheus/procfs v0.16.0 // indirect github.com/sanity-io/litter v1.5.5 // indirect + github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible // indirect github.com/smartcontractkit/chainlink-protos/workflows/go v0.0.0-20250430163438-97d324ef9061 // indirect github.com/stretchr/objx v0.5.2 // indirect + github.com/supranational/blst v0.3.14 // indirect + github.com/tklauser/go-sysconf v0.3.12 // indirect + github.com/tklauser/numcpus v0.6.1 // indirect github.com/wk8/go-ordered-map/v2 v2.1.8 // indirect github.com/x448/float16 v0.8.4 // indirect github.com/zeebo/xxh3 v1.0.2 // indirect @@ -134,4 +155,5 @@ require ( golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da // indirect google.golang.org/genproto/googleapis/api v0.0.0-20250218202821-56aae31c358a // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20250324211829-b45e905df463 // indirect + rsc.io/tmplfunc v0.0.3 // indirect ) diff --git a/go.sum b/go.sum index 6f5eebe9f7..07e924a4ec 100644 --- a/go.sum +++ b/go.sum @@ -2,8 +2,16 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMT filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/DataDog/zstd v1.5.2 h1:vUG4lAyuPCXO0TLbXvPv7EB7cNK1QV/luu55UHLrrn8= +github.com/DataDog/zstd v1.5.2/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= github.com/Masterminds/semver/v3 v3.1.1 h1:hLg3sBzpNErnxhQtUy/mmLR2I9foDujNK030IGemrRc= github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= +github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= +github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= +github.com/StackExchange/wmi v1.2.1 h1:VIkavFPXSjcnS+O8yTq7NI32k0R5Aj+v39y29VYDOSA= +github.com/StackExchange/wmi v1.2.1/go.mod h1:rcmrprowKIVzvc+NUiLncP2uuArMWLCbu9SBzvHz7e8= +github.com/VictoriaMetrics/fastcache v1.12.2 h1:N0y9ASrJ0F6h0QaC3o6uJb3NIZ9VKLjCM7NQbSmF7WI= +github.com/VictoriaMetrics/fastcache v1.12.2/go.mod h1:AmC+Nzz1+3G2eCPapF6UcsnkThDcMsQicp4xDukwJYI= github.com/XSAM/otelsql v0.29.0 h1:pEw9YXXs8ZrGRYfDc0cmArIz9lci5b42gmP5+tA1Huc= github.com/XSAM/otelsql v0.29.0/go.mod h1:d3/0xGIGC5RVEE+Ld7KotwaLy6zDeaF3fLJHOPpdN2w= github.com/andybalholm/brotli v1.1.1 h1:PR2pgnyFznKEugtsUo0xLdDop5SKXd5Qf5ysW+7XdTA= @@ -18,6 +26,8 @@ github.com/bahlo/generic-list-go v0.2.0 h1:5sz/EEAK+ls5wF+NeqDpk5+iNdMDXrh3z3nPn github.com/bahlo/generic-list-go v0.2.0/go.mod h1:2KvAjgMlE5NNynlg/5iLrrCCZ2+5xWbdbCW3pNTGyYg= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/bits-and-blooms/bitset v1.17.0 h1:1X2TS7aHz1ELcC0yU1y2stUs/0ig5oMU6STFZGrhvHI= +github.com/bits-and-blooms/bitset v1.17.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= github.com/bufbuild/protocompile v0.14.1 h1:iA73zAf/fyljNjQKwYzUHD6AD4R8KMasmwa/FBatYVw= github.com/bufbuild/protocompile v0.14.1/go.mod h1:ppVdAIhbr2H8asPk6k4pY7t9zB1OU5DoEw9xY/FUi1c= github.com/buger/jsonparser v1.1.1 h1:2PnMjfWD7wBILjqQbt530v576A/cAbQvEW9gGIpYMUs= @@ -27,6 +37,8 @@ github.com/bytecodealliance/wasmtime-go/v28 v28.0.0/go.mod h1:4OCU0xAW9ycwtX4nMF github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/cp v1.1.1 h1:nCb6ZLdB7NRaqsm91JtQTAme2SKJzXVsdPIPkyJr1MU= +github.com/cespare/cp v1.1.1/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= @@ -37,25 +49,63 @@ github.com/cloudevents/sdk-go/v2 v2.16.0/go.mod h1:5YWqklyhDSmGzBK/JENKKXdulbPq0 github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cockroachdb/apd v1.1.0 h1:3LFP3629v+1aKXU5Q37mxmRxX/pIu1nijXydLShEq5I= github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ= +github.com/cockroachdb/errors v1.11.3 h1:5bA+k2Y6r+oz/6Z/RFlNeVCesGARKuC6YymtcDrbC/I= +github.com/cockroachdb/errors v1.11.3/go.mod h1:m4UIW4CDjx+R5cybPsNrRbreomiFqt8o1h1wUVazSd8= +github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce h1:giXvy4KSc/6g/esnpM7Geqxka4WSqI1SZc7sMJFd3y4= +github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce/go.mod h1:9/y3cnZ5GKakj/H4y9r9GTjCvAFta7KLgSHPJJYc52M= +github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE= +github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= +github.com/cockroachdb/pebble v1.1.2 h1:CUh2IPtR4swHlEj48Rhfzw6l/d0qA31fItcIszQVIsA= +github.com/cockroachdb/pebble v1.1.2/go.mod h1:4exszw1r40423ZsmkG/09AFEG83I0uDgfujJdbL6kYU= +github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwPJ30= +github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= +github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= +github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ= +github.com/consensys/bavard v0.1.22 h1:Uw2CGvbXSZWhqK59X0VG/zOjpTFuOMcPLStrp1ihI0A= +github.com/consensys/bavard v0.1.22/go.mod h1:k/zVjHHC4B+PQy1Pg7fgvG3ALicQw540Crag8qx+dZs= +github.com/consensys/gnark-crypto v0.14.0 h1:DDBdl4HaBtdQsq/wfMwJvZNE80sHidrK3Nfrefatm0E= +github.com/consensys/gnark-crypto v0.14.0/go.mod h1:CU4UijNPsHawiVGNxe9co07FkzCeWHHrb1li/n1XoU0= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/cpuguy83/go-md2man/v2 v2.0.5 h1:ZtcqGrnekaHpVLArFSe4HK5DoKx1T0rq2DwVB0alcyc= +github.com/cpuguy83/go-md2man/v2 v2.0.5/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/crate-crypto/go-ipa v0.0.0-20240724233137-53bbb0ceb27a h1:W8mUrRp6NOVl3J+MYp5kPMoUZPp7aOYHtaua31lwRHg= +github.com/crate-crypto/go-ipa v0.0.0-20240724233137-53bbb0ceb27a/go.mod h1:sTwzHBvIzm2RfVCGNEBZgRyjwK40bVoun3ZnGOCafNM= +github.com/crate-crypto/go-kzg-4844 v1.1.0 h1:EN/u9k2TF6OWSHrCCDBBU6GLNMq88OspHHlMnHfoyU4= +github.com/crate-crypto/go-kzg-4844 v1.1.0/go.mod h1:JolLjpSff1tCCJKaJx4psrlEdlXuJEC996PL3tTAFks= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/davecgh/go-spew v0.0.0-20161028175848-04cdfd42973b/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/deckarep/golang-set/v2 v2.6.0 h1:XfcQbWM1LlMB8BsJ8N9vW5ehnnPVIw0je80NsVHagjM= +github.com/deckarep/golang-set/v2 v2.6.0/go.mod h1:VAky9rY/yGXJOLEDv3OMci+7wtDpOF4IN+y82NBOac4= +github.com/decred/dcrd/crypto/blake256 v1.0.1 h1:7PltbUIQB7u/FfZ39+DGa/ShuMyJ5ilcvdfma9wOH6Y= +github.com/decred/dcrd/crypto/blake256 v1.0.1/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPcCXqlm2ArzUIkw9czNJo= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 h1:rpfIENRNNilwHwZeG5+P150SMrnNEcHYvcCuK6dPZSg= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0= github.com/dominikbraun/graph v0.23.0 h1:TdZB4pPqCLFxYhdyMFb1TBdFxp8XLcJfTTBQucVPgCo= github.com/dominikbraun/graph v0.23.0/go.mod h1:yOjYyogZLY1LSG9E33JWZJiq5k83Qy2C6POAuiViluc= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/ethereum/c-kzg-4844 v1.0.3 h1:IEnbOHwjixW2cTvKRUlAAUOeleV7nNM/umJR+qy4WDs= +github.com/ethereum/c-kzg-4844 v1.0.3/go.mod h1:VewdlzQmpT5QSrVhbBuGoCdFJkpaJlO1aQputP83wc0= +github.com/ethereum/go-ethereum v1.15.3 h1:OeTWAq6r8iR89bfJDjmmOemE74ywArl9DUViFsVj3Y8= +github.com/ethereum/go-ethereum v1.15.3/go.mod h1:jMXlpZXfSar1mGs/5sB0aEpEnPsiE1Jn6/3anlueqz8= +github.com/ethereum/go-verkle v0.2.2 h1:I2W0WjnrFUIzzVPwm8ykY+7pL2d4VhlsePn4j7cnFk8= +github.com/ethereum/go-verkle v0.2.2/go.mod h1:M3b90YRnzqKyyzBEWJGqj8Qff4IDeXnzFw0P9bFw3uk= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fatih/color v1.17.0 h1:GlRw1BRJxkpqUCBKzKOw098ed57fEsKeNjpTe3cSjK4= github.com/fatih/color v1.17.0/go.mod h1:YZ7TlrGPkiz6ku9fK3TLD/pl3CpsiFyu8N92HLgmosI= +github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= +github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= github.com/fxamacker/cbor/v2 v2.5.0 h1:oHsG0V/Q6E/wqTS2O1Cozzsy69nqCiguo5Q1a1ADivE= github.com/fxamacker/cbor/v2 v2.5.0/go.mod h1:TA1xS00nchWmaBnEIxPSE5oHLuJBAVvqrtAnWBwBCVo= +github.com/getsentry/sentry-go v0.27.0 h1:Pv98CIbtB3LkMWmXi4Joa5OOcwbmnX88sF5qbK3r3Ps= +github.com/getsentry/sentry-go v0.27.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= github.com/go-json-experiment/json v0.0.0-20231102232822-2e55bd4e08b0 h1:ymLjT4f35nQbASLnvxEde4XOBL+Sn7rFuV+FOJqkljg= github.com/go-json-experiment/json v0.0.0-20231102232822-2e55bd4e08b0/go.mod h1:6daplAwHHGbUGib4990V3Il26O0OC4aRyvewaaAihaA= github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= @@ -65,6 +115,9 @@ github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/go-ole/go-ole v1.2.5/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= +github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE= +github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78= github.com/go-playground/assert/v2 v2.0.1 h1:MsBgLAaY856+nPRTKrp3/OZK38U/wa0CcBYNjji3q3A= github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/locales v0.13.0 h1:HyWk6mgj5qFqCT5fjGBuRArbVDfE4hi8+e8ceBS/t7Q= @@ -78,12 +131,18 @@ github.com/go-sql-driver/mysql v1.8.1/go.mod h1:wEBSXgmK//2ZFJyE+qWnIsVGmvmEKlqw github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-viper/mapstructure/v2 v2.2.1 h1:ZAaOCxANMuZx5RCeg0mBdEZk7DZasvvZIxtHqx8aGss= github.com/go-viper/mapstructure/v2 v2.2.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= -github.com/goccy/go-json v0.10.3 h1:KZ5WoDbxAIgm2HNbYckL0se1fHD6rz5j4ywS6ebzDqA= -github.com/goccy/go-json v0.10.3/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M= +github.com/goccy/go-json v0.10.4 h1:JSwxQzIqKfmFX1swYPpUThQZp/Ka4wzJdK0LWVytLPM= +github.com/goccy/go-json v0.10.4/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M= github.com/goccy/go-yaml v1.12.0 h1:/1WHjnMsI1dlIBQutrvSMGZRQufVO3asrHfTwfACoPM= github.com/goccy/go-yaml v1.12.0/go.mod h1:wKnAMd44+9JAAnGQpWVEgBzGt3YuTaQ4uXoHvE4m7WU= +github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw= +github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= github.com/gofrs/uuid v4.0.0+incompatible h1:1SD/1F5pU8p29ybwgQSwpQk+mwdRrXCYuPhW6m+TnJw= github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang-jwt/jwt/v4 v4.5.1 h1:JdqV9zKUdtaa9gdPlywC3aeoEsR681PlKC+4F5gQgeo= +github.com/golang-jwt/jwt/v4 v4.5.1/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -114,22 +173,37 @@ github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeN github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= +github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/subcommands v1.2.0/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= +github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus v1.0.1 h1:qnpSQwGEnkcRpTqNOIR6bJbR0gAorgP9CSALpRcKoAA= github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus v1.0.1/go.mod h1:lXGCsh6c22WGtjr+qGHj1otzZpV/1kwTMAqkwZsnWRU= github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.1.0 h1:pRhl55Yx1eC7BZ1N+BBWwnKaMyD8uC+34TLdndZMAKk= github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.1.0/go.mod h1:XKMd7iuf/RGPSMJ/U4HP0zS2Z9Fh8Ps9a+6X26m/tmI= github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.1 h1:e9Rjr40Z98/clHv5Yg79Is0NtosR5LXRvdr7o/6NwbA= github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.1/go.mod h1:tIxuGz/9mpox++sgp9fJjHO0+q1X9/UOWd798aAm22M= +github.com/hashicorp/go-bexpr v0.1.10 h1:9kuI5PFotCboP3dkDYFr/wi0gg0QVbSNz5oFRpxn4uE= +github.com/hashicorp/go-bexpr v0.1.10/go.mod h1:oxlubA2vC/gFVfX1A6JGp7ls7uCDlfJn732ehYYg+g0= github.com/hashicorp/go-hclog v1.5.0 h1:bI2ocEMgcVlz55Oj1xZNBsVi900c7II+fWDyV9o+13c= github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= github.com/hashicorp/go-plugin v1.6.2 h1:zdGAEd0V1lCaU0u+MxWQhtSDQmahpkwOun8U8EiRVog= github.com/hashicorp/go-plugin v1.6.2/go.mod h1:CkgLQ5CZqNmdL9U9JzM532t8ZiYQ35+pj3b1FD37R0Q= github.com/hashicorp/yamux v0.1.1 h1:yrQxtgseBDrq9Y652vSRDvsKCJKOUD+GzTS4Y0Y8pvE= github.com/hashicorp/yamux v0.1.1/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ= +github.com/holiman/billy v0.0.0-20240216141850-2abb0c79d3c4 h1:X4egAf/gcS1zATw6wn4Ej8vjuVGxeHdan+bRb2ebyv4= +github.com/holiman/billy v0.0.0-20240216141850-2abb0c79d3c4/go.mod h1:5GuXa7vkL8u9FkFuWdVvfR5ix8hRB7DbOAaYULamFpc= +github.com/holiman/bloomfilter/v2 v2.0.3 h1:73e0e/V0tCydx14a0SCYS/EWCxgwLZ18CZcZKVu0fao= +github.com/holiman/bloomfilter/v2 v2.0.3/go.mod h1:zpoh+gs7qcpqrHr3dB55AMiJwo0iURXE7ZOP9L9hSkA= +github.com/holiman/uint256 v1.3.2 h1:a9EgMPSC1AAaj1SZL5zIQD3WbwTuHrMGOerLjGmM/TA= +github.com/holiman/uint256 v1.3.2/go.mod h1:EOMSn4q6Nyt9P6efbI3bueV4e1b3dGlUCXeiRV4ng7E= +github.com/huin/goupnp v1.3.0 h1:UvLUlWDNpoUdYzb2TCn+MuTWtcjXKSza2n6CBdQ0xXc= +github.com/huin/goupnp v1.3.0/go.mod h1:gnGPsThkYa7bFi/KWmEysQRf48l2dvR5bxr2OFckNX8= github.com/iancoleman/strcase v0.3.0 h1:nTXanmYxhfFAMjZL34Ov6gkzEsSJZ5DbhxWjvSASxEI= github.com/iancoleman/strcase v0.3.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/invopop/jsonschema v0.12.0 h1:6ovsNSuvn9wEQVOyc72aycBMVQFKz7cPdMJn10CvzRI= @@ -181,6 +255,8 @@ github.com/jackc/pgx/v4 v4.18.3/go.mod h1:Ey4Oru5tH5sB6tV7hDmfWFahwF15Eb7DNXlRKx github.com/jackc/puddle v0.0.0-20190413234325-e4ced69a3a2b/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= github.com/jackc/puddle v0.0.0-20190608224051-11cab39313c9/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= github.com/jackc/puddle v1.1.3/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= +github.com/jackpal/go-nat-pmp v1.0.2 h1:KzKSgb7qkJvOUTqYl9/Hg/me3pWgBmERKrTGD7BdWus= +github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= github.com/jhump/protoreflect v1.15.1 h1:HUMERORf3I3ZdX05WaQ6MIpd/NJ434hTp5YiKgfCL6c= github.com/jhump/protoreflect v1.15.1/go.mod h1:jD/2GMKKE6OqX8qTjhADU1e6DShO+gavG9e0Q693nKo= github.com/jmoiron/sqlx v1.4.0 h1:1PLqN7S1UYp5t4SrVVnt4nUVNemrDAtxlulVe+Qgm3o= @@ -211,6 +287,8 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= +github.com/leanovate/gopter v0.2.11 h1:vRjThO1EKPb/1NsDXuDrzldR28RLkBflWYcU9CvzWu4= +github.com/leanovate/gopter v0.2.11/go.mod h1:aK3tzZP/C+p1m3SPRE4SYZFGP7jjkuSI4f7Xvpt0S9c= github.com/leodido/go-urn v1.2.0 h1:hpXL4XnriNwQ/ABnpepYM/1vCLWNDfUNts8dX3xTG6Y= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= @@ -236,6 +314,8 @@ github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27k github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU= +github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mattn/go-sqlite3 v1.14.22 h1:2gZY6PC6kBnID23Tichd1K+Z0oS6nE/XwU+Vz/5o4kU= github.com/mattn/go-sqlite3 v1.14.22/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y= github.com/minio/asm2plan9s v0.0.0-20200509001527-cdd76441f9d8 h1:AMFGa4R4MiIpspGNG7Z948v4n35fFGB3RR3G/ry4FWs= @@ -246,6 +326,11 @@ github.com/mitchellh/go-wordwrap v1.0.1 h1:TLuKupo69TCn6TQSyGxwI1EblZZEsQ0vMlAFQ github.com/mitchellh/go-wordwrap v1.0.1/go.mod h1:R62XHJLzvMFRBbcrT7m7WgmE1eOyTSsCt+hzestvNj0= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/pointerstructure v1.2.0 h1:O+i9nHnXS3l/9Wu7r4NrEdwA2VFTicjUEN1uBnDo34A= +github.com/mitchellh/pointerstructure v1.2.0/go.mod h1:BRAsLI5zgXmw97Lf6s25bs8ohIXc3tViBH44KcwB2g4= +github.com/mmcloughlin/addchain v0.4.0 h1:SobOdjm2xLj1KkXN5/n0xTIWyZA2+s99UCY1iPfkHRY= +github.com/mmcloughlin/addchain v0.4.0/go.mod h1:A86O+tHqZLMNO4w6ZZ4FlVQEadcoqkyU72HC5wJ4RlU= +github.com/mmcloughlin/profile v0.1.1/go.mod h1:IhHD7q1ooxgwTgjxQYkACGA77oFTDdFVejUS1/tS/qU= 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= @@ -257,10 +342,22 @@ github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/oklog/run v1.0.0 h1:Ru7dDtJNOyC66gQ5dQmaCa0qIsAUFY3sFpK1Xk8igrw= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= +github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= +github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/pelletier/go-toml/v2 v2.2.3 h1:YmeHyLY8mFWbdkNWwpr+qIL2bEqT0o95WSdkNHvL12M= github.com/pelletier/go-toml/v2 v2.2.3/go.mod h1:MfCQTFTvCcUyyvvwm1+G6H/jORL20Xlb6rzQu9GuUkc= github.com/pierrec/lz4/v4 v4.1.22 h1:cKFw6uJDK+/gfw5BcDL0JL5aBsAFdsIT18eRtLj7VIU= github.com/pierrec/lz4/v4 v4.1.22/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= +github.com/pion/dtls/v2 v2.2.7 h1:cSUBsETxepsCSFSxC3mc/aDo14qQLMSL+O6IjG28yV8= +github.com/pion/dtls/v2 v2.2.7/go.mod h1:8WiMkebSHFD0T+dIU+UeBaoV7kDhOW5oDCzZ7WZ/F9s= +github.com/pion/logging v0.2.2 h1:M9+AIj/+pxNsDfAT64+MAVgJO0rsyLnoJKCqf//DoeY= +github.com/pion/logging v0.2.2/go.mod h1:k0/tDVsRCX2Mb2ZEmTqNa7CWsQPc+YYCB7Q+5pahoms= +github.com/pion/stun/v2 v2.0.0 h1:A5+wXKLAypxQri59+tmQKVs7+l6mMM+3d+eER9ifRU0= +github.com/pion/stun/v2 v2.0.0/go.mod h1:22qRSh08fSEttYUmJZGlriq9+03jtVmXNODgLccj8GQ= +github.com/pion/transport/v2 v2.2.1 h1:7qYnCBlpgSJNYMbLCKuSY9KbQdBFoETvPNETv0y4N7c= +github.com/pion/transport/v2 v2.2.1/go.mod h1:cXXWavvCnFF6McHTft3DWS9iic2Mftcz1Aq29pGcU5g= +github.com/pion/transport/v3 v3.0.1 h1:gDTlPJwROfSfz6QfSi0ZmeCSkFcnWWiiR9ES0ouANiM= +github.com/pion/transport/v3 v3.0.1/go.mod h1:UY7kiITrlMv7/IKgd5eTUcaahZx5oUN3l9SzK5f5xE0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -277,12 +374,18 @@ github.com/prometheus/common v0.63.0 h1:YR/EIY1o3mEFP/kZCD7iDMnLPlGyuU2Gb3HIcXnA github.com/prometheus/common v0.63.0/go.mod h1:VVFF/fBIoToEnWRVkYoXEkq3R3paCoxG9PXP74SnV18= github.com/prometheus/procfs v0.16.0 h1:xh6oHhKwnOJKMYiYBDWmkHqQPyiY40sny36Cmx2bbsM= github.com/prometheus/procfs v0.16.0/go.mod h1:8veyXUu3nGP7oaCxhX6yeaM5u4stL2FeMXnCqhDthZg= +github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= +github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= +github.com/rs/cors v1.7.0 h1:+88SsELBHx5r+hZ8TCkggzSstaWNbDvThkVK8H6f9ik= +github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= github.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU= github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThCjNc= +github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= +github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/sanity-io/litter v1.5.5 h1:iE+sBxPBzoK6uaEP5Lt3fHNgpKcHXc/A2HGETy0uJQo= github.com/sanity-io/litter v1.5.5/go.mod h1:9gzJgR2i4ZpjZHsKvUXIRQVk7P+yM3e+jAF7bU2UI5U= github.com/santhosh-tekuri/jsonschema/v5 v5.2.0 h1:WCcC4vZDS1tYNxjWlwRJZQy28r8CMoggKnxNzxsVDMQ= @@ -290,6 +393,8 @@ github.com/santhosh-tekuri/jsonschema/v5 v5.2.0/go.mod h1:FKdcjfQW6rpZSnxxUvEA5H github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/scylladb/go-reflectx v1.0.1 h1:b917wZM7189pZdlND9PbIJ6NQxfDPfBvUaQ7cjj1iZQ= github.com/scylladb/go-reflectx v1.0.1/go.mod h1:rWnOfDIRWBGN0miMLIcoPt/Dhi2doCMZqwMCJ3KupFc= +github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible h1:Bn1aCHHRnjv4Bl16T8rcaFjYSrGrIZvpiGO6P3Q4GpU= +github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4= github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= github.com/shopspring/decimal v1.4.0 h1:bxl37RwXBklmTi0C79JfXCEBD1cqqHt0bbgBAGFp81k= @@ -320,12 +425,24 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/supranational/blst v0.3.14 h1:xNMoHRJOTwMn63ip6qoWJ2Ymgvj7E2b9jY2FAwY+qRo= +github.com/supranational/blst v0.3.14/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw= +github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY= +github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= +github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= +github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= +github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= +github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY= +github.com/urfave/cli/v2 v2.27.5 h1:WoHEJLdsXr6dDWoJgMq/CboDmyY/8HMMH1fTECbih+w= +github.com/urfave/cli/v2 v2.27.5/go.mod h1:3Sevf16NykTbInEnD0yKkjDAeZDS0A6bzhBH5hrMvTQ= github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= github.com/wk8/go-ordered-map/v2 v2.1.8 h1:5h/BUHu93oj4gIdvHHHGsScSTMijfx5PeYkE/fJgbpc= github.com/wk8/go-ordered-map/v2 v2.1.8/go.mod h1:5nJHM5DyteebpVlHnWMV0rPz6Zp7+xBAnxjb1X5vnTw= github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= +github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 h1:gEOO8jv9F4OT7lGCjxCBTO/36wtF6j2nSip77qHd4x4= +github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1/go.mod h1:Ohn+xnUBiLI6FVj/9LpzZWtj1/D6lUovWYBkxHVV3aM= github.com/xyproto/randomstring v1.0.5 h1:YtlWPoRdgMu3NZtP45drfy1GKoojuR7hmRcnhZqKjWU= github.com/xyproto/randomstring v1.0.5/go.mod h1:rgmS5DeNXLivK7YprL0pY+lTuhNQW3iGxZ18UQApw/E= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -444,6 +561,7 @@ golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -459,8 +577,12 @@ golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.32.0 h1:s77OFDvIQeibCmezSnk/q6iAfkdiQaJi4VzroCFrN20= golang.org/x/sys v0.32.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= @@ -473,8 +595,8 @@ golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.23.0 h1:D71I7dUrlY+VX0gQShAThNGHFxZ13dGLBHQLVl1mJlY= golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4= -golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= -golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/time v0.9.0 h1:EsRrnYcQiGH+5FfbgvV4AP7qEZstoyrHB0DzarOQ4ZY= +golang.org/x/time v0.9.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= @@ -489,8 +611,8 @@ golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= -golang.org/x/tools v0.26.0 h1:v/60pFQmzmT9ExmjDv2gGIfi3OqfKoEP6I5+umXlbnQ= -golang.org/x/tools v0.26.0/go.mod h1:TPVVj70c7JJ3WCazhD8OdXcZg/og+b9+tH/KxylGwH0= +golang.org/x/tools v0.29.0 h1:Xx0h3TtM9rzQpQuR4dKLrdglAmCEN5Oi+P74JdhdzXE= +golang.org/x/tools v0.29.0/go.mod h1:KMQVMRsVxU6nHCFXrBPhDB8XncLNLM0lIy/F14RP588= golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -537,7 +659,11 @@ gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntN gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/inconshreveable/log15.v2 v2.0.0-20180818164646-67afb5ed74ec/go.mod h1:aPpfJ7XW+gOuirDoZ8gHhLh3kZ1B08FtV2bbmy7Jv3s= +gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc= +gopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYskCTPBJVb9jqSc= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +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.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= @@ -545,5 +671,7 @@ honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.1.3/go.mod h1:NgwopIslSNH47DimFoV78dnkksY2EFtX0ajyb3K/las= +rsc.io/tmplfunc v0.0.3 h1:53XFQh69AfOa8Tw0Jm7t+GV7KZhOi6jzsCzTtKbMvzU= +rsc.io/tmplfunc v0.0.3/go.mod h1:AG3sTPzElb1Io3Yg4voV9AGZJuleGAwaVRxL9M49PhA= sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= diff --git a/pkg/capabilities/bindings/DataStorage.sol b/pkg/capabilities/bindings/DataStorage.sol new file mode 100644 index 0000000000..9bf68513fb --- /dev/null +++ b/pkg/capabilities/bindings/DataStorage.sol @@ -0,0 +1,58 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.6; + +contract DataStorage { + // Mapping to store data keyed by an address and a string key + mapping(address => mapping(string => string)) private data; + + // Event emitted when data is stored + event DataStored(address indexed sender, string key, string value); + + // New event emitted by a different method + event AccessLogged(address indexed caller, string message); + + // Custom error for when a key is not found + error DataNotFound(address requester, string key, string reason); + + // Struct definition + struct UserData { + string key; + string value; + } + + // Write method: Stores a key-value pair + function storeData(string calldata key, string calldata value) external { + data[msg.sender][key] = value; + emit DataStored(msg.sender, key, value); + } + + // Read method: Retrieves the value for a given key + // No longer emits any event + function readData(address user, string calldata key) external view returns (string memory) { + string memory value = data[user][key]; + + if (bytes(value).length == 0) { + revert DataNotFound(user, key, "No data associated with this key."); + } + + return value; + } + + // New method: Emits a different event + function logAccess(string calldata message) external { + emit AccessLogged(msg.sender, message); + } + + // New method: Accepts a struct and stores its data + function storeUserData(UserData calldata userData) external { + data[msg.sender][userData.key] = userData.value; + emit DataStored(msg.sender, userData.key, userData.value); + } + + function onReport(bytes calldata metadata, bytes calldata payload) external { + UserData memory user = abi.decode(payload, (UserData)); + // TODO implement logic to handle the report + data[msg.sender][user.key] = user.value; + emit DataStored(msg.sender, user.key, user.value); + } +} \ No newline at end of file diff --git a/pkg/capabilities/bindings/README.md b/pkg/capabilities/bindings/README.md new file mode 100644 index 0000000000..2fc48efbec --- /dev/null +++ b/pkg/capabilities/bindings/README.md @@ -0,0 +1,34 @@ +# CRE Generated Bindings (MVP) + +## Prerequisites: +1. Install `go` +2. Install `solidity` + +## Setup instructions: + +1. Clone `geth` fork and checkout development branch +``` +git clone https://github.com/pablolagreca/go-ethereum.git && git checkout abigen-configurable-template +``` + +2. Build custom abigen binary. +``` +go build -o "$(go env GOPATH)/bin/abigen-cre" ./cmd/abigen +``` + +3. Generate the abi combined json file +``` +solc --combined-json abi,bin,metadata {SOLIDITY_FILE_LOCATION} > {ABI_FILE_LOCATION} +``` + +4. Run abigen-cre, passing in the cre source template: +``` +abigen-cre --v2 \ + --abi {ABI_FILE_LOCATION} \ + --pkg bindings \ + --template ./sourcecre.go.tpl \ + --out ./build/bindings.go +``` + + + diff --git a/pkg/capabilities/bindings/build/DataStorage.abi b/pkg/capabilities/bindings/build/DataStorage.abi new file mode 100644 index 0000000000..3f00182fab --- /dev/null +++ b/pkg/capabilities/bindings/build/DataStorage.abi @@ -0,0 +1 @@ +[{"inputs":[{"internalType":"address","name":"requester","type":"address"},{"internalType":"string","name":"key","type":"string"},{"internalType":"string","name":"reason","type":"string"}],"name":"DataNotFound","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"caller","type":"address"},{"indexed":false,"internalType":"string","name":"message","type":"string"}],"name":"AccessLogged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"string","name":"key","type":"string"},{"indexed":false,"internalType":"string","name":"value","type":"string"}],"name":"DataStored","type":"event"},{"inputs":[{"internalType":"string","name":"message","type":"string"}],"name":"logAccess","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"metadata","type":"bytes"},{"internalType":"bytes","name":"payload","type":"bytes"}],"name":"onReport","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"string","name":"key","type":"string"}],"name":"readData","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"key","type":"string"},{"internalType":"string","name":"value","type":"string"}],"name":"storeData","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"string","name":"key","type":"string"},{"internalType":"string","name":"value","type":"string"}],"internalType":"struct DataStorage.UserData","name":"userData","type":"tuple"}],"name":"storeUserData","outputs":[],"stateMutability":"nonpayable","type":"function"}] \ No newline at end of file diff --git a/pkg/capabilities/bindings/build/DataStorage.bin b/pkg/capabilities/bindings/build/DataStorage.bin new file mode 100644 index 0000000000..7a669d6ca2 --- /dev/null +++ b/pkg/capabilities/bindings/build/DataStorage.bin @@ -0,0 +1 @@ +608060405234801561001057600080fd5b50610aa4806100206000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c80634ece5b4c1461005157806398458c5d1461006d578063ccf1582714610089578063f5bfa815146100a5575b600080fd5b61006b60048036038101906100669190610605565b6100d5565b005b61008760048036038101906100829190610686565b61019b565b005b6100a3600480360381019061009e91906105b8565b610296565b005b6100bf60048036038101906100ba9190610558565b6102ea565b6040516100cc9190610849565b60405180910390f35b81816000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020868660405161012592919061078c565b9081526020016040518091039020919061014092919061042b565b503373ffffffffffffffffffffffffffffffffffffffff167fc95c7d5d3ac582f659cd004afbea77723e1315567b6557f3c059e8eb9586518f8585858560405161018d949392919061080e565b60405180910390a250505050565b8080602001906101ab919061086b565b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208380600001906101f9919061086b565b60405161020792919061078c565b9081526020016040518091039020919061022292919061042b565b503373ffffffffffffffffffffffffffffffffffffffff167fc95c7d5d3ac582f659cd004afbea77723e1315567b6557f3c059e8eb9586518f82806000019061026b919061086b565b84806020019061027b919061086b565b60405161028b949392919061080e565b60405180910390a250565b3373ffffffffffffffffffffffffffffffffffffffff167fe2ab1536af9681ad9e5927bca61830526c4cd932e970162eef77328af1fdcfb583836040516102de9291906107ea565b60405180910390a25050565b606060008060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020848460405161033c92919061078c565b9081526020016040518091039020805461035590610969565b80601f016020809104026020016040519081016040528092919081815260200182805461038190610969565b80156103ce5780601f106103a3576101008083540402835291602001916103ce565b820191906000526020600020905b8154815290600101906020018083116103b157829003601f168201915b50505050509050600081511415610420578484846040517ff1e50209000000000000000000000000000000000000000000000000000000008152600401610417939291906107a5565b60405180910390fd5b809150509392505050565b82805461043790610969565b90600052602060002090601f01602090048101928261045957600085556104a0565b82601f1061047257803560ff19168380011785556104a0565b828001600101855582156104a0579182015b8281111561049f578235825591602001919060010190610484565b5b5090506104ad91906104b1565b5090565b5b808211156104ca5760008160009055506001016104b2565b5090565b6000813590506104dd81610a57565b92915050565b60008083601f8401126104f9576104f86109cf565b5b8235905067ffffffffffffffff811115610516576105156109ca565b5b602083019150836001820283011115610532576105316109e3565b5b9250929050565b60006040828403121561054f5761054e6109d9565b5b81905092915050565b600080600060408486031215610571576105706109f2565b5b600061057f868287016104ce565b935050602084013567ffffffffffffffff8111156105a05761059f6109ed565b5b6105ac868287016104e3565b92509250509250925092565b600080602083850312156105cf576105ce6109f2565b5b600083013567ffffffffffffffff8111156105ed576105ec6109ed565b5b6105f9858286016104e3565b92509250509250929050565b6000806000806040858703121561061f5761061e6109f2565b5b600085013567ffffffffffffffff81111561063d5761063c6109ed565b5b610649878288016104e3565b9450945050602085013567ffffffffffffffff81111561066c5761066b6109ed565b5b610678878288016104e3565b925092505092959194509250565b60006020828403121561069c5761069b6109f2565b5b600082013567ffffffffffffffff8111156106ba576106b96109ed565b5b6106c684828501610539565b91505092915050565b6106d8816108f5565b82525050565b60006106ea83856108d9565b93506106f7838584610927565b610700836109f7565b840190509392505050565b600061071783856108ea565b9350610724838584610927565b82840190509392505050565b600061073b826108ce565b61074581856108d9565b9350610755818560208601610936565b61075e816109f7565b840191505092915050565b60006107766021836108d9565b915061078182610a08565b604082019050919050565b600061079982848661070b565b91508190509392505050565b60006060820190506107ba60008301866106cf565b81810360208301526107cd8184866106de565b905081810360408301526107e081610769565b9050949350505050565b600060208201905081810360008301526108058184866106de565b90509392505050565b600060408201905081810360008301526108298186886106de565b9050818103602083015261083e8184866106de565b905095945050505050565b600060208201905081810360008301526108638184610730565b905092915050565b60008083356001602003843603038112610888576108876109de565b5b80840192508235915067ffffffffffffffff8211156108aa576108a96109d4565b5b6020830192506001820236038313156108c6576108c56109e8565b5b509250929050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b600061090082610907565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b82818337600083830152505050565b60005b83811015610954578082015181840152602081019050610939565b83811115610963576000848401525b50505050565b6000600282049050600182168061098157607f821691505b602082108114156109955761099461099b565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e6f2064617461206173736f63696174656420776974682074686973206b657960008201527f2e00000000000000000000000000000000000000000000000000000000000000602082015250565b610a60816108f5565b8114610a6b57600080fd5b5056fea2646970667358221220a124db93ed569560f075e2bcc61bd20a4b0585d1c44842b0523350244a1a0f3664736f6c63430008060033 \ No newline at end of file diff --git a/pkg/capabilities/bindings/build/DataStorage_combined.json b/pkg/capabilities/bindings/build/DataStorage_combined.json new file mode 100644 index 0000000000..201f2b08b8 --- /dev/null +++ b/pkg/capabilities/bindings/build/DataStorage_combined.json @@ -0,0 +1 @@ +{"contracts":{"DataStorage.sol:DataStorage":{"abi":[{"inputs":[{"internalType":"address","name":"requester","type":"address"},{"internalType":"string","name":"key","type":"string"},{"internalType":"string","name":"reason","type":"string"}],"name":"DataNotFound","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"caller","type":"address"},{"indexed":false,"internalType":"string","name":"message","type":"string"}],"name":"AccessLogged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"string","name":"key","type":"string"},{"indexed":false,"internalType":"string","name":"value","type":"string"}],"name":"DataStored","type":"event"},{"inputs":[{"internalType":"string","name":"message","type":"string"}],"name":"logAccess","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"metadata","type":"bytes"},{"internalType":"bytes","name":"payload","type":"bytes"}],"name":"onReport","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"string","name":"key","type":"string"}],"name":"readData","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"key","type":"string"},{"internalType":"string","name":"value","type":"string"}],"name":"storeData","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"string","name":"key","type":"string"},{"internalType":"string","name":"value","type":"string"}],"internalType":"struct DataStorage.UserData","name":"userData","type":"tuple"}],"name":"storeUserData","outputs":[],"stateMutability":"nonpayable","type":"function"}],"bin":"6080604052348015600e575f5ffd5b506111338061001c5f395ff3fe608060405234801561000f575f5ffd5b5060043610610055575f3560e01c80634ece5b4c14610059578063805f21321461007557806398458c5d14610091578063ccf15827146100ad578063f5bfa815146100c9575b5f5ffd5b610073600480360381019061006e9190610591565b6100f9565b005b61008f600480360381019061008a9190610664565b6101bd565b005b6100ab60048036038101906100a69190610704565b61029a565b005b6100c760048036038101906100c2919061074b565b610391565b005b6100e360048036038101906100de91906107f0565b6103e5565b6040516100f091906108bd565b60405180910390f35b81815f5f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f208686604051610147929190610919565b90815260200160405180910390209182610162929190610b6e565b503373ffffffffffffffffffffffffffffffffffffffff167fc95c7d5d3ac582f659cd004afbea77723e1315567b6557f3c059e8eb9586518f858585856040516101af9493929190610c67565b60405180910390a250505050565b5f82828101906101cd9190610e1a565b905080602001515f5f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20825f01516040516102219190610e91565b9081526020016040518091039020908161023b9190610ea7565b503373ffffffffffffffffffffffffffffffffffffffff167fc95c7d5d3ac582f659cd004afbea77723e1315567b6557f3c059e8eb9586518f825f0151836020015160405161028b929190610f76565b60405180910390a25050505050565b8080602001906102aa9190610fb7565b5f5f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2083805f01906102f59190610fb7565b604051610303929190610919565b9081526020016040518091039020918261031e929190610b6e565b503373ffffffffffffffffffffffffffffffffffffffff167fc95c7d5d3ac582f659cd004afbea77723e1315567b6557f3c059e8eb9586518f82805f01906103669190610fb7565b8480602001906103769190610fb7565b6040516103869493929190610c67565b60405180910390a250565b3373ffffffffffffffffffffffffffffffffffffffff167fe2ab1536af9681ad9e5927bca61830526c4cd932e970162eef77328af1fdcfb583836040516103d9929190611019565b60405180910390a25050565b60605f5f5f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f208484604051610434929190610919565b9081526020016040518091039020805461044d90610995565b80601f016020809104026020016040519081016040528092919081815260200182805461047990610995565b80156104c45780601f1061049b576101008083540402835291602001916104c4565b820191905f5260205f20905b8154815290600101906020018083116104a757829003601f168201915b505050505090505f815103610514578484846040517ff1e5020900000000000000000000000000000000000000000000000000000000815260040161050b939291906110ba565b60405180910390fd5b809150509392505050565b5f604051905090565b5f5ffd5b5f5ffd5b5f5ffd5b5f5ffd5b5f5ffd5b5f5f83601f84011261055157610550610530565b5b8235905067ffffffffffffffff81111561056e5761056d610534565b5b60208301915083600182028301111561058a57610589610538565b5b9250929050565b5f5f5f5f604085870312156105a9576105a8610528565b5b5f85013567ffffffffffffffff8111156105c6576105c561052c565b5b6105d28782880161053c565b9450945050602085013567ffffffffffffffff8111156105f5576105f461052c565b5b6106018782880161053c565b925092505092959194509250565b5f5f83601f84011261062457610623610530565b5b8235905067ffffffffffffffff81111561064157610640610534565b5b60208301915083600182028301111561065d5761065c610538565b5b9250929050565b5f5f5f5f6040858703121561067c5761067b610528565b5b5f85013567ffffffffffffffff8111156106995761069861052c565b5b6106a58782880161060f565b9450945050602085013567ffffffffffffffff8111156106c8576106c761052c565b5b6106d48782880161060f565b925092505092959194509250565b5f5ffd5b5f604082840312156106fb576106fa6106e2565b5b81905092915050565b5f6020828403121561071957610718610528565b5b5f82013567ffffffffffffffff8111156107365761073561052c565b5b610742848285016106e6565b91505092915050565b5f5f6020838503121561076157610760610528565b5b5f83013567ffffffffffffffff81111561077e5761077d61052c565b5b61078a8582860161053c565b92509250509250929050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6107bf82610796565b9050919050565b6107cf816107b5565b81146107d9575f5ffd5b50565b5f813590506107ea816107c6565b92915050565b5f5f5f6040848603121561080757610806610528565b5b5f610814868287016107dc565b935050602084013567ffffffffffffffff8111156108355761083461052c565b5b6108418682870161053c565b92509250509250925092565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f61088f8261084d565b6108998185610857565b93506108a9818560208601610867565b6108b281610875565b840191505092915050565b5f6020820190508181035f8301526108d58184610885565b905092915050565b5f81905092915050565b828183375f83830152505050565b5f61090083856108dd565b935061090d8385846108e7565b82840190509392505050565b5f6109258284866108f5565b91508190509392505050565b5f82905092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f60028204905060018216806109ac57607f821691505b6020821081036109bf576109be610968565b5b50919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f60088302610a217fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826109e6565b610a2b86836109e6565b95508019841693508086168417925050509392505050565b5f819050919050565b5f819050919050565b5f610a6f610a6a610a6584610a43565b610a4c565b610a43565b9050919050565b5f819050919050565b610a8883610a55565b610a9c610a9482610a76565b8484546109f2565b825550505050565b5f5f905090565b610ab3610aa4565b610abe818484610a7f565b505050565b5b81811015610ae157610ad65f82610aab565b600181019050610ac4565b5050565b601f821115610b2657610af7816109c5565b610b00846109d7565b81016020851015610b0f578190505b610b23610b1b856109d7565b830182610ac3565b50505b505050565b5f82821c905092915050565b5f610b465f1984600802610b2b565b1980831691505092915050565b5f610b5e8383610b37565b9150826002028217905092915050565b610b788383610931565b67ffffffffffffffff811115610b9157610b9061093b565b5b610b9b8254610995565b610ba6828285610ae5565b5f601f831160018114610bd3575f8415610bc1578287013590505b610bcb8582610b53565b865550610c32565b601f198416610be1866109c5565b5f5b82811015610c0857848901358255600182019150602085019450602081019050610be3565b86831015610c255784890135610c21601f891682610b37565b8355505b6001600288020188555050505b50505050505050565b5f610c468385610857565b9350610c538385846108e7565b610c5c83610875565b840190509392505050565b5f6040820190508181035f830152610c80818688610c3b565b90508181036020830152610c95818486610c3b565b905095945050505050565b5f5ffd5b610cad82610875565b810181811067ffffffffffffffff82111715610ccc57610ccb61093b565b5b80604052505050565b5f610cde61051f565b9050610cea8282610ca4565b919050565b5f5ffd5b5f5ffd5b5f67ffffffffffffffff821115610d1157610d1061093b565b5b610d1a82610875565b9050602081019050919050565b5f610d39610d3484610cf7565b610cd5565b905082815260208101848484011115610d5557610d54610cf3565b5b610d608482856108e7565b509392505050565b5f82601f830112610d7c57610d7b610530565b5b8135610d8c848260208601610d27565b91505092915050565b5f60408284031215610daa57610da9610ca0565b5b610db46040610cd5565b90505f82013567ffffffffffffffff811115610dd357610dd2610cef565b5b610ddf84828501610d68565b5f83015250602082013567ffffffffffffffff811115610e0257610e01610cef565b5b610e0e84828501610d68565b60208301525092915050565b5f60208284031215610e2f57610e2e610528565b5b5f82013567ffffffffffffffff811115610e4c57610e4b61052c565b5b610e5884828501610d95565b91505092915050565b5f610e6b8261084d565b610e7581856108dd565b9350610e85818560208601610867565b80840191505092915050565b5f610e9c8284610e61565b915081905092915050565b610eb08261084d565b67ffffffffffffffff811115610ec957610ec861093b565b5b610ed38254610995565b610ede828285610ae5565b5f60209050601f831160018114610f0f575f8415610efd578287015190505b610f078582610b53565b865550610f6e565b601f198416610f1d866109c5565b5f5b82811015610f4457848901518255600182019150602085019450602081019050610f1f565b86831015610f615784890151610f5d601f891682610b37565b8355505b6001600288020188555050505b505050505050565b5f6040820190508181035f830152610f8e8185610885565b90508181036020830152610fa28184610885565b90509392505050565b5f5ffd5b5f5ffd5b5f5ffd5b5f5f83356001602003843603038112610fd357610fd2610fab565b5b80840192508235915067ffffffffffffffff821115610ff557610ff4610faf565b5b60208301925060018202360383131561101157611010610fb3565b5b509250929050565b5f6020820190508181035f830152611032818486610c3b565b90509392505050565b611044816107b5565b82525050565b7f4e6f2064617461206173736f63696174656420776974682074686973206b65795f8201527f2e00000000000000000000000000000000000000000000000000000000000000602082015250565b5f6110a4602183610857565b91506110af8261104a565b604082019050919050565b5f6060820190506110cd5f83018661103b565b81810360208301526110e0818486610c3b565b905081810360408301526110f381611098565b905094935050505056fea26469706673582212207936b380efb76d4d5d1017df160ba6bbd5a1b4390c6989dab812208b5ab2fc3464736f6c634300081e0033","metadata":"{\"compiler\":{\"version\":\"0.8.30+commit.73712a01\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"requester\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"key\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"reason\",\"type\":\"string\"}],\"name\":\"DataNotFound\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"message\",\"type\":\"string\"}],\"name\":\"AccessLogged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"key\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"value\",\"type\":\"string\"}],\"name\":\"DataStored\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"message\",\"type\":\"string\"}],\"name\":\"logAccess\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"metadata\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"}],\"name\":\"onReport\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"key\",\"type\":\"string\"}],\"name\":\"readData\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"key\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"value\",\"type\":\"string\"}],\"name\":\"storeData\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"string\",\"name\":\"key\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"value\",\"type\":\"string\"}],\"internalType\":\"struct DataStorage.UserData\",\"name\":\"userData\",\"type\":\"tuple\"}],\"name\":\"storeUserData\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"DataStorage.sol\":\"DataStorage\"},\"evmVersion\":\"prague\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"DataStorage.sol\":{\"keccak256\":\"0xb70df5776d085e0f7117298b8813f454a36bfc581f8f73221c2f3ce9f4e92f93\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://10b84ff4a118ccfe2104d579032cf7f2beaedf0b426efc6167a59e77ef0718a7\",\"dweb:/ipfs/Qmdk9joPRuBk1JjhRQTsC5m41mTmdiNxb9TKeC9o9wf2Y4\"]}},\"version\":1}"}},"version":"0.8.30+commit.73712a01.Darwin.appleclang"} diff --git a/pkg/capabilities/bindings/build/bindings.go b/pkg/capabilities/bindings/build/bindings.go new file mode 100644 index 0000000000..7e09343661 --- /dev/null +++ b/pkg/capabilities/bindings/build/bindings.go @@ -0,0 +1,484 @@ +// Code generated — DO NOT EDIT. + +package bindings + +import ( + "bytes" + "errors" + "fmt" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" + "github.com/smartcontractkit/chainlink-common/pkg/capabilities/bindings" + evmcappb "github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/chain-capabilities/evm" + "github.com/smartcontractkit/chainlink-common/pkg/chains/evm" + "github.com/smartcontractkit/chainlink-common/pkg/values/pb" + "github.com/smartcontractkit/chainlink-common/pkg/workflows/sdk/v2" +) + +var ( + _ = bytes.Equal + _ = errors.New + _ = fmt.Sprintf + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +var DataStorageMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"requester\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"key\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"reason\",\"type\":\"string\"}],\"name\":\"DataNotFound\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"message\",\"type\":\"string\"}],\"name\":\"AccessLogged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"key\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"value\",\"type\":\"string\"}],\"name\":\"DataStored\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"message\",\"type\":\"string\"}],\"name\":\"logAccess\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"metadata\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"}],\"name\":\"onReport\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"key\",\"type\":\"string\"}],\"name\":\"readData\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"key\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"value\",\"type\":\"string\"}],\"name\":\"storeData\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"string\",\"name\":\"key\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"value\",\"type\":\"string\"}],\"internalType\":\"structDataStorage.UserData\",\"name\":\"userData\",\"type\":\"tuple\"}],\"name\":\"storeUserData\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Bin: "0x6080604052348015600e575f5ffd5b506111338061001c5f395ff3fe608060405234801561000f575f5ffd5b5060043610610055575f3560e01c80634ece5b4c14610059578063805f21321461007557806398458c5d14610091578063ccf15827146100ad578063f5bfa815146100c9575b5f5ffd5b610073600480360381019061006e9190610591565b6100f9565b005b61008f600480360381019061008a9190610664565b6101bd565b005b6100ab60048036038101906100a69190610704565b61029a565b005b6100c760048036038101906100c2919061074b565b610391565b005b6100e360048036038101906100de91906107f0565b6103e5565b6040516100f091906108bd565b60405180910390f35b81815f5f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f208686604051610147929190610919565b90815260200160405180910390209182610162929190610b6e565b503373ffffffffffffffffffffffffffffffffffffffff167fc95c7d5d3ac582f659cd004afbea77723e1315567b6557f3c059e8eb9586518f858585856040516101af9493929190610c67565b60405180910390a250505050565b5f82828101906101cd9190610e1a565b905080602001515f5f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20825f01516040516102219190610e91565b9081526020016040518091039020908161023b9190610ea7565b503373ffffffffffffffffffffffffffffffffffffffff167fc95c7d5d3ac582f659cd004afbea77723e1315567b6557f3c059e8eb9586518f825f0151836020015160405161028b929190610f76565b60405180910390a25050505050565b8080602001906102aa9190610fb7565b5f5f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2083805f01906102f59190610fb7565b604051610303929190610919565b9081526020016040518091039020918261031e929190610b6e565b503373ffffffffffffffffffffffffffffffffffffffff167fc95c7d5d3ac582f659cd004afbea77723e1315567b6557f3c059e8eb9586518f82805f01906103669190610fb7565b8480602001906103769190610fb7565b6040516103869493929190610c67565b60405180910390a250565b3373ffffffffffffffffffffffffffffffffffffffff167fe2ab1536af9681ad9e5927bca61830526c4cd932e970162eef77328af1fdcfb583836040516103d9929190611019565b60405180910390a25050565b60605f5f5f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f208484604051610434929190610919565b9081526020016040518091039020805461044d90610995565b80601f016020809104026020016040519081016040528092919081815260200182805461047990610995565b80156104c45780601f1061049b576101008083540402835291602001916104c4565b820191905f5260205f20905b8154815290600101906020018083116104a757829003601f168201915b505050505090505f815103610514578484846040517ff1e5020900000000000000000000000000000000000000000000000000000000815260040161050b939291906110ba565b60405180910390fd5b809150509392505050565b5f604051905090565b5f5ffd5b5f5ffd5b5f5ffd5b5f5ffd5b5f5ffd5b5f5f83601f84011261055157610550610530565b5b8235905067ffffffffffffffff81111561056e5761056d610534565b5b60208301915083600182028301111561058a57610589610538565b5b9250929050565b5f5f5f5f604085870312156105a9576105a8610528565b5b5f85013567ffffffffffffffff8111156105c6576105c561052c565b5b6105d28782880161053c565b9450945050602085013567ffffffffffffffff8111156105f5576105f461052c565b5b6106018782880161053c565b925092505092959194509250565b5f5f83601f84011261062457610623610530565b5b8235905067ffffffffffffffff81111561064157610640610534565b5b60208301915083600182028301111561065d5761065c610538565b5b9250929050565b5f5f5f5f6040858703121561067c5761067b610528565b5b5f85013567ffffffffffffffff8111156106995761069861052c565b5b6106a58782880161060f565b9450945050602085013567ffffffffffffffff8111156106c8576106c761052c565b5b6106d48782880161060f565b925092505092959194509250565b5f5ffd5b5f604082840312156106fb576106fa6106e2565b5b81905092915050565b5f6020828403121561071957610718610528565b5b5f82013567ffffffffffffffff8111156107365761073561052c565b5b610742848285016106e6565b91505092915050565b5f5f6020838503121561076157610760610528565b5b5f83013567ffffffffffffffff81111561077e5761077d61052c565b5b61078a8582860161053c565b92509250509250929050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6107bf82610796565b9050919050565b6107cf816107b5565b81146107d9575f5ffd5b50565b5f813590506107ea816107c6565b92915050565b5f5f5f6040848603121561080757610806610528565b5b5f610814868287016107dc565b935050602084013567ffffffffffffffff8111156108355761083461052c565b5b6108418682870161053c565b92509250509250925092565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f61088f8261084d565b6108998185610857565b93506108a9818560208601610867565b6108b281610875565b840191505092915050565b5f6020820190508181035f8301526108d58184610885565b905092915050565b5f81905092915050565b828183375f83830152505050565b5f61090083856108dd565b935061090d8385846108e7565b82840190509392505050565b5f6109258284866108f5565b91508190509392505050565b5f82905092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f60028204905060018216806109ac57607f821691505b6020821081036109bf576109be610968565b5b50919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f60088302610a217fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826109e6565b610a2b86836109e6565b95508019841693508086168417925050509392505050565b5f819050919050565b5f819050919050565b5f610a6f610a6a610a6584610a43565b610a4c565b610a43565b9050919050565b5f819050919050565b610a8883610a55565b610a9c610a9482610a76565b8484546109f2565b825550505050565b5f5f905090565b610ab3610aa4565b610abe818484610a7f565b505050565b5b81811015610ae157610ad65f82610aab565b600181019050610ac4565b5050565b601f821115610b2657610af7816109c5565b610b00846109d7565b81016020851015610b0f578190505b610b23610b1b856109d7565b830182610ac3565b50505b505050565b5f82821c905092915050565b5f610b465f1984600802610b2b565b1980831691505092915050565b5f610b5e8383610b37565b9150826002028217905092915050565b610b788383610931565b67ffffffffffffffff811115610b9157610b9061093b565b5b610b9b8254610995565b610ba6828285610ae5565b5f601f831160018114610bd3575f8415610bc1578287013590505b610bcb8582610b53565b865550610c32565b601f198416610be1866109c5565b5f5b82811015610c0857848901358255600182019150602085019450602081019050610be3565b86831015610c255784890135610c21601f891682610b37565b8355505b6001600288020188555050505b50505050505050565b5f610c468385610857565b9350610c538385846108e7565b610c5c83610875565b840190509392505050565b5f6040820190508181035f830152610c80818688610c3b565b90508181036020830152610c95818486610c3b565b905095945050505050565b5f5ffd5b610cad82610875565b810181811067ffffffffffffffff82111715610ccc57610ccb61093b565b5b80604052505050565b5f610cde61051f565b9050610cea8282610ca4565b919050565b5f5ffd5b5f5ffd5b5f67ffffffffffffffff821115610d1157610d1061093b565b5b610d1a82610875565b9050602081019050919050565b5f610d39610d3484610cf7565b610cd5565b905082815260208101848484011115610d5557610d54610cf3565b5b610d608482856108e7565b509392505050565b5f82601f830112610d7c57610d7b610530565b5b8135610d8c848260208601610d27565b91505092915050565b5f60408284031215610daa57610da9610ca0565b5b610db46040610cd5565b90505f82013567ffffffffffffffff811115610dd357610dd2610cef565b5b610ddf84828501610d68565b5f83015250602082013567ffffffffffffffff811115610e0257610e01610cef565b5b610e0e84828501610d68565b60208301525092915050565b5f60208284031215610e2f57610e2e610528565b5b5f82013567ffffffffffffffff811115610e4c57610e4b61052c565b5b610e5884828501610d95565b91505092915050565b5f610e6b8261084d565b610e7581856108dd565b9350610e85818560208601610867565b80840191505092915050565b5f610e9c8284610e61565b915081905092915050565b610eb08261084d565b67ffffffffffffffff811115610ec957610ec861093b565b5b610ed38254610995565b610ede828285610ae5565b5f60209050601f831160018114610f0f575f8415610efd578287015190505b610f078582610b53565b865550610f6e565b601f198416610f1d866109c5565b5f5b82811015610f4457848901518255600182019150602085019450602081019050610f1f565b86831015610f615784890151610f5d601f891682610b37565b8355505b6001600288020188555050505b505050505050565b5f6040820190508181035f830152610f8e8185610885565b90508181036020830152610fa28184610885565b90509392505050565b5f5ffd5b5f5ffd5b5f5ffd5b5f5f83356001602003843603038112610fd357610fd2610fab565b5b80840192508235915067ffffffffffffffff821115610ff557610ff4610faf565b5b60208301925060018202360383131561101157611010610fb3565b5b509250929050565b5f6020820190508181035f830152611032818486610c3b565b90509392505050565b611044816107b5565b82525050565b7f4e6f2064617461206173736f63696174656420776974682074686973206b65795f8201527f2e00000000000000000000000000000000000000000000000000000000000000602082015250565b5f6110a4602183610857565b91506110af8261104a565b604082019050919050565b5f6060820190506110cd5f83018661103b565b81810360208301526110e0818486610c3b565b905081810360408301526110f381611098565b905094935050505056fea26469706673582212207936b380efb76d4d5d1017df160ba6bbd5a1b4390c6989dab812208b5ab2fc3464736f6c634300081e0033", +} + +type DataStorageCodec interface { + EncodeReadDataMethodCall(in ReadDataInput) ([]byte, error) + DecodeReadDataMethodOutput(data []byte) (string, error) + EncodeDataStorageUserDataStruct(in DataStorageUserDataInput) ([]byte, error) + AccessLoggedLogHash() []byte + DecodeAccessLogged(log *evm.Log) (*AccessLogged, error) + DataStoredLogHash() []byte + DecodeDataStored(log *evm.Log) (*DataStored, error) +} + +type dataStorageCodecImpl struct { + abi *abi.ABI +} + +func NewDataStorageCodec() (DataStorageCodec, error) { + parsed, err := abi.JSON(strings.NewReader(DataStorageMetaData.ABI)) + if err != nil { + return nil, err + } + return &dataStorageCodecImpl{abi: &parsed}, nil +} + +func (c *dataStorageCodecImpl) EncodeReadDataMethodCall(in ReadDataInput) ([]byte, error) { + return c.abi.Pack("readData", in.User, in.Key) +} +func (c *dataStorageCodecImpl) DecodeReadDataMethodOutput(data []byte) (string, error) { + vals, err := c.abi.Methods["readData"].Outputs.Unpack(data) + if err != nil { + return *new(string), err + } + return vals[0].(string), nil +} + +func (c *dataStorageCodecImpl) EncodeDataStorageUserDataStruct(in DataStorageUserDataInput) ([]byte, error) { + return c.abi.Pack("dataStorageUserData", in) +} + +func (c *dataStorageCodecImpl) AccessLoggedLogHash() []byte { + return c.abi.Events["AccessLogged"].ID.Bytes() +} + +// DecodeAccessLogged decodes a log into a AccessLogged struct. +func (c *dataStorageCodecImpl) DecodeAccessLogged(log *evm.Log) (*AccessLogged, error) { + event := new(AccessLogged) + if err := c.abi.UnpackIntoInterface(event, "AccessLogged", log.Data); err != nil { + return nil, err + } + var indexed abi.Arguments + for _, arg := range c.abi.Events["AccessLogged"].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + // Convert [][]byte → []common.Hash + topics := make([]common.Hash, len(log.Topics)) + for i, t := range log.Topics { + topics[i] = common.BytesToHash(t) + } + + if err := abi.ParseTopics(event, indexed, topics[1:]); err != nil { + return nil, err + } + return event, nil +} + +func (c *dataStorageCodecImpl) DataStoredLogHash() []byte { + return c.abi.Events["DataStored"].ID.Bytes() +} + +// DecodeDataStored decodes a log into a DataStored struct. +func (c *dataStorageCodecImpl) DecodeDataStored(log *evm.Log) (*DataStored, error) { + event := new(DataStored) + if err := c.abi.UnpackIntoInterface(event, "DataStored", log.Data); err != nil { + return nil, err + } + var indexed abi.Arguments + for _, arg := range c.abi.Events["DataStored"].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + // Convert [][]byte → []common.Hash + topics := make([]common.Hash, len(log.Topics)) + for i, t := range log.Topics { + topics[i] = common.BytesToHash(t) + } + + if err := abi.ParseTopics(event, indexed, topics[1:]); err != nil { + return nil, err + } + return event, nil +} + +type DataStorage struct { + Address []byte + Options *bindings.ContractInitOptions + ABI *abi.ABI + evmClient evmcappb.Client + codec DataStorageCodec +} + +func NewDataStorage( + client evmcappb.Client, + address []byte, + options *bindings.ContractInitOptions, +) (*DataStorage, error) { + parsed, err := abi.JSON(strings.NewReader(DataStorageMetaData.ABI)) + if err != nil { + return nil, err + } + codec, err := NewDataStorageCodec() + if err != nil { + return nil, err + } + return &DataStorage{ + Address: address, + Options: options, + ABI: &parsed, + evmClient: client, + codec: codec, + }, nil +} + +type ReadDataInput struct { + User common.Address + Key string +} + +func (c DataStorage) ReadData( + runtime sdk.DonRuntime, + args ReadDataInput, + options *bindings.ReadOptions, +) (string, error) { + calldata, err := c.codec.EncodeReadDataMethodCall(args) + if err != nil { + return *new(string), err + } + if options == nil { + options = &bindings.ReadOptions{BlockNumber: nil} + } + promise := c.evmClient.CallContract(runtime, &evm.CallContractRequest{ + Call: &evm.CallMsg{To: c.Address, Data: calldata}, + BlockNumber: toPbBigInt(options.BlockNumber), + }) + reply, err := promise.Await() + if err != nil { + return *new(string), err + } + return c.codec.DecodeReadDataMethodOutput(reply.Data) +} + +type DataStorageUserDataInput struct { + Key string + Value string +} + +func (c DataStorage) WriteReportDataStorageUserData( + runtime sdk.DonRuntime, + input DataStorageUserDataInput, + options *bindings.WriteOptions, +) (*big.Int, error) { + encoded, err := c.codec.EncodeDataStorageUserDataStruct(input) + if err != nil { + return nil, err + } + report := bindings.GenerateReport(getChainID(c.evmClient), encoded) + writeReportReplyPromise := c.evmClient.WriteReport(runtime, &evm.WriteReportRequest{ + Receiver: c.Address, + Report: &evm.SignedReport{ + RawReport: report.RawReport, + ReportContext: report.ReportContext, + Signatures: report.Signatures, + Id: report.ID, + }, + GasConfig: options.GasConfig, + }) + reply, err := writeReportReplyPromise.Await() + if err != nil { + return nil, err + } + if reply.TxStatus == evm.TransactionStatus_TX_FAILURE { + return nil, &bindings.TxFatalError{ + Message: "Fatal tx execution", + } + } + for { + txByHashPromise := c.evmClient.GetTransactionByHash(runtime, &evm.GetTransactionByHashRequest{ + Hash: reply.TxHash, + }) + getTxResult, err := txByHashPromise.Await() + if err != nil { + return nil, err + } + if getTxResult.Transaction.IsFinalized { + if reply.ReceiverContractExecutionStatus == evm.ReceiverContractExecutionStatus_FAILURE { + return nil, &bindings.ReceiverContractError{ + Message: "Transaction finalized but receiver contract failed to execute", + TxHash: reply.TxHash, + } + } + return reply.TxHash, nil + } + } +} + +// DataNotFound represents the DataNotFound error raised by the DataStorage contract. +type DataNotFound struct { + Requester common.Address + Key string + Reason string +} + +// TODO: possibly clean this up +// DecodeDataNotFoundError decodes a DataNotFound error from revert data. +func (c *DataStorage) DecodeDataNotFoundError(data []byte) (*DataNotFound, error) { + args := c.ABI.Errors["DataNotFound"].Inputs + values, err := args.Unpack(data[4:]) + if err != nil { + return nil, fmt.Errorf("failed to unpack error: %w", err) + } + if len(values) != 3 { + return nil, fmt.Errorf("expected 3 values, got %%d", len(values)) + } + + requester, ok0 := values[0].(common.Address) + if !ok0 { + return nil, fmt.Errorf("unexpected type for requester in DataNotFound error") + } + + key, ok1 := values[1].(string) + if !ok1 { + return nil, fmt.Errorf("unexpected type for key in DataNotFound error") + } + + reason, ok2 := values[2].(string) + if !ok2 { + return nil, fmt.Errorf("unexpected type for reason in DataNotFound error") + } + + return &DataNotFound{ + Requester: requester, + Key: key, + Reason: reason, + }, nil +} + +func (c *DataStorage) UnpackError(data []byte) (any, error) { + switch common.Bytes2Hex(data[:4]) { + + case common.Bytes2Hex(c.ABI.Errors["DataNotFound"].ID.Bytes()): + return c.DecodeDataNotFoundError(data) + + default: + return nil, errors.New("unknown error selector") + } +} + +// Error implements the error interface for DataNotFound. +func (e *DataNotFound) Error() string { + return fmt.Sprintf("DataNotFound error: requester=%%v; key=%%v; reason=%%v;", e.Requester, e.Key, e.Reason) +} + +// AccessLogged represents a AccessLogged event raised by the DataStorage contract. +type AccessLogged struct { + Caller common.Address + Message string +} + +func (c *DataStorage) RegisterLogTrackingAccessLogged(runtime sdk.DonRuntime, options *bindings.LogTrackingOptions) { + //TODO use log tracking options if set + c.evmClient.RegisterLogTracking(runtime, &evm.RegisterLogTrackingRequest{ + Filter: &evm.LPFilter{ + Name: "AccessLogged-" + common.Bytes2Hex(c.Address), + Addresses: [][]byte{c.Address}, + EventSigs: [][]byte{c.codec.AccessLoggedLogHash()}, + }, + }) +} + +func (c *DataStorage) UnregisterLogTrackingAccessLogged(runtime sdk.DonRuntime) { + c.evmClient.UnregisterLogTracking(runtime, &evm.UnregisterLogTrackingRequest{ + FilterName: "AccessLogged-" + common.Bytes2Hex(c.Address), + }) +} + +func (c *DataStorage) QueryTrackedLogsAccessLogged(runtime sdk.DonRuntime, options *bindings.QueryTrackedLogsOptions) ([]bindings.ParsedLog[AccessLogged], any) { + promise := c.evmClient.QueryTrackedLogs(runtime, &evm.QueryTrackedLogsRequest{ + Expression: []*evm.Expression{ + //TODO add proper expression + &evm.Expression{Evaluator: &evm.Expression_BooleanExpression{&evm.BooleanExpression{ + Expression: []*evm.Expression{}, + }}}, + }, + }) + reply, err := promise.Await() + if err != nil { + return nil, fmt.Errorf("failed to query tracked logs: %w", err) + } + logs := reply.Logs + parsedLogs := make([]bindings.ParsedLog[AccessLogged], len(logs)) + for i, log := range logs { + decodedLog, err := c.codec.DecodeAccessLogged(log) + if err != nil { + return nil, fmt.Errorf("failed to decode AccessLogged log: %w", err) + } + parsedLogs[i] = bindings.ParsedLog[AccessLogged]{ + LogData: *decodedLog, + RawLog: log, + } + } + + return parsedLogs, nil +} + +func (c *DataStorage) FilterLogsAccessLogged(runtime sdk.DonRuntime, options *bindings.FilterOptions) ([]bindings.ParsedLog[AccessLogged], error) { + if options == nil { + options = &bindings.FilterOptions{ + ToBlock: "finalized", //TODO we need a enum / constant + } + } + filterLogsReplyPromise := c.evmClient.FilterLogs(runtime, &evm.FilterLogsRequest{ + FilterQuery: &evm.FilterQuery{ + Addresses: [][]byte{c.Address}, + Topics: []*evm.Topics{ + {Topic: [][]byte{c.codec.AccessLoggedLogHash()}}, + }, BlockHash: options.BlockHash, + FromBlock: toPbBigInt(options.FromBlock), + ToBlock: toPbBigInt(options.ToBlock), + }, + }) + reply, err := filterLogsReplyPromise.Await() + if err != nil { + return nil, err + } + logs := reply.Logs + parsedLogs := make([]bindings.ParsedLog[AccessLogged], len(logs)) + for i, log := range logs { + decodedLog, err := c.codec.DecodeAccessLogged(log) + if err != nil { + return nil, fmt.Errorf("failed to decode AccessLogged log: %w", err) + } + parsedLogs[i] = bindings.ParsedLog[AccessLogged]{ + LogData: *decodedLog, + RawLog: log, + } + } + + return parsedLogs, nil +} + +// DataStored represents a DataStored event raised by the DataStorage contract. +type DataStored struct { + Sender common.Address + Key string + Value string +} + +func (c *DataStorage) RegisterLogTrackingDataStored(runtime sdk.DonRuntime, options *bindings.LogTrackingOptions) { + //TODO use log tracking options if set + c.evmClient.RegisterLogTracking(runtime, &evm.RegisterLogTrackingRequest{ + Filter: &evm.LPFilter{ + Name: "DataStored-" + common.Bytes2Hex(c.Address), + Addresses: [][]byte{c.Address}, + EventSigs: [][]byte{c.codec.DataStoredLogHash()}, + }, + }) +} + +func (c *DataStorage) UnregisterLogTrackingDataStored(runtime sdk.DonRuntime) { + c.evmClient.UnregisterLogTracking(runtime, &evm.UnregisterLogTrackingRequest{ + FilterName: "DataStored-" + common.Bytes2Hex(c.Address), + }) +} + +func (c *DataStorage) QueryTrackedLogsDataStored(runtime sdk.DonRuntime, options *bindings.QueryTrackedLogsOptions) ([]bindings.ParsedLog[DataStored], any) { + promise := c.evmClient.QueryTrackedLogs(runtime, &evm.QueryTrackedLogsRequest{ + Expression: []*evm.Expression{ + //TODO add proper expression + &evm.Expression{Evaluator: &evm.Expression_BooleanExpression{&evm.BooleanExpression{ + Expression: []*evm.Expression{}, + }}}, + }, + }) + reply, err := promise.Await() + if err != nil { + return nil, fmt.Errorf("failed to query tracked logs: %w", err) + } + logs := reply.Logs + parsedLogs := make([]bindings.ParsedLog[DataStored], len(logs)) + for i, log := range logs { + decodedLog, err := c.codec.DecodeDataStored(log) + if err != nil { + return nil, fmt.Errorf("failed to decode DataStored log: %w", err) + } + parsedLogs[i] = bindings.ParsedLog[DataStored]{ + LogData: *decodedLog, + RawLog: log, + } + } + + return parsedLogs, nil +} + +func (c *DataStorage) FilterLogsDataStored(runtime sdk.DonRuntime, options *bindings.FilterOptions) ([]bindings.ParsedLog[DataStored], error) { + if options == nil { + options = &bindings.FilterOptions{ + ToBlock: "finalized", //TODO we need a enum / constant + } + } + filterLogsReplyPromise := c.evmClient.FilterLogs(runtime, &evm.FilterLogsRequest{ + FilterQuery: &evm.FilterQuery{ + Addresses: [][]byte{c.Address}, + Topics: []*evm.Topics{ + {Topic: [][]byte{c.codec.DataStoredLogHash()}}, + }, BlockHash: options.BlockHash, + FromBlock: toPbBigInt(options.FromBlock), + ToBlock: toPbBigInt(options.ToBlock), + }, + }) + reply, err := filterLogsReplyPromise.Await() + if err != nil { + return nil, err + } + logs := reply.Logs + parsedLogs := make([]bindings.ParsedLog[DataStored], len(logs)) + for i, log := range logs { + decodedLog, err := c.codec.DecodeDataStored(log) + if err != nil { + return nil, fmt.Errorf("failed to decode DataStored log: %w", err) + } + parsedLogs[i] = bindings.ParsedLog[DataStored]{ + LogData: *decodedLog, + RawLog: log, + } + } + + return parsedLogs, nil +} + +func toPbBigInt(i *big.Int) *pb.BigInt { panic("unimplemented") } +func getChainID(e evmcappb.Client) uint32 { panic("unimplemented") } diff --git a/pkg/capabilities/bindings/common.go b/pkg/capabilities/bindings/common.go new file mode 100644 index 0000000000..e7adb30b4b --- /dev/null +++ b/pkg/capabilities/bindings/common.go @@ -0,0 +1,94 @@ +package bindings + +import ( + "fmt" + "math/big" + + evm "github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/chain-capabilities/evm/chain-service" + chain_common "github.com/smartcontractkit/chainlink-common/pkg/loop/chain-common" +) + +// This is not EVM specific, it's generic +type commonReport struct { + RawReport []byte + ReportContext []byte + Signatures [][]byte + ID []byte +} + +// Define a custom error type +type TxFatalError struct { + Message string +} + +// Implement the error interface +func (e *TxFatalError) Error() string { + return fmt.Sprintf("Error %s", e.Message) +} + +// Define a custom error type +type ReceiverContractError struct { + Message string + TxHash []byte +} + +// Implement the error interface +func (e *ReceiverContractError) Error() string { + return fmt.Sprintf("Error %s", e.Message) +} + +type ContractInitOptions struct { + GasConfig *evmcappb.GasConfig +} + +type ContractInputs struct { + EVM evm.EVM + Address []byte + Options *ContractInitOptions +} + +type ReadOptions struct { + BlockNumber *big.Int +} + +type WriteOptions struct { + GasConfig *evm.GasConfig + BlockDepth uint16 //0 means finalized, 1 confirmed, positive numbers block depth - TODO to be defined together with all other operations +} + +//Logs support + +const FINALIZED = 0 +const CONFIRMED = 1 + +type LogTrackingOptions struct { + MaxLogsKept uint64 `protobuf:"varint,1,opt,name=max_logs_kept,json=maxLogsKept,proto3" json:"max_logs_kept,omitempty"` // maximum number of logs to retain ( 0 = unlimited ) + RetentionTime int64 `protobuf:"varint,2,opt,name=retention_time,json=retentionTime,proto3" json:"retention_time,omitempty"` // maximum amount of time to retain logs in seconds + LogsPerBlock uint64 `protobuf:"varint,3,opt,name=logs_per_block,json=logsPerBlock,proto3" json:"logs_per_block,omitempty"` // rate limit ( maximum # of logs per block, 0 = unlimited ) + //TODO could this be actual values for the indexed log fields instead of hashes? + Topic2 []*evm.Hash `protobuf:"bytes,7,rep,name=topic2,proto3" json:"topic2,omitempty"` // list of possible values for topic2 + Topic3 []*evm.Hash `protobuf:"bytes,8,rep,name=topic3,proto3" json:"topic3,omitempty"` // list of possible values for topic3 + Topic4 []*evm.Hash `protobuf:"bytes,9,rep,name=topic4,proto3" json:"topic4,omitempty"` // list of possible values for topic4 +} + +type QueryTrackedLogsOptions struct { + SortBy []*chain_common.SortBy `protobuf:"bytes,1,rep,name=sort_by,json=sortBy,proto3" json:"sort_by,omitempty"` // A list of sorting criteria. + Limit *chain_common.Limit `protobuf:"bytes,2,opt,name=limit,proto3" json:"limit,omitempty"` // Pagination limit and direction. +} + +type FilterLogTrigger struct { + Confidence evmcappb.ConfidenceLevel + BlockDepth uint64 + +} + +type ParsedLog[T any] struct { + LogData T + RawLog evm.Log +} + +type FilterOptions struct { + BlockHash []byte + FromBlock *big.Int + ToBlock *big.Int +} diff --git a/pkg/capabilities/bindings/cre_common.go b/pkg/capabilities/bindings/cre_common.go new file mode 100644 index 0000000000..a3aed8a2aa --- /dev/null +++ b/pkg/capabilities/bindings/cre_common.go @@ -0,0 +1,6 @@ +package bindings + +// This function is not EVM specific, it's generic and should be provided by CRE +func GenerateReport(chainID uint32, userData []byte) commonReport { + return commonReport{} +} diff --git a/pkg/capabilities/bindings/datastorage.go b/pkg/capabilities/bindings/datastorage.go new file mode 100644 index 0000000000..bcd497d297 --- /dev/null +++ b/pkg/capabilities/bindings/datastorage.go @@ -0,0 +1,594 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package bindings + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// DataStorageUserData is an auto generated low-level Go binding around an user-defined struct. +type DataStorageUserData struct { + Key string + Value string +} + +// DatastorageMetaData contains all meta data concerning the Datastorage contract. +var DatastorageMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"requester\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"key\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"reason\",\"type\":\"string\"}],\"name\":\"DataNotFound\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"message\",\"type\":\"string\"}],\"name\":\"AccessLogged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"key\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"value\",\"type\":\"string\"}],\"name\":\"DataStored\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"message\",\"type\":\"string\"}],\"name\":\"logAccess\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"key\",\"type\":\"string\"}],\"name\":\"readData\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"key\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"value\",\"type\":\"string\"}],\"name\":\"storeData\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"string\",\"name\":\"key\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"value\",\"type\":\"string\"}],\"internalType\":\"structDataStorage.UserData\",\"name\":\"userData\",\"type\":\"tuple\"}],\"name\":\"storeUserData\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Bin: "0x608060405234801561001057600080fd5b50610aa4806100206000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c80634ece5b4c1461005157806398458c5d1461006d578063ccf1582714610089578063f5bfa815146100a5575b600080fd5b61006b60048036038101906100669190610605565b6100d5565b005b61008760048036038101906100829190610686565b61019b565b005b6100a3600480360381019061009e91906105b8565b610296565b005b6100bf60048036038101906100ba9190610558565b6102ea565b6040516100cc9190610849565b60405180910390f35b81816000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020868660405161012592919061078c565b9081526020016040518091039020919061014092919061042b565b503373ffffffffffffffffffffffffffffffffffffffff167fc95c7d5d3ac582f659cd004afbea77723e1315567b6557f3c059e8eb9586518f8585858560405161018d949392919061080e565b60405180910390a250505050565b8080602001906101ab919061086b565b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208380600001906101f9919061086b565b60405161020792919061078c565b9081526020016040518091039020919061022292919061042b565b503373ffffffffffffffffffffffffffffffffffffffff167fc95c7d5d3ac582f659cd004afbea77723e1315567b6557f3c059e8eb9586518f82806000019061026b919061086b565b84806020019061027b919061086b565b60405161028b949392919061080e565b60405180910390a250565b3373ffffffffffffffffffffffffffffffffffffffff167fe2ab1536af9681ad9e5927bca61830526c4cd932e970162eef77328af1fdcfb583836040516102de9291906107ea565b60405180910390a25050565b606060008060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020848460405161033c92919061078c565b9081526020016040518091039020805461035590610969565b80601f016020809104026020016040519081016040528092919081815260200182805461038190610969565b80156103ce5780601f106103a3576101008083540402835291602001916103ce565b820191906000526020600020905b8154815290600101906020018083116103b157829003601f168201915b50505050509050600081511415610420578484846040517ff1e50209000000000000000000000000000000000000000000000000000000008152600401610417939291906107a5565b60405180910390fd5b809150509392505050565b82805461043790610969565b90600052602060002090601f01602090048101928261045957600085556104a0565b82601f1061047257803560ff19168380011785556104a0565b828001600101855582156104a0579182015b8281111561049f578235825591602001919060010190610484565b5b5090506104ad91906104b1565b5090565b5b808211156104ca5760008160009055506001016104b2565b5090565b6000813590506104dd81610a57565b92915050565b60008083601f8401126104f9576104f86109cf565b5b8235905067ffffffffffffffff811115610516576105156109ca565b5b602083019150836001820283011115610532576105316109e3565b5b9250929050565b60006040828403121561054f5761054e6109d9565b5b81905092915050565b600080600060408486031215610571576105706109f2565b5b600061057f868287016104ce565b935050602084013567ffffffffffffffff8111156105a05761059f6109ed565b5b6105ac868287016104e3565b92509250509250925092565b600080602083850312156105cf576105ce6109f2565b5b600083013567ffffffffffffffff8111156105ed576105ec6109ed565b5b6105f9858286016104e3565b92509250509250929050565b6000806000806040858703121561061f5761061e6109f2565b5b600085013567ffffffffffffffff81111561063d5761063c6109ed565b5b610649878288016104e3565b9450945050602085013567ffffffffffffffff81111561066c5761066b6109ed565b5b610678878288016104e3565b925092505092959194509250565b60006020828403121561069c5761069b6109f2565b5b600082013567ffffffffffffffff8111156106ba576106b96109ed565b5b6106c684828501610539565b91505092915050565b6106d8816108f5565b82525050565b60006106ea83856108d9565b93506106f7838584610927565b610700836109f7565b840190509392505050565b600061071783856108ea565b9350610724838584610927565b82840190509392505050565b600061073b826108ce565b61074581856108d9565b9350610755818560208601610936565b61075e816109f7565b840191505092915050565b60006107766021836108d9565b915061078182610a08565b604082019050919050565b600061079982848661070b565b91508190509392505050565b60006060820190506107ba60008301866106cf565b81810360208301526107cd8184866106de565b905081810360408301526107e081610769565b9050949350505050565b600060208201905081810360008301526108058184866106de565b90509392505050565b600060408201905081810360008301526108298186886106de565b9050818103602083015261083e8184866106de565b905095945050505050565b600060208201905081810360008301526108638184610730565b905092915050565b60008083356001602003843603038112610888576108876109de565b5b80840192508235915067ffffffffffffffff8211156108aa576108a96109d4565b5b6020830192506001820236038313156108c6576108c56109e8565b5b509250929050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b600061090082610907565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b82818337600083830152505050565b60005b83811015610954578082015181840152602081019050610939565b83811115610963576000848401525b50505050565b6000600282049050600182168061098157607f821691505b602082108114156109955761099461099b565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e6f2064617461206173736f63696174656420776974682074686973206b657960008201527f2e00000000000000000000000000000000000000000000000000000000000000602082015250565b610a60816108f5565b8114610a6b57600080fd5b5056fea2646970667358221220a124db93ed569560f075e2bcc61bd20a4b0585d1c44842b0523350244a1a0f3664736f6c63430008060033", +} + +// DatastorageABI is the input ABI used to generate the binding from. +// Deprecated: Use DatastorageMetaData.ABI instead. +var DatastorageABI = DatastorageMetaData.ABI + +// DatastorageBin is the compiled bytecode used for deploying new contracts. +// Deprecated: Use DatastorageMetaData.Bin instead. +var DatastorageBin = DatastorageMetaData.Bin + +// DeployDatastorage deploys a new Ethereum contract, binding an instance of Datastorage to it. +func DeployDatastorage(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *Datastorage, error) { + parsed, err := DatastorageMetaData.GetAbi() + if err != nil { + return common.Address{}, nil, nil, err + } + if parsed == nil { + return common.Address{}, nil, nil, errors.New("GetABI returned nil") + } + + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(DatastorageBin), backend) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &Datastorage{DatastorageCaller: DatastorageCaller{contract: contract}, DatastorageTransactor: DatastorageTransactor{contract: contract}, DatastorageFilterer: DatastorageFilterer{contract: contract}}, nil +} + +// Datastorage is an auto generated Go binding around an Ethereum contract. +type Datastorage struct { + DatastorageCaller // Read-only binding to the contract + DatastorageTransactor // Write-only binding to the contract + DatastorageFilterer // Log filterer for contract events +} + +// DatastorageCaller is an auto generated read-only Go binding around an Ethereum contract. +type DatastorageCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// DatastorageTransactor is an auto generated write-only Go binding around an Ethereum contract. +type DatastorageTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// DatastorageFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type DatastorageFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// DatastorageSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type DatastorageSession struct { + Contract *Datastorage // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// DatastorageCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type DatastorageCallerSession struct { + Contract *DatastorageCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// DatastorageTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type DatastorageTransactorSession struct { + Contract *DatastorageTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// DatastorageRaw is an auto generated low-level Go binding around an Ethereum contract. +type DatastorageRaw struct { + Contract *Datastorage // Generic contract binding to access the raw methods on +} + +// DatastorageCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type DatastorageCallerRaw struct { + Contract *DatastorageCaller // Generic read-only contract binding to access the raw methods on +} + +// DatastorageTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type DatastorageTransactorRaw struct { + Contract *DatastorageTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewDatastorage creates a new instance of Datastorage, bound to a specific deployed contract. +func NewDatastorage(address common.Address, backend bind.ContractBackend) (*Datastorage, error) { + contract, err := bindDatastorage(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &Datastorage{DatastorageCaller: DatastorageCaller{contract: contract}, DatastorageTransactor: DatastorageTransactor{contract: contract}, DatastorageFilterer: DatastorageFilterer{contract: contract}}, nil +} + +// NewDatastorageCaller creates a new read-only instance of Datastorage, bound to a specific deployed contract. +func NewDatastorageCaller(address common.Address, caller bind.ContractCaller) (*DatastorageCaller, error) { + contract, err := bindDatastorage(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &DatastorageCaller{contract: contract}, nil +} + +// NewDatastorageTransactor creates a new write-only instance of Datastorage, bound to a specific deployed contract. +func NewDatastorageTransactor(address common.Address, transactor bind.ContractTransactor) (*DatastorageTransactor, error) { + contract, err := bindDatastorage(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &DatastorageTransactor{contract: contract}, nil +} + +// NewDatastorageFilterer creates a new log filterer instance of Datastorage, bound to a specific deployed contract. +func NewDatastorageFilterer(address common.Address, filterer bind.ContractFilterer) (*DatastorageFilterer, error) { + contract, err := bindDatastorage(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &DatastorageFilterer{contract: contract}, nil +} + +// bindDatastorage binds a generic wrapper to an already deployed contract. +func bindDatastorage(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := DatastorageMetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_Datastorage *DatastorageRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _Datastorage.Contract.DatastorageCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_Datastorage *DatastorageRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Datastorage.Contract.DatastorageTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Datastorage *DatastorageRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Datastorage.Contract.DatastorageTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_Datastorage *DatastorageCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _Datastorage.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_Datastorage *DatastorageTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Datastorage.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Datastorage *DatastorageTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Datastorage.Contract.contract.Transact(opts, method, params...) +} + +// ReadData is a free data retrieval call binding the contract method 0xf5bfa815. +// +// Solidity: function readData(address user, string key) view returns(string) +func (_Datastorage *DatastorageCaller) ReadData(opts *bind.CallOpts, user common.Address, key string) (string, error) { + var out []interface{} + err := _Datastorage.contract.Call(opts, &out, "readData", user, key) + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +// ReadData is a free data retrieval call binding the contract method 0xf5bfa815. +// +// Solidity: function readData(address user, string key) view returns(string) +func (_Datastorage *DatastorageSession) ReadData(user common.Address, key string) (string, error) { + return _Datastorage.Contract.ReadData(&_Datastorage.CallOpts, user, key) +} + +// ReadData is a free data retrieval call binding the contract method 0xf5bfa815. +// +// Solidity: function readData(address user, string key) view returns(string) +func (_Datastorage *DatastorageCallerSession) ReadData(user common.Address, key string) (string, error) { + return _Datastorage.Contract.ReadData(&_Datastorage.CallOpts, user, key) +} + +// LogAccess is a paid mutator transaction binding the contract method 0xccf15827. +// +// Solidity: function logAccess(string message) returns() +func (_Datastorage *DatastorageTransactor) LogAccess(opts *bind.TransactOpts, message string) (*types.Transaction, error) { + return _Datastorage.contract.Transact(opts, "logAccess", message) +} + +// LogAccess is a paid mutator transaction binding the contract method 0xccf15827. +// +// Solidity: function logAccess(string message) returns() +func (_Datastorage *DatastorageSession) LogAccess(message string) (*types.Transaction, error) { + return _Datastorage.Contract.LogAccess(&_Datastorage.TransactOpts, message) +} + +// LogAccess is a paid mutator transaction binding the contract method 0xccf15827. +// +// Solidity: function logAccess(string message) returns() +func (_Datastorage *DatastorageTransactorSession) LogAccess(message string) (*types.Transaction, error) { + return _Datastorage.Contract.LogAccess(&_Datastorage.TransactOpts, message) +} + +// StoreData is a paid mutator transaction binding the contract method 0x4ece5b4c. +// +// Solidity: function storeData(string key, string value) returns() +func (_Datastorage *DatastorageTransactor) StoreData(opts *bind.TransactOpts, key string, value string) (*types.Transaction, error) { + return _Datastorage.contract.Transact(opts, "storeData", key, value) +} + +// StoreData is a paid mutator transaction binding the contract method 0x4ece5b4c. +// +// Solidity: function storeData(string key, string value) returns() +func (_Datastorage *DatastorageSession) StoreData(key string, value string) (*types.Transaction, error) { + return _Datastorage.Contract.StoreData(&_Datastorage.TransactOpts, key, value) +} + +// StoreData is a paid mutator transaction binding the contract method 0x4ece5b4c. +// +// Solidity: function storeData(string key, string value) returns() +func (_Datastorage *DatastorageTransactorSession) StoreData(key string, value string) (*types.Transaction, error) { + return _Datastorage.Contract.StoreData(&_Datastorage.TransactOpts, key, value) +} + +// StoreUserData is a paid mutator transaction binding the contract method 0x98458c5d. +// +// Solidity: function storeUserData((string,string) userData) returns() +func (_Datastorage *DatastorageTransactor) StoreUserData(opts *bind.TransactOpts, userData DataStorageUserData) (*types.Transaction, error) { + return _Datastorage.contract.Transact(opts, "storeUserData", userData) +} + +// StoreUserData is a paid mutator transaction binding the contract method 0x98458c5d. +// +// Solidity: function storeUserData((string,string) userData) returns() +func (_Datastorage *DatastorageSession) StoreUserData(userData DataStorageUserData) (*types.Transaction, error) { + return _Datastorage.Contract.StoreUserData(&_Datastorage.TransactOpts, userData) +} + +// StoreUserData is a paid mutator transaction binding the contract method 0x98458c5d. +// +// Solidity: function storeUserData((string,string) userData) returns() +func (_Datastorage *DatastorageTransactorSession) StoreUserData(userData DataStorageUserData) (*types.Transaction, error) { + return _Datastorage.Contract.StoreUserData(&_Datastorage.TransactOpts, userData) +} + +// DatastorageAccessLoggedIterator is returned from FilterAccessLogged and is used to iterate over the raw logs and unpacked data for AccessLogged events raised by the Datastorage contract. +type DatastorageAccessLoggedIterator struct { + Event *DatastorageAccessLogged // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *DatastorageAccessLoggedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(DatastorageAccessLogged) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(DatastorageAccessLogged) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *DatastorageAccessLoggedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *DatastorageAccessLoggedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// DatastorageAccessLogged represents a AccessLogged event raised by the Datastorage contract. +type DatastorageAccessLogged struct { + Caller common.Address + Message string + Raw types.Log // Blockchain specific contextual infos +} + +// FilterAccessLogged is a free log retrieval operation binding the contract event 0xe2ab1536af9681ad9e5927bca61830526c4cd932e970162eef77328af1fdcfb5. +// +// Solidity: event AccessLogged(address indexed caller, string message) +func (_Datastorage *DatastorageFilterer) FilterAccessLogged(opts *bind.FilterOpts, caller []common.Address) (*DatastorageAccessLoggedIterator, error) { + + var callerRule []interface{} + for _, callerItem := range caller { + callerRule = append(callerRule, callerItem) + } + + logs, sub, err := _Datastorage.contract.FilterLogs(opts, "AccessLogged", callerRule) + if err != nil { + return nil, err + } + return &DatastorageAccessLoggedIterator{contract: _Datastorage.contract, event: "AccessLogged", logs: logs, sub: sub}, nil +} + +// WatchAccessLogged is a free log subscription operation binding the contract event 0xe2ab1536af9681ad9e5927bca61830526c4cd932e970162eef77328af1fdcfb5. +// +// Solidity: event AccessLogged(address indexed caller, string message) +func (_Datastorage *DatastorageFilterer) WatchAccessLogged(opts *bind.WatchOpts, sink chan<- *DatastorageAccessLogged, caller []common.Address) (event.Subscription, error) { + + var callerRule []interface{} + for _, callerItem := range caller { + callerRule = append(callerRule, callerItem) + } + + logs, sub, err := _Datastorage.contract.WatchLogs(opts, "AccessLogged", callerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(DatastorageAccessLogged) + if err := _Datastorage.contract.UnpackLog(event, "AccessLogged", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseAccessLogged is a log parse operation binding the contract event 0xe2ab1536af9681ad9e5927bca61830526c4cd932e970162eef77328af1fdcfb5. +// +// Solidity: event AccessLogged(address indexed caller, string message) +func (_Datastorage *DatastorageFilterer) ParseAccessLogged(log types.Log) (*DatastorageAccessLogged, error) { + event := new(DatastorageAccessLogged) + if err := _Datastorage.contract.UnpackLog(event, "AccessLogged", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// DatastorageDataStoredIterator is returned from FilterDataStored and is used to iterate over the raw logs and unpacked data for DataStored events raised by the Datastorage contract. +type DatastorageDataStoredIterator struct { + Event *DatastorageDataStored // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *DatastorageDataStoredIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(DatastorageDataStored) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(DatastorageDataStored) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *DatastorageDataStoredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *DatastorageDataStoredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// DatastorageDataStored represents a DataStored event raised by the Datastorage contract. +type DatastorageDataStored struct { + Sender common.Address + Key string + Value string + Raw types.Log // Blockchain specific contextual infos +} + +// FilterDataStored is a free log retrieval operation binding the contract event 0xc95c7d5d3ac582f659cd004afbea77723e1315567b6557f3c059e8eb9586518f. +// +// Solidity: event DataStored(address indexed sender, string key, string value) +func (_Datastorage *DatastorageFilterer) FilterDataStored(opts *bind.FilterOpts, sender []common.Address) (*DatastorageDataStoredIterator, error) { + + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _Datastorage.contract.FilterLogs(opts, "DataStored", senderRule) + if err != nil { + return nil, err + } + return &DatastorageDataStoredIterator{contract: _Datastorage.contract, event: "DataStored", logs: logs, sub: sub}, nil +} + +// WatchDataStored is a free log subscription operation binding the contract event 0xc95c7d5d3ac582f659cd004afbea77723e1315567b6557f3c059e8eb9586518f. +// +// Solidity: event DataStored(address indexed sender, string key, string value) +func (_Datastorage *DatastorageFilterer) WatchDataStored(opts *bind.WatchOpts, sink chan<- *DatastorageDataStored, sender []common.Address) (event.Subscription, error) { + + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _Datastorage.contract.WatchLogs(opts, "DataStored", senderRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(DatastorageDataStored) + if err := _Datastorage.contract.UnpackLog(event, "DataStored", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseDataStored is a log parse operation binding the contract event 0xc95c7d5d3ac582f659cd004afbea77723e1315567b6557f3c059e8eb9586518f. +// +// Solidity: event DataStored(address indexed sender, string key, string value) +func (_Datastorage *DatastorageFilterer) ParseDataStored(log types.Log) (*DatastorageDataStored, error) { + event := new(DatastorageDataStored) + if err := _Datastorage.contract.UnpackLog(event, "DataStored", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/pkg/capabilities/bindings/evm_bindings.go b/pkg/capabilities/bindings/evm_bindings.go new file mode 100644 index 0000000000..70e4be2f4b --- /dev/null +++ b/pkg/capabilities/bindings/evm_bindings.go @@ -0,0 +1,357 @@ +package bindings + +import ( + "errors" + "fmt" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" + evmcappb "github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/chain-capabilities/evm" + evmpb "github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/chain-capabilities/evm/chain-service" + "github.com/smartcontractkit/chainlink-common/pkg/chains/evm" + "github.com/smartcontractkit/chainlink-common/pkg/values/pb" + "github.com/smartcontractkit/chainlink-common/pkg/workflows/sdk/v2" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// DatastorageMetaData contains all meta data concerning the Datastorage contract. +var DataStorageMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"requester\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"key\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"reason\",\"type\":\"string\"}],\"name\":\"DataNotFound\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"message\",\"type\":\"string\"}],\"name\":\"AccessLogged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"key\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"value\",\"type\":\"string\"}],\"name\":\"DataStored\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"message\",\"type\":\"string\"}],\"name\":\"logAccess\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"key\",\"type\":\"string\"}],\"name\":\"readData\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"key\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"value\",\"type\":\"string\"}],\"name\":\"storeData\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", +} + +// DatastorageABI is the input ABI used to generate the binding from. +// Deprecated: Use DatastorageMetaData.ABI instead. +var DataStorageABI = DatastorageMetaData.ABI + +var contractABI *abi.ABI + +// Datastorage is an auto generated Go binding around an Ethereum contract. +type DataStorage struct { + Address []byte + Options *ContractInitOptions + ABI *abi.ABI + evmClient evmcappb.Client + codec DataStorageCodec +} + +type FilterLogTriggerDataStore struct { + //TODO check if this should be specific values for DataStore indexed fields. If not this can go to common. + Topic1 []byte + Topic2 []byte + Topic3 []byte + Confidence evmcappb.ConfidenceLevel + BlockDepth uint64 +} + +func (ds DataStorage) LogTrigger(runtime sdk.DonRuntime, LogTriggerInput *LogTriggerInput) sdk.DonTrigger[*evmpb.FilterLogsReply] { +} + +func (ds *DataStorage) LogTriggerDataStoredLog(filterLogTrigger *FilterLogTriggerDataStore) sdk.DonTrigger[*ParsedLog[DataStored]] { + //TODO properly use input for filters + ds.evmClient.LogTrigger(&evmcappb.FilterLogTriggerRequest{ + Addresses: [][]byte{ds.Address}, + Topics0: [][]byte{ds.codec.DataStoreLogHash()}, + Confidence: evmcappb.ConfidenceLevel_FINALIZED, + }) + + panic("unimplemented") +} + +func (ds *DataStorage) DataStoredLogHash() []byte { + panic("unimplemented") +} + +func (ds *DataStorage) DecodeDataStoredLog(abi []byte) (DataStored, any) { + panic("unimplemented") +} + +func (ds *DataStorage) EncodeUserDataStruct(userData UserData) ([]byte, error) { + panic("unimplemented") +} + +func (ds *DataStorage) FilterLogsDataStoredLog(runtime sdk.DonRuntime, options *FilterOptions) ([]ParsedLog[DataStored], any) { + if options == nil { + options = &FilterOptions{ + ToBlock: "finalized", //TODO we need a enum / constant + } + } + filterLogsReplyPromise := ds.evmClient.FilterLogs(runtime, &evm.FilterLogsRequest{ + FilterQuery: &evm.FilterQuery{ + Addresses: [][]byte{ds.Address}, + Topics: [][]byte{ds.codec.DataStoreLogHash()}, + BlockHash: options.BlockHash, + FromBlock: toPbBigInt(options.FromBlock), + ToBlock: toPbBigInt(options.ToBlock), + }, + }) + _, err := filterLogsReplyPromise.Await() + if err != nil { + return nil, err + } + //TODO convert []Log into []EnhancedLog + return []ParsedLog[DataStored]{}, nil +} + +// Default behaviour could be to get all known logs until the latest one and next called would retrieve from the last head read + 1 until the new head but this means storing internal state in the workflow +func (rda *DataStorage) QueryTrackedLogsDataStoredLog(runtime sdk.DonRuntime, options *QueryTrackedLogsOptions) ([]ParsedLog[DataStored], any) { + rda.evmClient.QueryTrackedLogs(runtime, &evm.QueryTrackedLogsRequest{ + Expression: []*evm.Expression{ + //TODO add proper expression + &evm.Expression{Evaluator: &evm.Expression_BooleanExpression{&evm.BooleanExpression{ + Expression: []*evm.Expression{}, + }}}, + }, + }) + //TODO transform []Log to DataStorageLog + return []ParsedLog[DataStored]{}, nil +} + +func (rda *DataStorage) RegisterLogTrackingDataStoredLog(runtime sdk.DonRuntime, options *LogTrackingOptions) { + //TODO use log tracking options if set + rda.evmClient.RegisterLogTracking(runtime, &evm.RegisterLogTrackingRequest{ + Filter: &evm.LPFilter{ + Name: "DataStored-" + common.Bytes2Hex(rda.Address), + Addresses: [][]byte{rda.Address}, + EventSigs: [][]byte{rda.codec.DataStoreLogHash()}, + }, + }) + +} + +func (rda *DataStorage) UnregisterLogTrackingDataStoredLog(runtime sdk.DonRuntime) { + rda.evmClient.UnregisterLogTracking(runtime, &evm.UnregisterLogTrackingRequest{ + FilterName: "DataStored-" + common.Bytes2Hex(rda.Address), + }) +} + +type Logs struct { + DataStored +} + +func NewDataStorageCodec() (DataStorageCodec, error) { + abi, err := getAbi() + if err != nil { + return nil, err + } + return dataStorageCodec{ + abi: abi, + }, nil +} + +type DataStorageCodec interface { + EncodeUserDataStruct(userData UserData) ([]byte, error) + EncodeReadDataMethodCall(readData ReadDataInput) ([]byte, error) + EncodeReadDataMethodInputs(readData ReadDataInput) ([]byte, error) + DecodeReadDataMethodOutput(data []byte) (string, error) + DataStoreLogHash() []byte +} + +type dataStorageCodec struct { + abi *abi.ABI +} + +// DataStoreLogHash implements DataStorageCodec. +func (d dataStorageCodec) DataStoreLogHash() []byte { + panic("unimplemented") +} + +// decodeReadDataMethodOutput implements DataStorageCodec. +func (d dataStorageCodec) DecodeReadDataMethodOutput(data []byte) (string, error) { + returnValue, err := d.abi.Methods["readData"].Outputs.Unpack(data) + if err != nil { + return "", err + } + castedReturnValue := returnValue[0].(string) + return castedReturnValue, nil +} + +// encodeReadDataMethodCall implements DataStorageCodec. +func (d dataStorageCodec) EncodeReadDataMethodCall(readDataInput ReadDataInput) ([]byte, error) { + return d.abi.Pack("readData", readDataInput) +} + +func (d dataStorageCodec) EncodeReadDataMethodInputs(readDataInput ReadDataInput) ([]byte, error) { + return d.abi.Pack("readData", readDataInput.User, readDataInput.Key) +} + +// encodeUserDataStruct implements DataStorageCodec. +func (d dataStorageCodec) EncodeUserDataStruct(UserData UserData) ([]byte, error) { + panic("unimplemented") +} + +func getAbi() (*abi.ABI, error) { + if contractABI != nil { + return contractABI, nil + } + tempABI, err := abi.JSON(strings.NewReader(DataStorageABI)) + if err != nil { + return nil, err + } + contractABI = &tempABI + return contractABI, nil +} + +// NewDatastorage creates a new instance of Datastorage, bound to a specific deployed contract. +func NewDataStorage(contractInitOptions ContractInputs) (*DataStorage, error) { + abi, err := getAbi() + codec, err := NewDataStorageCodec() + if err != nil { + return nil, err + } + dataStorage := &DataStorage{ + Address: contractInitOptions.Address, + Options: contractInitOptions.Options, + ABI: abi, + codec: codec, + } + return dataStorage, nil +} + +type ReadDataInput struct { + User []byte + Key string +} + +type DataNotFoundError struct { + Requested evmpb.Address + Key string + Reason string +} + +// Implement the error interface +func (e *DataNotFoundError) Error() string { + return fmt.Sprintf("Error requested: %s, key: %s, reason :%", e.Requested, e.Key, e.Reason) +} + +func (e Errors) DecodeDataNotFoundError(data []byte) (DataNotFoundError, error) { + //TODO missing logic to unpack error + // e.dataStorage.ABI.Errors["DataNotFound"].Inputs.Unpack(data[4:]) + return DataNotFoundError{}, nil +} + +// ReadData is a free data retrieval call binding the contract method 0xf5bfa815. +// +// Solidity: function readData(address user, string key) view returns(string) +func (rda DataStorage) ReadData(runtime sdk.DonRuntime, args ReadDataInput, options *ReadOptions) (string, error) { + calldata, err := rda.codec.EncodeReadDataMethodCall(args) + if err != nil { + return "", err + } + if options == nil { + options = &ReadOptions{ + BlockNumber: nil, + } + } + + callReplyPromise := rda.evmClient.CallContract(runtime, &evm.CallContractRequest{ + Call: &evm.CallMsg{ + To: rda.Address, + Data: calldata, + }, + BlockNumber: toPbBigInt(options.BlockNumber), + }) + reply, err := callReplyPromise.Await() + if err != nil { + return "", err + } + return rda.codec.DecodeReadDataMethodOutput(reply.Data) +} + +func (ds *DataStorage) WriteReportUserData(runtime sdk.DonRuntime, userDataStruct UserData, options *WriteOptions) (*evmpb.Hash, error) { + reportEncoded, _ := ds.codec.EncodeUserDataStruct(userDataStruct) + commonReport := GenerateReport(getChainID(ds.evmClient), reportEncoded) + var writeReportReplyPromise = ds.evmClient.WriteReport(runtime, &evm.WriteReportRequest{ + Receiver: ds.Address, + Report: &evm.SignedReport{ + RawReport: commonReport.ReportContext, + ReportContext: commonReport.RawReport, + Signatures: commonReport.Signatures, + Id: commonReport.ID, + }, + GasConfig: ds.Options.GasConfig, + }) + + writeReportReply, err := writeReportReplyPromise.Await() + if err != nil { + return nil, err + } + if writeReportReply.TxStatus == evm.TransactionStatus_TX_FAILURE { + return nil, &TxFatalError{ + //TODO add error message for when Transaction is FATAL + // Message: writeReportReply.Message, + Message: "Fatal tx execution", + } + } + for { + txByHashPromise := ds.evmClient.GetTransactionByHash(runtime, &evm.GetTransactionByHashRequest{ + Hash: writeReportReply.TxHash, + }) + getTxResult, err := txByHashPromise.Await() + if err != nil { + return nil, err + } + //TODO we need more logic to call eth_call for simulate TX with same data to get the error and return an error from the smart contract + //TODO we need to add info about finalization for easy of use + if getTxResult.Transaction.IsFinalized { + if writeReportReply.ReceiverContractExecutionStatus == evm.ReceiverContractExecutionStatus_FAILURE { + return nil, &ReceiverContractError{ + Message: "Transaction finalized but receiver smart contract failed to execute", + TxHash: writeReportReply.TxHash, + } + } + return writeReportReply.TxHash, nil + } + } +} + +func (userData UserData) Encode(userDataStruct UserData) ([]byte, error) { + //TODO add code to generate struct + encoded := []byte{} + return encoded, nil +} + +type DataStored struct { + Sender []byte + Key string + Value string +} + +type UserData struct { + Key string + Value string +} + +type LogTriggerInput struct { + Topic1 []byte + Topic2 []byte + Topic3 []byte + Confidence evmcappb.ConfidenceLevel + BlockDepth uint64 +} + +func toPbBigInt(int *big.Int) *pb.BigInt { + panic("unimplemented") +} + +func getChainID(evm evm.EVMClient) uint32 { + //Return the chain selector + panic("unimplemented") +} diff --git a/pkg/capabilities/bindings/sourcecre.go.tpl b/pkg/capabilities/bindings/sourcecre.go.tpl new file mode 100644 index 0000000000..ce12cdf9f3 --- /dev/null +++ b/pkg/capabilities/bindings/sourcecre.go.tpl @@ -0,0 +1,403 @@ +// Code generated — DO NOT EDIT. + +package {{.Package}} + +import ( + "bytes" + "errors" + "fmt" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" + "github.com/smartcontractkit/chainlink-common/pkg/capabilities/bindings" + evmcappb "github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/chain-capabilities/evm" + "github.com/smartcontractkit/chainlink-common/pkg/chains/evm" + "github.com/smartcontractkit/chainlink-common/pkg/values/pb" + "github.com/smartcontractkit/chainlink-common/pkg/workflows/sdk/v2" +) + +var ( + _ = bytes.Equal + _ = errors.New + _ = fmt.Sprintf + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +{{range $contract := .Contracts}} + +var {{$contract.Type}}MetaData = &bind.MetaData{ + ABI: "{{.InputABI}}", + {{- if .InputBin}} + Bin: "0x{{.InputBin}}", + {{- end}} +} + +type {{$contract.Type}}Codec interface { + {{- range $call := $contract.Calls}} + {{- if or $call.Original.Constant (eq $call.Original.StateMutability "view")}} + Encode{{$call.Normalized.Name}}MethodCall(in {{$call.Normalized.Name}}Input) ([]byte, error) + Decode{{$call.Normalized.Name}}MethodOutput(data []byte) ({{with index $call.Normalized.Outputs 0}}{{bindtype .Type $.Structs}}{{end}}, error) + {{- end}} + {{- end}} + + {{- range $.Structs}} + Encode{{.Name}}Struct(in {{.Name}}Input) ([]byte, error) + {{- end}} + + {{- range $event := .Events}} + {{.Normalized.Name}}LogHash() []byte + Decode{{.Normalized.Name}}(log *evm.Log) (*{{.Normalized.Name}}, error) + {{- end}} +} + +type {{decapitalise $contract.Type}}CodecImpl struct { + abi *abi.ABI +} + +func New{{$contract.Type}}Codec() ({{$contract.Type}}Codec, error) { + parsed, err := abi.JSON(strings.NewReader({{$contract.Type}}MetaData.ABI)) + if err != nil { + return nil, err + } + return &{{decapitalise $contract.Type}}CodecImpl{abi: &parsed}, nil +} + +{{range $call := $contract.Calls}} +{{- if or $call.Original.Constant (eq $call.Original.StateMutability "view")}} +func (c *{{decapitalise $contract.Type}}CodecImpl) Encode{{$call.Normalized.Name}}MethodCall(in {{$call.Normalized.Name}}Input) ([]byte, error) { + return c.abi.Pack("{{$call.Original.Name}}"{{range .Normalized.Inputs}}, in.{{capitalise .Name}}{{end}}) +} +func (c *{{decapitalise $contract.Type}}CodecImpl) Decode{{$call.Normalized.Name}}MethodOutput(data []byte) ({{with index $call.Normalized.Outputs 0}}{{bindtype .Type $.Structs}}{{end}}, error) { + vals, err := c.abi.Methods["{{$call.Original.Name}}"].Outputs.Unpack(data) + if err != nil { + return {{with index $call.Normalized.Outputs 0}}*new({{bindtype .Type $.Structs}}){{end}}, err + } + return vals[0].({{bindtype (index $call.Normalized.Outputs 0).Type $.Structs}}), nil +} +{{- end}} +{{end}} + +{{range $.Structs}} +func (c *{{decapitalise $contract.Type}}CodecImpl) Encode{{.Name}}Struct(in {{.Name}}Input) ([]byte, error) { + return c.abi.Pack("{{decapitalise .Name}}", in) +} +{{end}} + +{{range $event := $contract.Events}} +func (c *{{decapitalise $contract.Type}}CodecImpl) {{.Normalized.Name}}LogHash() []byte { + return c.abi.Events["{{.Original.Name}}"].ID.Bytes() +} + +// Decode{{.Normalized.Name}} decodes a log into a {{.Normalized.Name}} struct. +func (c *{{decapitalise $contract.Type}}CodecImpl) Decode{{.Normalized.Name}}(log *evm.Log) (*{{.Normalized.Name}}, error) { + event := new({{.Normalized.Name}}) + if err := c.abi.UnpackIntoInterface(event, "{{.Original.Name}}", log.Data); err != nil { + return nil, err + } + var indexed abi.Arguments + for _, arg := range c.abi.Events["{{.Original.Name}}"].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + // Convert [][]byte → []common.Hash + topics := make([]common.Hash, len(log.Topics)) + for i, t := range log.Topics { + topics[i] = common.BytesToHash(t) + } + + if err := abi.ParseTopics(event, indexed, topics[1:]); err != nil { + return nil, err + } + return event, nil +} +{{end}} + +type {{$contract.Type}} struct { + Address []byte + Options *bindings.ContractInitOptions + ABI *abi.ABI + evmClient evmcappb.Client + codec {{$contract.Type}}Codec +} + +func New{{$contract.Type}}( + client evmcappb.Client, + address []byte, + options *bindings.ContractInitOptions, +) (*{{$contract.Type}}, error) { + parsed, err := abi.JSON(strings.NewReader({{$contract.Type}}MetaData.ABI)) + if err != nil { + return nil, err + } + codec, err := New{{$contract.Type}}Codec() + if err != nil { + return nil, err + } + return &{{$contract.Type}}{ + Address: address, + Options: options, + ABI: &parsed, + evmClient: client, + codec: codec, + }, nil +} + +{{range $call := $contract.Calls}} +{{- if or $call.Original.Constant (eq $call.Original.StateMutability "view")}} + +type {{$call.Normalized.Name}}Input struct { + {{- range $param := $call.Normalized.Inputs}} + {{capitalise $param.Name}} {{bindtype .Type $.Structs}} + {{- end}} +} + +func (c {{$contract.Type}}) {{$call.Normalized.Name}}( + runtime sdk.DonRuntime, + args {{$call.Normalized.Name}}Input, + options *bindings.ReadOptions, +) ({{with index $call.Normalized.Outputs 0}}{{bindtype .Type $.Structs}}{{end}}, error) { + calldata, err := c.codec.Encode{{$call.Normalized.Name}}MethodCall(args) + if err != nil { + return {{with index $call.Normalized.Outputs 0}}*new({{bindtype .Type $.Structs}}){{end}}, err + } + if options == nil { + options = &bindings.ReadOptions{BlockNumber: nil} + } + promise := c.evmClient.CallContract(runtime, &evm.CallContractRequest{ + Call: &evm.CallMsg{To: c.Address, Data: calldata}, + BlockNumber: toPbBigInt(options.BlockNumber), + }) + reply, err := promise.Await() + if err != nil { + return {{with index $call.Normalized.Outputs 0}}*new({{bindtype .Type $.Structs}}){{end}}, err + } + return c.codec.Decode{{$call.Normalized.Name}}MethodOutput(reply.Data) +} +{{- end}} +{{end}} + +{{range $.Structs}} + +type {{.Name}}Input struct { + {{- range .Fields}} + {{capitalise .Name}} {{.Type}} + {{- end}} +} + +func (c {{$contract.Type}}) WriteReport{{.Name}}( + runtime sdk.DonRuntime, + input {{.Name}}Input, + options *bindings.WriteOptions, +) (*big.Int, error) { + encoded, err := c.codec.Encode{{.Name}}Struct(input) + if err != nil { + return nil, err + } + report := bindings.GenerateReport(getChainID(c.evmClient), encoded) + writeReportReplyPromise := c.evmClient.WriteReport(runtime, &evm.WriteReportRequest{ + Receiver: c.Address, + Report: &evm.SignedReport{ + RawReport: report.RawReport, + ReportContext: report.ReportContext, + Signatures: report.Signatures, + Id: report.ID, + }, + GasConfig: options.GasConfig, + }) + reply, err := writeReportReplyPromise.Await() + if err != nil { + return nil, err + } + if reply.TxStatus == evm.TransactionStatus_TX_FAILURE { + return nil, &bindings.TxFatalError{ + Message: "Fatal tx execution", + } + } + for { + txByHashPromise := c.evmClient.GetTransactionByHash(runtime, &evm.GetTransactionByHashRequest{ + Hash: reply.TxHash, + }) + getTxResult, err := txByHashPromise.Await() + if err != nil { + return nil, err + } + if getTxResult.Transaction.IsFinalized { + if reply.ReceiverContractExecutionStatus == evm.ReceiverContractExecutionStatus_FAILURE { + return nil, &bindings.ReceiverContractError{ + Message: "Transaction finalized but receiver contract failed to execute", + TxHash: reply.TxHash, + } + } + return reply.TxHash, nil + } + } +} +{{end}} + +{{range $error := $contract.Errors}} + +// {{.Normalized.Name}} represents the {{.Original.Name}} error raised by the {{$contract.Type}} contract. +type {{.Normalized.Name}} struct { + {{- range .Normalized.Inputs}} + {{capitalise .Name}} {{bindtype .Type $.Structs}} + {{- end}} +} + +// TODO: possibly clean this up +// Decode{{.Normalized.Name}}Error decodes a {{.Original.Name}} error from revert data. +func (c *{{$contract.Type}}) Decode{{.Normalized.Name}}Error(data []byte) (*{{.Normalized.Name}}, error) { + args := c.ABI.Errors["{{.Original.Name}}"].Inputs + values, err := args.Unpack(data[4:]) + if err != nil { + return nil, fmt.Errorf("failed to unpack error: %w", err) + } + if len(values) != {{len .Normalized.Inputs}} { + return nil, fmt.Errorf("expected {{len .Normalized.Inputs}} values, got %%d", len(values)) + } + + {{$err := .}} {{/* capture outer context */}} + + {{range $i, $param := $err.Normalized.Inputs}} + {{$param.Name}}, ok{{$i}} := values[{{$i}}].({{bindtype $param.Type $.Structs}}) + if !ok{{$i}} { + return nil, fmt.Errorf("unexpected type for {{$param.Name}} in {{$err.Normalized.Name}} error") + } + {{end}} + + return &{{$err.Normalized.Name}}{ + {{- range $i, $param := $err.Normalized.Inputs}} + {{capitalise $param.Name}}: {{$param.Name}}, + {{- end}} + }, nil +} + + +func (c *{{$contract.Type}}) UnpackError(data []byte) (any, error) { + switch common.Bytes2Hex(data[:4]) { + {{range $error := $contract.Errors}} + case common.Bytes2Hex(c.ABI.Errors["{{$error.Original.Name}}"].ID.Bytes()): + return c.Decode{{$error.Normalized.Name}}Error(data) + {{end}} + default: + return nil, errors.New("unknown error selector") + } +} + +// Error implements the error interface for {{.Normalized.Name}}. +func (e *{{.Normalized.Name}}) Error() string { + return fmt.Sprintf("{{.Normalized.Name}} error:{{range .Normalized.Inputs}} {{.Name}}=%%v;{{end}}"{{range .Normalized.Inputs}}, e.{{capitalise .Name}}{{end}}) +} + +{{end}} + + +{{range $event := $contract.Events}} + +// {{.Normalized.Name}} represents a {{.Original.Name}} event raised by the {{$contract.Type}} contract. +type {{.Normalized.Name}} struct { + {{- range .Normalized.Inputs}} + {{capitalise .Name}} {{if .Indexed}}{{bindtopictype .Type $.Structs}}{{else}}{{bindtype .Type $.Structs}}{{end}} + {{- end}} +} + +func (c *{{$contract.Type}}) RegisterLogTracking{{.Normalized.Name}}(runtime sdk.DonRuntime, options *bindings.LogTrackingOptions) { + //TODO use log tracking options if set + c.evmClient.RegisterLogTracking(runtime, &evm.RegisterLogTrackingRequest{ + Filter: &evm.LPFilter{ + Name: "{{.Normalized.Name}}-" + common.Bytes2Hex(c.Address), + Addresses: [][]byte{c.Address}, + EventSigs: [][]byte{c.codec.{{.Normalized.Name}}LogHash()}, + }, + }) +} + +func (c *{{$contract.Type}}) UnregisterLogTracking{{.Normalized.Name}}(runtime sdk.DonRuntime) { + c.evmClient.UnregisterLogTracking(runtime, &evm.UnregisterLogTrackingRequest{ + FilterName: "{{.Normalized.Name}}-" + common.Bytes2Hex(c.Address), + }) +} + +func (c *{{$contract.Type}}) QueryTrackedLogs{{.Normalized.Name}}(runtime sdk.DonRuntime, options *bindings.QueryTrackedLogsOptions) ([]bindings.ParsedLog[{{.Normalized.Name}}], any) { + promise := c.evmClient.QueryTrackedLogs(runtime, &evm.QueryTrackedLogsRequest{ + Expression: []*evm.Expression{ + //TODO add proper expression + &evm.Expression{Evaluator: &evm.Expression_BooleanExpression{&evm.BooleanExpression{ + Expression: []*evm.Expression{}, + }}}, + }, + }) + reply, err := promise.Await() + if err != nil { + return nil, fmt.Errorf("failed to query tracked logs: %w", err) + } + logs := reply.Logs + parsedLogs := make([]bindings.ParsedLog[{{.Normalized.Name}}], len(logs)) + for i, log := range logs { + decodedLog, err := c.codec.Decode{{.Normalized.Name}}(log) + if err != nil { + return nil, fmt.Errorf("failed to decode {{.Normalized.Name}} log: %w", err) + } + parsedLogs[i] = bindings.ParsedLog[{{.Normalized.Name}}]{ + LogData: *decodedLog, + RawLog: log, + } + } + + return parsedLogs, nil +} + +func (c *{{$contract.Type}}) FilterLogs{{.Normalized.Name}}(runtime sdk.DonRuntime, options *bindings.FilterOptions) ([]bindings.ParsedLog[{{.Normalized.Name}}], error) { + if options == nil { + options = &bindings.FilterOptions{ + ToBlock: "finalized", //TODO we need a enum / constant + } + } + filterLogsReplyPromise := c.evmClient.FilterLogs(runtime, &evm.FilterLogsRequest{ + FilterQuery: &evm.FilterQuery{ + Addresses: [][]byte{c.Address}, + Topics: []*evm.Topics{ + {Topic:[][]byte{c.codec.{{.Normalized.Name}}LogHash()}}, + }, BlockHash: options.BlockHash, + FromBlock: toPbBigInt(options.FromBlock), + ToBlock: toPbBigInt(options.ToBlock), + }, + }) + reply, err := filterLogsReplyPromise.Await() + if err != nil { + return nil, err + } + logs := reply.Logs + parsedLogs := make([]bindings.ParsedLog[{{.Normalized.Name}}], len(logs)) + for i, log := range logs { + decodedLog, err := c.codec.Decode{{.Normalized.Name}}(log) + if err != nil { + return nil, fmt.Errorf("failed to decode {{.Normalized.Name}} log: %w", err) + } + parsedLogs[i] = bindings.ParsedLog[{{.Normalized.Name}}]{ + LogData: *decodedLog, + RawLog: log, + } + } + + return parsedLogs, nil +} +{{end}} + +{{end}} + +func toPbBigInt(i *big.Int) *pb.BigInt { panic("unimplemented") } +func getChainID(e evmcappb.Client) uint32 { panic("unimplemented") } diff --git a/pkg/capabilities/bindingsclient/bindings_client.go b/pkg/capabilities/bindingsclient/bindings_client.go new file mode 100644 index 0000000000..fffe3e7943 --- /dev/null +++ b/pkg/capabilities/bindingsclient/bindings_client.go @@ -0,0 +1,288 @@ +package bindings_client + +import ( + "context" + "fmt" + "math/big" + + "github.com/smartcontractkit/chainlink-common/pkg/capabilities/bindings" + evmcappb "github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/chain-capabilities/evm/capability" + evmpb "github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/chain-capabilities/evm/chain-service" + chaincommonpb "github.com/smartcontractkit/chainlink-common/pkg/loop/chain-common" + "github.com/smartcontractkit/chainlink-common/pkg/workflows/sdk/v2" +) + +func simpleUX(runtime sdk.DonRuntime, runner sdk.DonRunner) { + //TODO: https://smartcontract-it.atlassian.net/browse/ARCH-274 Not as part of the DD but we need to define a common SDK for chains and define it’s shape to represent chain selectors / chain families. + const targetChainID = 100 + + //TODO: We need to support to specify the ChainID/ChainSelector. + //By allowing contract clients to be created using an EVM instance we can share init configuration for the client across all contracts. + EVM := evmcappb.EVM{ /* ChainID: targetChainIDd*/ } + + dataStorage, _ := bindings.NewDataStorage(bindings.ContractInputs{ + EVM: EVM, + Address: evmpb.Address{ + Address: []byte("some address"), + }, + Options: &bindings.ContractInitOptions{ //Optional configuration - We need to set a gas limit to use a WriteReport op. + GasConfig: &evmpb.GasConfig{ + GasLimit: 100000000, + }, + }, + }) + + // Encode input to use directly with EVM capability + readDataArgs := bindings.ReadDataInput{ + User: evmpb.Address{Address: []byte("another address")}, + Key: "some string", + } + + // #1 - Execute read operation over DataStorage.readData(..) + dataRead, _ := dataStorage.ReadData(runtime, readDataArgs, nil) + println("We can directly access the read data " + dataRead) + + userData := bindings.UserData{ + Key: "key", + Value: "value", + } + + // #2 - WriteReport targeting DataStorage IReceiver interface passing a UserDataStruct instance as data + txHash, err := dataStorage.WriteReportUserData(runtime, userData, nil) + if err != nil { + //Error handling scenarios for WriteReport - In case the transaction failed to make it on chain or if the receiver smart contract failed to execute + switch e := err.(type) { + case *bindings.ReceiverContractError: + fmt.Println("TX was successful but receiver contract failed to execute. Tx Hash", e.TxHash) + case *bindings.TxFatalError: + //TODO we are missing a meaningful error message + fmt.Println("TX couldn't be written to the chain at all.") + // #3 - Support custom errors from receiver smart contract + case *bindings.DataNotFoundError: + //TODO this seems possible if we change keystone_forwarder to capture the error from the receiver contract and we put it in a custom event that holds the encoded data of the error and then we + //get the event. + fmt.Println("Error raised from receiver smart contract.") + default: + fmt.Println("Other error:", err) + } + } else { + //At this point the TX was successful and also the receiver smart contract execution + println("TX Hash: " + txHash.String()) + } + + // #4 - Support for logs + // Register tracking of logs DataStored event in DataStorage contract + dataStorage.RegisterLogTrackingDataStoredLog(runtime, nil) + //Unregister tracking of logs DataStored event in DataStorage contract + dataStorage.UnregisterLogTrackingDataStoredLog(runtime) + //Fetch tracked logs generated by DataStored event in DataStorage contract - Get next 10 + var logs []bindings.ParsedLog[bindings.DataStored] + logs, _ = dataStorage.QueryTrackedLogsDataStoredLog(runtime, nil) + println("Logs data are already parsed: key: " + logs[0].LogData.Key + " , value: " + logs[0].LogData.Value + ", but you also have access to the raw log: " + logs[0].RawLog.BlockHash.String()) + //Direct access to fetch logs API + logs, _ = dataStorage.FilterLogsDataStoredLog(runtime, &bindings.FilterOptions{ + FromBlock: big.NewInt(10), + ToBlock: big.NewInt(20), + }) + // Data types between FilterLogs and QueryTrackedLogs are the same. + println("Logs data are already parsed: key: " + logs[0].LogData.Key + " , value: " + logs[0].LogData.Value + ", but you also have access to the raw log: " + logs[0].RawLog.BlockHash.String()) + +} + +func onLogTrigger(runtime sdk.DonRuntime, trigger *evmpb.FilterLogsReply) { + return +} + +func simpleUXWithOptions(runtime sdk.DonRuntime) { + const targetChainID = 100 + + EVM := evmcappb.EVM{ /* ChainID: targetChainIDd*/ } + dataStorage, _ := bindings.NewDataStorage(bindings.ContractInputs{ + EVM: EVM, + Address: evmpb.Address{ + Address: []byte("some address"), + }, + Options: &bindings.ContractInitOptions{ //Optional configuration - We need to set a gas limit to use a WriteReport op. + GasConfig: &evmpb.GasConfig{ + GasLimit: 100000000, + }, + }, + }) + + // #1 - Execute read operation over DataStorage.readData(..) - use options to configure from which block to read. + dataRead, _ := dataStorage.ReadData(runtime, bindings.ReadDataInput{ + User: evmpb.Address{Address: []byte("another address")}, + Key: "some string", + }, &bindings.ReadOptions{ + BlockNumber: big.NewInt(10000), + }, + ) + println("We can directly access the read data " + dataRead) + + // #2 - WriteReport targeting DataStorage IReceiver interface passing a UserDataStruct instance as data - Using options to customize + // gas limit and what's the expected transaction status when getting a reply from this method + txHash, _ := dataStorage.WriteReportUserData(runtime, bindings.UserData{ + Key: "key", + Value: "value", + }, &bindings.WriteOptions{ + GasConfig: &evmpb.GasConfig{ + GasLimit: 200000000, + }, + BlockDepth: bindings.CONFIRMED, //Until confirmed - Default is finalized + }) + + //Register tracking of logs DataStored event in DataStorage contract + dataStorage.RegisterLogTrackingDataStoredLog(runtime, &bindings.LogTrackingOptions{ + MaxLogsKept: 10000, + RetentionTime: 6000, + LogsPerBlock: 10, + Topic2: []*evmpb.Hash{&evmpb.Hash{Hash: []byte("some other filter")}}, + }) + + // #4 - Support for logs + //Unregister tracking of logs for DataStored event in DataStorage contract + dataStorage.UnregisterLogTrackingDataStoredLog(runtime) + + //Fetch tracked logs generated by DataStored event in DataStorage contract - addition options for sorting and limit + //TODO: How do we get the cursor to use it in future invocations? + var logs []bindings.ParsedLog[bindings.DataStored] + logs, _ = dataStorage.QueryTrackedLogsDataStoredLog(runtime, &bindings.QueryTrackedLogsOptions{ + SortBy: []*chaincommonpb.SortBy{ + &chaincommonpb.SortBy{ + SortType: chaincommonpb.SortType_SortTimestamp, + }, + }, + Limit: &chaincommonpb.Limit{ + Count: 10, + }, + }) + println("Logs data are already parsed: key: " + logs[0].LogData.Key + " , value: " + logs[0].LogData.Value + ", but you also have access to the raw log: " + logs[0].RawLog.BlockHash.String()) + + //Direct access to fetch logs API from RPC for simple use cases that do not require to track logs - adding options for block hash instead of range + logs, _ = dataStorage.FilterLogsDataStoredLog(runtime, &bindings.FilterOptions{ + BlockHash: txHash, + }) + + // Data types between FilterLogs and QueryTrackedLogs are the same. + println("Logs data are already parsed: key: " + logs[0].LogData.Key + " , value: " + logs[0].LogData.Value + ", but you also have access to the raw log: " + logs[0].RawLog.BlockHash.String()) + +} + +func advanceUXUsingEVMCapability() { + const targetChainID = 100 + + EVM := evmcappb.EVM{ /* ChainID: targetChainIDd*/ } + dataStorage, _ := bindings.NewDataStorage(bindings.ContractInputs{ + EVM: EVM, + Address: evmpb.Address{ + Address: []byte("some address"), + }, + Options: &bindings.ContractInitOptions{}, + }) + dataStorageCodec, _ := bindings.NewDataStorageCodec() + + evmClient := evmpb.NewEVMClient(nil) + + readDataArgs := bindings.ReadDataInput{ + User: evmpb.Address{Address: []byte("another address")}, + Key: "some string", + } + + // #5 - Encode input args for DataStorage.readData(..) + //TODO do we really need this use case if we can generate calldata for the whole read operation and not just the input args? + encodedReadDataArgs, _ := dataStorageCodec.EncodeReadDataMethodInputs(readDataArgs) + print("Read data inputs encoded %s", encodedReadDataArgs) + + // Encode calldata to invoke DataStorage.readData(..) using EVM Capability. + calldata, _ := dataStorageCodec.EncodeReadDataMethodCall(readDataArgs) + callContractReply, _ := evmClient.CallContract(context.Background(), &evmpb.CallContractRequest{ + Call: &evmpb.CallMsg{ + Data: &evmpb.ABIPayload{ + Abi: calldata, + }, + To: &dataStorage.Address, + }, + }) + + // #6 - Decode output of DataStorage.readData(..) + outputAsString, _ := dataStorageCodec.DecodeReadDataMethodOutput(callContractReply.Data.Abi) + print("I can use the decoded output directly: " + outputAsString) + + userData := bindings.UserData{ + Key: "key", + Value: "value", + } + + // #7 - Encode DataStorage.UserData struct in case we want to use it for creating a report manually + encodedUserData, _ := dataStorage.EncodeUserDataStruct(userData) + commonReport := bindings.GenerateReport(targetChainID, encodedUserData) + // Manually write report using the capability and the encoded UserData + evmClient.WriteReport(context.Background(), &evmpb.WriteReportRequest{ + Receiver: &dataStorage.Address, + Report: &evmpb.SignedReport{ + RawReport: commonReport.ReportContext, + ReportContext: commonReport.ReportContext, + Signatures: commonReport.Signatures, + Id: commonReport.ID, + }, + }) + + // #8 - Get event hash to use in log capabilities + // Calling the FilterLogs capability to show how to manually decode a DataStorage.DataStored event log + filterLogsReply, _ := evmClient.FilterLogs(context.Background(), &evmpb.FilterLogsRequest{ + FilterQuery: &evmpb.FilterQuery{ + Addresses: []*evmpb.Address{&evmpb.Address{Address: dataStorage.Address.Address}}, + Topics: []*evmpb.Topics{ + &evmpb.Topics{ + Topic: []*evmpb.Hash{ + &evmpb.Hash{ Hash: dataStorage.DataStoredLogHash() }, + }, + }, + }, + }, + }) + // Decoding manually the DataStorage.DataStored event log for advance use cases + dataStoredLog, _ := dataStorage.DecodeDataStoredLog(filterLogsReply.Logs[0].Data.Abi) + println("Log data is key: " + dataStoredLog.Key + ", value: " + dataStoredLog.Value) +} + + +func InitWorkflow(wcx *sdk.WorkflowContext[*Config]) (sdk.Workflows[*Config], error) { + EVM := evmcappb.EVM{ /* ChainID: targetChainIDd*/ } + config := wcx.Config + workflows := sdk.Workflows[*Config]{ + sdk.On( + datastorage.NewIReserveManager(datastorage.ContractInputs{EVM: EVM, Address: address, Options: &datastorage.ContractOptions{}}).LogTriggerDataStoredLog(nil), + onEvmTrigger, + ), + } + return workflows, nil +} + +func onDataStored(wcx *sdk.WorkflowContext[*Config], runtime sdk.Runtime, log *bindings.ParsedLog[datastorage.DataStored]) (error) { + wcx.Logger = wcx.Logger.With("trigger", "evm").With("selector", log.ChainSelector) + + wcx.Logger = wcx.Logger.With("Sender", log.LogData.Sender) + return nil +} + +func InitWorkflowWithOptions(wcx *sdk.WorkflowContext[*Config]) (sdk.Workflows[*Config], error) { + EVM := evmcappb.EVM{ /* ChainID: targetChainIDd*/ } + config := wcx.Config + workflows := sdk.Workflows[*Config]{ + sdk.On( + datastorage.NewIReserveManager(datastorage.ContractInputs{EVM: EVM, Address: address, Options: &datastorage.ContractOptions{}}).LogTriggerDataStoredLog(&datastore.FilterLogTriggerDataStore{ + BlockDepth: bindings.CONFIRMED, + }), + onEvmTrigger, + ), + } + return workflows, nil +} + +func onDataStoredWithOptions(wcx *sdk.WorkflowContext[*Config], runtime sdk.Runtime, log *bindings.ParsedLog[datastorage.DataStored]) (error) { + wcx.Logger = wcx.Logger.With("trigger", "evm").With("selector", log.ChainSelector) + + wcx.Logger = wcx.Logger.With("Sender", log.LogData.Sender) + return nil +} diff --git a/pkg/capabilities/v2/chain-capabilities/evm/capability.pb.go b/pkg/capabilities/v2/chain-capabilities/evm/capability.pb.go index 9e9c62139c..bdcc103929 100644 --- a/pkg/capabilities/v2/chain-capabilities/evm/capability.pb.go +++ b/pkg/capabilities/v2/chain-capabilities/evm/capability.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.6 +// protoc-gen-go v1.34.2 // protoc v5.29.3 // source: capabilities/v2/chain-capabilities/evm/capability.proto @@ -13,7 +13,7 @@ import ( protoimpl "google.golang.org/protobuf/runtime/protoimpl" emptypb "google.golang.org/protobuf/types/known/emptypb" reflect "reflect" - unsafe "unsafe" + sync "sync" ) const ( @@ -23,70 +23,318 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +type ConfidenceLevel int32 + +const ( + ConfidenceLevel_EARLY ConfidenceLevel = 0 // default, blocks that have a good level of confidence defined by chain, but not guaranteed to be included in the chain + ConfidenceLevel_BLOCK_DEPTH ConfidenceLevel = 1 // blocks that are lower than the BlockDepth parameter defined by user, which is a number of blocks to wait for confirmation + ConfidenceLevel_FINALIZED ConfidenceLevel = 2 // guaranteed to be included in the chain +) + +// Enum value maps for ConfidenceLevel. +var ( + ConfidenceLevel_name = map[int32]string{ + 0: "EARLY", + 1: "BLOCK_DEPTH", + 2: "FINALIZED", + } + ConfidenceLevel_value = map[string]int32{ + "EARLY": 0, + "BLOCK_DEPTH": 1, + "FINALIZED": 2, + } +) + +func (x ConfidenceLevel) Enum() *ConfidenceLevel { + p := new(ConfidenceLevel) + *p = x + return p +} + +func (x ConfidenceLevel) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ConfidenceLevel) Descriptor() protoreflect.EnumDescriptor { + return file_capabilities_v2_chain_capabilities_evm_capability_proto_enumTypes[0].Descriptor() +} + +func (ConfidenceLevel) Type() protoreflect.EnumType { + return &file_capabilities_v2_chain_capabilities_evm_capability_proto_enumTypes[0] +} + +func (x ConfidenceLevel) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ConfidenceLevel.Descriptor instead. +func (ConfidenceLevel) EnumDescriptor() ([]byte, []int) { + return file_capabilities_v2_chain_capabilities_evm_capability_proto_rawDescGZIP(), []int{0} +} + +type FilterLogTriggerRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Addresses [][]byte `protobuf:"bytes,1,rep,name=addresses,proto3" json:"addresses,omitempty"` // contract(s) to filter logs from, at least one address is required + Topics0 [][]byte `protobuf:"bytes,2,rep,name=topics0,proto3" json:"topics0,omitempty"` // list of topics0/eventSigs to filter, at least one topic is required + Topics1 [][]byte `protobuf:"bytes,3,rep,name=topics1,proto3" json:"topics1,omitempty"` // list of topics1 to filter, optional, can be empty + Topics2 [][]byte `protobuf:"bytes,4,rep,name=topics2,proto3" json:"topics2,omitempty"` // list of topics1 to filter, optional, can be empty + Topics3 [][]byte `protobuf:"bytes,5,rep,name=topics3,proto3" json:"topics3,omitempty"` // list of topics1 to filter, optional, can be empty + Confidence ConfidenceLevel `protobuf:"varint,6,opt,name=Confidence,proto3,enum=cre.sdk.v2.evm.ConfidenceLevel" json:"Confidence,omitempty"` // optional, defaults to "EARLY" + BlockDepth uint64 `protobuf:"varint,7,opt,name=BlockDepth,proto3" json:"BlockDepth,omitempty"` // optional, defaults to particular value per chain (from a table), number of blocks to wait for confirmation +} + +func (x *FilterLogTriggerRequest) Reset() { + *x = FilterLogTriggerRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_capabilities_v2_chain_capabilities_evm_capability_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FilterLogTriggerRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FilterLogTriggerRequest) ProtoMessage() {} + +func (x *FilterLogTriggerRequest) ProtoReflect() protoreflect.Message { + mi := &file_capabilities_v2_chain_capabilities_evm_capability_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FilterLogTriggerRequest.ProtoReflect.Descriptor instead. +func (*FilterLogTriggerRequest) Descriptor() ([]byte, []int) { + return file_capabilities_v2_chain_capabilities_evm_capability_proto_rawDescGZIP(), []int{0} +} + +func (x *FilterLogTriggerRequest) GetAddresses() [][]byte { + if x != nil { + return x.Addresses + } + return nil +} + +func (x *FilterLogTriggerRequest) GetTopics0() [][]byte { + if x != nil { + return x.Topics0 + } + return nil +} + +func (x *FilterLogTriggerRequest) GetTopics1() [][]byte { + if x != nil { + return x.Topics1 + } + return nil +} + +func (x *FilterLogTriggerRequest) GetTopics2() [][]byte { + if x != nil { + return x.Topics2 + } + return nil +} + +func (x *FilterLogTriggerRequest) GetTopics3() [][]byte { + if x != nil { + return x.Topics3 + } + return nil +} + +func (x *FilterLogTriggerRequest) GetConfidence() ConfidenceLevel { + if x != nil { + return x.Confidence + } + return ConfidenceLevel_EARLY +} + +func (x *FilterLogTriggerRequest) GetBlockDepth() uint64 { + if x != nil { + return x.BlockDepth + } + return 0 +} + var File_capabilities_v2_chain_capabilities_evm_capability_proto protoreflect.FileDescriptor -const file_capabilities_v2_chain_capabilities_evm_capability_proto_rawDesc = "" + - "\n" + - "7capabilities/v2/chain-capabilities/evm/capability.proto\x12\x0ecre.sdk.v2.evm\x1a\x1bgoogle/protobuf/empty.proto\x1a0capabilities/v2/protoc/pkg/pb/cre_metadata.proto\x1a\x14chains/evm/evm.proto2\xe1\x06\n" + - "\x06Client\x12J\n" + - "\fCallContract\x12\x1d.loop.evm.CallContractRequest\x1a\x1b.loop.evm.CallContractReply\x12D\n" + - "\n" + - "FilterLogs\x12\x1b.loop.evm.FilterLogsRequest\x1a\x19.loop.evm.FilterLogsReply\x12A\n" + - "\tBalanceAt\x12\x1a.loop.evm.BalanceAtRequest\x1a\x18.loop.evm.BalanceAtReply\x12G\n" + - "\vEstimateGas\x12\x1c.loop.evm.EstimateGasRequest\x1a\x1a.loop.evm.EstimateGasReply\x12b\n" + - "\x14GetTransactionByHash\x12%.loop.evm.GetTransactionByHashRequest\x1a#.loop.evm.GetTransactionByHashReply\x12e\n" + - "\x15GetTransactionReceipt\x12&.loop.evm.GetTransactionReceiptRequest\x1a$.loop.evm.GetTransactionReceiptReply\x12W\n" + - "\x16LatestAndFinalizedHead\x12\x16.google.protobuf.Empty\x1a%.loop.evm.LatestAndFinalizedHeadReply\x12V\n" + - "\x10QueryTrackedLogs\x12!.loop.evm.QueryTrackedLogsRequest\x1a\x1f.loop.evm.QueryTrackedLogsReply\x12S\n" + - "\x13RegisterLogTracking\x12$.loop.evm.RegisterLogTrackingRequest\x1a\x16.google.protobuf.Empty\x12W\n" + - "\x15UnregisterLogTracking\x12&.loop.evm.UnregisterLogTrackingRequest\x1a\x16.google.protobuf.Empty\x1a\x0f\x82\xb5\x18\v\x12\tevm@1.0.0BhZfgithub.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/chain-capabilities/evm/capability;evmb\x06proto3" +var file_capabilities_v2_chain_capabilities_evm_capability_proto_rawDesc = []byte{ + 0x0a, 0x37, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x2f, 0x76, + 0x32, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2d, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, + 0x74, 0x69, 0x65, 0x73, 0x2f, 0x65, 0x76, 0x6d, 0x2f, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, + 0x69, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x63, 0x72, 0x65, 0x2e, 0x73, + 0x64, 0x6b, 0x2e, 0x76, 0x32, 0x2e, 0x65, 0x76, 0x6d, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x30, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, + 0x74, 0x69, 0x65, 0x73, 0x2f, 0x76, 0x32, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2f, 0x70, + 0x6b, 0x67, 0x2f, 0x70, 0x62, 0x2f, 0x63, 0x72, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x73, + 0x2f, 0x65, 0x76, 0x6d, 0x2f, 0x65, 0x76, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x80, + 0x02, 0x0a, 0x17, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x54, 0x72, 0x69, 0x67, + 0x67, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x09, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x6f, 0x70, 0x69, + 0x63, 0x73, 0x30, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x07, 0x74, 0x6f, 0x70, 0x69, 0x63, + 0x73, 0x30, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x73, 0x31, 0x18, 0x03, 0x20, + 0x03, 0x28, 0x0c, 0x52, 0x07, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x73, 0x31, 0x12, 0x18, 0x0a, 0x07, + 0x74, 0x6f, 0x70, 0x69, 0x63, 0x73, 0x32, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x07, 0x74, + 0x6f, 0x70, 0x69, 0x63, 0x73, 0x32, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x73, + 0x33, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x07, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x73, 0x33, + 0x12, 0x3f, 0x0a, 0x0a, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x63, 0x72, 0x65, 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x76, + 0x32, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, + 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x0a, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x64, 0x65, 0x6e, 0x63, + 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x44, 0x65, 0x70, 0x74, 0x68, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x44, 0x65, 0x70, 0x74, + 0x68, 0x2a, 0x3c, 0x0a, 0x0f, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x4c, + 0x65, 0x76, 0x65, 0x6c, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x41, 0x52, 0x4c, 0x59, 0x10, 0x00, 0x12, + 0x0f, 0x0a, 0x0b, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x5f, 0x44, 0x45, 0x50, 0x54, 0x48, 0x10, 0x01, + 0x12, 0x0d, 0x0a, 0x09, 0x46, 0x49, 0x4e, 0x41, 0x4c, 0x49, 0x5a, 0x45, 0x44, 0x10, 0x02, 0x32, + 0xb5, 0x07, 0x0a, 0x06, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x4a, 0x0a, 0x0c, 0x43, 0x61, + 0x6c, 0x6c, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x12, 0x1d, 0x2e, 0x6c, 0x6f, 0x6f, + 0x70, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, + 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, + 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, + 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x44, 0x0a, 0x0a, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x1b, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x65, 0x76, 0x6d, 0x2e, + 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x19, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x46, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x41, 0x0a, 0x09, + 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x41, 0x74, 0x12, 0x1a, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, + 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x41, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x65, 0x76, 0x6d, + 0x2e, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x41, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, + 0x47, 0x0a, 0x0b, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x47, 0x61, 0x73, 0x12, 0x1c, + 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, + 0x74, 0x65, 0x47, 0x61, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x6c, + 0x6f, 0x6f, 0x70, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, + 0x47, 0x61, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x62, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x48, 0x61, 0x73, 0x68, + 0x12, 0x25, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x48, 0x61, 0x73, 0x68, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x65, + 0x76, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x42, 0x79, 0x48, 0x61, 0x73, 0x68, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x65, 0x0a, 0x15, + 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x63, 0x65, 0x69, 0x70, 0x74, 0x12, 0x26, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x65, 0x76, 0x6d, + 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, + 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x52, 0x65, + 0x70, 0x6c, 0x79, 0x12, 0x57, 0x0a, 0x16, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x41, 0x6e, 0x64, + 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x48, 0x65, 0x61, 0x64, 0x12, 0x16, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x25, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x65, 0x76, 0x6d, + 0x2e, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x41, 0x6e, 0x64, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, + 0x7a, 0x65, 0x64, 0x48, 0x65, 0x61, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x56, 0x0a, 0x10, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x4c, 0x6f, 0x67, 0x73, + 0x12, 0x21, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x4c, 0x6f, 0x67, 0x73, 0x52, + 0x65, 0x70, 0x6c, 0x79, 0x12, 0x53, 0x0a, 0x13, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, + 0x4c, 0x6f, 0x67, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x12, 0x24, 0x2e, 0x6c, 0x6f, + 0x6f, 0x70, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4c, + 0x6f, 0x67, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x57, 0x0a, 0x15, 0x55, 0x6e, 0x72, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x69, + 0x6e, 0x67, 0x12, 0x26, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x55, 0x6e, + 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x54, 0x72, 0x61, 0x63, 0x6b, + 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, + 0x74, 0x79, 0x12, 0x52, 0x0a, 0x0a, 0x4c, 0x6f, 0x67, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, + 0x12, 0x27, 0x2e, 0x63, 0x72, 0x65, 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x76, 0x32, 0x2e, 0x65, 0x76, + 0x6d, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x54, 0x72, 0x69, 0x67, 0x67, + 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, + 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x73, 0x52, + 0x65, 0x70, 0x6c, 0x79, 0x30, 0x01, 0x1a, 0x0f, 0x82, 0xb5, 0x18, 0x0b, 0x12, 0x09, 0x65, 0x76, + 0x6d, 0x40, 0x31, 0x2e, 0x30, 0x2e, 0x30, 0x42, 0x68, 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x6d, 0x61, 0x72, 0x74, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x61, 0x63, 0x74, 0x6b, 0x69, 0x74, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x6b, + 0x2d, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x63, 0x61, 0x70, 0x61, + 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x2f, 0x76, 0x32, 0x2f, 0x63, 0x68, 0x61, 0x69, + 0x6e, 0x2d, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x2f, 0x65, + 0x76, 0x6d, 0x2f, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x3b, 0x65, 0x76, + 0x6d, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_capabilities_v2_chain_capabilities_evm_capability_proto_rawDescOnce sync.Once + file_capabilities_v2_chain_capabilities_evm_capability_proto_rawDescData = file_capabilities_v2_chain_capabilities_evm_capability_proto_rawDesc +) +func file_capabilities_v2_chain_capabilities_evm_capability_proto_rawDescGZIP() []byte { + file_capabilities_v2_chain_capabilities_evm_capability_proto_rawDescOnce.Do(func() { + file_capabilities_v2_chain_capabilities_evm_capability_proto_rawDescData = protoimpl.X.CompressGZIP(file_capabilities_v2_chain_capabilities_evm_capability_proto_rawDescData) + }) + return file_capabilities_v2_chain_capabilities_evm_capability_proto_rawDescData +} + +var file_capabilities_v2_chain_capabilities_evm_capability_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_capabilities_v2_chain_capabilities_evm_capability_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_capabilities_v2_chain_capabilities_evm_capability_proto_goTypes = []any{ - (*evm.CallContractRequest)(nil), // 0: loop.evm.CallContractRequest - (*evm.FilterLogsRequest)(nil), // 1: loop.evm.FilterLogsRequest - (*evm.BalanceAtRequest)(nil), // 2: loop.evm.BalanceAtRequest - (*evm.EstimateGasRequest)(nil), // 3: loop.evm.EstimateGasRequest - (*evm.GetTransactionByHashRequest)(nil), // 4: loop.evm.GetTransactionByHashRequest - (*evm.GetTransactionReceiptRequest)(nil), // 5: loop.evm.GetTransactionReceiptRequest - (*emptypb.Empty)(nil), // 6: google.protobuf.Empty - (*evm.QueryTrackedLogsRequest)(nil), // 7: loop.evm.QueryTrackedLogsRequest - (*evm.RegisterLogTrackingRequest)(nil), // 8: loop.evm.RegisterLogTrackingRequest - (*evm.UnregisterLogTrackingRequest)(nil), // 9: loop.evm.UnregisterLogTrackingRequest - (*evm.CallContractReply)(nil), // 10: loop.evm.CallContractReply - (*evm.FilterLogsReply)(nil), // 11: loop.evm.FilterLogsReply - (*evm.BalanceAtReply)(nil), // 12: loop.evm.BalanceAtReply - (*evm.EstimateGasReply)(nil), // 13: loop.evm.EstimateGasReply - (*evm.GetTransactionByHashReply)(nil), // 14: loop.evm.GetTransactionByHashReply - (*evm.GetTransactionReceiptReply)(nil), // 15: loop.evm.GetTransactionReceiptReply - (*evm.LatestAndFinalizedHeadReply)(nil), // 16: loop.evm.LatestAndFinalizedHeadReply - (*evm.QueryTrackedLogsReply)(nil), // 17: loop.evm.QueryTrackedLogsReply + (ConfidenceLevel)(0), // 0: cre.sdk.v2.evm.ConfidenceLevel + (*FilterLogTriggerRequest)(nil), // 1: cre.sdk.v2.evm.FilterLogTriggerRequest + (*evm.CallContractRequest)(nil), // 2: loop.evm.CallContractRequest + (*evm.FilterLogsRequest)(nil), // 3: loop.evm.FilterLogsRequest + (*evm.BalanceAtRequest)(nil), // 4: loop.evm.BalanceAtRequest + (*evm.EstimateGasRequest)(nil), // 5: loop.evm.EstimateGasRequest + (*evm.GetTransactionByHashRequest)(nil), // 6: loop.evm.GetTransactionByHashRequest + (*evm.GetTransactionReceiptRequest)(nil), // 7: loop.evm.GetTransactionReceiptRequest + (*emptypb.Empty)(nil), // 8: google.protobuf.Empty + (*evm.QueryTrackedLogsRequest)(nil), // 9: loop.evm.QueryTrackedLogsRequest + (*evm.RegisterLogTrackingRequest)(nil), // 10: loop.evm.RegisterLogTrackingRequest + (*evm.UnregisterLogTrackingRequest)(nil), // 11: loop.evm.UnregisterLogTrackingRequest + (*evm.CallContractReply)(nil), // 12: loop.evm.CallContractReply + (*evm.FilterLogsReply)(nil), // 13: loop.evm.FilterLogsReply + (*evm.BalanceAtReply)(nil), // 14: loop.evm.BalanceAtReply + (*evm.EstimateGasReply)(nil), // 15: loop.evm.EstimateGasReply + (*evm.GetTransactionByHashReply)(nil), // 16: loop.evm.GetTransactionByHashReply + (*evm.GetTransactionReceiptReply)(nil), // 17: loop.evm.GetTransactionReceiptReply + (*evm.LatestAndFinalizedHeadReply)(nil), // 18: loop.evm.LatestAndFinalizedHeadReply + (*evm.QueryTrackedLogsReply)(nil), // 19: loop.evm.QueryTrackedLogsReply } var file_capabilities_v2_chain_capabilities_evm_capability_proto_depIdxs = []int32{ - 0, // 0: cre.sdk.v2.evm.Client.CallContract:input_type -> loop.evm.CallContractRequest - 1, // 1: cre.sdk.v2.evm.Client.FilterLogs:input_type -> loop.evm.FilterLogsRequest - 2, // 2: cre.sdk.v2.evm.Client.BalanceAt:input_type -> loop.evm.BalanceAtRequest - 3, // 3: cre.sdk.v2.evm.Client.EstimateGas:input_type -> loop.evm.EstimateGasRequest - 4, // 4: cre.sdk.v2.evm.Client.GetTransactionByHash:input_type -> loop.evm.GetTransactionByHashRequest - 5, // 5: cre.sdk.v2.evm.Client.GetTransactionReceipt:input_type -> loop.evm.GetTransactionReceiptRequest - 6, // 6: cre.sdk.v2.evm.Client.LatestAndFinalizedHead:input_type -> google.protobuf.Empty - 7, // 7: cre.sdk.v2.evm.Client.QueryTrackedLogs:input_type -> loop.evm.QueryTrackedLogsRequest - 8, // 8: cre.sdk.v2.evm.Client.RegisterLogTracking:input_type -> loop.evm.RegisterLogTrackingRequest - 9, // 9: cre.sdk.v2.evm.Client.UnregisterLogTracking:input_type -> loop.evm.UnregisterLogTrackingRequest - 10, // 10: cre.sdk.v2.evm.Client.CallContract:output_type -> loop.evm.CallContractReply - 11, // 11: cre.sdk.v2.evm.Client.FilterLogs:output_type -> loop.evm.FilterLogsReply - 12, // 12: cre.sdk.v2.evm.Client.BalanceAt:output_type -> loop.evm.BalanceAtReply - 13, // 13: cre.sdk.v2.evm.Client.EstimateGas:output_type -> loop.evm.EstimateGasReply - 14, // 14: cre.sdk.v2.evm.Client.GetTransactionByHash:output_type -> loop.evm.GetTransactionByHashReply - 15, // 15: cre.sdk.v2.evm.Client.GetTransactionReceipt:output_type -> loop.evm.GetTransactionReceiptReply - 16, // 16: cre.sdk.v2.evm.Client.LatestAndFinalizedHead:output_type -> loop.evm.LatestAndFinalizedHeadReply - 17, // 17: cre.sdk.v2.evm.Client.QueryTrackedLogs:output_type -> loop.evm.QueryTrackedLogsReply - 6, // 18: cre.sdk.v2.evm.Client.RegisterLogTracking:output_type -> google.protobuf.Empty - 6, // 19: cre.sdk.v2.evm.Client.UnregisterLogTracking:output_type -> google.protobuf.Empty - 10, // [10:20] is the sub-list for method output_type - 0, // [0:10] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name + 0, // 0: cre.sdk.v2.evm.FilterLogTriggerRequest.Confidence:type_name -> cre.sdk.v2.evm.ConfidenceLevel + 2, // 1: cre.sdk.v2.evm.Client.CallContract:input_type -> loop.evm.CallContractRequest + 3, // 2: cre.sdk.v2.evm.Client.FilterLogs:input_type -> loop.evm.FilterLogsRequest + 4, // 3: cre.sdk.v2.evm.Client.BalanceAt:input_type -> loop.evm.BalanceAtRequest + 5, // 4: cre.sdk.v2.evm.Client.EstimateGas:input_type -> loop.evm.EstimateGasRequest + 6, // 5: cre.sdk.v2.evm.Client.GetTransactionByHash:input_type -> loop.evm.GetTransactionByHashRequest + 7, // 6: cre.sdk.v2.evm.Client.GetTransactionReceipt:input_type -> loop.evm.GetTransactionReceiptRequest + 8, // 7: cre.sdk.v2.evm.Client.LatestAndFinalizedHead:input_type -> google.protobuf.Empty + 9, // 8: cre.sdk.v2.evm.Client.QueryTrackedLogs:input_type -> loop.evm.QueryTrackedLogsRequest + 10, // 9: cre.sdk.v2.evm.Client.RegisterLogTracking:input_type -> loop.evm.RegisterLogTrackingRequest + 11, // 10: cre.sdk.v2.evm.Client.UnregisterLogTracking:input_type -> loop.evm.UnregisterLogTrackingRequest + 1, // 11: cre.sdk.v2.evm.Client.LogTrigger:input_type -> cre.sdk.v2.evm.FilterLogTriggerRequest + 12, // 12: cre.sdk.v2.evm.Client.CallContract:output_type -> loop.evm.CallContractReply + 13, // 13: cre.sdk.v2.evm.Client.FilterLogs:output_type -> loop.evm.FilterLogsReply + 14, // 14: cre.sdk.v2.evm.Client.BalanceAt:output_type -> loop.evm.BalanceAtReply + 15, // 15: cre.sdk.v2.evm.Client.EstimateGas:output_type -> loop.evm.EstimateGasReply + 16, // 16: cre.sdk.v2.evm.Client.GetTransactionByHash:output_type -> loop.evm.GetTransactionByHashReply + 17, // 17: cre.sdk.v2.evm.Client.GetTransactionReceipt:output_type -> loop.evm.GetTransactionReceiptReply + 18, // 18: cre.sdk.v2.evm.Client.LatestAndFinalizedHead:output_type -> loop.evm.LatestAndFinalizedHeadReply + 19, // 19: cre.sdk.v2.evm.Client.QueryTrackedLogs:output_type -> loop.evm.QueryTrackedLogsReply + 8, // 20: cre.sdk.v2.evm.Client.RegisterLogTracking:output_type -> google.protobuf.Empty + 8, // 21: cre.sdk.v2.evm.Client.UnregisterLogTracking:output_type -> google.protobuf.Empty + 13, // 22: cre.sdk.v2.evm.Client.LogTrigger:output_type -> loop.evm.FilterLogsReply + 12, // [12:23] is the sub-list for method output_type + 1, // [1:12] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name } func init() { file_capabilities_v2_chain_capabilities_evm_capability_proto_init() } @@ -94,20 +342,37 @@ func file_capabilities_v2_chain_capabilities_evm_capability_proto_init() { if File_capabilities_v2_chain_capabilities_evm_capability_proto != nil { return } + if !protoimpl.UnsafeEnabled { + file_capabilities_v2_chain_capabilities_evm_capability_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*FilterLogTriggerRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_capabilities_v2_chain_capabilities_evm_capability_proto_rawDesc), len(file_capabilities_v2_chain_capabilities_evm_capability_proto_rawDesc)), - NumEnums: 0, - NumMessages: 0, + RawDescriptor: file_capabilities_v2_chain_capabilities_evm_capability_proto_rawDesc, + NumEnums: 1, + NumMessages: 1, NumExtensions: 0, NumServices: 1, }, GoTypes: file_capabilities_v2_chain_capabilities_evm_capability_proto_goTypes, DependencyIndexes: file_capabilities_v2_chain_capabilities_evm_capability_proto_depIdxs, + EnumInfos: file_capabilities_v2_chain_capabilities_evm_capability_proto_enumTypes, + MessageInfos: file_capabilities_v2_chain_capabilities_evm_capability_proto_msgTypes, }.Build() File_capabilities_v2_chain_capabilities_evm_capability_proto = out.File + file_capabilities_v2_chain_capabilities_evm_capability_proto_rawDesc = nil file_capabilities_v2_chain_capabilities_evm_capability_proto_goTypes = nil file_capabilities_v2_chain_capabilities_evm_capability_proto_depIdxs = nil } diff --git a/pkg/capabilities/v2/chain-capabilities/evm/capability.proto b/pkg/capabilities/v2/chain-capabilities/evm/capability.proto index 3f087ff525..6e8510bec3 100644 --- a/pkg/capabilities/v2/chain-capabilities/evm/capability.proto +++ b/pkg/capabilities/v2/chain-capabilities/evm/capability.proto @@ -23,6 +23,20 @@ service Client { rpc QueryTrackedLogs(loop.evm.QueryTrackedLogsRequest) returns (loop.evm.QueryTrackedLogsReply); rpc RegisterLogTracking(loop.evm.RegisterLogTrackingRequest) returns (google.protobuf.Empty); rpc UnregisterLogTracking(loop.evm.UnregisterLogTrackingRequest) returns (google.protobuf.Empty); + rpc LogTrigger(FilterLogTriggerRequest) returns (stream loop.evm.FilterLogsReply); } - +enum ConfidenceLevel { + EARLY = 0; // default, blocks that have a good level of confidence defined by chain, but not guaranteed to be included in the chain + BLOCK_DEPTH = 1; // blocks that are lower than the BlockDepth parameter defined by user, which is a number of blocks to wait for confirmation + FINALIZED = 2; // guaranteed to be included in the chain +} +message FilterLogTriggerRequest { + repeated bytes addresses = 1; // contract(s) to filter logs from, at least one address is required + repeated bytes topics0 = 2; // list of topics0/eventSigs to filter, at least one topic is required + repeated bytes topics1 = 3; // list of topics1 to filter, optional, can be empty + repeated bytes topics2 = 4; // list of topics1 to filter, optional, can be empty + repeated bytes topics3 = 5; // list of topics1 to filter, optional, can be empty + ConfidenceLevel Confidence = 6; // optional, defaults to "EARLY" + uint64 BlockDepth = 7; // optional, defaults to particular value per chain (from a table), number of blocks to wait for confirmation +} diff --git a/pkg/capabilities/v2/chain-capabilities/evm/capability_grpc.pb.go b/pkg/capabilities/v2/chain-capabilities/evm/capability_grpc.pb.go index 8fd71a1c35..0aa1c561bf 100644 --- a/pkg/capabilities/v2/chain-capabilities/evm/capability_grpc.pb.go +++ b/pkg/capabilities/v2/chain-capabilities/evm/capability_grpc.pb.go @@ -31,6 +31,7 @@ const ( Client_QueryTrackedLogs_FullMethodName = "/cre.sdk.v2.evm.Client/QueryTrackedLogs" Client_RegisterLogTracking_FullMethodName = "/cre.sdk.v2.evm.Client/RegisterLogTracking" Client_UnregisterLogTracking_FullMethodName = "/cre.sdk.v2.evm.Client/UnregisterLogTracking" + Client_LogTrigger_FullMethodName = "/cre.sdk.v2.evm.Client/LogTrigger" ) // ClientClient is the client API for Client service. @@ -47,6 +48,7 @@ type ClientClient interface { QueryTrackedLogs(ctx context.Context, in *evm.QueryTrackedLogsRequest, opts ...grpc.CallOption) (*evm.QueryTrackedLogsReply, error) RegisterLogTracking(ctx context.Context, in *evm.RegisterLogTrackingRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) UnregisterLogTracking(ctx context.Context, in *evm.UnregisterLogTrackingRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + LogTrigger(ctx context.Context, in *FilterLogTriggerRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[evm.FilterLogsReply], error) } type clientClient struct { @@ -157,6 +159,25 @@ func (c *clientClient) UnregisterLogTracking(ctx context.Context, in *evm.Unregi return out, nil } +func (c *clientClient) LogTrigger(ctx context.Context, in *FilterLogTriggerRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[evm.FilterLogsReply], error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &Client_ServiceDesc.Streams[0], Client_LogTrigger_FullMethodName, cOpts...) + if err != nil { + return nil, err + } + x := &grpc.GenericClientStream[FilterLogTriggerRequest, evm.FilterLogsReply]{ClientStream: stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type Client_LogTriggerClient = grpc.ServerStreamingClient[evm.FilterLogsReply] + // ClientServer is the server API for Client service. // All implementations must embed UnimplementedClientServer // for forward compatibility. @@ -171,6 +192,7 @@ type ClientServer interface { QueryTrackedLogs(context.Context, *evm.QueryTrackedLogsRequest) (*evm.QueryTrackedLogsReply, error) RegisterLogTracking(context.Context, *evm.RegisterLogTrackingRequest) (*emptypb.Empty, error) UnregisterLogTracking(context.Context, *evm.UnregisterLogTrackingRequest) (*emptypb.Empty, error) + LogTrigger(*FilterLogTriggerRequest, grpc.ServerStreamingServer[evm.FilterLogsReply]) error mustEmbedUnimplementedClientServer() } @@ -211,6 +233,9 @@ func (UnimplementedClientServer) RegisterLogTracking(context.Context, *evm.Regis func (UnimplementedClientServer) UnregisterLogTracking(context.Context, *evm.UnregisterLogTrackingRequest) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method UnregisterLogTracking not implemented") } +func (UnimplementedClientServer) LogTrigger(*FilterLogTriggerRequest, grpc.ServerStreamingServer[evm.FilterLogsReply]) error { + return status.Errorf(codes.Unimplemented, "method LogTrigger not implemented") +} func (UnimplementedClientServer) mustEmbedUnimplementedClientServer() {} func (UnimplementedClientServer) testEmbeddedByValue() {} @@ -412,6 +437,17 @@ func _Client_UnregisterLogTracking_Handler(srv interface{}, ctx context.Context, return interceptor(ctx, in, info, handler) } +func _Client_LogTrigger_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(FilterLogTriggerRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(ClientServer).LogTrigger(m, &grpc.GenericServerStream[FilterLogTriggerRequest, evm.FilterLogsReply]{ServerStream: stream}) +} + +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type Client_LogTriggerServer = grpc.ServerStreamingServer[evm.FilterLogsReply] + // Client_ServiceDesc is the grpc.ServiceDesc for Client service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -460,6 +496,12 @@ var Client_ServiceDesc = grpc.ServiceDesc{ Handler: _Client_UnregisterLogTracking_Handler, }, }, - Streams: []grpc.StreamDesc{}, + Streams: []grpc.StreamDesc{ + { + StreamName: "LogTrigger", + Handler: _Client_LogTrigger_Handler, + ServerStreams: true, + }, + }, Metadata: "capabilities/v2/chain-capabilities/evm/capability.proto", } diff --git a/pkg/capabilities/v2/chain-capabilities/evm/capability_sdk_gen.go b/pkg/capabilities/v2/chain-capabilities/evm/capability_sdk_gen.go index cf26aeda69..afd14e5429 100644 --- a/pkg/capabilities/v2/chain-capabilities/evm/capability_sdk_gen.go +++ b/pkg/capabilities/v2/chain-capabilities/evm/capability_sdk_gen.go @@ -247,3 +247,32 @@ func (c *Client) UnregisterLogTracking(runtime sdk.DonRuntime, input *evm.Unregi } }) } + +func (c Client) LogTrigger(config *FilterLogTriggerRequest) sdk.DonTrigger[*evm.FilterLogsReply] { + configAny, _ := anypb.New(config) + return &clientLogTrigger{ + config: configAny, + } +} + +type clientLogTrigger struct { + config *anypb.Any +} + +func (*clientLogTrigger) IsDonTrigger() {} + +func (*clientLogTrigger) NewT() *evm.FilterLogsReply { + return &evm.FilterLogsReply{} +} + +func (*clientLogTrigger) CapabilityID() string { + return "evm@1.0.0" +} + +func (*clientLogTrigger) Method() string { + return "LogTrigger" +} + +func (t *clientLogTrigger) ConfigAsAny() *anypb.Any { + return t.config +} diff --git a/pkg/capabilities/v2/chain-capabilities/evm/capabilitymock/capability_mock_gen.go b/pkg/capabilities/v2/chain-capabilities/evm/capabilitymock/capability_mock_gen.go index 3048245bd5..a75f80c222 100644 --- a/pkg/capabilities/v2/chain-capabilities/evm/capabilitymock/capability_mock_gen.go +++ b/pkg/capabilities/v2/chain-capabilities/evm/capabilitymock/capability_mock_gen.go @@ -11,6 +11,7 @@ import ( "google.golang.org/protobuf/types/known/emptypb" + evm1 "github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/chain-capabilities/evm/capability" "github.com/smartcontractkit/chainlink-common/pkg/chains/evm" sdkpb "github.com/smartcontractkit/chainlink-common/pkg/workflows/sdk/v2/pb" @@ -48,6 +49,8 @@ type ClientCapability struct { RegisterLogTracking func(ctx context.Context, input *evm.RegisterLogTrackingRequest) (*emptypb.Empty, error) // TODO: https://smartcontract-it.atlassian.net/browse/CAPPL-799 add the default to the call UnregisterLogTracking func(ctx context.Context, input *evm.UnregisterLogTrackingRequest) (*emptypb.Empty, error) + + LogTrigger func(ctx context.Context, input *evm1.FilterLogTriggerRequest) (*evm.FilterLogsReply, error) } func (cap *ClientCapability) Invoke(ctx context.Context, request *sdkpb.CapabilityRequest) *sdkpb.CapabilityResponse { @@ -280,7 +283,36 @@ func (cap *ClientCapability) Invoke(ctx context.Context, request *sdkpb.Capabili } func (cap *ClientCapability) InvokeTrigger(ctx context.Context, request *sdkpb.TriggerSubscription) (*sdkpb.Trigger, error) { - return nil, fmt.Errorf("method %s not found", request.Method) + trigger := &sdkpb.Trigger{} + switch request.Method { + case "LogTrigger": + input := &evm1.FilterLogTriggerRequest{} + if err := request.Payload.UnmarshalTo(input); err != nil { + return nil, err + } + + if cap.LogTrigger == nil { + return nil, registry.ErrNoTriggerStub("LogTrigger") + } + + resp, err := cap.LogTrigger(ctx, input) + if err != nil { + return nil, err + } else { + if resp == nil { + return nil, nil + } + + payload, err := anypb.New(resp) + if err != nil { + return nil, err + } + trigger.Payload = payload + } + default: + return nil, fmt.Errorf("method %s not found", request.Method) + } + return trigger, nil } func (cap *ClientCapability) ID() string { diff --git a/pkg/capabilities/v2/chain-capabilities/evm/server/capability_server_gen.go b/pkg/capabilities/v2/chain-capabilities/evm/server/capability_server_gen.go index 571cecb534..0ad36db4a6 100644 --- a/pkg/capabilities/v2/chain-capabilities/evm/server/capability_server_gen.go +++ b/pkg/capabilities/v2/chain-capabilities/evm/server/capability_server_gen.go @@ -9,6 +9,7 @@ import ( "google.golang.org/protobuf/types/known/emptypb" + evm1 "github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/chain-capabilities/evm/capability" "github.com/smartcontractkit/chainlink-common/pkg/chains/evm" "github.com/smartcontractkit/chainlink-common/pkg/capabilities" @@ -39,6 +40,9 @@ type ClientCapability interface { UnregisterLogTracking(ctx context.Context, metadata capabilities.RequestMetadata, input *evm.UnregisterLogTrackingRequest) (*emptypb.Empty, error) + RegisterLogTrigger(ctx context.Context, triggerID string, metadata capabilities.RequestMetadata, input *evm1.FilterLogTriggerRequest) (<-chan capabilities.TriggerAndId[*evm.FilterLogsReply], error) + UnregisterLogTrigger(ctx context.Context, triggerID string, metadata capabilities.RequestMetadata, input *evm1.FilterLogTriggerRequest) error + Start(ctx context.Context) error Close() error HealthReport() map[string]error @@ -116,11 +120,27 @@ func (c *clientCapability) Info(ctx context.Context) (capabilities.CapabilityInf var _ capabilities.ExecutableAndTriggerCapability = (*clientCapability)(nil) func (c *clientCapability) RegisterTrigger(ctx context.Context, request capabilities.TriggerRegistrationRequest) (<-chan capabilities.TriggerResponse, error) { - return nil, fmt.Errorf("trigger %s not found", request.Method) + switch request.Method { + case "LogTrigger": + input := &evm1.FilterLogTriggerRequest{} + return capabilities.RegisterTrigger(ctx, c.stopCh, "evm@1.0.0", request, input, c.ClientCapability.RegisterLogTrigger) + default: + return nil, fmt.Errorf("trigger %s not found", request.Method) + } } func (c *clientCapability) UnregisterTrigger(ctx context.Context, request capabilities.TriggerRegistrationRequest) error { - return fmt.Errorf("trigger %s not found", request.Method) + switch request.Method { + case "LogTrigger": + input := &evm1.FilterLogTriggerRequest{} + _, err := capabilities.FromValueOrAny(request.Config, request.Payload, input) + if err != nil { + return err + } + return c.ClientCapability.UnregisterLogTrigger(ctx, request.TriggerID, request.Metadata, input) + default: + return fmt.Errorf("method %s not found", request.Method) + } } func (c *clientCapability) RegisterToWorkflow(ctx context.Context, request capabilities.RegisterToWorkflowRequest) error { diff --git a/pkg/chains/evm/evm.pb.go b/pkg/chains/evm/evm.pb.go index c096023d73..2e77dc0f58 100644 --- a/pkg/chains/evm/evm.pb.go +++ b/pkg/chains/evm/evm.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.6 +// protoc-gen-go v1.34.2 // protoc v5.29.3 // source: chains/evm/evm.proto @@ -14,7 +14,6 @@ import ( emptypb "google.golang.org/protobuf/types/known/emptypb" reflect "reflect" sync "sync" - unsafe "unsafe" ) const ( @@ -29,31 +28,23 @@ const ( type TransactionStatus int32 const ( - TransactionStatus_TRANSACTION_STATUS_UNKNOWN TransactionStatus = 0 - TransactionStatus_TRANSACTION_STATUS_PENDING TransactionStatus = 1 - TransactionStatus_TRANSACTION_STATUS_UNCONFIRMED TransactionStatus = 2 - TransactionStatus_TRANSACTION_STATUS_FINALIZED TransactionStatus = 3 - TransactionStatus_TRANSACTION_STATUS_FAILED TransactionStatus = 4 - TransactionStatus_TRANSACTION_STATUS_FATAL TransactionStatus = 5 + // TODO weird issue makes this enums to collide with ReceiverContractExecutionStatus enum values + TransactionStatus_TX_SUCCESS TransactionStatus = 0 //Successfully executed and within a block - Not finalized + TransactionStatus_TX_REVERTED TransactionStatus = 1 //Successfully call to the RPC and TX processing but reverted + TransactionStatus_TX_FAILURE TransactionStatus = 2 //Was not executed at all by an RPC for some reason ) // Enum value maps for TransactionStatus. var ( TransactionStatus_name = map[int32]string{ - 0: "TRANSACTION_STATUS_UNKNOWN", - 1: "TRANSACTION_STATUS_PENDING", - 2: "TRANSACTION_STATUS_UNCONFIRMED", - 3: "TRANSACTION_STATUS_FINALIZED", - 4: "TRANSACTION_STATUS_FAILED", - 5: "TRANSACTION_STATUS_FATAL", + 0: "TX_SUCCESS", + 1: "TX_REVERTED", + 2: "TX_FAILURE", } TransactionStatus_value = map[string]int32{ - "TRANSACTION_STATUS_UNKNOWN": 0, - "TRANSACTION_STATUS_PENDING": 1, - "TRANSACTION_STATUS_UNCONFIRMED": 2, - "TRANSACTION_STATUS_FINALIZED": 3, - "TRANSACTION_STATUS_FAILED": 4, - "TRANSACTION_STATUS_FATAL": 5, + "TX_SUCCESS": 0, + "TX_REVERTED": 1, + "TX_FAILURE": 2, } ) @@ -84,21 +75,322 @@ func (TransactionStatus) EnumDescriptor() ([]byte, []int) { return file_chains_evm_evm_proto_rawDescGZIP(), []int{0} } +type ReceiverContractExecutionStatus int32 + +const ( + ReceiverContractExecutionStatus_SUCCESS ReceiverContractExecutionStatus = 0 + ReceiverContractExecutionStatus_FAILURE ReceiverContractExecutionStatus = 1 +) + +// Enum value maps for ReceiverContractExecutionStatus. +var ( + ReceiverContractExecutionStatus_name = map[int32]string{ + 0: "SUCCESS", + 1: "FAILURE", + } + ReceiverContractExecutionStatus_value = map[string]int32{ + "SUCCESS": 0, + "FAILURE": 1, + } +) + +func (x ReceiverContractExecutionStatus) Enum() *ReceiverContractExecutionStatus { + p := new(ReceiverContractExecutionStatus) + *p = x + return p +} + +func (x ReceiverContractExecutionStatus) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ReceiverContractExecutionStatus) Descriptor() protoreflect.EnumDescriptor { + return file_chains_evm_evm_proto_enumTypes[1].Descriptor() +} + +func (ReceiverContractExecutionStatus) Type() protoreflect.EnumType { + return &file_chains_evm_evm_proto_enumTypes[1] +} + +func (x ReceiverContractExecutionStatus) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ReceiverContractExecutionStatus.Descriptor instead. +func (ReceiverContractExecutionStatus) EnumDescriptor() ([]byte, []int) { + return file_chains_evm_evm_proto_rawDescGZIP(), []int{1} +} + +type SignedReport struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + RawReport []byte `protobuf:"bytes,1,opt,name=raw_report,json=rawReport,proto3" json:"raw_report,omitempty"` + ReportContext []byte `protobuf:"bytes,2,opt,name=report_context,json=reportContext,proto3" json:"report_context,omitempty"` + Signatures [][]byte `protobuf:"bytes,3,rep,name=signatures,proto3" json:"signatures,omitempty"` + Id []byte `protobuf:"bytes,4,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *SignedReport) Reset() { + *x = SignedReport{} + if protoimpl.UnsafeEnabled { + mi := &file_chains_evm_evm_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SignedReport) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SignedReport) ProtoMessage() {} + +func (x *SignedReport) ProtoReflect() protoreflect.Message { + mi := &file_chains_evm_evm_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SignedReport.ProtoReflect.Descriptor instead. +func (*SignedReport) Descriptor() ([]byte, []int) { + return file_chains_evm_evm_proto_rawDescGZIP(), []int{0} +} + +func (x *SignedReport) GetRawReport() []byte { + if x != nil { + return x.RawReport + } + return nil +} + +func (x *SignedReport) GetReportContext() []byte { + if x != nil { + return x.ReportContext + } + return nil +} + +func (x *SignedReport) GetSignatures() [][]byte { + if x != nil { + return x.Signatures + } + return nil +} + +func (x *SignedReport) GetId() []byte { + if x != nil { + return x.Id + } + return nil +} + +type GasConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + GasLimit uint64 `protobuf:"varint,1,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"` +} + +func (x *GasConfig) Reset() { + *x = GasConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_chains_evm_evm_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GasConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GasConfig) ProtoMessage() {} + +func (x *GasConfig) ProtoReflect() protoreflect.Message { + mi := &file_chains_evm_evm_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GasConfig.ProtoReflect.Descriptor instead. +func (*GasConfig) Descriptor() ([]byte, []int) { + return file_chains_evm_evm_proto_rawDescGZIP(), []int{1} +} + +func (x *GasConfig) GetGasLimit() uint64 { + if x != nil { + return x.GasLimit + } + return 0 +} + +type WriteReportRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Receiver []byte `protobuf:"bytes,1,opt,name=receiver,proto3" json:"receiver,omitempty"` + Report *SignedReport `protobuf:"bytes,2,opt,name=report,proto3" json:"report,omitempty"` + GasConfig *GasConfig `protobuf:"bytes,3,opt,name=gas_config,json=gasConfig,proto3" json:"gas_config,omitempty"` +} + +func (x *WriteReportRequest) Reset() { + *x = WriteReportRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_chains_evm_evm_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WriteReportRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WriteReportRequest) ProtoMessage() {} + +func (x *WriteReportRequest) ProtoReflect() protoreflect.Message { + mi := &file_chains_evm_evm_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WriteReportRequest.ProtoReflect.Descriptor instead. +func (*WriteReportRequest) Descriptor() ([]byte, []int) { + return file_chains_evm_evm_proto_rawDescGZIP(), []int{2} +} + +func (x *WriteReportRequest) GetReceiver() []byte { + if x != nil { + return x.Receiver + } + return nil +} + +func (x *WriteReportRequest) GetReport() *SignedReport { + if x != nil { + return x.Report + } + return nil +} + +func (x *WriteReportRequest) GetGasConfig() *GasConfig { + if x != nil { + return x.GasConfig + } + return nil +} + +type WriteReportReply struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TxStatus TransactionStatus `protobuf:"varint,1,opt,name=tx_status,json=txStatus,proto3,enum=loop.evm.TransactionStatus" json:"tx_status,omitempty"` + ReceiverContractExecutionStatus ReceiverContractExecutionStatus `protobuf:"varint,2,opt,name=receiver_contract_execution_status,json=receiverContractExecutionStatus,proto3,enum=loop.evm.ReceiverContractExecutionStatus" json:"receiver_contract_execution_status,omitempty"` + TxHash []byte `protobuf:"bytes,3,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` + TransactionFee *pb.BigInt `protobuf:"bytes,4,opt,name=transaction_fee,json=transactionFee,proto3" json:"transaction_fee,omitempty"` +} + +func (x *WriteReportReply) Reset() { + *x = WriteReportReply{} + if protoimpl.UnsafeEnabled { + mi := &file_chains_evm_evm_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WriteReportReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WriteReportReply) ProtoMessage() {} + +func (x *WriteReportReply) ProtoReflect() protoreflect.Message { + mi := &file_chains_evm_evm_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WriteReportReply.ProtoReflect.Descriptor instead. +func (*WriteReportReply) Descriptor() ([]byte, []int) { + return file_chains_evm_evm_proto_rawDescGZIP(), []int{3} +} + +func (x *WriteReportReply) GetTxStatus() TransactionStatus { + if x != nil { + return x.TxStatus + } + return TransactionStatus_TX_SUCCESS +} + +func (x *WriteReportReply) GetReceiverContractExecutionStatus() ReceiverContractExecutionStatus { + if x != nil { + return x.ReceiverContractExecutionStatus + } + return ReceiverContractExecutionStatus_SUCCESS +} + +func (x *WriteReportReply) GetTxHash() []byte { + if x != nil { + return x.TxHash + } + return nil +} + +func (x *WriteReportReply) GetTransactionFee() *pb.BigInt { + if x != nil { + return x.TransactionFee + } + return nil +} + // represents simplified evm-style CallMsg type CallMsg struct { - state protoimpl.MessageState `protogen:"open.v1"` - From []byte `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` // sender address in evm address [20]byte fix-sized array format - To []byte `protobuf:"bytes,2,opt,name=to,proto3" json:"to,omitempty"` // contract address in evm address [20]byte fix-sized array format - Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` // solidity-spec abi encoded bytes - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + From []byte `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` // sender address in evm address [20]byte fix-sized array format + To []byte `protobuf:"bytes,2,opt,name=to,proto3" json:"to,omitempty"` // contract address in evm address [20]byte fix-sized array format + Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` // solidity-spec abi encoded bytes } func (x *CallMsg) Reset() { *x = CallMsg{} - mi := &file_chains_evm_evm_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_chains_evm_evm_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *CallMsg) String() string { @@ -108,8 +400,8 @@ func (x *CallMsg) String() string { func (*CallMsg) ProtoMessage() {} func (x *CallMsg) ProtoReflect() protoreflect.Message { - mi := &file_chains_evm_evm_proto_msgTypes[0] - if x != nil { + mi := &file_chains_evm_evm_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -121,7 +413,7 @@ func (x *CallMsg) ProtoReflect() protoreflect.Message { // Deprecated: Use CallMsg.ProtoReflect.Descriptor instead. func (*CallMsg) Descriptor() ([]byte, []int) { - return file_chains_evm_evm_proto_rawDescGZIP(), []int{0} + return file_chains_evm_evm_proto_rawDescGZIP(), []int{4} } func (x *CallMsg) GetFrom() []byte { @@ -146,17 +438,20 @@ func (x *CallMsg) GetData() []byte { } type Topics struct { - state protoimpl.MessageState `protogen:"open.v1"` - Topic [][]byte `protobuf:"bytes,1,rep,name=topic,proto3" json:"topic,omitempty"` // in [32]byte fix-sized array format - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Topic [][]byte `protobuf:"bytes,1,rep,name=topic,proto3" json:"topic,omitempty"` // in [32]byte fix-sized array format } func (x *Topics) Reset() { *x = Topics{} - mi := &file_chains_evm_evm_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_chains_evm_evm_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Topics) String() string { @@ -166,8 +461,8 @@ func (x *Topics) String() string { func (*Topics) ProtoMessage() {} func (x *Topics) ProtoReflect() protoreflect.Message { - mi := &file_chains_evm_evm_proto_msgTypes[1] - if x != nil { + mi := &file_chains_evm_evm_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -179,7 +474,7 @@ func (x *Topics) ProtoReflect() protoreflect.Message { // Deprecated: Use Topics.ProtoReflect.Descriptor instead. func (*Topics) Descriptor() ([]byte, []int) { - return file_chains_evm_evm_proto_rawDescGZIP(), []int{1} + return file_chains_evm_evm_proto_rawDescGZIP(), []int{5} } func (x *Topics) GetTopic() [][]byte { @@ -191,26 +486,29 @@ func (x *Topics) GetTopic() [][]byte { // represents evm-style log type Log struct { - state protoimpl.MessageState `protogen:"open.v1"` - Address []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` // address of the contract emitted the log in evm address [20]byte fix-sized array format - Topics [][]byte `protobuf:"bytes,2,rep,name=topics,proto3" json:"topics,omitempty"` // indexed log fields, in [32]byte fix-sized array format - TxHash []byte `protobuf:"bytes,3,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` // hash of the transaction containing the log, in [32]byte fix-sized array format - BlockHash []byte `protobuf:"bytes,4,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` // hash of the block containing the log, in [32]byte fix-sized array format - Data []byte `protobuf:"bytes,5,opt,name=data,proto3" json:"data,omitempty"` // solidity-spec abi encoded log Data - EventSig []byte `protobuf:"bytes,6,opt,name=eventSig,proto3" json:"eventSig,omitempty"` // keccak256 of event signature, in [32]byte fix-sized array format - BlockNumber *pb.BigInt `protobuf:"bytes,7,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` // block number containing the log - TxIndex uint32 `protobuf:"varint,8,opt,name=tx_index,json=txIndex,proto3" json:"tx_index,omitempty"` // index of transaction emmited the log - Index uint32 `protobuf:"varint,9,opt,name=index,proto3" json:"index,omitempty"` // index of the Log within the intire block - Removed bool `protobuf:"varint,10,opt,name=removed,proto3" json:"removed,omitempty"` // flag if the log was removed during reorg - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Address []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` // address of the contract emitted the log in evm address [20]byte fix-sized array format + Topics [][]byte `protobuf:"bytes,2,rep,name=topics,proto3" json:"topics,omitempty"` // indexed log fields, in [32]byte fix-sized array format + TxHash []byte `protobuf:"bytes,3,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` // hash of the transaction containing the log, in [32]byte fix-sized array format + BlockHash []byte `protobuf:"bytes,4,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` // hash of the block containing the log, in [32]byte fix-sized array format + Data []byte `protobuf:"bytes,5,opt,name=data,proto3" json:"data,omitempty"` // solidity-spec abi encoded log Data + EventSig []byte `protobuf:"bytes,6,opt,name=eventSig,proto3" json:"eventSig,omitempty"` // keccak256 of event signature, in [32]byte fix-sized array format + BlockNumber *pb.BigInt `protobuf:"bytes,7,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` // block number containing the log + TxIndex uint32 `protobuf:"varint,8,opt,name=tx_index,json=txIndex,proto3" json:"tx_index,omitempty"` // index of transaction emmited the log + Index uint32 `protobuf:"varint,9,opt,name=index,proto3" json:"index,omitempty"` // index of the Log within the intire block + Removed bool `protobuf:"varint,10,opt,name=removed,proto3" json:"removed,omitempty"` // flag if the log was removed during reorg } func (x *Log) Reset() { *x = Log{} - mi := &file_chains_evm_evm_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_chains_evm_evm_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Log) String() string { @@ -220,8 +518,8 @@ func (x *Log) String() string { func (*Log) ProtoMessage() {} func (x *Log) ProtoReflect() protoreflect.Message { - mi := &file_chains_evm_evm_proto_msgTypes[2] - if x != nil { + mi := &file_chains_evm_evm_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -233,7 +531,7 @@ func (x *Log) ProtoReflect() protoreflect.Message { // Deprecated: Use Log.ProtoReflect.Descriptor instead. func (*Log) Descriptor() ([]byte, []int) { - return file_chains_evm_evm_proto_rawDescGZIP(), []int{2} + return file_chains_evm_evm_proto_rawDescGZIP(), []int{6} } func (x *Log) GetAddress() []byte { @@ -308,21 +606,24 @@ func (x *Log) GetRemoved() bool { // represents evm-style filter query type FilterQuery struct { - state protoimpl.MessageState `protogen:"open.v1"` - BlockHash []byte `protobuf:"bytes,1,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` // exact block (cant use from/to), in [32]byte fix-sized array format - FromBlock *pb.BigInt `protobuf:"bytes,2,opt,name=fromBlock,proto3" json:"fromBlock,omitempty"` // start block range - ToBlock *pb.BigInt `protobuf:"bytes,3,opt,name=toBlock,proto3" json:"toBlock,omitempty"` // end block range - Addresses [][]byte `protobuf:"bytes,4,rep,name=addresses,proto3" json:"addresses,omitempty"` // contract(s) to filter logs from in evm address [20]byte fix-sized array format - Topics []*Topics `protobuf:"bytes,5,rep,name=topics,proto3" json:"topics,omitempty"` // filter log by event signature and indexed args - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BlockHash []byte `protobuf:"bytes,1,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` // exact block (cant use from/to), in [32]byte fix-sized array format + FromBlock *pb.BigInt `protobuf:"bytes,2,opt,name=fromBlock,proto3" json:"fromBlock,omitempty"` // start block range + ToBlock *pb.BigInt `protobuf:"bytes,3,opt,name=toBlock,proto3" json:"toBlock,omitempty"` // end block range + Addresses [][]byte `protobuf:"bytes,4,rep,name=addresses,proto3" json:"addresses,omitempty"` // contract(s) to filter logs from in evm address [20]byte fix-sized array format + Topics []*Topics `protobuf:"bytes,5,rep,name=topics,proto3" json:"topics,omitempty"` // filter log by event signature and indexed args } func (x *FilterQuery) Reset() { *x = FilterQuery{} - mi := &file_chains_evm_evm_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_chains_evm_evm_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *FilterQuery) String() string { @@ -332,8 +633,8 @@ func (x *FilterQuery) String() string { func (*FilterQuery) ProtoMessage() {} func (x *FilterQuery) ProtoReflect() protoreflect.Message { - mi := &file_chains_evm_evm_proto_msgTypes[3] - if x != nil { + mi := &file_chains_evm_evm_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -345,7 +646,7 @@ func (x *FilterQuery) ProtoReflect() protoreflect.Message { // Deprecated: Use FilterQuery.ProtoReflect.Descriptor instead. func (*FilterQuery) Descriptor() ([]byte, []int) { - return file_chains_evm_evm_proto_rawDescGZIP(), []int{3} + return file_chains_evm_evm_proto_rawDescGZIP(), []int{7} } func (x *FilterQuery) GetBlockHash() []byte { @@ -385,23 +686,26 @@ func (x *FilterQuery) GetTopics() []*Topics { // represents evm-style transaction type Transaction struct { - state protoimpl.MessageState `protogen:"open.v1"` - Nonce uint64 `protobuf:"varint,1,opt,name=nonce,proto3" json:"nonce,omitempty"` // number of txs sent from sender - Gas uint64 `protobuf:"varint,2,opt,name=gas,proto3" json:"gas,omitempty"` // max gas allowed per execution (in gas units) - To []byte `protobuf:"bytes,3,opt,name=to,proto3" json:"to,omitempty"` // recipient address in evm address [20]byte fix-sized array format - Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"` // solidity-spec abi encoded input data for function call payload - Hash []byte `protobuf:"bytes,5,opt,name=hash,proto3" json:"hash,omitempty"` // transaction hash, in [32]byte fix-sized array format - Value *pb.BigInt `protobuf:"bytes,6,opt,name=value,proto3" json:"value,omitempty"` // amount of eth sent in wei - GasPrice *pb.BigInt `protobuf:"bytes,7,opt,name=gas_price,json=gasPrice,proto3" json:"gas_price,omitempty"` // price for a single gas unit in wei - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Nonce uint64 `protobuf:"varint,1,opt,name=nonce,proto3" json:"nonce,omitempty"` // number of txs sent from sender + Gas uint64 `protobuf:"varint,2,opt,name=gas,proto3" json:"gas,omitempty"` // max gas allowed per execution (in gas units) + To []byte `protobuf:"bytes,3,opt,name=to,proto3" json:"to,omitempty"` // recipient address in evm address [20]byte fix-sized array format + Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"` // solidity-spec abi encoded input data for function call payload + Hash []byte `protobuf:"bytes,5,opt,name=hash,proto3" json:"hash,omitempty"` // transaction hash, in [32]byte fix-sized array format + Value *pb.BigInt `protobuf:"bytes,6,opt,name=value,proto3" json:"value,omitempty"` // amount of eth sent in wei + GasPrice *pb.BigInt `protobuf:"bytes,7,opt,name=gas_price,json=gasPrice,proto3" json:"gas_price,omitempty"` // price for a single gas unit in wei } func (x *Transaction) Reset() { *x = Transaction{} - mi := &file_chains_evm_evm_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_chains_evm_evm_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Transaction) String() string { @@ -411,8 +715,8 @@ func (x *Transaction) String() string { func (*Transaction) ProtoMessage() {} func (x *Transaction) ProtoReflect() protoreflect.Message { - mi := &file_chains_evm_evm_proto_msgTypes[4] - if x != nil { + mi := &file_chains_evm_evm_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -424,7 +728,7 @@ func (x *Transaction) ProtoReflect() protoreflect.Message { // Deprecated: Use Transaction.ProtoReflect.Descriptor instead. func (*Transaction) Descriptor() ([]byte, []int) { - return file_chains_evm_evm_proto_rawDescGZIP(), []int{4} + return file_chains_evm_evm_proto_rawDescGZIP(), []int{8} } func (x *Transaction) GetNonce() uint64 { @@ -478,25 +782,28 @@ func (x *Transaction) GetGasPrice() *pb.BigInt { // represents evm-style receipt type Receipt struct { - state protoimpl.MessageState `protogen:"open.v1"` - Status uint64 `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"` // 1 for success 0 for failure - GasUsed uint64 `protobuf:"varint,2,opt,name=gas_used,json=gasUsed,proto3" json:"gas_used,omitempty"` // gas used by this transaction (in gas units) - TxIndex uint64 `protobuf:"varint,3,opt,name=tx_index,json=txIndex,proto3" json:"tx_index,omitempty"` // index of the transaction inside of the block - BlockHash []byte `protobuf:"bytes,4,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` // block hash containing the transaction - Logs []*Log `protobuf:"bytes,6,rep,name=logs,proto3" json:"logs,omitempty"` // logs emitted by this transaction - TxHash []byte `protobuf:"bytes,7,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` // hash of the transaction this receipt is for, in [32]byte fix-sized array format - EffectiveGasPrice *pb.BigInt `protobuf:"bytes,8,opt,name=effective_gas_price,json=effectiveGasPrice,proto3" json:"effective_gas_price,omitempty"` // actual gas price paid in wei (include after EIP-1559) - BlockNumber *pb.BigInt `protobuf:"bytes,9,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` // block number containing the transaction - ContractAddress []byte `protobuf:"bytes,10,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"` // address of the contract if this transaction created one in evm address [20]byte fix-sized array format - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Status uint64 `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"` // 1 for success 0 for failure + GasUsed uint64 `protobuf:"varint,2,opt,name=gas_used,json=gasUsed,proto3" json:"gas_used,omitempty"` // gas used by this transaction (in gas units) + TxIndex uint64 `protobuf:"varint,3,opt,name=tx_index,json=txIndex,proto3" json:"tx_index,omitempty"` // index of the transaction inside of the block + BlockHash []byte `protobuf:"bytes,4,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` // block hash containing the transaction + Logs []*Log `protobuf:"bytes,6,rep,name=logs,proto3" json:"logs,omitempty"` // logs emitted by this transaction + TxHash []byte `protobuf:"bytes,7,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` // hash of the transaction this receipt is for, in [32]byte fix-sized array format + EffectiveGasPrice *pb.BigInt `protobuf:"bytes,8,opt,name=effective_gas_price,json=effectiveGasPrice,proto3" json:"effective_gas_price,omitempty"` // actual gas price paid in wei (include after EIP-1559) + BlockNumber *pb.BigInt `protobuf:"bytes,9,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` // block number containing the transaction + ContractAddress []byte `protobuf:"bytes,10,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"` // address of the contract if this transaction created one in evm address [20]byte fix-sized array format } func (x *Receipt) Reset() { *x = Receipt{} - mi := &file_chains_evm_evm_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_chains_evm_evm_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Receipt) String() string { @@ -506,8 +813,8 @@ func (x *Receipt) String() string { func (*Receipt) ProtoMessage() {} func (x *Receipt) ProtoReflect() protoreflect.Message { - mi := &file_chains_evm_evm_proto_msgTypes[5] - if x != nil { + mi := &file_chains_evm_evm_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -519,7 +826,7 @@ func (x *Receipt) ProtoReflect() protoreflect.Message { // Deprecated: Use Receipt.ProtoReflect.Descriptor instead. func (*Receipt) Descriptor() ([]byte, []int) { - return file_chains_evm_evm_proto_rawDescGZIP(), []int{5} + return file_chains_evm_evm_proto_rawDescGZIP(), []int{9} } func (x *Receipt) GetStatus() uint64 { @@ -587,25 +894,28 @@ func (x *Receipt) GetContractAddress() []byte { // represents filter for polling and caching logs type LPFilter struct { - state protoimpl.MessageState `protogen:"open.v1"` - MaxLogsKept uint64 `protobuf:"varint,1,opt,name=max_logs_kept,json=maxLogsKept,proto3" json:"max_logs_kept,omitempty"` // maximum number of logs to retain ( 0 = unlimited ) - RetentionTime int64 `protobuf:"varint,2,opt,name=retention_time,json=retentionTime,proto3" json:"retention_time,omitempty"` // maximum amount of time to retain logs in seconds - LogsPerBlock uint64 `protobuf:"varint,3,opt,name=logs_per_block,json=logsPerBlock,proto3" json:"logs_per_block,omitempty"` // rate limit ( maximum # of logs per block, 0 = unlimited ) - Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` // filter name, has to persist for removing filter - Addresses [][]byte `protobuf:"bytes,5,rep,name=addresses,proto3" json:"addresses,omitempty"` // list of addresses to include in evm address [20]byte fix-sized array format - EventSigs [][]byte `protobuf:"bytes,6,rep,name=event_sigs,json=eventSigs,proto3" json:"event_sigs,omitempty"` // list of possible signatures (aka topic1), in [32]byte fix-sized array format - Topic2 [][]byte `protobuf:"bytes,7,rep,name=topic2,proto3" json:"topic2,omitempty"` // list of possible values for topic2, in [32]byte fix-sized array format - Topic3 [][]byte `protobuf:"bytes,8,rep,name=topic3,proto3" json:"topic3,omitempty"` // list of possible values for topic3, in [32]byte fix-sized array format - Topic4 [][]byte `protobuf:"bytes,9,rep,name=topic4,proto3" json:"topic4,omitempty"` // list of possible values for topic4, in [32]byte fix-sized array format - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + MaxLogsKept uint64 `protobuf:"varint,1,opt,name=max_logs_kept,json=maxLogsKept,proto3" json:"max_logs_kept,omitempty"` // maximum number of logs to retain ( 0 = unlimited ) + RetentionTime int64 `protobuf:"varint,2,opt,name=retention_time,json=retentionTime,proto3" json:"retention_time,omitempty"` // maximum amount of time to retain logs in seconds + LogsPerBlock uint64 `protobuf:"varint,3,opt,name=logs_per_block,json=logsPerBlock,proto3" json:"logs_per_block,omitempty"` // rate limit ( maximum # of logs per block, 0 = unlimited ) + Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` // filter name, has to persist for removing filter + Addresses [][]byte `protobuf:"bytes,5,rep,name=addresses,proto3" json:"addresses,omitempty"` // list of addresses to include in evm address [20]byte fix-sized array format + EventSigs [][]byte `protobuf:"bytes,6,rep,name=event_sigs,json=eventSigs,proto3" json:"event_sigs,omitempty"` // list of possible signatures (aka topic1), in [32]byte fix-sized array format + Topic2 [][]byte `protobuf:"bytes,7,rep,name=topic2,proto3" json:"topic2,omitempty"` // list of possible values for topic2, in [32]byte fix-sized array format + Topic3 [][]byte `protobuf:"bytes,8,rep,name=topic3,proto3" json:"topic3,omitempty"` // list of possible values for topic3, in [32]byte fix-sized array format + Topic4 [][]byte `protobuf:"bytes,9,rep,name=topic4,proto3" json:"topic4,omitempty"` // list of possible values for topic4, in [32]byte fix-sized array format } func (x *LPFilter) Reset() { *x = LPFilter{} - mi := &file_chains_evm_evm_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_chains_evm_evm_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *LPFilter) String() string { @@ -615,8 +925,8 @@ func (x *LPFilter) String() string { func (*LPFilter) ProtoMessage() {} func (x *LPFilter) ProtoReflect() protoreflect.Message { - mi := &file_chains_evm_evm_proto_msgTypes[6] - if x != nil { + mi := &file_chains_evm_evm_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -628,7 +938,7 @@ func (x *LPFilter) ProtoReflect() protoreflect.Message { // Deprecated: Use LPFilter.ProtoReflect.Descriptor instead. func (*LPFilter) Descriptor() ([]byte, []int) { - return file_chains_evm_evm_proto_rawDescGZIP(), []int{6} + return file_chains_evm_evm_proto_rawDescGZIP(), []int{10} } func (x *LPFilter) GetMaxLogsKept() uint64 { @@ -695,20 +1005,23 @@ func (x *LPFilter) GetTopic4() [][]byte { } type Head struct { - state protoimpl.MessageState `protogen:"open.v1"` - Timestamp uint64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // unix timestamp - BlockNumber *pb.BigInt `protobuf:"bytes,2,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` - Hash []byte `protobuf:"bytes,3,opt,name=hash,proto3" json:"hash,omitempty"` // in [32]byte fix-sized array format - ParentHash []byte `protobuf:"bytes,4,opt,name=parent_hash,json=parentHash,proto3" json:"parent_hash,omitempty"` // in [32]byte fix-sized array format - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Timestamp uint64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // unix timestamp + BlockNumber *pb.BigInt `protobuf:"bytes,2,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` + Hash []byte `protobuf:"bytes,3,opt,name=hash,proto3" json:"hash,omitempty"` // in [32]byte fix-sized array format + ParentHash []byte `protobuf:"bytes,4,opt,name=parent_hash,json=parentHash,proto3" json:"parent_hash,omitempty"` // in [32]byte fix-sized array format } func (x *Head) Reset() { *x = Head{} - mi := &file_chains_evm_evm_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_chains_evm_evm_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Head) String() string { @@ -718,8 +1031,8 @@ func (x *Head) String() string { func (*Head) ProtoMessage() {} func (x *Head) ProtoReflect() protoreflect.Message { - mi := &file_chains_evm_evm_proto_msgTypes[7] - if x != nil { + mi := &file_chains_evm_evm_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -731,7 +1044,7 @@ func (x *Head) ProtoReflect() protoreflect.Message { // Deprecated: Use Head.ProtoReflect.Descriptor instead. func (*Head) Descriptor() ([]byte, []int) { - return file_chains_evm_evm_proto_rawDescGZIP(), []int{7} + return file_chains_evm_evm_proto_rawDescGZIP(), []int{11} } func (x *Head) GetTimestamp() uint64 { @@ -763,21 +1076,24 @@ func (x *Head) GetParentHash() []byte { } type Expression struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Types that are valid to be assigned to Evaluator: + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Evaluator: // // *Expression_Primitive // *Expression_BooleanExpression - Evaluator isExpression_Evaluator `protobuf_oneof:"evaluator"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + Evaluator isExpression_Evaluator `protobuf_oneof:"evaluator"` } func (x *Expression) Reset() { *x = Expression{} - mi := &file_chains_evm_evm_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_chains_evm_evm_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Expression) String() string { @@ -787,8 +1103,8 @@ func (x *Expression) String() string { func (*Expression) ProtoMessage() {} func (x *Expression) ProtoReflect() protoreflect.Message { - mi := &file_chains_evm_evm_proto_msgTypes[8] - if x != nil { + mi := &file_chains_evm_evm_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -800,30 +1116,26 @@ func (x *Expression) ProtoReflect() protoreflect.Message { // Deprecated: Use Expression.ProtoReflect.Descriptor instead. func (*Expression) Descriptor() ([]byte, []int) { - return file_chains_evm_evm_proto_rawDescGZIP(), []int{8} + return file_chains_evm_evm_proto_rawDescGZIP(), []int{12} } -func (x *Expression) GetEvaluator() isExpression_Evaluator { - if x != nil { - return x.Evaluator +func (m *Expression) GetEvaluator() isExpression_Evaluator { + if m != nil { + return m.Evaluator } return nil } func (x *Expression) GetPrimitive() *Primitive { - if x != nil { - if x, ok := x.Evaluator.(*Expression_Primitive); ok { - return x.Primitive - } + if x, ok := x.GetEvaluator().(*Expression_Primitive); ok { + return x.Primitive } return nil } func (x *Expression) GetBooleanExpression() *BooleanExpression { - if x != nil { - if x, ok := x.Evaluator.(*Expression_BooleanExpression); ok { - return x.BooleanExpression - } + if x, ok := x.GetEvaluator().(*Expression_BooleanExpression); ok { + return x.BooleanExpression } return nil } @@ -845,18 +1157,21 @@ func (*Expression_Primitive) isExpression_Evaluator() {} func (*Expression_BooleanExpression) isExpression_Evaluator() {} type BooleanExpression struct { - state protoimpl.MessageState `protogen:"open.v1"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + BooleanOperator chain_common.BooleanOperator `protobuf:"varint,1,opt,name=boolean_operator,json=booleanOperator,proto3,enum=loop.chain.common.BooleanOperator" json:"boolean_operator,omitempty"` Expression []*Expression `protobuf:"bytes,2,rep,name=expression,proto3" json:"expression,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache } func (x *BooleanExpression) Reset() { *x = BooleanExpression{} - mi := &file_chains_evm_evm_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_chains_evm_evm_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *BooleanExpression) String() string { @@ -866,8 +1181,8 @@ func (x *BooleanExpression) String() string { func (*BooleanExpression) ProtoMessage() {} func (x *BooleanExpression) ProtoReflect() protoreflect.Message { - mi := &file_chains_evm_evm_proto_msgTypes[9] - if x != nil { + mi := &file_chains_evm_evm_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -879,7 +1194,7 @@ func (x *BooleanExpression) ProtoReflect() protoreflect.Message { // Deprecated: Use BooleanExpression.ProtoReflect.Descriptor instead. func (*BooleanExpression) Descriptor() ([]byte, []int) { - return file_chains_evm_evm_proto_rawDescGZIP(), []int{9} + return file_chains_evm_evm_proto_rawDescGZIP(), []int{13} } func (x *BooleanExpression) GetBooleanOperator() chain_common.BooleanOperator { @@ -897,17 +1212,20 @@ func (x *BooleanExpression) GetExpression() []*Expression { } type And struct { - state protoimpl.MessageState `protogen:"open.v1"` - Expr []*Expression `protobuf:"bytes,1,rep,name=expr,proto3" json:"expr,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Expr []*Expression `protobuf:"bytes,1,rep,name=expr,proto3" json:"expr,omitempty"` } func (x *And) Reset() { *x = And{} - mi := &file_chains_evm_evm_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_chains_evm_evm_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *And) String() string { @@ -917,8 +1235,8 @@ func (x *And) String() string { func (*And) ProtoMessage() {} func (x *And) ProtoReflect() protoreflect.Message { - mi := &file_chains_evm_evm_proto_msgTypes[10] - if x != nil { + mi := &file_chains_evm_evm_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -930,7 +1248,7 @@ func (x *And) ProtoReflect() protoreflect.Message { // Deprecated: Use And.ProtoReflect.Descriptor instead. func (*And) Descriptor() ([]byte, []int) { - return file_chains_evm_evm_proto_rawDescGZIP(), []int{10} + return file_chains_evm_evm_proto_rawDescGZIP(), []int{14} } func (x *And) GetExpr() []*Expression { @@ -941,17 +1259,20 @@ func (x *And) GetExpr() []*Expression { } type Or struct { - state protoimpl.MessageState `protogen:"open.v1"` - Expr []*Expression `protobuf:"bytes,1,rep,name=expr,proto3" json:"expr,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Expr []*Expression `protobuf:"bytes,1,rep,name=expr,proto3" json:"expr,omitempty"` } func (x *Or) Reset() { *x = Or{} - mi := &file_chains_evm_evm_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_chains_evm_evm_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Or) String() string { @@ -961,8 +1282,8 @@ func (x *Or) String() string { func (*Or) ProtoMessage() {} func (x *Or) ProtoReflect() protoreflect.Message { - mi := &file_chains_evm_evm_proto_msgTypes[11] - if x != nil { + mi := &file_chains_evm_evm_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -974,7 +1295,7 @@ func (x *Or) ProtoReflect() protoreflect.Message { // Deprecated: Use Or.ProtoReflect.Descriptor instead. func (*Or) Descriptor() ([]byte, []int) { - return file_chains_evm_evm_proto_rawDescGZIP(), []int{11} + return file_chains_evm_evm_proto_rawDescGZIP(), []int{15} } func (x *Or) GetExpr() []*Expression { @@ -985,18 +1306,21 @@ func (x *Or) GetExpr() []*Expression { } type HashValueComparator struct { - state protoimpl.MessageState `protogen:"open.v1"` - Values [][]byte `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"` // in [32]byte fix-sized array format - Operator chain_common.ComparisonOperator `protobuf:"varint,2,opt,name=operator,proto3,enum=loop.chain.common.ComparisonOperator" json:"operator,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Values [][]byte `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"` // in [32]byte fix-sized array format + Operator chain_common.ComparisonOperator `protobuf:"varint,2,opt,name=operator,proto3,enum=loop.chain.common.ComparisonOperator" json:"operator,omitempty"` } func (x *HashValueComparator) Reset() { *x = HashValueComparator{} - mi := &file_chains_evm_evm_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_chains_evm_evm_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *HashValueComparator) String() string { @@ -1006,8 +1330,8 @@ func (x *HashValueComparator) String() string { func (*HashValueComparator) ProtoMessage() {} func (x *HashValueComparator) ProtoReflect() protoreflect.Message { - mi := &file_chains_evm_evm_proto_msgTypes[12] - if x != nil { + mi := &file_chains_evm_evm_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1019,7 +1343,7 @@ func (x *HashValueComparator) ProtoReflect() protoreflect.Message { // Deprecated: Use HashValueComparator.ProtoReflect.Descriptor instead. func (*HashValueComparator) Descriptor() ([]byte, []int) { - return file_chains_evm_evm_proto_rawDescGZIP(), []int{12} + return file_chains_evm_evm_proto_rawDescGZIP(), []int{16} } func (x *HashValueComparator) GetValues() [][]byte { @@ -1037,18 +1361,21 @@ func (x *HashValueComparator) GetOperator() chain_common.ComparisonOperator { } type EventByWord struct { - state protoimpl.MessageState `protogen:"open.v1"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + WordIndex uint32 `protobuf:"varint,1,opt,name=word_index,json=wordIndex,proto3" json:"word_index,omitempty"` HashedValueComparers []*HashValueComparator `protobuf:"bytes,2,rep,name=hashed_value_comparers,json=hashedValueComparers,proto3" json:"hashed_value_comparers,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache } func (x *EventByWord) Reset() { *x = EventByWord{} - mi := &file_chains_evm_evm_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_chains_evm_evm_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *EventByWord) String() string { @@ -1058,8 +1385,8 @@ func (x *EventByWord) String() string { func (*EventByWord) ProtoMessage() {} func (x *EventByWord) ProtoReflect() protoreflect.Message { - mi := &file_chains_evm_evm_proto_msgTypes[13] - if x != nil { + mi := &file_chains_evm_evm_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1071,7 +1398,7 @@ func (x *EventByWord) ProtoReflect() protoreflect.Message { // Deprecated: Use EventByWord.ProtoReflect.Descriptor instead. func (*EventByWord) Descriptor() ([]byte, []int) { - return file_chains_evm_evm_proto_rawDescGZIP(), []int{13} + return file_chains_evm_evm_proto_rawDescGZIP(), []int{17} } func (x *EventByWord) GetWordIndex() uint32 { @@ -1089,18 +1416,21 @@ func (x *EventByWord) GetHashedValueComparers() []*HashValueComparator { } type EventByTopic struct { - state protoimpl.MessageState `protogen:"open.v1"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + Topic uint64 `protobuf:"varint,1,opt,name=topic,proto3" json:"topic,omitempty"` HashedValueComparers []*HashValueComparator `protobuf:"bytes,2,rep,name=hashed_value_comparers,json=hashedValueComparers,proto3" json:"hashed_value_comparers,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache } func (x *EventByTopic) Reset() { *x = EventByTopic{} - mi := &file_chains_evm_evm_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_chains_evm_evm_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *EventByTopic) String() string { @@ -1110,8 +1440,8 @@ func (x *EventByTopic) String() string { func (*EventByTopic) ProtoMessage() {} func (x *EventByTopic) ProtoReflect() protoreflect.Message { - mi := &file_chains_evm_evm_proto_msgTypes[14] - if x != nil { + mi := &file_chains_evm_evm_proto_msgTypes[18] + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1123,7 +1453,7 @@ func (x *EventByTopic) ProtoReflect() protoreflect.Message { // Deprecated: Use EventByTopic.ProtoReflect.Descriptor instead. func (*EventByTopic) Descriptor() ([]byte, []int) { - return file_chains_evm_evm_proto_rawDescGZIP(), []int{14} + return file_chains_evm_evm_proto_rawDescGZIP(), []int{18} } func (x *EventByTopic) GetTopic() uint64 { @@ -1143,24 +1473,27 @@ func (x *EventByTopic) GetHashedValueComparers() []*HashValueComparator { // evm-style primitives // can be used in combination with general primitives for querying tracked logs type Primitive struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Types that are valid to be assigned to Primitive: + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Primitive: // // *Primitive_GeneralPrimitive // *Primitive_ContractAddress // *Primitive_EventSig // *Primitive_EventByWord // *Primitive_EventByTopic - Primitive isPrimitive_Primitive `protobuf_oneof:"primitive"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + Primitive isPrimitive_Primitive `protobuf_oneof:"primitive"` } func (x *Primitive) Reset() { *x = Primitive{} - mi := &file_chains_evm_evm_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_chains_evm_evm_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Primitive) String() string { @@ -1170,8 +1503,8 @@ func (x *Primitive) String() string { func (*Primitive) ProtoMessage() {} func (x *Primitive) ProtoReflect() protoreflect.Message { - mi := &file_chains_evm_evm_proto_msgTypes[15] - if x != nil { + mi := &file_chains_evm_evm_proto_msgTypes[19] + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1183,57 +1516,47 @@ func (x *Primitive) ProtoReflect() protoreflect.Message { // Deprecated: Use Primitive.ProtoReflect.Descriptor instead. func (*Primitive) Descriptor() ([]byte, []int) { - return file_chains_evm_evm_proto_rawDescGZIP(), []int{15} + return file_chains_evm_evm_proto_rawDescGZIP(), []int{19} } -func (x *Primitive) GetPrimitive() isPrimitive_Primitive { - if x != nil { - return x.Primitive +func (m *Primitive) GetPrimitive() isPrimitive_Primitive { + if m != nil { + return m.Primitive } return nil } func (x *Primitive) GetGeneralPrimitive() *chain_common.Primitive { - if x != nil { - if x, ok := x.Primitive.(*Primitive_GeneralPrimitive); ok { - return x.GeneralPrimitive - } + if x, ok := x.GetPrimitive().(*Primitive_GeneralPrimitive); ok { + return x.GeneralPrimitive } return nil } func (x *Primitive) GetContractAddress() []byte { - if x != nil { - if x, ok := x.Primitive.(*Primitive_ContractAddress); ok { - return x.ContractAddress - } + if x, ok := x.GetPrimitive().(*Primitive_ContractAddress); ok { + return x.ContractAddress } return nil } func (x *Primitive) GetEventSig() []byte { - if x != nil { - if x, ok := x.Primitive.(*Primitive_EventSig); ok { - return x.EventSig - } + if x, ok := x.GetPrimitive().(*Primitive_EventSig); ok { + return x.EventSig } return nil } func (x *Primitive) GetEventByWord() *EventByWord { - if x != nil { - if x, ok := x.Primitive.(*Primitive_EventByWord); ok { - return x.EventByWord - } + if x, ok := x.GetPrimitive().(*Primitive_EventByWord); ok { + return x.EventByWord } return nil } func (x *Primitive) GetEventByTopic() *EventByTopic { - if x != nil { - if x, ok := x.Primitive.(*Primitive_EventByTopic); ok { - return x.EventByTopic - } + if x, ok := x.GetPrimitive().(*Primitive_EventByTopic); ok { + return x.EventByTopic } return nil } @@ -1274,18 +1597,21 @@ func (*Primitive_EventByTopic) isPrimitive_Primitive() {} // ----- Request/Reply Wrappers ----- type LatestAndFinalizedHeadReply struct { - state protoimpl.MessageState `protogen:"open.v1"` - Latest *Head `protobuf:"bytes,1,opt,name=latest,proto3" json:"latest,omitempty"` - Finalized *Head `protobuf:"bytes,2,opt,name=finalized,proto3" json:"finalized,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Latest *Head `protobuf:"bytes,1,opt,name=latest,proto3" json:"latest,omitempty"` + Finalized *Head `protobuf:"bytes,2,opt,name=finalized,proto3" json:"finalized,omitempty"` } func (x *LatestAndFinalizedHeadReply) Reset() { *x = LatestAndFinalizedHeadReply{} - mi := &file_chains_evm_evm_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_chains_evm_evm_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *LatestAndFinalizedHeadReply) String() string { @@ -1295,8 +1621,8 @@ func (x *LatestAndFinalizedHeadReply) String() string { func (*LatestAndFinalizedHeadReply) ProtoMessage() {} func (x *LatestAndFinalizedHeadReply) ProtoReflect() protoreflect.Message { - mi := &file_chains_evm_evm_proto_msgTypes[16] - if x != nil { + mi := &file_chains_evm_evm_proto_msgTypes[20] + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1308,7 +1634,7 @@ func (x *LatestAndFinalizedHeadReply) ProtoReflect() protoreflect.Message { // Deprecated: Use LatestAndFinalizedHeadReply.ProtoReflect.Descriptor instead. func (*LatestAndFinalizedHeadReply) Descriptor() ([]byte, []int) { - return file_chains_evm_evm_proto_rawDescGZIP(), []int{16} + return file_chains_evm_evm_proto_rawDescGZIP(), []int{20} } func (x *LatestAndFinalizedHeadReply) GetLatest() *Head { @@ -1333,18 +1659,21 @@ func (x *LatestAndFinalizedHeadReply) GetFinalized() *Head { // // Any positive value is treated as an explicit block height. type CallContractRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Call *CallMsg `protobuf:"bytes,1,opt,name=call,proto3" json:"call,omitempty"` - BlockNumber *pb.BigInt `protobuf:"bytes,2,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Call *CallMsg `protobuf:"bytes,1,opt,name=call,proto3" json:"call,omitempty"` + BlockNumber *pb.BigInt `protobuf:"bytes,2,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` } func (x *CallContractRequest) Reset() { *x = CallContractRequest{} - mi := &file_chains_evm_evm_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_chains_evm_evm_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *CallContractRequest) String() string { @@ -1354,8 +1683,8 @@ func (x *CallContractRequest) String() string { func (*CallContractRequest) ProtoMessage() {} func (x *CallContractRequest) ProtoReflect() protoreflect.Message { - mi := &file_chains_evm_evm_proto_msgTypes[17] - if x != nil { + mi := &file_chains_evm_evm_proto_msgTypes[21] + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1367,7 +1696,7 @@ func (x *CallContractRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CallContractRequest.ProtoReflect.Descriptor instead. func (*CallContractRequest) Descriptor() ([]byte, []int) { - return file_chains_evm_evm_proto_rawDescGZIP(), []int{17} + return file_chains_evm_evm_proto_rawDescGZIP(), []int{21} } func (x *CallContractRequest) GetCall() *CallMsg { @@ -1385,17 +1714,20 @@ func (x *CallContractRequest) GetBlockNumber() *pb.BigInt { } type CallContractReply struct { - state protoimpl.MessageState `protogen:"open.v1"` - Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` // solidity-spec abi encoded bytes - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` // solidity-spec abi encoded bytes } func (x *CallContractReply) Reset() { *x = CallContractReply{} - mi := &file_chains_evm_evm_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_chains_evm_evm_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *CallContractReply) String() string { @@ -1405,8 +1737,8 @@ func (x *CallContractReply) String() string { func (*CallContractReply) ProtoMessage() {} func (x *CallContractReply) ProtoReflect() protoreflect.Message { - mi := &file_chains_evm_evm_proto_msgTypes[18] - if x != nil { + mi := &file_chains_evm_evm_proto_msgTypes[22] + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1418,7 +1750,7 @@ func (x *CallContractReply) ProtoReflect() protoreflect.Message { // Deprecated: Use CallContractReply.ProtoReflect.Descriptor instead. func (*CallContractReply) Descriptor() ([]byte, []int) { - return file_chains_evm_evm_proto_rawDescGZIP(), []int{18} + return file_chains_evm_evm_proto_rawDescGZIP(), []int{22} } func (x *CallContractReply) GetData() []byte { @@ -1430,17 +1762,20 @@ func (x *CallContractReply) GetData() []byte { // GetTransactionFeeRequest has arguments for [github.com/smartcontractkit/chainlink-common/pkg/types.EVMService.GetTransactionFee]. type GetTransactionFeeRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - TransactionId string `protobuf:"bytes,1,opt,name=transaction_id,json=transactionId,proto3" json:"transaction_id,omitempty"` // idempotency key used when transaction was submitted - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TransactionId string `protobuf:"bytes,1,opt,name=transaction_id,json=transactionId,proto3" json:"transaction_id,omitempty"` // idempotency key used when transaction was submitted } func (x *GetTransactionFeeRequest) Reset() { *x = GetTransactionFeeRequest{} - mi := &file_chains_evm_evm_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_chains_evm_evm_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetTransactionFeeRequest) String() string { @@ -1450,8 +1785,8 @@ func (x *GetTransactionFeeRequest) String() string { func (*GetTransactionFeeRequest) ProtoMessage() {} func (x *GetTransactionFeeRequest) ProtoReflect() protoreflect.Message { - mi := &file_chains_evm_evm_proto_msgTypes[19] - if x != nil { + mi := &file_chains_evm_evm_proto_msgTypes[23] + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1463,7 +1798,7 @@ func (x *GetTransactionFeeRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetTransactionFeeRequest.ProtoReflect.Descriptor instead. func (*GetTransactionFeeRequest) Descriptor() ([]byte, []int) { - return file_chains_evm_evm_proto_rawDescGZIP(), []int{19} + return file_chains_evm_evm_proto_rawDescGZIP(), []int{23} } func (x *GetTransactionFeeRequest) GetTransactionId() string { @@ -1475,17 +1810,20 @@ func (x *GetTransactionFeeRequest) GetTransactionId() string { // GetTransactionFeeReply has return arguments for [github.com/smartcontractkit/chainlink-common/pkg/types.EVMService.GetTransactionFee]. type GetTransactionFeeReply struct { - state protoimpl.MessageState `protogen:"open.v1"` - TransactionFee *pb.BigInt `protobuf:"bytes,1,opt,name=transaction_fee,json=transactionFee,proto3" json:"transaction_fee,omitempty"` // transaction fee is the cost of transaction execution in Wei - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TransactionFee *pb.BigInt `protobuf:"bytes,1,opt,name=transaction_fee,json=transactionFee,proto3" json:"transaction_fee,omitempty"` // transaction fee is the cost of transaction execution in Wei } func (x *GetTransactionFeeReply) Reset() { *x = GetTransactionFeeReply{} - mi := &file_chains_evm_evm_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_chains_evm_evm_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetTransactionFeeReply) String() string { @@ -1495,8 +1833,8 @@ func (x *GetTransactionFeeReply) String() string { func (*GetTransactionFeeReply) ProtoMessage() {} func (x *GetTransactionFeeReply) ProtoReflect() protoreflect.Message { - mi := &file_chains_evm_evm_proto_msgTypes[20] - if x != nil { + mi := &file_chains_evm_evm_proto_msgTypes[24] + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1508,7 +1846,7 @@ func (x *GetTransactionFeeReply) ProtoReflect() protoreflect.Message { // Deprecated: Use GetTransactionFeeReply.ProtoReflect.Descriptor instead. func (*GetTransactionFeeReply) Descriptor() ([]byte, []int) { - return file_chains_evm_evm_proto_rawDescGZIP(), []int{20} + return file_chains_evm_evm_proto_rawDescGZIP(), []int{24} } func (x *GetTransactionFeeReply) GetTransactionFee() *pb.BigInt { @@ -1519,17 +1857,20 @@ func (x *GetTransactionFeeReply) GetTransactionFee() *pb.BigInt { } type FilterLogsRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - FilterQuery *FilterQuery `protobuf:"bytes,1,opt,name=filter_query,json=filterQuery,proto3" json:"filter_query,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + FilterQuery *FilterQuery `protobuf:"bytes,1,opt,name=filter_query,json=filterQuery,proto3" json:"filter_query,omitempty"` } func (x *FilterLogsRequest) Reset() { *x = FilterLogsRequest{} - mi := &file_chains_evm_evm_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_chains_evm_evm_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *FilterLogsRequest) String() string { @@ -1539,8 +1880,8 @@ func (x *FilterLogsRequest) String() string { func (*FilterLogsRequest) ProtoMessage() {} func (x *FilterLogsRequest) ProtoReflect() protoreflect.Message { - mi := &file_chains_evm_evm_proto_msgTypes[21] - if x != nil { + mi := &file_chains_evm_evm_proto_msgTypes[25] + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1552,7 +1893,7 @@ func (x *FilterLogsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use FilterLogsRequest.ProtoReflect.Descriptor instead. func (*FilterLogsRequest) Descriptor() ([]byte, []int) { - return file_chains_evm_evm_proto_rawDescGZIP(), []int{21} + return file_chains_evm_evm_proto_rawDescGZIP(), []int{25} } func (x *FilterLogsRequest) GetFilterQuery() *FilterQuery { @@ -1563,17 +1904,20 @@ func (x *FilterLogsRequest) GetFilterQuery() *FilterQuery { } type FilterLogsReply struct { - state protoimpl.MessageState `protogen:"open.v1"` - Logs []*Log `protobuf:"bytes,1,rep,name=logs,proto3" json:"logs,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Logs []*Log `protobuf:"bytes,1,rep,name=logs,proto3" json:"logs,omitempty"` } func (x *FilterLogsReply) Reset() { *x = FilterLogsReply{} - mi := &file_chains_evm_evm_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_chains_evm_evm_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *FilterLogsReply) String() string { @@ -1583,8 +1927,8 @@ func (x *FilterLogsReply) String() string { func (*FilterLogsReply) ProtoMessage() {} func (x *FilterLogsReply) ProtoReflect() protoreflect.Message { - mi := &file_chains_evm_evm_proto_msgTypes[22] - if x != nil { + mi := &file_chains_evm_evm_proto_msgTypes[26] + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1596,7 +1940,7 @@ func (x *FilterLogsReply) ProtoReflect() protoreflect.Message { // Deprecated: Use FilterLogsReply.ProtoReflect.Descriptor instead. func (*FilterLogsReply) Descriptor() ([]byte, []int) { - return file_chains_evm_evm_proto_rawDescGZIP(), []int{22} + return file_chains_evm_evm_proto_rawDescGZIP(), []int{26} } func (x *FilterLogsReply) GetLogs() []*Log { @@ -1607,18 +1951,21 @@ func (x *FilterLogsReply) GetLogs() []*Log { } type BalanceAtRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Account []byte `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` // in evm address [20]byte fix-sized array format - BlockNumber *pb.BigInt `protobuf:"bytes,2,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Account []byte `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` // in evm address [20]byte fix-sized array format + BlockNumber *pb.BigInt `protobuf:"bytes,2,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` } func (x *BalanceAtRequest) Reset() { *x = BalanceAtRequest{} - mi := &file_chains_evm_evm_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_chains_evm_evm_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *BalanceAtRequest) String() string { @@ -1628,8 +1975,8 @@ func (x *BalanceAtRequest) String() string { func (*BalanceAtRequest) ProtoMessage() {} func (x *BalanceAtRequest) ProtoReflect() protoreflect.Message { - mi := &file_chains_evm_evm_proto_msgTypes[23] - if x != nil { + mi := &file_chains_evm_evm_proto_msgTypes[27] + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1641,7 +1988,7 @@ func (x *BalanceAtRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use BalanceAtRequest.ProtoReflect.Descriptor instead. func (*BalanceAtRequest) Descriptor() ([]byte, []int) { - return file_chains_evm_evm_proto_rawDescGZIP(), []int{23} + return file_chains_evm_evm_proto_rawDescGZIP(), []int{27} } func (x *BalanceAtRequest) GetAccount() []byte { @@ -1659,17 +2006,20 @@ func (x *BalanceAtRequest) GetBlockNumber() *pb.BigInt { } type BalanceAtReply struct { - state protoimpl.MessageState `protogen:"open.v1"` - Balance *pb.BigInt `protobuf:"bytes,1,opt,name=balance,proto3" json:"balance,omitempty"` // Balance of the account in wei (10^-18 eth) - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Balance *pb.BigInt `protobuf:"bytes,1,opt,name=balance,proto3" json:"balance,omitempty"` // Balance of the account in wei (10^-18 eth) } func (x *BalanceAtReply) Reset() { *x = BalanceAtReply{} - mi := &file_chains_evm_evm_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_chains_evm_evm_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *BalanceAtReply) String() string { @@ -1679,8 +2029,8 @@ func (x *BalanceAtReply) String() string { func (*BalanceAtReply) ProtoMessage() {} func (x *BalanceAtReply) ProtoReflect() protoreflect.Message { - mi := &file_chains_evm_evm_proto_msgTypes[24] - if x != nil { + mi := &file_chains_evm_evm_proto_msgTypes[28] + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1692,7 +2042,7 @@ func (x *BalanceAtReply) ProtoReflect() protoreflect.Message { // Deprecated: Use BalanceAtReply.ProtoReflect.Descriptor instead. func (*BalanceAtReply) Descriptor() ([]byte, []int) { - return file_chains_evm_evm_proto_rawDescGZIP(), []int{24} + return file_chains_evm_evm_proto_rawDescGZIP(), []int{28} } func (x *BalanceAtReply) GetBalance() *pb.BigInt { @@ -1703,17 +2053,20 @@ func (x *BalanceAtReply) GetBalance() *pb.BigInt { } type EstimateGasRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Msg *CallMsg `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"` // simulates tx execution returns approximate amount of gas units needed - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Msg *CallMsg `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"` // simulates tx execution returns approximate amount of gas units needed } func (x *EstimateGasRequest) Reset() { *x = EstimateGasRequest{} - mi := &file_chains_evm_evm_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_chains_evm_evm_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *EstimateGasRequest) String() string { @@ -1723,8 +2076,8 @@ func (x *EstimateGasRequest) String() string { func (*EstimateGasRequest) ProtoMessage() {} func (x *EstimateGasRequest) ProtoReflect() protoreflect.Message { - mi := &file_chains_evm_evm_proto_msgTypes[25] - if x != nil { + mi := &file_chains_evm_evm_proto_msgTypes[29] + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1736,7 +2089,7 @@ func (x *EstimateGasRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use EstimateGasRequest.ProtoReflect.Descriptor instead. func (*EstimateGasRequest) Descriptor() ([]byte, []int) { - return file_chains_evm_evm_proto_rawDescGZIP(), []int{25} + return file_chains_evm_evm_proto_rawDescGZIP(), []int{29} } func (x *EstimateGasRequest) GetMsg() *CallMsg { @@ -1747,17 +2100,20 @@ func (x *EstimateGasRequest) GetMsg() *CallMsg { } type EstimateGasReply struct { - state protoimpl.MessageState `protogen:"open.v1"` - Gas uint64 `protobuf:"varint,1,opt,name=gas,proto3" json:"gas,omitempty"` // estimated amount of gas in gas units, needed for tx execution - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Gas uint64 `protobuf:"varint,1,opt,name=gas,proto3" json:"gas,omitempty"` // estimated amount of gas in gas units, needed for tx execution } func (x *EstimateGasReply) Reset() { *x = EstimateGasReply{} - mi := &file_chains_evm_evm_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_chains_evm_evm_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *EstimateGasReply) String() string { @@ -1767,8 +2123,8 @@ func (x *EstimateGasReply) String() string { func (*EstimateGasReply) ProtoMessage() {} func (x *EstimateGasReply) ProtoReflect() protoreflect.Message { - mi := &file_chains_evm_evm_proto_msgTypes[26] - if x != nil { + mi := &file_chains_evm_evm_proto_msgTypes[30] + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1780,7 +2136,7 @@ func (x *EstimateGasReply) ProtoReflect() protoreflect.Message { // Deprecated: Use EstimateGasReply.ProtoReflect.Descriptor instead. func (*EstimateGasReply) Descriptor() ([]byte, []int) { - return file_chains_evm_evm_proto_rawDescGZIP(), []int{26} + return file_chains_evm_evm_proto_rawDescGZIP(), []int{30} } func (x *EstimateGasReply) GetGas() uint64 { @@ -1791,17 +2147,20 @@ func (x *EstimateGasReply) GetGas() uint64 { } type GetTransactionByHashRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` // in [32]byte fix-sized array format - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` // in [32]byte fix-sized array format } func (x *GetTransactionByHashRequest) Reset() { *x = GetTransactionByHashRequest{} - mi := &file_chains_evm_evm_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_chains_evm_evm_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetTransactionByHashRequest) String() string { @@ -1811,8 +2170,8 @@ func (x *GetTransactionByHashRequest) String() string { func (*GetTransactionByHashRequest) ProtoMessage() {} func (x *GetTransactionByHashRequest) ProtoReflect() protoreflect.Message { - mi := &file_chains_evm_evm_proto_msgTypes[27] - if x != nil { + mi := &file_chains_evm_evm_proto_msgTypes[31] + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1824,7 +2183,7 @@ func (x *GetTransactionByHashRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetTransactionByHashRequest.ProtoReflect.Descriptor instead. func (*GetTransactionByHashRequest) Descriptor() ([]byte, []int) { - return file_chains_evm_evm_proto_rawDescGZIP(), []int{27} + return file_chains_evm_evm_proto_rawDescGZIP(), []int{31} } func (x *GetTransactionByHashRequest) GetHash() []byte { @@ -1835,17 +2194,20 @@ func (x *GetTransactionByHashRequest) GetHash() []byte { } type GetTransactionByHashReply struct { - state protoimpl.MessageState `protogen:"open.v1"` - Transaction *Transaction `protobuf:"bytes,1,opt,name=transaction,proto3" json:"transaction,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Transaction *Transaction `protobuf:"bytes,1,opt,name=transaction,proto3" json:"transaction,omitempty"` } func (x *GetTransactionByHashReply) Reset() { *x = GetTransactionByHashReply{} - mi := &file_chains_evm_evm_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_chains_evm_evm_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetTransactionByHashReply) String() string { @@ -1855,8 +2217,8 @@ func (x *GetTransactionByHashReply) String() string { func (*GetTransactionByHashReply) ProtoMessage() {} func (x *GetTransactionByHashReply) ProtoReflect() protoreflect.Message { - mi := &file_chains_evm_evm_proto_msgTypes[28] - if x != nil { + mi := &file_chains_evm_evm_proto_msgTypes[32] + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1868,7 +2230,7 @@ func (x *GetTransactionByHashReply) ProtoReflect() protoreflect.Message { // Deprecated: Use GetTransactionByHashReply.ProtoReflect.Descriptor instead. func (*GetTransactionByHashReply) Descriptor() ([]byte, []int) { - return file_chains_evm_evm_proto_rawDescGZIP(), []int{28} + return file_chains_evm_evm_proto_rawDescGZIP(), []int{32} } func (x *GetTransactionByHashReply) GetTransaction() *Transaction { @@ -1879,17 +2241,20 @@ func (x *GetTransactionByHashReply) GetTransaction() *Transaction { } type GetTransactionReceiptRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` // in [32]byte fix-sized array format - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` // in [32]byte fix-sized array format } func (x *GetTransactionReceiptRequest) Reset() { *x = GetTransactionReceiptRequest{} - mi := &file_chains_evm_evm_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_chains_evm_evm_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetTransactionReceiptRequest) String() string { @@ -1899,8 +2264,8 @@ func (x *GetTransactionReceiptRequest) String() string { func (*GetTransactionReceiptRequest) ProtoMessage() {} func (x *GetTransactionReceiptRequest) ProtoReflect() protoreflect.Message { - mi := &file_chains_evm_evm_proto_msgTypes[29] - if x != nil { + mi := &file_chains_evm_evm_proto_msgTypes[33] + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1912,7 +2277,7 @@ func (x *GetTransactionReceiptRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetTransactionReceiptRequest.ProtoReflect.Descriptor instead. func (*GetTransactionReceiptRequest) Descriptor() ([]byte, []int) { - return file_chains_evm_evm_proto_rawDescGZIP(), []int{29} + return file_chains_evm_evm_proto_rawDescGZIP(), []int{33} } func (x *GetTransactionReceiptRequest) GetHash() []byte { @@ -1923,17 +2288,20 @@ func (x *GetTransactionReceiptRequest) GetHash() []byte { } type GetTransactionReceiptReply struct { - state protoimpl.MessageState `protogen:"open.v1"` - Receipt *Receipt `protobuf:"bytes,1,opt,name=receipt,proto3" json:"receipt,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Receipt *Receipt `protobuf:"bytes,1,opt,name=receipt,proto3" json:"receipt,omitempty"` } func (x *GetTransactionReceiptReply) Reset() { *x = GetTransactionReceiptReply{} - mi := &file_chains_evm_evm_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_chains_evm_evm_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetTransactionReceiptReply) String() string { @@ -1943,8 +2311,8 @@ func (x *GetTransactionReceiptReply) String() string { func (*GetTransactionReceiptReply) ProtoMessage() {} func (x *GetTransactionReceiptReply) ProtoReflect() protoreflect.Message { - mi := &file_chains_evm_evm_proto_msgTypes[30] - if x != nil { + mi := &file_chains_evm_evm_proto_msgTypes[34] + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1956,7 +2324,7 @@ func (x *GetTransactionReceiptReply) ProtoReflect() protoreflect.Message { // Deprecated: Use GetTransactionReceiptReply.ProtoReflect.Descriptor instead. func (*GetTransactionReceiptReply) Descriptor() ([]byte, []int) { - return file_chains_evm_evm_proto_rawDescGZIP(), []int{30} + return file_chains_evm_evm_proto_rawDescGZIP(), []int{34} } func (x *GetTransactionReceiptReply) GetReceipt() *Receipt { @@ -1967,17 +2335,20 @@ func (x *GetTransactionReceiptReply) GetReceipt() *Receipt { } type RegisterLogTrackingRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Filter *LPFilter `protobuf:"bytes,1,opt,name=filter,proto3" json:"filter,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Filter *LPFilter `protobuf:"bytes,1,opt,name=filter,proto3" json:"filter,omitempty"` } func (x *RegisterLogTrackingRequest) Reset() { *x = RegisterLogTrackingRequest{} - mi := &file_chains_evm_evm_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_chains_evm_evm_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *RegisterLogTrackingRequest) String() string { @@ -1987,8 +2358,8 @@ func (x *RegisterLogTrackingRequest) String() string { func (*RegisterLogTrackingRequest) ProtoMessage() {} func (x *RegisterLogTrackingRequest) ProtoReflect() protoreflect.Message { - mi := &file_chains_evm_evm_proto_msgTypes[31] - if x != nil { + mi := &file_chains_evm_evm_proto_msgTypes[35] + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2000,7 +2371,7 @@ func (x *RegisterLogTrackingRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use RegisterLogTrackingRequest.ProtoReflect.Descriptor instead. func (*RegisterLogTrackingRequest) Descriptor() ([]byte, []int) { - return file_chains_evm_evm_proto_rawDescGZIP(), []int{31} + return file_chains_evm_evm_proto_rawDescGZIP(), []int{35} } func (x *RegisterLogTrackingRequest) GetFilter() *LPFilter { @@ -2011,17 +2382,20 @@ func (x *RegisterLogTrackingRequest) GetFilter() *LPFilter { } type UnregisterLogTrackingRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - FilterName string `protobuf:"bytes,1,opt,name=filter_name,json=filterName,proto3" json:"filter_name,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + FilterName string `protobuf:"bytes,1,opt,name=filter_name,json=filterName,proto3" json:"filter_name,omitempty"` } func (x *UnregisterLogTrackingRequest) Reset() { *x = UnregisterLogTrackingRequest{} - mi := &file_chains_evm_evm_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_chains_evm_evm_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *UnregisterLogTrackingRequest) String() string { @@ -2031,8 +2405,8 @@ func (x *UnregisterLogTrackingRequest) String() string { func (*UnregisterLogTrackingRequest) ProtoMessage() {} func (x *UnregisterLogTrackingRequest) ProtoReflect() protoreflect.Message { - mi := &file_chains_evm_evm_proto_msgTypes[32] - if x != nil { + mi := &file_chains_evm_evm_proto_msgTypes[36] + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2044,7 +2418,7 @@ func (x *UnregisterLogTrackingRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use UnregisterLogTrackingRequest.ProtoReflect.Descriptor instead. func (*UnregisterLogTrackingRequest) Descriptor() ([]byte, []int) { - return file_chains_evm_evm_proto_rawDescGZIP(), []int{32} + return file_chains_evm_evm_proto_rawDescGZIP(), []int{36} } func (x *UnregisterLogTrackingRequest) GetFilterName() string { @@ -2055,19 +2429,22 @@ func (x *UnregisterLogTrackingRequest) GetFilterName() string { } type QueryTrackedLogsRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + Expression []*Expression `protobuf:"bytes,1,rep,name=expression,proto3" json:"expression,omitempty"` LimitAndSort *chain_common.LimitAndSort `protobuf:"bytes,2,opt,name=limit_and_sort,json=limitAndSort,proto3" json:"limit_and_sort,omitempty"` ConfidenceLevel chain_common.Confidence `protobuf:"varint,3,opt,name=confidence_level,json=confidenceLevel,proto3,enum=loop.chain.common.Confidence" json:"confidence_level,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache } func (x *QueryTrackedLogsRequest) Reset() { *x = QueryTrackedLogsRequest{} - mi := &file_chains_evm_evm_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_chains_evm_evm_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *QueryTrackedLogsRequest) String() string { @@ -2077,8 +2454,8 @@ func (x *QueryTrackedLogsRequest) String() string { func (*QueryTrackedLogsRequest) ProtoMessage() {} func (x *QueryTrackedLogsRequest) ProtoReflect() protoreflect.Message { - mi := &file_chains_evm_evm_proto_msgTypes[33] - if x != nil { + mi := &file_chains_evm_evm_proto_msgTypes[37] + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2090,7 +2467,7 @@ func (x *QueryTrackedLogsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use QueryTrackedLogsRequest.ProtoReflect.Descriptor instead. func (*QueryTrackedLogsRequest) Descriptor() ([]byte, []int) { - return file_chains_evm_evm_proto_rawDescGZIP(), []int{33} + return file_chains_evm_evm_proto_rawDescGZIP(), []int{37} } func (x *QueryTrackedLogsRequest) GetExpression() []*Expression { @@ -2115,17 +2492,20 @@ func (x *QueryTrackedLogsRequest) GetConfidenceLevel() chain_common.Confidence { } type QueryTrackedLogsReply struct { - state protoimpl.MessageState `protogen:"open.v1"` - Logs []*Log `protobuf:"bytes,1,rep,name=logs,proto3" json:"logs,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Logs []*Log `protobuf:"bytes,1,rep,name=logs,proto3" json:"logs,omitempty"` } func (x *QueryTrackedLogsReply) Reset() { *x = QueryTrackedLogsReply{} - mi := &file_chains_evm_evm_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_chains_evm_evm_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *QueryTrackedLogsReply) String() string { @@ -2135,8 +2515,8 @@ func (x *QueryTrackedLogsReply) String() string { func (*QueryTrackedLogsReply) ProtoMessage() {} func (x *QueryTrackedLogsReply) ProtoReflect() protoreflect.Message { - mi := &file_chains_evm_evm_proto_msgTypes[34] - if x != nil { + mi := &file_chains_evm_evm_proto_msgTypes[38] + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2148,7 +2528,7 @@ func (x *QueryTrackedLogsReply) ProtoReflect() protoreflect.Message { // Deprecated: Use QueryTrackedLogsReply.ProtoReflect.Descriptor instead. func (*QueryTrackedLogsReply) Descriptor() ([]byte, []int) { - return file_chains_evm_evm_proto_rawDescGZIP(), []int{34} + return file_chains_evm_evm_proto_rawDescGZIP(), []int{38} } func (x *QueryTrackedLogsReply) GetLogs() []*Log { @@ -2159,17 +2539,20 @@ func (x *QueryTrackedLogsReply) GetLogs() []*Log { } type GetTransactionStatusRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - TransactionId string `protobuf:"bytes,1,opt,name=transaction_id,json=transactionId,proto3" json:"transaction_id,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TransactionId string `protobuf:"bytes,1,opt,name=transaction_id,json=transactionId,proto3" json:"transaction_id,omitempty"` } func (x *GetTransactionStatusRequest) Reset() { *x = GetTransactionStatusRequest{} - mi := &file_chains_evm_evm_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_chains_evm_evm_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetTransactionStatusRequest) String() string { @@ -2179,8 +2562,8 @@ func (x *GetTransactionStatusRequest) String() string { func (*GetTransactionStatusRequest) ProtoMessage() {} func (x *GetTransactionStatusRequest) ProtoReflect() protoreflect.Message { - mi := &file_chains_evm_evm_proto_msgTypes[35] - if x != nil { + mi := &file_chains_evm_evm_proto_msgTypes[39] + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2192,7 +2575,7 @@ func (x *GetTransactionStatusRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetTransactionStatusRequest.ProtoReflect.Descriptor instead. func (*GetTransactionStatusRequest) Descriptor() ([]byte, []int) { - return file_chains_evm_evm_proto_rawDescGZIP(), []int{35} + return file_chains_evm_evm_proto_rawDescGZIP(), []int{39} } func (x *GetTransactionStatusRequest) GetTransactionId() string { @@ -2203,17 +2586,20 @@ func (x *GetTransactionStatusRequest) GetTransactionId() string { } type GetTransactionStatusReply struct { - state protoimpl.MessageState `protogen:"open.v1"` - TransactionStatus TransactionStatus `protobuf:"varint,1,opt,name=transaction_status,json=transactionStatus,proto3,enum=loop.evm.TransactionStatus" json:"transaction_status,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TransactionStatus TransactionStatus `protobuf:"varint,1,opt,name=transaction_status,json=transactionStatus,proto3,enum=loop.evm.TransactionStatus" json:"transaction_status,omitempty"` } func (x *GetTransactionStatusReply) Reset() { *x = GetTransactionStatusReply{} - mi := &file_chains_evm_evm_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_chains_evm_evm_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetTransactionStatusReply) String() string { @@ -2223,8 +2609,8 @@ func (x *GetTransactionStatusReply) String() string { func (*GetTransactionStatusReply) ProtoMessage() {} func (x *GetTransactionStatusReply) ProtoReflect() protoreflect.Message { - mi := &file_chains_evm_evm_proto_msgTypes[36] - if x != nil { + mi := &file_chains_evm_evm_proto_msgTypes[40] + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2236,318 +2622,561 @@ func (x *GetTransactionStatusReply) ProtoReflect() protoreflect.Message { // Deprecated: Use GetTransactionStatusReply.ProtoReflect.Descriptor instead. func (*GetTransactionStatusReply) Descriptor() ([]byte, []int) { - return file_chains_evm_evm_proto_rawDescGZIP(), []int{36} + return file_chains_evm_evm_proto_rawDescGZIP(), []int{40} } func (x *GetTransactionStatusReply) GetTransactionStatus() TransactionStatus { if x != nil { return x.TransactionStatus } - return TransactionStatus_TRANSACTION_STATUS_UNKNOWN + return TransactionStatus_TX_SUCCESS } var File_chains_evm_evm_proto protoreflect.FileDescriptor -const file_chains_evm_evm_proto_rawDesc = "" + - "\n" + - "\x14chains/evm/evm.proto\x12\bloop.evm\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1dloop/chain-common/query.proto\x1a\x16values/pb/values.proto\"A\n" + - "\aCallMsg\x12\x12\n" + - "\x04from\x18\x01 \x01(\fR\x04from\x12\x0e\n" + - "\x02to\x18\x02 \x01(\fR\x02to\x12\x12\n" + - "\x04data\x18\x03 \x01(\fR\x04data\"\x1e\n" + - "\x06Topics\x12\x14\n" + - "\x05topic\x18\x01 \x03(\fR\x05topic\"\x9d\x02\n" + - "\x03Log\x12\x18\n" + - "\aaddress\x18\x01 \x01(\fR\aaddress\x12\x16\n" + - "\x06topics\x18\x02 \x03(\fR\x06topics\x12\x17\n" + - "\atx_hash\x18\x03 \x01(\fR\x06txHash\x12\x1d\n" + - "\n" + - "block_hash\x18\x04 \x01(\fR\tblockHash\x12\x12\n" + - "\x04data\x18\x05 \x01(\fR\x04data\x12\x1a\n" + - "\beventSig\x18\x06 \x01(\fR\beventSig\x121\n" + - "\fblock_number\x18\a \x01(\v2\x0e.values.BigIntR\vblockNumber\x12\x19\n" + - "\btx_index\x18\b \x01(\rR\atxIndex\x12\x14\n" + - "\x05index\x18\t \x01(\rR\x05index\x12\x18\n" + - "\aremoved\x18\n" + - " \x01(\bR\aremoved\"\xcc\x01\n" + - "\vFilterQuery\x12\x1d\n" + - "\n" + - "block_hash\x18\x01 \x01(\fR\tblockHash\x12,\n" + - "\tfromBlock\x18\x02 \x01(\v2\x0e.values.BigIntR\tfromBlock\x12(\n" + - "\atoBlock\x18\x03 \x01(\v2\x0e.values.BigIntR\atoBlock\x12\x1c\n" + - "\taddresses\x18\x04 \x03(\fR\taddresses\x12(\n" + - "\x06topics\x18\x05 \x03(\v2\x10.loop.evm.TopicsR\x06topics\"\xc0\x01\n" + - "\vTransaction\x12\x14\n" + - "\x05nonce\x18\x01 \x01(\x04R\x05nonce\x12\x10\n" + - "\x03gas\x18\x02 \x01(\x04R\x03gas\x12\x0e\n" + - "\x02to\x18\x03 \x01(\fR\x02to\x12\x12\n" + - "\x04data\x18\x04 \x01(\fR\x04data\x12\x12\n" + - "\x04hash\x18\x05 \x01(\fR\x04hash\x12$\n" + - "\x05value\x18\x06 \x01(\v2\x0e.values.BigIntR\x05value\x12+\n" + - "\tgas_price\x18\a \x01(\v2\x0e.values.BigIntR\bgasPrice\"\xd0\x02\n" + - "\aReceipt\x12\x16\n" + - "\x06status\x18\x01 \x01(\x04R\x06status\x12\x19\n" + - "\bgas_used\x18\x02 \x01(\x04R\agasUsed\x12\x19\n" + - "\btx_index\x18\x03 \x01(\x04R\atxIndex\x12\x1d\n" + - "\n" + - "block_hash\x18\x04 \x01(\fR\tblockHash\x12!\n" + - "\x04logs\x18\x06 \x03(\v2\r.loop.evm.LogR\x04logs\x12\x17\n" + - "\atx_hash\x18\a \x01(\fR\x06txHash\x12>\n" + - "\x13effective_gas_price\x18\b \x01(\v2\x0e.values.BigIntR\x11effectiveGasPrice\x121\n" + - "\fblock_number\x18\t \x01(\v2\x0e.values.BigIntR\vblockNumber\x12)\n" + - "\x10contract_address\x18\n" + - " \x01(\fR\x0fcontractAddress\"\x94\x02\n" + - "\bLPFilter\x12\"\n" + - "\rmax_logs_kept\x18\x01 \x01(\x04R\vmaxLogsKept\x12%\n" + - "\x0eretention_time\x18\x02 \x01(\x03R\rretentionTime\x12$\n" + - "\x0elogs_per_block\x18\x03 \x01(\x04R\flogsPerBlock\x12\x12\n" + - "\x04name\x18\x04 \x01(\tR\x04name\x12\x1c\n" + - "\taddresses\x18\x05 \x03(\fR\taddresses\x12\x1d\n" + - "\n" + - "event_sigs\x18\x06 \x03(\fR\teventSigs\x12\x16\n" + - "\x06topic2\x18\a \x03(\fR\x06topic2\x12\x16\n" + - "\x06topic3\x18\b \x03(\fR\x06topic3\x12\x16\n" + - "\x06topic4\x18\t \x03(\fR\x06topic4\"\x8c\x01\n" + - "\x04Head\x12\x1c\n" + - "\ttimestamp\x18\x01 \x01(\x04R\ttimestamp\x121\n" + - "\fblock_number\x18\x02 \x01(\v2\x0e.values.BigIntR\vblockNumber\x12\x12\n" + - "\x04hash\x18\x03 \x01(\fR\x04hash\x12\x1f\n" + - "\vparent_hash\x18\x04 \x01(\fR\n" + - "parentHash\"\x9c\x01\n" + - "\n" + - "Expression\x123\n" + - "\tprimitive\x18\x01 \x01(\v2\x13.loop.evm.PrimitiveH\x00R\tprimitive\x12L\n" + - "\x12boolean_expression\x18\x02 \x01(\v2\x1b.loop.evm.BooleanExpressionH\x00R\x11booleanExpressionB\v\n" + - "\tevaluator\"\x98\x01\n" + - "\x11BooleanExpression\x12M\n" + - "\x10boolean_operator\x18\x01 \x01(\x0e2\".loop.chain.common.BooleanOperatorR\x0fbooleanOperator\x124\n" + - "\n" + - "expression\x18\x02 \x03(\v2\x14.loop.evm.ExpressionR\n" + - "expression\"/\n" + - "\x03And\x12(\n" + - "\x04expr\x18\x01 \x03(\v2\x14.loop.evm.ExpressionR\x04expr\".\n" + - "\x02Or\x12(\n" + - "\x04expr\x18\x01 \x03(\v2\x14.loop.evm.ExpressionR\x04expr\"p\n" + - "\x13HashValueComparator\x12\x16\n" + - "\x06values\x18\x01 \x03(\fR\x06values\x12A\n" + - "\boperator\x18\x02 \x01(\x0e2%.loop.chain.common.ComparisonOperatorR\boperator\"\x81\x01\n" + - "\vEventByWord\x12\x1d\n" + - "\n" + - "word_index\x18\x01 \x01(\rR\twordIndex\x12S\n" + - "\x16hashed_value_comparers\x18\x02 \x03(\v2\x1d.loop.evm.HashValueComparatorR\x14hashedValueComparers\"y\n" + - "\fEventByTopic\x12\x14\n" + - "\x05topic\x18\x01 \x01(\x04R\x05topic\x12S\n" + - "\x16hashed_value_comparers\x18\x02 \x03(\v2\x1d.loop.evm.HashValueComparatorR\x14hashedValueComparers\"\xae\x02\n" + - "\tPrimitive\x12K\n" + - "\x11general_primitive\x18\x01 \x01(\v2\x1c.loop.chain.common.PrimitiveH\x00R\x10generalPrimitive\x12+\n" + - "\x10contract_address\x18\x02 \x01(\fH\x00R\x0fcontractAddress\x12\x1d\n" + - "\tevent_sig\x18\x03 \x01(\fH\x00R\beventSig\x12;\n" + - "\revent_by_word\x18\x04 \x01(\v2\x15.loop.evm.EventByWordH\x00R\veventByWord\x12>\n" + - "\x0eevent_by_topic\x18\x05 \x01(\v2\x16.loop.evm.EventByTopicH\x00R\feventByTopicB\v\n" + - "\tprimitive\"s\n" + - "\x1bLatestAndFinalizedHeadReply\x12&\n" + - "\x06latest\x18\x01 \x01(\v2\x0e.loop.evm.HeadR\x06latest\x12,\n" + - "\tfinalized\x18\x02 \x01(\v2\x0e.loop.evm.HeadR\tfinalized\"o\n" + - "\x13CallContractRequest\x12%\n" + - "\x04call\x18\x01 \x01(\v2\x11.loop.evm.CallMsgR\x04call\x121\n" + - "\fblock_number\x18\x02 \x01(\v2\x0e.values.BigIntR\vblockNumber\"'\n" + - "\x11CallContractReply\x12\x12\n" + - "\x04data\x18\x01 \x01(\fR\x04data\"A\n" + - "\x18GetTransactionFeeRequest\x12%\n" + - "\x0etransaction_id\x18\x01 \x01(\tR\rtransactionId\"Q\n" + - "\x16GetTransactionFeeReply\x127\n" + - "\x0ftransaction_fee\x18\x01 \x01(\v2\x0e.values.BigIntR\x0etransactionFee\"M\n" + - "\x11FilterLogsRequest\x128\n" + - "\ffilter_query\x18\x01 \x01(\v2\x15.loop.evm.FilterQueryR\vfilterQuery\"4\n" + - "\x0fFilterLogsReply\x12!\n" + - "\x04logs\x18\x01 \x03(\v2\r.loop.evm.LogR\x04logs\"_\n" + - "\x10BalanceAtRequest\x12\x18\n" + - "\aaccount\x18\x01 \x01(\fR\aaccount\x121\n" + - "\fblock_number\x18\x02 \x01(\v2\x0e.values.BigIntR\vblockNumber\":\n" + - "\x0eBalanceAtReply\x12(\n" + - "\abalance\x18\x01 \x01(\v2\x0e.values.BigIntR\abalance\"9\n" + - "\x12EstimateGasRequest\x12#\n" + - "\x03msg\x18\x01 \x01(\v2\x11.loop.evm.CallMsgR\x03msg\"$\n" + - "\x10EstimateGasReply\x12\x10\n" + - "\x03gas\x18\x01 \x01(\x04R\x03gas\"1\n" + - "\x1bGetTransactionByHashRequest\x12\x12\n" + - "\x04hash\x18\x01 \x01(\fR\x04hash\"T\n" + - "\x19GetTransactionByHashReply\x127\n" + - "\vtransaction\x18\x01 \x01(\v2\x15.loop.evm.TransactionR\vtransaction\"2\n" + - "\x1cGetTransactionReceiptRequest\x12\x12\n" + - "\x04hash\x18\x01 \x01(\fR\x04hash\"I\n" + - "\x1aGetTransactionReceiptReply\x12+\n" + - "\areceipt\x18\x01 \x01(\v2\x11.loop.evm.ReceiptR\areceipt\"H\n" + - "\x1aRegisterLogTrackingRequest\x12*\n" + - "\x06filter\x18\x01 \x01(\v2\x12.loop.evm.LPFilterR\x06filter\"?\n" + - "\x1cUnregisterLogTrackingRequest\x12\x1f\n" + - "\vfilter_name\x18\x01 \x01(\tR\n" + - "filterName\"\xe0\x01\n" + - "\x17QueryTrackedLogsRequest\x124\n" + - "\n" + - "expression\x18\x01 \x03(\v2\x14.loop.evm.ExpressionR\n" + - "expression\x12E\n" + - "\x0elimit_and_sort\x18\x02 \x01(\v2\x1f.loop.chain.common.LimitAndSortR\flimitAndSort\x12H\n" + - "\x10confidence_level\x18\x03 \x01(\x0e2\x1d.loop.chain.common.ConfidenceR\x0fconfidenceLevel\":\n" + - "\x15QueryTrackedLogsReply\x12!\n" + - "\x04logs\x18\x01 \x03(\v2\r.loop.evm.LogR\x04logs\"D\n" + - "\x1bGetTransactionStatusRequest\x12%\n" + - "\x0etransaction_id\x18\x01 \x01(\tR\rtransactionId\"g\n" + - "\x19GetTransactionStatusReply\x12J\n" + - "\x12transaction_status\x18\x01 \x01(\x0e2\x1b.loop.evm.TransactionStatusR\x11transactionStatus*\xd6\x01\n" + - "\x11TransactionStatus\x12\x1e\n" + - "\x1aTRANSACTION_STATUS_UNKNOWN\x10\x00\x12\x1e\n" + - "\x1aTRANSACTION_STATUS_PENDING\x10\x01\x12\"\n" + - "\x1eTRANSACTION_STATUS_UNCONFIRMED\x10\x02\x12 \n" + - "\x1cTRANSACTION_STATUS_FINALIZED\x10\x03\x12\x1d\n" + - "\x19TRANSACTION_STATUS_FAILED\x10\x04\x12\x1c\n" + - "\x18TRANSACTION_STATUS_FATAL\x10\x052\x8e\b\n" + - "\x03EVM\x12[\n" + - "\x11GetTransactionFee\x12\".loop.evm.GetTransactionFeeRequest\x1a .loop.evm.GetTransactionFeeReply\"\x00\x12J\n" + - "\fCallContract\x12\x1d.loop.evm.CallContractRequest\x1a\x1b.loop.evm.CallContractReply\x12D\n" + - "\n" + - "FilterLogs\x12\x1b.loop.evm.FilterLogsRequest\x1a\x19.loop.evm.FilterLogsReply\x12A\n" + - "\tBalanceAt\x12\x1a.loop.evm.BalanceAtRequest\x1a\x18.loop.evm.BalanceAtReply\x12G\n" + - "\vEstimateGas\x12\x1c.loop.evm.EstimateGasRequest\x1a\x1a.loop.evm.EstimateGasReply\x12b\n" + - "\x14GetTransactionByHash\x12%.loop.evm.GetTransactionByHashRequest\x1a#.loop.evm.GetTransactionByHashReply\x12e\n" + - "\x15GetTransactionReceipt\x12&.loop.evm.GetTransactionReceiptRequest\x1a$.loop.evm.GetTransactionReceiptReply\x12W\n" + - "\x16LatestAndFinalizedHead\x12\x16.google.protobuf.Empty\x1a%.loop.evm.LatestAndFinalizedHeadReply\x12V\n" + - "\x10QueryTrackedLogs\x12!.loop.evm.QueryTrackedLogsRequest\x1a\x1f.loop.evm.QueryTrackedLogsReply\x12S\n" + - "\x13RegisterLogTracking\x12$.loop.evm.RegisterLogTrackingRequest\x1a\x16.google.protobuf.Empty\x12W\n" + - "\x15UnregisterLogTracking\x12&.loop.evm.UnregisterLogTrackingRequest\x1a\x16.google.protobuf.Empty\x12b\n" + - "\x14GetTransactionStatus\x12%.loop.evm.GetTransactionStatusRequest\x1a#.loop.evm.GetTransactionStatusReplyB=Z;github.com/smartcontractkit/chainlink-common/pkg/chains/evmb\x06proto3" +var file_chains_evm_evm_proto_rawDesc = []byte{ + 0x0a, 0x14, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x73, 0x2f, 0x65, 0x76, 0x6d, 0x2f, 0x65, 0x76, 0x6d, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x65, 0x76, 0x6d, + 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x6c, + 0x6f, 0x6f, 0x70, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2d, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x16, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x73, 0x2f, 0x70, 0x62, 0x2f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x84, 0x01, 0x0a, 0x0c, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x52, + 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x61, 0x77, 0x5f, 0x72, 0x65, 0x70, + 0x6f, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x72, 0x61, 0x77, 0x52, 0x65, + 0x70, 0x6f, 0x72, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x63, + 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x72, 0x65, + 0x70, 0x6f, 0x72, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x73, + 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0c, 0x52, + 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x02, 0x69, 0x64, 0x22, 0x28, 0x0a, 0x09, 0x47, + 0x61, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x61, 0x73, 0x5f, + 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x67, 0x61, 0x73, + 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x22, 0x94, 0x01, 0x0a, 0x12, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, + 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, + 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, + 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x12, 0x2e, 0x0a, 0x06, 0x72, 0x65, 0x70, 0x6f, + 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, + 0x65, 0x76, 0x6d, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, + 0x52, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x32, 0x0a, 0x0a, 0x67, 0x61, 0x73, 0x5f, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6c, + 0x6f, 0x6f, 0x70, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x47, 0x61, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x52, 0x09, 0x67, 0x61, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x96, 0x02, 0x0a, + 0x10, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x70, 0x6c, + 0x79, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x78, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x65, 0x76, 0x6d, 0x2e, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x52, 0x08, 0x74, 0x78, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x76, 0x0a, 0x22, 0x72, + 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, + 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x29, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x65, + 0x76, 0x6d, 0x2e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x74, 0x72, + 0x61, 0x63, 0x74, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x52, 0x1f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x74, + 0x72, 0x61, 0x63, 0x74, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x12, 0x37, 0x0a, 0x0f, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x65, 0x65, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x2e, 0x42, + 0x69, 0x67, 0x49, 0x6e, 0x74, 0x52, 0x0e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x46, 0x65, 0x65, 0x22, 0x41, 0x0a, 0x07, 0x43, 0x61, 0x6c, 0x6c, 0x4d, 0x73, 0x67, + 0x12, 0x12, 0x0a, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, + 0x66, 0x72, 0x6f, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x02, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x1e, 0x0a, 0x06, 0x54, 0x6f, 0x70, 0x69, + 0x63, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0c, 0x52, 0x05, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x22, 0x9d, 0x02, 0x0a, 0x03, 0x4c, 0x6f, 0x67, + 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x6f, + 0x70, 0x69, 0x63, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x06, 0x74, 0x6f, 0x70, 0x69, + 0x63, 0x73, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x06, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, + 0x74, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1a, + 0x0a, 0x08, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x53, 0x69, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x08, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x53, 0x69, 0x67, 0x12, 0x31, 0x0a, 0x0c, 0x62, 0x6c, + 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x0e, 0x2e, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x2e, 0x42, 0x69, 0x67, 0x49, 0x6e, 0x74, + 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x19, 0x0a, + 0x08, 0x74, 0x78, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x07, 0x74, 0x78, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, + 0x78, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x18, + 0x0a, 0x07, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x07, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x22, 0xcc, 0x01, 0x0a, 0x0b, 0x46, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x62, 0x6c, + 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12, 0x2c, 0x0a, 0x09, 0x66, 0x72, 0x6f, 0x6d, 0x42, + 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x73, 0x2e, 0x42, 0x69, 0x67, 0x49, 0x6e, 0x74, 0x52, 0x09, 0x66, 0x72, 0x6f, 0x6d, + 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x28, 0x0a, 0x07, 0x74, 0x6f, 0x42, 0x6c, 0x6f, 0x63, 0x6b, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x2e, + 0x42, 0x69, 0x67, 0x49, 0x6e, 0x74, 0x52, 0x07, 0x74, 0x6f, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, + 0x1c, 0x0a, 0x09, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, + 0x28, 0x0c, 0x52, 0x09, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x12, 0x28, 0x0a, + 0x06, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, + 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x73, 0x52, + 0x06, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x73, 0x22, 0xc0, 0x01, 0x0a, 0x0b, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x10, 0x0a, + 0x03, 0x67, 0x61, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x67, 0x61, 0x73, 0x12, + 0x0e, 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x02, 0x74, 0x6f, 0x12, + 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, + 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x24, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x2e, + 0x42, 0x69, 0x67, 0x49, 0x6e, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2b, 0x0a, + 0x09, 0x67, 0x61, 0x73, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x0e, 0x2e, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x2e, 0x42, 0x69, 0x67, 0x49, 0x6e, 0x74, + 0x52, 0x08, 0x67, 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x22, 0xd0, 0x02, 0x0a, 0x07, 0x52, + 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x19, + 0x0a, 0x08, 0x67, 0x61, 0x73, 0x5f, 0x75, 0x73, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x07, 0x67, 0x61, 0x73, 0x55, 0x73, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x78, 0x5f, + 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x74, 0x78, 0x49, + 0x6e, 0x64, 0x65, 0x78, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, + 0x73, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, + 0x61, 0x73, 0x68, 0x12, 0x21, 0x0a, 0x04, 0x6c, 0x6f, 0x67, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x0d, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x4c, 0x6f, 0x67, + 0x52, 0x04, 0x6c, 0x6f, 0x67, 0x73, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, + 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x12, + 0x3e, 0x0a, 0x13, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x67, 0x61, 0x73, + 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x73, 0x2e, 0x42, 0x69, 0x67, 0x49, 0x6e, 0x74, 0x52, 0x11, 0x65, 0x66, + 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x47, 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, + 0x31, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, + 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x2e, 0x42, + 0x69, 0x67, 0x49, 0x6e, 0x74, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, + 0x65, 0x72, 0x12, 0x29, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x94, 0x02, + 0x0a, 0x08, 0x4c, 0x50, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x22, 0x0a, 0x0d, 0x6d, 0x61, + 0x78, 0x5f, 0x6c, 0x6f, 0x67, 0x73, 0x5f, 0x6b, 0x65, 0x70, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x0b, 0x6d, 0x61, 0x78, 0x4c, 0x6f, 0x67, 0x73, 0x4b, 0x65, 0x70, 0x74, 0x12, 0x25, + 0x0a, 0x0e, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, + 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x6c, 0x6f, 0x67, 0x73, 0x5f, 0x70, 0x65, + 0x72, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x6c, + 0x6f, 0x67, 0x73, 0x50, 0x65, 0x72, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x12, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x1c, 0x0a, 0x09, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, + 0x28, 0x0c, 0x52, 0x09, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x12, 0x1d, 0x0a, + 0x0a, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x69, 0x67, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, + 0x0c, 0x52, 0x09, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x53, 0x69, 0x67, 0x73, 0x12, 0x16, 0x0a, 0x06, + 0x74, 0x6f, 0x70, 0x69, 0x63, 0x32, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x06, 0x74, 0x6f, + 0x70, 0x69, 0x63, 0x32, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x33, 0x18, 0x08, + 0x20, 0x03, 0x28, 0x0c, 0x52, 0x06, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x33, 0x12, 0x16, 0x0a, 0x06, + 0x74, 0x6f, 0x70, 0x69, 0x63, 0x34, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x06, 0x74, 0x6f, + 0x70, 0x69, 0x63, 0x34, 0x22, 0x8c, 0x01, 0x0a, 0x04, 0x48, 0x65, 0x61, 0x64, 0x12, 0x1c, 0x0a, + 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x31, 0x0a, 0x0c, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x0e, 0x2e, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x2e, 0x42, 0x69, 0x67, 0x49, 0x6e, + 0x74, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x12, + 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x68, 0x61, + 0x73, 0x68, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x73, + 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x48, + 0x61, 0x73, 0x68, 0x22, 0x9c, 0x01, 0x0a, 0x0a, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x12, 0x33, 0x0a, 0x09, 0x70, 0x72, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x76, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x65, 0x76, 0x6d, + 0x2e, 0x50, 0x72, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x76, 0x65, 0x48, 0x00, 0x52, 0x09, 0x70, 0x72, + 0x69, 0x6d, 0x69, 0x74, 0x69, 0x76, 0x65, 0x12, 0x4c, 0x0a, 0x12, 0x62, 0x6f, 0x6f, 0x6c, 0x65, + 0x61, 0x6e, 0x5f, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x42, + 0x6f, 0x6f, 0x6c, 0x65, 0x61, 0x6e, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x48, 0x00, 0x52, 0x11, 0x62, 0x6f, 0x6f, 0x6c, 0x65, 0x61, 0x6e, 0x45, 0x78, 0x70, 0x72, 0x65, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x0b, 0x0a, 0x09, 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, + 0x6f, 0x72, 0x22, 0x98, 0x01, 0x0a, 0x11, 0x42, 0x6f, 0x6f, 0x6c, 0x65, 0x61, 0x6e, 0x45, 0x78, + 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x4d, 0x0a, 0x10, 0x62, 0x6f, 0x6f, 0x6c, + 0x65, 0x61, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x65, 0x61, 0x6e, 0x4f, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x0f, 0x62, 0x6f, 0x6f, 0x6c, 0x65, 0x61, 0x6e, 0x4f, + 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x34, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x72, 0x65, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6c, 0x6f, + 0x6f, 0x70, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x2f, 0x0a, + 0x03, 0x41, 0x6e, 0x64, 0x12, 0x28, 0x0a, 0x04, 0x65, 0x78, 0x70, 0x72, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x45, 0x78, + 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x65, 0x78, 0x70, 0x72, 0x22, 0x2e, + 0x0a, 0x02, 0x4f, 0x72, 0x12, 0x28, 0x0a, 0x04, 0x65, 0x78, 0x70, 0x72, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x45, 0x78, + 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x65, 0x78, 0x70, 0x72, 0x22, 0x70, + 0x0a, 0x13, 0x48, 0x61, 0x73, 0x68, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x61, + 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x41, 0x0a, + 0x08, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x25, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x69, 0x73, 0x6f, 0x6e, 0x4f, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x08, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, + 0x22, 0x81, 0x01, 0x0a, 0x0b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x42, 0x79, 0x57, 0x6f, 0x72, 0x64, + 0x12, 0x1d, 0x0a, 0x0a, 0x77, 0x6f, 0x72, 0x64, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x77, 0x6f, 0x72, 0x64, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, + 0x53, 0x0a, 0x16, 0x68, 0x61, 0x73, 0x68, 0x65, 0x64, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, + 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x1d, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x14, + 0x68, 0x61, 0x73, 0x68, 0x65, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x61, + 0x72, 0x65, 0x72, 0x73, 0x22, 0x79, 0x0a, 0x0c, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x42, 0x79, 0x54, + 0x6f, 0x70, 0x69, 0x63, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x05, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x12, 0x53, 0x0a, 0x16, 0x68, 0x61, + 0x73, 0x68, 0x65, 0x64, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x61, + 0x72, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6c, 0x6f, 0x6f, + 0x70, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x43, + 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x14, 0x68, 0x61, 0x73, 0x68, 0x65, + 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x65, 0x72, 0x73, 0x22, + 0xae, 0x02, 0x0a, 0x09, 0x50, 0x72, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x76, 0x65, 0x12, 0x4b, 0x0a, + 0x11, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x69, 0x6d, 0x69, 0x74, 0x69, + 0x76, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, + 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x50, 0x72, 0x69, + 0x6d, 0x69, 0x74, 0x69, 0x76, 0x65, 0x48, 0x00, 0x52, 0x10, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, + 0x6c, 0x50, 0x72, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x76, 0x65, 0x12, 0x2b, 0x0a, 0x10, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x09, 0x65, 0x76, 0x65, 0x6e, 0x74, + 0x5f, 0x73, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x08, 0x65, 0x76, + 0x65, 0x6e, 0x74, 0x53, 0x69, 0x67, 0x12, 0x3b, 0x0a, 0x0d, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, + 0x62, 0x79, 0x5f, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, + 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x42, 0x79, + 0x57, 0x6f, 0x72, 0x64, 0x48, 0x00, 0x52, 0x0b, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x42, 0x79, 0x57, + 0x6f, 0x72, 0x64, 0x12, 0x3e, 0x0a, 0x0e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x62, 0x79, 0x5f, + 0x74, 0x6f, 0x70, 0x69, 0x63, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6c, 0x6f, + 0x6f, 0x70, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x42, 0x79, 0x54, 0x6f, + 0x70, 0x69, 0x63, 0x48, 0x00, 0x52, 0x0c, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x42, 0x79, 0x54, 0x6f, + 0x70, 0x69, 0x63, 0x42, 0x0b, 0x0a, 0x09, 0x70, 0x72, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x76, 0x65, + 0x22, 0x73, 0x0a, 0x1b, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x41, 0x6e, 0x64, 0x46, 0x69, 0x6e, + 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x48, 0x65, 0x61, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, + 0x26, 0x0a, 0x06, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x0e, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x52, + 0x06, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x12, 0x2c, 0x0a, 0x09, 0x66, 0x69, 0x6e, 0x61, 0x6c, + 0x69, 0x7a, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x6c, 0x6f, 0x6f, + 0x70, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x52, 0x09, 0x66, 0x69, 0x6e, 0x61, + 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x22, 0x6f, 0x0a, 0x13, 0x43, 0x61, 0x6c, 0x6c, 0x43, 0x6f, 0x6e, + 0x74, 0x72, 0x61, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x25, 0x0a, 0x04, + 0x63, 0x61, 0x6c, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6c, 0x6f, 0x6f, + 0x70, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x4d, 0x73, 0x67, 0x52, 0x04, 0x63, + 0x61, 0x6c, 0x6c, 0x12, 0x31, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x73, 0x2e, 0x42, 0x69, 0x67, 0x49, 0x6e, 0x74, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0x27, 0x0a, 0x11, 0x43, 0x61, 0x6c, 0x6c, 0x43, 0x6f, + 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x64, + 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, + 0x41, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x46, 0x65, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x74, + 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0d, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x49, 0x64, 0x22, 0x51, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x65, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x37, 0x0a, 0x0f, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x65, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x2e, 0x42, + 0x69, 0x67, 0x49, 0x6e, 0x74, 0x52, 0x0e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x46, 0x65, 0x65, 0x22, 0x4d, 0x0a, 0x11, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x4c, + 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x0c, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x46, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x0b, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x22, 0x34, 0x0a, 0x0f, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x4c, 0x6f, + 0x67, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x21, 0x0a, 0x04, 0x6c, 0x6f, 0x67, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x65, 0x76, 0x6d, + 0x2e, 0x4c, 0x6f, 0x67, 0x52, 0x04, 0x6c, 0x6f, 0x67, 0x73, 0x22, 0x5f, 0x0a, 0x10, 0x42, 0x61, + 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x41, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, + 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x31, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, + 0x2e, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x2e, 0x42, 0x69, 0x67, 0x49, 0x6e, 0x74, 0x52, 0x0b, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0x3a, 0x0a, 0x0e, 0x42, + 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x41, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x28, 0x0a, + 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, + 0x2e, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x2e, 0x42, 0x69, 0x67, 0x49, 0x6e, 0x74, 0x52, 0x07, + 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x22, 0x39, 0x0a, 0x12, 0x45, 0x73, 0x74, 0x69, 0x6d, + 0x61, 0x74, 0x65, 0x47, 0x61, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, + 0x03, 0x6d, 0x73, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6c, 0x6f, 0x6f, + 0x70, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x4d, 0x73, 0x67, 0x52, 0x03, 0x6d, + 0x73, 0x67, 0x22, 0x24, 0x0a, 0x10, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x47, 0x61, + 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x61, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x03, 0x67, 0x61, 0x73, 0x22, 0x31, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x48, 0x61, 0x73, 0x68, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x22, 0x54, 0x0a, 0x19, 0x47, + 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x48, + 0x61, 0x73, 0x68, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x37, 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x6e, + 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, + 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x22, 0x32, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x04, 0x68, 0x61, 0x73, 0x68, 0x22, 0x49, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x52, 0x65, + 0x70, 0x6c, 0x79, 0x12, 0x2b, 0x0a, 0x07, 0x72, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x65, 0x76, 0x6d, 0x2e, + 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x52, 0x07, 0x72, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, + 0x22, 0x48, 0x0a, 0x1a, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x54, + 0x72, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2a, + 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, + 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x4c, 0x50, 0x46, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x3f, 0x0a, 0x1c, 0x55, 0x6e, + 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x54, 0x72, 0x61, 0x63, 0x6b, + 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0a, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xe0, 0x01, 0x0a, 0x17, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x4c, 0x6f, 0x67, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x34, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x72, 0x65, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6c, 0x6f, + 0x6f, 0x70, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x45, 0x0a, + 0x0e, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x61, 0x6e, 0x64, 0x5f, 0x73, 0x6f, 0x72, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x63, 0x68, 0x61, + 0x69, 0x6e, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x41, + 0x6e, 0x64, 0x53, 0x6f, 0x72, 0x74, 0x52, 0x0c, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x41, 0x6e, 0x64, + 0x53, 0x6f, 0x72, 0x74, 0x12, 0x48, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x64, 0x65, 0x6e, + 0x63, 0x65, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, + 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x0f, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x22, 0x3a, + 0x0a, 0x15, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x4c, 0x6f, + 0x67, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x21, 0x0a, 0x04, 0x6c, 0x6f, 0x67, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x65, 0x76, 0x6d, + 0x2e, 0x4c, 0x6f, 0x67, 0x52, 0x04, 0x6c, 0x6f, 0x67, 0x73, 0x22, 0x44, 0x0a, 0x1b, 0x47, 0x65, + 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x74, 0x72, 0x61, + 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0d, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, + 0x22, 0x67, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x4a, 0x0a, + 0x12, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, + 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2a, 0x44, 0x0a, 0x11, 0x54, 0x72, 0x61, + 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0e, + 0x0a, 0x0a, 0x54, 0x58, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x00, 0x12, 0x0f, + 0x0a, 0x0b, 0x54, 0x58, 0x5f, 0x52, 0x45, 0x56, 0x45, 0x52, 0x54, 0x45, 0x44, 0x10, 0x01, 0x12, + 0x0e, 0x0a, 0x0a, 0x54, 0x58, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x10, 0x02, 0x2a, + 0x3b, 0x0a, 0x1f, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x74, 0x72, + 0x61, 0x63, 0x74, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x00, 0x12, + 0x0b, 0x0a, 0x07, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x10, 0x01, 0x32, 0xd7, 0x08, 0x0a, + 0x03, 0x45, 0x56, 0x4d, 0x12, 0x5b, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x65, 0x65, 0x12, 0x22, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, + 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x46, 0x65, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, + 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x65, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, + 0x00, 0x12, 0x4a, 0x0a, 0x0c, 0x43, 0x61, 0x6c, 0x6c, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, + 0x74, 0x12, 0x1d, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x43, 0x61, 0x6c, + 0x6c, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1b, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x43, 0x61, 0x6c, 0x6c, + 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x44, 0x0a, + 0x0a, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x1b, 0x2e, 0x6c, 0x6f, + 0x6f, 0x70, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x4c, 0x6f, 0x67, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, + 0x65, 0x76, 0x6d, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, + 0x70, 0x6c, 0x79, 0x12, 0x41, 0x0a, 0x09, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x41, 0x74, + 0x12, 0x1a, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x42, 0x61, 0x6c, 0x61, + 0x6e, 0x63, 0x65, 0x41, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x6c, + 0x6f, 0x6f, 0x70, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x41, + 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x47, 0x0a, 0x0b, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, + 0x74, 0x65, 0x47, 0x61, 0x73, 0x12, 0x1c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x65, 0x76, 0x6d, + 0x2e, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x47, 0x61, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x45, + 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x47, 0x61, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, + 0x62, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x42, 0x79, 0x48, 0x61, 0x73, 0x68, 0x12, 0x25, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x65, + 0x76, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x42, 0x79, 0x48, 0x61, 0x73, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, + 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, + 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x48, 0x61, 0x73, 0x68, 0x52, 0x65, + 0x70, 0x6c, 0x79, 0x12, 0x65, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x12, 0x26, 0x2e, 0x6c, + 0x6f, 0x6f, 0x70, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x65, 0x76, 0x6d, 0x2e, + 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x63, 0x65, 0x69, 0x70, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x57, 0x0a, 0x16, 0x4c, 0x61, + 0x74, 0x65, 0x73, 0x74, 0x41, 0x6e, 0x64, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, + 0x48, 0x65, 0x61, 0x64, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x25, 0x2e, 0x6c, + 0x6f, 0x6f, 0x70, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x41, 0x6e, + 0x64, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x48, 0x65, 0x61, 0x64, 0x52, 0x65, + 0x70, 0x6c, 0x79, 0x12, 0x56, 0x0a, 0x10, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x72, 0x61, 0x63, + 0x6b, 0x65, 0x64, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x21, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x65, + 0x76, 0x6d, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x4c, + 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x6c, 0x6f, 0x6f, + 0x70, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x72, 0x61, 0x63, 0x6b, + 0x65, 0x64, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x53, 0x0a, 0x13, 0x52, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x69, + 0x6e, 0x67, 0x12, 0x24, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x52, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x69, 0x6e, + 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, + 0x12, 0x57, 0x0a, 0x15, 0x55, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4c, 0x6f, + 0x67, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x12, 0x26, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, + 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x55, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4c, + 0x6f, 0x67, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x62, 0x0a, 0x14, 0x47, 0x65, 0x74, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x12, 0x25, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x47, 0x65, 0x74, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, + 0x65, 0x76, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x47, 0x0a, + 0x0b, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x1c, 0x2e, 0x6c, + 0x6f, 0x6f, 0x70, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x70, + 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x6c, 0x6f, 0x6f, + 0x70, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, + 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x42, 0x3d, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x6d, 0x61, 0x72, 0x74, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, + 0x63, 0x74, 0x6b, 0x69, 0x74, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x6b, 0x2d, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, + 0x73, 0x2f, 0x65, 0x76, 0x6d, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} var ( file_chains_evm_evm_proto_rawDescOnce sync.Once - file_chains_evm_evm_proto_rawDescData []byte + file_chains_evm_evm_proto_rawDescData = file_chains_evm_evm_proto_rawDesc ) func file_chains_evm_evm_proto_rawDescGZIP() []byte { file_chains_evm_evm_proto_rawDescOnce.Do(func() { - file_chains_evm_evm_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_chains_evm_evm_proto_rawDesc), len(file_chains_evm_evm_proto_rawDesc))) + file_chains_evm_evm_proto_rawDescData = protoimpl.X.CompressGZIP(file_chains_evm_evm_proto_rawDescData) }) return file_chains_evm_evm_proto_rawDescData } -var file_chains_evm_evm_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_chains_evm_evm_proto_msgTypes = make([]protoimpl.MessageInfo, 37) +var file_chains_evm_evm_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_chains_evm_evm_proto_msgTypes = make([]protoimpl.MessageInfo, 41) var file_chains_evm_evm_proto_goTypes = []any{ (TransactionStatus)(0), // 0: loop.evm.TransactionStatus - (*CallMsg)(nil), // 1: loop.evm.CallMsg - (*Topics)(nil), // 2: loop.evm.Topics - (*Log)(nil), // 3: loop.evm.Log - (*FilterQuery)(nil), // 4: loop.evm.FilterQuery - (*Transaction)(nil), // 5: loop.evm.Transaction - (*Receipt)(nil), // 6: loop.evm.Receipt - (*LPFilter)(nil), // 7: loop.evm.LPFilter - (*Head)(nil), // 8: loop.evm.Head - (*Expression)(nil), // 9: loop.evm.Expression - (*BooleanExpression)(nil), // 10: loop.evm.BooleanExpression - (*And)(nil), // 11: loop.evm.And - (*Or)(nil), // 12: loop.evm.Or - (*HashValueComparator)(nil), // 13: loop.evm.HashValueComparator - (*EventByWord)(nil), // 14: loop.evm.EventByWord - (*EventByTopic)(nil), // 15: loop.evm.EventByTopic - (*Primitive)(nil), // 16: loop.evm.Primitive - (*LatestAndFinalizedHeadReply)(nil), // 17: loop.evm.LatestAndFinalizedHeadReply - (*CallContractRequest)(nil), // 18: loop.evm.CallContractRequest - (*CallContractReply)(nil), // 19: loop.evm.CallContractReply - (*GetTransactionFeeRequest)(nil), // 20: loop.evm.GetTransactionFeeRequest - (*GetTransactionFeeReply)(nil), // 21: loop.evm.GetTransactionFeeReply - (*FilterLogsRequest)(nil), // 22: loop.evm.FilterLogsRequest - (*FilterLogsReply)(nil), // 23: loop.evm.FilterLogsReply - (*BalanceAtRequest)(nil), // 24: loop.evm.BalanceAtRequest - (*BalanceAtReply)(nil), // 25: loop.evm.BalanceAtReply - (*EstimateGasRequest)(nil), // 26: loop.evm.EstimateGasRequest - (*EstimateGasReply)(nil), // 27: loop.evm.EstimateGasReply - (*GetTransactionByHashRequest)(nil), // 28: loop.evm.GetTransactionByHashRequest - (*GetTransactionByHashReply)(nil), // 29: loop.evm.GetTransactionByHashReply - (*GetTransactionReceiptRequest)(nil), // 30: loop.evm.GetTransactionReceiptRequest - (*GetTransactionReceiptReply)(nil), // 31: loop.evm.GetTransactionReceiptReply - (*RegisterLogTrackingRequest)(nil), // 32: loop.evm.RegisterLogTrackingRequest - (*UnregisterLogTrackingRequest)(nil), // 33: loop.evm.UnregisterLogTrackingRequest - (*QueryTrackedLogsRequest)(nil), // 34: loop.evm.QueryTrackedLogsRequest - (*QueryTrackedLogsReply)(nil), // 35: loop.evm.QueryTrackedLogsReply - (*GetTransactionStatusRequest)(nil), // 36: loop.evm.GetTransactionStatusRequest - (*GetTransactionStatusReply)(nil), // 37: loop.evm.GetTransactionStatusReply - (*pb.BigInt)(nil), // 38: values.BigInt - (chain_common.BooleanOperator)(0), // 39: loop.chain.common.BooleanOperator - (chain_common.ComparisonOperator)(0), // 40: loop.chain.common.ComparisonOperator - (*chain_common.Primitive)(nil), // 41: loop.chain.common.Primitive - (*chain_common.LimitAndSort)(nil), // 42: loop.chain.common.LimitAndSort - (chain_common.Confidence)(0), // 43: loop.chain.common.Confidence - (*emptypb.Empty)(nil), // 44: google.protobuf.Empty + (ReceiverContractExecutionStatus)(0), // 1: loop.evm.ReceiverContractExecutionStatus + (*SignedReport)(nil), // 2: loop.evm.SignedReport + (*GasConfig)(nil), // 3: loop.evm.GasConfig + (*WriteReportRequest)(nil), // 4: loop.evm.WriteReportRequest + (*WriteReportReply)(nil), // 5: loop.evm.WriteReportReply + (*CallMsg)(nil), // 6: loop.evm.CallMsg + (*Topics)(nil), // 7: loop.evm.Topics + (*Log)(nil), // 8: loop.evm.Log + (*FilterQuery)(nil), // 9: loop.evm.FilterQuery + (*Transaction)(nil), // 10: loop.evm.Transaction + (*Receipt)(nil), // 11: loop.evm.Receipt + (*LPFilter)(nil), // 12: loop.evm.LPFilter + (*Head)(nil), // 13: loop.evm.Head + (*Expression)(nil), // 14: loop.evm.Expression + (*BooleanExpression)(nil), // 15: loop.evm.BooleanExpression + (*And)(nil), // 16: loop.evm.And + (*Or)(nil), // 17: loop.evm.Or + (*HashValueComparator)(nil), // 18: loop.evm.HashValueComparator + (*EventByWord)(nil), // 19: loop.evm.EventByWord + (*EventByTopic)(nil), // 20: loop.evm.EventByTopic + (*Primitive)(nil), // 21: loop.evm.Primitive + (*LatestAndFinalizedHeadReply)(nil), // 22: loop.evm.LatestAndFinalizedHeadReply + (*CallContractRequest)(nil), // 23: loop.evm.CallContractRequest + (*CallContractReply)(nil), // 24: loop.evm.CallContractReply + (*GetTransactionFeeRequest)(nil), // 25: loop.evm.GetTransactionFeeRequest + (*GetTransactionFeeReply)(nil), // 26: loop.evm.GetTransactionFeeReply + (*FilterLogsRequest)(nil), // 27: loop.evm.FilterLogsRequest + (*FilterLogsReply)(nil), // 28: loop.evm.FilterLogsReply + (*BalanceAtRequest)(nil), // 29: loop.evm.BalanceAtRequest + (*BalanceAtReply)(nil), // 30: loop.evm.BalanceAtReply + (*EstimateGasRequest)(nil), // 31: loop.evm.EstimateGasRequest + (*EstimateGasReply)(nil), // 32: loop.evm.EstimateGasReply + (*GetTransactionByHashRequest)(nil), // 33: loop.evm.GetTransactionByHashRequest + (*GetTransactionByHashReply)(nil), // 34: loop.evm.GetTransactionByHashReply + (*GetTransactionReceiptRequest)(nil), // 35: loop.evm.GetTransactionReceiptRequest + (*GetTransactionReceiptReply)(nil), // 36: loop.evm.GetTransactionReceiptReply + (*RegisterLogTrackingRequest)(nil), // 37: loop.evm.RegisterLogTrackingRequest + (*UnregisterLogTrackingRequest)(nil), // 38: loop.evm.UnregisterLogTrackingRequest + (*QueryTrackedLogsRequest)(nil), // 39: loop.evm.QueryTrackedLogsRequest + (*QueryTrackedLogsReply)(nil), // 40: loop.evm.QueryTrackedLogsReply + (*GetTransactionStatusRequest)(nil), // 41: loop.evm.GetTransactionStatusRequest + (*GetTransactionStatusReply)(nil), // 42: loop.evm.GetTransactionStatusReply + (*pb.BigInt)(nil), // 43: values.BigInt + (chain_common.BooleanOperator)(0), // 44: loop.chain.common.BooleanOperator + (chain_common.ComparisonOperator)(0), // 45: loop.chain.common.ComparisonOperator + (*chain_common.Primitive)(nil), // 46: loop.chain.common.Primitive + (*chain_common.LimitAndSort)(nil), // 47: loop.chain.common.LimitAndSort + (chain_common.Confidence)(0), // 48: loop.chain.common.Confidence + (*emptypb.Empty)(nil), // 49: google.protobuf.Empty } var file_chains_evm_evm_proto_depIdxs = []int32{ - 38, // 0: loop.evm.Log.block_number:type_name -> values.BigInt - 38, // 1: loop.evm.FilterQuery.fromBlock:type_name -> values.BigInt - 38, // 2: loop.evm.FilterQuery.toBlock:type_name -> values.BigInt - 2, // 3: loop.evm.FilterQuery.topics:type_name -> loop.evm.Topics - 38, // 4: loop.evm.Transaction.value:type_name -> values.BigInt - 38, // 5: loop.evm.Transaction.gas_price:type_name -> values.BigInt - 3, // 6: loop.evm.Receipt.logs:type_name -> loop.evm.Log - 38, // 7: loop.evm.Receipt.effective_gas_price:type_name -> values.BigInt - 38, // 8: loop.evm.Receipt.block_number:type_name -> values.BigInt - 38, // 9: loop.evm.Head.block_number:type_name -> values.BigInt - 16, // 10: loop.evm.Expression.primitive:type_name -> loop.evm.Primitive - 10, // 11: loop.evm.Expression.boolean_expression:type_name -> loop.evm.BooleanExpression - 39, // 12: loop.evm.BooleanExpression.boolean_operator:type_name -> loop.chain.common.BooleanOperator - 9, // 13: loop.evm.BooleanExpression.expression:type_name -> loop.evm.Expression - 9, // 14: loop.evm.And.expr:type_name -> loop.evm.Expression - 9, // 15: loop.evm.Or.expr:type_name -> loop.evm.Expression - 40, // 16: loop.evm.HashValueComparator.operator:type_name -> loop.chain.common.ComparisonOperator - 13, // 17: loop.evm.EventByWord.hashed_value_comparers:type_name -> loop.evm.HashValueComparator - 13, // 18: loop.evm.EventByTopic.hashed_value_comparers:type_name -> loop.evm.HashValueComparator - 41, // 19: loop.evm.Primitive.general_primitive:type_name -> loop.chain.common.Primitive - 14, // 20: loop.evm.Primitive.event_by_word:type_name -> loop.evm.EventByWord - 15, // 21: loop.evm.Primitive.event_by_topic:type_name -> loop.evm.EventByTopic - 8, // 22: loop.evm.LatestAndFinalizedHeadReply.latest:type_name -> loop.evm.Head - 8, // 23: loop.evm.LatestAndFinalizedHeadReply.finalized:type_name -> loop.evm.Head - 1, // 24: loop.evm.CallContractRequest.call:type_name -> loop.evm.CallMsg - 38, // 25: loop.evm.CallContractRequest.block_number:type_name -> values.BigInt - 38, // 26: loop.evm.GetTransactionFeeReply.transaction_fee:type_name -> values.BigInt - 4, // 27: loop.evm.FilterLogsRequest.filter_query:type_name -> loop.evm.FilterQuery - 3, // 28: loop.evm.FilterLogsReply.logs:type_name -> loop.evm.Log - 38, // 29: loop.evm.BalanceAtRequest.block_number:type_name -> values.BigInt - 38, // 30: loop.evm.BalanceAtReply.balance:type_name -> values.BigInt - 1, // 31: loop.evm.EstimateGasRequest.msg:type_name -> loop.evm.CallMsg - 5, // 32: loop.evm.GetTransactionByHashReply.transaction:type_name -> loop.evm.Transaction - 6, // 33: loop.evm.GetTransactionReceiptReply.receipt:type_name -> loop.evm.Receipt - 7, // 34: loop.evm.RegisterLogTrackingRequest.filter:type_name -> loop.evm.LPFilter - 9, // 35: loop.evm.QueryTrackedLogsRequest.expression:type_name -> loop.evm.Expression - 42, // 36: loop.evm.QueryTrackedLogsRequest.limit_and_sort:type_name -> loop.chain.common.LimitAndSort - 43, // 37: loop.evm.QueryTrackedLogsRequest.confidence_level:type_name -> loop.chain.common.Confidence - 3, // 38: loop.evm.QueryTrackedLogsReply.logs:type_name -> loop.evm.Log - 0, // 39: loop.evm.GetTransactionStatusReply.transaction_status:type_name -> loop.evm.TransactionStatus - 20, // 40: loop.evm.EVM.GetTransactionFee:input_type -> loop.evm.GetTransactionFeeRequest - 18, // 41: loop.evm.EVM.CallContract:input_type -> loop.evm.CallContractRequest - 22, // 42: loop.evm.EVM.FilterLogs:input_type -> loop.evm.FilterLogsRequest - 24, // 43: loop.evm.EVM.BalanceAt:input_type -> loop.evm.BalanceAtRequest - 26, // 44: loop.evm.EVM.EstimateGas:input_type -> loop.evm.EstimateGasRequest - 28, // 45: loop.evm.EVM.GetTransactionByHash:input_type -> loop.evm.GetTransactionByHashRequest - 30, // 46: loop.evm.EVM.GetTransactionReceipt:input_type -> loop.evm.GetTransactionReceiptRequest - 44, // 47: loop.evm.EVM.LatestAndFinalizedHead:input_type -> google.protobuf.Empty - 34, // 48: loop.evm.EVM.QueryTrackedLogs:input_type -> loop.evm.QueryTrackedLogsRequest - 32, // 49: loop.evm.EVM.RegisterLogTracking:input_type -> loop.evm.RegisterLogTrackingRequest - 33, // 50: loop.evm.EVM.UnregisterLogTracking:input_type -> loop.evm.UnregisterLogTrackingRequest - 36, // 51: loop.evm.EVM.GetTransactionStatus:input_type -> loop.evm.GetTransactionStatusRequest - 21, // 52: loop.evm.EVM.GetTransactionFee:output_type -> loop.evm.GetTransactionFeeReply - 19, // 53: loop.evm.EVM.CallContract:output_type -> loop.evm.CallContractReply - 23, // 54: loop.evm.EVM.FilterLogs:output_type -> loop.evm.FilterLogsReply - 25, // 55: loop.evm.EVM.BalanceAt:output_type -> loop.evm.BalanceAtReply - 27, // 56: loop.evm.EVM.EstimateGas:output_type -> loop.evm.EstimateGasReply - 29, // 57: loop.evm.EVM.GetTransactionByHash:output_type -> loop.evm.GetTransactionByHashReply - 31, // 58: loop.evm.EVM.GetTransactionReceipt:output_type -> loop.evm.GetTransactionReceiptReply - 17, // 59: loop.evm.EVM.LatestAndFinalizedHead:output_type -> loop.evm.LatestAndFinalizedHeadReply - 35, // 60: loop.evm.EVM.QueryTrackedLogs:output_type -> loop.evm.QueryTrackedLogsReply - 44, // 61: loop.evm.EVM.RegisterLogTracking:output_type -> google.protobuf.Empty - 44, // 62: loop.evm.EVM.UnregisterLogTracking:output_type -> google.protobuf.Empty - 37, // 63: loop.evm.EVM.GetTransactionStatus:output_type -> loop.evm.GetTransactionStatusReply - 52, // [52:64] is the sub-list for method output_type - 40, // [40:52] is the sub-list for method input_type - 40, // [40:40] is the sub-list for extension type_name - 40, // [40:40] is the sub-list for extension extendee - 0, // [0:40] is the sub-list for field type_name + 2, // 0: loop.evm.WriteReportRequest.report:type_name -> loop.evm.SignedReport + 3, // 1: loop.evm.WriteReportRequest.gas_config:type_name -> loop.evm.GasConfig + 0, // 2: loop.evm.WriteReportReply.tx_status:type_name -> loop.evm.TransactionStatus + 1, // 3: loop.evm.WriteReportReply.receiver_contract_execution_status:type_name -> loop.evm.ReceiverContractExecutionStatus + 43, // 4: loop.evm.WriteReportReply.transaction_fee:type_name -> values.BigInt + 43, // 5: loop.evm.Log.block_number:type_name -> values.BigInt + 43, // 6: loop.evm.FilterQuery.fromBlock:type_name -> values.BigInt + 43, // 7: loop.evm.FilterQuery.toBlock:type_name -> values.BigInt + 7, // 8: loop.evm.FilterQuery.topics:type_name -> loop.evm.Topics + 43, // 9: loop.evm.Transaction.value:type_name -> values.BigInt + 43, // 10: loop.evm.Transaction.gas_price:type_name -> values.BigInt + 8, // 11: loop.evm.Receipt.logs:type_name -> loop.evm.Log + 43, // 12: loop.evm.Receipt.effective_gas_price:type_name -> values.BigInt + 43, // 13: loop.evm.Receipt.block_number:type_name -> values.BigInt + 43, // 14: loop.evm.Head.block_number:type_name -> values.BigInt + 21, // 15: loop.evm.Expression.primitive:type_name -> loop.evm.Primitive + 15, // 16: loop.evm.Expression.boolean_expression:type_name -> loop.evm.BooleanExpression + 44, // 17: loop.evm.BooleanExpression.boolean_operator:type_name -> loop.chain.common.BooleanOperator + 14, // 18: loop.evm.BooleanExpression.expression:type_name -> loop.evm.Expression + 14, // 19: loop.evm.And.expr:type_name -> loop.evm.Expression + 14, // 20: loop.evm.Or.expr:type_name -> loop.evm.Expression + 45, // 21: loop.evm.HashValueComparator.operator:type_name -> loop.chain.common.ComparisonOperator + 18, // 22: loop.evm.EventByWord.hashed_value_comparers:type_name -> loop.evm.HashValueComparator + 18, // 23: loop.evm.EventByTopic.hashed_value_comparers:type_name -> loop.evm.HashValueComparator + 46, // 24: loop.evm.Primitive.general_primitive:type_name -> loop.chain.common.Primitive + 19, // 25: loop.evm.Primitive.event_by_word:type_name -> loop.evm.EventByWord + 20, // 26: loop.evm.Primitive.event_by_topic:type_name -> loop.evm.EventByTopic + 13, // 27: loop.evm.LatestAndFinalizedHeadReply.latest:type_name -> loop.evm.Head + 13, // 28: loop.evm.LatestAndFinalizedHeadReply.finalized:type_name -> loop.evm.Head + 6, // 29: loop.evm.CallContractRequest.call:type_name -> loop.evm.CallMsg + 43, // 30: loop.evm.CallContractRequest.block_number:type_name -> values.BigInt + 43, // 31: loop.evm.GetTransactionFeeReply.transaction_fee:type_name -> values.BigInt + 9, // 32: loop.evm.FilterLogsRequest.filter_query:type_name -> loop.evm.FilterQuery + 8, // 33: loop.evm.FilterLogsReply.logs:type_name -> loop.evm.Log + 43, // 34: loop.evm.BalanceAtRequest.block_number:type_name -> values.BigInt + 43, // 35: loop.evm.BalanceAtReply.balance:type_name -> values.BigInt + 6, // 36: loop.evm.EstimateGasRequest.msg:type_name -> loop.evm.CallMsg + 10, // 37: loop.evm.GetTransactionByHashReply.transaction:type_name -> loop.evm.Transaction + 11, // 38: loop.evm.GetTransactionReceiptReply.receipt:type_name -> loop.evm.Receipt + 12, // 39: loop.evm.RegisterLogTrackingRequest.filter:type_name -> loop.evm.LPFilter + 14, // 40: loop.evm.QueryTrackedLogsRequest.expression:type_name -> loop.evm.Expression + 47, // 41: loop.evm.QueryTrackedLogsRequest.limit_and_sort:type_name -> loop.chain.common.LimitAndSort + 48, // 42: loop.evm.QueryTrackedLogsRequest.confidence_level:type_name -> loop.chain.common.Confidence + 8, // 43: loop.evm.QueryTrackedLogsReply.logs:type_name -> loop.evm.Log + 0, // 44: loop.evm.GetTransactionStatusReply.transaction_status:type_name -> loop.evm.TransactionStatus + 25, // 45: loop.evm.EVM.GetTransactionFee:input_type -> loop.evm.GetTransactionFeeRequest + 23, // 46: loop.evm.EVM.CallContract:input_type -> loop.evm.CallContractRequest + 27, // 47: loop.evm.EVM.FilterLogs:input_type -> loop.evm.FilterLogsRequest + 29, // 48: loop.evm.EVM.BalanceAt:input_type -> loop.evm.BalanceAtRequest + 31, // 49: loop.evm.EVM.EstimateGas:input_type -> loop.evm.EstimateGasRequest + 33, // 50: loop.evm.EVM.GetTransactionByHash:input_type -> loop.evm.GetTransactionByHashRequest + 35, // 51: loop.evm.EVM.GetTransactionReceipt:input_type -> loop.evm.GetTransactionReceiptRequest + 49, // 52: loop.evm.EVM.LatestAndFinalizedHead:input_type -> google.protobuf.Empty + 39, // 53: loop.evm.EVM.QueryTrackedLogs:input_type -> loop.evm.QueryTrackedLogsRequest + 37, // 54: loop.evm.EVM.RegisterLogTracking:input_type -> loop.evm.RegisterLogTrackingRequest + 38, // 55: loop.evm.EVM.UnregisterLogTracking:input_type -> loop.evm.UnregisterLogTrackingRequest + 41, // 56: loop.evm.EVM.GetTransactionStatus:input_type -> loop.evm.GetTransactionStatusRequest + 4, // 57: loop.evm.EVM.WriteReport:input_type -> loop.evm.WriteReportRequest + 26, // 58: loop.evm.EVM.GetTransactionFee:output_type -> loop.evm.GetTransactionFeeReply + 24, // 59: loop.evm.EVM.CallContract:output_type -> loop.evm.CallContractReply + 28, // 60: loop.evm.EVM.FilterLogs:output_type -> loop.evm.FilterLogsReply + 30, // 61: loop.evm.EVM.BalanceAt:output_type -> loop.evm.BalanceAtReply + 32, // 62: loop.evm.EVM.EstimateGas:output_type -> loop.evm.EstimateGasReply + 34, // 63: loop.evm.EVM.GetTransactionByHash:output_type -> loop.evm.GetTransactionByHashReply + 36, // 64: loop.evm.EVM.GetTransactionReceipt:output_type -> loop.evm.GetTransactionReceiptReply + 22, // 65: loop.evm.EVM.LatestAndFinalizedHead:output_type -> loop.evm.LatestAndFinalizedHeadReply + 40, // 66: loop.evm.EVM.QueryTrackedLogs:output_type -> loop.evm.QueryTrackedLogsReply + 49, // 67: loop.evm.EVM.RegisterLogTracking:output_type -> google.protobuf.Empty + 49, // 68: loop.evm.EVM.UnregisterLogTracking:output_type -> google.protobuf.Empty + 42, // 69: loop.evm.EVM.GetTransactionStatus:output_type -> loop.evm.GetTransactionStatusReply + 5, // 70: loop.evm.EVM.WriteReport:output_type -> loop.evm.WriteReportReply + 58, // [58:71] is the sub-list for method output_type + 45, // [45:58] is the sub-list for method input_type + 45, // [45:45] is the sub-list for extension type_name + 45, // [45:45] is the sub-list for extension extendee + 0, // [0:45] is the sub-list for field type_name } func init() { file_chains_evm_evm_proto_init() } @@ -2555,11 +3184,505 @@ func file_chains_evm_evm_proto_init() { if File_chains_evm_evm_proto != nil { return } - file_chains_evm_evm_proto_msgTypes[8].OneofWrappers = []any{ + if !protoimpl.UnsafeEnabled { + file_chains_evm_evm_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*SignedReport); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_chains_evm_evm_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*GasConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_chains_evm_evm_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*WriteReportRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_chains_evm_evm_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*WriteReportReply); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_chains_evm_evm_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*CallMsg); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_chains_evm_evm_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*Topics); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_chains_evm_evm_proto_msgTypes[6].Exporter = func(v any, i int) any { + switch v := v.(*Log); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_chains_evm_evm_proto_msgTypes[7].Exporter = func(v any, i int) any { + switch v := v.(*FilterQuery); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_chains_evm_evm_proto_msgTypes[8].Exporter = func(v any, i int) any { + switch v := v.(*Transaction); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_chains_evm_evm_proto_msgTypes[9].Exporter = func(v any, i int) any { + switch v := v.(*Receipt); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_chains_evm_evm_proto_msgTypes[10].Exporter = func(v any, i int) any { + switch v := v.(*LPFilter); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_chains_evm_evm_proto_msgTypes[11].Exporter = func(v any, i int) any { + switch v := v.(*Head); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_chains_evm_evm_proto_msgTypes[12].Exporter = func(v any, i int) any { + switch v := v.(*Expression); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_chains_evm_evm_proto_msgTypes[13].Exporter = func(v any, i int) any { + switch v := v.(*BooleanExpression); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_chains_evm_evm_proto_msgTypes[14].Exporter = func(v any, i int) any { + switch v := v.(*And); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_chains_evm_evm_proto_msgTypes[15].Exporter = func(v any, i int) any { + switch v := v.(*Or); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_chains_evm_evm_proto_msgTypes[16].Exporter = func(v any, i int) any { + switch v := v.(*HashValueComparator); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_chains_evm_evm_proto_msgTypes[17].Exporter = func(v any, i int) any { + switch v := v.(*EventByWord); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_chains_evm_evm_proto_msgTypes[18].Exporter = func(v any, i int) any { + switch v := v.(*EventByTopic); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_chains_evm_evm_proto_msgTypes[19].Exporter = func(v any, i int) any { + switch v := v.(*Primitive); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_chains_evm_evm_proto_msgTypes[20].Exporter = func(v any, i int) any { + switch v := v.(*LatestAndFinalizedHeadReply); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_chains_evm_evm_proto_msgTypes[21].Exporter = func(v any, i int) any { + switch v := v.(*CallContractRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_chains_evm_evm_proto_msgTypes[22].Exporter = func(v any, i int) any { + switch v := v.(*CallContractReply); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_chains_evm_evm_proto_msgTypes[23].Exporter = func(v any, i int) any { + switch v := v.(*GetTransactionFeeRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_chains_evm_evm_proto_msgTypes[24].Exporter = func(v any, i int) any { + switch v := v.(*GetTransactionFeeReply); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_chains_evm_evm_proto_msgTypes[25].Exporter = func(v any, i int) any { + switch v := v.(*FilterLogsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_chains_evm_evm_proto_msgTypes[26].Exporter = func(v any, i int) any { + switch v := v.(*FilterLogsReply); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_chains_evm_evm_proto_msgTypes[27].Exporter = func(v any, i int) any { + switch v := v.(*BalanceAtRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_chains_evm_evm_proto_msgTypes[28].Exporter = func(v any, i int) any { + switch v := v.(*BalanceAtReply); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_chains_evm_evm_proto_msgTypes[29].Exporter = func(v any, i int) any { + switch v := v.(*EstimateGasRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_chains_evm_evm_proto_msgTypes[30].Exporter = func(v any, i int) any { + switch v := v.(*EstimateGasReply); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_chains_evm_evm_proto_msgTypes[31].Exporter = func(v any, i int) any { + switch v := v.(*GetTransactionByHashRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_chains_evm_evm_proto_msgTypes[32].Exporter = func(v any, i int) any { + switch v := v.(*GetTransactionByHashReply); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_chains_evm_evm_proto_msgTypes[33].Exporter = func(v any, i int) any { + switch v := v.(*GetTransactionReceiptRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_chains_evm_evm_proto_msgTypes[34].Exporter = func(v any, i int) any { + switch v := v.(*GetTransactionReceiptReply); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_chains_evm_evm_proto_msgTypes[35].Exporter = func(v any, i int) any { + switch v := v.(*RegisterLogTrackingRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_chains_evm_evm_proto_msgTypes[36].Exporter = func(v any, i int) any { + switch v := v.(*UnregisterLogTrackingRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_chains_evm_evm_proto_msgTypes[37].Exporter = func(v any, i int) any { + switch v := v.(*QueryTrackedLogsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_chains_evm_evm_proto_msgTypes[38].Exporter = func(v any, i int) any { + switch v := v.(*QueryTrackedLogsReply); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_chains_evm_evm_proto_msgTypes[39].Exporter = func(v any, i int) any { + switch v := v.(*GetTransactionStatusRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_chains_evm_evm_proto_msgTypes[40].Exporter = func(v any, i int) any { + switch v := v.(*GetTransactionStatusReply); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_chains_evm_evm_proto_msgTypes[12].OneofWrappers = []any{ (*Expression_Primitive)(nil), (*Expression_BooleanExpression)(nil), } - file_chains_evm_evm_proto_msgTypes[15].OneofWrappers = []any{ + file_chains_evm_evm_proto_msgTypes[19].OneofWrappers = []any{ (*Primitive_GeneralPrimitive)(nil), (*Primitive_ContractAddress)(nil), (*Primitive_EventSig)(nil), @@ -2570,9 +3693,9 @@ func file_chains_evm_evm_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_chains_evm_evm_proto_rawDesc), len(file_chains_evm_evm_proto_rawDesc)), - NumEnums: 1, - NumMessages: 37, + RawDescriptor: file_chains_evm_evm_proto_rawDesc, + NumEnums: 2, + NumMessages: 41, NumExtensions: 0, NumServices: 1, }, @@ -2582,6 +3705,7 @@ func file_chains_evm_evm_proto_init() { MessageInfos: file_chains_evm_evm_proto_msgTypes, }.Build() File_chains_evm_evm_proto = out.File + file_chains_evm_evm_proto_rawDesc = nil file_chains_evm_evm_proto_goTypes = nil file_chains_evm_evm_proto_depIdxs = nil } diff --git a/pkg/chains/evm/evm.proto b/pkg/chains/evm/evm.proto index 518e998ec9..b410f90d83 100644 --- a/pkg/chains/evm/evm.proto +++ b/pkg/chains/evm/evm.proto @@ -20,6 +20,32 @@ service EVM{ rpc RegisterLogTracking(RegisterLogTrackingRequest) returns (google.protobuf.Empty); rpc UnregisterLogTracking(UnregisterLogTrackingRequest) returns (google.protobuf.Empty); rpc GetTransactionStatus(GetTransactionStatusRequest) returns (GetTransactionStatusReply); + rpc WriteReport(WriteReportRequest) returns (WriteReportReply); + +} + +message SignedReport { + bytes raw_report = 1; + bytes report_context = 2; + repeated bytes signatures = 3; + bytes id = 4; +} + +message GasConfig { + uint64 gas_limit = 1; +} + +message WriteReportRequest { + bytes receiver = 1; + SignedReport report = 2; + GasConfig gas_config = 3; +} + +message WriteReportReply { + TransactionStatus tx_status = 1; + ReceiverContractExecutionStatus receiver_contract_execution_status = 2; + bytes tx_hash = 3; + values.BigInt transaction_fee = 4; } // represents simplified evm-style CallMsg @@ -249,10 +275,13 @@ message GetTransactionStatusReply { // TransactionStatus is an enum for the status of a transaction. // This should always be a 1-1 mapping to: [github.com/smartcontractkit/chainlink-common/pkg/types.TransactionStatus]. enum TransactionStatus { - TRANSACTION_STATUS_UNKNOWN = 0; - TRANSACTION_STATUS_PENDING = 1; - TRANSACTION_STATUS_UNCONFIRMED = 2; - TRANSACTION_STATUS_FINALIZED = 3; - TRANSACTION_STATUS_FAILED = 4; - TRANSACTION_STATUS_FATAL = 5; + //TODO weird issue makes this enums to collide with ReceiverContractExecutionStatus enum values + TX_SUCCESS = 0; //Successfully executed and within a block - Not finalized + TX_REVERTED = 1; //Successfully call to the RPC and TX processing but reverted + TX_FAILURE = 2; //Was not executed at all by an RPC for some reason +} + +enum ReceiverContractExecutionStatus { + SUCCESS = 0; + FAILURE = 1; } diff --git a/pkg/chains/evm/evm_grpc.pb.go b/pkg/chains/evm/evm_grpc.pb.go index d467381abb..d9f8ff0b08 100644 --- a/pkg/chains/evm/evm_grpc.pb.go +++ b/pkg/chains/evm/evm_grpc.pb.go @@ -32,6 +32,7 @@ const ( EVM_RegisterLogTracking_FullMethodName = "/loop.evm.EVM/RegisterLogTracking" EVM_UnregisterLogTracking_FullMethodName = "/loop.evm.EVM/UnregisterLogTracking" EVM_GetTransactionStatus_FullMethodName = "/loop.evm.EVM/GetTransactionStatus" + EVM_WriteReport_FullMethodName = "/loop.evm.EVM/WriteReport" ) // EVMClient is the client API for EVM service. @@ -50,6 +51,7 @@ type EVMClient interface { RegisterLogTracking(ctx context.Context, in *RegisterLogTrackingRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) UnregisterLogTracking(ctx context.Context, in *UnregisterLogTrackingRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) GetTransactionStatus(ctx context.Context, in *GetTransactionStatusRequest, opts ...grpc.CallOption) (*GetTransactionStatusReply, error) + WriteReport(ctx context.Context, in *WriteReportRequest, opts ...grpc.CallOption) (*WriteReportReply, error) } type eVMClient struct { @@ -180,6 +182,16 @@ func (c *eVMClient) GetTransactionStatus(ctx context.Context, in *GetTransaction return out, nil } +func (c *eVMClient) WriteReport(ctx context.Context, in *WriteReportRequest, opts ...grpc.CallOption) (*WriteReportReply, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(WriteReportReply) + err := c.cc.Invoke(ctx, EVM_WriteReport_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + // EVMServer is the server API for EVM service. // All implementations must embed UnimplementedEVMServer // for forward compatibility. @@ -196,6 +208,7 @@ type EVMServer interface { RegisterLogTracking(context.Context, *RegisterLogTrackingRequest) (*emptypb.Empty, error) UnregisterLogTracking(context.Context, *UnregisterLogTrackingRequest) (*emptypb.Empty, error) GetTransactionStatus(context.Context, *GetTransactionStatusRequest) (*GetTransactionStatusReply, error) + WriteReport(context.Context, *WriteReportRequest) (*WriteReportReply, error) mustEmbedUnimplementedEVMServer() } @@ -242,6 +255,9 @@ func (UnimplementedEVMServer) UnregisterLogTracking(context.Context, *Unregister func (UnimplementedEVMServer) GetTransactionStatus(context.Context, *GetTransactionStatusRequest) (*GetTransactionStatusReply, error) { return nil, status.Errorf(codes.Unimplemented, "method GetTransactionStatus not implemented") } +func (UnimplementedEVMServer) WriteReport(context.Context, *WriteReportRequest) (*WriteReportReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method WriteReport not implemented") +} func (UnimplementedEVMServer) mustEmbedUnimplementedEVMServer() {} func (UnimplementedEVMServer) testEmbeddedByValue() {} @@ -479,6 +495,24 @@ func _EVM_GetTransactionStatus_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } +func _EVM_WriteReport_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(WriteReportRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(EVMServer).WriteReport(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: EVM_WriteReport_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(EVMServer).WriteReport(ctx, req.(*WriteReportRequest)) + } + return interceptor(ctx, in, info, handler) +} + // EVM_ServiceDesc is the grpc.ServiceDesc for EVM service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -534,6 +568,10 @@ var EVM_ServiceDesc = grpc.ServiceDesc{ MethodName: "GetTransactionStatus", Handler: _EVM_GetTransactionStatus_Handler, }, + { + MethodName: "WriteReport", + Handler: _EVM_WriteReport_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "chains/evm/evm.proto",