diff --git a/go.mod b/go.mod index cd4e636e..61a832d5 100644 --- a/go.mod +++ b/go.mod @@ -4,6 +4,8 @@ go 1.21 toolchain go1.21.1 +replace github.com/smartcontractkit/libocr => github.com/jmank88/libocr v0.0.0-20240425103000-0eed0c09969e + require ( cosmossdk.io/errors v1.0.0 github.com/CosmWasm/wasmd v0.40.1 @@ -18,7 +20,7 @@ require ( github.com/pkg/errors v0.9.1 github.com/prometheus/client_golang v1.17.0 github.com/shopspring/decimal v1.3.1 - github.com/smartcontractkit/chainlink-common v0.1.7-0.20240327133125-eed636b9a6df + github.com/smartcontractkit/chainlink-common v0.1.7-0.20240425103110-dbf028ff5724 github.com/smartcontractkit/libocr v0.0.0-20240326191951-2bbe9382d052 github.com/stretchr/testify v1.9.0 github.com/tidwall/gjson v1.16.0 @@ -46,11 +48,13 @@ require ( github.com/OneOfOne/xxhash v1.2.5 // indirect github.com/andres-erbsen/clock v0.0.0-20160526145045-9e14626cd129 // indirect github.com/armon/go-metrics v0.4.1 // indirect + github.com/bahlo/generic-list-go v0.2.0 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 // indirect github.com/bits-and-blooms/bitset v1.10.0 // indirect github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect github.com/btcsuite/btcd/chaincfg/chainhash v1.0.3 // indirect + github.com/buger/jsonparser v1.1.1 // indirect github.com/cenkalti/backoff/v4 v4.2.1 // indirect github.com/cespare/xxhash v1.1.0 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect @@ -116,6 +120,7 @@ require ( github.com/holiman/uint256 v1.2.4 // indirect github.com/huandu/skiplist v1.2.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect + github.com/invopop/jsonschema v0.12.0 // indirect github.com/jmhodges/levigo v1.0.0 // indirect github.com/jpillora/backoff v1.0.0 // indirect github.com/klauspost/compress v1.16.7 // indirect @@ -123,6 +128,7 @@ require ( github.com/libp2p/go-buffer-pool v0.1.0 // indirect github.com/linkedin/goavro/v2 v2.12.0 // indirect github.com/magiconair/properties v1.8.7 // indirect + github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.19 // indirect github.com/mattn/go-sqlite3 v2.0.3+incompatible // indirect @@ -163,6 +169,7 @@ require ( github.com/tidwall/pretty v1.2.0 // 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/yusufpapurcu/wmi v1.2.3 // indirect github.com/zondax/hid v0.9.1 // indirect diff --git a/go.sum b/go.sum index 88da7b96..9943ed96 100644 --- a/go.sum +++ b/go.sum @@ -104,6 +104,8 @@ github.com/armon/go-metrics v0.4.1 h1:hR91U9KYmb6bLBYLQjyM+3j+rcd/UhE+G78SFnF8gJ github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= github.com/aws/aws-sdk-go v1.44.203 h1:pcsP805b9acL3wUqa4JR2vg1k2wnItkDYNvfmcy6F+U= github.com/aws/aws-sdk-go v1.44.203/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= +github.com/bahlo/generic-list-go v0.2.0 h1:5sz/EEAK+ls5wF+NeqDpk5+iNdMDXrh3z3nPnH1Wvgk= +github.com/bahlo/generic-list-go v0.2.0/go.mod h1:2KvAjgMlE5NNynlg/5iLrrCCZ2+5xWbdbCW3pNTGyYg= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= @@ -123,6 +125,8 @@ github.com/btcsuite/btcd/chaincfg/chainhash v1.0.3 h1:SDlJ7bAm4ewvrmZtR0DaiYbQGd github.com/btcsuite/btcd/chaincfg/chainhash v1.0.3/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= github.com/bufbuild/protocompile v0.4.0 h1:LbFKd2XowZvQ/kajzguUp2DC9UEIQhIq77fZZlaQsNA= github.com/bufbuild/protocompile v0.4.0/go.mod h1:3v93+mbWn/v3xzN+31nwkJfrEpAUwp+BagBSZWx+TP8= +github.com/buger/jsonparser v1.1.1 h1:2PnMjfWD7wBILjqQbt530v576A/cAbQvEW9gGIpYMUs= +github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= @@ -442,6 +446,8 @@ github.com/gtank/merlin v0.1.1 h1:eQ90iG7K9pOhtereWsmyRJ6RAwcP4tHTDBHXNg+u5is= github.com/gtank/merlin v0.1.1/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s= github.com/gtank/ristretto255 v0.1.2 h1:JEqUCPA1NvLq5DwYtuzigd7ss8fwbYay9fi4/5uMzcc= github.com/gtank/ristretto255 v0.1.2/go.mod h1:Ph5OpO6c7xKUGROZfWVLiJf9icMDwUeIvY4OmlYW69o= +github.com/hashicorp/consul/sdk v0.16.0 h1:SE9m0W6DEfgIVCJX7xU+iv/hUl4m/nxqMTnCdMxDpJ8= +github.com/hashicorp/consul/sdk v0.16.0/go.mod h1:7pxqqhqoaPqnBnzXD1StKed62LqJeClzVsUEy85Zr0A= github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= @@ -489,16 +495,21 @@ github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANyt github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +github.com/invopop/jsonschema v0.12.0 h1:6ovsNSuvn9wEQVOyc72aycBMVQFKz7cPdMJn10CvzRI= +github.com/invopop/jsonschema v0.12.0/go.mod h1:ffZ5Km5SWWRAIN6wbDXItl95euhFz2uON45H2qjYt+0= 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/jmank88/libocr v0.0.0-20240425103000-0eed0c09969e h1:gswd1U2Jht2eq230MMRq1E9+XMUiiTvm/30KGaOfuvA= +github.com/jmank88/libocr v0.0.0-20240425103000-0eed0c09969e/go.mod h1:fb1ZDVXACvu4frX3APHZaEBp0xi1DIm34DcA0CwTsZM= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmhodges/levigo v1.0.0 h1:q5EC36kV79HWeTBWsod3mG11EgStG3qArTKcvlksN1U= github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= github.com/jmoiron/sqlx v1.3.5 h1:vFFPA71p1o5gAeqtEAwLU4dnX2napprKtHr7PYIcN3g= github.com/jmoiron/sqlx v1.3.5/go.mod h1:nRVWtLre0KfCLJvgxzCsLVMogSvQ1zNJtpYr2Ccp0mQ= +github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= @@ -536,6 +547,8 @@ github.com/linkedin/goavro/v2 v2.12.0/go.mod h1:KXx+erlq+RPlGSPmLF7xGo6SAbh8sCQ5 github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= +github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= +github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/manifoldco/promptui v0.9.0 h1:3V4HzJk1TtXW1MTZMP7mdlwbBpIinw3HztaIlYthEiA= github.com/manifoldco/promptui v0.9.0/go.mod h1:ka04sppxSGFAtxX0qhlYQjISsg9mR4GWtQEhdbn6Pgg= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= @@ -687,14 +700,12 @@ github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPx github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= -github.com/smartcontractkit/chainlink-common v0.1.7-0.20240327133125-eed636b9a6df h1:AKjckaIV8R53dLJwoQ3VlUI56L34Ca+nkkzjR1784zY= -github.com/smartcontractkit/chainlink-common v0.1.7-0.20240327133125-eed636b9a6df/go.mod h1:u2XnvJHl7sQ9HMlRnVLsOKgV9ihk0RGIYywB12p9gQQ= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20240425103110-dbf028ff5724 h1:1qpCBUyjYP7nTYi2mdN27ZmOB9r7kA0GFww4M6VYbBA= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20240425103110-dbf028ff5724/go.mod h1:2BbaKM4DOcZCH+x1SNAPq1+X/1BCMOJNx12u/OzLlNk= github.com/smartcontractkit/go-plugin v0.0.0-20231003134350-e49dad63b306 h1:ko88+ZznniNJZbZPWAvHQU8SwKAdHngdDZ+pvVgB5ss= github.com/smartcontractkit/go-plugin v0.0.0-20231003134350-e49dad63b306/go.mod h1:w1sAEES3g3PuV/RzUrgow20W2uErMly84hhD3um1WL4= github.com/smartcontractkit/grpc-proxy v0.0.0-20230731113816-f1be6620749f h1:hgJif132UCdjo8u43i7iPN1/MFnu49hv7lFGFftCHKU= github.com/smartcontractkit/grpc-proxy v0.0.0-20230731113816-f1be6620749f/go.mod h1:MvMXoufZAtqExNexqi4cjrNYE9MefKddKylxjS+//n0= -github.com/smartcontractkit/libocr v0.0.0-20240326191951-2bbe9382d052 h1:1WFjrrVrWoQ9UpVMh7Mx4jDpzhmo1h8hFUKd9awIhIU= -github.com/smartcontractkit/libocr v0.0.0-20240326191951-2bbe9382d052/go.mod h1:SJEZCHgMCAzzBvo9vMV2DQ9onfEcIJCYSViyP4JI6c4= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= @@ -767,6 +778,8 @@ github.com/tyler-smith/go-bip39 v1.1.0/go.mod h1:gUYDtqQw1JS3ZJ8UWVcGTGqqr6YIN3C github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/ulikunitz/xz v0.5.11 h1:kpFauv27b6ynzBNT/Xy+1k+fK4WswhN/6PN5WhFAGw8= github.com/ulikunitz/xz v0.5.11/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= +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/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= diff --git a/integration-tests/go.mod b/integration-tests/go.mod index 02974799..9889ad2a 100644 --- a/integration-tests/go.mod +++ b/integration-tests/go.mod @@ -2,13 +2,15 @@ module github.com/smartcontractkit/chainlink-cosmos/integration-tests go 1.21.7 +replace github.com/smartcontractkit/libocr => github.com/jmank88/libocr v0.0.0-20240425103000-0eed0c09969e + require ( github.com/cometbft/cometbft v0.37.2 github.com/cosmos/cosmos-sdk v0.47.4 github.com/google/uuid v1.6.0 github.com/lib/pq v1.10.9 github.com/rs/zerolog v1.30.0 - github.com/smartcontractkit/chainlink-common v0.1.7-0.20240327133125-eed636b9a6df + github.com/smartcontractkit/chainlink-common v0.1.7-0.20240425103110-dbf028ff5724 github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240323000213-66b4c72027e6 github.com/smartcontractkit/chainlink-cosmos/ops v0.0.0-20231206164210-03f8b219402e github.com/smartcontractkit/chainlink-testing-framework v1.27.8 @@ -49,12 +51,14 @@ require ( github.com/aws/constructs-go/constructs/v10 v10.1.255 // indirect github.com/aws/jsii-runtime-go v1.75.0 // indirect github.com/aybabtme/rgbterm v0.0.0-20170906152045-cc83f3b3ce59 // indirect + github.com/bahlo/generic-list-go v0.2.0 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 // indirect github.com/bits-and-blooms/bitset v1.10.0 // indirect github.com/blendle/zapdriver v1.3.1 // indirect github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect github.com/btcsuite/btcd/chaincfg/chainhash v1.0.3 // indirect + github.com/buger/jsonparser v1.1.1 // indirect github.com/bytedance/sonic v1.10.1 // indirect github.com/cdk8s-team/cdk8s-core-go/cdk8s/v2 v2.7.5 // indirect github.com/cenkalti/backoff/v4 v4.2.1 // indirect @@ -183,6 +187,7 @@ require ( github.com/huin/goupnp v1.3.0 // indirect github.com/imdario/mergo v0.3.16 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect + github.com/invopop/jsonschema v0.12.0 // 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 @@ -253,6 +258,7 @@ require ( github.com/robfig/cron/v3 v3.0.1 // indirect github.com/rogpeppe/go-internal v1.11.0 // indirect github.com/russross/blackfriday v1.6.0 // indirect + github.com/santhosh-tekuri/jsonschema/v5 v5.3.1 // indirect github.com/sasha-s/go-deadlock v0.3.1 // indirect github.com/scylladb/go-reflectx v1.0.1 // indirect github.com/shirou/gopsutil v3.21.11+incompatible // indirect @@ -260,7 +266,7 @@ require ( github.com/shoenig/go-m1cpu v0.1.6 // indirect github.com/shopspring/decimal v1.3.1 // indirect github.com/sirupsen/logrus v1.9.3 // indirect - github.com/smartcontractkit/chainlink-vrf v0.0.0-20240323112415-be2b2ccbdfd5 // indirect + github.com/smartcontractkit/chainlink-vrf v0.0.0-20231120191722-fef03814f868 // indirect github.com/smartcontractkit/wsrpc v0.7.2 // indirect github.com/spf13/afero v1.9.5 // indirect github.com/spf13/cast v1.6.0 // indirect @@ -285,6 +291,7 @@ require ( github.com/twitchyliquid64/golang-asm v0.15.1 // indirect github.com/tyler-smith/go-bip39 v1.1.0 // indirect github.com/ugorji/go/codec v1.2.12 // indirect + github.com/wk8/go-ordered-map/v2 v2.1.8 // indirect github.com/x448/float16 v0.8.4 // indirect github.com/xlab/treeprint v1.1.0 // indirect github.com/yusufpapurcu/wmi v1.2.3 // indirect diff --git a/integration-tests/go.sum b/integration-tests/go.sum index 034d6683..6b507827 100644 --- a/integration-tests/go.sum +++ b/integration-tests/go.sum @@ -844,6 +844,8 @@ github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+ github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= 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/jmank88/libocr v0.0.0-20240425103000-0eed0c09969e h1:gswd1U2Jht2eq230MMRq1E9+XMUiiTvm/30KGaOfuvA= +github.com/jmank88/libocr v0.0.0-20240425103000-0eed0c09969e/go.mod h1:fb1ZDVXACvu4frX3APHZaEBp0xi1DIm34DcA0CwTsZM= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= @@ -1157,6 +1159,8 @@ github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/santhosh-tekuri/jsonschema/v5 v5.3.1 h1:lZUw3E0/J3roVtGQ+SCrUrg3ON6NgVqpn3+iol9aGu4= +github.com/santhosh-tekuri/jsonschema/v5 v5.3.1/go.mod h1:uToXkOrWAZ6/Oc07xWQrPOhJotwFIyu2bBVN41fcDUY= github.com/sasha-s/go-deadlock v0.3.1 h1:sqv7fDNShgjcaxkO0JNcOAlr8B9+cV5Ey/OB71efZx0= github.com/sasha-s/go-deadlock v0.3.1/go.mod h1:F73l+cr82YSh10GxyRI6qZiCgK64VaZjwesgfQ1/iLM= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= @@ -1191,8 +1195,8 @@ github.com/smartcontractkit/chain-selectors v1.0.10 h1:t9kJeE6B6G+hKD0GYR4kGJSCq github.com/smartcontractkit/chain-selectors v1.0.10/go.mod h1:d4Hi+E1zqjy9HqMkjBE5q1vcG9VGgxf5VxiRHfzi2kE= github.com/smartcontractkit/chainlink-automation v1.0.2-0.20240311111125-22812a072c35 h1:GNhRKD3izyzAoGMXDvVUAwEuzz4Atdj3U3RH7eak5Is= github.com/smartcontractkit/chainlink-automation v1.0.2-0.20240311111125-22812a072c35/go.mod h1:2I0dWdYdK6jHPnSYYy7Y7Xp7L0YTnJ3KZtkhLQflsTU= -github.com/smartcontractkit/chainlink-common v0.1.7-0.20240327133125-eed636b9a6df h1:AKjckaIV8R53dLJwoQ3VlUI56L34Ca+nkkzjR1784zY= -github.com/smartcontractkit/chainlink-common v0.1.7-0.20240327133125-eed636b9a6df/go.mod h1:u2XnvJHl7sQ9HMlRnVLsOKgV9ihk0RGIYywB12p9gQQ= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20240425103110-dbf028ff5724 h1:1qpCBUyjYP7nTYi2mdN27ZmOB9r7kA0GFww4M6VYbBA= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20240425103110-dbf028ff5724/go.mod h1:2BbaKM4DOcZCH+x1SNAPq1+X/1BCMOJNx12u/OzLlNk= github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540 h1:xFSv8561jsLtF6gYZr/zW2z5qUUAkcFkApin2mnbYTo= github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540/go.mod h1:sjAmX8K2kbQhvDarZE1ZZgDgmHJ50s0BBc/66vKY2ek= github.com/smartcontractkit/chainlink-feeds v0.0.0-20240119021347-3c541a78cdb8 h1:1BcjXuviSAKttOX7BZoVHRZZGfxqoA2+AL8tykmkdoc= @@ -1203,8 +1207,8 @@ github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.202403 github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240325075535-0f7eb05ee595/go.mod h1:vV6WfnVIbK5Q1JsIru4YcTG0T1uRpLJm6t2BgCnCSsg= github.com/smartcontractkit/chainlink-testing-framework v1.27.8 h1:V1G4hVjztvFuY6dPfBdv53OzQ99lwLUraXH0Wapyh3Q= github.com/smartcontractkit/chainlink-testing-framework v1.27.8/go.mod h1:jN+HgXbriq6fKRlIqLw9F3I81aYImV6kBJkIfz0mdIA= -github.com/smartcontractkit/chainlink-vrf v0.0.0-20240323112415-be2b2ccbdfd5 h1:aPa02s24dCt+hPKnDqpKPmlEIVUxth26//USvXhBYsc= -github.com/smartcontractkit/chainlink-vrf v0.0.0-20240323112415-be2b2ccbdfd5/go.mod h1:2f8f0mCWyn8rRHYNxLH2AaeLCQu4/XuVyoVhYWwDTJ8= +github.com/smartcontractkit/chainlink-vrf v0.0.0-20231120191722-fef03814f868 h1:FFdvEzlYwcuVHkdZ8YnZR/XomeMGbz5E2F2HZI3I3w8= +github.com/smartcontractkit/chainlink-vrf v0.0.0-20231120191722-fef03814f868/go.mod h1:Kn1Hape05UzFZ7bOUnm3GVsHzP0TNrVmpfXYNHdqGGs= github.com/smartcontractkit/chainlink/integration-tests v0.0.0-20240327205023-5cd9689bef1c h1:8EgcovKDwAzrhipBNIu77QLbGDdJIh9NT+n4TIDDAIM= github.com/smartcontractkit/chainlink/integration-tests v0.0.0-20240327205023-5cd9689bef1c/go.mod h1:M7MTCMKWQkF46WDHHBt3XY0qfVciInhJLgKUEMx1Sco= github.com/smartcontractkit/chainlink/v2 v2.10.0-beta0.0.20240327205023-5cd9689bef1c h1:5HgD2B1tVDgZCLj12qQSsy1MM4FWi2LvYle3kRDY1Cw= @@ -1213,8 +1217,6 @@ github.com/smartcontractkit/go-plugin v0.0.0-20231003134350-e49dad63b306 h1:ko88 github.com/smartcontractkit/go-plugin v0.0.0-20231003134350-e49dad63b306/go.mod h1:w1sAEES3g3PuV/RzUrgow20W2uErMly84hhD3um1WL4= github.com/smartcontractkit/grpc-proxy v0.0.0-20230731113816-f1be6620749f h1:hgJif132UCdjo8u43i7iPN1/MFnu49hv7lFGFftCHKU= github.com/smartcontractkit/grpc-proxy v0.0.0-20230731113816-f1be6620749f/go.mod h1:MvMXoufZAtqExNexqi4cjrNYE9MefKddKylxjS+//n0= -github.com/smartcontractkit/libocr v0.0.0-20240326191951-2bbe9382d052 h1:1WFjrrVrWoQ9UpVMh7Mx4jDpzhmo1h8hFUKd9awIhIU= -github.com/smartcontractkit/libocr v0.0.0-20240326191951-2bbe9382d052/go.mod h1:SJEZCHgMCAzzBvo9vMV2DQ9onfEcIJCYSViyP4JI6c4= github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20230906073235-9e478e5e19f1 h1:yiKnypAqP8l0OX0P3klzZ7SCcBUxy5KqTAKZmQOvSQE= github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20230906073235-9e478e5e19f1/go.mod h1:q6f4fe39oZPdsh1i57WznEZgxd8siidMaSFq3wdPmVg= github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20230906073235-9e478e5e19f1 h1:Dai1bn+Q5cpeGMQwRdjOdVjG8mmFFROVkSKuUgBErRQ= diff --git a/pkg/cosmos/adapters/cosmwasm/config_digester.go b/pkg/cosmos/adapters/cosmwasm/config_digester.go index 88e2f972..faafbc36 100644 --- a/pkg/cosmos/adapters/cosmwasm/config_digester.go +++ b/pkg/cosmos/adapters/cosmwasm/config_digester.go @@ -2,6 +2,7 @@ package cosmwasm import ( "bytes" + "context" "encoding/binary" "errors" "fmt" @@ -29,7 +30,7 @@ func NewOffchainConfigDigester(chainID string, contract cosmosSDK.AccAddress) Of } } -func (cd OffchainConfigDigester) ConfigDigest(cfg types.ContractConfig) (types.ConfigDigest, error) { +func (cd OffchainConfigDigester) ConfigDigest(ctx context.Context, cfg types.ContractConfig) (types.ConfigDigest, error) { digest := types.ConfigDigest{} buf := bytes.NewBuffer([]byte{}) @@ -103,7 +104,7 @@ func (cd OffchainConfigDigester) ConfigDigest(cfg types.ContractConfig) (types.C return digest, fmt.Errorf("incorrect hash size %d, expected %d", n, len(digest)) } - pre, err := cd.ConfigDigestPrefix() + pre, err := cd.ConfigDigestPrefix(ctx) if err != nil { return digest, err } @@ -115,6 +116,6 @@ func (cd OffchainConfigDigester) ConfigDigest(cfg types.ContractConfig) (types.C } // This should return the same constant value on every invocation -func (OffchainConfigDigester) ConfigDigestPrefix() (types.ConfigDigestPrefix, error) { +func (OffchainConfigDigester) ConfigDigestPrefix(ctx context.Context) (types.ConfigDigestPrefix, error) { return ConfigDigestPrefixCosmos, nil } diff --git a/pkg/cosmos/adapters/cosmwasm/config_digester_test.go b/pkg/cosmos/adapters/cosmwasm/config_digester_test.go index e9f69fb6..9d314af5 100644 --- a/pkg/cosmos/adapters/cosmwasm/config_digester_test.go +++ b/pkg/cosmos/adapters/cosmwasm/config_digester_test.go @@ -8,6 +8,8 @@ import ( "github.com/smartcontractkit/libocr/offchainreporting2/types" "github.com/stretchr/testify/assert" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) var testConfig = types.ContractConfig{ @@ -36,7 +38,7 @@ func TestConfigDigester(t *testing.T) { sdk.MustAccAddressFromBech32("wasm1cd65xyq076dm9cw3xxqtdh4d6ypzug0edd9958"), ) - digest, err := d.ConfigDigest(testConfig) + digest, err := d.ConfigDigest(tests.Context(t), testConfig) assert.NoError(t, err) assert.Equal(t, "000289b55121341b1ff99cc8e15659fb8de14fca52a695b2b269a7fb94059b9f", digest.Hex()) } @@ -47,6 +49,6 @@ func TestConfigDigester_InvalidChainID(t *testing.T) { sdk.MustAccAddressFromBech32("wasm1cd65xyq076dm9cw3xxqtdh4d6ypzug0edd9958"), ) - _, err := d.ConfigDigest(testConfig) + _, err := d.ConfigDigest(tests.Context(t), testConfig) assert.Error(t, err) } diff --git a/pkg/cosmos/adapters/cosmwasm/contract_transmitter.go b/pkg/cosmos/adapters/cosmwasm/contract_transmitter.go index 66bcdbf1..bc580c7e 100644 --- a/pkg/cosmos/adapters/cosmwasm/contract_transmitter.go +++ b/pkg/cosmos/adapters/cosmwasm/contract_transmitter.go @@ -79,6 +79,6 @@ func (ct *ContractTransmitter) Transmit( return err } -func (ct *ContractTransmitter) FromAccount() (types.Account, error) { +func (ct *ContractTransmitter) FromAccount(ctx context.Context) (types.Account, error) { return types.Account(ct.sender.String()), nil } diff --git a/pkg/cosmos/adapters/cosmwasm/relay.go b/pkg/cosmos/adapters/cosmwasm/relay.go index b96b527f..e3f22045 100644 --- a/pkg/cosmos/adapters/cosmwasm/relay.go +++ b/pkg/cosmos/adapters/cosmwasm/relay.go @@ -32,7 +32,7 @@ type configProvider struct { contractAddr cosmosSDK.AccAddress } -func NewConfigProvider(lggr logger.Logger, chain adapters.Chain, args relaytypes.RelayArgs) (*configProvider, error) { +func NewConfigProvider(ctx context.Context, lggr logger.Logger, chain adapters.Chain, args relaytypes.RelayArgs) (*configProvider, error) { var relayConfig adapters.RelayConfig err := json.Unmarshal(args.RelayConfig, &relayConfig) if err != nil { @@ -100,8 +100,8 @@ type medianProvider struct { transmitter types.ContractTransmitter } -func NewMedianProvider(lggr logger.Logger, chain adapters.Chain, rargs relaytypes.RelayArgs, pargs relaytypes.PluginArgs) (relaytypes.MedianProvider, error) { - configProvider, err := NewConfigProvider(lggr, chain, rargs) +func NewMedianProvider(ctx context.Context, lggr logger.Logger, chain adapters.Chain, rargs relaytypes.RelayArgs, pargs relaytypes.PluginArgs) (relaytypes.MedianProvider, error) { + configProvider, err := NewConfigProvider(ctx, lggr, chain, rargs) if err != nil { return nil, err } diff --git a/pkg/cosmos/adapters/cosmwasm/report.go b/pkg/cosmos/adapters/cosmwasm/report.go index d31724a8..66934530 100644 --- a/pkg/cosmos/adapters/cosmwasm/report.go +++ b/pkg/cosmos/adapters/cosmwasm/report.go @@ -1,6 +1,7 @@ package cosmwasm import ( + "context" "encoding/binary" "fmt" "math/big" @@ -34,7 +35,7 @@ var _ median.ReportCodec = (*ReportCodec)(nil) type ReportCodec struct{} -func (c ReportCodec) BuildReport(oo []median.ParsedAttributedObservation) (types.Report, error) { +func (c ReportCodec) BuildReport(ctx context.Context, oo []median.ParsedAttributedObservation) (types.Report, error) { n := len(oo) if n == 0 { return nil, fmt.Errorf("cannot build report from empty attributed observations") @@ -95,11 +96,11 @@ func (c ReportCodec) BuildReport(oo []median.ParsedAttributedObservation) (types return report, nil } -func (c ReportCodec) MaxReportLength(n int) (int, error) { +func (c ReportCodec) MaxReportLength(ctx context.Context, n int) (int, error) { return prefixSizeBytes + (n * observationSizeBytes) + juelsPerFeeCoinSizeBytes, nil } -func (c ReportCodec) MedianFromReport(report types.Report) (*big.Int, error) { +func (c ReportCodec) MedianFromReport(ctx context.Context, report types.Report) (*big.Int, error) { // report should at least be able to contain timestamp, observers, observations length rLen := len(report) if rLen < prefixSizeBytes { diff --git a/pkg/cosmos/adapters/cosmwasm/report_fuzz_test.go b/pkg/cosmos/adapters/cosmwasm/report_fuzz_test.go index 3651ed34..ad296b12 100644 --- a/pkg/cosmos/adapters/cosmwasm/report_fuzz_test.go +++ b/pkg/cosmos/adapters/cosmwasm/report_fuzz_test.go @@ -11,12 +11,14 @@ import ( "github.com/stretchr/testify/require" "github.com/smartcontractkit/libocr/offchainreporting2/reportingplugin/median" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) // go test -tags=go1.18 -fuzz ./... func FuzzReportCodecMedianFromReport(f *testing.F) { cdc := ReportCodec{} - report, err := cdc.BuildReport([]median.ParsedAttributedObservation{ + report, err := cdc.BuildReport(tests.Context(f), []median.ParsedAttributedObservation{ {Timestamp: uint32(time.Now().Unix()), Value: big.NewInt(10), JuelsPerFeeCoin: big.NewInt(100000)}, {Timestamp: uint32(time.Now().Unix()), Value: big.NewInt(10), JuelsPerFeeCoin: big.NewInt(200000)}, {Timestamp: uint32(time.Now().Unix()), Value: big.NewInt(11), JuelsPerFeeCoin: big.NewInt(300000)}}) @@ -25,10 +27,11 @@ func FuzzReportCodecMedianFromReport(f *testing.F) { // Seed with valid report f.Add([]byte(report)) f.Fuzz(func(t *testing.T, report []byte) { - med, err := cdc.MedianFromReport(report) + ctx := tests.Context(t) + med, err := cdc.MedianFromReport(ctx, report) if err == nil { // Should always be able to build a report from the medians extracted - _, err = cdc.BuildReport([]median.ParsedAttributedObservation{{Timestamp: uint32(time.Now().Unix()), Value: med, JuelsPerFeeCoin: med}}) + _, err = cdc.BuildReport(ctx, []median.ParsedAttributedObservation{{Timestamp: uint32(time.Now().Unix()), Value: med, JuelsPerFeeCoin: med}}) require.NoError(t, err) } }) diff --git a/pkg/cosmos/adapters/cosmwasm/report_test.go b/pkg/cosmos/adapters/cosmwasm/report_test.go index 9ae75d44..a674e5f9 100644 --- a/pkg/cosmos/adapters/cosmwasm/report_test.go +++ b/pkg/cosmos/adapters/cosmwasm/report_test.go @@ -12,6 +12,8 @@ import ( "github.com/smartcontractkit/libocr/offchainreporting2/types" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestBuildReport(t *testing.T) { @@ -36,7 +38,7 @@ func TestBuildReport(t *testing.T) { observers[i] = uint8(i) } - report, err := c.BuildReport(oo) + report, err := c.BuildReport(tests.Context(t), oo) assert.NoError(t, err) // validate length @@ -74,7 +76,7 @@ func TestMedianFromOnChainReport(t *testing.T) { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 73, 150, 2, 210, // observation 2 0, 0, 0, 0, 0, 0, 0, 0, 13, 224, 182, 179, 167, 100, 0, 0, // juels per atom (1 with 18 decimal places) } - res, err := c.MedianFromReport(report) + res, err := c.MedianFromReport(tests.Context(t), report) assert.NoError(t, err) assert.Equal(t, "1234567890", res.String()) } @@ -88,7 +90,7 @@ type medianTest struct { func TestMedianFromReport(t *testing.T) { cdc := ReportCodec{} // Requires at least one obs - _, err := cdc.BuildReport(nil) + _, err := cdc.BuildReport(tests.Context(t), nil) require.Error(t, err) var tt = []medianTest{ { @@ -142,6 +144,7 @@ func TestMedianFromReport(t *testing.T) { for _, tc := range tt { tc := tc t.Run(tc.name, func(t *testing.T) { + ctx := tests.Context(t) var pos []median.ParsedAttributedObservation for i, obs := range tc.obs { pos = append(pos, median.ParsedAttributedObservation{ @@ -150,12 +153,12 @@ func TestMedianFromReport(t *testing.T) { Observer: commontypes.OracleID(uint8(i))}, ) } - report, err := cdc.BuildReport(pos) + report, err := cdc.BuildReport(ctx, pos) require.NoError(t, err) - max, err := cdc.MaxReportLength(len(tc.obs)) + max, err := cdc.MaxReportLength(ctx, len(tc.obs)) require.NoError(t, err) assert.Equal(t, len(report), max) - med, err := cdc.MedianFromReport(report) + med, err := cdc.MedianFromReport(ctx, report) require.NoError(t, err) assert.Equal(t, tc.expectedMedian.String(), med.String()) }) diff --git a/pkg/cosmos/adapters/injective/median_report/report.go b/pkg/cosmos/adapters/injective/median_report/report.go index 3a4e8616..c1509330 100644 --- a/pkg/cosmos/adapters/injective/median_report/report.go +++ b/pkg/cosmos/adapters/injective/median_report/report.go @@ -1,6 +1,7 @@ package median_report import ( + "context" "errors" "fmt" "math/big" @@ -19,7 +20,7 @@ var _ median.ReportCodec = ReportCodec{} type ReportCodec struct{} -func (ReportCodec) BuildReport(observations []median.ParsedAttributedObservation) (types.Report, error) { +func (ReportCodec) BuildReport(ctx context.Context, observations []median.ParsedAttributedObservation) (types.Report, error) { if len(observations) == 0 { err := errors.New("cannot build report from empty attributed observations") return nil, err @@ -60,13 +61,13 @@ func (ReportCodec) BuildReport(observations []median.ParsedAttributedObservation return types.Report(reportBytes), err } -func (ReportCodec) MaxReportLength(n int) (int, error) { +func (ReportCodec) MaxReportLength(ctx context.Context, n int) (int, error) { // TODO: return 0, nil // return prefixSizeBytes + (n * observationSizeBytes) + juelsPerFeeCoinSizeBytes } -func (ReportCodec) MedianFromReport(report types.Report) (*big.Int, error) { +func (ReportCodec) MedianFromReport(ctx context.Context, report types.Report) (*big.Int, error) { reportRaw, err := ParseReport([]byte(report)) if err != nil { return nil, err diff --git a/pkg/cosmos/adapters/injective/offchain_config_digester.go b/pkg/cosmos/adapters/injective/offchain_config_digester.go index ea5eb520..45090e4c 100644 --- a/pkg/cosmos/adapters/injective/offchain_config_digester.go +++ b/pkg/cosmos/adapters/injective/offchain_config_digester.go @@ -1,6 +1,8 @@ package injective import ( + "context" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/smartcontractkit/libocr/offchainreporting2/types" @@ -23,7 +25,7 @@ func NewCosmosOffchainConfigDigester(chainID string, feedID string) *CosmosOffch } } -func (d CosmosOffchainConfigDigester) ConfigDigest(cc types.ContractConfig) (types.ConfigDigest, error) { +func (d CosmosOffchainConfigDigester) ConfigDigest(ctx context.Context, cc types.ContractConfig) (types.ConfigDigest, error) { signers := make([]string, 0, len(cc.Signers)) for _, acc := range cc.Signers { signers = append(signers, sdk.AccAddress(acc).String()) @@ -54,7 +56,7 @@ func (d CosmosOffchainConfigDigester) ConfigDigest(cc types.ContractConfig) (typ return configDigest, nil } -func (d CosmosOffchainConfigDigester) ConfigDigestPrefix() (types.ConfigDigestPrefix, error) { +func (d CosmosOffchainConfigDigester) ConfigDigestPrefix(ctx context.Context) (types.ConfigDigestPrefix, error) { return ConfigDigestPrefixCosmos, nil } diff --git a/pkg/cosmos/adapters/injective/relay.go b/pkg/cosmos/adapters/injective/relay.go index 528365ad..8f88b153 100644 --- a/pkg/cosmos/adapters/injective/relay.go +++ b/pkg/cosmos/adapters/injective/relay.go @@ -34,7 +34,7 @@ type configProvider struct { feedID string } -func NewConfigProvider(lggr logger.Logger, chain adapters.Chain, args relaytypes.RelayArgs) (*configProvider, error) { +func NewConfigProvider(ctx context.Context, lggr logger.Logger, chain adapters.Chain, args relaytypes.RelayArgs) (*configProvider, error) { var relayConfig adapters.RelayConfig err := json.Unmarshal(args.RelayConfig, &relayConfig) if err != nil { @@ -102,8 +102,8 @@ type medianProvider struct { transmitter types.ContractTransmitter } -func NewMedianProvider(lggr logger.Logger, chain adapters.Chain, rargs relaytypes.RelayArgs, pargs relaytypes.PluginArgs) (relaytypes.MedianProvider, error) { - configProvider, err := NewConfigProvider(lggr, chain, rargs) +func NewMedianProvider(ctx context.Context, lggr logger.Logger, chain adapters.Chain, rargs relaytypes.RelayArgs, pargs relaytypes.PluginArgs) (relaytypes.MedianProvider, error) { + configProvider, err := NewConfigProvider(ctx, lggr, chain, rargs) if err != nil { return nil, err } diff --git a/pkg/cosmos/adapters/injective/transmitter.go b/pkg/cosmos/adapters/injective/transmitter.go index e3bc8fe9..d4f28441 100644 --- a/pkg/cosmos/adapters/injective/transmitter.go +++ b/pkg/cosmos/adapters/injective/transmitter.go @@ -39,7 +39,7 @@ func NewCosmosModuleTransmitter( } } -func (c *CosmosModuleTransmitter) FromAccount() (types.Account, error) { +func (c *CosmosModuleTransmitter) FromAccount(ctx context.Context) (types.Account, error) { return types.Account(c.sender.String()), nil } diff --git a/pkg/cosmos/relay.go b/pkg/cosmos/relay.go index ec1370db..66364292 100644 --- a/pkg/cosmos/relay.go +++ b/pkg/cosmos/relay.go @@ -57,7 +57,7 @@ func (r *Relayer) Start(ctx context.Context) error { if r.chain == nil { return errors.New("Cosmos unavailable") } - return nil + return r.chain.Start(ctx) } func (r *Relayer) Close() error { return nil } @@ -84,26 +84,26 @@ func (r *Relayer) Transact(ctx context.Context, from, to string, amount *big.Int return r.chain.Transact(ctx, from, to, amount, balanceCheck) } -func (r *Relayer) NewMercuryProvider(rargs types.RelayArgs, pargs types.PluginArgs) (types.MercuryProvider, error) { +func (r *Relayer) NewMercuryProvider(ctx context.Context, rargs types.RelayArgs, pargs types.PluginArgs) (types.MercuryProvider, error) { return nil, errors.New("mercury is not supported for cosmos") } -func (r *Relayer) NewLLOProvider(rargs types.RelayArgs, pargs types.PluginArgs) (types.LLOProvider, error) { +func (r *Relayer) NewLLOProvider(ctx context.Context, rargs types.RelayArgs, pargs types.PluginArgs) (types.LLOProvider, error) { return nil, errors.New("data streams is not supported for cosmos") } -func (r *Relayer) NewFunctionsProvider(rargs types.RelayArgs, pargs types.PluginArgs) (types.FunctionsProvider, error) { +func (r *Relayer) NewFunctionsProvider(ctx context.Context, rargs types.RelayArgs, pargs types.PluginArgs) (types.FunctionsProvider, error) { return nil, errors.New("functions are not supported for cosmos") } -func (r *Relayer) NewConfigProvider(args types.RelayArgs) (types.ConfigProvider, error) { +func (r *Relayer) NewConfigProvider(ctx context.Context, args types.RelayArgs) (types.ConfigProvider, error) { var configProvider types.ConfigProvider var err error if r.chain.Config().Bech32Prefix() == InjectivePrefix { - configProvider, err = injective.NewConfigProvider(r.lggr, r.chain, args) + configProvider, err = injective.NewConfigProvider(ctx, r.lggr, r.chain, args) } else { // Default to cosmwasm adapter - configProvider, err = cosmwasm.NewConfigProvider(r.lggr, r.chain, args) + configProvider, err = cosmwasm.NewConfigProvider(ctx, r.lggr, r.chain, args) } if err != nil { return nil, err @@ -112,18 +112,18 @@ func (r *Relayer) NewConfigProvider(args types.RelayArgs) (types.ConfigProvider, return configProvider, err } -func (r *Relayer) NewMedianProvider(rargs types.RelayArgs, pargs types.PluginArgs) (types.MedianProvider, error) { - configProvider, err := cosmwasm.NewMedianProvider(r.lggr, r.chain, rargs, pargs) +func (r *Relayer) NewMedianProvider(ctx context.Context, rargs types.RelayArgs, pargs types.PluginArgs) (types.MedianProvider, error) { + configProvider, err := cosmwasm.NewMedianProvider(ctx, r.lggr, r.chain, rargs, pargs) if err != nil { return nil, err } return configProvider, err } -func (r *Relayer) NewAutomationProvider(rargs types.RelayArgs, pargs types.PluginArgs) (types.AutomationProvider, error) { +func (r *Relayer) NewAutomationProvider(ctx context.Context, rargs types.RelayArgs, pargs types.PluginArgs) (types.AutomationProvider, error) { return nil, errors.New("automation is not supported for cosmos") } -func (r *Relayer) NewPluginProvider(rargs types.RelayArgs, pargs types.PluginArgs) (types.PluginProvider, error) { +func (r *Relayer) NewPluginProvider(ctx context.Context, rargs types.RelayArgs, pargs types.PluginArgs) (types.PluginProvider, error) { return nil, errors.New("plugin provider is not supported for cosmos") }