Compare commits

...

62 commits

Author SHA1 Message Date
069dc8374e cleanup 2025-02-25 15:09:28 +01:00
f8c7bd5b88 WIP 2025-02-25 14:47:36 +01:00
7da12140fd WIP 2025-02-25 14:44:04 +01:00
970f3d9fef WIP 2025-02-25 14:43:23 +01:00
030bc6f19a WIP 2025-02-25 14:41:05 +01:00
91a0009633 WIP 2025-02-25 14:39:52 +01:00
6b7226eade WIP 2025-02-25 14:38:56 +01:00
8d87786f84 WIP 2025-02-25 14:34:56 +01:00
e6abeb5ba7 WIP 2025-02-25 13:57:57 +01:00
04cfb8d16f WIP 2025-02-25 13:43:59 +01:00
b6055e661b WIP 2025-02-25 13:40:02 +01:00
fd9431d5dc WIP 2025-02-25 13:11:47 +01:00
cde34a7b39 WIP 2025-02-25 13:02:15 +01:00
aefd382394 WIP 2025-02-25 12:48:18 +01:00
f3db4f5a9c correct denomination 2025-02-24 16:59:55 +01:00
f9022c2a76 query latest gas-price before running updater 2025-02-24 15:18:55 +01:00
34035eac9a wip 2025-02-13 15:28:03 +01:00
318c99ee75 revert to cliclient 2025-02-13 15:26:41 +01:00
195a565ad2 WIP 2025-02-13 15:25:37 +01:00
9bc321716e revert grpc 2025-02-13 13:27:30 +01:00
7379ec91c3 try grpc 2025-02-11 17:43:48 +01:00
f4bc1758da write to logs 2024-12-05 17:37:23 +01:00
7448a98336 WIP 2024-12-05 17:22:43 +01:00
96be5cf0be WIP 2024-12-05 17:18:22 +01:00
2507a8be0e remove hardcoded config 2024-12-05 17:15:56 +01:00
87193616f6 WIP 2024-12-05 15:47:54 +01:00
95286858b0 WIP 2024-12-05 15:28:01 +01:00
d78c2559aa WIP 2024-12-05 15:22:57 +01:00
4ea6528d42 WIP 2024-12-05 15:05:29 +01:00
00d550787b WIP 2024-12-05 14:56:38 +01:00
f52f8e9184 WIP 2024-12-05 14:49:37 +01:00
c45bd282a0 WIP 2024-12-05 14:40:57 +01:00
275954a4d1 WIP 2024-12-05 14:37:29 +01:00
0d796e6819 WIP 2024-12-05 14:36:19 +01:00
ae380a2cca remove local db 2024-12-05 14:29:35 +01:00
e490eac7c4 WIP 2024-12-05 13:03:39 +01:00
7fbbf0fcbb WIP 2024-12-05 12:26:03 +01:00
29c642d64c WIP 2024-12-04 22:00:18 +01:00
64c0fc43de WIP 2024-12-04 21:45:43 +01:00
dd158dbe7f WIP 2024-12-04 21:43:33 +01:00
bc3577ec17 WIP 2024-12-04 21:41:48 +01:00
f6770c2d0c WIP 2024-12-04 21:35:35 +01:00
91769c0114 changed type of tcbinfo 2024-12-04 20:48:38 +01:00
f2b6dbfadf WIP 2024-12-04 20:40:28 +01:00
23e085b70d WIP 2024-12-04 20:35:48 +01:00
84dac5a47e WIP 2024-12-04 20:32:56 +01:00
02cfb3f998 WIP 2024-12-04 20:28:59 +01:00
86bd351398 WIP 2024-12-04 20:27:58 +01:00
7dc0312be3 add local signature verification 2024-12-04 20:22:13 +01:00
cac16b1e7c WIP 2024-12-04 19:45:23 +01:00
3b6971095c WIP 2024-12-04 19:42:22 +01:00
1f34b60924 WIP 2024-12-03 12:17:38 +01:00
1dbe42bf84 WIP 2024-12-03 11:42:57 +01:00
ea024a573e WIP 2024-12-03 11:02:58 +01:00
54945e370e WIP 2024-12-03 11:01:17 +01:00
9f9b15f0fd WIP 2024-12-03 10:58:52 +01:00
031eb9d98c WIP 2024-12-03 10:41:57 +01:00
e84ef9b417 WIP async 2 2024-12-03 10:38:50 +01:00
cdd11858f6 WIP async 2024-12-03 10:13:37 +01:00
5cea6489e1 update local store + execute contract 2024-11-29 20:07:22 +01:00
b1b6272fdb add execute 2024-11-29 20:07:22 +01:00
a1f34dc1f1 tcbinfo-updater initial commit 2024-11-29 20:07:22 +01:00
11 changed files with 376 additions and 124 deletions

266
Cargo.lock generated
View file

@ -156,9 +156,9 @@ dependencies = [
[[package]] [[package]]
name = "anyhow" name = "anyhow"
version = "1.0.89" version = "1.0.91"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "86fdf8605db99b54d3cd748a44c6d04df638eb5dafb219b135d0149bd0db01f6" checksum = "c042108f3ed77fd83760a5fd79b53be043192bb3b9dba91d8c574c0ada7850c8"
dependencies = [ dependencies = [
"backtrace", "backtrace",
] ]
@ -335,7 +335,7 @@ checksum = "965c2d33e53cb6b267e148a4cb0760bc01f4904c1cd4bb4002a085bb016d1490"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.79", "syn 2.0.85",
"synstructure", "synstructure",
] ]
@ -347,7 +347,7 @@ checksum = "7b18050c2cd6fe86c3a76584ef5e0baf286d038cda203eb6223df2cc413565f7"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.79", "syn 2.0.85",
] ]
[[package]] [[package]]
@ -373,7 +373,7 @@ checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.79", "syn 2.0.85",
] ]
[[package]] [[package]]
@ -395,7 +395,7 @@ checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.79", "syn 2.0.85",
] ]
[[package]] [[package]]
@ -406,7 +406,7 @@ checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.79", "syn 2.0.85",
] ]
[[package]] [[package]]
@ -562,6 +562,15 @@ version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d965446196e3b7decd44aa7ee49e31d630118f90ef12f97900f262eb915c951d" checksum = "d965446196e3b7decd44aa7ee49e31d630118f90ef12f97900f262eb915c951d"
[[package]]
name = "bincode"
version = "1.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad"
dependencies = [
"serde",
]
[[package]] [[package]]
name = "bindgen" name = "bindgen"
version = "0.66.1" version = "0.66.1"
@ -581,7 +590,7 @@ dependencies = [
"regex", "regex",
"rustc-hash 1.1.0", "rustc-hash 1.1.0",
"shlex", "shlex",
"syn 2.0.79", "syn 2.0.85",
"which 4.4.2", "which 4.4.2",
] ]
@ -692,9 +701,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
[[package]] [[package]]
name = "bytes" name = "bytes"
version = "1.7.2" version = "1.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "428d9aa8fbc0670b7b8d6030a7fadd0f86151cae55e4dbbece15f3780a3dfaf3" checksum = "9ac0150caa2ae65ca5bd83f25c7de183dea78d4d366469f148435e2acfbad0da"
dependencies = [ dependencies = [
"serde", "serde",
] ]
@ -781,9 +790,9 @@ dependencies = [
[[package]] [[package]]
name = "cc" name = "cc"
version = "1.1.30" version = "1.1.31"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b16803a61b81d9eabb7eae2588776c4c1e584b738ede45fdbb4c972cec1e9945" checksum = "c2e7962b54006dcfcc61cb72735f4d89bb97061dd6a7ed882ec6b8ee53714c6f"
dependencies = [ dependencies = [
"jobserver", "jobserver",
"libc", "libc",
@ -910,7 +919,7 @@ dependencies = [
"heck", "heck",
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.79", "syn 2.0.85",
] ]
[[package]] [[package]]
@ -1100,7 +1109,7 @@ checksum = "1b5658b1dc64e10b56ae7a449f678f96932a96f6cfad1769d608d1d1d656480a"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.79", "syn 2.0.85",
] ]
[[package]] [[package]]
@ -1124,7 +1133,7 @@ checksum = "c8ef1b5835a65fcca3ab8b9a02b4f4dacc78e233a5c2f20b270efb9db0666d12"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.79", "syn 2.0.85",
] ]
[[package]] [[package]]
@ -1254,7 +1263,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.79", "syn 2.0.85",
] ]
[[package]] [[package]]
@ -1289,6 +1298,7 @@ dependencies = [
"cosmos-sdk-proto", "cosmos-sdk-proto",
"cosmrs", "cosmrs",
"hex", "hex",
"quoted-string",
"reqwest 0.12.8", "reqwest 0.12.8",
"serde", "serde",
"serde_json", "serde_json",
@ -1378,7 +1388,7 @@ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"strsim", "strsim",
"syn 2.0.79", "syn 2.0.85",
] ]
[[package]] [[package]]
@ -1389,7 +1399,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806"
dependencies = [ dependencies = [
"darling_core", "darling_core",
"quote", "quote",
"syn 2.0.79", "syn 2.0.85",
] ]
[[package]] [[package]]
@ -1462,7 +1472,7 @@ checksum = "8034092389675178f570469e6c3b0465d3d30b4505c294a6550db47f3c17ad18"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.79", "syn 2.0.85",
] ]
[[package]] [[package]]
@ -1494,7 +1504,7 @@ checksum = "5f33878137e4dafd7fa914ad4e259e18a4e8e532b9617a2d0150262bf53abfce"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.79", "syn 2.0.85",
] ]
[[package]] [[package]]
@ -1514,7 +1524,7 @@ checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.79", "syn 2.0.85",
"unicode-xid", "unicode-xid",
] ]
@ -1601,7 +1611,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.79", "syn 2.0.85",
] ]
[[package]] [[package]]
@ -1725,9 +1735,9 @@ checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f"
[[package]] [[package]]
name = "encoding_rs" name = "encoding_rs"
version = "0.8.34" version = "0.8.35"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3"
dependencies = [ dependencies = [
"cfg-if", "cfg-if",
] ]
@ -1747,7 +1757,7 @@ dependencies = [
"heck", "heck",
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.79", "syn 2.0.85",
] ]
[[package]] [[package]]
@ -1995,7 +2005,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.79", "syn 2.0.85",
] ]
[[package]] [[package]]
@ -2104,7 +2114,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fc19e312cd45c4a66cd003f909163dc2f8e1623e30a0c0c6df3776e89b308665" checksum = "fc19e312cd45c4a66cd003f909163dc2f8e1623e30a0c0c6df3776e89b308665"
dependencies = [ dependencies = [
"bstr", "bstr",
"gix-date 0.9.0", "gix-date 0.9.1",
"gix-utils", "gix-utils",
"itoa", "itoa",
"thiserror", "thiserror",
@ -2155,9 +2165,9 @@ dependencies = [
[[package]] [[package]]
name = "gix-config-value" name = "gix-config-value"
version = "0.14.8" version = "0.14.9"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "03f76169faa0dec598eac60f83d7fcdd739ec16596eca8fb144c88973dbe6f8c" checksum = "f3de3fdca9c75fa4b83a76583d265fa49b1de6b088ebcd210749c24ceeb74660"
dependencies = [ dependencies = [
"bitflags 2.6.0", "bitflags 2.6.0",
"bstr", "bstr",
@ -2180,9 +2190,9 @@ dependencies = [
[[package]] [[package]]
name = "gix-date" name = "gix-date"
version = "0.9.0" version = "0.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "35c84b7af01e68daf7a6bb8bb909c1ff5edb3ce4326f1f43063a5a96d3c3c8a5" checksum = "d10d543ac13c97292a15e8e8b7889cd006faf739777437ed95362504b8fe81a0"
dependencies = [ dependencies = [
"bstr", "bstr",
"itoa", "itoa",
@ -2276,11 +2286,11 @@ checksum = "2f5b801834f1de7640731820c2df6ba88d95480dc4ab166a5882f8ff12b88efa"
dependencies = [ dependencies = [
"bstr", "bstr",
"gix-actor 0.32.0", "gix-actor 0.32.0",
"gix-date 0.9.0", "gix-date 0.9.1",
"gix-features", "gix-features",
"gix-hash", "gix-hash",
"gix-utils", "gix-utils",
"gix-validate 0.9.0", "gix-validate 0.9.1",
"itoa", "itoa",
"smallvec", "smallvec",
"thiserror", "thiserror",
@ -2289,9 +2299,9 @@ dependencies = [
[[package]] [[package]]
name = "gix-path" name = "gix-path"
version = "0.10.11" version = "0.10.12"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ebfc4febd088abdcbc9f1246896e57e37b7a34f6909840045a1767c6dafac7af" checksum = "c04e5a94fdb56b1e91eb7df2658ad16832428b8eeda24ff1a0f0288de2bce554"
dependencies = [ dependencies = [
"bstr", "bstr",
"gix-trace", "gix-trace",
@ -2337,7 +2347,7 @@ dependencies = [
"gix-path", "gix-path",
"gix-tempfile", "gix-tempfile",
"gix-utils", "gix-utils",
"gix-validate 0.9.0", "gix-validate 0.9.1",
"memmap2", "memmap2",
"thiserror", "thiserror",
"winnow", "winnow",
@ -2345,9 +2355,9 @@ dependencies = [
[[package]] [[package]]
name = "gix-sec" name = "gix-sec"
version = "0.10.8" version = "0.10.9"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0fe4d52f30a737bbece5276fab5d3a8b276dc2650df963e293d0673be34e7a5f" checksum = "a2007538eda296445c07949cf04f4a767307d887184d6b3e83e2d636533ddc6e"
dependencies = [ dependencies = [
"bitflags 2.6.0", "bitflags 2.6.0",
"gix-path", "gix-path",
@ -2370,15 +2380,15 @@ dependencies = [
[[package]] [[package]]
name = "gix-trace" name = "gix-trace"
version = "0.1.10" version = "0.1.11"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6cae0e8661c3ff92688ce1c8b8058b3efb312aba9492bbe93661a21705ab431b" checksum = "04bdde120c29f1fc23a24d3e115aeeea3d60d8e65bab92cc5f9d90d9302eb952"
[[package]] [[package]]
name = "gix-utils" name = "gix-utils"
version = "0.1.12" version = "0.1.13"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "35192df7fd0fa112263bad8021e2df7167df4cc2a6e6d15892e1e55621d3d4dc" checksum = "ba427e3e9599508ed98a6ddf8ed05493db114564e338e41f6a996d2e4790335f"
dependencies = [ dependencies = [
"fastrand", "fastrand",
"unicode-normalization", "unicode-normalization",
@ -2396,9 +2406,9 @@ dependencies = [
[[package]] [[package]]
name = "gix-validate" name = "gix-validate"
version = "0.9.0" version = "0.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "81f2badbb64e57b404593ee26b752c26991910fd0d81fe6f9a71c1a8309b6c86" checksum = "e187b263461bc36cea17650141567753bc6207d036cedd1de6e81a52f277ff68"
dependencies = [ dependencies = [
"bstr", "bstr",
"thiserror", "thiserror",
@ -3166,9 +3176,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
[[package]] [[package]]
name = "libc" name = "libc"
version = "0.2.159" version = "0.2.161"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "561d97a539a36e26a9a5fad1ea11a3039a67714694aaa379433e580854bc3dc5" checksum = "8e9489c2807c139ffd9c1794f4af0ebe86a828db53ecdc7fea2111d0fed085d1"
[[package]] [[package]]
name = "libgit2-sys" name = "libgit2-sys"
@ -3327,7 +3337,7 @@ checksum = "3b51f1d220e3fa869e24cfd75915efe3164bd09bb11b3165db3f37f57bf673e3"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.79", "syn 2.0.85",
] ]
[[package]] [[package]]
@ -3524,7 +3534,7 @@ checksum = "dcf09caffaac8068c346b6df2a7fc27a177fd20b39421a39ce0a211bde679a6c"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.79", "syn 2.0.85",
] ]
[[package]] [[package]]
@ -3884,7 +3894,7 @@ dependencies = [
"proc-macro2", "proc-macro2",
"proc-macro2-diagnostics", "proc-macro2-diagnostics",
"quote", "quote",
"syn 2.0.79", "syn 2.0.85",
] ]
[[package]] [[package]]
@ -3976,7 +3986,7 @@ dependencies = [
"pest_meta", "pest_meta",
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.79", "syn 2.0.85",
] ]
[[package]] [[package]]
@ -4040,29 +4050,29 @@ dependencies = [
[[package]] [[package]]
name = "pin-project" name = "pin-project"
version = "1.1.6" version = "1.1.7"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "baf123a161dde1e524adf36f90bc5d8d3462824a9c43553ad07a8183161189ec" checksum = "be57f64e946e500c8ee36ef6331845d40a93055567ec57e8fae13efd33759b95"
dependencies = [ dependencies = [
"pin-project-internal", "pin-project-internal",
] ]
[[package]] [[package]]
name = "pin-project-internal" name = "pin-project-internal"
version = "1.1.6" version = "1.1.7"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a4502d8515ca9f32f1fb543d987f63d95a14934883db45bdb48060b6b69257f8" checksum = "3c0f5fad0874fc7abcd4d750e76917eaebbecaa2c20bde22e1dbeeba8beb758c"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.79", "syn 2.0.85",
] ]
[[package]] [[package]]
name = "pin-project-lite" name = "pin-project-lite"
version = "0.2.14" version = "0.2.15"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff"
[[package]] [[package]]
name = "pin-utils" name = "pin-utils"
@ -4121,12 +4131,12 @@ dependencies = [
[[package]] [[package]]
name = "prettyplease" name = "prettyplease"
version = "0.2.22" version = "0.2.25"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "479cf940fbbb3426c32c5d5176f62ad57549a0bb84773423ba8be9d089f5faba" checksum = "64d1ec885c64d0457d564db4ec299b2dae3f9c02808b8ad9c3a089c591b18033"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"syn 2.0.79", "syn 2.0.85",
] ]
[[package]] [[package]]
@ -4149,9 +4159,9 @@ dependencies = [
[[package]] [[package]]
name = "proc-macro2" name = "proc-macro2"
version = "1.0.88" version = "1.0.89"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7c3a7fc5db1e57d5a779a352c8cdb57b29aa4c40cc69c3a68a7fedc815fbf2f9" checksum = "f139b0662de085916d1fb67d2b4169d1addddda1919e696f3252b740b629986e"
dependencies = [ dependencies = [
"unicode-ident", "unicode-ident",
] ]
@ -4164,7 +4174,7 @@ checksum = "af066a9c399a26e020ada66a034357a868728e72cd426f3adcd35f80d88d88c8"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.79", "syn 2.0.85",
"version_check", "version_check",
"yansi", "yansi",
] ]
@ -4227,7 +4237,7 @@ dependencies = [
"prost", "prost",
"prost-types", "prost-types",
"regex", "regex",
"syn 2.0.79", "syn 2.0.85",
"tempfile", "tempfile",
] ]
@ -4241,7 +4251,7 @@ dependencies = [
"itertools 0.13.0", "itertools 0.13.0",
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.79", "syn 2.0.85",
] ]
[[package]] [[package]]
@ -4652,6 +4662,12 @@ dependencies = [
"proc-macro2", "proc-macro2",
] ]
[[package]]
name = "quoted-string"
version = "0.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5a206a30ce37189d1340e7da2ee0b4d65e342590af676541c23a4f3959ba272e"
[[package]] [[package]]
name = "radium" name = "radium"
version = "0.7.0" version = "0.7.0"
@ -4927,7 +4943,7 @@ checksum = "a5a11a05ee1ce44058fa3d5961d05194fdbe3ad6b40f904af764d81b86450e6b"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.79", "syn 2.0.85",
] ]
[[package]] [[package]]
@ -5161,27 +5177,27 @@ dependencies = [
[[package]] [[package]]
name = "scale-info" name = "scale-info"
version = "2.11.3" version = "2.11.5"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "eca070c12893629e2cc820a9761bedf6ce1dcddc9852984d1dc734b8bd9bd024" checksum = "1aa7ffc1c0ef49b0452c6e2986abf2b07743320641ffd5fc63d552458e3b779b"
dependencies = [ dependencies = [
"bitvec", "bitvec",
"cfg-if", "cfg-if",
"derive_more 0.99.18", "derive_more 1.0.0",
"parity-scale-codec", "parity-scale-codec",
"scale-info-derive", "scale-info-derive",
] ]
[[package]] [[package]]
name = "scale-info-derive" name = "scale-info-derive"
version = "2.11.3" version = "2.11.5"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2d35494501194174bda522a32605929eefc9ecf7e0a326c26db1fdd85881eb62" checksum = "46385cc24172cf615450267463f937c10072516359b3ff1cb24228a4a08bf951"
dependencies = [ dependencies = [
"proc-macro-crate", "proc-macro-crate",
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 1.0.109", "syn 2.0.85",
] ]
[[package]] [[package]]
@ -5214,7 +5230,7 @@ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"serde_derive_internals", "serde_derive_internals",
"syn 2.0.79", "syn 2.0.85",
] ]
[[package]] [[package]]
@ -5281,9 +5297,9 @@ dependencies = [
[[package]] [[package]]
name = "serde" name = "serde"
version = "1.0.210" version = "1.0.213"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a" checksum = "3ea7893ff5e2466df8d720bb615088341b295f849602c6956047f8f80f0e9bc1"
dependencies = [ dependencies = [
"serde_derive", "serde_derive",
] ]
@ -5318,13 +5334,13 @@ dependencies = [
[[package]] [[package]]
name = "serde_derive" name = "serde_derive"
version = "1.0.210" version = "1.0.213"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" checksum = "7e85ad2009c50b58e87caa8cd6dac16bdf511bbfb7af6c33df902396aa480fa5"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.79", "syn 2.0.85",
] ]
[[package]] [[package]]
@ -5335,14 +5351,14 @@ checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.79", "syn 2.0.85",
] ]
[[package]] [[package]]
name = "serde_json" name = "serde_json"
version = "1.0.128" version = "1.0.132"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6ff5456707a1de34e7e37f2a6fd3d3f808c318259cbd01ab6377795054b483d8" checksum = "d726bfaff4b320266d395898905d0eba0345aae23b54aee3a737e260fd46db03"
dependencies = [ dependencies = [
"indexmap 2.6.0", "indexmap 2.6.0",
"itoa", "itoa",
@ -5359,7 +5375,7 @@ checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.79", "syn 2.0.85",
] ]
[[package]] [[package]]
@ -5410,7 +5426,7 @@ dependencies = [
"darling", "darling",
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.79", "syn 2.0.85",
] ]
[[package]] [[package]]
@ -5620,9 +5636,9 @@ dependencies = [
[[package]] [[package]]
name = "syn" name = "syn"
version = "2.0.79" version = "2.0.85"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "89132cd0bf050864e1d38dc3bbc07a0eb8e7530af26344d3d2bbbef83499f590" checksum = "5023162dfcd14ef8f32034d8bcd4cc5ddc61ef7a247c024a33e24e1f24d21b56"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@ -5652,7 +5668,7 @@ checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.79", "syn 2.0.85",
] ]
[[package]] [[package]]
@ -5688,6 +5704,27 @@ version = "0.12.16"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1"
[[package]]
name = "tcbinfo-updater"
version = "0.1.0"
dependencies = [
"anyhow",
"bincode",
"cosmrs",
"cw-client",
"der",
"hex",
"mc-attestation-verifier",
"p256",
"quartz-tcbinfo-msgs 0.1.0",
"quoted-string",
"reqwest 0.12.8",
"serde_json",
"tendermint",
"tokio",
"x509-cert",
]
[[package]] [[package]]
name = "tempfile" name = "tempfile"
version = "3.10.1" version = "3.10.1"
@ -5897,22 +5934,22 @@ checksum = "a38c90d48152c236a3ab59271da4f4ae63d678c5d7ad6b7714d7cb9760be5e4b"
[[package]] [[package]]
name = "thiserror" name = "thiserror"
version = "1.0.64" version = "1.0.65"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d50af8abc119fb8bb6dbabcfa89656f46f84aa0ac7688088608076ad2b459a84" checksum = "5d11abd9594d9b38965ef50805c5e469ca9cc6f197f883f717e0269a3057b3d5"
dependencies = [ dependencies = [
"thiserror-impl", "thiserror-impl",
] ]
[[package]] [[package]]
name = "thiserror-impl" name = "thiserror-impl"
version = "1.0.64" version = "1.0.65"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "08904e7672f5eb876eaaf87e0ce17857500934f4981c4a0ab2b4aa98baac7fc3" checksum = "ae71770322cbd277e69d762a16c444af02aa0575ac0d174f0b9562d3b37f8602"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.79", "syn 2.0.85",
] ]
[[package]] [[package]]
@ -5983,15 +6020,37 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
[[package]] [[package]]
name = "tokio" name = "tls_codec"
version = "1.40.0" version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998" checksum = "b5e78c9c330f8c85b2bae7c8368f2739157db9991235123aa1b15ef9502bfb6a"
dependencies = [
"tls_codec_derive",
"zeroize",
]
[[package]]
name = "tls_codec_derive"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8d9ef545650e79f30233c0003bcc2504d7efac6dad25fca40744de773fe2049c"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.85",
]
[[package]]
name = "tokio"
version = "1.41.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "145f3413504347a2be84393cc8a7d2fb4d863b375909ea59f2158261aa258bbb"
dependencies = [ dependencies = [
"backtrace", "backtrace",
"bytes", "bytes",
"libc", "libc",
"mio 1.0.2", "mio 1.0.2",
"parking_lot",
"pin-project-lite", "pin-project-lite",
"signal-hook-registry", "signal-hook-registry",
"socket2", "socket2",
@ -6007,7 +6066,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.79", "syn 2.0.85",
] ]
[[package]] [[package]]
@ -6142,7 +6201,7 @@ dependencies = [
"prost-build", "prost-build",
"prost-types", "prost-types",
"quote", "quote",
"syn 2.0.79", "syn 2.0.85",
] ]
[[package]] [[package]]
@ -6211,7 +6270,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.79", "syn 2.0.85",
] ]
[[package]] [[package]]
@ -6462,7 +6521,7 @@ dependencies = [
"once_cell", "once_cell",
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.79", "syn 2.0.85",
"wasm-bindgen-shared", "wasm-bindgen-shared",
] ]
@ -6496,7 +6555,7 @@ checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.79", "syn 2.0.85",
"wasm-bindgen-backend", "wasm-bindgen-backend",
"wasm-bindgen-shared", "wasm-bindgen-shared",
] ]
@ -6695,7 +6754,7 @@ checksum = "f6fc35f58ecd95a9b71c4f2329b911016e6bec66b3f2e6a4aad86bd2e99e2f9b"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.79", "syn 2.0.85",
] ]
[[package]] [[package]]
@ -6706,7 +6765,7 @@ checksum = "08990546bf4edef8f431fa6326e032865f27138718c587dc21bc0265bbcb57cc"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.79", "syn 2.0.85",
] ]
[[package]] [[package]]
@ -6939,6 +6998,7 @@ dependencies = [
"const-oid", "const-oid",
"der", "der",
"spki", "spki",
"tls_codec",
] ]
[[package]] [[package]]
@ -6989,7 +7049,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.79", "syn 2.0.85",
] ]
[[package]] [[package]]
@ -7009,5 +7069,5 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.79", "syn 2.0.85",
] ]

View file

@ -54,6 +54,7 @@ rand_core = { version = "0.6", default-features = false, features = ["std"] }
reqwest = { version = "0.12.2", default-features = false, features = [ reqwest = { version = "0.12.2", default-features = false, features = [
"json", "json",
"rustls-tls", "rustls-tls",
"blocking"
] } ] }
schemars = { version = "0.8.16", default-features = false } schemars = { version = "0.8.16", default-features = false }
serde = { version = "1.0.203", default-features = false, features = ["derive"] } serde = { version = "1.0.203", default-features = false, features = ["derive"] }

View file

@ -31,6 +31,7 @@ tonic.workspace = true
cosmrs = { workspace = true, default-features = false, features = ["cosmwasm"] } cosmrs = { workspace = true, default-features = false, features = ["cosmwasm"] }
cosmos-sdk-proto = { workspace = true, default-features = false, features = ["grpc", "grpc-transport"] } cosmos-sdk-proto = { workspace = true, default-features = false, features = ["grpc", "grpc-transport"] }
tendermint = { workspace = true, default-features = false } tendermint = { workspace = true, default-features = false }
quoted-string = "0.6.1"
[dev-dependencies] [dev-dependencies]
tokio.workspace = true tokio.workspace = true

View file

@ -1,11 +1,11 @@
use std::process::Command; use crate::CwClient;
use color_eyre::{eyre::eyre, Help, Report, Result}; use color_eyre::{eyre::eyre, Help, Report, Result};
use cosmrs::{tendermint::chain::Id, AccountId}; use cosmrs::{tendermint::chain::Id, AccountId};
use quoted_string::strip_dquotes;
use reqwest::Url; use reqwest::Url;
use serde::de::DeserializeOwned; use serde::de::DeserializeOwned;
use serde_json::Value;
use crate::CwClient; use std::process::Command;
#[derive(Clone, Debug)] #[derive(Clone, Debug)]
pub enum CliClientType { pub enum CliClientType {
@ -47,14 +47,6 @@ impl CliClient {
} }
} }
pub fn neutrond(url: Url) -> Self {
Self {
kind: CliClientType::Neutrond,
url,
gas_price: "0.0053untrn".to_string(),
}
}
fn new_command(&self) -> Result<Command> { fn new_command(&self) -> Result<Command> {
let bin = self.kind.bin(); let bin = self.kind.bin();
if !self.is_bin_available(&bin) { if !self.is_bin_available(&bin) {
@ -66,6 +58,37 @@ impl CliClient {
Ok(Command::new(self.kind.bin())) Ok(Command::new(self.kind.bin()))
} }
pub fn neutrond(url: Url) -> Self {
let mut command = Command::new("neutrond");
let command = command
.arg("q")
.arg("feemarket")
.arg("gas-price")
.arg("untrn")
.arg("-o")
.arg("json");
let output = command.output().expect("command output failed").stdout;
let output_str: String = std::str::from_utf8(&output)
.expect("unable to parse command output")
.to_string();
let json: Value = serde_json::from_str(&output_str).expect("could not convert to JSON");
let amount = &json["price"]["amount"].to_string();
let price = strip_dquotes(amount)
.expect("strip dquotes failed")
.parse::<f64>()
.expect("couldn't parse gas price");
let gas_price = format!("{}untrn", price);
Self {
kind: CliClientType::Neutrond,
url,
gas_price,
}
}
fn is_bin_available(&self, bin: &str) -> bool { fn is_bin_available(&self, bin: &str) -> bool {
Command::new("which") Command::new("which")
.arg(bin) .arg(bin)
@ -149,10 +172,9 @@ impl CwClient for CliClient {
&self, &self,
contract: &Self::Address, contract: &Self::Address,
chain_id: &Id, chain_id: &Id,
gas: u64, _gas: u64,
sender: &str, sender: &str,
msg: M, msg: M,
fees: &str,
) -> Result<String, Self::Error> { ) -> Result<String, Self::Error> {
let mut command = self.new_command()?; let mut command = self.new_command()?;
let command = command let command = command
@ -160,12 +182,12 @@ impl CwClient for CliClient {
.args(["--chain-id", chain_id.as_ref()]) .args(["--chain-id", chain_id.as_ref()])
.args(["tx", "wasm"]) .args(["tx", "wasm"])
.args(["execute", contract.as_ref(), &msg.to_string()]) .args(["execute", contract.as_ref(), &msg.to_string()])
.args(["--gas", &gas.to_string()]) .args(["--gas", "auto"])
.args(["--fees", fees]) .args(["--gas-prices", &self.gas_price])
.args(["--from", sender]) .args(["--from", sender])
.args(["--gas-adjustment", "1.3"])
.args(["--output", "json"]) .args(["--output", "json"])
.arg("-y"); .arg("-y");
let output = command.output()?; let output = command.output()?;
if !output.status.success() { if !output.status.success() {
@ -221,7 +243,7 @@ impl CwClient for CliClient {
.args(["--from", sender]) .args(["--from", sender])
.arg("--no-admin") .arg("--no-admin")
.args(["--chain-id", chain_id.as_ref()]) .args(["--chain-id", chain_id.as_ref()])
.args(["--gas-prices", &self.gas_price]) .args(["--gas-prices", "0.0053untrn"])
.args(["--gas", "auto"]) .args(["--gas", "auto"])
.args(["--gas-adjustment", "1.3"]) .args(["--gas-adjustment", "1.3"])
.args(["-o", "json"]) .args(["-o", "json"])

View file

@ -88,7 +88,6 @@ impl CwClient for GrpcClient {
gas: u64, gas: u64,
_sender: &str, _sender: &str,
msg: M, msg: M,
_fees: &str,
) -> Result<String, Self::Error> { ) -> Result<String, Self::Error> {
let tm_pubkey = self.sk.public_key(); let tm_pubkey = self.sk.public_key();
let sender = tm_pubkey let sender = tm_pubkey
@ -257,7 +256,7 @@ mod tests {
2000000, 2000000,
"/* unused since we're getting the account from the sk */", "/* unused since we're getting the account from the sk */",
json!([]), json!([]),
"11000untrn",
) )
.await?; .await?;
println!("{}", tx_hash); println!("{}", tx_hash);

View file

@ -37,7 +37,6 @@ pub trait CwClient {
gas: u64, gas: u64,
sender: &str, sender: &str,
msg: M, msg: M,
fees: &str,
) -> Result<String, Self::Error>; ) -> Result<String, Self::Error>;
fn deploy<M: ToString>( fn deploy<M: ToString>(

View file

@ -0,0 +1,27 @@
[package]
name = "tcbinfo-updater"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
license.workspace = true
readme.workspace = true
repository.workspace = true
homepage.workspace = true
authors.workspace = true
[dependencies]
quoted-string = "0.6.1"
reqwest.workspace = true
serde_json.workspace = true
cw-client = { path = "../cw-client", default-features = false }
bincode = {version = "1.3.3"}
quartz-tcbinfo-msgs = {path = "../../contracts/tcbinfo/msgs"}
tendermint.workspace = true
cosmrs.workspace = true
tokio = {version = "1", features = ["full"]}
mc-attestation-verifier.workspace = true
p256.workspace = true
x509-cert = "0.2.5"
der.workspace = true
anyhow.workspace = true
hex.workspace = true

View file

@ -0,0 +1,4 @@
#!/bin/bash
# cargo run -- [network url] [chain-id] [contract address] [sender] [gas] [fees]
cargo run -- "https://rpc-falcron.pion-1.ntrn.tech" "pion-1" "neutron1r4m59786vmxrx866585ze5ugjx9egcyja0nuxhn2y6d7ht6680sspa89zk" "ajinkya" "1000000" "11000untrn" &>> logs

View file

@ -0,0 +1,122 @@
use cw_client::{CliClient, CwClient};
use quartz_tcbinfo_msgs::{ExecuteMsg, QueryMsg};
use quoted_string::strip_dquotes;
use quoted_string::test_utils::TestSpec;
use quoted_string::to_content;
use reqwest::Url;
use serde_json::{json, Value};
use std::env;
use tendermint::chain::id::Id;
type Fmspc = String;
type Update = String;
const TCB_SIGNER: &str = include_str!("../tcb_signer.pem");
async fn get_tcbinfo(fmspc: Fmspc, update: Update) -> String {
let url = format!("https://api.trustedservices.intel.com/sgx/certification/v4/tcb?fmspc={fmspc}&update={update}");
let body: String = reqwest::get(url)
.await
.expect("url retrieval failed")
.text()
.await
.expect("could not read https response");
body
}
async fn get_fmspc_list() -> Vec<Fmspc> {
let body: String =
reqwest::get("https://api.trustedservices.intel.com/sgx/certification/v4/fmspcs")
.await
.expect("url retrieval failed")
.text()
.await
.expect("could not read https response");
let fmspc_data: Vec<Value> = serde_json::from_str(&body).expect("could not convert to JSON");
let mut fmspc_list: Vec<Fmspc> = Vec::new();
for item in fmspc_data.iter() {
let fmspc: String = format!("{}", item["fmspc"]);
fmspc_list.push(strip_dquotes(&fmspc).unwrap().to_string());
}
fmspc_list
}
async fn upsert_tcbinfo(
url: &str,
contract_addr: &str,
chain_id: Id,
sender: &str,
gas: u64,
) -> Result<(), &'static str> {
let network = Url::parse(url).expect("couldn't parse network URL");
let client = CliClient::neutrond(network);
let fmspc_list = get_fmspc_list().await;
for fmspc in fmspc_list {
let tcbinfo_from_api = get_tcbinfo(fmspc.clone(), "standard".to_string()).await;
// assert!(verify_signature(tcbinfo.clone(), key));
let contract_address = contract_addr
.parse()
.expect("failed to parse contract address");
let query_msg = QueryMsg::GetTcbInfo {
fmspc: fmspc.clone(),
};
let tcbinfo_on_chain = {
if let Ok(res) = client
.query_smart::<Value>(&contract_address, json!(query_msg))
.await
{
to_content::<TestSpec>(&res["data"]["tcb_info"].to_string())
.unwrap()
.to_string()
} else {
"".to_string()
}
};
if tcbinfo_on_chain != tcbinfo_from_api {
println!("updating on-chain TCBInfo for FMSPC: {fmspc}");
let execute_msg = ExecuteMsg {
tcb_info: tcbinfo_from_api.to_string(),
certificate: TCB_SIGNER.to_string(),
time: None,
};
let res = client
.tx_execute(
&contract_address,
&chain_id,
gas,
sender,
json!(execute_msg),
)
.await;
println!("{res:?}");
std::thread::sleep(std::time::Duration::from_secs(5));
} else {
println!("TCBInfo for FMSPC: {fmspc} up to date")
}
}
Ok(())
}
#[tokio::main]
pub async fn main() {
let args: Vec<String> = env::args().collect();
let url = &args[1];
let chain_id = &args[2];
let contract_address: &str = &args[3];
let sender: &str = &args[4];
let gas: &u64 = &args[5].parse().expect("gas must be a u64 value");
upsert_tcbinfo(
url,
contract_address,
Id::try_from(chain_id.clone()).expect("invalid chain id"),
sender,
*gas,
)
.await
.expect("TCBInfo update failed");
}

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,16 @@
-----BEGIN CERTIFICATE-----
MIICizCCAjKgAwIBAgIUfjiC1ftVKUpASY5FhAPpFJG99FUwCgYIKoZIzj0EAwIw
aDEaMBgGA1UEAwwRSW50ZWwgU0dYIFJvb3QgQ0ExGjAYBgNVBAoMEUludGVsIENv
cnBvcmF0aW9uMRQwEgYDVQQHDAtTYW50YSBDbGFyYTELMAkGA1UECAwCQ0ExCzAJ
BgNVBAYTAlVTMB4XDTE4MDUyMTEwNTAxMFoXDTI1MDUyMTEwNTAxMFowbDEeMBwG
A1UEAwwVSW50ZWwgU0dYIFRDQiBTaWduaW5nMRowGAYDVQQKDBFJbnRlbCBDb3Jw
b3JhdGlvbjEUMBIGA1UEBwwLU2FudGEgQ2xhcmExCzAJBgNVBAgMAkNBMQswCQYD
VQQGEwJVUzBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABENFG8xzydWRfK92bmGv
P+mAh91PEyV7Jh6FGJd5ndE9aBH7R3E4A7ubrlh/zN3C4xvpoouGlirMba+W2lju
ypajgbUwgbIwHwYDVR0jBBgwFoAUImUM1lqdNInzg7SVUr9QGzknBqwwUgYDVR0f
BEswSTBHoEWgQ4ZBaHR0cHM6Ly9jZXJ0aWZpY2F0ZXMudHJ1c3RlZHNlcnZpY2Vz
LmludGVsLmNvbS9JbnRlbFNHWFJvb3RDQS5kZXIwHQYDVR0OBBYEFH44gtX7VSlK
QEmORYQD6RSRvfRVMA4GA1UdDwEB/wQEAwIGwDAMBgNVHRMBAf8EAjAAMAoGCCqG
SM49BAMCA0cAMEQCIB9C8wOAN/ImxDtGACV246KcqjagZOR0kyctyBrsGGJVAiAj
ftbrNGsGU8YH211dRiYNoPPu19Zp/ze8JmhujB0oBw==
-----END CERTIFICATE-----