From 2bf7e9f8460d02efc0f704ec11e2529f15670947 Mon Sep 17 00:00:00 2001 From: "Matt, Park" <45252226+mattverse@users.noreply.github.com> Date: Sat, 9 Mar 2024 00:42:30 +0900 Subject: [PATCH 01/30] fix: fix ragel denom validation introduced in #19511 (#19701) --- types/coin_regex.go | 548 ++++++++++++++++++++++++++++++++++---------- types/coin_regex.rl | 3 +- types/coin_test.go | 24 ++ 3 files changed, 447 insertions(+), 128 deletions(-) diff --git a/types/coin_regex.go b/types/coin_regex.go index ea6134a9b82e..0a0d44f0d7a9 100644 --- a/types/coin_regex.go +++ b/types/coin_regex.go @@ -1,9 +1,11 @@ + //line coin_regex.rl:1 // `coin_regex.go` is generated by regel using `ragel -Z coin_regex.rl`. // do not directly edit `coin_regex.go`. // source: types/coin_regex.rl // nolint:gocritic,unused,ineffassign + // Regex parsing of denoms were as the following // reDnmString = `[a-zA-Z][a-zA-Z0-9/:._-]{2,127}` // reDecAmt = `[[:digit:]]+(?:\.[[:digit:]]+)?|\.[[:digit:]]+` @@ -15,159 +17,451 @@ package types func MatchDenom(data []byte) bool { - var _scanner_actions []byte = []byte{ - 0, 1, 0, - } - var _scanner_key_offsets []byte = []byte{ - 0, 0, 4, 11, - } +//line coin_regex.rl:19 - var _scanner_trans_keys []byte = []byte{ - 65, 90, 97, 122, 95, 45, 58, 65, - 90, 97, 122, - } +//line coin_regex.go:24 +var _scanner_actions []byte = []byte{ + 0, 1, 0, +} - var _scanner_single_lengths []byte = []byte{ - 0, 0, 1, 0, - } +var _scanner_key_offsets []int16 = []int16{ + 0, 0, 4, 11, 18, 25, 32, 39, + 46, 53, 60, 67, 74, 81, 88, 95, + 102, 109, 116, 123, 130, 137, 144, 151, + 158, 165, 172, 179, 186, 193, 200, 207, + 214, 221, 228, 235, 242, 249, 256, 263, + 270, 277, 284, 291, 298, 305, 312, 319, + 326, 333, 340, 347, 354, 361, 368, 375, + 382, 389, 396, 403, 410, 417, 424, 431, + 438, 445, 452, 459, 466, 473, 480, 487, + 494, 501, 508, 515, 522, 529, 536, 543, + 550, 557, 564, 571, 578, 585, 592, 599, + 606, 613, 620, 627, 634, 641, 648, 655, + 662, 669, 676, 683, 690, 697, 704, 711, + 718, 725, 732, 739, 746, 753, 760, 767, + 774, 781, 788, 795, 802, 809, 816, 823, + 830, 837, 844, 851, 858, 865, 872, 879, + 886, 893, +} - var _scanner_range_lengths []byte = []byte{ - 0, 2, 3, 0, - } +var _scanner_trans_keys []byte = []byte{ + 65, 90, 97, 122, 95, 45, 58, 65, + 90, 97, 122, 95, 45, 58, 65, 90, + 97, 122, 95, 45, 58, 65, 90, 97, + 122, 95, 45, 58, 65, 90, 97, 122, + 95, 45, 58, 65, 90, 97, 122, 95, + 45, 58, 65, 90, 97, 122, 95, 45, + 58, 65, 90, 97, 122, 95, 45, 58, + 65, 90, 97, 122, 95, 45, 58, 65, + 90, 97, 122, 95, 45, 58, 65, 90, + 97, 122, 95, 45, 58, 65, 90, 97, + 122, 95, 45, 58, 65, 90, 97, 122, + 95, 45, 58, 65, 90, 97, 122, 95, + 45, 58, 65, 90, 97, 122, 95, 45, + 58, 65, 90, 97, 122, 95, 45, 58, + 65, 90, 97, 122, 95, 45, 58, 65, + 90, 97, 122, 95, 45, 58, 65, 90, + 97, 122, 95, 45, 58, 65, 90, 97, + 122, 95, 45, 58, 65, 90, 97, 122, + 95, 45, 58, 65, 90, 97, 122, 95, + 45, 58, 65, 90, 97, 122, 95, 45, + 58, 65, 90, 97, 122, 95, 45, 58, + 65, 90, 97, 122, 95, 45, 58, 65, + 90, 97, 122, 95, 45, 58, 65, 90, + 97, 122, 95, 45, 58, 65, 90, 97, + 122, 95, 45, 58, 65, 90, 97, 122, + 95, 45, 58, 65, 90, 97, 122, 95, + 45, 58, 65, 90, 97, 122, 95, 45, + 58, 65, 90, 97, 122, 95, 45, 58, + 65, 90, 97, 122, 95, 45, 58, 65, + 90, 97, 122, 95, 45, 58, 65, 90, + 97, 122, 95, 45, 58, 65, 90, 97, + 122, 95, 45, 58, 65, 90, 97, 122, + 95, 45, 58, 65, 90, 97, 122, 95, + 45, 58, 65, 90, 97, 122, 95, 45, + 58, 65, 90, 97, 122, 95, 45, 58, + 65, 90, 97, 122, 95, 45, 58, 65, + 90, 97, 122, 95, 45, 58, 65, 90, + 97, 122, 95, 45, 58, 65, 90, 97, + 122, 95, 45, 58, 65, 90, 97, 122, + 95, 45, 58, 65, 90, 97, 122, 95, + 45, 58, 65, 90, 97, 122, 95, 45, + 58, 65, 90, 97, 122, 95, 45, 58, + 65, 90, 97, 122, 95, 45, 58, 65, + 90, 97, 122, 95, 45, 58, 65, 90, + 97, 122, 95, 45, 58, 65, 90, 97, + 122, 95, 45, 58, 65, 90, 97, 122, + 95, 45, 58, 65, 90, 97, 122, 95, + 45, 58, 65, 90, 97, 122, 95, 45, + 58, 65, 90, 97, 122, 95, 45, 58, + 65, 90, 97, 122, 95, 45, 58, 65, + 90, 97, 122, 95, 45, 58, 65, 90, + 97, 122, 95, 45, 58, 65, 90, 97, + 122, 95, 45, 58, 65, 90, 97, 122, + 95, 45, 58, 65, 90, 97, 122, 95, + 45, 58, 65, 90, 97, 122, 95, 45, + 58, 65, 90, 97, 122, 95, 45, 58, + 65, 90, 97, 122, 95, 45, 58, 65, + 90, 97, 122, 95, 45, 58, 65, 90, + 97, 122, 95, 45, 58, 65, 90, 97, + 122, 95, 45, 58, 65, 90, 97, 122, + 95, 45, 58, 65, 90, 97, 122, 95, + 45, 58, 65, 90, 97, 122, 95, 45, + 58, 65, 90, 97, 122, 95, 45, 58, + 65, 90, 97, 122, 95, 45, 58, 65, + 90, 97, 122, 95, 45, 58, 65, 90, + 97, 122, 95, 45, 58, 65, 90, 97, + 122, 95, 45, 58, 65, 90, 97, 122, + 95, 45, 58, 65, 90, 97, 122, 95, + 45, 58, 65, 90, 97, 122, 95, 45, + 58, 65, 90, 97, 122, 95, 45, 58, + 65, 90, 97, 122, 95, 45, 58, 65, + 90, 97, 122, 95, 45, 58, 65, 90, + 97, 122, 95, 45, 58, 65, 90, 97, + 122, 95, 45, 58, 65, 90, 97, 122, + 95, 45, 58, 65, 90, 97, 122, 95, + 45, 58, 65, 90, 97, 122, 95, 45, + 58, 65, 90, 97, 122, 95, 45, 58, + 65, 90, 97, 122, 95, 45, 58, 65, + 90, 97, 122, 95, 45, 58, 65, 90, + 97, 122, 95, 45, 58, 65, 90, 97, + 122, 95, 45, 58, 65, 90, 97, 122, + 95, 45, 58, 65, 90, 97, 122, 95, + 45, 58, 65, 90, 97, 122, 95, 45, + 58, 65, 90, 97, 122, 95, 45, 58, + 65, 90, 97, 122, 95, 45, 58, 65, + 90, 97, 122, 95, 45, 58, 65, 90, + 97, 122, 95, 45, 58, 65, 90, 97, + 122, 95, 45, 58, 65, 90, 97, 122, + 95, 45, 58, 65, 90, 97, 122, 95, + 45, 58, 65, 90, 97, 122, 95, 45, + 58, 65, 90, 97, 122, 95, 45, 58, + 65, 90, 97, 122, 95, 45, 58, 65, + 90, 97, 122, 95, 45, 58, 65, 90, + 97, 122, 95, 45, 58, 65, 90, 97, + 122, 95, 45, 58, 65, 90, 97, 122, + 95, 45, 58, 65, 90, 97, 122, 95, + 45, 58, 65, 90, 97, 122, 95, 45, + 58, 65, 90, 97, 122, 95, 45, 58, + 65, 90, 97, 122, 95, 45, 58, 65, + 90, 97, 122, 95, 45, 58, 65, 90, + 97, 122, 95, 45, 58, 65, 90, 97, + 122, 95, 45, 58, 65, 90, 97, 122, + 95, 45, 58, 65, 90, 97, 122, 95, + 45, 58, 65, 90, 97, 122, 95, 45, + 58, 65, 90, 97, 122, 95, 45, 58, + 65, 90, 97, 122, 95, 45, 58, 65, + 90, 97, 122, 95, 45, 58, 65, 90, + 97, 122, 95, 45, 58, 65, 90, 97, + 122, 95, 45, 58, 65, 90, 97, 122, + 95, 45, 58, 65, 90, 97, 122, 95, + 45, 58, 65, 90, 97, 122, 95, 45, + 58, 65, 90, 97, 122, +} - var _scanner_index_offsets []byte = []byte{ - 0, 0, 3, 8, - } +var _scanner_single_lengths []byte = []byte{ + 0, 0, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 0, +} - var _scanner_indicies []byte = []byte{ - 0, 0, 1, 2, 2, 2, 2, 1, - 1, - } +var _scanner_range_lengths []byte = []byte{ + 0, 2, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 3, 0, +} - var _scanner_trans_targs []byte = []byte{ - 2, 0, 3, - } +var _scanner_index_offsets []int16 = []int16{ + 0, 0, 3, 8, 13, 18, 23, 28, + 33, 38, 43, 48, 53, 58, 63, 68, + 73, 78, 83, 88, 93, 98, 103, 108, + 113, 118, 123, 128, 133, 138, 143, 148, + 153, 158, 163, 168, 173, 178, 183, 188, + 193, 198, 203, 208, 213, 218, 223, 228, + 233, 238, 243, 248, 253, 258, 263, 268, + 273, 278, 283, 288, 293, 298, 303, 308, + 313, 318, 323, 328, 333, 338, 343, 348, + 353, 358, 363, 368, 373, 378, 383, 388, + 393, 398, 403, 408, 413, 418, 423, 428, + 433, 438, 443, 448, 453, 458, 463, 468, + 473, 478, 483, 488, 493, 498, 503, 508, + 513, 518, 523, 528, 533, 538, 543, 548, + 553, 558, 563, 568, 573, 578, 583, 588, + 593, 598, 603, 608, 613, 618, 623, 628, + 633, 638, +} - var _scanner_trans_actions []byte = []byte{ - 0, 0, 1, - } +var _scanner_indicies []byte = []byte{ + 0, 0, 1, 2, 2, 2, 2, 1, + 3, 3, 3, 3, 1, 4, 4, 4, + 4, 1, 5, 5, 5, 5, 1, 6, + 6, 6, 6, 1, 7, 7, 7, 7, + 1, 8, 8, 8, 8, 1, 9, 9, + 9, 9, 1, 10, 10, 10, 10, 1, + 11, 11, 11, 11, 1, 12, 12, 12, + 12, 1, 13, 13, 13, 13, 1, 14, + 14, 14, 14, 1, 15, 15, 15, 15, + 1, 16, 16, 16, 16, 1, 17, 17, + 17, 17, 1, 18, 18, 18, 18, 1, + 19, 19, 19, 19, 1, 20, 20, 20, + 20, 1, 21, 21, 21, 21, 1, 22, + 22, 22, 22, 1, 23, 23, 23, 23, + 1, 24, 24, 24, 24, 1, 25, 25, + 25, 25, 1, 26, 26, 26, 26, 1, + 27, 27, 27, 27, 1, 28, 28, 28, + 28, 1, 29, 29, 29, 29, 1, 30, + 30, 30, 30, 1, 31, 31, 31, 31, + 1, 32, 32, 32, 32, 1, 33, 33, + 33, 33, 1, 34, 34, 34, 34, 1, + 35, 35, 35, 35, 1, 36, 36, 36, + 36, 1, 37, 37, 37, 37, 1, 38, + 38, 38, 38, 1, 39, 39, 39, 39, + 1, 40, 40, 40, 40, 1, 41, 41, + 41, 41, 1, 42, 42, 42, 42, 1, + 43, 43, 43, 43, 1, 44, 44, 44, + 44, 1, 45, 45, 45, 45, 1, 46, + 46, 46, 46, 1, 47, 47, 47, 47, + 1, 48, 48, 48, 48, 1, 49, 49, + 49, 49, 1, 50, 50, 50, 50, 1, + 51, 51, 51, 51, 1, 52, 52, 52, + 52, 1, 53, 53, 53, 53, 1, 54, + 54, 54, 54, 1, 55, 55, 55, 55, + 1, 56, 56, 56, 56, 1, 57, 57, + 57, 57, 1, 58, 58, 58, 58, 1, + 59, 59, 59, 59, 1, 60, 60, 60, + 60, 1, 61, 61, 61, 61, 1, 62, + 62, 62, 62, 1, 63, 63, 63, 63, + 1, 64, 64, 64, 64, 1, 65, 65, + 65, 65, 1, 66, 66, 66, 66, 1, + 67, 67, 67, 67, 1, 68, 68, 68, + 68, 1, 69, 69, 69, 69, 1, 70, + 70, 70, 70, 1, 71, 71, 71, 71, + 1, 72, 72, 72, 72, 1, 73, 73, + 73, 73, 1, 74, 74, 74, 74, 1, + 75, 75, 75, 75, 1, 76, 76, 76, + 76, 1, 77, 77, 77, 77, 1, 78, + 78, 78, 78, 1, 79, 79, 79, 79, + 1, 80, 80, 80, 80, 1, 81, 81, + 81, 81, 1, 82, 82, 82, 82, 1, + 83, 83, 83, 83, 1, 84, 84, 84, + 84, 1, 85, 85, 85, 85, 1, 86, + 86, 86, 86, 1, 87, 87, 87, 87, + 1, 88, 88, 88, 88, 1, 89, 89, + 89, 89, 1, 90, 90, 90, 90, 1, + 91, 91, 91, 91, 1, 92, 92, 92, + 92, 1, 93, 93, 93, 93, 1, 94, + 94, 94, 94, 1, 95, 95, 95, 95, + 1, 96, 96, 96, 96, 1, 97, 97, + 97, 97, 1, 98, 98, 98, 98, 1, + 99, 99, 99, 99, 1, 100, 100, 100, + 100, 1, 101, 101, 101, 101, 1, 102, + 102, 102, 102, 1, 103, 103, 103, 103, + 1, 104, 104, 104, 104, 1, 105, 105, + 105, 105, 1, 106, 106, 106, 106, 1, + 107, 107, 107, 107, 1, 108, 108, 108, + 108, 1, 109, 109, 109, 109, 1, 110, + 110, 110, 110, 1, 111, 111, 111, 111, + 1, 112, 112, 112, 112, 1, 113, 113, + 113, 113, 1, 114, 114, 114, 114, 1, + 115, 115, 115, 115, 1, 116, 116, 116, + 116, 1, 117, 117, 117, 117, 1, 118, + 118, 118, 118, 1, 119, 119, 119, 119, + 1, 120, 120, 120, 120, 1, 121, 121, + 121, 121, 1, 122, 122, 122, 122, 1, + 123, 123, 123, 123, 1, 124, 124, 124, + 124, 1, 125, 125, 125, 125, 1, 126, + 126, 126, 126, 1, 127, 127, 127, 127, + 1, 128, 128, 128, 128, 1, 1, +} - const scanner_start int = 1 - const scanner_first_final int = 3 - const scanner_error int = 0 +var _scanner_trans_targs []byte = []byte{ + 2, 0, 3, 4, 5, 6, 7, 8, + 9, 10, 11, 12, 13, 14, 15, 16, + 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, + 33, 34, 35, 36, 37, 38, 39, 40, + 41, 42, 43, 44, 45, 46, 47, 48, + 49, 50, 51, 52, 53, 54, 55, 56, + 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, + 73, 74, 75, 76, 77, 78, 79, 80, + 81, 82, 83, 84, 85, 86, 87, 88, + 89, 90, 91, 92, 93, 94, 95, 96, + 97, 98, 99, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, 110, 111, 112, + 113, 114, 115, 116, 117, 118, 119, 120, + 121, 122, 123, 124, 125, 126, 127, 128, + 129, +} - const scanner_en_main int = 1 +var _scanner_trans_actions []byte = []byte{ + 0, 0, 0, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, +} - if len(data) < 3 || len(data) > 128 { - return false - } - cs, p, pe, eof := 0, 0, len(data), len(data) - _ = eof +const scanner_start int = 1 +const scanner_first_final int = 4 +const scanner_error int = 0 + +const scanner_en_main int = 1 + + +//line coin_regex.rl:20 + if len(data) < 3 || len(data) > 128 { + return false + } + cs, p, pe, eof := 0, 0, len(data), len(data) + _ = eof + +//line coin_regex.go:362 { - cs = scanner_start + cs = scanner_start } +//line coin_regex.go:367 { - var _klen int - var _trans int - var _acts int - var _nacts uint - var _keys int - if p == pe { - goto _test_eof - } - if cs == 0 { - goto _out - } - _resume: - _keys = int(_scanner_key_offsets[cs]) - _trans = int(_scanner_index_offsets[cs]) - - _klen = int(_scanner_single_lengths[cs]) - if _klen > 0 { - _lower := int(_keys) - var _mid int - _upper := int(_keys + _klen - 1) - for { - if _upper < _lower { - break - } - - _mid = _lower + ((_upper - _lower) >> 1) - switch { - case data[p] < _scanner_trans_keys[_mid]: - _upper = _mid - 1 - case data[p] > _scanner_trans_keys[_mid]: - _lower = _mid + 1 - default: - _trans += int(_mid - int(_keys)) - goto _match - } + var _klen int + var _trans int + var _acts int + var _nacts uint + var _keys int + if p == pe { + goto _test_eof + } + if cs == 0 { + goto _out + } +_resume: + _keys = int(_scanner_key_offsets[cs]) + _trans = int(_scanner_index_offsets[cs]) + + _klen = int(_scanner_single_lengths[cs]) + if _klen > 0 { + _lower := int(_keys) + var _mid int + _upper := int(_keys + _klen - 1) + for { + if _upper < _lower { + break } - _keys += _klen - _trans += _klen - } - _klen = int(_scanner_range_lengths[cs]) - if _klen > 0 { - _lower := int(_keys) - var _mid int - _upper := int(_keys + (_klen << 1) - 2) - for { - if _upper < _lower { - break - } - - _mid = _lower + (((_upper - _lower) >> 1) & ^1) - switch { - case data[p] < _scanner_trans_keys[_mid]: - _upper = _mid - 2 - case data[p] > _scanner_trans_keys[_mid+1]: - _lower = _mid + 2 - default: - _trans += int((_mid - int(_keys)) >> 1) - goto _match - } + _mid = _lower + ((_upper - _lower) >> 1) + switch { + case data[p] < _scanner_trans_keys[_mid]: + _upper = _mid - 1 + case data[p] > _scanner_trans_keys[_mid]: + _lower = _mid + 1 + default: + _trans += int(_mid - int(_keys)) + goto _match } - _trans += _klen } + _keys += _klen + _trans += _klen + } - _match: - _trans = int(_scanner_indicies[_trans]) - cs = int(_scanner_trans_targs[_trans]) + _klen = int(_scanner_range_lengths[cs]) + if _klen > 0 { + _lower := int(_keys) + var _mid int + _upper := int(_keys + (_klen << 1) - 2) + for { + if _upper < _lower { + break + } - if _scanner_trans_actions[_trans] == 0 { - goto _again + _mid = _lower + (((_upper - _lower) >> 1) & ^1) + switch { + case data[p] < _scanner_trans_keys[_mid]: + _upper = _mid - 2 + case data[p] > _scanner_trans_keys[_mid + 1]: + _lower = _mid + 2 + default: + _trans += int((_mid - int(_keys)) >> 1) + goto _match + } } + _trans += _klen + } + +_match: + _trans = int(_scanner_indicies[_trans]) + cs = int(_scanner_trans_targs[_trans]) - _acts = int(_scanner_trans_actions[_trans]) - _nacts = uint(_scanner_actions[_acts]) + if _scanner_trans_actions[_trans] == 0 { + goto _again + } + + _acts = int(_scanner_trans_actions[_trans]) + _nacts = uint(_scanner_actions[_acts]); _acts++ + for ; _nacts > 0; _nacts-- { _acts++ - for ; _nacts > 0; _nacts-- { - _acts++ - switch _scanner_actions[_acts-1] { - case 0: - return true - } + switch _scanner_actions[_acts-1] { + case 0: +//line coin_regex.rl:35 + return true +//line coin_regex.go:449 } + } - _again: - if cs == 0 { - goto _out - } - p++ - if p != pe { - goto _resume - } - _test_eof: - { - } - _out: - { - } +_again: + if cs == 0 { + goto _out + } + p++ + if p != pe { + goto _resume + } + _test_eof: {} + _out: {} } - return false -} +//line coin_regex.rl:39 + + return false +} \ No newline at end of file diff --git a/types/coin_regex.rl b/types/coin_regex.rl index 4a4355162b89..d7b726fe6914 100644 --- a/types/coin_regex.rl +++ b/types/coin_regex.rl @@ -26,8 +26,9 @@ func MatchDenom(data []byte) bool { %%{ # Define character classes special = '/' | ':' | '.' | '_' | '-'; + alphabetNumber = [a-zA-Z0-9]; - denom_pattern = [a-zA-Z] (alnum | special); + denom_pattern = [a-zA-Z] (alphabetNumber | special){2,127}; # Combined pattern for matching either a denomination or a decimal amount diff --git a/types/coin_test.go b/types/coin_test.go index e805a407e160..5907e45daa80 100644 --- a/types/coin_test.go +++ b/types/coin_test.go @@ -1021,6 +1021,30 @@ func (s *coinTestSuite) TestParseCoins() { } } +func (s *coinTestSuite) TestValidateDenom() { + cases := []struct { + input string + valid bool + }{ + {"", false}, + {"stake", true}, + {"me coin", false}, + {"foo:bar", true}, // special characters '/' | ':' | '.' | '_' | '-' are allowed + {"atom10", true}, // number in denom is allowed + {"transfer/channelToA/uatom", true}, + {"ibc/7F1D3FCF4AE79E1554D670D1AD949A9BA4E4A3C76C63093E17E446A46061A7A2", true}, + } + + for _, tc := range cases { + err := sdk.ValidateDenom(tc.input) + if !tc.valid { + s.Require().Error(err) + } else { + s.Require().NoError(err) + } + } +} + func (s *coinTestSuite) TestSortCoins() { good := sdk.Coins{ sdk.NewInt64Coin("gas", 1), From 2bfc037a07a6932fe1dbcb9cfbaf8be54ca2b930 Mon Sep 17 00:00:00 2001 From: Qt Date: Sat, 9 Mar 2024 00:59:11 +0800 Subject: [PATCH 02/30] docs: update docs (#19676) Co-authored-by: son trinh Co-authored-by: Julien Robert --- baseapp/abci.go | 2 +- baseapp/options.go | 2 +- baseapp/params_legacy.go | 65 +++++++++-------- client/context.go | 2 +- client/keys/types.go | 2 +- client/rpc/block.go | 2 +- client/v2/internal/util/util.go | 2 +- codec/codec.go | 2 +- codec/types/compat.go | 6 +- codec/unknownproto/doc.go | 44 ++++++------ core/comet/service.go | 4 +- core/store/database.go | 2 +- errors/doc.go | 62 ++++++++--------- runtime/events.go | 2 +- runtime/types.go | 16 ++--- server/doc.go | 56 ++++++++------- .../grpc/gogoreflection/serverreflection.go | 69 +++++++++---------- server/mock/app.go | 6 +- server/mock/tx.go | 5 +- server/start.go | 5 ++ server/types/abci.go | 34 ++++++--- server/types/app.go | 2 +- server/util.go | 6 +- x/auth/migrations/legacytx/stdsign.go | 4 +- 24 files changed, 204 insertions(+), 198 deletions(-) diff --git a/baseapp/abci.go b/baseapp/abci.go index f851338acbae..e54824f41e0f 100644 --- a/baseapp/abci.go +++ b/baseapp/abci.go @@ -1199,7 +1199,7 @@ func checkNegativeHeight(height int64) error { return nil } -// createQueryContext creates a new sdk.Context for a query, taking as args +// CreateQueryContext creates a new sdk.Context for a query, taking as args // the block height and whether the query needs a proof or not. func (app *BaseApp) CreateQueryContext(height int64, prove bool) (sdk.Context, error) { if err := checkNegativeHeight(height); err != nil { diff --git a/baseapp/options.go b/baseapp/options.go index 5acc6811dbe3..372c2411cf82 100644 --- a/baseapp/options.go +++ b/baseapp/options.go @@ -273,7 +273,7 @@ func (app *BaseApp) SetFauxMerkleMode() { app.fauxMerkleMode = true } -// SetNotSigverify during simulation testing, transaction signature verification needs to be ignored. +// SetNotSigverifyTx during simulation testing, transaction signature verification needs to be ignored. func (app *BaseApp) SetNotSigverifyTx() { app.sigverifyTx = false } diff --git a/baseapp/params_legacy.go b/baseapp/params_legacy.go index 13fd34add70e..b8a0591daef3 100644 --- a/baseapp/params_legacy.go +++ b/baseapp/params_legacy.go @@ -1,37 +1,36 @@ -/* -Deprecated. +// Deprecated: + +// Legacy types are defined below to aid in the migration of CometBFT consensus +// parameters from use of the now deprecated x/params modules to a new dedicated +// x/consensus module. +// +// Application developers should ensure that they implement their upgrade handler +// correctly such that app.ConsensusParamsKeeper.Set() is called with the values +// returned by GetConsensusParams(). +// +// Example: +// +// baseAppLegacySS := app.ParamsKeeper.Subspace(baseapp.Paramspace).WithKeyTable(paramstypes.ConsensusParamsKeyTable()) +// +// app.UpgradeKeeper.SetUpgradeHandler( +// UpgradeName, +// func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { +// if cp := baseapp.GetConsensusParams(ctx, baseAppLegacySS); cp != nil { +// app.ConsensusParamsKeeper.Set(ctx, cp) +// } else { +// ctx.Logger().Info("warning: consensus parameters are undefined; skipping migration", "upgrade", UpgradeName) +// } +// +// return app.ModuleManager.RunMigrations(ctx, app.Configurator(), fromVM) +// }, +// ) +// +// Developers can also bypass the use of the legacy Params subspace and set the +// values to app.ConsensusParamsKeeper.Set() explicitly. +// +// Note, for new chains this is not necessary as CometBFT's consensus parameters +// will automatically be set for you in InitChain. -Legacy types are defined below to aid in the migration of CometBFT consensus -parameters from use of the now deprecated x/params modules to a new dedicated -x/consensus module. - -Application developers should ensure that they implement their upgrade handler -correctly such that app.ConsensusParamsKeeper.Set() is called with the values -returned by GetConsensusParams(). - -Example: - - baseAppLegacySS := app.ParamsKeeper.Subspace(baseapp.Paramspace).WithKeyTable(paramstypes.ConsensusParamsKeyTable()) - - app.UpgradeKeeper.SetUpgradeHandler( - UpgradeName, - func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { - if cp := baseapp.GetConsensusParams(ctx, baseAppLegacySS); cp != nil { - app.ConsensusParamsKeeper.Set(ctx, cp) - } else { - ctx.Logger().Info("warning: consensus parameters are undefined; skipping migration", "upgrade", UpgradeName) - } - - return app.ModuleManager.RunMigrations(ctx, app.Configurator(), fromVM) - }, - ) - -Developers can also bypass the use of the legacy Params subspace and set the -values to app.ConsensusParamsKeeper.Set() explicitly. - -Note, for new chains this is not necessary as CometBFT's consensus parameters -will automatically be set for you in InitChain. -*/ package baseapp import ( diff --git a/client/context.go b/client/context.go index b4f8e54fe024..2d513c81b34a 100644 --- a/client/context.go +++ b/client/context.go @@ -309,7 +309,7 @@ func (ctx Context) WithAux(isAux bool) Context { return ctx } -// WithLedgerHasProto returns the context with the provided boolean value, indicating +// WithLedgerHasProtobuf returns the context with the provided boolean value, indicating // whether the target Ledger application can support Protobuf payloads. func (ctx Context) WithLedgerHasProtobuf(val bool) Context { ctx.LedgerHasProtobuf = val diff --git a/client/keys/types.go b/client/keys/types.go index 1df26ed2879d..70fdfa6520af 100644 --- a/client/keys/types.go +++ b/client/keys/types.go @@ -22,7 +22,7 @@ func NewAddNewKey(name, password, mnemonic string, account, index int) AddNewKey } } -// RecoverKeyBody recovers a key +// RecoverKey recovers a key type RecoverKey struct { Password string `json:"password"` Mnemonic string `json:"mnemonic"` diff --git a/client/rpc/block.go b/client/rpc/block.go index d1b99d722942..388741328d58 100644 --- a/client/rpc/block.go +++ b/client/rpc/block.go @@ -68,7 +68,7 @@ func QueryBlocks(clientCtx client.Context, page, limit int, query, orderBy strin return result, nil } -// get block by height +// GetBlockByHeight get block by height func GetBlockByHeight(clientCtx client.Context, height *int64) (*cmt.Block, error) { // get the node node, err := clientCtx.GetNode() diff --git a/client/v2/internal/util/util.go b/client/v2/internal/util/util.go index 1ec988142278..dddb0c42020d 100644 --- a/client/v2/internal/util/util.go +++ b/client/v2/internal/util/util.go @@ -17,7 +17,7 @@ import ( // later versions unsupported by the current version can be added var buildInfo, _ = debug.ReadBuildInfo() -// DescriptorName returns the name of the descriptor in kebab case. +// DescriptorKebabName returns the name of the descriptor in kebab case. func DescriptorKebabName(descriptor protoreflect.Descriptor) string { return strcase.ToKebab(string(descriptor.Name())) } diff --git a/codec/codec.go b/codec/codec.go index d26f91b35623..51b8d8051b31 100644 --- a/codec/codec.go +++ b/codec/codec.go @@ -59,7 +59,7 @@ type ( // MustUnmarshal calls Unmarshal and panics if error is returned. MustUnmarshal(bz []byte, ptr proto.Message) - // Unmarshal parses the data encoded with UnmarshalLengthPrefixed method and stores + // UnmarshalLengthPrefixed parses the data encoded with UnmarshalLengthPrefixed method and stores // the result in the value pointed to by v. UnmarshalLengthPrefixed(bz []byte, ptr proto.Message) error // MustUnmarshalLengthPrefixed calls UnmarshalLengthPrefixed and panics if error diff --git a/codec/types/compat.go b/codec/types/compat.go index 080ca321c72e..bb4dff0bf438 100644 --- a/codec/types/compat.go +++ b/codec/types/compat.go @@ -102,7 +102,7 @@ func (a AminoUnpacker) UnpackAny(any *Any, iface interface{}) error { return nil } -// AminoUnpacker is an AnyUnpacker provided for backwards compatibility with +// AminoPacker is provided for backwards compatibility with // amino for the binary marshaling phase type AminoPacker struct { Cdc *amino.Codec @@ -123,7 +123,7 @@ func (a AminoPacker) UnpackAny(any *Any, _ interface{}) error { return err } -// AminoUnpacker is an AnyUnpacker provided for backwards compatibility with +// AminoJSONUnpacker is an AnyUnpacker provided for backwards compatibility with // amino for the JSON marshaling phase type AminoJSONUnpacker struct { Cdc *amino.Codec @@ -160,7 +160,7 @@ func (a AminoJSONUnpacker) UnpackAny(any *Any, iface interface{}) error { return nil } -// AminoUnpacker is an AnyUnpacker provided for backwards compatibility with +// AminoJSONPacker is an AnyUnpacker provided for backwards compatibility with // amino for the JSON un-marshaling phase type AminoJSONPacker struct { Cdc *amino.Codec diff --git a/codec/unknownproto/doc.go b/codec/unknownproto/doc.go index cef3f8f253e9..ac8fd58da17e 100644 --- a/codec/unknownproto/doc.go +++ b/codec/unknownproto/doc.go @@ -1,24 +1,22 @@ -/* -unknownproto implements functionality to "type check" protobuf serialized byte sequences -against an expected proto.Message to report: - -a) Unknown fields in the stream -- this is indicative of mismatched services, perhaps a malicious actor - -b) Mismatched wire types for a field -- this is indicative of mismatched services - -Its API signature is similar to proto.Unmarshal([]byte, proto.Message) in the strict case - - if err := RejectUnknownFieldsStrict(protoBlob, protoMessage, false); err != nil { - // Handle the error. - } - -and ideally should be added before invoking proto.Unmarshal, if you'd like to enforce the features mentioned above. - -By default, for security we report every single field that's unknown, whether a non-critical field or not. To customize -this behavior, please set the boolean parameter allowUnknownNonCriticals to true to RejectUnknownFields: - - if err := RejectUnknownFields(protoBlob, protoMessage, true); err != nil { - // Handle the error. - } -*/ +// Package unknownproto implements functionality to "type check" protobuf serialized byte sequences +// against an expected proto.Message to report: +// +// a) Unknown fields in the stream -- this is indicative of mismatched services, perhaps a malicious actor +// +// b) Mismatched wire types for a field -- this is indicative of mismatched services +// +// Its API signature is similar to proto.Unmarshal([]byte, proto.Message) in the strict case +// +// if err := RejectUnknownFieldsStrict(protoBlob, protoMessage, false); err != nil { +// // Handle the error. +// } +// +// and ideally should be added before invoking proto.Unmarshal, if you'd like to enforce the features mentioned above. +// +// By default, for security we report every single field that's unknown, whether a non-critical field or not. To customize +// this behavior, please set the boolean parameter allowUnknownNonCriticals to true to RejectUnknownFields: +// +// if err := RejectUnknownFields(protoBlob, protoMessage, true); err != nil { +// // Handle the error. +// } package unknownproto diff --git a/core/comet/service.go b/core/comet/service.go index 8af646e011d5..bc99e820f11f 100644 --- a/core/comet/service.go +++ b/core/comet/service.go @@ -5,7 +5,7 @@ import ( "time" ) -// BlockInfoService is an interface that can be used to get information specific to Comet +// CometInfoService is an interface that can be used to get information specific to Comet type CometInfoService interface { GetCometInfo(context.Context) Info } @@ -50,7 +50,7 @@ type VoteInfo struct { BlockIDFlag BlockIDFlag } -// BlockIdFlag indicates which BlockID the signature is for +// BlockIDFlag indicates which BlockID the signature is for type BlockIDFlag int32 const ( diff --git a/core/store/database.go b/core/store/database.go index 551727a6342b..45283ee62184 100644 --- a/core/store/database.go +++ b/core/store/database.go @@ -1,6 +1,6 @@ package store -// Database provides access to the underlying database for CRUD operations of non-consensus data. +// DatabaseService provides access to the underlying database for CRUD operations of non-consensus data. // WARNING: using this api will make your module unprovable for fraud and validity proofs type DatabaseService interface { GetDatabase() NonConsensusStore diff --git a/errors/doc.go b/errors/doc.go index ed6b9a69bfca..f98e7932aeb4 100644 --- a/errors/doc.go +++ b/errors/doc.go @@ -1,33 +1,31 @@ -/* -Package errors implements custom error interfaces for cosmos-sdk. - -Error declarations should be generic and cover broad range of cases. Each -returned error instance can wrap a generic error declaration to provide more -details. - -This package provides a broad range of errors declared that fits all common -cases. If an error is very specific for an extension it can be registered outside -of the errors package. If it will be needed my many extensions, please consider -registering it in the errors package. To create a new error instance use Register -function. You must provide a unique, non zero error code and a short description, for example: - - var ErrZeroDivision = errors.Register(9241, "zero division") - -When returning an error, you can attach to it an additional context -information by using Wrap function, for example: - - func safeDiv(val, div int) (int, err) { - if div == 0 { - return 0, errors.Wrapf(ErrZeroDivision, "cannot divide %d", val) - } - return val / div, nil - } - -The first time an error instance is wrapped a stacktrace is attached as well. -Stacktrace information can be printed using %+v and %v formats. - - %s is just the error message - %+v is the full stack trace - %v appends a compressed [filename:line] where the error was created -*/ +// Package errors implements custom error interfaces for cosmos-sdk. +// +// Error declarations should be generic and cover broad range of cases. Each +// returned error instance can wrap a generic error declaration to provide more +// details. +// +// This package provides a broad range of errors declared that fits all common +// cases. If an error is very specific for an extension it can be registered outside +// of the errors package. If it will be needed my many extensions, please consider +// registering it in the errors package. To create a new error instance use Register +// function. You must provide a unique, non zero error code and a short description, for example: +// +// var ErrZeroDivision = errors.Register(9241, "zero division") +// +// When returning an error, you can attach to it an additional context +// information by using Wrap function, for example: +// +// func safeDiv(val, div int) (int, err) { +// if div == 0 { +// return 0, errors.Wrapf(ErrZeroDivision, "cannot divide %d", val) +// } +// return val / div, nil +// } +// +// The first time an error instance is wrapped a stacktrace is attached as well. +// Stacktrace information can be printed using %+v and %v formats. +// +// %s is just the error message +// %+v is the full stack trace +// %v appends a compressed [filename:line] where the error was created package errors diff --git a/runtime/events.go b/runtime/events.go index 150de335d5df..956e445b42a1 100644 --- a/runtime/events.go +++ b/runtime/events.go @@ -50,7 +50,7 @@ func (e Events) EmitKV(eventType string, attrs ...event.Attribute) error { return nil } -// Emit emits an typed event that is defined in the protobuf file. +// EmitNonConsensus emits an typed event that is defined in the protobuf file. // In the future these events will be added to consensus. func (e Events) EmitNonConsensus(event protoiface.MessageV1) error { return e.EventManagerI.EmitTypedEvent(event) diff --git a/runtime/types.go b/runtime/types.go index 4ae2774d5bee..04027d0dbc69 100644 --- a/runtime/types.go +++ b/runtime/types.go @@ -10,25 +10,25 @@ import ( const ModuleName = "runtime" -// App implements the common methods for a Cosmos SDK-based application +// AppI implements the common methods for a Cosmos SDK-based application // specific blockchain. type AppI interface { - // The assigned name of the app. + // Name the assigned name of the app. Name() string - // Application updates every begin block. + // BeginBlocker updates every begin block. BeginBlocker(ctx sdk.Context) (sdk.BeginBlock, error) - // Application updates every end block. + // EndBlocker updates every end block. EndBlocker(ctx sdk.Context) (sdk.EndBlock, error) - // Application update at chain (i.e app) initialization. + // InitChainer update at chain (i.e app) initialization. InitChainer(ctx sdk.Context, req *abci.RequestInitChain) (*abci.ResponseInitChain, error) - // Loads the app at a given height. + // LoadHeight load the app at a given height. LoadHeight(height int64) error - // Exports the state of the application for a genesis file. + // ExportAppStateAndValidators exports the state of the application for a genesis file. ExportAppStateAndValidators(forZeroHeight bool, jailAllowedAddrs, modulesToExport []string) (types.ExportedApp, error) } @@ -36,6 +36,6 @@ type AppI interface { // specific blockchain that chooses to utilize the sdk simulation framework. type AppSimI interface { AppI - // Helper for the simulation framework. + // SimulationManager helper for the simulation framework. SimulationManager() *module.SimulationManager } diff --git a/server/doc.go b/server/doc.go index 241c2182595b..22ba8c16753b 100644 --- a/server/doc.go +++ b/server/doc.go @@ -1,30 +1,28 @@ -/* -The commands from the SDK are defined with `cobra` and configured with the -`viper` package. - -This takes place in the `InterceptConfigsPreRunHandler` function. -Since the `viper` package is used for configuration the precedence is dictated -by that package. That is - -1. Command line switches -2. Environment variables -3. Files from configuration values -4. Default values - -The global configuration instance exposed by the `viper` package is not -used by Cosmos SDK in this function. A new instance of `viper.Viper` is created -and the following is performed. The environmental variable prefix is set -to the current program name. Environmental variables consider the underscore -to be equivalent to the `.` or `-` character. This means that an configuration -value called `rpc.laddr` would be read from an environmental variable called -`MYTOOL_RPC_LADDR` if the current program name is `mytool`. - -Running the `InterceptConfigsPreRunHandler` also reads `app.toml` -and `config.toml` from the home directory under the `config` directory. -If `config.toml` or `app.toml` do not exist then those files are created -and populated with default values. `InterceptConfigsPreRunHandler` takes -two parameters to set/update a custom template to create custom `app.toml`. -If these parameters are empty, the server then creates a default template -provided by the SDK. -*/ +// Package server The commands from the SDK are defined with `cobra` and configured with the +// `viper` package. +// +// This takes place in the `InterceptConfigsPreRunHandler` function. +// Since the `viper` package is used for configuration the precedence is dictated +// by that package. That is +// +// 1. Command line switches +// 2. Environment variables +// 3. Files from configuration values +// 4. Default values +// +// The global configuration instance exposed by the `viper` package is not +// used by Cosmos SDK in this function. A new instance of `viper.Viper` is created +// and the following is performed. The environmental variable prefix is set +// to the current program name. Environmental variables consider the underscore +// to be equivalent to the `.` or `-` character. This means that an configuration +// value called `rpc.laddr` would be read from an environmental variable called +// `MYTOOL_RPC_LADDR` if the current program name is `mytool`. +// +// Running the `InterceptConfigsPreRunHandler` also reads `app.toml` +// and `config.toml` from the home directory under the `config` directory. +// If `config.toml` or `app.toml` do not exist then those files are created +// and populated with default values. `InterceptConfigsPreRunHandler` takes +// two parameters to set/update a custom template to create custom `app.toml`. +// If these parameters are empty, the server then creates a default template +// provided by the SDK. package server diff --git a/server/grpc/gogoreflection/serverreflection.go b/server/grpc/gogoreflection/serverreflection.go index 9d04abb92fb5..c5db746ef87e 100644 --- a/server/grpc/gogoreflection/serverreflection.go +++ b/server/grpc/gogoreflection/serverreflection.go @@ -1,40 +1,35 @@ -/* - * - * Copyright 2016 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -/* -Package reflection implements server reflection service. - -The service implemented is defined in: -https://github.com/grpc/grpc/blob/master/src/proto/grpc/reflection/v1alpha/reflection.proto. - -To register server reflection on a gRPC server: - - import "google.golang.org/grpc/reflection" - - s := grpc.NewServer() - pb.RegisterYourOwnServer(s, &server{}) - - // Register reflection service on gRPC server. - reflection.Register(s) - - s.Serve(lis) -*/ -package gogoreflection // import "google.golang.org/grpc/reflection" +// Copyright 2016 gRPC authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Package gogoreflection implements server reflection service. +// +// The service implemented is defined in: +// https://github.com/grpc/grpc/blob/master/src/proto/grpc/reflection/v1alpha/reflection.proto. +// +// To register server reflection on a gRPC server: +// +// import "google.golang.org/grpc/reflection" +// +// s := grpc.NewServer() +// pb.RegisterYourOwnServer(s, &server{}) +// +// // Register reflection service on gRPC server. +// reflection.Register(s) +// +// s.Serve(lis) + +package gogoreflection import ( "bytes" diff --git a/server/mock/app.go b/server/mock/app.go index f090f8c6df88..5348215355a9 100644 --- a/server/mock/app.go +++ b/server/mock/app.go @@ -89,13 +89,13 @@ func KVStoreHandler(storeKey storetypes.StoreKey) bam.MsgServiceHandler { } } -// basic KV structure +// KV is a basic kv structure type KV struct { Key string `json:"key"` Value string `json:"value"` } -// What Genesis JSON is formatted as +// GenesisJSON what genesis JSON is formatted as type GenesisJSON struct { Values []KV `json:"values"` } @@ -144,7 +144,7 @@ func AppGenStateEmpty(_ *codec.LegacyAmino, _ genutiltypes.AppGenesis, _ []json. return } -// Manually write the handlers for this custom message +// MsgServer manually write the handlers for this custom message type MsgServer interface { Test(ctx context.Context, msg *KVStoreTx) (*sdk.Result, error) } diff --git a/server/mock/tx.go b/server/mock/tx.go index 151a4d574613..ab2fc6bfdb18 100644 --- a/server/mock/tx.go +++ b/server/mock/tx.go @@ -16,7 +16,7 @@ import ( txsigning "github.com/cosmos/cosmos-sdk/types/tx/signing" ) -// An sdk.Tx which is its own sdk.Msg. +// KVStoreTx is an sdk.Tx which is its own sdk.Msg. type KVStoreTx struct { key []byte value []byte @@ -72,6 +72,7 @@ func (msg *KVStoreTx) Equals(key cryptotypes.PubKey) bool { } // dummy implementation of proto.Message + func (msg *KVStoreTx) Reset() {} func (msg *KVStoreTx) String() string { return "TODO" } func (msg *KVStoreTx) ProtoMessage() {} @@ -110,7 +111,7 @@ func (msg *KVStoreTx) GetSignBytes() []byte { return msg.bytes } -// Should the app be calling this? Or only handlers? +// ValidateBasic should the app be calling this? or only handlers? func (msg *KVStoreTx) ValidateBasic() error { return nil } diff --git a/server/start.go b/server/start.go index ae64602a19c0..85d0fca57a8c 100644 --- a/server/start.go +++ b/server/start.go @@ -76,10 +76,12 @@ const ( FlagShutdownGrace = "shutdown-grace" // state sync-related flags + FlagStateSyncSnapshotInterval = "state-sync.snapshot-interval" FlagStateSyncSnapshotKeepRecent = "state-sync.snapshot-keep-recent" // api-related flags + FlagAPIEnable = "api.enable" FlagAPISwagger = "api.swagger" FlagAPIAddress = "api.address" @@ -90,15 +92,18 @@ const ( FlagAPIEnableUnsafeCORS = "api.enabled-unsafe-cors" // gRPC-related flags + flagGRPCOnly = "grpc-only" flagGRPCEnable = "grpc.enable" flagGRPCAddress = "grpc.address" flagGRPCWebEnable = "grpc-web.enable" // mempool flags + FlagMempoolMaxTxs = "mempool.max-txs" // testnet keys + KeyIsTestnet = "is-testnet" KeyNewChainID = "new-chain-ID" KeyNewOpAddr = "new-operator-addr" diff --git a/server/types/abci.go b/server/types/abci.go index 9c298691dc6b..6eb922b9798e 100644 --- a/server/types/abci.go +++ b/server/types/abci.go @@ -10,28 +10,40 @@ import ( // to be driven by a blockchain-based replication engine via the ABCI. type ABCI interface { // Info/Query Connection - Info(*abci.RequestInfo) (*abci.ResponseInfo, error) // Return application info - Query(context.Context, *abci.RequestQuery) (*abci.ResponseQuery, error) // Query for state + + // Info returns application info + Info(*abci.RequestInfo) (*abci.ResponseInfo, error) + // Query returns application state + Query(context.Context, *abci.RequestQuery) (*abci.ResponseQuery, error) // Mempool Connection - CheckTx(*abci.RequestCheckTx) (*abci.ResponseCheckTx, error) // Validate a tx for the mempool + + // CheckTx validate a tx for the mempool + CheckTx(*abci.RequestCheckTx) (*abci.ResponseCheckTx, error) // Consensus Connection - InitChain(*abci.RequestInitChain) (*abci.ResponseInitChain, error) // Initialize blockchain w validators/other info from CometBFT + + // InitChain Initialize blockchain w validators/other info from CometBFT + InitChain(*abci.RequestInitChain) (*abci.ResponseInitChain, error) PrepareProposal(*abci.RequestPrepareProposal) (*abci.ResponsePrepareProposal, error) ProcessProposal(*abci.RequestProcessProposal) (*abci.ResponseProcessProposal, error) - // Deliver the decided block with its txs to the Application + // FinalizeBlock deliver the decided block with its txs to the Application FinalizeBlock(*abci.RequestFinalizeBlock) (*abci.ResponseFinalizeBlock, error) - // Create application specific vote extension + // ExtendVote create application specific vote extension ExtendVote(context.Context, *abci.RequestExtendVote) (*abci.ResponseExtendVote, error) - // Verify application's vote extension data + // VerifyVoteExtension verify application's vote extension data VerifyVoteExtension(*abci.RequestVerifyVoteExtension) (*abci.ResponseVerifyVoteExtension, error) // Commit the state and return the application Merkle root hash Commit() (*abci.ResponseCommit, error) // State Sync Connection - ListSnapshots(*abci.RequestListSnapshots) (*abci.ResponseListSnapshots, error) // List available snapshots - OfferSnapshot(*abci.RequestOfferSnapshot) (*abci.ResponseOfferSnapshot, error) // Offer a snapshot to the application - LoadSnapshotChunk(*abci.RequestLoadSnapshotChunk) (*abci.ResponseLoadSnapshotChunk, error) // Load a snapshot chunk - ApplySnapshotChunk(*abci.RequestApplySnapshotChunk) (*abci.ResponseApplySnapshotChunk, error) // Apply a snapshot chunk + + // ListSnapshots list available snapshots + ListSnapshots(*abci.RequestListSnapshots) (*abci.ResponseListSnapshots, error) + // OfferSnapshot offer a snapshot to the application + OfferSnapshot(*abci.RequestOfferSnapshot) (*abci.ResponseOfferSnapshot, error) + // LoadSnapshotChunk load a snapshot chunk + LoadSnapshotChunk(*abci.RequestLoadSnapshotChunk) (*abci.ResponseLoadSnapshotChunk, error) + // ApplySnapshotChunk apply a snapshot chunk + ApplySnapshotChunk(*abci.RequestApplySnapshotChunk) (*abci.ResponseApplySnapshotChunk, error) } diff --git a/server/types/app.go b/server/types/app.go index c0b4a30309fc..8d73f69e13f1 100644 --- a/server/types/app.go +++ b/server/types/app.go @@ -56,7 +56,7 @@ type ( // CommitMultiStore return the multistore instance CommitMultiStore() storetypes.CommitMultiStore - // Return the snapshot manager + // SnapshotManager return the snapshot manager SnapshotManager() *snapshots.Manager // Close is called in start cmd to gracefully cleanup resources. diff --git a/server/util.go b/server/util.go index 54d075c40617..de48b0bad343 100644 --- a/server/util.go +++ b/server/util.go @@ -44,7 +44,7 @@ import ( // a command's Context. const ServerContextKey = sdk.ContextKey("server.context") -// server context +// Context server context type Context struct { Viper *viper.Viper Config *cmtcfg.Config @@ -323,7 +323,7 @@ func interceptConfigs(rootViper *viper.Viper, customAppTemplate string, customCo return conf, nil } -// add server commands +// AddCommands add server commands func AddCommands[T types.Application](rootCmd *cobra.Command, appCreator types.AppCreator[T], addStartFlags types.ModuleInitFlags) { cometCmd := &cobra.Command{ Use: "comet", @@ -361,7 +361,7 @@ func AddTestnetCreatorCommand[T types.Application](rootCmd *cobra.Command, appCr rootCmd.AddCommand(testnetCreateCmd) } -// https://stackoverflow.com/questions/23558425/how-do-i-get-the-local-ip-address-in-go +// ExternalIP https://stackoverflow.com/questions/23558425/how-do-i-get-the-local-ip-address-in-go // TODO there must be a better way to get external IP func ExternalIP() (string, error) { ifaces, err := net.Interfaces() diff --git a/x/auth/migrations/legacytx/stdsign.go b/x/auth/migrations/legacytx/stdsign.go index e5a4e454cb90..e8d00f67594c 100644 --- a/x/auth/migrations/legacytx/stdsign.go +++ b/x/auth/migrations/legacytx/stdsign.go @@ -23,7 +23,7 @@ import ( type LegacyMsg interface { sdk.Msg - // Get the canonical byte representation of the Msg. + // GetSignBytes get the canonical byte representation of the Msg. GetSignBytes() []byte } @@ -92,7 +92,7 @@ type StdSignature struct { Signature []byte `json:"signature" yaml:"signature"` } -// Deprecated +// Deprecated: NewStdSignature returns a std signature func NewStdSignature(pk cryptotypes.PubKey, sig []byte) StdSignature { return StdSignature{PubKey: pk, Signature: sig} } From 0f5314c031bc02589a19c5b1d180e61ba633f8ff Mon Sep 17 00:00:00 2001 From: Julien Robert Date: Fri, 8 Mar 2024 18:00:09 +0100 Subject: [PATCH 03/30] ci: upstream dep-assert and nomenclature from server/v2 (#19703) --- docs/build/building-apps/01-app-go-v2.md | 14 ++++++------- docs/build/building-modules/15-depinject.md | 6 +----- scripts/dep-assert.sh | 23 ++++++++++++++++++--- simapp/{app_v2.go => app_di.go} | 0 simapp/simd/cmd/{root_v2.go => root_di.go} | 0 x/auth/tx/config/depinject.go | 2 +- 6 files changed, 29 insertions(+), 16 deletions(-) rename simapp/{app_v2.go => app_di.go} (100%) rename simapp/simd/cmd/{root_v2.go => root_di.go} (100%) diff --git a/docs/build/building-apps/01-app-go-v2.md b/docs/build/building-apps/01-app-go-v2.md index 1be1bb90aa29..d77899d26e6d 100644 --- a/docs/build/building-apps/01-app-go-v2.md +++ b/docs/build/building-apps/01-app-go-v2.md @@ -2,7 +2,7 @@ sidebar_position: 1 --- -# Overview of `app_v2.go` +# Overview of `app_di.go` :::note Synopsis @@ -19,7 +19,7 @@ Learn more about the rationale of App Wiring in [ADR-057](../architecture/adr-05 ::: -This section is intended to provide an overview of the `SimApp` `app_v2.go` file with App Wiring. +This section is intended to provide an overview of the `SimApp` `app_di.go` file with App Wiring. ## `app_config.go` @@ -57,7 +57,7 @@ https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/simapp/app_config.go :::tip The example above shows how to create an `AppConfig` using Go. However, it is also possible to create an `AppConfig` using YAML, or JSON. -The configuration can then be embed with `go:embed` and read with [`appconfig.LoadYAML`](https://pkg.go.dev/cosmossdk.io/core/appconfig#LoadYAML), or [`appconfig.LoadJSON`](https://pkg.go.dev/cosmossdk.io/core/appconfig#LoadJSON), in `app_v2.go`. +The configuration can then be embed with `go:embed` and read with [`appconfig.LoadYAML`](https://pkg.go.dev/cosmossdk.io/core/appconfig#LoadYAML), or [`appconfig.LoadJSON`](https://pkg.go.dev/cosmossdk.io/core/appconfig#LoadJSON), in `app_di.go`. ```go //go:embed app_config.yaml @@ -95,9 +95,9 @@ modules: A more complete example of `app.yaml` can be found [here](https://github.com/cosmos/cosmos-sdk/blob/91b1d83f1339e235a1dfa929ecc00084101a19e3/simapp/app.yaml). -## `app_v2.go` +## `app_di.go` -`app_v2.go` is the place where `SimApp` is constructed. `depinject.Inject` facilitates that by automatically wiring the app modules and keepers, provided an application configuration `AppConfig` is provided. `SimApp` is constructed, when calling the injected `*runtime.AppBuilder`, with `appBuilder.Build(...)`. +`app_di.go` is the place where `SimApp` is constructed. `depinject.Inject` facilitates that by automatically wiring the app modules and keepers, provided an application configuration `AppConfig` is provided. `SimApp` is constructed, when calling the injected `*runtime.AppBuilder`, with `appBuilder.Build(...)`. In short `depinject` and the [`runtime` package](https://pkg.go.dev/github.com/cosmos/cosmos-sdk/runtime) abstract the wiring of the app, and the `AppBuilder` is the place where the app is constructed. [`runtime`](https://pkg.go.dev/github.com/cosmos/cosmos-sdk/runtime) takes care of registering the codecs, KV store, subspaces and instantiating `baseapp`. ```go reference @@ -143,10 +143,10 @@ When using AutoCLI and combining app wiring and non app wiring modules. The Auto Otherwise it will miss the non depinject modules and not register their CLI. ::: -### Complete `app_v2.go` +### Complete `app_di.go` :::tip -Note that in the complete `SimApp` `app_v2.go` file, testing utilities are also defined, but they could as well be defined in a separate file. +Note that in the complete `SimApp` `app_di.go` file, testing utilities are also defined, but they could as well be defined in a separate file. ::: ```go reference diff --git a/docs/build/building-modules/15-depinject.md b/docs/build/building-modules/15-depinject.md index 06636fefbce1..905a21ce7c5e 100644 --- a/docs/build/building-modules/15-depinject.md +++ b/docs/build/building-modules/15-depinject.md @@ -123,12 +123,8 @@ All methods, structs and their fields must be public for `depinject`. https://github.com/cosmos/cosmos-sdk/blob/f4bdec3433373cc4950f4680743e969495763fbb/x/group/module/module.go#L64-L65 ``` - - - - The module is now ready to be used with `depinject` by a chain developer. ## Integrate in an application -The App Wiring is done in `app_config.go` / `app.yaml` and `app_v2.go` and is explained in detail in the [overview of `app_v2.go`](https://docs.cosmos.network/main/build/building-apps/app-go-v2). +The App Wiring is done in `app_config.go` / `app.yaml` and `app_di.go` and is explained in detail in the [overview of `app_di.go`](https://docs.cosmos.network/main/build/building-apps/app-go-v2). diff --git a/scripts/dep-assert.sh b/scripts/dep-assert.sh index 0fa8a8650153..2f4dfd0dbf64 100755 --- a/scripts/dep-assert.sh +++ b/scripts/dep-assert.sh @@ -2,14 +2,14 @@ set -o errexit -SIMAPP_REGEX="cosmossdk.io/simapp" CWD=$(pwd) - +# no simapp imports in modules +SIMAPP_REGEX="cosmossdk.io/simapp" find . -type f -name 'go.mod' -print0 | while IFS= read -r -d '' file do d=$(dirname "$file") - if [[ "$d" =~ \./simapp$|\./tests* ]]; then + if [[ "$d" =~ \./simapp$|\./simapp/v2$|\./tests* ]]; then continue fi @@ -18,3 +18,20 @@ do exit 1 fi done + +# no runtime/v2 or server/v2 imports in x/ modules +RUNTIMEV2_REGEX="cosmossdk.io/runtime/v2" +SEVERV2_REGEX="cosmossdk.io/server/v2" +find ./x/ -type f -name 'go.mod' -print0 | while IFS= read -r -d '' file +do + d=$(dirname "$file") + if cd "$CWD/$d" && go list -test -f '{{ .Imports }}' ./... | grep -q -E "${RUNTIMEV2_REGEX}"; then + echo "${d} has a dependency on runtime/v2!" + exit 1 + fi + + if cd "$CWD/$d" && go list -test -f '{{ .Imports }}' ./... | grep -q -E "${SEVERV2_REGEX}"; then + echo "${d} has a dependency on server/v2!" + exit 1 + fi +done \ No newline at end of file diff --git a/simapp/app_v2.go b/simapp/app_di.go similarity index 100% rename from simapp/app_v2.go rename to simapp/app_di.go diff --git a/simapp/simd/cmd/root_v2.go b/simapp/simd/cmd/root_di.go similarity index 100% rename from simapp/simd/cmd/root_v2.go rename to simapp/simd/cmd/root_di.go diff --git a/x/auth/tx/config/depinject.go b/x/auth/tx/config/depinject.go index 85ce366c9b7c..8b553520e929 100644 --- a/x/auth/tx/config/depinject.go +++ b/x/auth/tx/config/depinject.go @@ -164,7 +164,7 @@ func newAnteHandler(txConfig client.TxConfig, in ModuleInputs) (sdk.AnteHandler, // NewBankKeeperCoinMetadataQueryFn creates a new Textual struct using the given // BankKeeper to retrieve coin metadata. // -// This function should be used in the server (app.go) and is already injected thanks to app wiring for app_v2. +// This function should be used in the server (app.go) and is already injected thanks to app wiring for app_di. func NewBankKeeperCoinMetadataQueryFn(bk BankKeeper) textual.CoinMetadataQueryFn { return func(ctx context.Context, denom string) (*bankv1beta1.Metadata, error) { res, err := bk.DenomMetadataV2(ctx, &bankv1beta1.QueryDenomMetadataRequest{Denom: denom}) From f69dabe241d46f8a80f3141e2fb1ab0f173745ca Mon Sep 17 00:00:00 2001 From: Julien Robert Date: Fri, 8 Mar 2024 18:25:21 +0100 Subject: [PATCH 04/30] refactor(storev2): change error namespace (#19698) --- store/db/goleveldb.go | 37 ++++++++++++++++++------------------ store/db/memdb.go | 33 ++++++++++++++++---------------- store/db/prefixdb.go | 17 +++++++++-------- store/{ => errors}/errors.go | 7 +++++-- store/proof/proof.go | 12 +++++------- store/snapshots/chunk.go | 6 +++--- store/snapshots/manager.go | 25 ++++++++++++------------ store/snapshots/store.go | 13 +++++++------ store/storage/pebbledb/db.go | 15 ++++++++------- store/storage/rocksdb/db.go | 14 ++++++++------ store/storage/sqlite/db.go | 11 ++++++----- 11 files changed, 100 insertions(+), 90 deletions(-) rename store/{ => errors}/errors.go (91%) diff --git a/store/db/goleveldb.go b/store/db/goleveldb.go index 22c108a2af1d..667f45eef10f 100644 --- a/store/db/goleveldb.go +++ b/store/db/goleveldb.go @@ -7,7 +7,7 @@ import ( "github.com/spf13/cast" "github.com/syndtr/goleveldb/leveldb" - "github.com/syndtr/goleveldb/leveldb/errors" + dberrors "github.com/syndtr/goleveldb/leveldb/errors" "github.com/syndtr/goleveldb/leveldb/filter" "github.com/syndtr/goleveldb/leveldb/iterator" "github.com/syndtr/goleveldb/leveldb/opt" @@ -15,6 +15,7 @@ import ( corestore "cosmossdk.io/core/store" "cosmossdk.io/store/v2" + "cosmossdk.io/store/v2/errors" ) // GoLevelDB implements RawDB using github.com/syndtr/goleveldb/leveldb. @@ -54,11 +55,11 @@ func NewGoLevelDBWithOpts(name, dir string, o *opt.Options) (*GoLevelDB, error) // Get implements RawDB. func (db *GoLevelDB) Get(key []byte) ([]byte, error) { if len(key) == 0 { - return nil, store.ErrKeyEmpty + return nil, errors.ErrKeyEmpty } res, err := db.db.Get(key, nil) if err != nil { - if err == errors.ErrNotFound { + if err == dberrors.ErrNotFound { return nil, nil } return nil, err @@ -78,10 +79,10 @@ func (db *GoLevelDB) Has(key []byte) (bool, error) { // Set implements RawDB. func (db *GoLevelDB) Set(key, value []byte) error { if len(key) == 0 { - return store.ErrKeyEmpty + return errors.ErrKeyEmpty } if value == nil { - return store.ErrValueNil + return errors.ErrValueNil } if err := db.db.Put(key, value, nil); err != nil { return err @@ -92,10 +93,10 @@ func (db *GoLevelDB) Set(key, value []byte) error { // SetSync implements RawDB. func (db *GoLevelDB) SetSync(key, value []byte) error { if len(key) == 0 { - return store.ErrKeyEmpty + return errors.ErrKeyEmpty } if value == nil { - return store.ErrValueNil + return errors.ErrValueNil } if err := db.db.Put(key, value, &opt.WriteOptions{Sync: true}); err != nil { return err @@ -106,7 +107,7 @@ func (db *GoLevelDB) SetSync(key, value []byte) error { // Delete implements RawDB. func (db *GoLevelDB) Delete(key []byte) error { if len(key) == 0 { - return store.ErrKeyEmpty + return errors.ErrKeyEmpty } if err := db.db.Delete(key, nil); err != nil { return err @@ -117,7 +118,7 @@ func (db *GoLevelDB) Delete(key []byte) error { // DeleteSync implements RawDB. func (db *GoLevelDB) DeleteSync(key []byte) error { if len(key) == 0 { - return store.ErrKeyEmpty + return errors.ErrKeyEmpty } err := db.db.Delete(key, &opt.WriteOptions{Sync: true}) if err != nil { @@ -195,7 +196,7 @@ func (db *GoLevelDB) NewBatchWithSize(size int) store.RawBatch { // Iterator implements RawDB. func (db *GoLevelDB) Iterator(start, end []byte) (corestore.Iterator, error) { if (start != nil && len(start) == 0) || (end != nil && len(end) == 0) { - return nil, store.ErrKeyEmpty + return nil, errors.ErrKeyEmpty } itr := db.db.NewIterator(&util.Range{Start: start, Limit: end}, nil) return newGoLevelDBIterator(itr, start, end, false), nil @@ -204,7 +205,7 @@ func (db *GoLevelDB) Iterator(start, end []byte) (corestore.Iterator, error) { // ReverseIterator implements RawDB. func (db *GoLevelDB) ReverseIterator(start, end []byte) (corestore.Iterator, error) { if (start != nil && len(start) == 0) || (end != nil && len(end) == 0) { - return nil, store.ErrKeyEmpty + return nil, errors.ErrKeyEmpty } itr := db.db.NewIterator(&util.Range{Start: start, Limit: end}, nil) return newGoLevelDBIterator(itr, start, end, true), nil @@ -363,13 +364,13 @@ func newGoLevelDBBatchWithSize(db *GoLevelDB, size int) *goLevelDBBatch { // Set implements RawBatch. func (b *goLevelDBBatch) Set(key, value []byte) error { if len(key) == 0 { - return store.ErrKeyEmpty + return errors.ErrKeyEmpty } if value == nil { - return store.ErrValueNil + return errors.ErrValueNil } if b.batch == nil { - return store.ErrBatchClosed + return errors.ErrBatchClosed } b.batch.Put(key, value) return nil @@ -378,10 +379,10 @@ func (b *goLevelDBBatch) Set(key, value []byte) error { // Delete implements RawBatch. func (b *goLevelDBBatch) Delete(key []byte) error { if len(key) == 0 { - return store.ErrKeyEmpty + return errors.ErrKeyEmpty } if b.batch == nil { - return store.ErrBatchClosed + return errors.ErrBatchClosed } b.batch.Delete(key) return nil @@ -399,7 +400,7 @@ func (b *goLevelDBBatch) WriteSync() error { func (b *goLevelDBBatch) write(sync bool) error { if b.batch == nil { - return store.ErrBatchClosed + return errors.ErrBatchClosed } err := b.db.db.Write(b.batch, &opt.WriteOptions{Sync: sync}) if err != nil { @@ -421,7 +422,7 @@ func (b *goLevelDBBatch) Close() error { // GetByteSize implements RawBatch func (b *goLevelDBBatch) GetByteSize() (int, error) { if b.batch == nil { - return 0, store.ErrBatchClosed + return 0, errors.ErrBatchClosed } return len(b.batch.Dump()), nil } diff --git a/store/db/memdb.go b/store/db/memdb.go index a7f9e4899651..153cc2727ac2 100644 --- a/store/db/memdb.go +++ b/store/db/memdb.go @@ -10,6 +10,7 @@ import ( corestore "cosmossdk.io/core/store" "cosmossdk.io/store/v2" + "cosmossdk.io/store/v2/errors" ) const ( @@ -64,7 +65,7 @@ func NewMemDB() *MemDB { // Get implements DB. func (db *MemDB) Get(key []byte) ([]byte, error) { if len(key) == 0 { - return nil, store.ErrKeyEmpty + return nil, errors.ErrKeyEmpty } db.mtx.RLock() defer db.mtx.RUnlock() @@ -79,7 +80,7 @@ func (db *MemDB) Get(key []byte) ([]byte, error) { // Has implements DB. func (db *MemDB) Has(key []byte) (bool, error) { if len(key) == 0 { - return false, store.ErrKeyEmpty + return false, errors.ErrKeyEmpty } db.mtx.RLock() defer db.mtx.RUnlock() @@ -90,10 +91,10 @@ func (db *MemDB) Has(key []byte) (bool, error) { // Set implements DB. func (db *MemDB) Set(key, value []byte) error { if len(key) == 0 { - return store.ErrKeyEmpty + return errors.ErrKeyEmpty } if value == nil { - return store.ErrValueNil + return errors.ErrValueNil } db.mtx.Lock() defer db.mtx.Unlock() @@ -115,7 +116,7 @@ func (db *MemDB) SetSync(key, value []byte) error { // Delete implements DB. func (db *MemDB) Delete(key []byte) error { if len(key) == 0 { - return store.ErrKeyEmpty + return errors.ErrKeyEmpty } db.mtx.Lock() defer db.mtx.Unlock() @@ -181,7 +182,7 @@ func (db *MemDB) NewBatchWithSize(size int) store.RawBatch { // Takes out a read-lock on the database until the iterator is closed. func (db *MemDB) Iterator(start, end []byte) (corestore.Iterator, error) { if (start != nil && len(start) == 0) || (end != nil && len(end) == 0) { - return nil, store.ErrKeyEmpty + return nil, errors.ErrKeyEmpty } return newMemDBIterator(db, start, end, false), nil } @@ -190,7 +191,7 @@ func (db *MemDB) Iterator(start, end []byte) (corestore.Iterator, error) { // Takes out a read-lock on the database until the iterator is closed. func (db *MemDB) ReverseIterator(start, end []byte) (corestore.Iterator, error) { if (start != nil && len(start) == 0) || (end != nil && len(end) == 0) { - return nil, store.ErrKeyEmpty + return nil, errors.ErrKeyEmpty } return newMemDBIterator(db, start, end, true), nil } @@ -198,7 +199,7 @@ func (db *MemDB) ReverseIterator(start, end []byte) (corestore.Iterator, error) // IteratorNoMtx makes an iterator with no mutex. func (db *MemDB) IteratorNoMtx(start, end []byte) (corestore.Iterator, error) { if (start != nil && len(start) == 0) || (end != nil && len(end) == 0) { - return nil, store.ErrKeyEmpty + return nil, errors.ErrKeyEmpty } return newMemDBIteratorMtxChoice(db, start, end, false, false), nil } @@ -206,7 +207,7 @@ func (db *MemDB) IteratorNoMtx(start, end []byte) (corestore.Iterator, error) { // ReverseIteratorNoMtx makes an iterator with no mutex. func (db *MemDB) ReverseIteratorNoMtx(start, end []byte) (corestore.Iterator, error) { if (start != nil && len(start) == 0) || (end != nil && len(end) == 0) { - return nil, store.ErrKeyEmpty + return nil, errors.ErrKeyEmpty } return newMemDBIteratorMtxChoice(db, start, end, true, false), nil } @@ -395,13 +396,13 @@ func newMemDBBatch(db *MemDB) *memDBBatch { // Set implements Batch. func (b *memDBBatch) Set(key, value []byte) error { if len(key) == 0 { - return store.ErrKeyEmpty + return errors.ErrKeyEmpty } if value == nil { - return store.ErrValueNil + return errors.ErrValueNil } if b.ops == nil { - return store.ErrBatchClosed + return errors.ErrBatchClosed } b.size += len(key) + len(value) b.ops = append(b.ops, operation{opTypeSet, key, value}) @@ -411,10 +412,10 @@ func (b *memDBBatch) Set(key, value []byte) error { // Delete implements Batch. func (b *memDBBatch) Delete(key []byte) error { if len(key) == 0 { - return store.ErrKeyEmpty + return errors.ErrKeyEmpty } if b.ops == nil { - return store.ErrBatchClosed + return errors.ErrBatchClosed } b.size += len(key) b.ops = append(b.ops, operation{opTypeDelete, key, nil}) @@ -424,7 +425,7 @@ func (b *memDBBatch) Delete(key []byte) error { // Write implements Batch. func (b *memDBBatch) Write() error { if b.ops == nil { - return store.ErrBatchClosed + return errors.ErrBatchClosed } b.db.mtx.Lock() defer b.db.mtx.Unlock() @@ -459,7 +460,7 @@ func (b *memDBBatch) Close() error { // GetByteSize implements Batch func (b *memDBBatch) GetByteSize() (int, error) { if b.ops == nil { - return 0, store.ErrBatchClosed + return 0, errors.ErrBatchClosed } return b.size, nil } diff --git a/store/db/prefixdb.go b/store/db/prefixdb.go index c851ad311bfd..7ead2aa69920 100644 --- a/store/db/prefixdb.go +++ b/store/db/prefixdb.go @@ -7,6 +7,7 @@ import ( corestore "cosmossdk.io/core/store" "cosmossdk.io/store/v2" + "cosmossdk.io/store/v2/errors" ) // PrefixDB wraps a namespace of another database as a logical database. @@ -29,7 +30,7 @@ func NewPrefixDB(db store.RawDB, prefix []byte) *PrefixDB { // Get implements RawDB. func (pdb *PrefixDB) Get(key []byte) ([]byte, error) { if len(key) == 0 { - return nil, store.ErrKeyEmpty + return nil, errors.ErrKeyEmpty } pkey := pdb.prefixed(key) @@ -43,7 +44,7 @@ func (pdb *PrefixDB) Get(key []byte) ([]byte, error) { // Has implements RawDB. func (pdb *PrefixDB) Has(key []byte) (bool, error) { if len(key) == 0 { - return false, store.ErrKeyEmpty + return false, errors.ErrKeyEmpty } ok, err := pdb.db.Has(pdb.prefixed(key)) @@ -57,7 +58,7 @@ func (pdb *PrefixDB) Has(key []byte) (bool, error) { // Iterator implements RawDB. func (pdb *PrefixDB) Iterator(start, end []byte) (corestore.Iterator, error) { if (start != nil && len(start) == 0) || (end != nil && len(end) == 0) { - return nil, store.ErrKeyEmpty + return nil, errors.ErrKeyEmpty } var pstart, pend []byte @@ -78,7 +79,7 @@ func (pdb *PrefixDB) Iterator(start, end []byte) (corestore.Iterator, error) { // ReverseIterator implements RawDB. func (pdb *PrefixDB) ReverseIterator(start, end []byte) (corestore.Iterator, error) { if (start != nil && len(start) == 0) || (end != nil && len(end) == 0) { - return nil, store.ErrKeyEmpty + return nil, errors.ErrKeyEmpty } var pstart, pend []byte @@ -277,10 +278,10 @@ func newPrefixBatch(prefix []byte, source store.RawBatch) prefixDBBatch { // Set implements RawBatch. func (pb prefixDBBatch) Set(key, value []byte) error { if len(key) == 0 { - return store.ErrKeyEmpty + return errors.ErrKeyEmpty } if value == nil { - return store.ErrValueNil + return errors.ErrValueNil } pkey := append(cp(pb.prefix), key...) return pb.source.Set(pkey, value) @@ -289,7 +290,7 @@ func (pb prefixDBBatch) Set(key, value []byte) error { // Delete implements RawBatch. func (pb prefixDBBatch) Delete(key []byte) error { if len(key) == 0 { - return store.ErrKeyEmpty + return errors.ErrKeyEmpty } pkey := append(cp(pb.prefix), key...) return pb.source.Delete(pkey) @@ -313,7 +314,7 @@ func (pb prefixDBBatch) Close() error { // GetByteSize implements RawBatch func (pb prefixDBBatch) GetByteSize() (int, error) { if pb.source == nil { - return 0, store.ErrBatchClosed + return 0, errors.ErrBatchClosed } return pb.source.GetByteSize() } diff --git a/store/errors.go b/store/errors/errors.go similarity index 91% rename from store/errors.go rename to store/errors/errors.go index fe6fd386993c..4b31fa8a5eea 100644 --- a/store/errors.go +++ b/store/errors/errors.go @@ -1,4 +1,4 @@ -package store +package errors import ( "fmt" @@ -7,9 +7,12 @@ import ( ) // StoreCodespace defines the store package's unique error code space. -const StoreCodespace = "store" +const StoreCodespace = "storev2" var ( + // ErrInvalidProof is returned when a proof is invalid + ErrInvalidProof = errors.Register(StoreCodespace, 2, "invalid proof") + // ErrTxDecode is returned if we cannot parse a transaction ErrTxDecode = errors.Register(StoreCodespace, 3, "tx parse error") diff --git a/store/proof/proof.go b/store/proof/proof.go index c93ceb5b2f7e..120cf3d2a13b 100644 --- a/store/proof/proof.go +++ b/store/proof/proof.go @@ -6,11 +6,9 @@ import ( ics23 "github.com/cosmos/ics23/go" "cosmossdk.io/errors" + storeerrors "cosmossdk.io/store/v2/errors" ) -// ErrInvalidProof is returned when a proof is invalid -var ErrInvalidProof = errors.Register("store", 2, "invalid proof") - // Proof operation types const ( ProofOpIAVLCommitment = "ics23:iavl" @@ -100,7 +98,7 @@ func (op CommitmentOp) Run(args [][]byte) ([][]byte, error) { // calculate root from proof root, err := op.Proof.Calculate() if err != nil { - return nil, errors.Wrapf(ErrInvalidProof, "could not calculate root for proof: %v", err) + return nil, errors.Wrapf(storeerrors.ErrInvalidProof, "could not calculate root for proof: %v", err) } // Only support an existence proof or nonexistence proof (batch proofs currently unsupported) @@ -109,17 +107,17 @@ func (op CommitmentOp) Run(args [][]byte) ([][]byte, error) { // Args are nil, so we verify the absence of the key. absent := ics23.VerifyNonMembership(op.Spec, root, op.Proof, op.Key) if !absent { - return nil, errors.Wrapf(ErrInvalidProof, "proof did not verify absence of key: %s", string(op.Key)) + return nil, errors.Wrapf(storeerrors.ErrInvalidProof, "proof did not verify absence of key: %s", string(op.Key)) } case 1: // Args is length 1, verify existence of key with value args[0] if !ics23.VerifyMembership(op.Spec, root, op.Proof, op.Key, args[0]) { - return nil, errors.Wrapf(ErrInvalidProof, "proof did not verify existence of key %s with given value %x", op.Key, args[0]) + return nil, errors.Wrapf(storeerrors.ErrInvalidProof, "proof did not verify existence of key %s with given value %x", op.Key, args[0]) } default: - return nil, errors.Wrapf(ErrInvalidProof, "args must be length 0 or 1, got: %d", len(args)) + return nil, errors.Wrapf(storeerrors.ErrInvalidProof, "args must be length 0 or 1, got: %d", len(args)) } return [][]byte{root}, nil diff --git a/store/snapshots/chunk.go b/store/snapshots/chunk.go index 874bf966871b..aab00a3e5d28 100644 --- a/store/snapshots/chunk.go +++ b/store/snapshots/chunk.go @@ -5,7 +5,7 @@ import ( "math" "cosmossdk.io/errors" - "cosmossdk.io/store/v2" + storeerrors "cosmossdk.io/store/v2/errors" snapshotstypes "cosmossdk.io/store/v2/snapshots/types" ) @@ -72,7 +72,7 @@ func (w *ChunkWriter) CloseWithError(err error) { // Write implements io.Writer. func (w *ChunkWriter) Write(data []byte) (int, error) { if w.closed { - return 0, errors.Wrap(store.ErrLogic, "cannot write to closed ChunkWriter") + return 0, errors.Wrap(storeerrors.ErrLogic, "cannot write to closed ChunkWriter") } nTotal := 0 for len(data) > 0 { @@ -174,7 +174,7 @@ func ValidRestoreHeight(format uint32, height uint64) error { } if height == 0 { - return errors.Wrap(store.ErrLogic, "cannot restore snapshot at height 0") + return errors.Wrap(storeerrors.ErrLogic, "cannot restore snapshot at height 0") } if height > uint64(math.MaxInt64) { return errors.Wrapf(snapshotstypes.ErrInvalidMetadata, diff --git a/store/snapshots/manager.go b/store/snapshots/manager.go index b713da7134f4..c4a4bead3633 100644 --- a/store/snapshots/manager.go +++ b/store/snapshots/manager.go @@ -14,6 +14,7 @@ import ( errorsmod "cosmossdk.io/errors" "cosmossdk.io/log" "cosmossdk.io/store/v2" + storeerrors "cosmossdk.io/store/v2/errors" "cosmossdk.io/store/v2/snapshots/types" ) @@ -117,10 +118,10 @@ func (m *Manager) begin(op operation) error { // beginLocked begins an operation while already holding the mutex. func (m *Manager) beginLocked(op operation) error { if op == opNone { - return errorsmod.Wrap(store.ErrLogic, "can't begin a none operation") + return errorsmod.Wrap(storeerrors.ErrLogic, "can't begin a none operation") } if m.operation != opNone { - return errorsmod.Wrapf(store.ErrConflict, "a %v operation is in progress", m.operation) + return errorsmod.Wrapf(storeerrors.ErrConflict, "a %v operation is in progress", m.operation) } m.operation = op return nil @@ -166,7 +167,7 @@ func (m *Manager) GetSnapshotBlockRetentionHeights() int64 { // Create creates a snapshot and returns its metadata. func (m *Manager) Create(height uint64) (*types.Snapshot, error) { if m == nil { - return nil, errorsmod.Wrap(store.ErrLogic, "Snapshot Manager is nil") + return nil, errorsmod.Wrap(storeerrors.ErrLogic, "Snapshot Manager is nil") } err := m.begin(opSnapshot) @@ -180,7 +181,7 @@ func (m *Manager) Create(height uint64) (*types.Snapshot, error) { return nil, errorsmod.Wrap(err, "failed to examine latest snapshot") } if latest != nil && latest.Height >= height { - return nil, errorsmod.Wrapf(store.ErrConflict, + return nil, errorsmod.Wrapf(storeerrors.ErrConflict, "a more recent snapshot already exists at height %v", latest.Height) } @@ -237,7 +238,7 @@ func (m *Manager) createSnapshot(height uint64, ch chan<- io.ReadCloser) { // It is used to migrate the state from the original store to the store/v2. func (m *Manager) CreateMigration(height uint64, protoWriter WriteCloser) error { if m == nil { - return errorsmod.Wrap(store.ErrLogic, "Snapshot Manager is nil") + return errorsmod.Wrap(storeerrors.ErrLogic, "Snapshot Manager is nil") } err := m.begin(opSnapshot) @@ -306,7 +307,7 @@ func (m *Manager) Restore(snapshot types.Snapshot) error { return errorsmod.Wrapf(types.ErrUnknownFormat, "snapshot format %v", snapshot.Format) } if snapshot.Height == 0 { - return errorsmod.Wrap(store.ErrLogic, "cannot restore snapshot at height 0") + return errorsmod.Wrap(storeerrors.ErrLogic, "cannot restore snapshot at height 0") } if snapshot.Height > uint64(math.MaxInt64) { return errorsmod.Wrapf(types.ErrInvalidMetadata, @@ -415,11 +416,11 @@ func (m *Manager) doRestoreSnapshot(snapshot types.Snapshot, chChunks <-chan io. } metadata := nextItem.GetExtension() if metadata == nil { - return errorsmod.Wrapf(store.ErrLogic, "unknown snapshot item %T", nextItem.Item) + return errorsmod.Wrapf(storeerrors.ErrLogic, "unknown snapshot item %T", nextItem.Item) } extension, ok := m.extensions[metadata.Name] if !ok { - return errorsmod.Wrapf(store.ErrLogic, "unknown extension snapshotter %s", metadata.Name) + return errorsmod.Wrapf(storeerrors.ErrLogic, "unknown extension snapshotter %s", metadata.Name) } if !IsFormatSupported(extension, metadata.Format) { return errorsmod.Wrapf(types.ErrUnknownFormat, "format %v for extension %s", metadata.Format, metadata.Name) @@ -448,11 +449,11 @@ func (m *Manager) RestoreChunk(chunk []byte) (bool, error) { m.mtx.Lock() defer m.mtx.Unlock() if m.operation != opRestore { - return false, errorsmod.Wrap(store.ErrLogic, "no restore operation in progress") + return false, errorsmod.Wrap(storeerrors.ErrLogic, "no restore operation in progress") } if int(m.restoreChunkIndex) >= len(m.restoreSnapshot.Metadata.ChunkHashes) { - return false, errorsmod.Wrap(store.ErrLogic, "received unexpected chunk") + return false, errorsmod.Wrap(storeerrors.ErrLogic, "received unexpected chunk") } // Check if any errors have occurred yet. @@ -462,7 +463,7 @@ func (m *Manager) RestoreChunk(chunk []byte) (bool, error) { if done.err != nil { return false, done.err } - return false, errorsmod.Wrap(store.ErrLogic, "restore ended unexpectedly") + return false, errorsmod.Wrap(storeerrors.ErrLogic, "restore ended unexpectedly") default: } @@ -498,7 +499,7 @@ func (m *Manager) RestoreChunk(chunk []byte) (bool, error) { return false, done.err } if !done.complete { - return false, errorsmod.Wrap(store.ErrLogic, "restore ended prematurely") + return false, errorsmod.Wrap(storeerrors.ErrLogic, "restore ended prematurely") } return true, nil diff --git a/store/snapshots/store.go b/store/snapshots/store.go index c7fef66bb424..35d0d6a9f609 100644 --- a/store/snapshots/store.go +++ b/store/snapshots/store.go @@ -18,6 +18,7 @@ import ( "cosmossdk.io/errors" "cosmossdk.io/store/v2" + storeerrors "cosmossdk.io/store/v2/errors" "cosmossdk.io/store/v2/snapshots/types" ) @@ -37,7 +38,7 @@ type Store struct { // NewStore creates a new snapshot store. func NewStore(dir string) (*Store, error) { if dir == "" { - return nil, errors.Wrap(store.ErrLogic, "snapshot directory not given") + return nil, errors.Wrap(storeerrors.ErrLogic, "snapshot directory not given") } err := os.MkdirAll(dir, 0o755) if err != nil { @@ -60,7 +61,7 @@ func (s *Store) Delete(height uint64, format uint32) error { saving := s.saving[height] s.mtx.Unlock() if saving { - return errors.Wrapf(store.ErrConflict, + return errors.Wrapf(storeerrors.ErrConflict, "snapshot for height %v format %v is currently being saved", height, format) } if err := os.RemoveAll(s.pathSnapshot(height, format)); err != nil { @@ -248,7 +249,7 @@ func (s *Store) Save( ) (*types.Snapshot, error) { defer DrainChunks(chunks) if height == 0 { - return nil, errors.Wrap(store.ErrLogic, "snapshot height cannot be 0") + return nil, errors.Wrap(storeerrors.ErrLogic, "snapshot height cannot be 0") } s.mtx.Lock() @@ -256,7 +257,7 @@ func (s *Store) Save( s.saving[height] = true s.mtx.Unlock() if saving { - return nil, errors.Wrapf(store.ErrConflict, + return nil, errors.Wrapf(storeerrors.ErrConflict, "a snapshot for height %v is already being saved", height) } defer func() { @@ -399,10 +400,10 @@ func (s *Store) validateMetadataPath(path string) error { // legacyV1DecodeKey decodes a legacy snapshot key used in a raw kv store. func legacyV1DecodeKey(k []byte) (uint64, uint32, error) { if len(k) != 13 { - return 0, 0, errors.Wrapf(store.ErrLogic, "invalid snapshot key with length %v", len(k)) + return 0, 0, errors.Wrapf(storeerrors.ErrLogic, "invalid snapshot key with length %v", len(k)) } if k[0] != keyPrefixSnapshot { - return 0, 0, errors.Wrapf(store.ErrLogic, "invalid snapshot key prefix %x", k[0]) + return 0, 0, errors.Wrapf(storeerrors.ErrLogic, "invalid snapshot key prefix %x", k[0]) } height := binary.BigEndian.Uint64(k[1:9]) diff --git a/store/storage/pebbledb/db.go b/store/storage/pebbledb/db.go index 4eff6ff7ff2f..8d502d46cf27 100644 --- a/store/storage/pebbledb/db.go +++ b/store/storage/pebbledb/db.go @@ -12,6 +12,7 @@ import ( corestore "cosmossdk.io/core/store" "cosmossdk.io/store/v2" + storeerrors "cosmossdk.io/store/v2/errors" "cosmossdk.io/store/v2/storage" ) @@ -148,12 +149,12 @@ func (db *Database) Has(storeKey string, version uint64, key []byte) (bool, erro func (db *Database) Get(storeKey string, targetVersion uint64, key []byte) ([]byte, error) { if targetVersion < db.earliestVersion { - return nil, store.ErrVersionPruned{EarliestVersion: db.earliestVersion} + return nil, storeerrors.ErrVersionPruned{EarliestVersion: db.earliestVersion} } prefixedVal, err := getMVCCSlice(db.storage, storeKey, key, targetVersion) if err != nil { - if errors.Is(err, store.ErrRecordNotFound) { + if errors.Is(err, storeerrors.ErrRecordNotFound) { return nil, nil } @@ -268,11 +269,11 @@ func (db *Database) Prune(version uint64) error { func (db *Database) Iterator(storeKey string, version uint64, start, end []byte) (corestore.Iterator, error) { if (start != nil && len(start) == 0) || (end != nil && len(end) == 0) { - return nil, store.ErrKeyEmpty + return nil, storeerrors.ErrKeyEmpty } if start != nil && end != nil && bytes.Compare(start, end) > 0 { - return nil, store.ErrStartAfterEnd + return nil, storeerrors.ErrStartAfterEnd } lowerBound := MVCCEncode(prependStoreKey(storeKey, start), 0) @@ -292,11 +293,11 @@ func (db *Database) Iterator(storeKey string, version uint64, start, end []byte) func (db *Database) ReverseIterator(storeKey string, version uint64, start, end []byte) (corestore.Iterator, error) { if (start != nil && len(start) == 0) || (end != nil && len(end) == 0) { - return nil, store.ErrKeyEmpty + return nil, storeerrors.ErrKeyEmpty } if start != nil && end != nil && bytes.Compare(start, end) > 0 { - return nil, store.ErrStartAfterEnd + return nil, storeerrors.ErrStartAfterEnd } lowerBound := MVCCEncode(prependStoreKey(storeKey, start), 0) @@ -378,7 +379,7 @@ func getMVCCSlice(db *pebble.DB, storeKey string, key []byte, version uint64) ([ defer itr.Close() if !itr.Last() { - return nil, store.ErrRecordNotFound + return nil, storeerrors.ErrRecordNotFound } _, vBz, ok := SplitMVCCKey(itr.Key()) diff --git a/store/storage/rocksdb/db.go b/store/storage/rocksdb/db.go index 440d26ccccce..32ece55de926 100644 --- a/store/storage/rocksdb/db.go +++ b/store/storage/rocksdb/db.go @@ -8,11 +8,13 @@ import ( "encoding/binary" "fmt" - "github.com/linxGnu/grocksdb" "slices" + "github.com/linxGnu/grocksdb" + corestore "cosmossdk.io/core/store" "cosmossdk.io/store/v2" + "cosmossdk.io/store/v2/errors" "cosmossdk.io/store/v2/storage" "cosmossdk.io/store/v2/storage/util" ) @@ -98,7 +100,7 @@ func (db *Database) NewBatch(version uint64) (store.Batch, error) { func (db *Database) getSlice(storeKey string, version uint64, key []byte) (*grocksdb.Slice, error) { if version < db.tsLow { - return nil, store.ErrVersionPruned{EarliestVersion: db.tsLow} + return nil, errors.ErrVersionPruned{EarliestVersion: db.tsLow} } return db.storage.GetCF( @@ -165,11 +167,11 @@ func (db *Database) Prune(version uint64) error { func (db *Database) Iterator(storeKey string, version uint64, start, end []byte) (corestore.Iterator, error) { if (start != nil && len(start) == 0) || (end != nil && len(end) == 0) { - return nil, store.ErrKeyEmpty + return nil, errors.ErrKeyEmpty } if start != nil && end != nil && bytes.Compare(start, end) > 0 { - return nil, store.ErrStartAfterEnd + return nil, errors.ErrStartAfterEnd } prefix := storePrefix(storeKey) @@ -181,11 +183,11 @@ func (db *Database) Iterator(storeKey string, version uint64, start, end []byte) func (db *Database) ReverseIterator(storeKey string, version uint64, start, end []byte) (corestore.Iterator, error) { if (start != nil && len(start) == 0) || (end != nil && len(end) == 0) { - return nil, store.ErrKeyEmpty + return nil, errors.ErrKeyEmpty } if start != nil && end != nil && bytes.Compare(start, end) > 0 { - return nil, store.ErrStartAfterEnd + return nil, errors.ErrStartAfterEnd } prefix := storePrefix(storeKey) diff --git a/store/storage/sqlite/db.go b/store/storage/sqlite/db.go index 5d6b6138f249..c114dc6ef06c 100644 --- a/store/storage/sqlite/db.go +++ b/store/storage/sqlite/db.go @@ -12,6 +12,7 @@ import ( corestore "cosmossdk.io/core/store" "cosmossdk.io/store/v2" + storeerrors "cosmossdk.io/store/v2/errors" "cosmossdk.io/store/v2/storage" ) @@ -138,7 +139,7 @@ func (db *Database) Has(storeKey string, version uint64, key []byte) (bool, erro func (db *Database) Get(storeKey string, targetVersion uint64, key []byte) ([]byte, error) { if targetVersion < db.earliestVersion { - return nil, store.ErrVersionPruned{EarliestVersion: db.earliestVersion} + return nil, storeerrors.ErrVersionPruned{EarliestVersion: db.earliestVersion} } stmt, err := db.storage.Prepare(` @@ -217,11 +218,11 @@ func (db *Database) Prune(version uint64) error { func (db *Database) Iterator(storeKey string, version uint64, start, end []byte) (corestore.Iterator, error) { if (start != nil && len(start) == 0) || (end != nil && len(end) == 0) { - return nil, store.ErrKeyEmpty + return nil, storeerrors.ErrKeyEmpty } if start != nil && end != nil && bytes.Compare(start, end) > 0 { - return nil, store.ErrStartAfterEnd + return nil, storeerrors.ErrStartAfterEnd } return newIterator(db, storeKey, version, start, end, false) @@ -229,11 +230,11 @@ func (db *Database) Iterator(storeKey string, version uint64, start, end []byte) func (db *Database) ReverseIterator(storeKey string, version uint64, start, end []byte) (corestore.Iterator, error) { if (start != nil && len(start) == 0) || (end != nil && len(end) == 0) { - return nil, store.ErrKeyEmpty + return nil, storeerrors.ErrKeyEmpty } if start != nil && end != nil && bytes.Compare(start, end) > 0 { - return nil, store.ErrStartAfterEnd + return nil, storeerrors.ErrStartAfterEnd } return newIterator(db, storeKey, version, start, end, true) From fbff6ffe4261716cb15f5f8ee1e76dea4e6b7415 Mon Sep 17 00:00:00 2001 From: Aleksandr Bezobchuk Date: Fri, 8 Mar 2024 13:52:38 -0500 Subject: [PATCH 05/30] refactor(store/v2): remove SDK error registration (#19708) --- store/errors/errors.go | 32 ++++++++++++++------------------ 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/store/errors/errors.go b/store/errors/errors.go index 4b31fa8a5eea..659e6b244ddd 100644 --- a/store/errors/errors.go +++ b/store/errors/errors.go @@ -1,47 +1,43 @@ package errors import ( + "errors" "fmt" - - "cosmossdk.io/errors" ) -// StoreCodespace defines the store package's unique error code space. -const StoreCodespace = "storev2" - var ( // ErrInvalidProof is returned when a proof is invalid - ErrInvalidProof = errors.Register(StoreCodespace, 2, "invalid proof") + ErrInvalidProof = errors.New("invalid proof") // ErrTxDecode is returned if we cannot parse a transaction - ErrTxDecode = errors.Register(StoreCodespace, 3, "tx parse error") + ErrTxDecode = errors.New("tx parse error") // ErrUnknownRequest to doc - ErrUnknownRequest = errors.Register(StoreCodespace, 4, "unknown request") + ErrUnknownRequest = errors.New("unknown request") // ErrLogic defines an internal logic error, e.g. an invariant or assertion // that is violated. It is a programmer error, not a user-facing error. - ErrLogic = errors.Register(StoreCodespace, 5, "internal logic error") + ErrLogic = errors.New("internal logic error") // ErrConflict defines a conflict error, e.g. when two goroutines try to access // the same resource and one of them fails. - ErrConflict = errors.Register(StoreCodespace, 6, "conflict") + ErrConflict = errors.New("conflict") // ErrInvalidRequest defines an ABCI typed error where the request contains // invalid data. - ErrInvalidRequest = errors.Register(StoreCodespace, 7, "invalid request") + ErrInvalidRequest = errors.New("invalid request") - ErrClosed = errors.Register(StoreCodespace, 8, "closed") - ErrRecordNotFound = errors.Register(StoreCodespace, 9, "record not found") - ErrUnknownStoreKey = errors.Register(StoreCodespace, 10, "unknown store key") - ErrKeyEmpty = errors.Register(StoreCodespace, 11, "key empty") - ErrStartAfterEnd = errors.Register(StoreCodespace, 12, "start key after end key") + ErrClosed = errors.New("closed") + ErrRecordNotFound = errors.New("record not found") + ErrUnknownStoreKey = errors.New("unknown store key") + ErrKeyEmpty = errors.New("key empty") + ErrStartAfterEnd = errors.New("start key after end key") // ErrBatchClosed is returned when a closed or written batch is used. - ErrBatchClosed = errors.Register(StoreCodespace, 13, "batch has been written or closed") + ErrBatchClosed = errors.New("batch has been written or closed") // ErrValueNil is returned when attempting to set a nil value. - ErrValueNil = errors.Register(StoreCodespace, 14, "value nil") + ErrValueNil = errors.New("value nil") ) // ErrVersionPruned defines an error returned when a version queried is pruned From 8a2035f1e64bbcb9cf313f426624e708af13ac92 Mon Sep 17 00:00:00 2001 From: Marko Date: Fri, 8 Mar 2024 23:22:13 +0100 Subject: [PATCH 06/30] fix: use loop instead of ragel (#19710) --- CHANGELOG.md | 5 +- types/coin.go | 33 +++- types/coin_regex.go | 467 -------------------------------------------- types/coin_regex.rl | 41 ---- types/coin_test.go | 3 + 5 files changed, 36 insertions(+), 513 deletions(-) delete mode 100644 types/coin_regex.go delete mode 100644 types/coin_regex.rl diff --git a/CHANGELOG.md b/CHANGELOG.md index 7b610eb219f0..b042e458585d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -42,7 +42,6 @@ Every module contains its own CHANGELOG.md. Please refer to the module you are i ### Features -* (types) [#19511](https://github.com/cosmos/cosmos-sdk/pull/19511) Replace regex parsing of denom validation to direct matching methods. * (runtime) [#19571](https://github.com/cosmos/cosmos-sdk/pull/19571) Implement `core/router.Service` it in runtime. This service is present in all modules (when using depinject). * (types) [#19164](https://github.com/cosmos/cosmos-sdk/pull/19164) Add a ValueCodec for the math.Uint type that can be used in collections maps. * (types) [#19281](https://github.com/cosmos/cosmos-sdk/pull/19281) Added a new method, `IsGT`, for `types.Coin`. This method is used to check if a `types.Coin` is greater than another `types.Coin`. @@ -142,8 +141,8 @@ Every module contains its own CHANGELOG.md. Please refer to the module you are i * (server) [#18909](https://github.com/cosmos/cosmos-sdk/pull/18909) Remove configuration endpoint on grpc reflection endpoint in favour of auth module bech32prefix endpoint already exposed. * (crypto) [#19541](https://github.com/cosmos/cosmos-sdk/pull/19541) The deprecated `FromTmProtoPublicKey`, `ToTmProtoPublicKey`, `FromTmPubKeyInterface` and `ToTmPubKeyInterface` functions have been removed. Use their replacements (`Cmt` instead of `Tm`) instead. * (types) [#19652](https://github.com/cosmos/cosmos-sdk/pull/19652) - * Moved`types/module.HasRegisterInterfaces` to `cosmossdk.io/core`. - * Moved `RegisterInterfaces` and `RegisterImplementations` from `InterfaceRegistry` to `cosmossdk.io/core/registry.LegacyRegistry` interface. + * Moved`types/module.HasRegisterInterfaces` to `cosmossdk.io/core`. + * Moved `RegisterInterfaces` and `RegisterImplementations` from `InterfaceRegistry` to `cosmossdk.io/core/registry.LegacyRegistry` interface. ### Client Breaking Changes diff --git a/types/coin.go b/types/coin.go index 3f32bc349757..12a05d006cdc 100644 --- a/types/coin.go +++ b/types/coin.go @@ -7,6 +7,7 @@ import ( "regexp" "sort" "strings" + "unicode" "cosmossdk.io/math" ) @@ -865,10 +866,9 @@ func SetCoinDenomRegex(reFn func() string) { func ValidateDenom(denom string) error { if reDnm == nil || reDecCoin == nil { // Convert the string to a byte slice as required by the Ragel-generated function. - denomBytes := []byte(denom) // Call the Ragel-generated function. - if !MatchDenom(denomBytes) { + if !MatchDenom(denom) { return fmt.Errorf("invalid denom: %s", denom) } } else if !reDnm.MatchString(denom) { // If reDnm has been initialized, use it for matching. @@ -878,6 +878,35 @@ func ValidateDenom(denom string) error { return nil } +// isValidRune checks if a given rune is a valid character for a rune. +// It returns true if the rune is a letter, digit, '/', ':', '.', '_', or '-'. +func isValidRune(r rune) bool { + return unicode.IsLetter(r) || unicode.IsDigit(r) || r == '/' || r == ':' || r == '.' || r == '_' || r == '-' +} + +// MatchDenom checks if the given string is a valid denomination. +// A valid denomination must have a length between 3 and 128 characters, +// start with a letter, and only contain valid runes. +func MatchDenom(s string) bool { + length := len(s) + if length < 3 || length > 128 { + return false + } + + firstRune := rune(s[0]) + if !unicode.IsLetter(firstRune) { + return false + } + + for _, r := range s[1:] { + if !isValidRune(r) { + return false + } + } + + return true +} + func mustValidateDenom(denom string) { if err := ValidateDenom(denom); err != nil { panic(err) diff --git a/types/coin_regex.go b/types/coin_regex.go deleted file mode 100644 index 0a0d44f0d7a9..000000000000 --- a/types/coin_regex.go +++ /dev/null @@ -1,467 +0,0 @@ - -//line coin_regex.rl:1 -// `coin_regex.go` is generated by regel using `ragel -Z coin_regex.rl`. -// do not directly edit `coin_regex.go`. -// source: types/coin_regex.rl -// nolint:gocritic,unused,ineffassign - - -// Regex parsing of denoms were as the following -// reDnmString = `[a-zA-Z][a-zA-Z0-9/:._-]{2,127}` -// reDecAmt = `[[:digit:]]+(?:\.[[:digit:]]+)?|\.[[:digit:]]+` -// reSpc = `[[:space:]]*` - -// reDnm = regexp.MustCompile(fmt.Sprintf(`^%s$`, coinDenomRegex())) -// reDecCoin = regexp.MustCompile(fmt.Sprintf(`^(%s)%s(%s)$`, reDecAmt, reSpc, coinDenomRegex())) - -package types - -func MatchDenom(data []byte) bool { - -//line coin_regex.rl:19 - -//line coin_regex.go:24 -var _scanner_actions []byte = []byte{ - 0, 1, 0, -} - -var _scanner_key_offsets []int16 = []int16{ - 0, 0, 4, 11, 18, 25, 32, 39, - 46, 53, 60, 67, 74, 81, 88, 95, - 102, 109, 116, 123, 130, 137, 144, 151, - 158, 165, 172, 179, 186, 193, 200, 207, - 214, 221, 228, 235, 242, 249, 256, 263, - 270, 277, 284, 291, 298, 305, 312, 319, - 326, 333, 340, 347, 354, 361, 368, 375, - 382, 389, 396, 403, 410, 417, 424, 431, - 438, 445, 452, 459, 466, 473, 480, 487, - 494, 501, 508, 515, 522, 529, 536, 543, - 550, 557, 564, 571, 578, 585, 592, 599, - 606, 613, 620, 627, 634, 641, 648, 655, - 662, 669, 676, 683, 690, 697, 704, 711, - 718, 725, 732, 739, 746, 753, 760, 767, - 774, 781, 788, 795, 802, 809, 816, 823, - 830, 837, 844, 851, 858, 865, 872, 879, - 886, 893, -} - -var _scanner_trans_keys []byte = []byte{ - 65, 90, 97, 122, 95, 45, 58, 65, - 90, 97, 122, 95, 45, 58, 65, 90, - 97, 122, 95, 45, 58, 65, 90, 97, - 122, 95, 45, 58, 65, 90, 97, 122, - 95, 45, 58, 65, 90, 97, 122, 95, - 45, 58, 65, 90, 97, 122, 95, 45, - 58, 65, 90, 97, 122, 95, 45, 58, - 65, 90, 97, 122, 95, 45, 58, 65, - 90, 97, 122, 95, 45, 58, 65, 90, - 97, 122, 95, 45, 58, 65, 90, 97, - 122, 95, 45, 58, 65, 90, 97, 122, - 95, 45, 58, 65, 90, 97, 122, 95, - 45, 58, 65, 90, 97, 122, 95, 45, - 58, 65, 90, 97, 122, 95, 45, 58, - 65, 90, 97, 122, 95, 45, 58, 65, - 90, 97, 122, 95, 45, 58, 65, 90, - 97, 122, 95, 45, 58, 65, 90, 97, - 122, 95, 45, 58, 65, 90, 97, 122, - 95, 45, 58, 65, 90, 97, 122, 95, - 45, 58, 65, 90, 97, 122, 95, 45, - 58, 65, 90, 97, 122, 95, 45, 58, - 65, 90, 97, 122, 95, 45, 58, 65, - 90, 97, 122, 95, 45, 58, 65, 90, - 97, 122, 95, 45, 58, 65, 90, 97, - 122, 95, 45, 58, 65, 90, 97, 122, - 95, 45, 58, 65, 90, 97, 122, 95, - 45, 58, 65, 90, 97, 122, 95, 45, - 58, 65, 90, 97, 122, 95, 45, 58, - 65, 90, 97, 122, 95, 45, 58, 65, - 90, 97, 122, 95, 45, 58, 65, 90, - 97, 122, 95, 45, 58, 65, 90, 97, - 122, 95, 45, 58, 65, 90, 97, 122, - 95, 45, 58, 65, 90, 97, 122, 95, - 45, 58, 65, 90, 97, 122, 95, 45, - 58, 65, 90, 97, 122, 95, 45, 58, - 65, 90, 97, 122, 95, 45, 58, 65, - 90, 97, 122, 95, 45, 58, 65, 90, - 97, 122, 95, 45, 58, 65, 90, 97, - 122, 95, 45, 58, 65, 90, 97, 122, - 95, 45, 58, 65, 90, 97, 122, 95, - 45, 58, 65, 90, 97, 122, 95, 45, - 58, 65, 90, 97, 122, 95, 45, 58, - 65, 90, 97, 122, 95, 45, 58, 65, - 90, 97, 122, 95, 45, 58, 65, 90, - 97, 122, 95, 45, 58, 65, 90, 97, - 122, 95, 45, 58, 65, 90, 97, 122, - 95, 45, 58, 65, 90, 97, 122, 95, - 45, 58, 65, 90, 97, 122, 95, 45, - 58, 65, 90, 97, 122, 95, 45, 58, - 65, 90, 97, 122, 95, 45, 58, 65, - 90, 97, 122, 95, 45, 58, 65, 90, - 97, 122, 95, 45, 58, 65, 90, 97, - 122, 95, 45, 58, 65, 90, 97, 122, - 95, 45, 58, 65, 90, 97, 122, 95, - 45, 58, 65, 90, 97, 122, 95, 45, - 58, 65, 90, 97, 122, 95, 45, 58, - 65, 90, 97, 122, 95, 45, 58, 65, - 90, 97, 122, 95, 45, 58, 65, 90, - 97, 122, 95, 45, 58, 65, 90, 97, - 122, 95, 45, 58, 65, 90, 97, 122, - 95, 45, 58, 65, 90, 97, 122, 95, - 45, 58, 65, 90, 97, 122, 95, 45, - 58, 65, 90, 97, 122, 95, 45, 58, - 65, 90, 97, 122, 95, 45, 58, 65, - 90, 97, 122, 95, 45, 58, 65, 90, - 97, 122, 95, 45, 58, 65, 90, 97, - 122, 95, 45, 58, 65, 90, 97, 122, - 95, 45, 58, 65, 90, 97, 122, 95, - 45, 58, 65, 90, 97, 122, 95, 45, - 58, 65, 90, 97, 122, 95, 45, 58, - 65, 90, 97, 122, 95, 45, 58, 65, - 90, 97, 122, 95, 45, 58, 65, 90, - 97, 122, 95, 45, 58, 65, 90, 97, - 122, 95, 45, 58, 65, 90, 97, 122, - 95, 45, 58, 65, 90, 97, 122, 95, - 45, 58, 65, 90, 97, 122, 95, 45, - 58, 65, 90, 97, 122, 95, 45, 58, - 65, 90, 97, 122, 95, 45, 58, 65, - 90, 97, 122, 95, 45, 58, 65, 90, - 97, 122, 95, 45, 58, 65, 90, 97, - 122, 95, 45, 58, 65, 90, 97, 122, - 95, 45, 58, 65, 90, 97, 122, 95, - 45, 58, 65, 90, 97, 122, 95, 45, - 58, 65, 90, 97, 122, 95, 45, 58, - 65, 90, 97, 122, 95, 45, 58, 65, - 90, 97, 122, 95, 45, 58, 65, 90, - 97, 122, 95, 45, 58, 65, 90, 97, - 122, 95, 45, 58, 65, 90, 97, 122, - 95, 45, 58, 65, 90, 97, 122, 95, - 45, 58, 65, 90, 97, 122, 95, 45, - 58, 65, 90, 97, 122, 95, 45, 58, - 65, 90, 97, 122, 95, 45, 58, 65, - 90, 97, 122, 95, 45, 58, 65, 90, - 97, 122, 95, 45, 58, 65, 90, 97, - 122, 95, 45, 58, 65, 90, 97, 122, - 95, 45, 58, 65, 90, 97, 122, 95, - 45, 58, 65, 90, 97, 122, 95, 45, - 58, 65, 90, 97, 122, 95, 45, 58, - 65, 90, 97, 122, 95, 45, 58, 65, - 90, 97, 122, 95, 45, 58, 65, 90, - 97, 122, 95, 45, 58, 65, 90, 97, - 122, 95, 45, 58, 65, 90, 97, 122, - 95, 45, 58, 65, 90, 97, 122, 95, - 45, 58, 65, 90, 97, 122, 95, 45, - 58, 65, 90, 97, 122, 95, 45, 58, - 65, 90, 97, 122, 95, 45, 58, 65, - 90, 97, 122, 95, 45, 58, 65, 90, - 97, 122, 95, 45, 58, 65, 90, 97, - 122, 95, 45, 58, 65, 90, 97, 122, - 95, 45, 58, 65, 90, 97, 122, 95, - 45, 58, 65, 90, 97, 122, 95, 45, - 58, 65, 90, 97, 122, -} - -var _scanner_single_lengths []byte = []byte{ - 0, 0, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 0, -} - -var _scanner_range_lengths []byte = []byte{ - 0, 2, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 0, -} - -var _scanner_index_offsets []int16 = []int16{ - 0, 0, 3, 8, 13, 18, 23, 28, - 33, 38, 43, 48, 53, 58, 63, 68, - 73, 78, 83, 88, 93, 98, 103, 108, - 113, 118, 123, 128, 133, 138, 143, 148, - 153, 158, 163, 168, 173, 178, 183, 188, - 193, 198, 203, 208, 213, 218, 223, 228, - 233, 238, 243, 248, 253, 258, 263, 268, - 273, 278, 283, 288, 293, 298, 303, 308, - 313, 318, 323, 328, 333, 338, 343, 348, - 353, 358, 363, 368, 373, 378, 383, 388, - 393, 398, 403, 408, 413, 418, 423, 428, - 433, 438, 443, 448, 453, 458, 463, 468, - 473, 478, 483, 488, 493, 498, 503, 508, - 513, 518, 523, 528, 533, 538, 543, 548, - 553, 558, 563, 568, 573, 578, 583, 588, - 593, 598, 603, 608, 613, 618, 623, 628, - 633, 638, -} - -var _scanner_indicies []byte = []byte{ - 0, 0, 1, 2, 2, 2, 2, 1, - 3, 3, 3, 3, 1, 4, 4, 4, - 4, 1, 5, 5, 5, 5, 1, 6, - 6, 6, 6, 1, 7, 7, 7, 7, - 1, 8, 8, 8, 8, 1, 9, 9, - 9, 9, 1, 10, 10, 10, 10, 1, - 11, 11, 11, 11, 1, 12, 12, 12, - 12, 1, 13, 13, 13, 13, 1, 14, - 14, 14, 14, 1, 15, 15, 15, 15, - 1, 16, 16, 16, 16, 1, 17, 17, - 17, 17, 1, 18, 18, 18, 18, 1, - 19, 19, 19, 19, 1, 20, 20, 20, - 20, 1, 21, 21, 21, 21, 1, 22, - 22, 22, 22, 1, 23, 23, 23, 23, - 1, 24, 24, 24, 24, 1, 25, 25, - 25, 25, 1, 26, 26, 26, 26, 1, - 27, 27, 27, 27, 1, 28, 28, 28, - 28, 1, 29, 29, 29, 29, 1, 30, - 30, 30, 30, 1, 31, 31, 31, 31, - 1, 32, 32, 32, 32, 1, 33, 33, - 33, 33, 1, 34, 34, 34, 34, 1, - 35, 35, 35, 35, 1, 36, 36, 36, - 36, 1, 37, 37, 37, 37, 1, 38, - 38, 38, 38, 1, 39, 39, 39, 39, - 1, 40, 40, 40, 40, 1, 41, 41, - 41, 41, 1, 42, 42, 42, 42, 1, - 43, 43, 43, 43, 1, 44, 44, 44, - 44, 1, 45, 45, 45, 45, 1, 46, - 46, 46, 46, 1, 47, 47, 47, 47, - 1, 48, 48, 48, 48, 1, 49, 49, - 49, 49, 1, 50, 50, 50, 50, 1, - 51, 51, 51, 51, 1, 52, 52, 52, - 52, 1, 53, 53, 53, 53, 1, 54, - 54, 54, 54, 1, 55, 55, 55, 55, - 1, 56, 56, 56, 56, 1, 57, 57, - 57, 57, 1, 58, 58, 58, 58, 1, - 59, 59, 59, 59, 1, 60, 60, 60, - 60, 1, 61, 61, 61, 61, 1, 62, - 62, 62, 62, 1, 63, 63, 63, 63, - 1, 64, 64, 64, 64, 1, 65, 65, - 65, 65, 1, 66, 66, 66, 66, 1, - 67, 67, 67, 67, 1, 68, 68, 68, - 68, 1, 69, 69, 69, 69, 1, 70, - 70, 70, 70, 1, 71, 71, 71, 71, - 1, 72, 72, 72, 72, 1, 73, 73, - 73, 73, 1, 74, 74, 74, 74, 1, - 75, 75, 75, 75, 1, 76, 76, 76, - 76, 1, 77, 77, 77, 77, 1, 78, - 78, 78, 78, 1, 79, 79, 79, 79, - 1, 80, 80, 80, 80, 1, 81, 81, - 81, 81, 1, 82, 82, 82, 82, 1, - 83, 83, 83, 83, 1, 84, 84, 84, - 84, 1, 85, 85, 85, 85, 1, 86, - 86, 86, 86, 1, 87, 87, 87, 87, - 1, 88, 88, 88, 88, 1, 89, 89, - 89, 89, 1, 90, 90, 90, 90, 1, - 91, 91, 91, 91, 1, 92, 92, 92, - 92, 1, 93, 93, 93, 93, 1, 94, - 94, 94, 94, 1, 95, 95, 95, 95, - 1, 96, 96, 96, 96, 1, 97, 97, - 97, 97, 1, 98, 98, 98, 98, 1, - 99, 99, 99, 99, 1, 100, 100, 100, - 100, 1, 101, 101, 101, 101, 1, 102, - 102, 102, 102, 1, 103, 103, 103, 103, - 1, 104, 104, 104, 104, 1, 105, 105, - 105, 105, 1, 106, 106, 106, 106, 1, - 107, 107, 107, 107, 1, 108, 108, 108, - 108, 1, 109, 109, 109, 109, 1, 110, - 110, 110, 110, 1, 111, 111, 111, 111, - 1, 112, 112, 112, 112, 1, 113, 113, - 113, 113, 1, 114, 114, 114, 114, 1, - 115, 115, 115, 115, 1, 116, 116, 116, - 116, 1, 117, 117, 117, 117, 1, 118, - 118, 118, 118, 1, 119, 119, 119, 119, - 1, 120, 120, 120, 120, 1, 121, 121, - 121, 121, 1, 122, 122, 122, 122, 1, - 123, 123, 123, 123, 1, 124, 124, 124, - 124, 1, 125, 125, 125, 125, 1, 126, - 126, 126, 126, 1, 127, 127, 127, 127, - 1, 128, 128, 128, 128, 1, 1, -} - -var _scanner_trans_targs []byte = []byte{ - 2, 0, 3, 4, 5, 6, 7, 8, - 9, 10, 11, 12, 13, 14, 15, 16, - 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 32, - 33, 34, 35, 36, 37, 38, 39, 40, - 41, 42, 43, 44, 45, 46, 47, 48, - 49, 50, 51, 52, 53, 54, 55, 56, - 57, 58, 59, 60, 61, 62, 63, 64, - 65, 66, 67, 68, 69, 70, 71, 72, - 73, 74, 75, 76, 77, 78, 79, 80, - 81, 82, 83, 84, 85, 86, 87, 88, - 89, 90, 91, 92, 93, 94, 95, 96, - 97, 98, 99, 100, 101, 102, 103, 104, - 105, 106, 107, 108, 109, 110, 111, 112, - 113, 114, 115, 116, 117, 118, 119, 120, - 121, 122, 123, 124, 125, 126, 127, 128, - 129, -} - -var _scanner_trans_actions []byte = []byte{ - 0, 0, 0, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, -} - -const scanner_start int = 1 -const scanner_first_final int = 4 -const scanner_error int = 0 - -const scanner_en_main int = 1 - - -//line coin_regex.rl:20 - - if len(data) < 3 || len(data) > 128 { - return false - } - cs, p, pe, eof := 0, 0, len(data), len(data) - _ = eof - -//line coin_regex.go:362 - { - cs = scanner_start - } - -//line coin_regex.go:367 - { - var _klen int - var _trans int - var _acts int - var _nacts uint - var _keys int - if p == pe { - goto _test_eof - } - if cs == 0 { - goto _out - } -_resume: - _keys = int(_scanner_key_offsets[cs]) - _trans = int(_scanner_index_offsets[cs]) - - _klen = int(_scanner_single_lengths[cs]) - if _klen > 0 { - _lower := int(_keys) - var _mid int - _upper := int(_keys + _klen - 1) - for { - if _upper < _lower { - break - } - - _mid = _lower + ((_upper - _lower) >> 1) - switch { - case data[p] < _scanner_trans_keys[_mid]: - _upper = _mid - 1 - case data[p] > _scanner_trans_keys[_mid]: - _lower = _mid + 1 - default: - _trans += int(_mid - int(_keys)) - goto _match - } - } - _keys += _klen - _trans += _klen - } - - _klen = int(_scanner_range_lengths[cs]) - if _klen > 0 { - _lower := int(_keys) - var _mid int - _upper := int(_keys + (_klen << 1) - 2) - for { - if _upper < _lower { - break - } - - _mid = _lower + (((_upper - _lower) >> 1) & ^1) - switch { - case data[p] < _scanner_trans_keys[_mid]: - _upper = _mid - 2 - case data[p] > _scanner_trans_keys[_mid + 1]: - _lower = _mid + 2 - default: - _trans += int((_mid - int(_keys)) >> 1) - goto _match - } - } - _trans += _klen - } - -_match: - _trans = int(_scanner_indicies[_trans]) - cs = int(_scanner_trans_targs[_trans]) - - if _scanner_trans_actions[_trans] == 0 { - goto _again - } - - _acts = int(_scanner_trans_actions[_trans]) - _nacts = uint(_scanner_actions[_acts]); _acts++ - for ; _nacts > 0; _nacts-- { - _acts++ - switch _scanner_actions[_acts-1] { - case 0: -//line coin_regex.rl:35 - return true -//line coin_regex.go:449 - } - } - -_again: - if cs == 0 { - goto _out - } - p++ - if p != pe { - goto _resume - } - _test_eof: {} - _out: {} - } - -//line coin_regex.rl:39 - - return false -} \ No newline at end of file diff --git a/types/coin_regex.rl b/types/coin_regex.rl deleted file mode 100644 index d7b726fe6914..000000000000 --- a/types/coin_regex.rl +++ /dev/null @@ -1,41 +0,0 @@ -// `coin_regex.go` is generated by regel using `ragel -Z coin_regex.rl`. -// do not directly edit `coin_regex.go`. -// source: types/coin_regex.rl -// nolint:gocritic,unused,ineffassign - - -// Regex parsing of denoms were as the following -// reDnmString = `[a-zA-Z][a-zA-Z0-9/:._-]{2,127}` -// reDecAmt = `[[:digit:]]+(?:\.[[:digit:]]+)?|\.[[:digit:]]+` -// reSpc = `[[:space:]]*` - -// reDnm = regexp.MustCompile(fmt.Sprintf(`^%s$`, coinDenomRegex())) -// reDecCoin = regexp.MustCompile(fmt.Sprintf(`^(%s)%s(%s)$`, reDecAmt, reSpc, coinDenomRegex())) - -package types - -func MatchDenom(data []byte) bool { -%% machine scanner; -%% write data; - - if len(data) < 3 || len(data) > 128 { - return false - } - cs, p, pe, eof := 0, 0, len(data), len(data) - _ = eof - %%{ - # Define character classes - special = '/' | ':' | '.' | '_' | '-'; - alphabetNumber = [a-zA-Z0-9]; - - denom_pattern = [a-zA-Z] (alphabetNumber | special){2,127}; - - - # Combined pattern for matching either a denomination or a decimal amount - main := denom_pattern @{ return true }; - - write init; - write exec; - }%% - return false -} \ No newline at end of file diff --git a/types/coin_test.go b/types/coin_test.go index 5907e45daa80..42fd51768e0a 100644 --- a/types/coin_test.go +++ b/types/coin_test.go @@ -1028,7 +1028,10 @@ func (s *coinTestSuite) TestValidateDenom() { }{ {"", false}, {"stake", true}, + {"stake,", false}, {"me coin", false}, + {"me coin much", false}, + {"not a coin", false}, {"foo:bar", true}, // special characters '/' | ':' | '.' | '_' | '-' are allowed {"atom10", true}, // number in denom is allowed {"transfer/channelToA/uatom", true}, From d4e52069f76fef7caf7510605d487a573bd31940 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 9 Mar 2024 07:33:16 +0000 Subject: [PATCH 07/30] build(deps): Bump protobuf to 1.33.0, x/tx to 0.13.1, grpc to 1.62.1 and prometheus 0.50.0 (#19655) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Julien Robert --- api/go.mod | 6 +++--- api/go.sum | 12 ++++++------ client/v2/go.mod | 13 ++++++------- client/v2/go.sum | 21 ++++++++++++--------- collections/go.mod | 12 ++++++------ collections/go.sum | 24 ++++++++++++------------ core/go.mod | 6 +++--- core/go.sum | 17 ++++++----------- depinject/go.mod | 6 +++--- depinject/go.sum | 16 ++++++---------- errors/go.mod | 6 +++--- errors/go.sum | 17 ++++++----------- go.mod | 13 ++++++------- go.sum | 21 ++++++++++++--------- orm/go.mod | 12 ++++++------ orm/go.sum | 24 ++++++++++++------------ simapp/go.mod | 15 +++++++-------- simapp/go.sum | 25 ++++++++++++++----------- simapp/gomod2nix.toml | 27 +++++++++++++++------------ store/go.mod | 10 +++++----- store/go.sum | 22 ++++++++++------------ tests/go.mod | 15 +++++++-------- tests/go.sum | 25 ++++++++++++++----------- tests/starship/tests/go.mod | 15 +++++++-------- tests/starship/tests/go.sum | 25 ++++++++++++++----------- tools/confix/go.mod | 6 +++--- tools/confix/go.sum | 12 ++++++------ tools/cosmovisor/go.mod | 6 +++--- tools/cosmovisor/go.sum | 12 ++++++------ tools/hubl/go.mod | 6 +++--- tools/hubl/go.sum | 12 ++++++------ x/accounts/go.mod | 13 ++++++------- x/accounts/go.sum | 21 ++++++++++++--------- x/auth/go.mod | 13 ++++++------- x/auth/go.sum | 21 ++++++++++++--------- x/authz/client/cli/tx_test.go | 2 +- x/authz/go.mod | 13 ++++++------- x/authz/go.sum | 21 ++++++++++++--------- x/bank/go.mod | 13 ++++++------- x/bank/go.sum | 21 ++++++++++++--------- x/circuit/go.mod | 13 ++++++------- x/circuit/go.sum | 21 ++++++++++++--------- x/distribution/go.mod | 13 ++++++------- x/distribution/go.sum | 21 ++++++++++++--------- x/evidence/go.mod | 13 ++++++------- x/evidence/go.sum | 21 ++++++++++++--------- x/feegrant/go.mod | 13 ++++++------- x/feegrant/go.sum | 21 ++++++++++++--------- x/gov/client/cli/tx_test.go | 2 +- x/gov/client/cli/util_test.go | 8 ++++---- x/gov/go.mod | 13 ++++++------- x/gov/go.sum | 21 ++++++++++++--------- x/group/go.mod | 13 ++++++------- x/group/go.sum | 21 ++++++++++++--------- x/mint/go.mod | 13 ++++++------- x/mint/go.sum | 21 ++++++++++++--------- x/nft/go.mod | 13 ++++++------- x/nft/go.sum | 21 ++++++++++++--------- x/params/go.mod | 13 ++++++------- x/params/go.sum | 21 ++++++++++++--------- x/protocolpool/go.mod | 13 ++++++------- x/protocolpool/go.sum | 21 ++++++++++++--------- x/slashing/go.mod | 13 ++++++------- x/slashing/go.sum | 21 ++++++++++++--------- x/staking/go.mod | 13 ++++++------- x/staking/go.sum | 21 ++++++++++++--------- x/tx/go.mod | 6 +++--- x/tx/go.sum | 17 ++++++----------- x/upgrade/go.mod | 15 +++++++-------- x/upgrade/go.sum | 25 ++++++++++++++----------- 70 files changed, 552 insertions(+), 526 deletions(-) diff --git a/api/go.mod b/api/go.mod index f924df554916..1467e61a79d8 100644 --- a/api/go.mod +++ b/api/go.mod @@ -7,13 +7,13 @@ require ( github.com/cosmos/cosmos-proto v1.0.0-beta.4 github.com/cosmos/gogoproto v1.4.11 google.golang.org/genproto/googleapis/api v0.0.0-20240205150955-31a09d347014 - google.golang.org/grpc v1.62.0 - google.golang.org/protobuf v1.32.0 + google.golang.org/grpc v1.62.1 + google.golang.org/protobuf v1.33.0 ) require ( buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.32.0-20230509103710-5e5b9fdd0180.1 // indirect - github.com/golang/protobuf v1.5.3 // indirect + github.com/golang/protobuf v1.5.4 // indirect github.com/google/go-cmp v0.6.0 // indirect golang.org/x/exp v0.0.0-20230811145659-89c5cff77bcb // indirect golang.org/x/net v0.21.0 // indirect diff --git a/api/go.sum b/api/go.sum index aa1125c8466e..d211b34578bf 100644 --- a/api/go.sum +++ b/api/go.sum @@ -7,8 +7,8 @@ github.com/cosmos/cosmos-proto v1.0.0-beta.4/go.mod h1:oeB+FyVzG3XrQJbJng0EnV8Vl github.com/cosmos/gogoproto v1.4.11 h1:LZcMHrx4FjUgrqQSWeaGC1v/TeuVFqSLa43CC6aWR2g= github.com/cosmos/gogoproto v1.4.11/go.mod h1:/g39Mh8m17X8Q/GDEs5zYTSNaNnInBSohtaxzQnYq1Y= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= @@ -27,9 +27,9 @@ google.golang.org/genproto/googleapis/api v0.0.0-20240205150955-31a09d347014 h1: google.golang.org/genproto/googleapis/api v0.0.0-20240205150955-31a09d347014/go.mod h1:rbHMSEDyoYX62nRVLOCc4Qt1HbsdytAYoVwgjiOhF3I= google.golang.org/genproto/googleapis/rpc v0.0.0-20240221002015-b0ce06bbee7c h1:NUsgEN92SQQqzfA+YtqYNqYmB3DMMYLlIwUZAQFVFbo= google.golang.org/genproto/googleapis/rpc v0.0.0-20240221002015-b0ce06bbee7c/go.mod h1:H4O17MA/PE9BsGx3w+a+W2VOLLD1Qf7oJneAoU6WktY= -google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= -google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= diff --git a/client/v2/go.mod b/client/v2/go.mod index 0473c4c9320c..4d843e5a66dd 100644 --- a/client/v2/go.mod +++ b/client/v2/go.mod @@ -8,7 +8,7 @@ require ( cosmossdk.io/depinject v1.0.0-alpha.4 cosmossdk.io/x/bank v0.0.0-00010101000000-000000000000 cosmossdk.io/x/gov v0.0.0-20231113122742-912390d5fc4a - cosmossdk.io/x/tx v0.13.0 + cosmossdk.io/x/tx v0.13.1 github.com/chzyer/readline v1.5.1 // indirect github.com/cockroachdb/errors v1.11.1 github.com/cosmos/cosmos-proto v1.0.0-beta.4 @@ -16,8 +16,8 @@ require ( github.com/manifoldco/promptui v0.9.0 // indirect github.com/spf13/cobra v1.8.0 github.com/spf13/pflag v1.0.5 - google.golang.org/grpc v1.62.0 - google.golang.org/protobuf v1.32.0 + google.golang.org/grpc v1.62.1 + google.golang.org/protobuf v1.33.0 gotest.tools/v3 v3.5.1 sigs.k8s.io/yaml v1.4.0 ) @@ -79,7 +79,7 @@ require ( github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/glog v1.2.0 // indirect github.com/golang/mock v1.6.0 // indirect - github.com/golang/protobuf v1.5.3 // indirect + github.com/golang/protobuf v1.5.4 // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/btree v1.1.2 // indirect github.com/google/go-cmp v0.6.0 // indirect @@ -124,7 +124,7 @@ require ( github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/prometheus/client_golang v1.19.0 // indirect github.com/prometheus/client_model v0.6.0 // indirect - github.com/prometheus/common v0.49.0 // indirect + github.com/prometheus/common v0.50.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/rogpeppe/go-internal v1.12.0 // indirect @@ -151,7 +151,7 @@ require ( golang.org/x/crypto v0.21.0 // indirect golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 // indirect golang.org/x/mod v0.15.0 // indirect - golang.org/x/net v0.21.0 // indirect + golang.org/x/net v0.22.0 // indirect golang.org/x/sync v0.6.0 // indirect golang.org/x/sys v0.18.0 // indirect golang.org/x/term v0.18.0 // indirect @@ -186,5 +186,4 @@ replace ( cosmossdk.io/x/protocolpool => ./../../x/protocolpool cosmossdk.io/x/slashing => ./../../x/slashing cosmossdk.io/x/staking => ./../../x/staking - cosmossdk.io/x/tx => ./../../x/tx ) diff --git a/client/v2/go.sum b/client/v2/go.sum index 6fe8a6de5077..e473b86c060c 100644 --- a/client/v2/go.sum +++ b/client/v2/go.sum @@ -14,6 +14,8 @@ cosmossdk.io/math v1.3.0 h1:RC+jryuKeytIiictDslBP9i1fhkVm6ZDmZEoNP316zE= cosmossdk.io/math v1.3.0/go.mod h1:vnRTxewy+M7BtXBNFybkuhSH4WfedVAAnERHgVFhp3k= cosmossdk.io/store v1.0.2 h1:lSg5BTvJBHUDwswNNyeh4K/CbqiHER73VU4nDNb8uk0= cosmossdk.io/store v1.0.2/go.mod h1:EFtENTqVTuWwitGW1VwaBct+yDagk7oG/axBMPH+FXs= +cosmossdk.io/x/tx v0.13.1 h1:Mg+EMp67Pz+NukbJqYxuo8uRp7N/a9uR+oVS9pONtj8= +cosmossdk.io/x/tx v0.13.1/go.mod h1:CBCU6fsRVz23QGFIQBb1DNX2DztJCf3jWyEkHY2nJQ0= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= @@ -302,8 +304,8 @@ github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= @@ -601,8 +603,8 @@ github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt2 github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= -github.com/prometheus/common v0.49.0 h1:ToNTdK4zSnPVJmh698mGFkDor9wBI/iGaJy5dbH1EgI= -github.com/prometheus/common v0.49.0/go.mod h1:Kxm+EULxRbUkjGU6WFsQqo3ORzB4tyKvlWFOE9mB2sE= +github.com/prometheus/common v0.50.0 h1:YSZE6aa9+luNa2da6/Tik0q0A5AbR+U003TItK57CPQ= +github.com/prometheus/common v0.50.0/go.mod h1:wHFBCEVWVmHMUpg7pYcOm2QUR/ocQdYSJVQJKnHc3xQ= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= @@ -805,8 +807,8 @@ golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= -golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= +golang.org/x/net v0.22.0 h1:9sGLhx7iRIHEiX0oAJ3MRZMUCElJgy7Br1nO+AMN3Tc= +golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -957,8 +959,8 @@ google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTp google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= -google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -973,8 +975,9 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/collections/go.mod b/collections/go.mod index d48f5bec5e5e..bc89bc4cecc5 100644 --- a/collections/go.mod +++ b/collections/go.mod @@ -25,7 +25,7 @@ require ( github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/getsentry/sentry-go v0.27.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/protobuf v1.5.3 // indirect + github.com/golang/protobuf v1.5.4 // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/btree v1.1.2 // indirect github.com/klauspost/compress v1.17.7 // indirect @@ -37,17 +37,17 @@ require ( github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_golang v1.19.0 // indirect github.com/prometheus/client_model v0.6.0 // indirect - github.com/prometheus/common v0.49.0 // indirect + github.com/prometheus/common v0.50.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect github.com/rogpeppe/go-internal v1.12.0 // indirect github.com/spf13/cast v1.6.0 // indirect github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 // indirect - golang.org/x/net v0.21.0 // indirect - golang.org/x/sys v0.17.0 // indirect + golang.org/x/net v0.22.0 // indirect + golang.org/x/sys v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240221002015-b0ce06bbee7c // indirect - google.golang.org/grpc v1.62.0 // indirect - google.golang.org/protobuf v1.32.0 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/collections/go.sum b/collections/go.sum index c1946a7079a3..cbf31d88daf8 100644 --- a/collections/go.sum +++ b/collections/go.sum @@ -56,8 +56,8 @@ github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvq github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= @@ -107,8 +107,8 @@ github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7km github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= -github.com/prometheus/common v0.49.0 h1:ToNTdK4zSnPVJmh698mGFkDor9wBI/iGaJy5dbH1EgI= -github.com/prometheus/common v0.49.0/go.mod h1:Kxm+EULxRbUkjGU6WFsQqo3ORzB4tyKvlWFOE9mB2sE= +github.com/prometheus/common v0.50.0 h1:YSZE6aa9+luNa2da6/Tik0q0A5AbR+U003TItK57CPQ= +github.com/prometheus/common v0.50.0/go.mod h1:wHFBCEVWVmHMUpg7pYcOm2QUR/ocQdYSJVQJKnHc3xQ= github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= @@ -141,8 +141,8 @@ golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= -golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= +golang.org/x/net v0.22.0 h1:9sGLhx7iRIHEiX0oAJ3MRZMUCElJgy7Br1nO+AMN3Tc= +golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -166,8 +166,8 @@ golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= -golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -188,8 +188,8 @@ golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= google.golang.org/genproto/googleapis/rpc v0.0.0-20240221002015-b0ce06bbee7c h1:NUsgEN92SQQqzfA+YtqYNqYmB3DMMYLlIwUZAQFVFbo= google.golang.org/genproto/googleapis/rpc v0.0.0-20240221002015-b0ce06bbee7c/go.mod h1:H4O17MA/PE9BsGx3w+a+W2VOLLD1Qf7oJneAoU6WktY= -google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= -google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -198,8 +198,8 @@ google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzi google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= -google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= diff --git a/core/go.mod b/core/go.mod index e5ee7dd85038..3dd081281858 100644 --- a/core/go.mod +++ b/core/go.mod @@ -6,13 +6,13 @@ require ( cosmossdk.io/log v1.3.1 github.com/cosmos/gogoproto v1.4.11 github.com/stretchr/testify v1.9.0 - google.golang.org/grpc v1.62.0 - google.golang.org/protobuf v1.32.0 + google.golang.org/grpc v1.62.1 + google.golang.org/protobuf v1.33.0 ) require ( github.com/davecgh/go-spew v1.1.1 // indirect - github.com/golang/protobuf v1.5.3 // indirect + github.com/golang/protobuf v1.5.4 // indirect github.com/google/go-cmp v0.6.0 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/mattn/go-colorable v0.1.13 // indirect diff --git a/core/go.sum b/core/go.sum index ac3b1a6b9989..d0992068e935 100644 --- a/core/go.sum +++ b/core/go.sum @@ -7,10 +7,8 @@ github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ3 github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= @@ -50,15 +48,12 @@ golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/genproto/googleapis/rpc v0.0.0-20240221002015-b0ce06bbee7c h1:NUsgEN92SQQqzfA+YtqYNqYmB3DMMYLlIwUZAQFVFbo= google.golang.org/genproto/googleapis/rpc v0.0.0-20240221002015-b0ce06bbee7c/go.mod h1:H4O17MA/PE9BsGx3w+a+W2VOLLD1Qf7oJneAoU6WktY= -google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= -google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= -google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= diff --git a/depinject/go.mod b/depinject/go.mod index a4633e707978..d0e49bf080a0 100644 --- a/depinject/go.mod +++ b/depinject/go.mod @@ -8,7 +8,7 @@ require ( github.com/cosmos/cosmos-proto v1.0.0-beta.4 github.com/stretchr/testify v1.9.0 golang.org/x/exp v0.0.0-20230811145659-89c5cff77bcb - google.golang.org/protobuf v1.32.0 + google.golang.org/protobuf v1.33.0 gotest.tools/v3 v3.5.1 sigs.k8s.io/yaml v1.4.0 ) @@ -19,7 +19,7 @@ require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/getsentry/sentry-go v0.23.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/protobuf v1.5.3 // indirect + github.com/golang/protobuf v1.5.4 // indirect github.com/google/go-cmp v0.6.0 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect @@ -30,6 +30,6 @@ require ( golang.org/x/sys v0.17.0 // indirect golang.org/x/text v0.14.0 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240221002015-b0ce06bbee7c // indirect - google.golang.org/grpc v1.62.0 // indirect + google.golang.org/grpc v1.62.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/depinject/go.sum b/depinject/go.sum index 6a8645a1f088..a8103e2c69a0 100644 --- a/depinject/go.sum +++ b/depinject/go.sum @@ -16,10 +16,8 @@ github.com/getsentry/sentry-go v0.23.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= @@ -77,12 +75,10 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/genproto/googleapis/rpc v0.0.0-20240221002015-b0ce06bbee7c h1:NUsgEN92SQQqzfA+YtqYNqYmB3DMMYLlIwUZAQFVFbo= google.golang.org/genproto/googleapis/rpc v0.0.0-20240221002015-b0ce06bbee7c/go.mod h1:H4O17MA/PE9BsGx3w+a+W2VOLLD1Qf7oJneAoU6WktY= -google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= -google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= -google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/errors/go.mod b/errors/go.mod index 8fe23f757f23..3b5938a80445 100644 --- a/errors/go.mod +++ b/errors/go.mod @@ -5,19 +5,19 @@ go 1.20 require ( github.com/pkg/errors v0.9.1 github.com/stretchr/testify v1.9.0 - google.golang.org/grpc v1.62.0 + google.golang.org/grpc v1.62.1 ) require ( github.com/davecgh/go-spew v1.1.1 // indirect - github.com/golang/protobuf v1.5.3 // indirect + github.com/golang/protobuf v1.5.4 // indirect github.com/kr/pretty v0.3.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/rogpeppe/go-internal v1.8.1 // indirect golang.org/x/net v0.21.0 // indirect golang.org/x/sys v0.17.0 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240221002015-b0ce06bbee7c // indirect - google.golang.org/protobuf v1.32.0 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/errors/go.sum b/errors/go.sum index 02d81a8330cd..24e6b1e83195 100644 --- a/errors/go.sum +++ b/errors/go.sum @@ -1,10 +1,8 @@ github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= @@ -29,15 +27,12 @@ golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/genproto/googleapis/rpc v0.0.0-20240221002015-b0ce06bbee7c h1:NUsgEN92SQQqzfA+YtqYNqYmB3DMMYLlIwUZAQFVFbo= google.golang.org/genproto/googleapis/rpc v0.0.0-20240221002015-b0ce06bbee7c/go.mod h1:H4O17MA/PE9BsGx3w+a+W2VOLLD1Qf7oJneAoU6WktY= -google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= -google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= -google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= diff --git a/go.mod b/go.mod index f6a60c02dd80..558d07d39423 100644 --- a/go.mod +++ b/go.mod @@ -14,7 +14,7 @@ require ( cosmossdk.io/x/auth v0.0.0-00010101000000-000000000000 cosmossdk.io/x/bank v0.0.0-00010101000000-000000000000 cosmossdk.io/x/staking v0.0.0-00010101000000-000000000000 - cosmossdk.io/x/tx v0.13.0 + cosmossdk.io/x/tx v0.13.1 github.com/99designs/keyring v1.2.2 github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 github.com/cockroachdb/errors v1.11.1 @@ -28,7 +28,7 @@ require ( github.com/cosmos/ledger-cosmos-go v0.13.3 github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 github.com/golang/mock v1.6.0 - github.com/golang/protobuf v1.5.3 + github.com/golang/protobuf v1.5.4 github.com/google/go-cmp v0.6.0 github.com/google/gofuzz v1.2.0 github.com/gorilla/handlers v1.5.2 @@ -45,7 +45,7 @@ require ( github.com/mdp/qrterminal/v3 v3.2.0 github.com/muesli/termenv v0.15.2 github.com/prometheus/client_golang v1.19.0 - github.com/prometheus/common v0.49.0 + github.com/prometheus/common v0.50.0 github.com/rs/zerolog v1.32.0 github.com/spf13/cast v1.6.0 github.com/spf13/cobra v1.8.0 @@ -58,8 +58,8 @@ require ( golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 golang.org/x/sync v0.6.0 google.golang.org/genproto/googleapis/api v0.0.0-20240205150955-31a09d347014 - google.golang.org/grpc v1.62.0 - google.golang.org/protobuf v1.32.0 + google.golang.org/grpc v1.62.1 + google.golang.org/protobuf v1.33.0 gotest.tools/v3 v3.5.1 pgregory.net/rapid v1.1.0 sigs.k8s.io/yaml v1.4.0 @@ -160,7 +160,7 @@ require ( go.etcd.io/bbolt v1.3.7 // indirect go.uber.org/multierr v1.11.0 // indirect golang.org/x/mod v0.15.0 // indirect - golang.org/x/net v0.21.0 // indirect + golang.org/x/net v0.22.0 // indirect golang.org/x/sys v0.18.0 // indirect golang.org/x/term v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect @@ -187,7 +187,6 @@ replace ( cosmossdk.io/x/auth => ./x/auth cosmossdk.io/x/bank => ./x/bank cosmossdk.io/x/staking => ./x/staking - cosmossdk.io/x/tx => ./x/tx ) // Below are the long-lived replace of the Cosmos SDK diff --git a/go.sum b/go.sum index dcdbce372a92..0cf76f2fc524 100644 --- a/go.sum +++ b/go.sum @@ -14,6 +14,8 @@ cosmossdk.io/math v1.3.0 h1:RC+jryuKeytIiictDslBP9i1fhkVm6ZDmZEoNP316zE= cosmossdk.io/math v1.3.0/go.mod h1:vnRTxewy+M7BtXBNFybkuhSH4WfedVAAnERHgVFhp3k= cosmossdk.io/store v1.0.2 h1:lSg5BTvJBHUDwswNNyeh4K/CbqiHER73VU4nDNb8uk0= cosmossdk.io/store v1.0.2/go.mod h1:EFtENTqVTuWwitGW1VwaBct+yDagk7oG/axBMPH+FXs= +cosmossdk.io/x/tx v0.13.1 h1:Mg+EMp67Pz+NukbJqYxuo8uRp7N/a9uR+oVS9pONtj8= +cosmossdk.io/x/tx v0.13.1/go.mod h1:CBCU6fsRVz23QGFIQBb1DNX2DztJCf3jWyEkHY2nJQ0= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= @@ -297,8 +299,8 @@ github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= @@ -599,8 +601,8 @@ github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt2 github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= -github.com/prometheus/common v0.49.0 h1:ToNTdK4zSnPVJmh698mGFkDor9wBI/iGaJy5dbH1EgI= -github.com/prometheus/common v0.49.0/go.mod h1:Kxm+EULxRbUkjGU6WFsQqo3ORzB4tyKvlWFOE9mB2sE= +github.com/prometheus/common v0.50.0 h1:YSZE6aa9+luNa2da6/Tik0q0A5AbR+U003TItK57CPQ= +github.com/prometheus/common v0.50.0/go.mod h1:wHFBCEVWVmHMUpg7pYcOm2QUR/ocQdYSJVQJKnHc3xQ= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= @@ -820,8 +822,8 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= -golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= -golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= +golang.org/x/net v0.22.0 h1:9sGLhx7iRIHEiX0oAJ3MRZMUCElJgy7Br1nO+AMN3Tc= +golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -983,8 +985,8 @@ google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTp google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= -google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -1000,8 +1002,9 @@ google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/orm/go.mod b/orm/go.mod index 818230ebcb1d..69c05a4f41b8 100644 --- a/orm/go.mod +++ b/orm/go.mod @@ -15,8 +15,8 @@ require ( github.com/regen-network/gocuke v1.1.0 github.com/stretchr/testify v1.9.0 golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 - google.golang.org/grpc v1.62.0 - google.golang.org/protobuf v1.32.0 + google.golang.org/grpc v1.62.1 + google.golang.org/protobuf v1.33.0 gotest.tools/v3 v3.5.1 pgregory.net/rapid v1.1.0 ) @@ -42,7 +42,7 @@ require ( github.com/getsentry/sentry-go v0.27.0 // indirect github.com/gofrs/uuid v4.4.0+incompatible // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/protobuf v1.5.3 // indirect + github.com/golang/protobuf v1.5.4 // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/btree v1.1.2 // indirect github.com/klauspost/compress v1.17.7 // indirect @@ -54,13 +54,13 @@ require ( github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_golang v1.19.0 // indirect github.com/prometheus/client_model v0.6.0 // indirect - github.com/prometheus/common v0.49.0 // indirect + github.com/prometheus/common v0.50.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect github.com/rogpeppe/go-internal v1.12.0 // indirect github.com/spf13/cast v1.6.0 // indirect github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect - golang.org/x/net v0.21.0 // indirect - golang.org/x/sys v0.17.0 // indirect + golang.org/x/net v0.22.0 // indirect + golang.org/x/sys v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20240205150955-31a09d347014 // indirect diff --git a/orm/go.sum b/orm/go.sum index 15ec8faf3350..de6d487869be 100644 --- a/orm/go.sum +++ b/orm/go.sum @@ -75,8 +75,8 @@ github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvq github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= @@ -131,8 +131,8 @@ github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7km github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= -github.com/prometheus/common v0.49.0 h1:ToNTdK4zSnPVJmh698mGFkDor9wBI/iGaJy5dbH1EgI= -github.com/prometheus/common v0.49.0/go.mod h1:Kxm+EULxRbUkjGU6WFsQqo3ORzB4tyKvlWFOE9mB2sE= +github.com/prometheus/common v0.50.0 h1:YSZE6aa9+luNa2da6/Tik0q0A5AbR+U003TItK57CPQ= +github.com/prometheus/common v0.50.0/go.mod h1:wHFBCEVWVmHMUpg7pYcOm2QUR/ocQdYSJVQJKnHc3xQ= github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/regen-network/gocuke v1.1.0 h1:gxlkRTfpR9gJ0mwqQZIpoXHZGx+KPshKQpKE0jtUH5s= @@ -173,8 +173,8 @@ golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96b golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= -golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= +golang.org/x/net v0.22.0 h1:9sGLhx7iRIHEiX0oAJ3MRZMUCElJgy7Br1nO+AMN3Tc= +golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -201,8 +201,8 @@ golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= -golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -228,8 +228,8 @@ google.golang.org/genproto/googleapis/api v0.0.0-20240205150955-31a09d347014 h1: google.golang.org/genproto/googleapis/api v0.0.0-20240205150955-31a09d347014/go.mod h1:rbHMSEDyoYX62nRVLOCc4Qt1HbsdytAYoVwgjiOhF3I= google.golang.org/genproto/googleapis/rpc v0.0.0-20240221002015-b0ce06bbee7c h1:NUsgEN92SQQqzfA+YtqYNqYmB3DMMYLlIwUZAQFVFbo= google.golang.org/genproto/googleapis/rpc v0.0.0-20240221002015-b0ce06bbee7c/go.mod h1:H4O17MA/PE9BsGx3w+a+W2VOLLD1Qf7oJneAoU6WktY= -google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= -google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -238,8 +238,8 @@ google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzi google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= -google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= diff --git a/simapp/go.mod b/simapp/go.mod index 386e1bc23717..78624ae8973f 100644 --- a/simapp/go.mod +++ b/simapp/go.mod @@ -17,7 +17,7 @@ require ( cosmossdk.io/x/feegrant v0.0.0-20230613133644-0a778132a60f cosmossdk.io/x/nft v0.0.0-20230613133644-0a778132a60f cosmossdk.io/x/protocolpool v0.0.0-20230925135524-a1bc045b3190 - cosmossdk.io/x/tx v0.13.0 + cosmossdk.io/x/tx v0.13.1 cosmossdk.io/x/upgrade v0.0.0-20230613133644-0a778132a60f github.com/cometbft/cometbft v0.38.5 github.com/cosmos/cosmos-db v1.0.2 @@ -30,7 +30,7 @@ require ( github.com/spf13/pflag v1.0.5 github.com/spf13/viper v1.18.2 github.com/stretchr/testify v1.9.0 - google.golang.org/protobuf v1.32.0 + google.golang.org/protobuf v1.33.0 ) require cosmossdk.io/x/accounts v0.0.0-20240104091155-b729e981f130 @@ -113,7 +113,7 @@ require ( github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/glog v1.2.0 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect - github.com/golang/protobuf v1.5.3 // indirect + github.com/golang/protobuf v1.5.4 // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/btree v1.1.2 // indirect github.com/google/go-cmp v0.6.0 // indirect @@ -173,7 +173,7 @@ require ( github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/prometheus/client_golang v1.19.0 // indirect github.com/prometheus/client_model v0.6.0 // indirect - github.com/prometheus/common v0.49.0 // indirect + github.com/prometheus/common v0.50.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/rivo/uniseg v0.2.0 // indirect @@ -205,8 +205,8 @@ require ( golang.org/x/crypto v0.21.0 // indirect golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 // indirect golang.org/x/mod v0.15.0 // indirect - golang.org/x/net v0.21.0 // indirect - golang.org/x/oauth2 v0.17.0 // indirect + golang.org/x/net v0.22.0 // indirect + golang.org/x/oauth2 v0.18.0 // indirect golang.org/x/sync v0.6.0 // indirect golang.org/x/sys v0.18.0 // indirect golang.org/x/term v0.18.0 // indirect @@ -218,7 +218,7 @@ require ( google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20240205150955-31a09d347014 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240221002015-b0ce06bbee7c // indirect - google.golang.org/grpc v1.62.0 // indirect + google.golang.org/grpc v1.62.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect gotest.tools/v3 v3.5.1 // indirect @@ -257,7 +257,6 @@ replace ( cosmossdk.io/x/protocolpool => ../x/protocolpool cosmossdk.io/x/slashing => ../x/slashing cosmossdk.io/x/staking => ../x/staking - cosmossdk.io/x/tx => ../x/tx cosmossdk.io/x/upgrade => ../x/upgrade ) diff --git a/simapp/go.sum b/simapp/go.sum index c26abbac81e8..8bfe6c03adeb 100644 --- a/simapp/go.sum +++ b/simapp/go.sum @@ -198,6 +198,8 @@ cosmossdk.io/math v1.3.0 h1:RC+jryuKeytIiictDslBP9i1fhkVm6ZDmZEoNP316zE= cosmossdk.io/math v1.3.0/go.mod h1:vnRTxewy+M7BtXBNFybkuhSH4WfedVAAnERHgVFhp3k= cosmossdk.io/store v1.0.2 h1:lSg5BTvJBHUDwswNNyeh4K/CbqiHER73VU4nDNb8uk0= cosmossdk.io/store v1.0.2/go.mod h1:EFtENTqVTuWwitGW1VwaBct+yDagk7oG/axBMPH+FXs= +cosmossdk.io/x/tx v0.13.1 h1:Mg+EMp67Pz+NukbJqYxuo8uRp7N/a9uR+oVS9pONtj8= +cosmossdk.io/x/tx v0.13.1/go.mod h1:CBCU6fsRVz23QGFIQBb1DNX2DztJCf3jWyEkHY2nJQ0= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= @@ -535,8 +537,8 @@ github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= @@ -908,8 +910,8 @@ github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt2 github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= -github.com/prometheus/common v0.49.0 h1:ToNTdK4zSnPVJmh698mGFkDor9wBI/iGaJy5dbH1EgI= -github.com/prometheus/common v0.49.0/go.mod h1:Kxm+EULxRbUkjGU6WFsQqo3ORzB4tyKvlWFOE9mB2sE= +github.com/prometheus/common v0.50.0 h1:YSZE6aa9+luNa2da6/Tik0q0A5AbR+U003TItK57CPQ= +github.com/prometheus/common v0.50.0/go.mod h1:wHFBCEVWVmHMUpg7pYcOm2QUR/ocQdYSJVQJKnHc3xQ= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= @@ -1205,8 +1207,8 @@ golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= -golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= -golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= +golang.org/x/net v0.22.0 h1:9sGLhx7iRIHEiX0oAJ3MRZMUCElJgy7Br1nO+AMN3Tc= +golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1232,8 +1234,8 @@ golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.1.0/go.mod h1:G9FE4dLTsbXUu90h/Pf85g4w1D+SSAgR+q46nJZ8M4A= -golang.org/x/oauth2 v0.17.0 h1:6m3ZPmLEFdVxKKWnKq4VqZ60gutO35zm+zrAHVmHyDQ= -golang.org/x/oauth2 v0.17.0/go.mod h1:OzPDGQiuQMguemayvdylqddI7qcD9lnSDb+1FiwQ5HA= +golang.org/x/oauth2 v0.18.0 h1:09qnuIAgzdx1XplqJvW6CQqMCtGZykZWcXzPMPUusvI= +golang.org/x/oauth2 v0.18.0/go.mod h1:Wf7knwG0MPoWIMMBgFlEaSUDaKskp0dCfrlJRJXbBi8= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1671,8 +1673,8 @@ google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACu google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= -google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -1690,8 +1692,9 @@ google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/simapp/gomod2nix.toml b/simapp/gomod2nix.toml index d04275637515..94f129bf6c4f 100644 --- a/simapp/gomod2nix.toml +++ b/simapp/gomod2nix.toml @@ -37,6 +37,9 @@ schema = 3 [mod."cosmossdk.io/store"] version = "v1.0.2" hash = "sha256-mEaBNfU892M3V6qTMEDXb1GLaywlyouTRC5XfVqNSMs=" + [mod."cosmossdk.io/x/tx"] + version = "v0.13.1" + hash = "sha256-dHv2Zx8xbqfv1Gq0syh33G7TFJOVx4857QMH4b8Jj9k=" [mod."filippo.io/edwards25519"] version = "v1.1.0" hash = "sha256-9ACANrgWZSd5HYPfDZHY8DVbPSC9LOMgy8deq3rDOoc=" @@ -222,8 +225,8 @@ schema = 3 version = "v1.6.0" hash = "sha256-fWdnMQisRbiRzGT3ISrUHovquzLRHWvcv1JEsJFZRno=" [mod."github.com/golang/protobuf"] - version = "v1.5.3" - hash = "sha256-svogITcP4orUIsJFjMtp+Uv1+fKJv2Q5Zwf2dMqnpOQ=" + version = "v1.5.4" + hash = "sha256-N3+Lv9lEZjrdOWdQhFj6Y3Iap4rVLEQeI8/eFFyAMZ0=" [mod."github.com/golang/snappy"] version = "v0.0.4" hash = "sha256-Umx+5xHAQCN/Gi4HbtMhnDCSPFAXSsjVbXd8n5LhjAA=" @@ -402,8 +405,8 @@ schema = 3 version = "v0.6.0" hash = "sha256-TAD0mm7msYHo99yoNijeYzlDD0i1Vg3uTetpkDUWQo8=" [mod."github.com/prometheus/common"] - version = "v0.49.0" - hash = "sha256-jDD8MAv4kervfJWlIX22ErjUrE5w8S7F8PQEO8/QN/w=" + version = "v0.50.0" + hash = "sha256-zDhmdO4gGiyKyLuNrMnsoY3pkb9fGZIAHcjP8j26HQI=" [mod."github.com/prometheus/procfs"] version = "v0.12.0" hash = "sha256-Y4ZZmxIpVCO67zN3pGwSk2TcI88zvmGJkgwq9DRTwFw=" @@ -514,11 +517,11 @@ schema = 3 version = "v0.15.0" hash = "sha256-ANSnGmd525BfnkMZpCmu6deMPFGADtnZx3lmZpdm2aM=" [mod."golang.org/x/net"] - version = "v0.21.0" - hash = "sha256-LfiqMpPtqvW/eLkfx6Ebr5ksqKbQli6uq06c/+XrBsw=" + version = "v0.22.0" + hash = "sha256-pcefO4noO9I6mATKBWF6shgIjZvFg0kDsV1Jo/NsFns=" [mod."golang.org/x/oauth2"] - version = "v0.17.0" - hash = "sha256-M2ZZQZt449RJL18YpzGiAiqfGsDVMsr1IVWbYp/G/go=" + version = "v0.18.0" + hash = "sha256-TX4CvtvHU+SGSmqlxaQqlgJjlJiOtLGYAZa0zeBfZak=" [mod."golang.org/x/sync"] version = "v0.6.0" hash = "sha256-LLims/wjDZtIqlYCVHREewcUOX4hwRwplEuZKPOJ/HI=" @@ -553,11 +556,11 @@ schema = 3 version = "v0.0.0-20240221002015-b0ce06bbee7c" hash = "sha256-XF1eaB8Uwjuii1SVpiZABBhrpszJy5ujOtN+7qAAouM=" [mod."google.golang.org/grpc"] - version = "v1.62.0" - hash = "sha256-OnEEt6J1d9uQazORCpD6jbAKph8/dKlDHcUEEkLQyjQ=" + version = "v1.62.1" + hash = "sha256-1su6X0YT7MUflrTJijbq1CiisADZHudEx5sJq01TEaE=" [mod."google.golang.org/protobuf"] - version = "v1.32.0" - hash = "sha256-GJuTkMGHCzHbyK4yD5kY4oMn8wQWqgkeBK//yVDqHJk=" + version = "v1.33.0" + hash = "sha256-cWwQjtUwSIEkAlAadrlxK1PYZXTRrV4NKzt7xDpJgIU=" [mod."gopkg.in/ini.v1"] version = "v1.67.0" hash = "sha256-V10ahGNGT+NLRdKUyRg1dos5RxLBXBk1xutcnquc/+4=" diff --git a/store/go.mod b/store/go.mod index b8ce0031a6fa..fbc8236e91e7 100644 --- a/store/go.mod +++ b/store/go.mod @@ -37,7 +37,7 @@ require ( github.com/emicklei/dot v1.6.1 // indirect github.com/getsentry/sentry-go v0.27.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/protobuf v1.5.3 // indirect + github.com/golang/protobuf v1.5.4 // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/go-cmp v0.6.0 // indirect github.com/hashicorp/go-immutable-radix v1.0.0 // indirect @@ -53,18 +53,18 @@ require ( github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/prometheus/client_golang v1.19.0 // indirect github.com/prometheus/client_model v0.6.0 // indirect - github.com/prometheus/common v0.49.0 // indirect + github.com/prometheus/common v0.50.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect github.com/rogpeppe/go-internal v1.12.0 // indirect github.com/rs/zerolog v1.32.0 // indirect github.com/sasha-s/go-deadlock v0.3.1 // indirect golang.org/x/crypto v0.21.0 // indirect - golang.org/x/net v0.21.0 // indirect + golang.org/x/net v0.22.0 // indirect golang.org/x/sys v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240221002015-b0ce06bbee7c // indirect - google.golang.org/grpc v1.62.0 // indirect - google.golang.org/protobuf v1.32.0 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/store/go.sum b/store/go.sum index 2766d7c0983f..4e25aa335aaa 100644 --- a/store/go.sum +++ b/store/go.sum @@ -46,8 +46,6 @@ github.com/cosmos/cosmos-db v1.0.2 h1:hwMjozuY1OlJs/uh6vddqnk9j7VamLv+0DBlbEXbAK github.com/cosmos/cosmos-db v1.0.2/go.mod h1:Z8IXcFJ9PqKK6BIsVOB3QXtkKoqUOp1vRvPT39kOXEA= github.com/cosmos/gogoproto v1.4.11 h1:LZcMHrx4FjUgrqQSWeaGC1v/TeuVFqSLa43CC6aWR2g= github.com/cosmos/gogoproto v1.4.11/go.mod h1:/g39Mh8m17X8Q/GDEs5zYTSNaNnInBSohtaxzQnYq1Y= -github.com/cosmos/iavl v1.0.0-beta.1.0.20240125174944-11ba4961dae9 h1:guolkG50C5Pfk/+iHXbRg20DhkDkDMHmJVXtzS67FME= -github.com/cosmos/iavl v1.0.0-beta.1.0.20240125174944-11ba4961dae9/go.mod h1:JDw0feJTylH9iDDzi8sWeJO0xrf3qajxebBMnWA6iz4= github.com/cosmos/iavl v1.1.0 h1:YRdPLKCPoJQDXoZu0BToQ6PADswLkhNzyt7DZLgK0xY= github.com/cosmos/iavl v1.1.0/go.mod h1:jLeUvm6bGT1YutCaL2fIar/8vGUE8cPZvh/gXEWDaDM= github.com/cosmos/ics23/go v0.10.0 h1:iXqLLgp2Lp+EdpIuwXTYIQU+AiHj9mOC2X9ab++bZDM= @@ -97,8 +95,8 @@ github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvq github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= @@ -198,8 +196,8 @@ github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZ github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= -github.com/prometheus/common v0.49.0 h1:ToNTdK4zSnPVJmh698mGFkDor9wBI/iGaJy5dbH1EgI= -github.com/prometheus/common v0.49.0/go.mod h1:Kxm+EULxRbUkjGU6WFsQqo3ORzB4tyKvlWFOE9mB2sE= +github.com/prometheus/common v0.50.0 h1:YSZE6aa9+luNa2da6/Tik0q0A5AbR+U003TItK57CPQ= +github.com/prometheus/common v0.50.0/go.mod h1:wHFBCEVWVmHMUpg7pYcOm2QUR/ocQdYSJVQJKnHc3xQ= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= @@ -252,8 +250,8 @@ golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= -golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= +golang.org/x/net v0.22.0 h1:9sGLhx7iRIHEiX0oAJ3MRZMUCElJgy7Br1nO+AMN3Tc= +golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -307,8 +305,8 @@ golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= google.golang.org/genproto/googleapis/rpc v0.0.0-20240221002015-b0ce06bbee7c h1:NUsgEN92SQQqzfA+YtqYNqYmB3DMMYLlIwUZAQFVFbo= google.golang.org/genproto/googleapis/rpc v0.0.0-20240221002015-b0ce06bbee7c/go.mod h1:H4O17MA/PE9BsGx3w+a+W2VOLLD1Qf7oJneAoU6WktY= -google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= -google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -317,8 +315,8 @@ google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzi google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= -google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/tests/go.mod b/tests/go.mod index 431bc08d0a74..d90beda7a4c1 100644 --- a/tests/go.mod +++ b/tests/go.mod @@ -18,7 +18,7 @@ require ( cosmossdk.io/x/feegrant v0.0.0-20230613133644-0a778132a60f cosmossdk.io/x/nft v0.0.0-20230613133644-0a778132a60f cosmossdk.io/x/protocolpool v0.0.0-20230925135524-a1bc045b3190 - cosmossdk.io/x/tx v0.13.0 + cosmossdk.io/x/tx v0.13.1 cosmossdk.io/x/upgrade v0.0.0-20230613133644-0a778132a60f github.com/cometbft/cometbft v0.38.5 github.com/cosmos/cosmos-db v1.0.2 @@ -29,8 +29,8 @@ require ( github.com/golang/mock v1.6.0 github.com/spf13/cobra v1.8.0 github.com/stretchr/testify v1.9.0 - google.golang.org/grpc v1.62.0 - google.golang.org/protobuf v1.32.0 + google.golang.org/grpc v1.62.1 + google.golang.org/protobuf v1.33.0 gotest.tools/v3 v3.5.1 pgregory.net/rapid v1.1.0 ) @@ -114,7 +114,7 @@ require ( github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/glog v1.2.0 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect - github.com/golang/protobuf v1.5.3 // indirect + github.com/golang/protobuf v1.5.4 // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/btree v1.1.2 // indirect github.com/google/orderedcode v0.0.1 // indirect @@ -169,7 +169,7 @@ require ( github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/prometheus/client_golang v1.19.0 // indirect github.com/prometheus/client_model v0.6.0 // indirect - github.com/prometheus/common v0.49.0 // indirect + github.com/prometheus/common v0.50.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/rogpeppe/go-internal v1.12.0 // indirect @@ -203,8 +203,8 @@ require ( golang.org/x/crypto v0.21.0 // indirect golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 // indirect golang.org/x/mod v0.15.0 // indirect - golang.org/x/net v0.21.0 // indirect - golang.org/x/oauth2 v0.17.0 // indirect + golang.org/x/net v0.22.0 // indirect + golang.org/x/oauth2 v0.18.0 // indirect golang.org/x/sync v0.6.0 // indirect golang.org/x/sys v0.18.0 // indirect golang.org/x/term v0.18.0 // indirect @@ -250,7 +250,6 @@ replace ( cosmossdk.io/x/protocolpool => ../x/protocolpool cosmossdk.io/x/slashing => ../x/slashing cosmossdk.io/x/staking => ../x/staking - cosmossdk.io/x/tx => ../x/tx cosmossdk.io/x/upgrade => ../x/upgrade ) diff --git a/tests/go.sum b/tests/go.sum index 7f2d8d180071..6c8c39fe2d6f 100644 --- a/tests/go.sum +++ b/tests/go.sum @@ -198,6 +198,8 @@ cosmossdk.io/math v1.3.0 h1:RC+jryuKeytIiictDslBP9i1fhkVm6ZDmZEoNP316zE= cosmossdk.io/math v1.3.0/go.mod h1:vnRTxewy+M7BtXBNFybkuhSH4WfedVAAnERHgVFhp3k= cosmossdk.io/store v1.0.2 h1:lSg5BTvJBHUDwswNNyeh4K/CbqiHER73VU4nDNb8uk0= cosmossdk.io/store v1.0.2/go.mod h1:EFtENTqVTuWwitGW1VwaBct+yDagk7oG/axBMPH+FXs= +cosmossdk.io/x/tx v0.13.1 h1:Mg+EMp67Pz+NukbJqYxuo8uRp7N/a9uR+oVS9pONtj8= +cosmossdk.io/x/tx v0.13.1/go.mod h1:CBCU6fsRVz23QGFIQBb1DNX2DztJCf3jWyEkHY2nJQ0= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= @@ -525,8 +527,8 @@ github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= @@ -892,8 +894,8 @@ github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt2 github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= -github.com/prometheus/common v0.49.0 h1:ToNTdK4zSnPVJmh698mGFkDor9wBI/iGaJy5dbH1EgI= -github.com/prometheus/common v0.49.0/go.mod h1:Kxm+EULxRbUkjGU6WFsQqo3ORzB4tyKvlWFOE9mB2sE= +github.com/prometheus/common v0.50.0 h1:YSZE6aa9+luNa2da6/Tik0q0A5AbR+U003TItK57CPQ= +github.com/prometheus/common v0.50.0/go.mod h1:wHFBCEVWVmHMUpg7pYcOm2QUR/ocQdYSJVQJKnHc3xQ= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= @@ -1177,8 +1179,8 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.0.0-20221014081412-f15817d10f9b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= -golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= -golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= +golang.org/x/net v0.22.0 h1:9sGLhx7iRIHEiX0oAJ3MRZMUCElJgy7Br1nO+AMN3Tc= +golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1204,8 +1206,8 @@ golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.1.0/go.mod h1:G9FE4dLTsbXUu90h/Pf85g4w1D+SSAgR+q46nJZ8M4A= -golang.org/x/oauth2 v0.17.0 h1:6m3ZPmLEFdVxKKWnKq4VqZ60gutO35zm+zrAHVmHyDQ= -golang.org/x/oauth2 v0.17.0/go.mod h1:OzPDGQiuQMguemayvdylqddI7qcD9lnSDb+1FiwQ5HA= +golang.org/x/oauth2 v0.18.0 h1:09qnuIAgzdx1XplqJvW6CQqMCtGZykZWcXzPMPUusvI= +golang.org/x/oauth2 v0.18.0/go.mod h1:Wf7knwG0MPoWIMMBgFlEaSUDaKskp0dCfrlJRJXbBi8= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1632,8 +1634,8 @@ google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACu google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= -google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -1650,8 +1652,9 @@ google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/tests/starship/tests/go.mod b/tests/starship/tests/go.mod index 0587601091cf..1c1722ff811b 100644 --- a/tests/starship/tests/go.mod +++ b/tests/starship/tests/go.mod @@ -34,7 +34,6 @@ replace ( cosmossdk.io/x/protocolpool => ../../../x/protocolpool cosmossdk.io/x/slashing => ../../../x/slashing cosmossdk.io/x/staking => ../../../x/staking - cosmossdk.io/x/tx => ../../../x/tx cosmossdk.io/x/upgrade => ../../../x/upgrade ) @@ -47,7 +46,7 @@ require ( github.com/cosmos/cosmos-db v1.0.2 github.com/cosmos/cosmos-sdk v0.51.0 github.com/stretchr/testify v1.9.0 - google.golang.org/grpc v1.62.0 + google.golang.org/grpc v1.62.1 gopkg.in/yaml.v3 v3.0.1 ) @@ -79,7 +78,7 @@ require ( cosmossdk.io/x/protocolpool v0.0.0-20230925135524-a1bc045b3190 // indirect cosmossdk.io/x/slashing v0.0.0-00010101000000-000000000000 // indirect cosmossdk.io/x/staking v0.0.0-00010101000000-000000000000 // indirect - cosmossdk.io/x/tx v0.13.0 // indirect + cosmossdk.io/x/tx v0.13.1 // indirect cosmossdk.io/x/upgrade v0.0.0-20230613133644-0a778132a60f // indirect filippo.io/edwards25519 v1.1.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect @@ -138,7 +137,7 @@ require ( github.com/golang/glog v1.2.0 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/mock v1.6.0 // indirect - github.com/golang/protobuf v1.5.3 // indirect + github.com/golang/protobuf v1.5.4 // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/btree v1.1.2 // indirect github.com/google/go-cmp v0.6.0 // indirect @@ -197,7 +196,7 @@ require ( github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/prometheus/client_golang v1.19.0 // indirect github.com/prometheus/client_model v0.6.0 // indirect - github.com/prometheus/common v0.49.0 // indirect + github.com/prometheus/common v0.50.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/rogpeppe/go-internal v1.12.0 // indirect @@ -233,8 +232,8 @@ require ( golang.org/x/crypto v0.21.0 // indirect golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 // indirect golang.org/x/mod v0.15.0 // indirect - golang.org/x/net v0.21.0 // indirect - golang.org/x/oauth2 v0.17.0 // indirect + golang.org/x/net v0.22.0 // indirect + golang.org/x/oauth2 v0.18.0 // indirect golang.org/x/sync v0.6.0 // indirect golang.org/x/sys v0.18.0 // indirect golang.org/x/term v0.18.0 // indirect @@ -246,7 +245,7 @@ require ( google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20240205150955-31a09d347014 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240221002015-b0ce06bbee7c // indirect - google.golang.org/protobuf v1.32.0 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gotest.tools/v3 v3.5.1 // indirect nhooyr.io/websocket v1.8.6 // indirect diff --git a/tests/starship/tests/go.sum b/tests/starship/tests/go.sum index f354c4c32409..b76abfe72a07 100644 --- a/tests/starship/tests/go.sum +++ b/tests/starship/tests/go.sum @@ -198,6 +198,8 @@ cosmossdk.io/math v1.3.0 h1:RC+jryuKeytIiictDslBP9i1fhkVm6ZDmZEoNP316zE= cosmossdk.io/math v1.3.0/go.mod h1:vnRTxewy+M7BtXBNFybkuhSH4WfedVAAnERHgVFhp3k= cosmossdk.io/store v1.0.2 h1:lSg5BTvJBHUDwswNNyeh4K/CbqiHER73VU4nDNb8uk0= cosmossdk.io/store v1.0.2/go.mod h1:EFtENTqVTuWwitGW1VwaBct+yDagk7oG/axBMPH+FXs= +cosmossdk.io/x/tx v0.13.1 h1:Mg+EMp67Pz+NukbJqYxuo8uRp7N/a9uR+oVS9pONtj8= +cosmossdk.io/x/tx v0.13.1/go.mod h1:CBCU6fsRVz23QGFIQBb1DNX2DztJCf3jWyEkHY2nJQ0= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= @@ -525,8 +527,8 @@ github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= @@ -892,8 +894,8 @@ github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt2 github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= -github.com/prometheus/common v0.49.0 h1:ToNTdK4zSnPVJmh698mGFkDor9wBI/iGaJy5dbH1EgI= -github.com/prometheus/common v0.49.0/go.mod h1:Kxm+EULxRbUkjGU6WFsQqo3ORzB4tyKvlWFOE9mB2sE= +github.com/prometheus/common v0.50.0 h1:YSZE6aa9+luNa2da6/Tik0q0A5AbR+U003TItK57CPQ= +github.com/prometheus/common v0.50.0/go.mod h1:wHFBCEVWVmHMUpg7pYcOm2QUR/ocQdYSJVQJKnHc3xQ= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= @@ -1177,8 +1179,8 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.0.0-20221014081412-f15817d10f9b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= -golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= -golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= +golang.org/x/net v0.22.0 h1:9sGLhx7iRIHEiX0oAJ3MRZMUCElJgy7Br1nO+AMN3Tc= +golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1204,8 +1206,8 @@ golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.1.0/go.mod h1:G9FE4dLTsbXUu90h/Pf85g4w1D+SSAgR+q46nJZ8M4A= -golang.org/x/oauth2 v0.17.0 h1:6m3ZPmLEFdVxKKWnKq4VqZ60gutO35zm+zrAHVmHyDQ= -golang.org/x/oauth2 v0.17.0/go.mod h1:OzPDGQiuQMguemayvdylqddI7qcD9lnSDb+1FiwQ5HA= +golang.org/x/oauth2 v0.18.0 h1:09qnuIAgzdx1XplqJvW6CQqMCtGZykZWcXzPMPUusvI= +golang.org/x/oauth2 v0.18.0/go.mod h1:Wf7knwG0MPoWIMMBgFlEaSUDaKskp0dCfrlJRJXbBi8= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1633,8 +1635,8 @@ google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACu google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= -google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -1651,8 +1653,9 @@ google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/tools/confix/go.mod b/tools/confix/go.mod index 61ddf3d35558..bed27f8df432 100644 --- a/tools/confix/go.mod +++ b/tools/confix/go.mod @@ -72,7 +72,7 @@ require ( github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/glog v1.2.0 // indirect github.com/golang/mock v1.6.0 // indirect - github.com/golang/protobuf v1.5.3 // indirect + github.com/golang/protobuf v1.5.4 // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/btree v1.1.2 // indirect github.com/google/go-cmp v0.6.0 // indirect @@ -147,8 +147,8 @@ require ( google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20240205150955-31a09d347014 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240221002015-b0ce06bbee7c // indirect - google.golang.org/grpc v1.62.0 // indirect - google.golang.org/protobuf v1.32.0 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect nhooyr.io/websocket v1.8.6 // indirect diff --git a/tools/confix/go.sum b/tools/confix/go.sum index 2dce2f1323ea..4d0df6b00584 100644 --- a/tools/confix/go.sum +++ b/tools/confix/go.sum @@ -313,8 +313,8 @@ github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= @@ -964,8 +964,8 @@ google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTp google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= -google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -980,8 +980,8 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= -google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/tools/cosmovisor/go.mod b/tools/cosmovisor/go.mod index b1b001d65339..faa3e3f9983b 100644 --- a/tools/cosmovisor/go.mod +++ b/tools/cosmovisor/go.mod @@ -78,7 +78,7 @@ require ( github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/glog v1.2.0 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect - github.com/golang/protobuf v1.5.3 // indirect + github.com/golang/protobuf v1.5.4 // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/btree v1.1.2 // indirect github.com/google/go-cmp v0.6.0 // indirect @@ -174,8 +174,8 @@ require ( google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20240205150955-31a09d347014 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240221002015-b0ce06bbee7c // indirect - google.golang.org/grpc v1.62.0 // indirect - google.golang.org/protobuf v1.32.0 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect gotest.tools/v3 v3.5.1 // indirect diff --git a/tools/cosmovisor/go.sum b/tools/cosmovisor/go.sum index 50204b78722e..b310dd511383 100644 --- a/tools/cosmovisor/go.sum +++ b/tools/cosmovisor/go.sum @@ -511,8 +511,8 @@ github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= @@ -1603,8 +1603,8 @@ google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACu google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= -google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -1621,8 +1621,8 @@ google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= -google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/tools/hubl/go.mod b/tools/hubl/go.mod index 2becafd77a11..40d58febc528 100644 --- a/tools/hubl/go.mod +++ b/tools/hubl/go.mod @@ -12,8 +12,8 @@ require ( github.com/manifoldco/promptui v0.9.0 github.com/pelletier/go-toml/v2 v2.1.1 github.com/spf13/cobra v1.8.0 - google.golang.org/grpc v1.62.0 - google.golang.org/protobuf v1.32.0 + google.golang.org/grpc v1.62.1 + google.golang.org/protobuf v1.33.0 ) require ( @@ -71,7 +71,7 @@ require ( github.com/gogo/googleapis v1.4.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/glog v1.2.0 // indirect - github.com/golang/protobuf v1.5.3 // indirect + github.com/golang/protobuf v1.5.4 // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/btree v1.1.2 // indirect github.com/google/go-cmp v0.6.0 // indirect diff --git a/tools/hubl/go.sum b/tools/hubl/go.sum index 2ab5bdd38afa..b6a948fda5c2 100644 --- a/tools/hubl/go.sum +++ b/tools/hubl/go.sum @@ -313,8 +313,8 @@ github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= @@ -960,8 +960,8 @@ google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTp google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= -google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -976,8 +976,8 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= -google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/x/accounts/go.mod b/x/accounts/go.mod index 4efa374c2578..4f133da66974 100644 --- a/x/accounts/go.mod +++ b/x/accounts/go.mod @@ -8,14 +8,14 @@ require ( cosmossdk.io/core v0.12.1-0.20231114100755-569e3ff6a0d7 cosmossdk.io/depinject v1.0.0-alpha.4 cosmossdk.io/log v1.3.1 - cosmossdk.io/x/tx v0.13.0 + cosmossdk.io/x/tx v0.13.1 github.com/cosmos/cosmos-sdk v0.51.0 github.com/cosmos/gogoproto v1.4.11 github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 github.com/spf13/cobra v1.8.0 github.com/stretchr/testify v1.9.0 - google.golang.org/grpc v1.62.0 - google.golang.org/protobuf v1.32.0 + google.golang.org/grpc v1.62.1 + google.golang.org/protobuf v1.33.0 ) require ( @@ -74,7 +74,7 @@ require ( github.com/gogo/googleapis v1.4.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/glog v1.2.0 // indirect - github.com/golang/protobuf v1.5.3 // indirect + github.com/golang/protobuf v1.5.4 // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/btree v1.1.2 // indirect github.com/google/go-cmp v0.6.0 // indirect @@ -119,7 +119,7 @@ require ( github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/prometheus/client_golang v1.19.0 // indirect github.com/prometheus/client_model v0.6.0 // indirect - github.com/prometheus/common v0.49.0 // indirect + github.com/prometheus/common v0.50.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/rogpeppe/go-internal v1.12.0 // indirect @@ -146,7 +146,7 @@ require ( golang.org/x/crypto v0.21.0 // indirect golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 // indirect golang.org/x/mod v0.15.0 // indirect - golang.org/x/net v0.21.0 // indirect + golang.org/x/net v0.22.0 // indirect golang.org/x/sync v0.6.0 // indirect golang.org/x/sys v0.18.0 // indirect golang.org/x/term v0.18.0 // indirect @@ -175,5 +175,4 @@ replace ( cosmossdk.io/x/mint => ../mint cosmossdk.io/x/slashing => ../slashing cosmossdk.io/x/staking => ../staking - cosmossdk.io/x/tx => ../tx ) diff --git a/x/accounts/go.sum b/x/accounts/go.sum index ee0266fe8b11..66db8db0555c 100644 --- a/x/accounts/go.sum +++ b/x/accounts/go.sum @@ -14,6 +14,8 @@ cosmossdk.io/math v1.3.0 h1:RC+jryuKeytIiictDslBP9i1fhkVm6ZDmZEoNP316zE= cosmossdk.io/math v1.3.0/go.mod h1:vnRTxewy+M7BtXBNFybkuhSH4WfedVAAnERHgVFhp3k= cosmossdk.io/store v1.0.2 h1:lSg5BTvJBHUDwswNNyeh4K/CbqiHER73VU4nDNb8uk0= cosmossdk.io/store v1.0.2/go.mod h1:EFtENTqVTuWwitGW1VwaBct+yDagk7oG/axBMPH+FXs= +cosmossdk.io/x/tx v0.13.1 h1:Mg+EMp67Pz+NukbJqYxuo8uRp7N/a9uR+oVS9pONtj8= +cosmossdk.io/x/tx v0.13.1/go.mod h1:CBCU6fsRVz23QGFIQBb1DNX2DztJCf3jWyEkHY2nJQ0= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= @@ -296,8 +298,8 @@ github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= @@ -593,8 +595,8 @@ github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt2 github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= -github.com/prometheus/common v0.49.0 h1:ToNTdK4zSnPVJmh698mGFkDor9wBI/iGaJy5dbH1EgI= -github.com/prometheus/common v0.49.0/go.mod h1:Kxm+EULxRbUkjGU6WFsQqo3ORzB4tyKvlWFOE9mB2sE= +github.com/prometheus/common v0.50.0 h1:YSZE6aa9+luNa2da6/Tik0q0A5AbR+U003TItK57CPQ= +github.com/prometheus/common v0.50.0/go.mod h1:wHFBCEVWVmHMUpg7pYcOm2QUR/ocQdYSJVQJKnHc3xQ= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= @@ -795,8 +797,8 @@ golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= -golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= +golang.org/x/net v0.22.0 h1:9sGLhx7iRIHEiX0oAJ3MRZMUCElJgy7Br1nO+AMN3Tc= +golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -944,8 +946,8 @@ google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTp google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= -google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -960,8 +962,9 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/x/auth/go.mod b/x/auth/go.mod index 4a61bbc152a5..b15108ae1959 100644 --- a/x/auth/go.mod +++ b/x/auth/go.mod @@ -14,22 +14,22 @@ require ( cosmossdk.io/x/accounts v0.0.0-00010101000000-000000000000 cosmossdk.io/x/bank v0.0.0-00010101000000-000000000000 cosmossdk.io/x/staking v0.0.0-00010101000000-000000000000 - cosmossdk.io/x/tx v0.13.0 + cosmossdk.io/x/tx v0.13.1 github.com/cometbft/cometbft v0.38.5 github.com/cosmos/cosmos-proto v1.0.0-beta.4 github.com/cosmos/cosmos-sdk v0.51.0 github.com/cosmos/gogoproto v1.4.11 github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 github.com/golang/mock v1.6.0 - github.com/golang/protobuf v1.5.3 + github.com/golang/protobuf v1.5.4 github.com/grpc-ecosystem/grpc-gateway v1.16.0 github.com/spf13/cobra v1.8.0 github.com/spf13/viper v1.18.2 github.com/stretchr/testify v1.9.0 golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 google.golang.org/genproto/googleapis/api v0.0.0-20240205150955-31a09d347014 - google.golang.org/grpc v1.62.0 - google.golang.org/protobuf v1.32.0 + google.golang.org/grpc v1.62.1 + google.golang.org/protobuf v1.33.0 gotest.tools/v3 v3.5.1 pgregory.net/rapid v1.1.0 sigs.k8s.io/yaml v1.4.0 @@ -126,7 +126,7 @@ require ( github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/prometheus/client_golang v1.19.0 // indirect github.com/prometheus/client_model v0.6.0 // indirect - github.com/prometheus/common v0.49.0 // indirect + github.com/prometheus/common v0.50.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/rogpeppe/go-internal v1.12.0 // indirect @@ -151,7 +151,7 @@ require ( go.uber.org/multierr v1.11.0 // indirect golang.org/x/crypto v0.21.0 // indirect golang.org/x/mod v0.15.0 // indirect - golang.org/x/net v0.21.0 // indirect + golang.org/x/net v0.22.0 // indirect golang.org/x/sync v0.6.0 // indirect golang.org/x/sys v0.18.0 // indirect golang.org/x/term v0.18.0 // indirect @@ -174,5 +174,4 @@ replace ( cosmossdk.io/x/accounts => ../accounts cosmossdk.io/x/bank => ../bank cosmossdk.io/x/staking => ../staking - cosmossdk.io/x/tx => ../tx ) diff --git a/x/auth/go.sum b/x/auth/go.sum index 3fd57a0055b6..119c6de469be 100644 --- a/x/auth/go.sum +++ b/x/auth/go.sum @@ -14,6 +14,8 @@ cosmossdk.io/math v1.3.0 h1:RC+jryuKeytIiictDslBP9i1fhkVm6ZDmZEoNP316zE= cosmossdk.io/math v1.3.0/go.mod h1:vnRTxewy+M7BtXBNFybkuhSH4WfedVAAnERHgVFhp3k= cosmossdk.io/store v1.0.2 h1:lSg5BTvJBHUDwswNNyeh4K/CbqiHER73VU4nDNb8uk0= cosmossdk.io/store v1.0.2/go.mod h1:EFtENTqVTuWwitGW1VwaBct+yDagk7oG/axBMPH+FXs= +cosmossdk.io/x/tx v0.13.1 h1:Mg+EMp67Pz+NukbJqYxuo8uRp7N/a9uR+oVS9pONtj8= +cosmossdk.io/x/tx v0.13.1/go.mod h1:CBCU6fsRVz23QGFIQBb1DNX2DztJCf3jWyEkHY2nJQ0= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= @@ -296,8 +298,8 @@ github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= @@ -593,8 +595,8 @@ github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt2 github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= -github.com/prometheus/common v0.49.0 h1:ToNTdK4zSnPVJmh698mGFkDor9wBI/iGaJy5dbH1EgI= -github.com/prometheus/common v0.49.0/go.mod h1:Kxm+EULxRbUkjGU6WFsQqo3ORzB4tyKvlWFOE9mB2sE= +github.com/prometheus/common v0.50.0 h1:YSZE6aa9+luNa2da6/Tik0q0A5AbR+U003TItK57CPQ= +github.com/prometheus/common v0.50.0/go.mod h1:wHFBCEVWVmHMUpg7pYcOm2QUR/ocQdYSJVQJKnHc3xQ= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= @@ -797,8 +799,8 @@ golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= -golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= +golang.org/x/net v0.22.0 h1:9sGLhx7iRIHEiX0oAJ3MRZMUCElJgy7Br1nO+AMN3Tc= +golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -948,8 +950,8 @@ google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTp google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= -google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -964,8 +966,9 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/x/authz/client/cli/tx_test.go b/x/authz/client/cli/tx_test.go index d4b2b5f0aa9f..a9c4d87a96f6 100644 --- a/x/authz/client/cli/tx_test.go +++ b/x/authz/client/cli/tx_test.go @@ -339,7 +339,7 @@ func (s *CLITestSuite) TestCLITxGrantAuthorization() { fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin("stake", sdkmath.NewInt(10))).String()), }, true, - "invalid decimal coin expression", + "invalid character in denomination", }, { "invalid authorization type", diff --git a/x/authz/go.mod b/x/authz/go.mod index a42315213789..8544eaaae5f3 100644 --- a/x/authz/go.mod +++ b/x/authz/go.mod @@ -15,20 +15,20 @@ require ( cosmossdk.io/x/accounts v0.0.0-00010101000000-000000000000 // indirect cosmossdk.io/x/bank v0.0.0-00010101000000-000000000000 cosmossdk.io/x/staking v0.0.0-00010101000000-000000000000 - cosmossdk.io/x/tx v0.13.0 + cosmossdk.io/x/tx v0.13.1 github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect github.com/cometbft/cometbft v0.38.5 github.com/cosmos/cosmos-proto v1.0.0-beta.4 github.com/cosmos/cosmos-sdk v0.51.0 github.com/cosmos/gogoproto v1.4.11 github.com/golang/mock v1.6.0 - github.com/golang/protobuf v1.5.3 + github.com/golang/protobuf v1.5.4 github.com/grpc-ecosystem/grpc-gateway v1.16.0 github.com/spf13/cobra v1.8.0 github.com/stretchr/testify v1.9.0 google.golang.org/genproto/googleapis/api v0.0.0-20240205150955-31a09d347014 - google.golang.org/grpc v1.62.0 - google.golang.org/protobuf v1.32.0 + google.golang.org/grpc v1.62.1 + google.golang.org/protobuf v1.33.0 ) require ( @@ -122,7 +122,7 @@ require ( github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/prometheus/client_golang v1.19.0 // indirect github.com/prometheus/client_model v0.6.0 // indirect - github.com/prometheus/common v0.49.0 // indirect + github.com/prometheus/common v0.50.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/rogpeppe/go-internal v1.12.0 // indirect @@ -149,7 +149,7 @@ require ( golang.org/x/crypto v0.21.0 // indirect golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 // indirect golang.org/x/mod v0.15.0 // indirect - golang.org/x/net v0.21.0 // indirect + golang.org/x/net v0.22.0 // indirect golang.org/x/sync v0.6.0 // indirect golang.org/x/sys v0.18.0 // indirect golang.org/x/term v0.18.0 // indirect @@ -176,5 +176,4 @@ replace ( cosmossdk.io/x/auth => ../auth cosmossdk.io/x/bank => ../bank cosmossdk.io/x/staking => ../staking - cosmossdk.io/x/tx => ../tx ) diff --git a/x/authz/go.sum b/x/authz/go.sum index 3fd57a0055b6..119c6de469be 100644 --- a/x/authz/go.sum +++ b/x/authz/go.sum @@ -14,6 +14,8 @@ cosmossdk.io/math v1.3.0 h1:RC+jryuKeytIiictDslBP9i1fhkVm6ZDmZEoNP316zE= cosmossdk.io/math v1.3.0/go.mod h1:vnRTxewy+M7BtXBNFybkuhSH4WfedVAAnERHgVFhp3k= cosmossdk.io/store v1.0.2 h1:lSg5BTvJBHUDwswNNyeh4K/CbqiHER73VU4nDNb8uk0= cosmossdk.io/store v1.0.2/go.mod h1:EFtENTqVTuWwitGW1VwaBct+yDagk7oG/axBMPH+FXs= +cosmossdk.io/x/tx v0.13.1 h1:Mg+EMp67Pz+NukbJqYxuo8uRp7N/a9uR+oVS9pONtj8= +cosmossdk.io/x/tx v0.13.1/go.mod h1:CBCU6fsRVz23QGFIQBb1DNX2DztJCf3jWyEkHY2nJQ0= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= @@ -296,8 +298,8 @@ github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= @@ -593,8 +595,8 @@ github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt2 github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= -github.com/prometheus/common v0.49.0 h1:ToNTdK4zSnPVJmh698mGFkDor9wBI/iGaJy5dbH1EgI= -github.com/prometheus/common v0.49.0/go.mod h1:Kxm+EULxRbUkjGU6WFsQqo3ORzB4tyKvlWFOE9mB2sE= +github.com/prometheus/common v0.50.0 h1:YSZE6aa9+luNa2da6/Tik0q0A5AbR+U003TItK57CPQ= +github.com/prometheus/common v0.50.0/go.mod h1:wHFBCEVWVmHMUpg7pYcOm2QUR/ocQdYSJVQJKnHc3xQ= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= @@ -797,8 +799,8 @@ golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= -golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= +golang.org/x/net v0.22.0 h1:9sGLhx7iRIHEiX0oAJ3MRZMUCElJgy7Br1nO+AMN3Tc= +golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -948,8 +950,8 @@ google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTp google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= -google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -964,8 +966,9 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/x/bank/go.mod b/x/bank/go.mod index 66b28c4aa40e..0aeba2661a84 100644 --- a/x/bank/go.mod +++ b/x/bank/go.mod @@ -18,13 +18,13 @@ require ( github.com/cosmos/cosmos-sdk v0.51.0 github.com/cosmos/gogoproto v1.4.11 github.com/golang/mock v1.6.0 - github.com/golang/protobuf v1.5.3 + github.com/golang/protobuf v1.5.4 github.com/grpc-ecosystem/grpc-gateway v1.16.0 github.com/hashicorp/go-metrics v0.5.3 github.com/spf13/cobra v1.8.0 github.com/stretchr/testify v1.9.0 google.golang.org/genproto/googleapis/api v0.0.0-20240205150955-31a09d347014 - google.golang.org/grpc v1.62.0 + google.golang.org/grpc v1.62.1 gotest.tools/v3 v3.5.1 ) @@ -33,7 +33,7 @@ require ( buf.build/gen/go/tendermint/tendermint/protocolbuffers/go v1.32.0-20231117195010-33ed361a9051.1 // indirect cosmossdk.io/x/auth v0.0.0-00010101000000-000000000000 cosmossdk.io/x/staking v0.0.0-00010101000000-000000000000 // indirect - cosmossdk.io/x/tx v0.13.0 // indirect + cosmossdk.io/x/tx v0.13.1 // indirect filippo.io/edwards25519 v1.1.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.2 // indirect @@ -121,7 +121,7 @@ require ( github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/prometheus/client_golang v1.19.0 // indirect github.com/prometheus/client_model v0.6.0 // indirect - github.com/prometheus/common v0.49.0 // indirect + github.com/prometheus/common v0.50.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/rogpeppe/go-internal v1.12.0 // indirect @@ -148,7 +148,7 @@ require ( golang.org/x/crypto v0.21.0 // indirect golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 // indirect golang.org/x/mod v0.15.0 // indirect - golang.org/x/net v0.21.0 // indirect + golang.org/x/net v0.22.0 // indirect golang.org/x/sync v0.6.0 // indirect golang.org/x/sys v0.18.0 // indirect golang.org/x/term v0.18.0 // indirect @@ -156,7 +156,7 @@ require ( golang.org/x/tools v0.18.0 // indirect google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240221002015-b0ce06bbee7c // indirect - google.golang.org/protobuf v1.32.0 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect nhooyr.io/websocket v1.8.6 // indirect @@ -174,5 +174,4 @@ replace ( cosmossdk.io/x/accounts => ../accounts cosmossdk.io/x/auth => ../auth cosmossdk.io/x/staking => ../staking - cosmossdk.io/x/tx => ../tx ) diff --git a/x/bank/go.sum b/x/bank/go.sum index 3fd57a0055b6..119c6de469be 100644 --- a/x/bank/go.sum +++ b/x/bank/go.sum @@ -14,6 +14,8 @@ cosmossdk.io/math v1.3.0 h1:RC+jryuKeytIiictDslBP9i1fhkVm6ZDmZEoNP316zE= cosmossdk.io/math v1.3.0/go.mod h1:vnRTxewy+M7BtXBNFybkuhSH4WfedVAAnERHgVFhp3k= cosmossdk.io/store v1.0.2 h1:lSg5BTvJBHUDwswNNyeh4K/CbqiHER73VU4nDNb8uk0= cosmossdk.io/store v1.0.2/go.mod h1:EFtENTqVTuWwitGW1VwaBct+yDagk7oG/axBMPH+FXs= +cosmossdk.io/x/tx v0.13.1 h1:Mg+EMp67Pz+NukbJqYxuo8uRp7N/a9uR+oVS9pONtj8= +cosmossdk.io/x/tx v0.13.1/go.mod h1:CBCU6fsRVz23QGFIQBb1DNX2DztJCf3jWyEkHY2nJQ0= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= @@ -296,8 +298,8 @@ github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= @@ -593,8 +595,8 @@ github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt2 github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= -github.com/prometheus/common v0.49.0 h1:ToNTdK4zSnPVJmh698mGFkDor9wBI/iGaJy5dbH1EgI= -github.com/prometheus/common v0.49.0/go.mod h1:Kxm+EULxRbUkjGU6WFsQqo3ORzB4tyKvlWFOE9mB2sE= +github.com/prometheus/common v0.50.0 h1:YSZE6aa9+luNa2da6/Tik0q0A5AbR+U003TItK57CPQ= +github.com/prometheus/common v0.50.0/go.mod h1:wHFBCEVWVmHMUpg7pYcOm2QUR/ocQdYSJVQJKnHc3xQ= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= @@ -797,8 +799,8 @@ golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= -golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= +golang.org/x/net v0.22.0 h1:9sGLhx7iRIHEiX0oAJ3MRZMUCElJgy7Br1nO+AMN3Tc= +golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -948,8 +950,8 @@ google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTp google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= -google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -964,8 +966,9 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/x/circuit/go.mod b/x/circuit/go.mod index 87558974b1df..4dca0e8874f0 100644 --- a/x/circuit/go.mod +++ b/x/circuit/go.mod @@ -14,11 +14,11 @@ require ( github.com/cockroachdb/errors v1.11.1 github.com/cosmos/cosmos-sdk v0.51.0 github.com/cosmos/gogoproto v1.4.11 - github.com/golang/protobuf v1.5.3 + github.com/golang/protobuf v1.5.4 github.com/grpc-ecosystem/grpc-gateway v1.16.0 github.com/stretchr/testify v1.9.0 google.golang.org/genproto/googleapis/api v0.0.0-20240205150955-31a09d347014 - google.golang.org/grpc v1.62.0 + google.golang.org/grpc v1.62.1 ) require ( @@ -28,7 +28,7 @@ require ( cosmossdk.io/x/accounts v0.0.0-00010101000000-000000000000 // indirect cosmossdk.io/x/bank v0.0.0-00010101000000-000000000000 // indirect cosmossdk.io/x/staking v0.0.0-00010101000000-000000000000 // indirect - cosmossdk.io/x/tx v0.13.0 // indirect + cosmossdk.io/x/tx v0.13.1 // indirect filippo.io/edwards25519 v1.1.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.2 // indirect @@ -120,7 +120,7 @@ require ( github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/prometheus/client_golang v1.19.0 // indirect github.com/prometheus/client_model v0.6.0 // indirect - github.com/prometheus/common v0.49.0 // indirect + github.com/prometheus/common v0.50.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/rogpeppe/go-internal v1.12.0 // indirect @@ -148,7 +148,7 @@ require ( golang.org/x/crypto v0.21.0 // indirect golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 // indirect golang.org/x/mod v0.15.0 // indirect - golang.org/x/net v0.21.0 // indirect + golang.org/x/net v0.22.0 // indirect golang.org/x/sync v0.6.0 // indirect golang.org/x/sys v0.18.0 // indirect golang.org/x/term v0.18.0 // indirect @@ -156,7 +156,7 @@ require ( golang.org/x/tools v0.18.0 // indirect google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240221002015-b0ce06bbee7c // indirect - google.golang.org/protobuf v1.32.0 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect gotest.tools/v3 v3.5.1 // indirect @@ -175,5 +175,4 @@ replace ( cosmossdk.io/x/auth => ../auth cosmossdk.io/x/bank => ../bank cosmossdk.io/x/staking => ../staking - cosmossdk.io/x/tx => ../tx ) diff --git a/x/circuit/go.sum b/x/circuit/go.sum index 3fd57a0055b6..119c6de469be 100644 --- a/x/circuit/go.sum +++ b/x/circuit/go.sum @@ -14,6 +14,8 @@ cosmossdk.io/math v1.3.0 h1:RC+jryuKeytIiictDslBP9i1fhkVm6ZDmZEoNP316zE= cosmossdk.io/math v1.3.0/go.mod h1:vnRTxewy+M7BtXBNFybkuhSH4WfedVAAnERHgVFhp3k= cosmossdk.io/store v1.0.2 h1:lSg5BTvJBHUDwswNNyeh4K/CbqiHER73VU4nDNb8uk0= cosmossdk.io/store v1.0.2/go.mod h1:EFtENTqVTuWwitGW1VwaBct+yDagk7oG/axBMPH+FXs= +cosmossdk.io/x/tx v0.13.1 h1:Mg+EMp67Pz+NukbJqYxuo8uRp7N/a9uR+oVS9pONtj8= +cosmossdk.io/x/tx v0.13.1/go.mod h1:CBCU6fsRVz23QGFIQBb1DNX2DztJCf3jWyEkHY2nJQ0= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= @@ -296,8 +298,8 @@ github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= @@ -593,8 +595,8 @@ github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt2 github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= -github.com/prometheus/common v0.49.0 h1:ToNTdK4zSnPVJmh698mGFkDor9wBI/iGaJy5dbH1EgI= -github.com/prometheus/common v0.49.0/go.mod h1:Kxm+EULxRbUkjGU6WFsQqo3ORzB4tyKvlWFOE9mB2sE= +github.com/prometheus/common v0.50.0 h1:YSZE6aa9+luNa2da6/Tik0q0A5AbR+U003TItK57CPQ= +github.com/prometheus/common v0.50.0/go.mod h1:wHFBCEVWVmHMUpg7pYcOm2QUR/ocQdYSJVQJKnHc3xQ= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= @@ -797,8 +799,8 @@ golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= -golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= +golang.org/x/net v0.22.0 h1:9sGLhx7iRIHEiX0oAJ3MRZMUCElJgy7Br1nO+AMN3Tc= +golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -948,8 +950,8 @@ google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTp google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= -google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -964,8 +966,9 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/x/distribution/go.mod b/x/distribution/go.mod index 871b95e4c8b1..e41ea84c458a 100644 --- a/x/distribution/go.mod +++ b/x/distribution/go.mod @@ -19,14 +19,14 @@ require ( github.com/cosmos/cosmos-sdk v0.51.0 github.com/cosmos/gogoproto v1.4.11 github.com/golang/mock v1.6.0 - github.com/golang/protobuf v1.5.3 + github.com/golang/protobuf v1.5.4 github.com/grpc-ecosystem/grpc-gateway v1.16.0 github.com/hashicorp/go-metrics v0.5.3 github.com/pkg/errors v0.9.1 github.com/spf13/cobra v1.8.0 github.com/stretchr/testify v1.9.0 google.golang.org/genproto/googleapis/api v0.0.0-20240205150955-31a09d347014 - google.golang.org/grpc v1.62.0 + google.golang.org/grpc v1.62.1 gotest.tools/v3 v3.5.1 ) @@ -35,7 +35,7 @@ require ( buf.build/gen/go/tendermint/tendermint/protocolbuffers/go v1.32.0-20231117195010-33ed361a9051.1 // indirect cosmossdk.io/x/accounts v0.0.0-00010101000000-000000000000 // indirect cosmossdk.io/x/auth v0.0.0-00010101000000-000000000000 - cosmossdk.io/x/tx v0.13.0 // indirect + cosmossdk.io/x/tx v0.13.1 // indirect filippo.io/edwards25519 v1.1.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.2 // indirect @@ -123,7 +123,7 @@ require ( github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/prometheus/client_golang v1.19.0 // indirect github.com/prometheus/client_model v0.6.0 // indirect - github.com/prometheus/common v0.49.0 // indirect + github.com/prometheus/common v0.50.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/rogpeppe/go-internal v1.12.0 // indirect @@ -150,7 +150,7 @@ require ( golang.org/x/crypto v0.21.0 // indirect golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 // indirect golang.org/x/mod v0.15.0 // indirect - golang.org/x/net v0.21.0 // indirect + golang.org/x/net v0.22.0 // indirect golang.org/x/sync v0.6.0 // indirect golang.org/x/sys v0.18.0 // indirect golang.org/x/term v0.18.0 // indirect @@ -158,7 +158,7 @@ require ( golang.org/x/tools v0.18.0 // indirect google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240221002015-b0ce06bbee7c // indirect - google.golang.org/protobuf v1.32.0 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect nhooyr.io/websocket v1.8.6 // indirect @@ -176,5 +176,4 @@ replace ( cosmossdk.io/x/auth => ../auth cosmossdk.io/x/bank => ../bank cosmossdk.io/x/staking => ../staking - cosmossdk.io/x/tx => ../tx ) diff --git a/x/distribution/go.sum b/x/distribution/go.sum index dfe3daf70777..aa4e4ab12d66 100644 --- a/x/distribution/go.sum +++ b/x/distribution/go.sum @@ -16,6 +16,8 @@ cosmossdk.io/store v1.0.2 h1:lSg5BTvJBHUDwswNNyeh4K/CbqiHER73VU4nDNb8uk0= cosmossdk.io/store v1.0.2/go.mod h1:EFtENTqVTuWwitGW1VwaBct+yDagk7oG/axBMPH+FXs= cosmossdk.io/x/protocolpool v0.0.0-20230925135524-a1bc045b3190 h1:XQJj9Dv9Gtze0l2TF79BU5lkP6MkUveTUuKICmxoz+o= cosmossdk.io/x/protocolpool v0.0.0-20230925135524-a1bc045b3190/go.mod h1:7WUGupOvmlHJoIMBz1JbObQxeo6/TDiuDBxmtod8HRg= +cosmossdk.io/x/tx v0.13.1 h1:Mg+EMp67Pz+NukbJqYxuo8uRp7N/a9uR+oVS9pONtj8= +cosmossdk.io/x/tx v0.13.1/go.mod h1:CBCU6fsRVz23QGFIQBb1DNX2DztJCf3jWyEkHY2nJQ0= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= @@ -298,8 +300,8 @@ github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= @@ -595,8 +597,8 @@ github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt2 github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= -github.com/prometheus/common v0.49.0 h1:ToNTdK4zSnPVJmh698mGFkDor9wBI/iGaJy5dbH1EgI= -github.com/prometheus/common v0.49.0/go.mod h1:Kxm+EULxRbUkjGU6WFsQqo3ORzB4tyKvlWFOE9mB2sE= +github.com/prometheus/common v0.50.0 h1:YSZE6aa9+luNa2da6/Tik0q0A5AbR+U003TItK57CPQ= +github.com/prometheus/common v0.50.0/go.mod h1:wHFBCEVWVmHMUpg7pYcOm2QUR/ocQdYSJVQJKnHc3xQ= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= @@ -799,8 +801,8 @@ golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= -golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= +golang.org/x/net v0.22.0 h1:9sGLhx7iRIHEiX0oAJ3MRZMUCElJgy7Br1nO+AMN3Tc= +golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -950,8 +952,8 @@ google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTp google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= -google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -966,8 +968,9 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/x/evidence/go.mod b/x/evidence/go.mod index bc02677eff8a..ecc058267a45 100644 --- a/x/evidence/go.mod +++ b/x/evidence/go.mod @@ -16,13 +16,13 @@ require ( github.com/cosmos/cosmos-sdk v0.51.0 github.com/cosmos/gogoproto v1.4.11 github.com/golang/mock v1.6.0 - github.com/golang/protobuf v1.5.3 + github.com/golang/protobuf v1.5.4 github.com/grpc-ecosystem/grpc-gateway v1.16.0 github.com/spf13/cobra v1.8.0 github.com/stretchr/testify v1.9.0 google.golang.org/genproto/googleapis/api v0.0.0-20240205150955-31a09d347014 - google.golang.org/grpc v1.62.0 - google.golang.org/protobuf v1.32.0 + google.golang.org/grpc v1.62.1 + google.golang.org/protobuf v1.33.0 ) require ( @@ -32,7 +32,7 @@ require ( cosmossdk.io/x/auth v0.0.0-00010101000000-000000000000 // indirect cosmossdk.io/x/bank v0.0.0-00010101000000-000000000000 // indirect cosmossdk.io/x/staking v0.0.0-00010101000000-000000000000 // indirect - cosmossdk.io/x/tx v0.13.0 // indirect + cosmossdk.io/x/tx v0.13.1 // indirect filippo.io/edwards25519 v1.1.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.2 // indirect @@ -122,7 +122,7 @@ require ( github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/prometheus/client_golang v1.19.0 // indirect github.com/prometheus/client_model v0.6.0 // indirect - github.com/prometheus/common v0.49.0 // indirect + github.com/prometheus/common v0.50.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/rogpeppe/go-internal v1.12.0 // indirect @@ -149,7 +149,7 @@ require ( golang.org/x/crypto v0.21.0 // indirect golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 // indirect golang.org/x/mod v0.15.0 // indirect - golang.org/x/net v0.21.0 // indirect + golang.org/x/net v0.22.0 // indirect golang.org/x/sync v0.6.0 // indirect golang.org/x/sys v0.18.0 // indirect golang.org/x/term v0.18.0 // indirect @@ -175,5 +175,4 @@ replace ( cosmossdk.io/x/auth => ../auth cosmossdk.io/x/bank => ../bank cosmossdk.io/x/staking => ../staking - cosmossdk.io/x/tx => ../tx ) diff --git a/x/evidence/go.sum b/x/evidence/go.sum index 3fd57a0055b6..119c6de469be 100644 --- a/x/evidence/go.sum +++ b/x/evidence/go.sum @@ -14,6 +14,8 @@ cosmossdk.io/math v1.3.0 h1:RC+jryuKeytIiictDslBP9i1fhkVm6ZDmZEoNP316zE= cosmossdk.io/math v1.3.0/go.mod h1:vnRTxewy+M7BtXBNFybkuhSH4WfedVAAnERHgVFhp3k= cosmossdk.io/store v1.0.2 h1:lSg5BTvJBHUDwswNNyeh4K/CbqiHER73VU4nDNb8uk0= cosmossdk.io/store v1.0.2/go.mod h1:EFtENTqVTuWwitGW1VwaBct+yDagk7oG/axBMPH+FXs= +cosmossdk.io/x/tx v0.13.1 h1:Mg+EMp67Pz+NukbJqYxuo8uRp7N/a9uR+oVS9pONtj8= +cosmossdk.io/x/tx v0.13.1/go.mod h1:CBCU6fsRVz23QGFIQBb1DNX2DztJCf3jWyEkHY2nJQ0= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= @@ -296,8 +298,8 @@ github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= @@ -593,8 +595,8 @@ github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt2 github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= -github.com/prometheus/common v0.49.0 h1:ToNTdK4zSnPVJmh698mGFkDor9wBI/iGaJy5dbH1EgI= -github.com/prometheus/common v0.49.0/go.mod h1:Kxm+EULxRbUkjGU6WFsQqo3ORzB4tyKvlWFOE9mB2sE= +github.com/prometheus/common v0.50.0 h1:YSZE6aa9+luNa2da6/Tik0q0A5AbR+U003TItK57CPQ= +github.com/prometheus/common v0.50.0/go.mod h1:wHFBCEVWVmHMUpg7pYcOm2QUR/ocQdYSJVQJKnHc3xQ= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= @@ -797,8 +799,8 @@ golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= -golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= +golang.org/x/net v0.22.0 h1:9sGLhx7iRIHEiX0oAJ3MRZMUCElJgy7Br1nO+AMN3Tc= +golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -948,8 +950,8 @@ google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTp google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= -google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -964,8 +966,9 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/x/feegrant/go.mod b/x/feegrant/go.mod index 39b2fc7d7faa..06317301b706 100644 --- a/x/feegrant/go.mod +++ b/x/feegrant/go.mod @@ -20,13 +20,13 @@ require ( github.com/cosmos/cosmos-sdk v0.51.0 github.com/cosmos/gogoproto v1.4.11 github.com/golang/mock v1.6.0 - github.com/golang/protobuf v1.5.3 + github.com/golang/protobuf v1.5.4 github.com/grpc-ecosystem/grpc-gateway v1.16.0 github.com/spf13/cobra v1.8.0 github.com/stretchr/testify v1.9.0 google.golang.org/genproto/googleapis/api v0.0.0-20240205150955-31a09d347014 - google.golang.org/grpc v1.62.0 - google.golang.org/protobuf v1.32.0 + google.golang.org/grpc v1.62.1 + google.golang.org/protobuf v1.33.0 gotest.tools/v3 v3.5.1 ) @@ -36,7 +36,7 @@ require ( cosmossdk.io/x/auth v0.0.0-00010101000000-000000000000 cosmossdk.io/x/protocolpool v0.0.0-20230925135524-a1bc045b3190 // indirect cosmossdk.io/x/staking v0.0.0-00010101000000-000000000000 // indirect - cosmossdk.io/x/tx v0.13.0 // indirect + cosmossdk.io/x/tx v0.13.1 // indirect filippo.io/edwards25519 v1.1.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.2 // indirect @@ -127,7 +127,7 @@ require ( github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/prometheus/client_golang v1.19.0 // indirect github.com/prometheus/client_model v0.6.0 // indirect - github.com/prometheus/common v0.49.0 // indirect + github.com/prometheus/common v0.50.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/rogpeppe/go-internal v1.12.0 // indirect @@ -154,7 +154,7 @@ require ( golang.org/x/crypto v0.21.0 // indirect golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 // indirect golang.org/x/mod v0.15.0 // indirect - golang.org/x/net v0.21.0 // indirect + golang.org/x/net v0.22.0 // indirect golang.org/x/sync v0.6.0 // indirect golang.org/x/sys v0.18.0 // indirect golang.org/x/term v0.18.0 // indirect @@ -180,5 +180,4 @@ replace ( cosmossdk.io/x/bank => ../bank cosmossdk.io/x/gov => ../gov cosmossdk.io/x/staking => ../staking - cosmossdk.io/x/tx => ../tx ) diff --git a/x/feegrant/go.sum b/x/feegrant/go.sum index d7d2e2650014..c7f8dff91b04 100644 --- a/x/feegrant/go.sum +++ b/x/feegrant/go.sum @@ -16,6 +16,8 @@ cosmossdk.io/store v1.0.2 h1:lSg5BTvJBHUDwswNNyeh4K/CbqiHER73VU4nDNb8uk0= cosmossdk.io/store v1.0.2/go.mod h1:EFtENTqVTuWwitGW1VwaBct+yDagk7oG/axBMPH+FXs= cosmossdk.io/x/protocolpool v0.0.0-20230925135524-a1bc045b3190 h1:XQJj9Dv9Gtze0l2TF79BU5lkP6MkUveTUuKICmxoz+o= cosmossdk.io/x/protocolpool v0.0.0-20230925135524-a1bc045b3190/go.mod h1:7WUGupOvmlHJoIMBz1JbObQxeo6/TDiuDBxmtod8HRg= +cosmossdk.io/x/tx v0.13.1 h1:Mg+EMp67Pz+NukbJqYxuo8uRp7N/a9uR+oVS9pONtj8= +cosmossdk.io/x/tx v0.13.1/go.mod h1:CBCU6fsRVz23QGFIQBb1DNX2DztJCf3jWyEkHY2nJQ0= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= @@ -304,8 +306,8 @@ github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= @@ -603,8 +605,8 @@ github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt2 github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= -github.com/prometheus/common v0.49.0 h1:ToNTdK4zSnPVJmh698mGFkDor9wBI/iGaJy5dbH1EgI= -github.com/prometheus/common v0.49.0/go.mod h1:Kxm+EULxRbUkjGU6WFsQqo3ORzB4tyKvlWFOE9mB2sE= +github.com/prometheus/common v0.50.0 h1:YSZE6aa9+luNa2da6/Tik0q0A5AbR+U003TItK57CPQ= +github.com/prometheus/common v0.50.0/go.mod h1:wHFBCEVWVmHMUpg7pYcOm2QUR/ocQdYSJVQJKnHc3xQ= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= @@ -807,8 +809,8 @@ golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= -golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= +golang.org/x/net v0.22.0 h1:9sGLhx7iRIHEiX0oAJ3MRZMUCElJgy7Br1nO+AMN3Tc= +golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -959,8 +961,8 @@ google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTp google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= -google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -975,8 +977,9 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/x/gov/client/cli/tx_test.go b/x/gov/client/cli/tx_test.go index 4cbaf6972d96..dd903034e109 100644 --- a/x/gov/client/cli/tx_test.go +++ b/x/gov/client/cli/tx_test.go @@ -144,7 +144,7 @@ func (s *CLITestSuite) TestNewCmdSubmitProposal() { fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin("stake", sdkmath.NewInt(10))).String()), }, - "invalid decimal coin expression", + "invalid character in coin string", }, { "valid proposal", diff --git a/x/gov/client/cli/util_test.go b/x/gov/client/cli/util_test.go index bc8245df63aa..702d6d448ef6 100644 --- a/x/gov/client/cli/util_test.go +++ b/x/gov/client/cli/util_test.go @@ -368,7 +368,7 @@ func TestReadGovPropFlags(t *testing.T) { name: "only deposit invalid coins", fromAddr: nil, args: []string{argDeposit, "not really coins"}, - expErr: []string{"invalid deposit", "invalid decimal coin expression", "not really coins"}, + expErr: []string{"invalid deposit", "invalid character in denomination"}, }, { name: "only deposit two coins", @@ -398,19 +398,19 @@ func TestReadGovPropFlags(t *testing.T) { name: "only deposit coin 1 of 3 bad", fromAddr: nil, args: []string{argDeposit, "1bad^coin,2bcoin,3ccoin"}, - expErr: []string{"invalid deposit", "invalid decimal coin expression", "1bad^coin"}, + expErr: []string{"invalid deposit", "invalid character in denomination"}, }, { name: "only deposit coin 2 of 3 bad", fromAddr: nil, args: []string{argDeposit, "1acoin,2bad^coin,3ccoin"}, - expErr: []string{"invalid deposit", "invalid decimal coin expression", "2bad^coin"}, + expErr: []string{"invalid deposit", "invalid character in denomination"}, }, { name: "only deposit coin 3 of 3 bad", fromAddr: nil, args: []string{argDeposit, "1acoin,2bcoin,3bad^coin"}, - expErr: []string{"invalid deposit", "invalid decimal coin expression", "3bad^coin"}, + expErr: []string{"invalid deposit", "invalid character in denomination"}, }, // As far as I can tell, there's no way to make flagSet.GetString return an error for a defined string flag. // So I don't have a test for the "could not read deposit" error case. diff --git a/x/gov/go.mod b/x/gov/go.mod index faa9f700e79c..03b3dffd3404 100644 --- a/x/gov/go.mod +++ b/x/gov/go.mod @@ -24,7 +24,7 @@ require ( github.com/cosmos/cosmos-sdk v0.51.0 github.com/cosmos/gogoproto v1.4.11 github.com/golang/mock v1.6.0 - github.com/golang/protobuf v1.5.3 + github.com/golang/protobuf v1.5.4 github.com/grpc-ecosystem/grpc-gateway v1.16.0 github.com/manifoldco/promptui v0.9.0 github.com/spf13/cobra v1.8.0 @@ -32,14 +32,14 @@ require ( github.com/stretchr/testify v1.9.0 golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 google.golang.org/genproto/googleapis/api v0.0.0-20240205150955-31a09d347014 - google.golang.org/grpc v1.62.0 - google.golang.org/protobuf v1.32.0 + google.golang.org/grpc v1.62.1 + google.golang.org/protobuf v1.33.0 gotest.tools/v3 v3.5.1 ) require ( cosmossdk.io/x/auth v0.0.0-00010101000000-000000000000 - cosmossdk.io/x/tx v0.13.0 // indirect + cosmossdk.io/x/tx v0.13.1 // indirect filippo.io/edwards25519 v1.1.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.2 // indirect @@ -128,7 +128,7 @@ require ( github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/prometheus/client_golang v1.19.0 // indirect github.com/prometheus/client_model v0.6.0 // indirect - github.com/prometheus/common v0.49.0 // indirect + github.com/prometheus/common v0.50.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/rogpeppe/go-internal v1.12.0 // indirect @@ -153,7 +153,7 @@ require ( go.uber.org/multierr v1.11.0 // indirect golang.org/x/crypto v0.21.0 // indirect golang.org/x/mod v0.15.0 // indirect - golang.org/x/net v0.21.0 // indirect + golang.org/x/net v0.22.0 // indirect golang.org/x/sync v0.6.0 golang.org/x/sys v0.18.0 // indirect golang.org/x/term v0.18.0 // indirect @@ -178,5 +178,4 @@ replace ( cosmossdk.io/x/auth => ../auth cosmossdk.io/x/bank => ../bank cosmossdk.io/x/staking => ../staking - cosmossdk.io/x/tx => ../tx ) diff --git a/x/gov/go.sum b/x/gov/go.sum index d7d2e2650014..c7f8dff91b04 100644 --- a/x/gov/go.sum +++ b/x/gov/go.sum @@ -16,6 +16,8 @@ cosmossdk.io/store v1.0.2 h1:lSg5BTvJBHUDwswNNyeh4K/CbqiHER73VU4nDNb8uk0= cosmossdk.io/store v1.0.2/go.mod h1:EFtENTqVTuWwitGW1VwaBct+yDagk7oG/axBMPH+FXs= cosmossdk.io/x/protocolpool v0.0.0-20230925135524-a1bc045b3190 h1:XQJj9Dv9Gtze0l2TF79BU5lkP6MkUveTUuKICmxoz+o= cosmossdk.io/x/protocolpool v0.0.0-20230925135524-a1bc045b3190/go.mod h1:7WUGupOvmlHJoIMBz1JbObQxeo6/TDiuDBxmtod8HRg= +cosmossdk.io/x/tx v0.13.1 h1:Mg+EMp67Pz+NukbJqYxuo8uRp7N/a9uR+oVS9pONtj8= +cosmossdk.io/x/tx v0.13.1/go.mod h1:CBCU6fsRVz23QGFIQBb1DNX2DztJCf3jWyEkHY2nJQ0= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= @@ -304,8 +306,8 @@ github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= @@ -603,8 +605,8 @@ github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt2 github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= -github.com/prometheus/common v0.49.0 h1:ToNTdK4zSnPVJmh698mGFkDor9wBI/iGaJy5dbH1EgI= -github.com/prometheus/common v0.49.0/go.mod h1:Kxm+EULxRbUkjGU6WFsQqo3ORzB4tyKvlWFOE9mB2sE= +github.com/prometheus/common v0.50.0 h1:YSZE6aa9+luNa2da6/Tik0q0A5AbR+U003TItK57CPQ= +github.com/prometheus/common v0.50.0/go.mod h1:wHFBCEVWVmHMUpg7pYcOm2QUR/ocQdYSJVQJKnHc3xQ= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= @@ -807,8 +809,8 @@ golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= -golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= +golang.org/x/net v0.22.0 h1:9sGLhx7iRIHEiX0oAJ3MRZMUCElJgy7Br1nO+AMN3Tc= +golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -959,8 +961,8 @@ google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTp google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= -google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -975,8 +977,9 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/x/group/go.mod b/x/group/go.mod index 29da9d5d8311..0588e354d2a5 100644 --- a/x/group/go.mod +++ b/x/group/go.mod @@ -23,15 +23,15 @@ require ( github.com/cosmos/cosmos-sdk v0.51.0 github.com/cosmos/gogoproto v1.4.11 github.com/golang/mock v1.6.0 - github.com/golang/protobuf v1.5.3 + github.com/golang/protobuf v1.5.4 github.com/grpc-ecosystem/grpc-gateway v1.16.0 github.com/manifoldco/promptui v0.9.0 github.com/spf13/cobra v1.8.0 github.com/stretchr/testify v1.9.0 golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 google.golang.org/genproto/googleapis/api v0.0.0-20240205150955-31a09d347014 - google.golang.org/grpc v1.62.0 - google.golang.org/protobuf v1.32.0 + google.golang.org/grpc v1.62.1 + google.golang.org/protobuf v1.33.0 pgregory.net/rapid v1.1.0 ) @@ -40,7 +40,7 @@ require ( buf.build/gen/go/tendermint/tendermint/protocolbuffers/go v1.32.0-20231117195010-33ed361a9051.1 // indirect cosmossdk.io/collections v0.4.0 // indirect cosmossdk.io/x/accounts v0.0.0-00010101000000-000000000000 // indirect - cosmossdk.io/x/tx v0.13.0 // indirect + cosmossdk.io/x/tx v0.13.1 // indirect filippo.io/edwards25519 v1.1.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.2 // indirect @@ -130,7 +130,7 @@ require ( github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/prometheus/client_golang v1.19.0 // indirect github.com/prometheus/client_model v0.6.0 // indirect - github.com/prometheus/common v0.49.0 // indirect + github.com/prometheus/common v0.50.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/rogpeppe/go-internal v1.12.0 // indirect @@ -156,7 +156,7 @@ require ( go.uber.org/multierr v1.11.0 // indirect golang.org/x/crypto v0.21.0 // indirect golang.org/x/mod v0.15.0 // indirect - golang.org/x/net v0.21.0 // indirect + golang.org/x/net v0.22.0 // indirect golang.org/x/sync v0.6.0 // indirect golang.org/x/sys v0.18.0 // indirect golang.org/x/term v0.18.0 // indirect @@ -187,5 +187,4 @@ replace ( cosmossdk.io/x/protocolpool => ../protocolpool cosmossdk.io/x/slashing => ../slashing cosmossdk.io/x/staking => ../staking - cosmossdk.io/x/tx => ../tx ) diff --git a/x/group/go.sum b/x/group/go.sum index b7ec93bae2bd..9678247d1f7c 100644 --- a/x/group/go.sum +++ b/x/group/go.sum @@ -14,6 +14,8 @@ cosmossdk.io/math v1.3.0 h1:RC+jryuKeytIiictDslBP9i1fhkVm6ZDmZEoNP316zE= cosmossdk.io/math v1.3.0/go.mod h1:vnRTxewy+M7BtXBNFybkuhSH4WfedVAAnERHgVFhp3k= cosmossdk.io/store v1.0.2 h1:lSg5BTvJBHUDwswNNyeh4K/CbqiHER73VU4nDNb8uk0= cosmossdk.io/store v1.0.2/go.mod h1:EFtENTqVTuWwitGW1VwaBct+yDagk7oG/axBMPH+FXs= +cosmossdk.io/x/tx v0.13.1 h1:Mg+EMp67Pz+NukbJqYxuo8uRp7N/a9uR+oVS9pONtj8= +cosmossdk.io/x/tx v0.13.1/go.mod h1:CBCU6fsRVz23QGFIQBb1DNX2DztJCf3jWyEkHY2nJQ0= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= @@ -304,8 +306,8 @@ github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= @@ -603,8 +605,8 @@ github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt2 github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= -github.com/prometheus/common v0.49.0 h1:ToNTdK4zSnPVJmh698mGFkDor9wBI/iGaJy5dbH1EgI= -github.com/prometheus/common v0.49.0/go.mod h1:Kxm+EULxRbUkjGU6WFsQqo3ORzB4tyKvlWFOE9mB2sE= +github.com/prometheus/common v0.50.0 h1:YSZE6aa9+luNa2da6/Tik0q0A5AbR+U003TItK57CPQ= +github.com/prometheus/common v0.50.0/go.mod h1:wHFBCEVWVmHMUpg7pYcOm2QUR/ocQdYSJVQJKnHc3xQ= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= @@ -807,8 +809,8 @@ golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= -golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= +golang.org/x/net v0.22.0 h1:9sGLhx7iRIHEiX0oAJ3MRZMUCElJgy7Br1nO+AMN3Tc= +golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -959,8 +961,8 @@ google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTp google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= -google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -975,8 +977,9 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/x/mint/go.mod b/x/mint/go.mod index 0ca1057bbb55..eecffb89381e 100644 --- a/x/mint/go.mod +++ b/x/mint/go.mod @@ -17,11 +17,11 @@ require ( github.com/cosmos/cosmos-sdk v0.51.0 github.com/cosmos/gogoproto v1.4.11 github.com/golang/mock v1.6.0 - github.com/golang/protobuf v1.5.3 + github.com/golang/protobuf v1.5.4 github.com/grpc-ecosystem/grpc-gateway v1.16.0 github.com/stretchr/testify v1.9.0 google.golang.org/genproto/googleapis/api v0.0.0-20240205150955-31a09d347014 - google.golang.org/grpc v1.62.0 + google.golang.org/grpc v1.62.1 gotest.tools/v3 v3.5.1 ) @@ -31,7 +31,7 @@ require ( cosmossdk.io/x/auth v0.0.0-00010101000000-000000000000 cosmossdk.io/x/bank v0.0.0-00010101000000-000000000000 // indirect cosmossdk.io/x/staking v0.0.0-00010101000000-000000000000 // indirect - cosmossdk.io/x/tx v0.13.0 // indirect + cosmossdk.io/x/tx v0.13.1 // indirect filippo.io/edwards25519 v1.1.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.2 // indirect @@ -121,7 +121,7 @@ require ( github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/prometheus/client_golang v1.19.0 // indirect github.com/prometheus/client_model v0.6.0 // indirect - github.com/prometheus/common v0.49.0 // indirect + github.com/prometheus/common v0.50.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/rogpeppe/go-internal v1.12.0 // indirect @@ -149,7 +149,7 @@ require ( golang.org/x/crypto v0.21.0 // indirect golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 // indirect golang.org/x/mod v0.15.0 // indirect - golang.org/x/net v0.21.0 // indirect + golang.org/x/net v0.22.0 // indirect golang.org/x/sync v0.6.0 // indirect golang.org/x/sys v0.18.0 // indirect golang.org/x/term v0.18.0 // indirect @@ -157,7 +157,7 @@ require ( golang.org/x/tools v0.18.0 // indirect google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240221002015-b0ce06bbee7c // indirect - google.golang.org/protobuf v1.32.0 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect nhooyr.io/websocket v1.8.6 // indirect @@ -176,5 +176,4 @@ replace ( cosmossdk.io/x/auth => ../auth cosmossdk.io/x/bank => ../bank cosmossdk.io/x/staking => ../staking - cosmossdk.io/x/tx => ../tx ) diff --git a/x/mint/go.sum b/x/mint/go.sum index 3fd57a0055b6..119c6de469be 100644 --- a/x/mint/go.sum +++ b/x/mint/go.sum @@ -14,6 +14,8 @@ cosmossdk.io/math v1.3.0 h1:RC+jryuKeytIiictDslBP9i1fhkVm6ZDmZEoNP316zE= cosmossdk.io/math v1.3.0/go.mod h1:vnRTxewy+M7BtXBNFybkuhSH4WfedVAAnERHgVFhp3k= cosmossdk.io/store v1.0.2 h1:lSg5BTvJBHUDwswNNyeh4K/CbqiHER73VU4nDNb8uk0= cosmossdk.io/store v1.0.2/go.mod h1:EFtENTqVTuWwitGW1VwaBct+yDagk7oG/axBMPH+FXs= +cosmossdk.io/x/tx v0.13.1 h1:Mg+EMp67Pz+NukbJqYxuo8uRp7N/a9uR+oVS9pONtj8= +cosmossdk.io/x/tx v0.13.1/go.mod h1:CBCU6fsRVz23QGFIQBb1DNX2DztJCf3jWyEkHY2nJQ0= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= @@ -296,8 +298,8 @@ github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= @@ -593,8 +595,8 @@ github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt2 github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= -github.com/prometheus/common v0.49.0 h1:ToNTdK4zSnPVJmh698mGFkDor9wBI/iGaJy5dbH1EgI= -github.com/prometheus/common v0.49.0/go.mod h1:Kxm+EULxRbUkjGU6WFsQqo3ORzB4tyKvlWFOE9mB2sE= +github.com/prometheus/common v0.50.0 h1:YSZE6aa9+luNa2da6/Tik0q0A5AbR+U003TItK57CPQ= +github.com/prometheus/common v0.50.0/go.mod h1:wHFBCEVWVmHMUpg7pYcOm2QUR/ocQdYSJVQJKnHc3xQ= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= @@ -797,8 +799,8 @@ golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= -golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= +golang.org/x/net v0.22.0 h1:9sGLhx7iRIHEiX0oAJ3MRZMUCElJgy7Br1nO+AMN3Tc= +golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -948,8 +950,8 @@ google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTp google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= -google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -964,8 +966,9 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/x/nft/go.mod b/x/nft/go.mod index 4242c952404e..b95c4a618226 100644 --- a/x/nft/go.mod +++ b/x/nft/go.mod @@ -14,11 +14,11 @@ require ( github.com/cosmos/cosmos-sdk v0.51.0 github.com/cosmos/gogoproto v1.4.11 github.com/golang/mock v1.6.0 - github.com/golang/protobuf v1.5.3 + github.com/golang/protobuf v1.5.4 github.com/grpc-ecosystem/grpc-gateway v1.16.0 github.com/stretchr/testify v1.9.0 google.golang.org/genproto/googleapis/api v0.0.0-20240205150955-31a09d347014 - google.golang.org/grpc v1.62.0 + google.golang.org/grpc v1.62.1 ) require ( @@ -29,7 +29,7 @@ require ( cosmossdk.io/x/auth v0.0.0-00010101000000-000000000000 // indirect cosmossdk.io/x/bank v0.0.0-00010101000000-000000000000 // indirect cosmossdk.io/x/staking v0.0.0-00010101000000-000000000000 // indirect - cosmossdk.io/x/tx v0.13.0 // indirect + cosmossdk.io/x/tx v0.13.1 // indirect filippo.io/edwards25519 v1.1.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.2 // indirect @@ -120,7 +120,7 @@ require ( github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/prometheus/client_golang v1.19.0 // indirect github.com/prometheus/client_model v0.6.0 // indirect - github.com/prometheus/common v0.49.0 // indirect + github.com/prometheus/common v0.50.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/rogpeppe/go-internal v1.12.0 // indirect @@ -148,7 +148,7 @@ require ( golang.org/x/crypto v0.21.0 // indirect golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 // indirect golang.org/x/mod v0.15.0 // indirect - golang.org/x/net v0.21.0 // indirect + golang.org/x/net v0.22.0 // indirect golang.org/x/sync v0.6.0 // indirect golang.org/x/sys v0.18.0 // indirect golang.org/x/term v0.18.0 // indirect @@ -156,7 +156,7 @@ require ( golang.org/x/tools v0.18.0 // indirect google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240221002015-b0ce06bbee7c // indirect - google.golang.org/protobuf v1.32.0 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect gotest.tools/v3 v3.5.1 // indirect @@ -175,5 +175,4 @@ replace ( cosmossdk.io/x/auth => ../auth cosmossdk.io/x/bank => ../bank cosmossdk.io/x/staking => ../staking - cosmossdk.io/x/tx => ../tx ) diff --git a/x/nft/go.sum b/x/nft/go.sum index 3fd57a0055b6..119c6de469be 100644 --- a/x/nft/go.sum +++ b/x/nft/go.sum @@ -14,6 +14,8 @@ cosmossdk.io/math v1.3.0 h1:RC+jryuKeytIiictDslBP9i1fhkVm6ZDmZEoNP316zE= cosmossdk.io/math v1.3.0/go.mod h1:vnRTxewy+M7BtXBNFybkuhSH4WfedVAAnERHgVFhp3k= cosmossdk.io/store v1.0.2 h1:lSg5BTvJBHUDwswNNyeh4K/CbqiHER73VU4nDNb8uk0= cosmossdk.io/store v1.0.2/go.mod h1:EFtENTqVTuWwitGW1VwaBct+yDagk7oG/axBMPH+FXs= +cosmossdk.io/x/tx v0.13.1 h1:Mg+EMp67Pz+NukbJqYxuo8uRp7N/a9uR+oVS9pONtj8= +cosmossdk.io/x/tx v0.13.1/go.mod h1:CBCU6fsRVz23QGFIQBb1DNX2DztJCf3jWyEkHY2nJQ0= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= @@ -296,8 +298,8 @@ github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= @@ -593,8 +595,8 @@ github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt2 github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= -github.com/prometheus/common v0.49.0 h1:ToNTdK4zSnPVJmh698mGFkDor9wBI/iGaJy5dbH1EgI= -github.com/prometheus/common v0.49.0/go.mod h1:Kxm+EULxRbUkjGU6WFsQqo3ORzB4tyKvlWFOE9mB2sE= +github.com/prometheus/common v0.50.0 h1:YSZE6aa9+luNa2da6/Tik0q0A5AbR+U003TItK57CPQ= +github.com/prometheus/common v0.50.0/go.mod h1:wHFBCEVWVmHMUpg7pYcOm2QUR/ocQdYSJVQJKnHc3xQ= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= @@ -797,8 +799,8 @@ golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= -golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= +golang.org/x/net v0.22.0 h1:9sGLhx7iRIHEiX0oAJ3MRZMUCElJgy7Br1nO+AMN3Tc= +golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -948,8 +950,8 @@ google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTp google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= -google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -964,8 +966,9 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/x/params/go.mod b/x/params/go.mod index 4458b3a04543..01345428b3a9 100644 --- a/x/params/go.mod +++ b/x/params/go.mod @@ -17,12 +17,12 @@ require ( github.com/cosmos/cosmos-sdk v0.51.0 github.com/cosmos/gogoproto v1.4.11 github.com/golang/mock v1.6.0 - github.com/golang/protobuf v1.5.3 + github.com/golang/protobuf v1.5.4 github.com/grpc-ecosystem/grpc-gateway v1.16.0 github.com/spf13/cobra v1.8.0 github.com/stretchr/testify v1.9.0 google.golang.org/genproto/googleapis/api v0.0.0-20240205150955-31a09d347014 - google.golang.org/grpc v1.62.0 + google.golang.org/grpc v1.62.1 ) require ( @@ -33,7 +33,7 @@ require ( cosmossdk.io/x/auth v0.0.0-00010101000000-000000000000 // indirect cosmossdk.io/x/bank v0.0.0-00010101000000-000000000000 // indirect cosmossdk.io/x/staking v0.0.0-00010101000000-000000000000 // indirect - cosmossdk.io/x/tx v0.13.0 // indirect + cosmossdk.io/x/tx v0.13.1 // indirect filippo.io/edwards25519 v1.1.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.2 // indirect @@ -122,7 +122,7 @@ require ( github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/prometheus/client_golang v1.19.0 // indirect github.com/prometheus/client_model v0.6.0 // indirect - github.com/prometheus/common v0.49.0 // indirect + github.com/prometheus/common v0.50.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/rogpeppe/go-internal v1.12.0 // indirect @@ -149,7 +149,7 @@ require ( golang.org/x/crypto v0.21.0 // indirect golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 // indirect golang.org/x/mod v0.15.0 // indirect - golang.org/x/net v0.21.0 // indirect + golang.org/x/net v0.22.0 // indirect golang.org/x/sync v0.6.0 // indirect golang.org/x/sys v0.18.0 // indirect golang.org/x/term v0.18.0 // indirect @@ -157,7 +157,7 @@ require ( golang.org/x/tools v0.18.0 // indirect google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240221002015-b0ce06bbee7c // indirect - google.golang.org/protobuf v1.32.0 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect gotest.tools/v3 v3.5.1 // indirect @@ -181,5 +181,4 @@ replace ( cosmossdk.io/x/protocolpool => ../protocolpool cosmossdk.io/x/slashing => ../slashing cosmossdk.io/x/staking => ../staking - cosmossdk.io/x/tx => ../tx ) diff --git a/x/params/go.sum b/x/params/go.sum index 3fd57a0055b6..119c6de469be 100644 --- a/x/params/go.sum +++ b/x/params/go.sum @@ -14,6 +14,8 @@ cosmossdk.io/math v1.3.0 h1:RC+jryuKeytIiictDslBP9i1fhkVm6ZDmZEoNP316zE= cosmossdk.io/math v1.3.0/go.mod h1:vnRTxewy+M7BtXBNFybkuhSH4WfedVAAnERHgVFhp3k= cosmossdk.io/store v1.0.2 h1:lSg5BTvJBHUDwswNNyeh4K/CbqiHER73VU4nDNb8uk0= cosmossdk.io/store v1.0.2/go.mod h1:EFtENTqVTuWwitGW1VwaBct+yDagk7oG/axBMPH+FXs= +cosmossdk.io/x/tx v0.13.1 h1:Mg+EMp67Pz+NukbJqYxuo8uRp7N/a9uR+oVS9pONtj8= +cosmossdk.io/x/tx v0.13.1/go.mod h1:CBCU6fsRVz23QGFIQBb1DNX2DztJCf3jWyEkHY2nJQ0= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= @@ -296,8 +298,8 @@ github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= @@ -593,8 +595,8 @@ github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt2 github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= -github.com/prometheus/common v0.49.0 h1:ToNTdK4zSnPVJmh698mGFkDor9wBI/iGaJy5dbH1EgI= -github.com/prometheus/common v0.49.0/go.mod h1:Kxm+EULxRbUkjGU6WFsQqo3ORzB4tyKvlWFOE9mB2sE= +github.com/prometheus/common v0.50.0 h1:YSZE6aa9+luNa2da6/Tik0q0A5AbR+U003TItK57CPQ= +github.com/prometheus/common v0.50.0/go.mod h1:wHFBCEVWVmHMUpg7pYcOm2QUR/ocQdYSJVQJKnHc3xQ= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= @@ -797,8 +799,8 @@ golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= -golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= +golang.org/x/net v0.22.0 h1:9sGLhx7iRIHEiX0oAJ3MRZMUCElJgy7Br1nO+AMN3Tc= +golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -948,8 +950,8 @@ google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTp google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= -google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -964,8 +966,9 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/x/protocolpool/go.mod b/x/protocolpool/go.mod index 25300183f94d..0bb4361f7caa 100644 --- a/x/protocolpool/go.mod +++ b/x/protocolpool/go.mod @@ -16,12 +16,12 @@ require ( github.com/cosmos/cosmos-sdk v0.51.0 github.com/cosmos/gogoproto v1.4.11 github.com/golang/mock v1.6.0 - github.com/golang/protobuf v1.5.3 + github.com/golang/protobuf v1.5.4 github.com/grpc-ecosystem/grpc-gateway v1.16.0 github.com/stretchr/testify v1.9.0 google.golang.org/genproto/googleapis/api v0.0.0-20240205150955-31a09d347014 - google.golang.org/grpc v1.62.0 - google.golang.org/protobuf v1.32.0 + google.golang.org/grpc v1.62.1 + google.golang.org/protobuf v1.33.0 gotest.tools/v3 v3.5.1 ) @@ -31,7 +31,7 @@ require ( cosmossdk.io/x/accounts v0.0.0-00010101000000-000000000000 // indirect cosmossdk.io/x/bank v0.0.0-00010101000000-000000000000 // indirect cosmossdk.io/x/staking v0.0.0-00010101000000-000000000000 // indirect - cosmossdk.io/x/tx v0.13.0 // indirect + cosmossdk.io/x/tx v0.13.1 // indirect filippo.io/edwards25519 v1.1.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.2 // indirect @@ -122,7 +122,7 @@ require ( github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/prometheus/client_golang v1.19.0 // indirect github.com/prometheus/client_model v0.6.0 // indirect - github.com/prometheus/common v0.49.0 // indirect + github.com/prometheus/common v0.50.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/rogpeppe/go-internal v1.12.0 // indirect @@ -150,7 +150,7 @@ require ( golang.org/x/crypto v0.21.0 // indirect golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 // indirect golang.org/x/mod v0.15.0 // indirect - golang.org/x/net v0.21.0 // indirect + golang.org/x/net v0.22.0 // indirect golang.org/x/sync v0.6.0 // indirect golang.org/x/sys v0.18.0 // indirect golang.org/x/term v0.18.0 // indirect @@ -175,5 +175,4 @@ replace ( cosmossdk.io/x/auth => ../auth cosmossdk.io/x/bank => ../bank cosmossdk.io/x/staking => ../staking - cosmossdk.io/x/tx => ../tx ) diff --git a/x/protocolpool/go.sum b/x/protocolpool/go.sum index 3fd57a0055b6..119c6de469be 100644 --- a/x/protocolpool/go.sum +++ b/x/protocolpool/go.sum @@ -14,6 +14,8 @@ cosmossdk.io/math v1.3.0 h1:RC+jryuKeytIiictDslBP9i1fhkVm6ZDmZEoNP316zE= cosmossdk.io/math v1.3.0/go.mod h1:vnRTxewy+M7BtXBNFybkuhSH4WfedVAAnERHgVFhp3k= cosmossdk.io/store v1.0.2 h1:lSg5BTvJBHUDwswNNyeh4K/CbqiHER73VU4nDNb8uk0= cosmossdk.io/store v1.0.2/go.mod h1:EFtENTqVTuWwitGW1VwaBct+yDagk7oG/axBMPH+FXs= +cosmossdk.io/x/tx v0.13.1 h1:Mg+EMp67Pz+NukbJqYxuo8uRp7N/a9uR+oVS9pONtj8= +cosmossdk.io/x/tx v0.13.1/go.mod h1:CBCU6fsRVz23QGFIQBb1DNX2DztJCf3jWyEkHY2nJQ0= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= @@ -296,8 +298,8 @@ github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= @@ -593,8 +595,8 @@ github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt2 github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= -github.com/prometheus/common v0.49.0 h1:ToNTdK4zSnPVJmh698mGFkDor9wBI/iGaJy5dbH1EgI= -github.com/prometheus/common v0.49.0/go.mod h1:Kxm+EULxRbUkjGU6WFsQqo3ORzB4tyKvlWFOE9mB2sE= +github.com/prometheus/common v0.50.0 h1:YSZE6aa9+luNa2da6/Tik0q0A5AbR+U003TItK57CPQ= +github.com/prometheus/common v0.50.0/go.mod h1:wHFBCEVWVmHMUpg7pYcOm2QUR/ocQdYSJVQJKnHc3xQ= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= @@ -797,8 +799,8 @@ golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= -golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= +golang.org/x/net v0.22.0 h1:9sGLhx7iRIHEiX0oAJ3MRZMUCElJgy7Br1nO+AMN3Tc= +golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -948,8 +950,8 @@ google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTp google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= -google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -964,8 +966,9 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/x/slashing/go.mod b/x/slashing/go.mod index 7f3bd71aa9a0..0027c5231320 100644 --- a/x/slashing/go.mod +++ b/x/slashing/go.mod @@ -20,12 +20,12 @@ require ( github.com/cosmos/cosmos-sdk v0.51.0 github.com/cosmos/gogoproto v1.4.11 github.com/golang/mock v1.6.0 - github.com/golang/protobuf v1.5.3 + github.com/golang/protobuf v1.5.4 github.com/grpc-ecosystem/grpc-gateway v1.16.0 github.com/stretchr/testify v1.9.0 google.golang.org/genproto/googleapis/api v0.0.0-20240205150955-31a09d347014 - google.golang.org/grpc v1.62.0 - google.golang.org/protobuf v1.32.0 + google.golang.org/grpc v1.62.1 + google.golang.org/protobuf v1.33.0 gotest.tools/v3 v3.5.1 ) @@ -34,7 +34,7 @@ require ( buf.build/gen/go/tendermint/tendermint/protocolbuffers/go v1.32.0-20231117195010-33ed361a9051.1 // indirect cosmossdk.io/x/accounts v0.0.0-00010101000000-000000000000 // indirect cosmossdk.io/x/bank v0.0.0-00010101000000-000000000000 // indirect - cosmossdk.io/x/tx v0.13.0 // indirect + cosmossdk.io/x/tx v0.13.1 // indirect filippo.io/edwards25519 v1.1.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.2 // indirect @@ -123,7 +123,7 @@ require ( github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/prometheus/client_golang v1.19.0 // indirect github.com/prometheus/client_model v0.6.0 // indirect - github.com/prometheus/common v0.49.0 // indirect + github.com/prometheus/common v0.50.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/rogpeppe/go-internal v1.12.0 // indirect @@ -151,7 +151,7 @@ require ( golang.org/x/crypto v0.21.0 // indirect golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 // indirect golang.org/x/mod v0.15.0 // indirect - golang.org/x/net v0.21.0 // indirect + golang.org/x/net v0.22.0 // indirect golang.org/x/sync v0.6.0 // indirect golang.org/x/sys v0.18.0 // indirect golang.org/x/term v0.18.0 // indirect @@ -177,5 +177,4 @@ replace ( cosmossdk.io/x/auth => ../auth cosmossdk.io/x/bank => ../bank cosmossdk.io/x/staking => ../staking - cosmossdk.io/x/tx => ../tx ) diff --git a/x/slashing/go.sum b/x/slashing/go.sum index 815ad1a6e3e7..fbc1a49a504f 100644 --- a/x/slashing/go.sum +++ b/x/slashing/go.sum @@ -14,6 +14,8 @@ cosmossdk.io/math v1.3.0 h1:RC+jryuKeytIiictDslBP9i1fhkVm6ZDmZEoNP316zE= cosmossdk.io/math v1.3.0/go.mod h1:vnRTxewy+M7BtXBNFybkuhSH4WfedVAAnERHgVFhp3k= cosmossdk.io/store v1.0.2 h1:lSg5BTvJBHUDwswNNyeh4K/CbqiHER73VU4nDNb8uk0= cosmossdk.io/store v1.0.2/go.mod h1:EFtENTqVTuWwitGW1VwaBct+yDagk7oG/axBMPH+FXs= +cosmossdk.io/x/tx v0.13.1 h1:Mg+EMp67Pz+NukbJqYxuo8uRp7N/a9uR+oVS9pONtj8= +cosmossdk.io/x/tx v0.13.1/go.mod h1:CBCU6fsRVz23QGFIQBb1DNX2DztJCf3jWyEkHY2nJQ0= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= @@ -298,8 +300,8 @@ github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= @@ -595,8 +597,8 @@ github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt2 github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= -github.com/prometheus/common v0.49.0 h1:ToNTdK4zSnPVJmh698mGFkDor9wBI/iGaJy5dbH1EgI= -github.com/prometheus/common v0.49.0/go.mod h1:Kxm+EULxRbUkjGU6WFsQqo3ORzB4tyKvlWFOE9mB2sE= +github.com/prometheus/common v0.50.0 h1:YSZE6aa9+luNa2da6/Tik0q0A5AbR+U003TItK57CPQ= +github.com/prometheus/common v0.50.0/go.mod h1:wHFBCEVWVmHMUpg7pYcOm2QUR/ocQdYSJVQJKnHc3xQ= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= @@ -799,8 +801,8 @@ golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= -golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= +golang.org/x/net v0.22.0 h1:9sGLhx7iRIHEiX0oAJ3MRZMUCElJgy7Br1nO+AMN3Tc= +golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -950,8 +952,8 @@ google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTp google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= -google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -966,8 +968,9 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/x/staking/go.mod b/x/staking/go.mod index c9b4fed66756..51574a695cb1 100644 --- a/x/staking/go.mod +++ b/x/staking/go.mod @@ -17,7 +17,7 @@ require ( github.com/cosmos/cosmos-sdk v0.51.0 github.com/cosmos/gogoproto v1.4.11 github.com/golang/mock v1.6.0 - github.com/golang/protobuf v1.5.3 + github.com/golang/protobuf v1.5.4 github.com/grpc-ecosystem/grpc-gateway v1.16.0 github.com/hashicorp/go-metrics v0.5.3 github.com/spf13/cobra v1.8.0 @@ -25,8 +25,8 @@ require ( github.com/stretchr/testify v1.9.0 golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 google.golang.org/genproto/googleapis/api v0.0.0-20240205150955-31a09d347014 - google.golang.org/grpc v1.62.0 - google.golang.org/protobuf v1.32.0 + google.golang.org/grpc v1.62.1 + google.golang.org/protobuf v1.33.0 gotest.tools/v3 v3.5.1 ) @@ -35,7 +35,7 @@ require ( buf.build/gen/go/tendermint/tendermint/protocolbuffers/go v1.32.0-20231117195010-33ed361a9051.1 // indirect cosmossdk.io/x/auth v0.0.0-00010101000000-000000000000 cosmossdk.io/x/bank v0.0.0-00010101000000-000000000000 // indirect - cosmossdk.io/x/tx v0.13.0 // indirect + cosmossdk.io/x/tx v0.13.1 // indirect filippo.io/edwards25519 v1.1.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.2 // indirect @@ -124,7 +124,7 @@ require ( github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/prometheus/client_golang v1.19.0 // indirect github.com/prometheus/client_model v0.6.0 // indirect - github.com/prometheus/common v0.49.0 // indirect + github.com/prometheus/common v0.50.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/rogpeppe/go-internal v1.12.0 // indirect @@ -149,7 +149,7 @@ require ( go.uber.org/multierr v1.11.0 // indirect golang.org/x/crypto v0.21.0 // indirect golang.org/x/mod v0.15.0 // indirect - golang.org/x/net v0.21.0 // indirect + golang.org/x/net v0.22.0 // indirect golang.org/x/sync v0.6.0 // indirect golang.org/x/sys v0.18.0 // indirect golang.org/x/term v0.18.0 // indirect @@ -174,5 +174,4 @@ replace ( cosmossdk.io/x/accounts => ../accounts cosmossdk.io/x/auth => ../auth cosmossdk.io/x/bank => ../bank - cosmossdk.io/x/tx => ../tx ) diff --git a/x/staking/go.sum b/x/staking/go.sum index 3fd57a0055b6..119c6de469be 100644 --- a/x/staking/go.sum +++ b/x/staking/go.sum @@ -14,6 +14,8 @@ cosmossdk.io/math v1.3.0 h1:RC+jryuKeytIiictDslBP9i1fhkVm6ZDmZEoNP316zE= cosmossdk.io/math v1.3.0/go.mod h1:vnRTxewy+M7BtXBNFybkuhSH4WfedVAAnERHgVFhp3k= cosmossdk.io/store v1.0.2 h1:lSg5BTvJBHUDwswNNyeh4K/CbqiHER73VU4nDNb8uk0= cosmossdk.io/store v1.0.2/go.mod h1:EFtENTqVTuWwitGW1VwaBct+yDagk7oG/axBMPH+FXs= +cosmossdk.io/x/tx v0.13.1 h1:Mg+EMp67Pz+NukbJqYxuo8uRp7N/a9uR+oVS9pONtj8= +cosmossdk.io/x/tx v0.13.1/go.mod h1:CBCU6fsRVz23QGFIQBb1DNX2DztJCf3jWyEkHY2nJQ0= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= @@ -296,8 +298,8 @@ github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= @@ -593,8 +595,8 @@ github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt2 github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= -github.com/prometheus/common v0.49.0 h1:ToNTdK4zSnPVJmh698mGFkDor9wBI/iGaJy5dbH1EgI= -github.com/prometheus/common v0.49.0/go.mod h1:Kxm+EULxRbUkjGU6WFsQqo3ORzB4tyKvlWFOE9mB2sE= +github.com/prometheus/common v0.50.0 h1:YSZE6aa9+luNa2da6/Tik0q0A5AbR+U003TItK57CPQ= +github.com/prometheus/common v0.50.0/go.mod h1:wHFBCEVWVmHMUpg7pYcOm2QUR/ocQdYSJVQJKnHc3xQ= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= @@ -797,8 +799,8 @@ golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= -golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= +golang.org/x/net v0.22.0 h1:9sGLhx7iRIHEiX0oAJ3MRZMUCElJgy7Br1nO+AMN3Tc= +golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -948,8 +950,8 @@ google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTp google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= -google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -964,8 +966,9 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/x/tx/go.mod b/x/tx/go.mod index b6841dc64c4c..4f89786f559d 100644 --- a/x/tx/go.mod +++ b/x/tx/go.mod @@ -15,14 +15,14 @@ require ( github.com/pkg/errors v0.9.1 github.com/stretchr/testify v1.9.0 github.com/tendermint/go-amino v0.16.0 - google.golang.org/protobuf v1.32.0 + google.golang.org/protobuf v1.33.0 gotest.tools/v3 v3.5.1 pgregory.net/rapid v1.1.0 ) require ( github.com/davecgh/go-spew v1.1.1 // indirect - github.com/golang/protobuf v1.5.3 // indirect + github.com/golang/protobuf v1.5.4 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 // indirect golang.org/x/net v0.21.0 // indirect @@ -31,7 +31,7 @@ require ( google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20240205150955-31a09d347014 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240221002015-b0ce06bbee7c // indirect - google.golang.org/grpc v1.62.0 // indirect + google.golang.org/grpc v1.62.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/x/tx/go.sum b/x/tx/go.sum index 68c6a1e7ee63..ace680bf4848 100644 --- a/x/tx/go.sum +++ b/x/tx/go.sum @@ -14,10 +14,8 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a1/R87v0= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= @@ -52,7 +50,6 @@ golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 h1:9+tzLLstTlPTRyJTh+ah5wIMsBW5c4tQwGTN3thOW9Y= google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9/go.mod h1:mqHbVIp48Muh7Ywss/AD6I5kNVKZMmAa/QEW58Gxp2s= @@ -60,12 +57,10 @@ google.golang.org/genproto/googleapis/api v0.0.0-20240205150955-31a09d347014 h1: google.golang.org/genproto/googleapis/api v0.0.0-20240205150955-31a09d347014/go.mod h1:rbHMSEDyoYX62nRVLOCc4Qt1HbsdytAYoVwgjiOhF3I= google.golang.org/genproto/googleapis/rpc v0.0.0-20240221002015-b0ce06bbee7c h1:NUsgEN92SQQqzfA+YtqYNqYmB3DMMYLlIwUZAQFVFbo= google.golang.org/genproto/googleapis/rpc v0.0.0-20240221002015-b0ce06bbee7c/go.mod h1:H4O17MA/PE9BsGx3w+a+W2VOLLD1Qf7oJneAoU6WktY= -google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= -google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= -google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= diff --git a/x/upgrade/go.mod b/x/upgrade/go.mod index 6d56912b5ee4..31811c5113a0 100644 --- a/x/upgrade/go.mod +++ b/x/upgrade/go.mod @@ -16,7 +16,7 @@ require ( github.com/cosmos/cosmos-proto v1.0.0-beta.4 github.com/cosmos/cosmos-sdk v0.51.0 github.com/cosmos/gogoproto v1.4.11 - github.com/golang/protobuf v1.5.3 + github.com/golang/protobuf v1.5.4 github.com/grpc-ecosystem/grpc-gateway v1.16.0 github.com/hashicorp/go-cleanhttp v0.5.2 github.com/hashicorp/go-getter v1.7.3 @@ -26,8 +26,8 @@ require ( github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.9.0 google.golang.org/genproto/googleapis/api v0.0.0-20240205150955-31a09d347014 - google.golang.org/grpc v1.62.0 - google.golang.org/protobuf v1.32.0 + google.golang.org/grpc v1.62.1 + google.golang.org/protobuf v1.33.0 ) require ( @@ -43,7 +43,7 @@ require ( cosmossdk.io/x/accounts v0.0.0-00010101000000-000000000000 // indirect cosmossdk.io/x/bank v0.0.0-00010101000000-000000000000 // indirect cosmossdk.io/x/staking v0.0.0-00010101000000-000000000000 // indirect - cosmossdk.io/x/tx v0.13.0 // indirect + cosmossdk.io/x/tx v0.13.1 // indirect filippo.io/edwards25519 v1.1.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.2 // indirect @@ -147,7 +147,7 @@ require ( github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/prometheus/client_golang v1.19.0 // indirect github.com/prometheus/client_model v0.6.0 // indirect - github.com/prometheus/common v0.49.0 // indirect + github.com/prometheus/common v0.50.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/rogpeppe/go-internal v1.12.0 // indirect @@ -179,8 +179,8 @@ require ( golang.org/x/crypto v0.21.0 // indirect golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 // indirect golang.org/x/mod v0.15.0 // indirect - golang.org/x/net v0.21.0 // indirect - golang.org/x/oauth2 v0.17.0 // indirect + golang.org/x/net v0.22.0 // indirect + golang.org/x/oauth2 v0.18.0 // indirect golang.org/x/sync v0.6.0 // indirect golang.org/x/sys v0.18.0 // indirect golang.org/x/term v0.18.0 // indirect @@ -211,5 +211,4 @@ replace ( cosmossdk.io/x/bank => ../bank cosmossdk.io/x/gov => ../gov cosmossdk.io/x/staking => ../staking - cosmossdk.io/x/tx => ../tx ) diff --git a/x/upgrade/go.sum b/x/upgrade/go.sum index 3d95da986863..0de07a6c87d6 100644 --- a/x/upgrade/go.sum +++ b/x/upgrade/go.sum @@ -200,6 +200,8 @@ cosmossdk.io/store v1.0.2 h1:lSg5BTvJBHUDwswNNyeh4K/CbqiHER73VU4nDNb8uk0= cosmossdk.io/store v1.0.2/go.mod h1:EFtENTqVTuWwitGW1VwaBct+yDagk7oG/axBMPH+FXs= cosmossdk.io/x/protocolpool v0.0.0-20230925135524-a1bc045b3190 h1:XQJj9Dv9Gtze0l2TF79BU5lkP6MkUveTUuKICmxoz+o= cosmossdk.io/x/protocolpool v0.0.0-20230925135524-a1bc045b3190/go.mod h1:7WUGupOvmlHJoIMBz1JbObQxeo6/TDiuDBxmtod8HRg= +cosmossdk.io/x/tx v0.13.1 h1:Mg+EMp67Pz+NukbJqYxuo8uRp7N/a9uR+oVS9pONtj8= +cosmossdk.io/x/tx v0.13.1/go.mod h1:CBCU6fsRVz23QGFIQBb1DNX2DztJCf3jWyEkHY2nJQ0= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= @@ -523,8 +525,8 @@ github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= @@ -890,8 +892,8 @@ github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt2 github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= -github.com/prometheus/common v0.49.0 h1:ToNTdK4zSnPVJmh698mGFkDor9wBI/iGaJy5dbH1EgI= -github.com/prometheus/common v0.49.0/go.mod h1:Kxm+EULxRbUkjGU6WFsQqo3ORzB4tyKvlWFOE9mB2sE= +github.com/prometheus/common v0.50.0 h1:YSZE6aa9+luNa2da6/Tik0q0A5AbR+U003TItK57CPQ= +github.com/prometheus/common v0.50.0/go.mod h1:wHFBCEVWVmHMUpg7pYcOm2QUR/ocQdYSJVQJKnHc3xQ= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= @@ -1175,8 +1177,8 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.0.0-20221014081412-f15817d10f9b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= -golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= -golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= +golang.org/x/net v0.22.0 h1:9sGLhx7iRIHEiX0oAJ3MRZMUCElJgy7Br1nO+AMN3Tc= +golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1202,8 +1204,8 @@ golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.1.0/go.mod h1:G9FE4dLTsbXUu90h/Pf85g4w1D+SSAgR+q46nJZ8M4A= -golang.org/x/oauth2 v0.17.0 h1:6m3ZPmLEFdVxKKWnKq4VqZ60gutO35zm+zrAHVmHyDQ= -golang.org/x/oauth2 v0.17.0/go.mod h1:OzPDGQiuQMguemayvdylqddI7qcD9lnSDb+1FiwQ5HA= +golang.org/x/oauth2 v0.18.0 h1:09qnuIAgzdx1XplqJvW6CQqMCtGZykZWcXzPMPUusvI= +golang.org/x/oauth2 v0.18.0/go.mod h1:Wf7knwG0MPoWIMMBgFlEaSUDaKskp0dCfrlJRJXbBi8= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1630,8 +1632,8 @@ google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACu google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= -google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -1648,8 +1650,9 @@ google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= From d2e40963ed570ec009f378e0c8c06defc6f2c29d Mon Sep 17 00:00:00 2001 From: Marko Date: Mon, 11 Mar 2024 11:22:16 +0100 Subject: [PATCH 08/30] refactor(modules): adopt appmodulev2.Hasgenesis (#19627) Co-authored-by: Julien Robert --- CHANGELOG.md | 1 + UPGRADING.md | 6 +- core/appmodule/genesis.go | 11 +- core/appmodule/module.go | 8 +- core/appmodule/v2/genesis.go | 2 +- .../building-modules/01-module-manager.md | 8 +- go.mod | 2 + go.sum | 4 +- orm/model/ormdb/module.go | 4 +- runtime/app.go | 2 +- simapp/app.go | 8 +- simapp/app_test.go | 4 +- simapp/export.go | 2 +- simapp/simd/cmd/testnet.go | 2 +- store/snapshots/helpers_test.go | 1 - store/snapshots/store.go | 4 +- tests/integration/evidence/genesis_test.go | 23 ++- .../evidence/keeper/infraction_test.go | 2 +- tests/integration/gov/genesis_test.go | 31 +-- testutil/integration/router.go | 4 +- testutil/mock/types_mock_appmodule.go | 79 ++++---- testutil/mock/types_module_module.go | 180 +++--------------- types/module/core_module.go | 52 +++-- types/module/mock_appmodule_test.go | 11 +- types/module/module.go | 73 +++---- types/module/module_test.go | 44 ++--- x/accounts/module.go | 38 ++-- x/auth/module.go | 28 +-- x/authz/keeper/genesis.go | 9 +- x/authz/keeper/genesis_test.go | 4 +- x/authz/module/module.go | 23 ++- x/bank/CHANGELOG.md | 9 +- x/bank/keeper/genesis.go | 11 +- x/bank/keeper/genesis_test.go | 23 ++- x/bank/keeper/keeper.go | 2 +- x/bank/module.go | 27 ++- x/circuit/keeper/genesis.go | 20 +- x/circuit/keeper/genesis_test.go | 6 +- x/circuit/module.go | 28 +-- x/crisis/depinject.go | 2 +- x/crisis/module.go | 30 +-- x/distribution/keeper/genesis.go | 67 +++---- x/distribution/module.go | 28 +-- x/evidence/CHANGELOG.md | 1 + x/evidence/depinject.go | 2 +- x/evidence/genesis.go | 18 +- x/evidence/module.go | 31 +-- x/feegrant/module/module.go | 26 +-- x/genutil/client/cli/gentx.go | 2 +- x/genutil/client/cli/init.go | 3 +- x/genutil/client/cli/init_test.go | 25 ++- x/genutil/client/cli/validate_genesis.go | 6 +- x/genutil/depinject.go | 4 +- x/genutil/module.go | 21 +- x/gov/genesis.go | 25 +-- x/gov/module.go | 25 +-- x/gov/testutil/expected_keepers_mocks.go | 6 +- x/group/keeper/genesis.go | 18 +- x/group/keeper/genesis_test.go | 3 +- x/group/module/module.go | 21 +- x/mint/keeper/genesis.go | 16 +- x/mint/keeper/genesis_test.go | 6 +- x/mint/module.go | 28 +-- x/nft/keeper/genesis.go | 9 +- x/nft/keeper/keeper_test.go | 3 +- x/nft/module/module.go | 23 ++- x/protocolpool/module.go | 38 ++-- x/slashing/keeper/genesis.go | 15 +- x/slashing/keeper/genesis_test.go | 3 +- x/slashing/module.go | 33 ++-- x/staking/module.go | 16 +- x/upgrade/module.go | 26 +-- 72 files changed, 684 insertions(+), 692 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b042e458585d..4e96570e82c5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -143,6 +143,7 @@ Every module contains its own CHANGELOG.md. Please refer to the module you are i * (types) [#19652](https://github.com/cosmos/cosmos-sdk/pull/19652) * Moved`types/module.HasRegisterInterfaces` to `cosmossdk.io/core`. * Moved `RegisterInterfaces` and `RegisterImplementations` from `InterfaceRegistry` to `cosmossdk.io/core/registry.LegacyRegistry` interface. +* (types) [#19627](https://github.com/cosmos/cosmos-sdk/pull/19627) All genesis interfaces now don't take `codec.JsonCodec`. Every module has the codec already, passing it created an unneeded dependency. Additionally, to reflect this change, the module manager does not take a codec either. ### Client Breaking Changes diff --git a/UPGRADING.md b/UPGRADING.md index 2d04c35f6806..1519b8f80efc 100644 --- a/UPGRADING.md +++ b/UPGRADING.md @@ -182,16 +182,16 @@ Previous module migrations have been removed. It is required to migrate to v0.50 ##### Genesis Interface -All genesis interfaces have been migrated to take context.Context instead of sdk.Context. +All genesis interfaces have been migrated to take context.Context instead of sdk.Context. Secondly, the codec is no longer passed in by the framework. The codec is now passed in by the module. ```go // InitGenesis performs genesis initialization for the authz module. -func (am AppModule) InitGenesis(ctx context.Context, cdc codec.JSONCodec, data json.RawMessage) { +func (am AppModule) InitGenesis(ctx context.Context, data json.RawMessage) error { } // ExportGenesis returns the exported genesis state as raw bytes for the authz // module. -func (am AppModule) ExportGenesis(ctx context.Context, cdc codec.JSONCodec) json.RawMessage { +func (am AppModule) ExportGenesis(ctx context.Context) (json.RawMessage, error) { } ``` diff --git a/core/appmodule/genesis.go b/core/appmodule/genesis.go index 7f955a467749..dcc7fe8a992a 100644 --- a/core/appmodule/genesis.go +++ b/core/appmodule/genesis.go @@ -3,13 +3,18 @@ package appmodule import ( "context" "io" + + appmodule "cosmossdk.io/core/appmodule/v2" ) -// HasGenesis is the extension interface that modules should implement to handle +// HasGenesis defines a custom genesis handling API implementation. +type HasGenesis = appmodule.HasGenesis + +// HasGenesisAuto is the extension interface that modules should implement to handle // genesis data and state initialization. // WARNING: This interface is experimental and may change at any time. -type HasGenesis interface { - AppModule +type HasGenesisAuto interface { + appmodule.AppModule // DefaultGenesis writes the default genesis for this module to the target. DefaultGenesis(GenesisTarget) error diff --git a/core/appmodule/module.go b/core/appmodule/module.go index e36e271eab6f..4646d11d17b3 100644 --- a/core/appmodule/module.go +++ b/core/appmodule/module.go @@ -57,7 +57,7 @@ type ResponsePreBlock interface { // HasPreBlocker is the extension interface that modules should implement to run // custom logic before BeginBlock. type HasPreBlocker interface { - AppModule + appmodule.AppModule // PreBlock is method that will be run before BeginBlock. PreBlock(context.Context) (ResponsePreBlock, error) } @@ -91,12 +91,12 @@ type HasMsgHandler interface { // HasPrepareCheckState is an extension interface that contains information about the AppModule // and PrepareCheckState. type HasPrepareCheckState interface { - AppModule + appmodule.AppModule PrepareCheckState(context.Context) error } -// HasPrecommit is an extension interface that contains information about the AppModule and Precommit. +// HasPrecommit is an extension interface that contains information about the appmodule.AppModule and Precommit. type HasPrecommit interface { - AppModule + appmodule.AppModule Precommit(context.Context) error } diff --git a/core/appmodule/v2/genesis.go b/core/appmodule/v2/genesis.go index d457ac89d8c3..d32745d13f52 100644 --- a/core/appmodule/v2/genesis.go +++ b/core/appmodule/v2/genesis.go @@ -10,7 +10,7 @@ import ( // migration of existing modules to the new app module API. It is intended to be replaced by collections type HasGenesis interface { AppModule - DefaultGenesis() Message + DefaultGenesis() json.RawMessage ValidateGenesis(data json.RawMessage) error InitGenesis(ctx context.Context, data json.RawMessage) error ExportGenesis(ctx context.Context) (json.RawMessage, error) diff --git a/docs/build/building-modules/01-module-manager.md b/docs/build/building-modules/01-module-manager.md index 61a3fe66fea6..bce8cea7f6dc 100644 --- a/docs/build/building-modules/01-module-manager.md +++ b/docs/build/building-modules/01-module-manager.md @@ -30,6 +30,8 @@ There are 2 main application module interfaces: The above interfaces are mostly embedding smaller interfaces (extension interfaces), that defines specific functionalities: + + * (legacy) `module.HasName`: Allows the module to provide its own name for legacy purposes. * (legacy) [`module.HasGenesisBasics`](#modulehasgenesisbasics): The legacy interface for stateless genesis methods. * (legacy) [`module.HasGenesis`](#modulehasgenesis) for inter-dependent genesis-related module functionalities. @@ -270,9 +272,9 @@ The module manager is used throughout the application whenever an action on a co * `SetOrderMigrations(moduleNames ...string)`: Sets the order of migrations to be run. If not set then migrations will be run with an order defined in `DefaultMigrationsOrder`. * `RegisterInvariants(ir sdk.InvariantRegistry)`: Registers the [invariants](./07-invariants.md) of module implementing the `HasInvariants` interface. * `RegisterServices(cfg Configurator)`: Registers the services of modules implementing the `HasServices` interface. -* `InitGenesis(ctx context.Context, cdc codec.JSONCodec, genesisData map[string]json.RawMessage)`: Calls the [`InitGenesis`](./08-genesis.md#initgenesis) function of each module when the application is first started, in the order defined in `OrderInitGenesis`. Returns an `abci.ResponseInitChain` to the underlying consensus engine, which can contain validator updates. -* `ExportGenesis(ctx context.Context, cdc codec.JSONCodec)`: Calls the [`ExportGenesis`](./08-genesis.md#exportgenesis) function of each module, in the order defined in `OrderExportGenesis`. The export constructs a genesis file from a previously existing state, and is mainly used when a hard-fork upgrade of the chain is required. -* `ExportGenesisForModules(ctx context.Context, cdc codec.JSONCodec, modulesToExport []string)`: Behaves the same as `ExportGenesis`, except takes a list of modules to export. +* `InitGenesis(ctx context.Context, genesisData map[string]json.RawMessage)`: Calls the [`InitGenesis`](./08-genesis.md#initgenesis) function of each module when the application is first started, in the order defined in `OrderInitGenesis`. Returns an `abci.ResponseInitChain` to the underlying consensus engine, which can contain validator updates. +* `ExportGenesis(ctx context.Context)`: Calls the [`ExportGenesis`](./08-genesis.md#exportgenesis) function of each module, in the order defined in `OrderExportGenesis`. The export constructs a genesis file from a previously existing state, and is mainly used when a hard-fork upgrade of the chain is required. +* `ExportGenesisForModules(ctx context.Context, modulesToExport []string)`: Behaves the same as `ExportGenesis`, except takes a list of modules to export. * `BeginBlock(ctx context.Context) error`: At the beginning of each block, this function is called from [`BaseApp`](../../learn/advanced/00-baseapp.md#beginblock) and, in turn, calls the [`BeginBlock`](./06-beginblock-endblock.md) function of each modules implementing the `appmodule.HasBeginBlocker` interface, in the order defined in `OrderBeginBlockers`. It creates a child [context](../../learn/advanced/02-context.md) with an event manager to aggregate [events](../../learn/advanced/08-events.md) emitted from each modules. * `EndBlock(ctx context.Context) error`: At the end of each block, this function is called from [`BaseApp`](../../learn/advanced/00-baseapp.md#endblock) and, in turn, calls the [`EndBlock`](./06-beginblock-endblock.md) function of each modules implementing the `appmodule.HasEndBlocker` interface, in the order defined in `OrderEndBlockers`. It creates a child [context](../../learn/advanced/02-context.md) with an event manager to aggregate [events](../../learn/advanced/08-events.md) emitted from all modules. The function returns an `abci` which contains the aforementioned events, as well as validator set updates (if any). * `EndBlock(context.Context) ([]abci.ValidatorUpdate, error)`: At the end of each block, this function is called from [`BaseApp`](../../learn/advanced/00-baseapp.md#endblock) and, in turn, calls the [`EndBlock`](./06-beginblock-endblock.md) function of each modules implementing the `module.HasABCIEndBlock` interface, in the order defined in `OrderEndBlockers`. It creates a child [context](../../learn/advanced/02-context.md) with an event manager to aggregate [events](../../learn/advanced/08-events.md) emitted from all modules. The function returns an `abci` which contains the aforementioned events, as well as validator set updates (if any). diff --git a/go.mod b/go.mod index 558d07d39423..55e1683242a2 100644 --- a/go.mod +++ b/go.mod @@ -189,6 +189,8 @@ replace ( cosmossdk.io/x/staking => ./x/staking ) +replace github.com/cosmos/iavl => github.com/cosmos/iavl v1.0.1 // TODO remove + // Below are the long-lived replace of the Cosmos SDK replace ( // use cosmos fork of keyring diff --git a/go.sum b/go.sum index 0cf76f2fc524..fb685aaddda5 100644 --- a/go.sum +++ b/go.sum @@ -146,8 +146,8 @@ github.com/cosmos/gogogateway v1.2.0/go.mod h1:iQpLkGWxYcnCdz5iAdLcRBSw3h7NXeOkZ github.com/cosmos/gogoproto v1.4.2/go.mod h1:cLxOsn1ljAHSV527CHOtaIP91kK6cCrZETRBrkzItWU= github.com/cosmos/gogoproto v1.4.11 h1:LZcMHrx4FjUgrqQSWeaGC1v/TeuVFqSLa43CC6aWR2g= github.com/cosmos/gogoproto v1.4.11/go.mod h1:/g39Mh8m17X8Q/GDEs5zYTSNaNnInBSohtaxzQnYq1Y= -github.com/cosmos/iavl v1.0.0 h1:bw6t0Mv/mVCJvlMTOPHWLs5uUE3BRBfVWCRelOzl+so= -github.com/cosmos/iavl v1.0.0/go.mod h1:CmTGqMnRnucjxbjduneZXT+0vPgNElYvdefjX2q9tYc= +github.com/cosmos/iavl v1.0.1 h1:D+mYbcRO2wptYzOM1Hxl9cpmmHU1ZEt9T2Wv5nZTeUw= +github.com/cosmos/iavl v1.0.1/go.mod h1:8xIUkgVvwvVrBu81scdPty+/Dx9GqwHnAvXz4cwF7RY= github.com/cosmos/ics23/go v0.10.0 h1:iXqLLgp2Lp+EdpIuwXTYIQU+AiHj9mOC2X9ab++bZDM= github.com/cosmos/ics23/go v0.10.0/go.mod h1:ZfJSmng/TBNTBkFemHHHj5YY7VAU/MBU980F4VU1NG0= github.com/cosmos/keyring v1.2.0 h1:8C1lBP9xhImmIabyXW4c3vFjjLiBdGCmfLUfeZlV1Yo= diff --git a/orm/model/ormdb/module.go b/orm/model/ormdb/module.go index 95ba640c7585..605e641729ad 100644 --- a/orm/model/ormdb/module.go +++ b/orm/model/ormdb/module.go @@ -39,7 +39,7 @@ type ModuleDB interface { // func NewAppModule(keeper keeper.Keeper) AppModule { // return AppModule{HasGenesis: keeper.GenesisHandler()} // } - GenesisHandler() appmodule.HasGenesis + GenesisHandler() appmodule.HasGenesis // TODO should be appmodule.HasGenesisAuto with core v1 private() } @@ -212,7 +212,7 @@ func (m moduleDB) GetTable(message proto.Message) ormtable.Table { return m.tablesByName[message.ProtoReflect().Descriptor().FullName()] } -func (m moduleDB) GenesisHandler() appmodule.HasGenesis { +func (m moduleDB) GenesisHandler() appmodule.HasGenesis { // TODO should be appmodule.HasGenesisAuto with core v1 return appModuleGenesisWrapper{m} } diff --git a/runtime/app.go b/runtime/app.go index d8474b0041ab..c5ac9329d9e5 100644 --- a/runtime/app.go +++ b/runtime/app.go @@ -242,7 +242,7 @@ func (a *App) LoadHeight(height int64) error { // DefaultGenesis returns a default genesis from the registered AppModule's. func (a *App) DefaultGenesis() map[string]json.RawMessage { - return a.ModuleManager.DefaultGenesis(a.cdc) + return a.ModuleManager.DefaultGenesis() } // GetStoreKeys returns all the stored store keys. diff --git a/simapp/app.go b/simapp/app.go index be410d5d70dc..59e7b03410e2 100644 --- a/simapp/app.go +++ b/simapp/app.go @@ -408,8 +408,8 @@ func NewSimApp( // NOTE: Any module instantiated in the module manager that is later modified // must be passed by reference here. app.ModuleManager = module.NewManager( - genutil.NewAppModule(app.AuthKeeper, app.StakingKeeper, app, txConfig, genutiltypes.DefaultMessageValidator), - accounts.NewAppModule(app.AccountsKeeper), + genutil.NewAppModule(appCodec, app.AuthKeeper, app.StakingKeeper, app, txConfig, genutiltypes.DefaultMessageValidator), + accounts.NewAppModule(appCodec, app.AccountsKeeper), auth.NewAppModule(appCodec, app.AuthKeeper, authsims.RandomGenesisAccounts), vesting.NewAppModule(app.AuthKeeper, app.BankKeeper), bank.NewAppModule(appCodec, app.BankKeeper, app.AuthKeeper), @@ -420,7 +420,7 @@ func NewSimApp( distr.NewAppModule(appCodec, app.DistrKeeper, app.AuthKeeper, app.BankKeeper, app.StakingKeeper, app.PoolKeeper), staking.NewAppModule(appCodec, app.StakingKeeper, app.AuthKeeper, app.BankKeeper), upgrade.NewAppModule(app.UpgradeKeeper), - evidence.NewAppModule(app.EvidenceKeeper), + evidence.NewAppModule(appCodec, app.EvidenceKeeper), authzmodule.NewAppModule(appCodec, app.AuthzKeeper, app.AuthKeeper, app.BankKeeper, app.interfaceRegistry), groupmodule.NewAppModule(appCodec, app.GroupKeeper, app.AuthKeeper, app.BankKeeper, app.interfaceRegistry), nftmodule.NewAppModule(appCodec, app.NFTKeeper, app.AuthKeeper, app.BankKeeper, app.interfaceRegistry), @@ -698,7 +698,7 @@ func (app *SimApp) AutoCliOpts() autocli.AppOptions { // DefaultGenesis returns a default genesis from the registered AppModule's. func (a *SimApp) DefaultGenesis() map[string]json.RawMessage { - return a.ModuleManager.DefaultGenesis(a.appCodec) + return a.ModuleManager.DefaultGenesis() } // GetKey returns the KVStoreKey for the provided store key. diff --git a/simapp/app_test.go b/simapp/app_test.go index da8d555de983..8c1c5a8d8ef3 100644 --- a/simapp/app_test.go +++ b/simapp/app_test.go @@ -237,8 +237,8 @@ func TestInitGenesisOnMigration(t *testing.T) { t.Cleanup(mockCtrl.Finish) mockModule := mock.NewMockAppModuleWithAllExtensions(mockCtrl) mockDefaultGenesis := json.RawMessage(`{"key": "value"}`) - mockModule.EXPECT().DefaultGenesis(gomock.Eq(app.appCodec)).Times(1).Return(mockDefaultGenesis) - mockModule.EXPECT().InitGenesis(gomock.Eq(ctx), gomock.Eq(app.appCodec), gomock.Eq(mockDefaultGenesis)).Times(1) + mockModule.EXPECT().DefaultGenesis().Times(1).Return(mockDefaultGenesis) + mockModule.EXPECT().InitGenesis(gomock.Eq(ctx), gomock.Eq(mockDefaultGenesis)).Times(1) mockModule.EXPECT().ConsensusVersion().Times(1).Return(uint64(0)) app.ModuleManager.Modules["mock"] = mockModule diff --git a/simapp/export.go b/simapp/export.go index 33071033df16..4fda92cc9358 100644 --- a/simapp/export.go +++ b/simapp/export.go @@ -31,7 +31,7 @@ func (app *SimApp) ExportAppStateAndValidators(forZeroHeight bool, jailAllowedAd app.prepForZeroHeightGenesis(ctx, jailAllowedAddrs) } - genState, err := app.ModuleManager.ExportGenesisForModules(ctx, app.appCodec, modulesToExport) + genState, err := app.ModuleManager.ExportGenesisForModules(ctx, modulesToExport) if err != nil { return servertypes.ExportedApp{}, err } diff --git a/simapp/simd/cmd/testnet.go b/simapp/simd/cmd/testnet.go index 101cf5388a3e..b0c95a43a7e5 100644 --- a/simapp/simd/cmd/testnet.go +++ b/simapp/simd/cmd/testnet.go @@ -375,7 +375,7 @@ func initGenFiles( genAccounts []authtypes.GenesisAccount, genBalances []banktypes.Balance, genFiles []string, numValidators int, ) error { - appGenState := mm.DefaultGenesis(clientCtx.Codec) + appGenState := mm.DefaultGenesis() // set the accounts in the genesis state var authGenState authtypes.GenesisState diff --git a/store/snapshots/helpers_test.go b/store/snapshots/helpers_test.go index 33dcc14fa6f4..a0d1add9a85d 100644 --- a/store/snapshots/helpers_test.go +++ b/store/snapshots/helpers_test.go @@ -291,7 +291,6 @@ func (s *extSnapshotter) RestoreExtension(height uint64, format uint32, payloadR // GetTempDir returns a writable temporary director for the test to use. func GetTempDir(tb testing.TB) string { - //return "/tmp/snapshots" tb.Helper() // os.MkDir() is used instead of testing.T.TempDir() // see https://github.com/cosmos/cosmos-sdk/pull/8475 and diff --git a/store/snapshots/store.go b/store/snapshots/store.go index 35d0d6a9f609..5c82a095e6dd 100644 --- a/store/snapshots/store.go +++ b/store/snapshots/store.go @@ -223,7 +223,7 @@ func (s *Store) Prune(retain uint32) (uint64, error) { skip[height] = true continue } - err = s.Delete(height, uint32(format)) + err = s.Delete(height, format) if err != nil { return 0, errors.Wrap(err, "failed to prune snapshots") } @@ -382,7 +382,7 @@ func (s *Store) parseMetadataFilename(filename string) (height uint64, format ui return 0, 0, errors.Wrapf(err, "invalid snapshot metadata filename %s", filename) } format = uint32(f) - if filename != filepath.Base(s.pathMetadata(height, uint32(format))) { + if filename != filepath.Base(s.pathMetadata(height, format)) { return 0, 0, fmt.Errorf("invalid snapshot metadata filename %s", filename) } return height, format, nil diff --git a/tests/integration/evidence/genesis_test.go b/tests/integration/evidence/genesis_test.go index 902bc3f23d15..c2cb89c406fc 100644 --- a/tests/integration/evidence/genesis_test.go +++ b/tests/integration/evidence/genesis_test.go @@ -105,13 +105,12 @@ func (suite *GenesisTestSuite) TestInitGenesis() { tc.malleate() if tc.expPass { - suite.NotPanics(func() { - evidence.InitGenesis(suite.ctx, suite.keeper, genesisState) - }) + err := evidence.InitGenesis(suite.ctx, suite.keeper, genesisState) + suite.NoError(err) } else { - suite.Panics(func() { - evidence.InitGenesis(suite.ctx, suite.keeper, genesisState) - }) + err := evidence.InitGenesis(suite.ctx, suite.keeper, genesisState) + suite.Error(err) + } tc.posttests() @@ -151,13 +150,13 @@ func (suite *GenesisTestSuite) TestExportGenesis() { tc.malleate() if tc.expPass { - suite.NotPanics(func() { - evidence.ExportGenesis(suite.ctx, suite.keeper) - }) + + _, err := evidence.ExportGenesis(suite.ctx, suite.keeper) + suite.Require().NoError(err) + } else { - suite.Panics(func() { - evidence.ExportGenesis(suite.ctx, suite.keeper) - }) + _, err := evidence.ExportGenesis(suite.ctx, suite.keeper) + suite.Require().Error(err) } tc.posttests() diff --git a/tests/integration/evidence/keeper/infraction_test.go b/tests/integration/evidence/keeper/infraction_test.go index 5c9977d6c7c6..4dcc9b3e8298 100644 --- a/tests/integration/evidence/keeper/infraction_test.go +++ b/tests/integration/evidence/keeper/infraction_test.go @@ -141,7 +141,7 @@ func initFixture(tb testing.TB) *fixture { bankModule := bank.NewAppModule(cdc, bankKeeper, accountKeeper) stakingModule := staking.NewAppModule(cdc, stakingKeeper, accountKeeper, bankKeeper) slashingModule := slashing.NewAppModule(cdc, slashingKeeper, accountKeeper, bankKeeper, stakingKeeper, cdc.InterfaceRegistry()) - evidenceModule := evidence.NewAppModule(*evidenceKeeper) + evidenceModule := evidence.NewAppModule(cdc, *evidenceKeeper) integrationApp := integration.NewIntegrationApp(newCtx, logger, keys, cdc, encodingCfg.InterfaceRegistry.SigningContext().AddressCodec(), diff --git a/tests/integration/gov/genesis_test.go b/tests/integration/gov/genesis_test.go index 265ecb66d94c..86599ff3073c 100644 --- a/tests/integration/gov/genesis_test.go +++ b/tests/integration/gov/genesis_test.go @@ -204,23 +204,26 @@ func TestImportExportQueues_ErrorUnconsistentState(t *testing.T) { suite := createTestSuite(t) app := suite.app ctx := app.BaseApp.NewContext(false) - require.Panics(t, func() { - gov.InitGenesis(ctx, suite.AccountKeeper, suite.BankKeeper, suite.GovKeeper, &v1.GenesisState{ - Deposits: v1.Deposits{ - { - ProposalId: 1234, - Depositor: "me", - Amount: sdk.Coins{ - sdk.NewCoin( - "stake", - sdkmath.NewInt(1234), - ), - }, + + params := v1.DefaultParams() + err := gov.InitGenesis(ctx, suite.AccountKeeper, suite.BankKeeper, suite.GovKeeper, &v1.GenesisState{ + Deposits: v1.Deposits{ + { + ProposalId: 1234, + Depositor: "me", + Amount: sdk.Coins{ + sdk.NewCoin( + "stake", + sdkmath.NewInt(1234), + ), }, }, - }) + }, + Params: ¶ms, }) - gov.InitGenesis(ctx, suite.AccountKeeper, suite.BankKeeper, suite.GovKeeper, v1.DefaultGenesisState()) + require.Error(t, err) + err = gov.InitGenesis(ctx, suite.AccountKeeper, suite.BankKeeper, suite.GovKeeper, v1.DefaultGenesisState()) + require.NoError(t, err) genState, err := gov.ExportGenesis(ctx, suite.GovKeeper) require.NoError(t, err) require.Equal(t, genState, v1.DefaultGenesisState()) diff --git a/testutil/integration/router.go b/testutil/integration/router.go index 45fa80dbbf44..9bf25657cff7 100644 --- a/testutil/integration/router.go +++ b/testutil/integration/router.go @@ -64,7 +64,9 @@ func NewIntegrationApp( bApp.SetInitChainer(func(ctx sdk.Context, _ *cmtabcitypes.RequestInitChain) (*cmtabcitypes.ResponseInitChain, error) { for _, mod := range modules { if m, ok := mod.(module.HasGenesis); ok { - m.InitGenesis(ctx, appCodec, m.DefaultGenesis(appCodec)) + if err := m.InitGenesis(ctx, m.DefaultGenesis()); err != nil { + return nil, err + } } } diff --git a/testutil/mock/types_mock_appmodule.go b/testutil/mock/types_mock_appmodule.go index 3d3f3c06442f..13f1c97b7124 100644 --- a/testutil/mock/types_mock_appmodule.go +++ b/testutil/mock/types_mock_appmodule.go @@ -10,11 +10,9 @@ import ( reflect "reflect" appmodule "cosmossdk.io/core/appmodule" - "cosmossdk.io/core/registry" + registry "cosmossdk.io/core/registry" types "github.com/cometbft/cometbft/abci/types" - client "github.com/cosmos/cosmos-sdk/client" - codec "github.com/cosmos/cosmos-sdk/codec" - types1 "github.com/cosmos/cosmos-sdk/types" + types0 "github.com/cosmos/cosmos-sdk/types" module "github.com/cosmos/cosmos-sdk/types/module" gomock "github.com/golang/mock/gomock" ) @@ -57,17 +55,17 @@ func (mr *MockAppModuleWithAllExtensionsMockRecorder) ConsensusVersion() *gomock } // DefaultGenesis mocks base method. -func (m *MockAppModuleWithAllExtensions) DefaultGenesis(arg0 codec.JSONCodec) json.RawMessage { +func (m *MockAppModuleWithAllExtensions) DefaultGenesis() json.RawMessage { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "DefaultGenesis", arg0) + ret := m.ctrl.Call(m, "DefaultGenesis") ret0, _ := ret[0].(json.RawMessage) return ret0 } // DefaultGenesis indicates an expected call of DefaultGenesis. -func (mr *MockAppModuleWithAllExtensionsMockRecorder) DefaultGenesis(arg0 interface{}) *gomock.Call { +func (mr *MockAppModuleWithAllExtensionsMockRecorder) DefaultGenesis() *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DefaultGenesis", reflect.TypeOf((*MockAppModuleWithAllExtensions)(nil).DefaultGenesis), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DefaultGenesis", reflect.TypeOf((*MockAppModuleWithAllExtensions)(nil).DefaultGenesis)) } // EndBlock mocks base method. @@ -86,29 +84,32 @@ func (mr *MockAppModuleWithAllExtensionsMockRecorder) EndBlock(arg0 interface{}) } // ExportGenesis mocks base method. -func (m *MockAppModuleWithAllExtensions) ExportGenesis(arg0 context.Context, arg1 codec.JSONCodec) json.RawMessage { +func (m *MockAppModuleWithAllExtensions) ExportGenesis(ctx context.Context) (json.RawMessage, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ExportGenesis", arg0, arg1) + ret := m.ctrl.Call(m, "ExportGenesis", ctx) ret0, _ := ret[0].(json.RawMessage) - return ret0 + ret1, _ := ret[1].(error) + return ret0, ret1 } // ExportGenesis indicates an expected call of ExportGenesis. -func (mr *MockAppModuleWithAllExtensionsMockRecorder) ExportGenesis(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockAppModuleWithAllExtensionsMockRecorder) ExportGenesis(ctx interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExportGenesis", reflect.TypeOf((*MockAppModuleWithAllExtensions)(nil).ExportGenesis), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExportGenesis", reflect.TypeOf((*MockAppModuleWithAllExtensions)(nil).ExportGenesis), ctx) } // InitGenesis mocks base method. -func (m *MockAppModuleWithAllExtensions) InitGenesis(arg0 context.Context, arg1 codec.JSONCodec, arg2 json.RawMessage) { +func (m *MockAppModuleWithAllExtensions) InitGenesis(ctx context.Context, data json.RawMessage) error { m.ctrl.T.Helper() - m.ctrl.Call(m, "InitGenesis", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "InitGenesis", ctx, data) + ret0, _ := ret[0].(error) + return ret0 } // InitGenesis indicates an expected call of InitGenesis. -func (mr *MockAppModuleWithAllExtensionsMockRecorder) InitGenesis(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockAppModuleWithAllExtensionsMockRecorder) InitGenesis(ctx, data interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InitGenesis", reflect.TypeOf((*MockAppModuleWithAllExtensions)(nil).InitGenesis), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InitGenesis", reflect.TypeOf((*MockAppModuleWithAllExtensions)(nil).InitGenesis), ctx, data) } // IsAppModule mocks base method. @@ -162,7 +163,7 @@ func (mr *MockAppModuleWithAllExtensionsMockRecorder) RegisterInterfaces(arg0 in } // RegisterInvariants mocks base method. -func (m *MockAppModuleWithAllExtensions) RegisterInvariants(arg0 types1.InvariantRegistry) { +func (m *MockAppModuleWithAllExtensions) RegisterInvariants(arg0 types0.InvariantRegistry) { m.ctrl.T.Helper() m.ctrl.Call(m, "RegisterInvariants", arg0) } @@ -186,17 +187,17 @@ func (mr *MockAppModuleWithAllExtensionsMockRecorder) RegisterServices(arg0 inte } // ValidateGenesis mocks base method. -func (m *MockAppModuleWithAllExtensions) ValidateGenesis(arg0 codec.JSONCodec, arg1 client.TxEncodingConfig, arg2 json.RawMessage) error { +func (m *MockAppModuleWithAllExtensions) ValidateGenesis(data json.RawMessage) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ValidateGenesis", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "ValidateGenesis", data) ret0, _ := ret[0].(error) return ret0 } // ValidateGenesis indicates an expected call of ValidateGenesis. -func (mr *MockAppModuleWithAllExtensionsMockRecorder) ValidateGenesis(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockAppModuleWithAllExtensionsMockRecorder) ValidateGenesis(data interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidateGenesis", reflect.TypeOf((*MockAppModuleWithAllExtensions)(nil).ValidateGenesis), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidateGenesis", reflect.TypeOf((*MockAppModuleWithAllExtensions)(nil).ValidateGenesis), data) } // MockAppModuleWithAllExtensionsABCI is a mock of AppModuleWithAllExtensionsABCI interface. @@ -237,17 +238,17 @@ func (mr *MockAppModuleWithAllExtensionsABCIMockRecorder) ConsensusVersion() *go } // DefaultGenesis mocks base method. -func (m *MockAppModuleWithAllExtensionsABCI) DefaultGenesis(arg0 codec.JSONCodec) json.RawMessage { +func (m *MockAppModuleWithAllExtensionsABCI) DefaultGenesis() json.RawMessage { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "DefaultGenesis", arg0) + ret := m.ctrl.Call(m, "DefaultGenesis") ret0, _ := ret[0].(json.RawMessage) return ret0 } // DefaultGenesis indicates an expected call of DefaultGenesis. -func (mr *MockAppModuleWithAllExtensionsABCIMockRecorder) DefaultGenesis(arg0 interface{}) *gomock.Call { +func (mr *MockAppModuleWithAllExtensionsABCIMockRecorder) DefaultGenesis() *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DefaultGenesis", reflect.TypeOf((*MockAppModuleWithAllExtensionsABCI)(nil).DefaultGenesis), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DefaultGenesis", reflect.TypeOf((*MockAppModuleWithAllExtensionsABCI)(nil).DefaultGenesis)) } // EndBlock mocks base method. @@ -266,31 +267,31 @@ func (mr *MockAppModuleWithAllExtensionsABCIMockRecorder) EndBlock(arg0 interfac } // ExportGenesis mocks base method. -func (m *MockAppModuleWithAllExtensionsABCI) ExportGenesis(arg0 context.Context, arg1 codec.JSONCodec) json.RawMessage { +func (m *MockAppModuleWithAllExtensionsABCI) ExportGenesis(arg0 context.Context) json.RawMessage { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ExportGenesis", arg0, arg1) + ret := m.ctrl.Call(m, "ExportGenesis", arg0) ret0, _ := ret[0].(json.RawMessage) return ret0 } // ExportGenesis indicates an expected call of ExportGenesis. -func (mr *MockAppModuleWithAllExtensionsABCIMockRecorder) ExportGenesis(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockAppModuleWithAllExtensionsABCIMockRecorder) ExportGenesis(arg0 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExportGenesis", reflect.TypeOf((*MockAppModuleWithAllExtensionsABCI)(nil).ExportGenesis), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExportGenesis", reflect.TypeOf((*MockAppModuleWithAllExtensionsABCI)(nil).ExportGenesis), arg0) } // InitGenesis mocks base method. -func (m *MockAppModuleWithAllExtensionsABCI) InitGenesis(arg0 context.Context, arg1 codec.JSONCodec, arg2 json.RawMessage) []types.ValidatorUpdate { +func (m *MockAppModuleWithAllExtensionsABCI) InitGenesis(arg0 context.Context, arg1 json.RawMessage) []types.ValidatorUpdate { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "InitGenesis", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "InitGenesis", arg0, arg1) ret0, _ := ret[0].([]types.ValidatorUpdate) return ret0 } // InitGenesis indicates an expected call of InitGenesis. -func (mr *MockAppModuleWithAllExtensionsABCIMockRecorder) InitGenesis(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockAppModuleWithAllExtensionsABCIMockRecorder) InitGenesis(arg0, arg1 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InitGenesis", reflect.TypeOf((*MockAppModuleWithAllExtensionsABCI)(nil).InitGenesis), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InitGenesis", reflect.TypeOf((*MockAppModuleWithAllExtensionsABCI)(nil).InitGenesis), arg0, arg1) } // IsAppModule mocks base method. @@ -344,7 +345,7 @@ func (mr *MockAppModuleWithAllExtensionsABCIMockRecorder) RegisterInterfaces(arg } // RegisterInvariants mocks base method. -func (m *MockAppModuleWithAllExtensionsABCI) RegisterInvariants(arg0 types1.InvariantRegistry) { +func (m *MockAppModuleWithAllExtensionsABCI) RegisterInvariants(arg0 types0.InvariantRegistry) { m.ctrl.T.Helper() m.ctrl.Call(m, "RegisterInvariants", arg0) } @@ -368,17 +369,17 @@ func (mr *MockAppModuleWithAllExtensionsABCIMockRecorder) RegisterServices(arg0 } // ValidateGenesis mocks base method. -func (m *MockAppModuleWithAllExtensionsABCI) ValidateGenesis(arg0 codec.JSONCodec, arg1 client.TxEncodingConfig, arg2 json.RawMessage) error { +func (m *MockAppModuleWithAllExtensionsABCI) ValidateGenesis(arg0 json.RawMessage) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ValidateGenesis", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "ValidateGenesis", arg0) ret0, _ := ret[0].(error) return ret0 } // ValidateGenesis indicates an expected call of ValidateGenesis. -func (mr *MockAppModuleWithAllExtensionsABCIMockRecorder) ValidateGenesis(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockAppModuleWithAllExtensionsABCIMockRecorder) ValidateGenesis(arg0 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidateGenesis", reflect.TypeOf((*MockAppModuleWithAllExtensionsABCI)(nil).ValidateGenesis), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidateGenesis", reflect.TypeOf((*MockAppModuleWithAllExtensionsABCI)(nil).ValidateGenesis), arg0) } // MockCoreAppModule is a mock of CoreAppModule interface. diff --git a/testutil/mock/types_module_module.go b/testutil/mock/types_module_module.go index 044cca224fa5..b3e6283f509b 100644 --- a/testutil/mock/types_module_module.go +++ b/testutil/mock/types_module_module.go @@ -9,11 +9,11 @@ import ( json "encoding/json" reflect "reflect" - "cosmossdk.io/core/registry" + registry "cosmossdk.io/core/registry" types "github.com/cometbft/cometbft/abci/types" client "github.com/cosmos/cosmos-sdk/client" codec "github.com/cosmos/cosmos-sdk/codec" - types1 "github.com/cosmos/cosmos-sdk/types" + types0 "github.com/cosmos/cosmos-sdk/types" module "github.com/cosmos/cosmos-sdk/types/module" gomock "github.com/golang/mock/gomock" runtime "github.com/grpc-ecosystem/grpc-gateway/runtime" @@ -226,17 +226,17 @@ func (m *MockHasGenesisBasics) EXPECT() *MockHasGenesisBasicsMockRecorder { } // DefaultGenesis mocks base method. -func (m *MockHasGenesisBasics) DefaultGenesis(arg0 codec.JSONCodec) json.RawMessage { +func (m *MockHasGenesisBasics) DefaultGenesis() json.RawMessage { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "DefaultGenesis", arg0) + ret := m.ctrl.Call(m, "DefaultGenesis") ret0, _ := ret[0].(json.RawMessage) return ret0 } // DefaultGenesis indicates an expected call of DefaultGenesis. -func (mr *MockHasGenesisBasicsMockRecorder) DefaultGenesis(arg0 interface{}) *gomock.Call { +func (mr *MockHasGenesisBasicsMockRecorder) DefaultGenesis() *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DefaultGenesis", reflect.TypeOf((*MockHasGenesisBasics)(nil).DefaultGenesis), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DefaultGenesis", reflect.TypeOf((*MockHasGenesisBasics)(nil).DefaultGenesis)) } // Name mocks base method. @@ -254,17 +254,17 @@ func (mr *MockHasGenesisBasicsMockRecorder) Name() *gomock.Call { } // ValidateGenesis mocks base method. -func (m *MockHasGenesisBasics) ValidateGenesis(arg0 codec.JSONCodec, arg1 client.TxEncodingConfig, arg2 json.RawMessage) error { +func (m *MockHasGenesisBasics) ValidateGenesis(arg0 json.RawMessage) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ValidateGenesis", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "ValidateGenesis", arg0) ret0, _ := ret[0].(error) return ret0 } // ValidateGenesis indicates an expected call of ValidateGenesis. -func (mr *MockHasGenesisBasicsMockRecorder) ValidateGenesis(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockHasGenesisBasicsMockRecorder) ValidateGenesis(arg0 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidateGenesis", reflect.TypeOf((*MockHasGenesisBasics)(nil).ValidateGenesis), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidateGenesis", reflect.TypeOf((*MockHasGenesisBasics)(nil).ValidateGenesis), arg0) } // MockHasAminoCodec is a mock of HasAminoCodec interface. @@ -302,41 +302,6 @@ func (mr *MockHasAminoCodecMockRecorder) RegisterLegacyAminoCodec(arg0 interface return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterLegacyAminoCodec", reflect.TypeOf((*MockHasAminoCodec)(nil).RegisterLegacyAminoCodec), arg0) } -// MockHasRegisterInterfaces is a mock of HasRegisterInterfaces interface. -type MockHasRegisterInterfaces struct { - ctrl *gomock.Controller - recorder *MockHasRegisterInterfacesMockRecorder -} - -// MockHasRegisterInterfacesMockRecorder is the mock recorder for MockHasRegisterInterfaces. -type MockHasRegisterInterfacesMockRecorder struct { - mock *MockHasRegisterInterfaces -} - -// NewMockHasRegisterInterfaces creates a new mock instance. -func NewMockHasRegisterInterfaces(ctrl *gomock.Controller) *MockHasRegisterInterfaces { - mock := &MockHasRegisterInterfaces{ctrl: ctrl} - mock.recorder = &MockHasRegisterInterfacesMockRecorder{mock} - return mock -} - -// EXPECT returns an object that allows the caller to indicate expected use. -func (m *MockHasRegisterInterfaces) EXPECT() *MockHasRegisterInterfacesMockRecorder { - return m.recorder -} - -// RegisterInterfaces mocks base method. -func (m *MockHasRegisterInterfaces) RegisterInterfaces(arg0 registry.LegacyRegistry) { - m.ctrl.T.Helper() - m.ctrl.Call(m, "RegisterInterfaces", arg0) -} - -// RegisterInterfaces indicates an expected call of RegisterInterfaces. -func (mr *MockHasRegisterInterfacesMockRecorder) RegisterInterfaces(arg0 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterInterfaces", reflect.TypeOf((*MockHasRegisterInterfaces)(nil).RegisterInterfaces), arg0) -} - // MockHasGRPCGateway is a mock of HasGRPCGateway interface. type MockHasGRPCGateway struct { ctrl *gomock.Controller @@ -372,97 +337,6 @@ func (mr *MockHasGRPCGatewayMockRecorder) RegisterGRPCGatewayRoutes(arg0, arg1 i return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterGRPCGatewayRoutes", reflect.TypeOf((*MockHasGRPCGateway)(nil).RegisterGRPCGatewayRoutes), arg0, arg1) } -// MockHasGenesis is a mock of HasGenesis interface. -type MockHasGenesis struct { - ctrl *gomock.Controller - recorder *MockHasGenesisMockRecorder -} - -// MockHasGenesisMockRecorder is the mock recorder for MockHasGenesis. -type MockHasGenesisMockRecorder struct { - mock *MockHasGenesis -} - -// NewMockHasGenesis creates a new mock instance. -func NewMockHasGenesis(ctrl *gomock.Controller) *MockHasGenesis { - mock := &MockHasGenesis{ctrl: ctrl} - mock.recorder = &MockHasGenesisMockRecorder{mock} - return mock -} - -// EXPECT returns an object that allows the caller to indicate expected use. -func (m *MockHasGenesis) EXPECT() *MockHasGenesisMockRecorder { - return m.recorder -} - -// DefaultGenesis mocks base method. -func (m *MockHasGenesis) DefaultGenesis(arg0 codec.JSONCodec) json.RawMessage { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "DefaultGenesis", arg0) - ret0, _ := ret[0].(json.RawMessage) - return ret0 -} - -// DefaultGenesis indicates an expected call of DefaultGenesis. -func (mr *MockHasGenesisMockRecorder) DefaultGenesis(arg0 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DefaultGenesis", reflect.TypeOf((*MockHasGenesis)(nil).DefaultGenesis), arg0) -} - -// ExportGenesis mocks base method. -func (m *MockHasGenesis) ExportGenesis(arg0 context.Context, arg1 codec.JSONCodec) json.RawMessage { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ExportGenesis", arg0, arg1) - ret0, _ := ret[0].(json.RawMessage) - return ret0 -} - -// ExportGenesis indicates an expected call of ExportGenesis. -func (mr *MockHasGenesisMockRecorder) ExportGenesis(arg0, arg1 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExportGenesis", reflect.TypeOf((*MockHasGenesis)(nil).ExportGenesis), arg0, arg1) -} - -// InitGenesis mocks base method. -func (m *MockHasGenesis) InitGenesis(arg0 context.Context, arg1 codec.JSONCodec, arg2 json.RawMessage) { - m.ctrl.T.Helper() - m.ctrl.Call(m, "InitGenesis", arg0, arg1, arg2) -} - -// InitGenesis indicates an expected call of InitGenesis. -func (mr *MockHasGenesisMockRecorder) InitGenesis(arg0, arg1, arg2 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InitGenesis", reflect.TypeOf((*MockHasGenesis)(nil).InitGenesis), arg0, arg1, arg2) -} - -// Name mocks base method. -func (m *MockHasGenesis) Name() string { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Name") - ret0, _ := ret[0].(string) - return ret0 -} - -// Name indicates an expected call of Name. -func (mr *MockHasGenesisMockRecorder) Name() *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockHasGenesis)(nil).Name)) -} - -// ValidateGenesis mocks base method. -func (m *MockHasGenesis) ValidateGenesis(arg0 codec.JSONCodec, arg1 client.TxEncodingConfig, arg2 json.RawMessage) error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ValidateGenesis", arg0, arg1, arg2) - ret0, _ := ret[0].(error) - return ret0 -} - -// ValidateGenesis indicates an expected call of ValidateGenesis. -func (mr *MockHasGenesisMockRecorder) ValidateGenesis(arg0, arg1, arg2 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidateGenesis", reflect.TypeOf((*MockHasGenesis)(nil).ValidateGenesis), arg0, arg1, arg2) -} - // MockHasABCIGenesis is a mock of HasABCIGenesis interface. type MockHasABCIGenesis struct { ctrl *gomock.Controller @@ -487,45 +361,45 @@ func (m *MockHasABCIGenesis) EXPECT() *MockHasABCIGenesisMockRecorder { } // DefaultGenesis mocks base method. -func (m *MockHasABCIGenesis) DefaultGenesis(arg0 codec.JSONCodec) json.RawMessage { +func (m *MockHasABCIGenesis) DefaultGenesis() json.RawMessage { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "DefaultGenesis", arg0) + ret := m.ctrl.Call(m, "DefaultGenesis") ret0, _ := ret[0].(json.RawMessage) return ret0 } // DefaultGenesis indicates an expected call of DefaultGenesis. -func (mr *MockHasABCIGenesisMockRecorder) DefaultGenesis(arg0 interface{}) *gomock.Call { +func (mr *MockHasABCIGenesisMockRecorder) DefaultGenesis() *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DefaultGenesis", reflect.TypeOf((*MockHasABCIGenesis)(nil).DefaultGenesis), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DefaultGenesis", reflect.TypeOf((*MockHasABCIGenesis)(nil).DefaultGenesis)) } // ExportGenesis mocks base method. -func (m *MockHasABCIGenesis) ExportGenesis(arg0 context.Context, arg1 codec.JSONCodec) json.RawMessage { +func (m *MockHasABCIGenesis) ExportGenesis(arg0 context.Context) json.RawMessage { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ExportGenesis", arg0, arg1) + ret := m.ctrl.Call(m, "ExportGenesis", arg0) ret0, _ := ret[0].(json.RawMessage) return ret0 } // ExportGenesis indicates an expected call of ExportGenesis. -func (mr *MockHasABCIGenesisMockRecorder) ExportGenesis(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockHasABCIGenesisMockRecorder) ExportGenesis(arg0 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExportGenesis", reflect.TypeOf((*MockHasABCIGenesis)(nil).ExportGenesis), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExportGenesis", reflect.TypeOf((*MockHasABCIGenesis)(nil).ExportGenesis), arg0) } // InitGenesis mocks base method. -func (m *MockHasABCIGenesis) InitGenesis(arg0 context.Context, arg1 codec.JSONCodec, arg2 json.RawMessage) []types.ValidatorUpdate { +func (m *MockHasABCIGenesis) InitGenesis(arg0 context.Context, arg1 json.RawMessage) []types.ValidatorUpdate { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "InitGenesis", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "InitGenesis", arg0, arg1) ret0, _ := ret[0].([]types.ValidatorUpdate) return ret0 } // InitGenesis indicates an expected call of InitGenesis. -func (mr *MockHasABCIGenesisMockRecorder) InitGenesis(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockHasABCIGenesisMockRecorder) InitGenesis(arg0, arg1 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InitGenesis", reflect.TypeOf((*MockHasABCIGenesis)(nil).InitGenesis), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InitGenesis", reflect.TypeOf((*MockHasABCIGenesis)(nil).InitGenesis), arg0, arg1) } // Name mocks base method. @@ -543,17 +417,17 @@ func (mr *MockHasABCIGenesisMockRecorder) Name() *gomock.Call { } // ValidateGenesis mocks base method. -func (m *MockHasABCIGenesis) ValidateGenesis(arg0 codec.JSONCodec, arg1 client.TxEncodingConfig, arg2 json.RawMessage) error { +func (m *MockHasABCIGenesis) ValidateGenesis(arg0 json.RawMessage) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ValidateGenesis", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "ValidateGenesis", arg0) ret0, _ := ret[0].(error) return ret0 } // ValidateGenesis indicates an expected call of ValidateGenesis. -func (mr *MockHasABCIGenesisMockRecorder) ValidateGenesis(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockHasABCIGenesisMockRecorder) ValidateGenesis(arg0 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidateGenesis", reflect.TypeOf((*MockHasABCIGenesis)(nil).ValidateGenesis), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidateGenesis", reflect.TypeOf((*MockHasABCIGenesis)(nil).ValidateGenesis), arg0) } // MockHasInvariants is a mock of HasInvariants interface. @@ -580,7 +454,7 @@ func (m *MockHasInvariants) EXPECT() *MockHasInvariantsMockRecorder { } // RegisterInvariants mocks base method. -func (m *MockHasInvariants) RegisterInvariants(arg0 types1.InvariantRegistry) { +func (m *MockHasInvariants) RegisterInvariants(arg0 types0.InvariantRegistry) { m.ctrl.T.Helper() m.ctrl.Call(m, "RegisterInvariants", arg0) } diff --git a/types/module/core_module.go b/types/module/core_module.go index ae3101043603..7b59b430c019 100644 --- a/types/module/core_module.go +++ b/types/module/core_module.go @@ -43,8 +43,8 @@ type coreAppModuleAdaptor struct { } // DefaultGenesis implements HasGenesis -func (c coreAppModuleAdaptor) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { - if mod, ok := c.module.(appmodule.HasGenesis); ok { +func (c coreAppModuleAdaptor) DefaultGenesis() json.RawMessage { + if mod, ok := c.module.(appmodule.HasGenesisAuto); ok { target := genesis.RawJSONTarget{} err := mod.DefaultGenesis(target.Target()) if err != nil { @@ -60,15 +60,19 @@ func (c coreAppModuleAdaptor) DefaultGenesis(cdc codec.JSONCodec) json.RawMessag } if mod, ok := c.module.(HasGenesisBasics); ok { - return mod.DefaultGenesis(cdc) + return mod.DefaultGenesis() + } + + if mod, ok := c.module.(HasGenesis); ok { + return mod.DefaultGenesis() } return nil } // ValidateGenesis implements HasGenesis -func (c coreAppModuleAdaptor) ValidateGenesis(cdc codec.JSONCodec, txConfig client.TxEncodingConfig, bz json.RawMessage) error { - if mod, ok := c.module.(appmodule.HasGenesis); ok { +func (c coreAppModuleAdaptor) ValidateGenesis(bz json.RawMessage) error { + if mod, ok := c.module.(appmodule.HasGenesisAuto); ok { source, err := genesis.SourceFromRawJSON(bz) if err != nil { return err @@ -80,15 +84,19 @@ func (c coreAppModuleAdaptor) ValidateGenesis(cdc codec.JSONCodec, txConfig clie } if mod, ok := c.module.(HasGenesisBasics); ok { - return mod.ValidateGenesis(cdc, txConfig, bz) + return mod.ValidateGenesis(bz) + } + + if mod, ok := c.module.(HasGenesis); ok { + return mod.ValidateGenesis(bz) } return nil } // ExportGenesis implements HasGenesis -func (c coreAppModuleAdaptor) ExportGenesis(ctx context.Context, cdc codec.JSONCodec) json.RawMessage { - if module, ok := c.module.(appmodule.HasGenesis); ok { +func (c coreAppModuleAdaptor) ExportGenesis(ctx context.Context) json.RawMessage { + if module, ok := c.module.(appmodule.HasGenesisAuto); ok { ctx := sdk.UnwrapSDKContext(ctx).WithGasMeter(storetypes.NewInfiniteGasMeter()) // avoid race conditions target := genesis.RawJSONTarget{} err := module.ExportGenesis(ctx, target.Target()) @@ -104,16 +112,24 @@ func (c coreAppModuleAdaptor) ExportGenesis(ctx context.Context, cdc codec.JSONC return rawJSON } + if mod, ok := c.module.(HasABCIGenesis); ok { + return mod.ExportGenesis(ctx) + } + if mod, ok := c.module.(HasGenesis); ok { - return mod.ExportGenesis(ctx, cdc) + eg, err := mod.ExportGenesis(ctx) + if err != nil { + panic(err) + } + return eg } return nil } // InitGenesis implements HasGenesis -func (c coreAppModuleAdaptor) InitGenesis(ctx context.Context, cdc codec.JSONCodec, bz json.RawMessage) []abci.ValidatorUpdate { - if module, ok := c.module.(appmodule.HasGenesis); ok { +func (c coreAppModuleAdaptor) InitGenesis(ctx context.Context, bz json.RawMessage) []abci.ValidatorUpdate { + if module, ok := c.module.(appmodule.HasGenesisAuto); ok { // core API genesis source, err := genesis.SourceFromRawJSON(bz) if err != nil { @@ -126,12 +142,16 @@ func (c coreAppModuleAdaptor) InitGenesis(ctx context.Context, cdc codec.JSONCod } } - if mod, ok := c.module.(HasGenesis); ok { - mod.InitGenesis(ctx, cdc, bz) - return nil - } if mod, ok := c.module.(HasABCIGenesis); ok { - return mod.InitGenesis(ctx, cdc, bz) + return mod.InitGenesis(ctx, bz) + } + + if mod, ok := c.module.(HasGenesis); ok { + err := mod.InitGenesis(ctx, bz) + if err != nil { + panic(err) + } + } return nil } diff --git a/types/module/mock_appmodule_test.go b/types/module/mock_appmodule_test.go index 07c9c6389f51..848280147fb1 100644 --- a/types/module/mock_appmodule_test.go +++ b/types/module/mock_appmodule_test.go @@ -2,6 +2,7 @@ package module_test import ( "cosmossdk.io/core/appmodule" + appmodulev2 "cosmossdk.io/core/appmodule/v2" "github.com/cosmos/cosmos-sdk/types/module" ) @@ -11,7 +12,7 @@ import ( type AppModuleWithAllExtensions interface { module.AppModule module.HasServices - module.HasGenesis + appmodulev2.HasGenesis module.HasInvariants module.HasConsensusVersion module.HasABCIEndBlock @@ -32,10 +33,10 @@ type AppModuleWithAllExtensionsABCI interface { // CoreAppModule is solely here for the purpose of generating // mocks to be used in module tests. type CoreAppModule interface { - appmodule.AppModule - appmodule.HasGenesis - appmodule.HasBeginBlocker - appmodule.HasEndBlocker + appmodulev2.AppModule + appmodule.HasGenesisAuto + appmodulev2.HasBeginBlocker + appmodulev2.HasEndBlocker appmodule.HasPrecommit appmodule.HasPrepareCheckState } diff --git a/types/module/module.go b/types/module/module.go index 4aa36f435c6f..9bad87df98a2 100644 --- a/types/module/module.go +++ b/types/module/module.go @@ -32,6 +32,7 @@ import ( "golang.org/x/exp/maps" "cosmossdk.io/core/appmodule" + appmodulev2 "cosmossdk.io/core/appmodule/v2" "cosmossdk.io/core/genesis" "cosmossdk.io/core/registry" errorsmod "cosmossdk.io/errors" @@ -45,8 +46,9 @@ import ( // Deprecated: use the embed extension interfaces instead, when needed. type AppModuleBasic interface { + appmodulev2.HasRegisterInterfaces + HasName - HasRegisterInterfaces HasGRPCGateway HasAminoCodec } @@ -55,10 +57,10 @@ type AppModuleBasic interface { // its functionality has been moved to extension interfaces. // Deprecated: use appmodule.AppModule with a combination of extension interfaces interfaces instead. type AppModule interface { - appmodule.AppModule - HasName - HasRegisterInterfaces + + appmodulev2.AppModule + appmodulev2.HasRegisterInterfaces } // HasName allows the module to provide its own name for legacy purposes. @@ -72,8 +74,8 @@ type HasName interface { type HasGenesisBasics interface { HasName - DefaultGenesis(codec.JSONCodec) json.RawMessage - ValidateGenesis(codec.JSONCodec, client.TxEncodingConfig, json.RawMessage) error + DefaultGenesis() json.RawMessage + ValidateGenesis(json.RawMessage) error } // HasAminoCodec is the interface for modules that have amino codec registration. @@ -83,7 +85,7 @@ type HasAminoCodec interface { } // HasRegisterInterfaces is the interface for modules to register their msg types. -type HasRegisterInterfaces appmodule.HasRegisterInterfaces +type HasRegisterInterfaces appmodulev2.HasRegisterInterfaces // HasGRPCGateway is the interface for modules to register their gRPC gateway routes. type HasGRPCGateway interface { @@ -91,17 +93,13 @@ type HasGRPCGateway interface { } // HasGenesis is the extension interface for stateful genesis methods. -type HasGenesis interface { - HasGenesisBasics - InitGenesis(context.Context, codec.JSONCodec, json.RawMessage) - ExportGenesis(context.Context, codec.JSONCodec) json.RawMessage -} +type HasGenesis = appmodulev2.HasGenesis // HasABCIGenesis is the extension interface for stateful genesis methods which returns validator updates. type HasABCIGenesis interface { HasGenesisBasics - InitGenesis(context.Context, codec.JSONCodec, json.RawMessage) []abci.ValidatorUpdate - ExportGenesis(context.Context, codec.JSONCodec) json.RawMessage + InitGenesis(context.Context, json.RawMessage) []abci.ValidatorUpdate + ExportGenesis(context.Context) json.RawMessage } // HasInvariants is the interface for registering invariants. @@ -207,7 +205,7 @@ func NewManagerFromMap(moduleMap map[string]appmodule.AppModule) *Manager { func (m *Manager) SetOrderInitGenesis(moduleNames ...string) { m.assertNoForgottenModules("SetOrderInitGenesis", moduleNames, func(moduleName string) bool { module := m.Modules[moduleName] - if _, hasGenesis := module.(appmodule.HasGenesis); hasGenesis { + if _, hasGenesis := module.(appmodule.HasGenesisAuto); hasGenesis { return !hasGenesis } @@ -225,7 +223,7 @@ func (m *Manager) SetOrderInitGenesis(moduleNames ...string) { func (m *Manager) SetOrderExportGenesis(moduleNames ...string) { m.assertNoForgottenModules("SetOrderExportGenesis", moduleNames, func(moduleName string) bool { module := m.Modules[moduleName] - if _, hasGenesis := module.(appmodule.HasGenesis); hasGenesis { + if _, hasGenesis := module.(appmodule.HasGenesisAuto); hasGenesis { return !hasGenesis } @@ -324,11 +322,11 @@ func (m *Manager) RegisterInterfaces(registry registry.LegacyRegistry) { } // DefaultGenesis provides default genesis information for all modules -func (m *Manager) DefaultGenesis(cdc codec.JSONCodec) map[string]json.RawMessage { +func (m *Manager) DefaultGenesis() map[string]json.RawMessage { genesisData := make(map[string]json.RawMessage) for _, b := range m.Modules { if mod, ok := b.(HasGenesisBasics); ok { - genesisData[mod.Name()] = mod.DefaultGenesis(cdc) + genesisData[mod.Name()] = mod.DefaultGenesis() } else if mod, ok := b.(HasName); ok { genesisData[mod.Name()] = []byte("{}") } @@ -338,11 +336,11 @@ func (m *Manager) DefaultGenesis(cdc codec.JSONCodec) map[string]json.RawMessage } // ValidateGenesis performs genesis state validation for all modules -func (m *Manager) ValidateGenesis(cdc codec.JSONCodec, txEncCfg client.TxEncodingConfig, genesisData map[string]json.RawMessage) error { +func (m *Manager) ValidateGenesis(genesisData map[string]json.RawMessage) error { for _, b := range m.Modules { // first check if the module is an adapted Core API Module if mod, ok := b.(HasGenesisBasics); ok { - if err := mod.ValidateGenesis(cdc, txEncCfg, genesisData[mod.Name()]); err != nil { + if err := mod.ValidateGenesis(genesisData[mod.Name()]); err != nil { return err } } @@ -427,7 +425,7 @@ func (m *Manager) RegisterServices(cfg Configurator) error { // InitGenesis performs init genesis functionality for modules. Exactly one // module must return a non-empty validator set update to correctly initialize // the chain. -func (m *Manager) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, genesisData map[string]json.RawMessage) (*abci.ResponseInitChain, error) { +func (m *Manager) InitGenesis(ctx sdk.Context, _ codec.JSONCodec, genesisData map[string]json.RawMessage) (*abci.ResponseInitChain, error) { var validatorUpdates []abci.ValidatorUpdate ctx.Logger().Info("initializing blockchain state from genesis.json") for _, moduleName := range m.OrderInitGenesis { @@ -437,7 +435,7 @@ func (m *Manager) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, genesisData mod := m.Modules[moduleName] // we might get an adapted module, a native core API module or a legacy module - if module, ok := mod.(appmodule.HasGenesis); ok { + if module, ok := mod.(appmodule.HasGenesisAuto); ok { ctx.Logger().Debug("running initialization for module", "module", moduleName) // core API genesis source, err := genesis.SourceFromRawJSON(genesisData[moduleName]) @@ -451,10 +449,12 @@ func (m *Manager) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, genesisData } } else if module, ok := mod.(HasGenesis); ok { ctx.Logger().Debug("running initialization for module", "module", moduleName) - module.InitGenesis(ctx, cdc, genesisData[moduleName]) + if err := module.InitGenesis(ctx, genesisData[moduleName]); err != nil { + return &abci.ResponseInitChain{}, err + } } else if module, ok := mod.(HasABCIGenesis); ok { ctx.Logger().Debug("running initialization for module", "module", moduleName) - moduleValUpdates := module.InitGenesis(ctx, cdc, genesisData[moduleName]) + moduleValUpdates := module.InitGenesis(ctx, genesisData[moduleName]) // use these validator updates if provided, the module manager assumes // only one module will update the validator set @@ -478,12 +478,12 @@ func (m *Manager) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, genesisData } // ExportGenesis performs export genesis functionality for modules -func (m *Manager) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) (map[string]json.RawMessage, error) { - return m.ExportGenesisForModules(ctx, cdc, []string{}) +func (m *Manager) ExportGenesis(ctx sdk.Context) (map[string]json.RawMessage, error) { + return m.ExportGenesisForModules(ctx, []string{}) } // ExportGenesisForModules performs export genesis functionality for modules -func (m *Manager) ExportGenesisForModules(ctx sdk.Context, cdc codec.JSONCodec, modulesToExport []string) (map[string]json.RawMessage, error) { +func (m *Manager) ExportGenesisForModules(ctx sdk.Context, modulesToExport []string) (map[string]json.RawMessage, error) { if len(modulesToExport) == 0 { modulesToExport = m.OrderExportGenesis } @@ -500,10 +500,10 @@ func (m *Manager) ExportGenesisForModules(ctx sdk.Context, cdc codec.JSONCodec, channels := make(map[string]chan genesisResult) for _, moduleName := range modulesToExport { mod := m.Modules[moduleName] - if module, ok := mod.(appmodule.HasGenesis); ok { + if module, ok := mod.(appmodule.HasGenesisAuto); ok { // core API genesis channels[moduleName] = make(chan genesisResult) - go func(module appmodule.HasGenesis, ch chan genesisResult) { + go func(module appmodule.HasGenesisAuto, ch chan genesisResult) { ctx := ctx.WithGasMeter(storetypes.NewInfiniteGasMeter()) // avoid race conditions target := genesis.RawJSONTarget{} err := module.ExportGenesis(ctx, target.Target()) @@ -524,13 +524,18 @@ func (m *Manager) ExportGenesisForModules(ctx sdk.Context, cdc codec.JSONCodec, channels[moduleName] = make(chan genesisResult) go func(module HasGenesis, ch chan genesisResult) { ctx := ctx.WithGasMeter(storetypes.NewInfiniteGasMeter()) // avoid race conditions - ch <- genesisResult{module.ExportGenesis(ctx, cdc), nil} + jm, err := module.ExportGenesis(ctx) + if err != nil { + ch <- genesisResult{nil, err} + return + } + ch <- genesisResult{jm, nil} }(module, channels[moduleName]) } else if module, ok := mod.(HasABCIGenesis); ok { channels[moduleName] = make(chan genesisResult) go func(module HasABCIGenesis, ch chan genesisResult) { ctx := ctx.WithGasMeter(storetypes.NewInfiniteGasMeter()) // avoid race conditions - ch <- genesisResult{module.ExportGenesis(ctx, cdc), nil} + ch <- genesisResult{module.ExportGenesis(ctx), nil} }(module, channels[moduleName]) } } @@ -678,10 +683,12 @@ func (m Manager) RunMigrations(ctx context.Context, cfg Configurator, fromVM Ver } else { sdkCtx.Logger().Info(fmt.Sprintf("adding a new module: %s", moduleName)) if module, ok := m.Modules[moduleName].(HasGenesis); ok { - module.InitGenesis(sdkCtx, c.cdc, module.DefaultGenesis(c.cdc)) + if err := module.InitGenesis(sdkCtx, module.DefaultGenesis()); err != nil { + return nil, err + } } if module, ok := m.Modules[moduleName].(HasABCIGenesis); ok { - moduleValUpdates := module.InitGenesis(sdkCtx, c.cdc, module.DefaultGenesis(c.cdc)) + moduleValUpdates := module.InitGenesis(sdkCtx, module.DefaultGenesis()) // The module manager assumes only one module will update the // validator set, and it can't be a new module. if len(moduleValUpdates) > 0 { diff --git a/types/module/module_test.go b/types/module/module_test.go index 4853ca86e7dc..373d9cca68ca 100644 --- a/types/module/module_test.go +++ b/types/module/module_test.go @@ -177,7 +177,7 @@ func TestManager_InitGenesis(t *testing.T) { genesisData := map[string]json.RawMessage{"module1": json.RawMessage(`{"key": "value"}`)} // this should panic since the validator set is empty even after init genesis - mockAppModule1.EXPECT().InitGenesis(gomock.Eq(ctx), gomock.Eq(cdc), gomock.Eq(genesisData["module1"])).Times(1) + mockAppModule1.EXPECT().InitGenesis(gomock.Eq(ctx), gomock.Eq(genesisData["module1"])).Times(1) _, err := mm.InitGenesis(ctx, cdc, genesisData) require.ErrorContains(t, err, "validator set is empty after InitGenesis") @@ -194,16 +194,16 @@ func TestManager_InitGenesis(t *testing.T) { mockAppModuleABCI2.EXPECT().Name().Times(2).Return("module2") mmABCI := module.NewManager(mockAppModuleABCI1, mockAppModuleABCI2) // panic because more than one module returns validator set updates - mockAppModuleABCI1.EXPECT().InitGenesis(gomock.Eq(ctx), gomock.Eq(cdc), gomock.Eq(genesisData["module1"])).Times(1).Return([]abci.ValidatorUpdate{{}}) - mockAppModuleABCI2.EXPECT().InitGenesis(gomock.Eq(ctx), gomock.Eq(cdc), gomock.Eq(genesisData["module2"])).Times(1).Return([]abci.ValidatorUpdate{{}}) + mockAppModuleABCI1.EXPECT().InitGenesis(gomock.Eq(ctx), gomock.Eq(genesisData["module1"])).Times(1).Return([]abci.ValidatorUpdate{{}}) + mockAppModuleABCI2.EXPECT().InitGenesis(gomock.Eq(ctx), gomock.Eq(genesisData["module2"])).Times(1).Return([]abci.ValidatorUpdate{{}}) _, err = mmABCI.InitGenesis(ctx, cdc, genesisData) require.ErrorContains(t, err, "validator InitGenesis updates already set by a previous module") // happy path mm2 := module.NewManager(mockAppModuleABCI1, mockAppModule2, module.CoreAppModuleAdaptor("module3", mockAppModule3)) - mockAppModuleABCI1.EXPECT().InitGenesis(gomock.Eq(ctx), gomock.Eq(cdc), gomock.Eq(genesisData["module1"])).Times(1).Return([]abci.ValidatorUpdate{{}}) - mockAppModule2.EXPECT().InitGenesis(gomock.Eq(ctx), gomock.Eq(cdc), gomock.Eq(genesisData["module2"])).Times(1) + mockAppModuleABCI1.EXPECT().InitGenesis(gomock.Eq(ctx), gomock.Eq(genesisData["module1"])).Times(1).Return([]abci.ValidatorUpdate{{}}) + mockAppModule2.EXPECT().InitGenesis(gomock.Eq(ctx), gomock.Eq(genesisData["module2"])).Times(1) mockAppModule3.EXPECT().InitGenesis(gomock.Eq(ctx), gomock.Any()).Times(1).Return(nil) _, err = mm2.InitGenesis(ctx, cdc, genesisData) require.NoError(t, err) @@ -223,10 +223,8 @@ func TestManager_ExportGenesis(t *testing.T) { require.Equal(t, 3, len(mm.Modules)) ctx := sdk.NewContext(nil, false, log.NewNopLogger()) - interfaceRegistry := types.NewInterfaceRegistry() - cdc := codec.NewProtoCodec(interfaceRegistry) - mockAppModule1.EXPECT().ExportGenesis(gomock.Eq(ctx), gomock.Eq(cdc)).AnyTimes().Return(json.RawMessage(`{"key1": "value1"}`)) - mockAppModule2.EXPECT().ExportGenesis(gomock.Eq(ctx), gomock.Eq(cdc)).AnyTimes().Return(json.RawMessage(`{"key2": "value2"}`)) + mockAppModule1.EXPECT().ExportGenesis(gomock.Eq(ctx)).AnyTimes().Return(json.RawMessage(`{"key1": "value1"}`), nil) + mockAppModule2.EXPECT().ExportGenesis(gomock.Eq(ctx)).AnyTimes().Return(json.RawMessage(`{"key2": "value2"}`), nil) want := map[string]json.RawMessage{ "module1": json.RawMessage(`{"key1": "value1"}`), @@ -236,23 +234,23 @@ func TestManager_ExportGenesis(t *testing.T) { }`), } - res, err := mm.ExportGenesis(ctx, cdc) + res, err := mm.ExportGenesis(ctx) require.NoError(t, err) require.Equal(t, want, res) - res, err = mm.ExportGenesisForModules(ctx, cdc, []string{}) + res, err = mm.ExportGenesisForModules(ctx, []string{}) require.NoError(t, err) require.Equal(t, want, res) - res, err = mm.ExportGenesisForModules(ctx, cdc, []string{"module1"}) + res, err = mm.ExportGenesisForModules(ctx, []string{"module1"}) require.NoError(t, err) require.Equal(t, map[string]json.RawMessage{"module1": json.RawMessage(`{"key1": "value1"}`)}, res) - res, err = mm.ExportGenesisForModules(ctx, cdc, []string{"module2"}) + res, err = mm.ExportGenesisForModules(ctx, []string{"module2"}) require.NoError(t, err) require.NotEqual(t, map[string]json.RawMessage{"module1": json.RawMessage(`{"key1": "value1"}`)}, res) - _, err = mm.ExportGenesisForModules(ctx, cdc, []string{"module1", "modulefoo"}) + _, err = mm.ExportGenesisForModules(ctx, []string{"module1", "modulefoo"}) require.Error(t, err) } @@ -333,8 +331,6 @@ func TestCoreAPIManager_ExportGenesis(t *testing.T) { require.Equal(t, 2, len(mm.Modules)) ctx := sdk.NewContext(nil, false, log.NewNopLogger()) - interfaceRegistry := types.NewInterfaceRegistry() - cdc := codec.NewProtoCodec(interfaceRegistry) want := map[string]json.RawMessage{ "module1": json.RawMessage(`{ "someField": "someKey" @@ -344,23 +340,23 @@ func TestCoreAPIManager_ExportGenesis(t *testing.T) { }`), } - res, err := mm.ExportGenesis(ctx, cdc) + res, err := mm.ExportGenesis(ctx) require.NoError(t, err) require.Equal(t, want, res) - res, err = mm.ExportGenesisForModules(ctx, cdc, []string{}) + res, err = mm.ExportGenesisForModules(ctx, []string{}) require.NoError(t, err) require.Equal(t, want, res) - res, err = mm.ExportGenesisForModules(ctx, cdc, []string{"module1"}) + res, err = mm.ExportGenesisForModules(ctx, []string{"module1"}) require.NoError(t, err) require.Equal(t, map[string]json.RawMessage{"module1": want["module1"]}, res) - res, err = mm.ExportGenesisForModules(ctx, cdc, []string{"module2"}) + res, err = mm.ExportGenesisForModules(ctx, []string{"module2"}) require.NoError(t, err) require.NotEqual(t, map[string]json.RawMessage{"module1": want["module1"]}, res) - _, err = mm.ExportGenesisForModules(ctx, cdc, []string{"module1", "modulefoo"}) + _, err = mm.ExportGenesisForModules(ctx, []string{"module1", "modulefoo"}) require.Error(t, err) } @@ -594,7 +590,7 @@ func (MockCoreAppModule) ExportGenesis(ctx context.Context, target appmodule.Gen } var ( - _ appmodule.AppModule = MockCoreAppModule{} - _ appmodule.HasGenesis = MockCoreAppModule{} - _ appmodule.HasServices = MockCoreAppModule{} + _ appmodule.AppModule = MockCoreAppModule{} + _ appmodule.HasGenesisAuto = MockCoreAppModule{} + _ appmodule.HasServices = MockCoreAppModule{} ) diff --git a/x/accounts/module.go b/x/accounts/module.go index b60ebafb57fa..71a16cff195a 100644 --- a/x/accounts/module.go +++ b/x/accounts/module.go @@ -8,11 +8,11 @@ import ( "google.golang.org/grpc" "cosmossdk.io/core/appmodule" + appmodulev2 "cosmossdk.io/core/appmodule/v2" "cosmossdk.io/core/registry" "cosmossdk.io/x/accounts/cli" v1 "cosmossdk.io/x/accounts/v1" - "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/types/address" "github.com/cosmos/cosmos-sdk/types/module" @@ -36,16 +36,17 @@ var ( _ appmodule.HasServices = AppModule{} _ module.HasName = AppModule{} - _ module.HasGenesis = AppModule{} + _ appmodulev2.HasGenesis = AppModule{} _ module.HasConsensusVersion = AppModule{} ) -func NewAppModule(k Keeper) AppModule { - return AppModule{k: k} +func NewAppModule(cdc codec.Codec, k Keeper) AppModule { + return AppModule{k: k, cdc: cdc} } type AppModule struct { - k Keeper + cdc codec.Codec + k Keeper } func (m AppModule) IsAppModule() {} @@ -67,34 +68,37 @@ func (m AppModule) RegisterServices(registar grpc.ServiceRegistrar) error { // App module genesis -func (AppModule) DefaultGenesis(jsonCodec codec.JSONCodec) json.RawMessage { - return jsonCodec.MustMarshalJSON(&v1.GenesisState{}) +func (am AppModule) DefaultGenesis() json.RawMessage { + return am.cdc.MustMarshalJSON(&v1.GenesisState{}) } -func (AppModule) ValidateGenesis(jsonCodec codec.JSONCodec, config client.TxEncodingConfig, message json.RawMessage) error { +func (am AppModule) ValidateGenesis(message json.RawMessage) error { gs := &v1.GenesisState{} - if err := jsonCodec.UnmarshalJSON(message, gs); err != nil { + if err := am.cdc.UnmarshalJSON(message, gs); err != nil { return err } // Add validation logic for gs here return nil } -func (m AppModule) InitGenesis(ctx context.Context, jsonCodec codec.JSONCodec, message json.RawMessage) { +func (am AppModule) InitGenesis(ctx context.Context, message json.RawMessage) error { gs := &v1.GenesisState{} - jsonCodec.MustUnmarshalJSON(message, gs) - err := m.k.ImportState(ctx, gs) + if err := am.cdc.UnmarshalJSON(message, gs); err != nil { + return err + } + err := am.k.ImportState(ctx, gs) if err != nil { - panic(err) + return err } + return nil } -func (m AppModule) ExportGenesis(ctx context.Context, jsonCodec codec.JSONCodec) json.RawMessage { - gs, err := m.k.ExportState(ctx) +func (am AppModule) ExportGenesis(ctx context.Context) (json.RawMessage, error) { + gs, err := am.k.ExportState(ctx) if err != nil { - panic(err) + return nil, err } - return jsonCodec.MustMarshalJSON(gs) + return am.cdc.MarshalJSON(gs) } func (AppModule) GetTxCmd() *cobra.Command { diff --git a/x/auth/module.go b/x/auth/module.go index 2a94ab4bad53..d92176043dfb 100644 --- a/x/auth/module.go +++ b/x/auth/module.go @@ -9,6 +9,7 @@ import ( "google.golang.org/grpc" "cosmossdk.io/core/appmodule" + appmodulev2 "cosmossdk.io/core/appmodule/v2" "cosmossdk.io/core/registry" "cosmossdk.io/x/auth/keeper" "cosmossdk.io/x/auth/simulation" @@ -29,7 +30,7 @@ const ( var ( _ module.AppModuleSimulation = AppModule{} _ module.HasName = AppModule{} - _ module.HasGenesis = AppModule{} + _ appmodulev2.HasGenesis = AppModule{} _ appmodule.AppModule = AppModule{} _ appmodule.HasServices = AppModule{} @@ -40,6 +41,7 @@ var ( type AppModule struct { accountKeeper keeper.AccountKeeper randGenAccountsFn types.RandomGenesisAccountsFn + cdc codec.Codec } // IsAppModule implements the appmodule.AppModule interface. @@ -50,6 +52,7 @@ func NewAppModule(cdc codec.Codec, accountKeeper keeper.AccountKeeper, randGenAc return AppModule{ accountKeeper: accountKeeper, randGenAccountsFn: randGenAccountsFn, + cdc: cdc, } } @@ -104,14 +107,14 @@ func (am AppModule) RegisterMigrations(mr appmodule.MigrationRegistrar) error { } // DefaultGenesis returns default genesis state as raw bytes for the auth module. -func (AppModule) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { - return cdc.MustMarshalJSON(types.DefaultGenesisState()) +func (am AppModule) DefaultGenesis() json.RawMessage { + return am.cdc.MustMarshalJSON(types.DefaultGenesisState()) } // ValidateGenesis performs genesis state validation for the auth module. -func (AppModule) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncodingConfig, bz json.RawMessage) error { +func (am AppModule) ValidateGenesis(bz json.RawMessage) error { var data types.GenesisState - if err := cdc.UnmarshalJSON(bz, &data); err != nil { + if err := am.cdc.UnmarshalJSON(bz, &data); err != nil { return fmt.Errorf("failed to unmarshal %s genesis state: %w", types.ModuleName, err) } @@ -119,23 +122,22 @@ func (AppModule) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncodingCo } // InitGenesis performs genesis initialization for the auth module. -func (am AppModule) InitGenesis(ctx context.Context, cdc codec.JSONCodec, data json.RawMessage) { +func (am AppModule) InitGenesis(ctx context.Context, data json.RawMessage) error { var genesisState types.GenesisState - cdc.MustUnmarshalJSON(data, &genesisState) - err := am.accountKeeper.InitGenesis(ctx, genesisState) - if err != nil { - panic(err) + if err := am.cdc.UnmarshalJSON(data, &genesisState); err != nil { + return err } + return am.accountKeeper.InitGenesis(ctx, genesisState) } // ExportGenesis returns the exported genesis state as raw bytes for the auth // module. -func (am AppModule) ExportGenesis(ctx context.Context, cdc codec.JSONCodec) json.RawMessage { +func (am AppModule) ExportGenesis(ctx context.Context) (json.RawMessage, error) { gs, err := am.accountKeeper.ExportGenesis(ctx) if err != nil { - panic(err) + return nil, err } - return cdc.MustMarshalJSON(gs) + return am.cdc.MarshalJSON(gs) } // ConsensusVersion implements HasConsensusVersion diff --git a/x/authz/keeper/genesis.go b/x/authz/keeper/genesis.go index d7f28d1b07c3..e014f5265748 100644 --- a/x/authz/keeper/genesis.go +++ b/x/authz/keeper/genesis.go @@ -9,7 +9,7 @@ import ( ) // InitGenesis initializes new authz genesis -func (k Keeper) InitGenesis(ctx context.Context, data *authz.GenesisState) { +func (k Keeper) InitGenesis(ctx context.Context, data *authz.GenesisState) error { now := k.environment.HeaderService.GetHeaderInfo(ctx).Time for _, entry := range data.Authorization { // ignore expired authorizations @@ -19,11 +19,11 @@ func (k Keeper) InitGenesis(ctx context.Context, data *authz.GenesisState) { grantee, err := k.authKeeper.AddressCodec().StringToBytes(entry.Grantee) if err != nil { - panic(err) + return err } granter, err := k.authKeeper.AddressCodec().StringToBytes(entry.Granter) if err != nil { - panic(err) + return err } a, ok := entry.Authorization.GetCachedValue().(authz.Authorization) @@ -33,9 +33,10 @@ func (k Keeper) InitGenesis(ctx context.Context, data *authz.GenesisState) { err = k.SaveGrant(ctx, grantee, granter, a, entry.Expiration) if err != nil { - panic(err) + return err } } + return nil } // ExportGenesis returns a GenesisState for a given context. diff --git a/x/authz/keeper/genesis_test.go b/x/authz/keeper/genesis_test.go index 78c15797d297..d913c3bef304 100644 --- a/x/authz/keeper/genesis_test.go +++ b/x/authz/keeper/genesis_test.go @@ -83,7 +83,6 @@ func (suite *GenesisTestSuite) TestImportExportGenesis() { suite.Require().NoError(err) genesis := suite.keeper.ExportGenesis(suite.ctx) - // TODO, recheck! // Clear keeper err = suite.keeper.DeleteGrant(suite.ctx, granteeAddr, granterAddr, grant.MsgTypeURL()) suite.Require().NoError(err) @@ -91,7 +90,8 @@ func (suite *GenesisTestSuite) TestImportExportGenesis() { suite.Require().NotEqual(genesis, newGenesis) suite.Require().Empty(newGenesis) - suite.keeper.InitGenesis(suite.ctx, genesis) + err = suite.keeper.InitGenesis(suite.ctx, genesis) + suite.Require().NoError(err) newGenesis = suite.keeper.ExportGenesis(suite.ctx) suite.Require().Equal(genesis, newGenesis) } diff --git a/x/authz/module/module.go b/x/authz/module/module.go index d11db1bcad8f..65a9d00a97e5 100644 --- a/x/authz/module/module.go +++ b/x/authz/module/module.go @@ -10,6 +10,7 @@ import ( "google.golang.org/grpc" "cosmossdk.io/core/appmodule" + appmodulev2 "cosmossdk.io/core/appmodule/v2" "cosmossdk.io/core/registry" "cosmossdk.io/errors" "cosmossdk.io/x/authz" @@ -32,7 +33,7 @@ var ( _ module.HasGRPCGateway = AppModule{} _ appmodule.HasRegisterInterfaces = AppModule{} _ module.AppModuleSimulation = AppModule{} - _ module.HasGenesis = AppModule{} + _ appmodulev2.HasGenesis = AppModule{} _ appmodule.AppModule = AppModule{} _ appmodule.HasBeginBlocker = AppModule{} @@ -109,14 +110,14 @@ func (AppModule) GetTxCmd() *cobra.Command { } // DefaultGenesis returns default genesis state as raw bytes for the authz module. -func (AppModule) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { - return cdc.MustMarshalJSON(authz.DefaultGenesisState()) +func (am AppModule) DefaultGenesis() json.RawMessage { + return am.cdc.MustMarshalJSON(authz.DefaultGenesisState()) } // ValidateGenesis performs genesis state validation for the authz module. -func (AppModule) ValidateGenesis(cdc codec.JSONCodec, config sdkclient.TxEncodingConfig, bz json.RawMessage) error { +func (am AppModule) ValidateGenesis(bz json.RawMessage) error { var data authz.GenesisState - if err := cdc.UnmarshalJSON(bz, &data); err != nil { + if err := am.cdc.UnmarshalJSON(bz, &data); err != nil { return errors.Wrapf(err, "failed to unmarshal %s genesis state", authz.ModuleName) } @@ -124,16 +125,18 @@ func (AppModule) ValidateGenesis(cdc codec.JSONCodec, config sdkclient.TxEncodin } // InitGenesis performs genesis initialization for the authz module. -func (am AppModule) InitGenesis(ctx context.Context, cdc codec.JSONCodec, data json.RawMessage) { +func (am AppModule) InitGenesis(ctx context.Context, data json.RawMessage) error { var genesisState authz.GenesisState - cdc.MustUnmarshalJSON(data, &genesisState) - am.keeper.InitGenesis(ctx, &genesisState) + if err := am.cdc.UnmarshalJSON(data, &genesisState); err != nil { + return err + } + return am.keeper.InitGenesis(ctx, &genesisState) } // ExportGenesis returns the exported genesis state as raw bytes for the authz module. -func (am AppModule) ExportGenesis(ctx context.Context, cdc codec.JSONCodec) json.RawMessage { +func (am AppModule) ExportGenesis(ctx context.Context) (json.RawMessage, error) { gs := am.keeper.ExportGenesis(ctx) - return cdc.MustMarshalJSON(gs) + return am.cdc.MarshalJSON(gs) } // ConsensusVersion implements HasConsensusVersion. diff --git a/x/bank/CHANGELOG.md b/x/bank/CHANGELOG.md index 8a03515679fe..fc76c3c85efd 100644 --- a/x/bank/CHANGELOG.md +++ b/x/bank/CHANGELOG.md @@ -25,10 +25,6 @@ Ref: https://keepachangelog.com/en/1.0.0/ ## [Unreleased] -### Consens Breaking Changes - -* [#19188](https://github.com/cosmos/cosmos-sdk/pull/19188) Remove creation of `BaseAccount` when sending a message to an account that does not exist - ### Features * [#17569](https://github.com/cosmos/cosmos-sdk/pull/17569) Introduce a new message type, `MsgBurn`, to burn coins. @@ -41,5 +37,8 @@ Ref: https://keepachangelog.com/en/1.0.0/ * [#17569](https://github.com/cosmos/cosmos-sdk/pull/17569) `BurnCoins` takes an address instead of a module name * [#19477](https://github.com/cosmos/cosmos-sdk/pull/19477) `appmodule.Environment` is passed to bank `NewKeeper` +* [#19627](https://github.com/cosmos/cosmos-sdk/pull/19627) The genesis api has been updated to match `appmodule.HasGenesis`. -### Bug Fixes +### Consensus Breaking Changes + +* [#19188](https://github.com/cosmos/cosmos-sdk/pull/19188) Remove creation of `BaseAccount` when sending a message to an account that does not exist diff --git a/x/bank/keeper/genesis.go b/x/bank/keeper/genesis.go index 150f40389666..61a0729becab 100644 --- a/x/bank/keeper/genesis.go +++ b/x/bank/keeper/genesis.go @@ -12,9 +12,9 @@ import ( ) // InitGenesis initializes the bank module's state from a given genesis state. -func (k BaseKeeper) InitGenesis(ctx context.Context, genState *types.GenesisState) { +func (k BaseKeeper) InitGenesis(ctx context.Context, genState *types.GenesisState) error { if err := k.SetParams(ctx, genState.Params); err != nil { - panic(err) + return err } for _, se := range genState.GetAllSendEnabled() { @@ -28,13 +28,13 @@ func (k BaseKeeper) InitGenesis(ctx context.Context, genState *types.GenesisStat addr := balance.GetAddress() bz, err := k.ak.AddressCodec().StringToBytes(addr) if err != nil { - panic(err) + return err } for _, coin := range balance.Coins { err := k.Balances.Set(ctx, collections.Join(sdk.AccAddress(bz), coin.Denom), coin.Amount) if err != nil { - panic(err) + return err } } @@ -43,7 +43,7 @@ func (k BaseKeeper) InitGenesis(ctx context.Context, genState *types.GenesisStat totalSupply := totalSupplyMap.ToCoins() if !genState.Supply.Empty() && !genState.Supply.Equal(totalSupply) { - panic(fmt.Errorf("genesis supply is incorrect, expected %v, got %v", genState.Supply, totalSupply)) + return fmt.Errorf("genesis supply is incorrect, expected %v, got %v", genState.Supply, totalSupply) } for _, supply := range totalSupply { @@ -53,6 +53,7 @@ func (k BaseKeeper) InitGenesis(ctx context.Context, genState *types.GenesisStat for _, meta := range genState.DenomMetadata { k.SetDenomMetaData(ctx, meta) } + return nil } // ExportGenesis returns the bank module's genesis state. diff --git a/x/bank/keeper/genesis_test.go b/x/bank/keeper/genesis_test.go index 85f982c8465e..8798c51d5044 100644 --- a/x/bank/keeper/genesis_test.go +++ b/x/bank/keeper/genesis_test.go @@ -67,7 +67,7 @@ func (suite *KeeperTestSuite) TestInitGenesis() { g := types.DefaultGenesisState() g.DenomMetadata = []types.Metadata{m} bk := suite.bankKeeper - bk.InitGenesis(suite.ctx, g) + suite.Require().NoError(bk.InitGenesis(suite.ctx, g)) m2, found := bk.GetDenomMetaData(suite.ctx, m.Base) suite.Require().True(found) @@ -88,36 +88,35 @@ func (suite *KeeperTestSuite) TestTotalSupply() { suite.Require().NoError(err) testcases := []struct { - name string - genesis *types.GenesisState - expSupply sdk.Coins - expPanic bool - expPanicMsg string + name string + genesis *types.GenesisState + expSupply sdk.Coins + expErrMsg string }{ { "calculation NOT matching genesis Supply field", types.NewGenesisState(defaultGenesis.Params, balances, sdk.NewCoins(sdk.NewCoin("wrongcoin", sdkmath.NewInt(1))), defaultGenesis.DenomMetadata, defaultGenesis.SendEnabled), - nil, true, "genesis supply is incorrect, expected 1wrongcoin, got 21barcoin,11foocoin", + nil, "genesis supply is incorrect, expected 1wrongcoin, got 21barcoin,11foocoin", }, { "calculation matches genesis Supply field", types.NewGenesisState(defaultGenesis.Params, balances, totalSupply, defaultGenesis.DenomMetadata, defaultGenesis.SendEnabled), - totalSupply, false, "", + totalSupply, "", }, { "calculation is correct, empty genesis Supply field", types.NewGenesisState(defaultGenesis.Params, balances, nil, defaultGenesis.DenomMetadata, defaultGenesis.SendEnabled), - totalSupply, false, "", + totalSupply, "", }, } for _, tc := range testcases { tc := tc suite.Run(tc.name, func() { - if tc.expPanic { - suite.PanicsWithError(tc.expPanicMsg, func() { suite.bankKeeper.InitGenesis(suite.ctx, tc.genesis) }) + if tc.expErrMsg != "" { + suite.Require().ErrorContains(suite.bankKeeper.InitGenesis(suite.ctx, tc.genesis), tc.expErrMsg) } else { - suite.bankKeeper.InitGenesis(suite.ctx, tc.genesis) + suite.Require().NoError(suite.bankKeeper.InitGenesis(suite.ctx, tc.genesis)) totalSupply, _, err := suite.bankKeeper.GetPaginatedTotalSupply(suite.ctx, &query.PageRequest{Limit: query.PaginationMaxLimit}) suite.Require().NoError(err) diff --git a/x/bank/keeper/keeper.go b/x/bank/keeper/keeper.go index e52ae355e61f..e4d76312a419 100644 --- a/x/bank/keeper/keeper.go +++ b/x/bank/keeper/keeper.go @@ -26,7 +26,7 @@ type Keeper interface { SendKeeper WithMintCoinsRestriction(types.MintingRestrictionFn) BaseKeeper - InitGenesis(context.Context, *types.GenesisState) + InitGenesis(context.Context, *types.GenesisState) error ExportGenesis(context.Context) *types.GenesisState GetSupply(ctx context.Context, denom string) sdk.Coin diff --git a/x/bank/module.go b/x/bank/module.go index 184996dd82e4..cee6253cd31a 100644 --- a/x/bank/module.go +++ b/x/bank/module.go @@ -4,13 +4,13 @@ import ( "context" "encoding/json" "fmt" - "time" gwruntime "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" "google.golang.org/grpc" "cosmossdk.io/core/appmodule" + appmodulev2 "cosmossdk.io/core/appmodule/v2" "cosmossdk.io/core/registry" "cosmossdk.io/x/bank/client/cli" "cosmossdk.io/x/bank/keeper" @@ -19,7 +19,6 @@ import ( "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" - "github.com/cosmos/cosmos-sdk/telemetry" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" @@ -34,7 +33,7 @@ var ( _ module.HasGRPCGateway = AppModule{} _ appmodule.HasRegisterInterfaces = AppModule{} _ module.AppModuleSimulation = AppModule{} - _ module.HasGenesis = AppModule{} + _ appmodulev2.HasGenesis = AppModule{} _ module.HasInvariants = AppModule{} _ appmodule.AppModule = AppModule{} @@ -119,14 +118,14 @@ func (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry) { } // DefaultGenesis returns default genesis state as raw bytes for the bank module. -func (AppModule) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { - return cdc.MustMarshalJSON(types.DefaultGenesisState()) +func (am AppModule) DefaultGenesis() json.RawMessage { + return am.cdc.MustMarshalJSON(types.DefaultGenesisState()) } // ValidateGenesis performs genesis state validation for the bank module. -func (AppModule) ValidateGenesis(cdc codec.JSONCodec, _ client.TxEncodingConfig, bz json.RawMessage) error { +func (am AppModule) ValidateGenesis(bz json.RawMessage) error { var data types.GenesisState - if err := cdc.UnmarshalJSON(bz, &data); err != nil { + if err := am.cdc.UnmarshalJSON(bz, &data); err != nil { return fmt.Errorf("failed to unmarshal %s genesis state: %w", types.ModuleName, err) } @@ -134,20 +133,20 @@ func (AppModule) ValidateGenesis(cdc codec.JSONCodec, _ client.TxEncodingConfig, } // InitGenesis performs genesis initialization for the bank module. -func (am AppModule) InitGenesis(ctx context.Context, cdc codec.JSONCodec, data json.RawMessage) { - start := time.Now() +func (am AppModule) InitGenesis(ctx context.Context, data json.RawMessage) error { var genesisState types.GenesisState - cdc.MustUnmarshalJSON(data, &genesisState) - telemetry.MeasureSince(start, "InitGenesis", "crisis", "unmarshal") + if err := am.cdc.UnmarshalJSON(data, &genesisState); err != nil { + return err + } - am.keeper.InitGenesis(ctx, &genesisState) + return am.keeper.InitGenesis(ctx, &genesisState) } // ExportGenesis returns the exported genesis state as raw bytes for the bank // module. -func (am AppModule) ExportGenesis(ctx context.Context, cdc codec.JSONCodec) json.RawMessage { +func (am AppModule) ExportGenesis(ctx context.Context) (json.RawMessage, error) { gs := am.keeper.ExportGenesis(ctx) - return cdc.MustMarshalJSON(gs) + return am.cdc.MarshalJSON(gs) } // ConsensusVersion implements HasConsensusVersion diff --git a/x/circuit/keeper/genesis.go b/x/circuit/keeper/genesis.go index d6747d442908..01407852da94 100644 --- a/x/circuit/keeper/genesis.go +++ b/x/circuit/keeper/genesis.go @@ -6,13 +6,13 @@ import ( "cosmossdk.io/x/circuit/types" ) -func (k *Keeper) ExportGenesis(ctx context.Context) (data *types.GenesisState) { +func (k *Keeper) ExportGenesis(ctx context.Context) (data *types.GenesisState, err error) { var ( permissions []*types.GenesisAccountPermissions disabledMsgs []string ) - err := k.Permissions.Walk(ctx, nil, func(address []byte, perm types.Permissions) (stop bool, err error) { + err = k.Permissions.Walk(ctx, nil, func(address []byte, perm types.Permissions) (stop bool, err error) { add, err := k.addressCodec.BytesToString(address) if err != nil { return true, err @@ -26,7 +26,7 @@ func (k *Keeper) ExportGenesis(ctx context.Context) (data *types.GenesisState) { return false, nil }) if err != nil { - panic(err) + return nil, err } err = k.DisableList.Walk(ctx, nil, func(msgUrl string) (stop bool, err error) { @@ -34,32 +34,34 @@ func (k *Keeper) ExportGenesis(ctx context.Context) (data *types.GenesisState) { return false, nil }) if err != nil { - panic(err) + return nil, err } return &types.GenesisState{ AccountPermissions: permissions, DisabledTypeUrls: disabledMsgs, - } + }, nil } // InitGenesis initializes the circuit module's state from a given genesis state. -func (k *Keeper) InitGenesis(ctx context.Context, genState *types.GenesisState) { +func (k *Keeper) InitGenesis(ctx context.Context, genState *types.GenesisState) error { for _, accounts := range genState.AccountPermissions { add, err := k.addressCodec.StringToBytes(accounts.Address) if err != nil { - panic(err) + return err } // Set the permissions for the account if err := k.Permissions.Set(ctx, add, *accounts.Permissions); err != nil { - panic(err) + return err } } for _, url := range genState.DisabledTypeUrls { // Set the disabled type urls if err := k.DisableList.Set(ctx, url); err != nil { - panic(err) + return err } } + + return nil } diff --git a/x/circuit/keeper/genesis_test.go b/x/circuit/keeper/genesis_test.go index cc4e3b6cbaad..e77c474923ca 100644 --- a/x/circuit/keeper/genesis_test.go +++ b/x/circuit/keeper/genesis_test.go @@ -75,9 +75,11 @@ func (s *GenesisTestSuite) TestInitExportGenesis() { DisabledTypeUrls: []string{url}, } - s.keeper.InitGenesis(s.ctx, genesisState) + err = s.keeper.InitGenesis(s.ctx, genesisState) + s.Require().NoError(err) - exported := s.keeper.ExportGenesis(s.ctx) + exported, err := s.keeper.ExportGenesis(s.ctx) + s.Require().NoError(err) bz, err := s.cdc.MarshalJSON(exported) s.Require().NoError(err) diff --git a/x/circuit/module.go b/x/circuit/module.go index 9468ce0c9f68..71dc7ca417dc 100644 --- a/x/circuit/module.go +++ b/x/circuit/module.go @@ -10,6 +10,7 @@ import ( "google.golang.org/grpc" "cosmossdk.io/core/appmodule" + appmodulev2 "cosmossdk.io/core/appmodule/v2" "cosmossdk.io/core/registry" "cosmossdk.io/x/circuit/keeper" "cosmossdk.io/x/circuit/types" @@ -27,7 +28,7 @@ var ( _ module.HasName = AppModule{} _ module.HasGRPCGateway = AppModule{} _ appmodule.HasRegisterInterfaces = AppModule{} - _ module.HasGenesis = AppModule{} + _ appmodulev2.HasGenesis = AppModule{} _ appmodule.AppModule = AppModule{} _ appmodule.HasServices = AppModule{} @@ -77,14 +78,14 @@ func NewAppModule(cdc codec.Codec, keeper keeper.Keeper) AppModule { func (AppModule) ConsensusVersion() uint64 { return ConsensusVersion } // DefaultGenesis returns default genesis state as raw bytes for the circuit module. -func (AppModule) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { - return cdc.MustMarshalJSON(types.DefaultGenesisState()) +func (am AppModule) DefaultGenesis() json.RawMessage { + return am.cdc.MustMarshalJSON(types.DefaultGenesisState()) } // ValidateGenesis performs genesis state validation for the circuit module. -func (AppModule) ValidateGenesis(cdc codec.JSONCodec, _ client.TxEncodingConfig, bz json.RawMessage) error { +func (am AppModule) ValidateGenesis(bz json.RawMessage) error { var data types.GenesisState - if err := cdc.UnmarshalJSON(bz, &data); err != nil { + if err := am.cdc.UnmarshalJSON(bz, &data); err != nil { return fmt.Errorf("failed to unmarshal %s genesis state: %w", types.ModuleName, err) } @@ -92,18 +93,23 @@ func (AppModule) ValidateGenesis(cdc codec.JSONCodec, _ client.TxEncodingConfig, } // InitGenesis performs genesis initialization for the circuit module. -func (am AppModule) InitGenesis(ctx context.Context, cdc codec.JSONCodec, data json.RawMessage) { +func (am AppModule) InitGenesis(ctx context.Context, data json.RawMessage) error { start := time.Now() var genesisState types.GenesisState - cdc.MustUnmarshalJSON(data, &genesisState) + if err := am.cdc.UnmarshalJSON(data, &genesisState); err != nil { + return err + } telemetry.MeasureSince(start, "InitGenesis", "crisis", "unmarshal") - am.keeper.InitGenesis(ctx, &genesisState) + return am.keeper.InitGenesis(ctx, &genesisState) } // ExportGenesis returns the exported genesis state as raw bytes for the circuit // module. -func (am AppModule) ExportGenesis(ctx context.Context, cdc codec.JSONCodec) json.RawMessage { - gs := am.keeper.ExportGenesis(ctx) - return cdc.MustMarshalJSON(gs) +func (am AppModule) ExportGenesis(ctx context.Context) (json.RawMessage, error) { + gs, err := am.keeper.ExportGenesis(ctx) + if err != nil { + return nil, err + } + return am.cdc.MarshalJSON(gs) } diff --git a/x/crisis/depinject.go b/x/crisis/depinject.go index 4bbbd3417daa..3879333c1602 100644 --- a/x/crisis/depinject.go +++ b/x/crisis/depinject.go @@ -81,7 +81,7 @@ func ProvideModule(in ModuleInputs) ModuleOutputs { skipGenesisInvariants = cast.ToBool(in.AppOpts.Get(FlagSkipGenesisInvariants)) } - m := NewAppModule(k, skipGenesisInvariants) + m := NewAppModule(k, in.Codec, skipGenesisInvariants) return ModuleOutputs{CrisisKeeper: k, Module: m} } diff --git a/x/crisis/module.go b/x/crisis/module.go index 1707baf033d7..3773561197aa 100644 --- a/x/crisis/module.go +++ b/x/crisis/module.go @@ -10,9 +10,9 @@ import ( "google.golang.org/grpc" "cosmossdk.io/core/appmodule" + appmodulev2 "cosmossdk.io/core/appmodule/v2" "cosmossdk.io/core/registry" - "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/telemetry" "github.com/cosmos/cosmos-sdk/types/module" @@ -27,7 +27,7 @@ var ( _ module.HasName = AppModule{} _ module.HasAminoCodec = AppModule{} _ appmodule.HasRegisterInterfaces = AppModule{} - _ module.HasGenesis = AppModule{} + _ appmodulev2.HasGenesis = AppModule{} _ appmodule.AppModule = AppModule{} _ appmodule.HasEndBlocker = AppModule{} @@ -43,8 +43,8 @@ type AppModule struct { // NOTE: We store a reference to the keeper here so that after a module // manager is created, the invariants can be properly registered and // executed. - keeper *keeper.Keeper - + keeper *keeper.Keeper + cdc codec.Codec skipGenesisInvariants bool } @@ -52,10 +52,11 @@ type AppModule struct { // we will call keeper.AssertInvariants during InitGenesis (it may take a significant time) // - which doesn't impact the chain security unless 66+% of validators have a wrongly // modified genesis file. -func NewAppModule(keeper *keeper.Keeper, skipGenesisInvariants bool) AppModule { +func NewAppModule(keeper *keeper.Keeper, cdc codec.Codec, skipGenesisInvariants bool) AppModule { return AppModule{ keeper: keeper, skipGenesisInvariants: skipGenesisInvariants, + cdc: cdc, } } @@ -102,14 +103,14 @@ func (am AppModule) RegisterMigrations(mr appmodule.MigrationRegistrar) error { } // DefaultGenesis returns default genesis state as raw bytes for the crisis module. -func (AppModule) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { - return cdc.MustMarshalJSON(types.DefaultGenesisState()) +func (am AppModule) DefaultGenesis() json.RawMessage { + return am.cdc.MustMarshalJSON(types.DefaultGenesisState()) } // ValidateGenesis performs genesis state validation for the crisis module. -func (AppModule) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncodingConfig, bz json.RawMessage) error { +func (am AppModule) ValidateGenesis(bz json.RawMessage) error { var data types.GenesisState - if err := cdc.UnmarshalJSON(bz, &data); err != nil { + if err := am.cdc.UnmarshalJSON(bz, &data); err != nil { return fmt.Errorf("failed to unmarshal %s genesis state: %w", types.ModuleName, err) } @@ -117,22 +118,25 @@ func (AppModule) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncodingCo } // InitGenesis performs genesis initialization for the crisis module. -func (am AppModule) InitGenesis(ctx context.Context, cdc codec.JSONCodec, data json.RawMessage) { +func (am AppModule) InitGenesis(ctx context.Context, data json.RawMessage) error { start := time.Now() var genesisState types.GenesisState - cdc.MustUnmarshalJSON(data, &genesisState) + if err := am.cdc.UnmarshalJSON(data, &genesisState); err != nil { + return err + } telemetry.MeasureSince(start, "InitGenesis", "crisis", "unmarshal") am.keeper.InitGenesis(ctx, &genesisState) if !am.skipGenesisInvariants { am.keeper.AssertInvariants(ctx) } + return nil } // ExportGenesis returns the exported genesis state as raw bytes for the crisis module. -func (am AppModule) ExportGenesis(ctx context.Context, cdc codec.JSONCodec) json.RawMessage { +func (am AppModule) ExportGenesis(ctx context.Context) (json.RawMessage, error) { gs := am.keeper.ExportGenesis(ctx) - return cdc.MustMarshalJSON(gs) + return am.cdc.MarshalJSON(gs) } // ConsensusVersion implements HasConsensusVersion diff --git a/x/distribution/keeper/genesis.go b/x/distribution/keeper/genesis.go index ce4a178401e4..e77a1475551f 100644 --- a/x/distribution/keeper/genesis.go +++ b/x/distribution/keeper/genesis.go @@ -11,29 +11,29 @@ import ( ) // InitGenesis sets distribution information for genesis -func (k Keeper) InitGenesis(ctx context.Context, data types.GenesisState) { +func (k Keeper) InitGenesis(ctx context.Context, data types.GenesisState) error { var moduleHoldings sdk.DecCoins if err := k.FeePool.Set(ctx, data.FeePool); err != nil { - panic(err) + return err } if err := k.Params.Set(ctx, data.Params); err != nil { - panic(err) + return err } for _, dwi := range data.DelegatorWithdrawInfos { delegatorAddress, err := k.authKeeper.AddressCodec().StringToBytes(dwi.DelegatorAddress) if err != nil { - panic(err) + return err } withdrawAddress, err := k.authKeeper.AddressCodec().StringToBytes(dwi.WithdrawAddress) if err != nil { - panic(err) + return err } err = k.DelegatorsWithdrawAddress.Set(ctx, delegatorAddress, withdrawAddress) if err != nil { - panic(err) + return err } } @@ -42,74 +42,74 @@ func (k Keeper) InitGenesis(ctx context.Context, data types.GenesisState) { var err error previousProposer, err = k.stakingKeeper.ConsensusAddressCodec().StringToBytes(data.PreviousProposer) if err != nil { - panic(err) + return err } } if err := k.PreviousProposer.Set(ctx, previousProposer); err != nil { - panic(err) + return err } for _, rew := range data.OutstandingRewards { valAddr, err := k.stakingKeeper.ValidatorAddressCodec().StringToBytes(rew.ValidatorAddress) if err != nil { - panic(err) + return err } err = k.ValidatorOutstandingRewards.Set(ctx, valAddr, types.ValidatorOutstandingRewards{Rewards: rew.OutstandingRewards}) if err != nil { - panic(err) + return err } moduleHoldings = moduleHoldings.Add(rew.OutstandingRewards...) } for _, acc := range data.ValidatorAccumulatedCommissions { valAddr, err := k.stakingKeeper.ValidatorAddressCodec().StringToBytes(acc.ValidatorAddress) if err != nil { - panic(err) + return err } err = k.ValidatorsAccumulatedCommission.Set(ctx, valAddr, acc.Accumulated) if err != nil { - panic(err) + return err } } for _, his := range data.ValidatorHistoricalRewards { valAddr, err := k.stakingKeeper.ValidatorAddressCodec().StringToBytes(his.ValidatorAddress) if err != nil { - panic(err) + return err } err = k.ValidatorHistoricalRewards.Set(ctx, collections.Join(sdk.ValAddress(valAddr), his.Period), his.Rewards) if err != nil { - panic(err) + return err } } for _, cur := range data.ValidatorCurrentRewards { valAddr, err := k.stakingKeeper.ValidatorAddressCodec().StringToBytes(cur.ValidatorAddress) if err != nil { - panic(err) + return err } err = k.ValidatorCurrentRewards.Set(ctx, valAddr, cur.Rewards) if err != nil { - panic(err) + return err } } for _, del := range data.DelegatorStartingInfos { valAddr, err := k.stakingKeeper.ValidatorAddressCodec().StringToBytes(del.ValidatorAddress) if err != nil { - panic(err) + return err } delegatorAddress, err := k.authKeeper.AddressCodec().StringToBytes(del.DelegatorAddress) if err != nil { - panic(err) + return err } err = k.DelegatorStartingInfo.Set(ctx, collections.Join(sdk.ValAddress(valAddr), sdk.AccAddress(delegatorAddress)), del.StartingInfo) if err != nil { - panic(err) + return err } } for _, evt := range data.ValidatorSlashEvents { valAddr, err := k.stakingKeeper.ValidatorAddressCodec().StringToBytes(evt.ValidatorAddress) if err != nil { - panic(err) + return err } err = k.ValidatorSlashEvents.Set( @@ -122,7 +122,7 @@ func (k Keeper) InitGenesis(ctx context.Context, data types.GenesisState) { evt.ValidatorSlashEvent, ) if err != nil { - panic(err) + return err } } @@ -142,18 +142,19 @@ func (k Keeper) InitGenesis(ctx context.Context, data types.GenesisState) { if !balances.Equal(moduleHoldingsInt) { panic(fmt.Sprintf("distribution module balance does not match the module holdings: %s <-> %s", balances, moduleHoldingsInt)) } + return nil } // ExportGenesis returns a GenesisState for a given context and keeper. -func (k Keeper) ExportGenesis(ctx context.Context) *types.GenesisState { +func (k Keeper) ExportGenesis(ctx context.Context) (*types.GenesisState, error) { feePool, err := k.FeePool.Get(ctx) if err != nil { - panic(err) + return nil, err } params, err := k.Params.Get(ctx) if err != nil { - panic(err) + return nil, err } var dwi []types.DelegatorWithdrawInfo @@ -165,12 +166,12 @@ func (k Keeper) ExportGenesis(ctx context.Context) *types.GenesisState { return false, nil }) if err != nil { - panic(err) + return nil, err } pp, err := k.PreviousProposer.Get(ctx) if err != nil { - panic(err) + return nil, err } outstanding := make([]types.ValidatorOutstandingRewardsRecord, 0) @@ -184,7 +185,7 @@ func (k Keeper) ExportGenesis(ctx context.Context) *types.GenesisState { }, ) if err != nil { - panic(err) + return nil, err } acc := make([]types.ValidatorAccumulatedCommissionRecord, 0) @@ -196,7 +197,7 @@ func (k Keeper) ExportGenesis(ctx context.Context) *types.GenesisState { return false, nil }) if err != nil { - panic(err) + return nil, err } his := make([]types.ValidatorHistoricalRewardsRecord, 0) @@ -211,7 +212,7 @@ func (k Keeper) ExportGenesis(ctx context.Context) *types.GenesisState { }, ) if err != nil { - panic(err) + return nil, err } cur := make([]types.ValidatorCurrentRewardsRecord, 0) @@ -225,7 +226,7 @@ func (k Keeper) ExportGenesis(ctx context.Context) *types.GenesisState { }, ) if err != nil { - panic(err) + return nil, err } dels := make([]types.DelegatorStartingInfoRecord, 0) @@ -238,7 +239,7 @@ func (k Keeper) ExportGenesis(ctx context.Context) *types.GenesisState { return false, nil }) if err != nil { - panic(err) + return nil, err } slashes := make([]types.ValidatorSlashEventRecord, 0) @@ -256,8 +257,8 @@ func (k Keeper) ExportGenesis(ctx context.Context) *types.GenesisState { }, ) if err != nil { - panic(err) + return nil, err } - return types.NewGenesisState(params, feePool, dwi, pp, outstanding, acc, his, cur, dels, slashes) + return types.NewGenesisState(params, feePool, dwi, pp, outstanding, acc, his, cur, dels, slashes), nil } diff --git a/x/distribution/module.go b/x/distribution/module.go index 3591b448b9bc..116c613190ed 100644 --- a/x/distribution/module.go +++ b/x/distribution/module.go @@ -10,6 +10,7 @@ import ( "google.golang.org/grpc" "cosmossdk.io/core/appmodule" + appmodulev2 "cosmossdk.io/core/appmodule/v2" "cosmossdk.io/core/registry" "cosmossdk.io/x/distribution/client/cli" "cosmossdk.io/x/distribution/keeper" @@ -32,7 +33,7 @@ var ( _ module.HasGRPCGateway = AppModule{} _ appmodule.HasRegisterInterfaces = AppModule{} _ module.AppModuleSimulation = AppModule{} - _ module.HasGenesis = AppModule{} + _ appmodulev2.HasGenesis = AppModule{} _ module.HasInvariants = AppModule{} _ appmodule.AppModule = AppModule{} @@ -128,14 +129,14 @@ func (am AppModule) RegisterMigrations(mr appmodule.MigrationRegistrar) error { } // DefaultGenesis returns default genesis state as raw bytes for the distribution module. -func (AppModule) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { - return cdc.MustMarshalJSON(types.DefaultGenesisState()) +func (am AppModule) DefaultGenesis() json.RawMessage { + return am.cdc.MustMarshalJSON(types.DefaultGenesisState()) } // ValidateGenesis performs genesis state validation for the distribution module. -func (AppModule) ValidateGenesis(cdc codec.JSONCodec, _ sdkclient.TxEncodingConfig, bz json.RawMessage) error { +func (am AppModule) ValidateGenesis(bz json.RawMessage) error { var data types.GenesisState - if err := cdc.UnmarshalJSON(bz, &data); err != nil { + if err := am.cdc.UnmarshalJSON(bz, &data); err != nil { return fmt.Errorf("failed to unmarshal %s genesis state: %w", types.ModuleName, err) } @@ -143,17 +144,22 @@ func (AppModule) ValidateGenesis(cdc codec.JSONCodec, _ sdkclient.TxEncodingConf } // InitGenesis performs genesis initialization for the distribution module. -func (am AppModule) InitGenesis(ctx context.Context, cdc codec.JSONCodec, data json.RawMessage) { +func (am AppModule) InitGenesis(ctx context.Context, data json.RawMessage) error { var genesisState types.GenesisState - cdc.MustUnmarshalJSON(data, &genesisState) - am.keeper.InitGenesis(ctx, genesisState) + if err := am.cdc.UnmarshalJSON(data, &genesisState); err != nil { + return err + } + return am.keeper.InitGenesis(ctx, genesisState) } // ExportGenesis returns the exported genesis state as raw bytes for the distribution // module. -func (am AppModule) ExportGenesis(ctx context.Context, cdc codec.JSONCodec) json.RawMessage { - gs := am.keeper.ExportGenesis(ctx) - return cdc.MustMarshalJSON(gs) +func (am AppModule) ExportGenesis(ctx context.Context) (json.RawMessage, error) { + gs, err := am.keeper.ExportGenesis(ctx) + if err != nil { + return nil, err + } + return am.cdc.MarshalJSON(gs) } // ConsensusVersion implements HasConsensusVersion diff --git a/x/evidence/CHANGELOG.md b/x/evidence/CHANGELOG.md index f00a7953f1ec..eba342d7870d 100644 --- a/x/evidence/CHANGELOG.md +++ b/x/evidence/CHANGELOG.md @@ -28,6 +28,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ ### Api Breaking Changes * [#19482](https://github.com/cosmos/cosmos-sdk/pull/19482) `appmodule.Environment` is passed to `NewKeeper` instead of individual services +* [#19627](https://github.com/cosmos/cosmos-sdk/pull/19627) `NewAppModule` now takes in a `codec.Codec` as its first arguement ## [v0.1.0](https://github.com/cosmos/cosmos-sdk/releases/tag/x/evidence/v0.1.0) - 2023-11-07 diff --git a/x/evidence/depinject.go b/x/evidence/depinject.go index 49af8a23639c..335cef402ef5 100644 --- a/x/evidence/depinject.go +++ b/x/evidence/depinject.go @@ -45,7 +45,7 @@ type ModuleOutputs struct { func ProvideModule(in ModuleInputs) ModuleOutputs { k := keeper.NewKeeper(in.Cdc, in.Environment, in.StakingKeeper, in.SlashingKeeper, in.AddressCodec) - m := NewAppModule(*k, in.EvidenceHandlers...) + m := NewAppModule(in.Cdc, *k, in.EvidenceHandlers...) return ModuleOutputs{EvidenceKeeper: *k, Module: m} } diff --git a/x/evidence/genesis.go b/x/evidence/genesis.go index 3c632607ea4e..0ffe655600d9 100644 --- a/x/evidence/genesis.go +++ b/x/evidence/genesis.go @@ -2,6 +2,7 @@ package evidence import ( "context" + "errors" "fmt" "cosmossdk.io/x/evidence/exported" @@ -13,28 +14,29 @@ import ( // InitGenesis initializes the evidence module's state from a provided genesis // state. -func InitGenesis(ctx context.Context, k keeper.Keeper, gs *types.GenesisState) { +func InitGenesis(ctx context.Context, k keeper.Keeper, gs *types.GenesisState) error { if err := gs.Validate(); err != nil { - panic(fmt.Sprintf("failed to validate %s genesis state: %s", types.ModuleName, err)) + return fmt.Errorf("failed to validate %s genesis state: %s", types.ModuleName, err) } for _, e := range gs.Evidence { evi, ok := e.GetCachedValue().(exported.Evidence) if !ok { - panic("expected evidence") + return errors.New("expected evidence") } if _, err := k.Evidences.Get(ctx, evi.Hash()); err == nil { - panic(fmt.Sprintf("evidence with hash %s already exists", evi.Hash())) + return fmt.Errorf("evidence with hash %s already exists", evi.Hash()) } if err := k.Evidences.Set(ctx, evi.Hash(), evi); err != nil { - panic(err) + return err } } + return nil } // ExportGenesis returns the evidence module's exported genesis. -func ExportGenesis(ctx context.Context, k keeper.Keeper) *types.GenesisState { +func ExportGenesis(ctx context.Context, k keeper.Keeper) (*types.GenesisState, error) { gs := new(types.GenesisState) err := k.Evidences.Walk(ctx, nil, func(_ []byte, value exported.Evidence) (stop bool, err error) { anyEvi, err := codectypes.NewAnyWithValue(value) @@ -45,7 +47,7 @@ func ExportGenesis(ctx context.Context, k keeper.Keeper) *types.GenesisState { return false, nil }) if err != nil { - panic(err) + return nil, err } - return gs + return gs, nil } diff --git a/x/evidence/module.go b/x/evidence/module.go index 854ada04705a..85ae9866b078 100644 --- a/x/evidence/module.go +++ b/x/evidence/module.go @@ -10,6 +10,7 @@ import ( "google.golang.org/grpc" "cosmossdk.io/core/appmodule" + appmodulev2 "cosmossdk.io/core/appmodule/v2" "cosmossdk.io/core/registry" eviclient "cosmossdk.io/x/evidence/client" "cosmossdk.io/x/evidence/client/cli" @@ -29,7 +30,7 @@ var ( _ module.HasGRPCGateway = AppModule{} _ appmodule.HasRegisterInterfaces = AppModule{} _ module.AppModuleSimulation = AppModule{} - _ module.HasGenesis = AppModule{} + _ appmodulev2.HasGenesis = AppModule{} _ appmodule.AppModule = AppModule{} _ appmodule.HasBeginBlocker = AppModule{} @@ -39,15 +40,17 @@ const ConsensusVersion = 1 // AppModule implements the AppModule interface for the evidence module. type AppModule struct { + cdc codec.Codec evidenceHandlers []eviclient.EvidenceHandler keeper keeper.Keeper } // NewAppModule creates a new AppModule object. -func NewAppModule(keeper keeper.Keeper, evidenceHandlers ...eviclient.EvidenceHandler) AppModule { +func NewAppModule(cdc codec.Codec, keeper keeper.Keeper, evidenceHandlers ...eviclient.EvidenceHandler) AppModule { return AppModule{ keeper: keeper, evidenceHandlers: evidenceHandlers, + cdc: cdc, } } @@ -94,14 +97,14 @@ func (am AppModule) RegisterServices(registrar grpc.ServiceRegistrar) error { } // DefaultGenesis returns the evidence module's default genesis state. -func (AppModule) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { - return cdc.MustMarshalJSON(types.DefaultGenesisState()) +func (am AppModule) DefaultGenesis() json.RawMessage { + return am.cdc.MustMarshalJSON(types.DefaultGenesisState()) } // ValidateGenesis performs genesis state validation for the evidence module. -func (AppModule) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncodingConfig, bz json.RawMessage) error { +func (am AppModule) ValidateGenesis(bz json.RawMessage) error { var gs types.GenesisState - if err := cdc.UnmarshalJSON(bz, &gs); err != nil { + if err := am.cdc.UnmarshalJSON(bz, &gs); err != nil { return fmt.Errorf("failed to unmarshal %s genesis state: %w", types.ModuleName, err) } @@ -109,19 +112,23 @@ func (AppModule) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncodingCo } // InitGenesis performs the evidence module's genesis initialization -func (am AppModule) InitGenesis(ctx context.Context, cdc codec.JSONCodec, bz json.RawMessage) { +func (am AppModule) InitGenesis(ctx context.Context, bz json.RawMessage) error { var gs types.GenesisState - err := cdc.UnmarshalJSON(bz, &gs) + err := am.cdc.UnmarshalJSON(bz, &gs) if err != nil { - panic(fmt.Sprintf("failed to unmarshal %s genesis state: %s", types.ModuleName, err)) + return err } - InitGenesis(ctx, am.keeper, &gs) + return InitGenesis(ctx, am.keeper, &gs) } // ExportGenesis returns the evidence module's exported genesis state as raw JSON bytes. -func (am AppModule) ExportGenesis(ctx context.Context, cdc codec.JSONCodec) json.RawMessage { - return cdc.MustMarshalJSON(ExportGenesis(ctx, am.keeper)) +func (am AppModule) ExportGenesis(ctx context.Context) (json.RawMessage, error) { + gs, err := ExportGenesis(ctx, am.keeper) + if err != nil { + return nil, err + } + return am.cdc.MarshalJSON(gs) } // ConsensusVersion implements HasConsensusVersion diff --git a/x/feegrant/module/module.go b/x/feegrant/module/module.go index d950ae6a285d..42edb16f1ded 100644 --- a/x/feegrant/module/module.go +++ b/x/feegrant/module/module.go @@ -10,6 +10,7 @@ import ( "google.golang.org/grpc" "cosmossdk.io/core/appmodule" + appmodulev2 "cosmossdk.io/core/appmodule/v2" "cosmossdk.io/core/registry" "cosmossdk.io/errors" "cosmossdk.io/x/feegrant" @@ -28,7 +29,7 @@ var ( _ module.HasGRPCGateway = AppModule{} _ appmodule.HasRegisterInterfaces = AppModule{} _ module.AppModuleSimulation = AppModule{} - _ module.HasGenesis = AppModule{} + _ appmodulev2.HasGenesis = AppModule{} _ appmodule.AppModule = AppModule{} _ appmodule.HasEndBlocker = AppModule{} @@ -107,14 +108,14 @@ func (am AppModule) RegisterMigrations(mr appmodule.MigrationRegistrar) error { } // DefaultGenesis returns default genesis state as raw bytes for the feegrant module. -func (AppModule) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { - return cdc.MustMarshalJSON(feegrant.DefaultGenesisState()) +func (am AppModule) DefaultGenesis() json.RawMessage { + return am.cdc.MustMarshalJSON(feegrant.DefaultGenesisState()) } // ValidateGenesis performs genesis state validation for the feegrant module. -func (AppModule) ValidateGenesis(cdc codec.JSONCodec, config sdkclient.TxEncodingConfig, bz json.RawMessage) error { +func (am AppModule) ValidateGenesis(bz json.RawMessage) error { var data feegrant.GenesisState - if err := cdc.UnmarshalJSON(bz, &data); err != nil { + if err := am.cdc.UnmarshalJSON(bz, &data); err != nil { return errors.Wrapf(err, "failed to unmarshal %s genesis state", feegrant.ModuleName) } @@ -122,24 +123,27 @@ func (AppModule) ValidateGenesis(cdc codec.JSONCodec, config sdkclient.TxEncodin } // InitGenesis performs genesis initialization for the feegrant module. -func (am AppModule) InitGenesis(ctx context.Context, cdc codec.JSONCodec, bz json.RawMessage) { +func (am AppModule) InitGenesis(ctx context.Context, bz json.RawMessage) error { var gs feegrant.GenesisState - cdc.MustUnmarshalJSON(bz, &gs) + if err := am.cdc.UnmarshalJSON(bz, &gs); err != nil { + return err + } err := am.keeper.InitGenesis(ctx, &gs) if err != nil { - panic(err) + return err } + return nil } // ExportGenesis returns the exported genesis state as raw bytes for the feegrant module. -func (am AppModule) ExportGenesis(ctx context.Context, cdc codec.JSONCodec) json.RawMessage { +func (am AppModule) ExportGenesis(ctx context.Context) (json.RawMessage, error) { gs, err := am.keeper.ExportGenesis(ctx) if err != nil { - panic(err) + return nil, err } - return cdc.MustMarshalJSON(gs) + return am.cdc.MarshalJSON(gs) } // ConsensusVersion implements HasConsensusVersion diff --git a/x/genutil/client/cli/gentx.go b/x/genutil/client/cli/gentx.go index d82b0476b81a..2c44794c23f2 100644 --- a/x/genutil/client/cli/gentx.go +++ b/x/genutil/client/cli/gentx.go @@ -90,7 +90,7 @@ $ %s gentx my-key-name 1000000stake --home=/path/to/home/dir --keyring-backend=o return errors.Wrap(err, "failed to unmarshal genesis state") } - if err = mm.ValidateGenesis(cdc, txEncCfg, genesisState); err != nil { + if err = mm.ValidateGenesis(genesisState); err != nil { return errors.Wrap(err, "failed to validate genesis state") } diff --git a/x/genutil/client/cli/init.go b/x/genutil/client/cli/init.go index 227acbe25f50..da33a1060b29 100644 --- a/x/genutil/client/cli/init.go +++ b/x/genutil/client/cli/init.go @@ -76,7 +76,6 @@ func InitCmd(mm *module.Manager) *cobra.Command { Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) error { clientCtx := client.GetClientContextFromCmd(cmd) - cdc := clientCtx.Codec serverCtx := server.GetServerContextFromCmd(cmd) config := serverCtx.Config @@ -133,7 +132,7 @@ func InitCmd(mm *module.Manager) *cobra.Command { if defaultDenom != "" { sdk.DefaultBondDenom = defaultDenom } - appGenState := mm.DefaultGenesis(cdc) + appGenState := mm.DefaultGenesis() appState, err := json.MarshalIndent(appGenState, "", " ") if err != nil { diff --git a/x/genutil/client/cli/init_test.go b/x/genutil/client/cli/init_test.go index 82ad4ad64c7a..a958a47544e9 100644 --- a/x/genutil/client/cli/init_test.go +++ b/x/genutil/client/cli/init_test.go @@ -35,8 +35,8 @@ import ( ) var testMbm = module.NewManager( - staking.AppModule{}, - genutil.AppModule{}, + staking.NewAppModule(makeCodec(), nil, nil, nil), + genutil.NewAppModule(makeCodec(), nil, nil, nil, nil, nil), ) func TestInitCmd(t *testing.T) { @@ -71,7 +71,7 @@ func TestInitCmd(t *testing.T) { marshaler := codec.NewProtoCodec(interfaceRegistry) clientCtx := client.Context{}. WithCodec(marshaler). - WithLegacyAmino(makeCodec()). + WithLegacyAmino(makeAminoCodec()). WithHomeDir(home) ctx := context.Background() @@ -104,7 +104,7 @@ func TestInitRecover(t *testing.T) { marshaler := codec.NewProtoCodec(interfaceRegistry) clientCtx := client.Context{}. WithCodec(marshaler). - WithLegacyAmino(makeCodec()). + WithLegacyAmino(makeAminoCodec()). WithHomeDir(home) ctx := context.Background() @@ -135,7 +135,7 @@ func TestInitDefaultBondDenom(t *testing.T) { marshaler := codec.NewProtoCodec(interfaceRegistry) clientCtx := client.Context{}. WithCodec(marshaler). - WithLegacyAmino(makeCodec()). + WithLegacyAmino(makeAminoCodec()). WithHomeDir(home) ctx := context.Background() @@ -163,7 +163,7 @@ func TestEmptyState(t *testing.T) { marshaler := codec.NewProtoCodec(interfaceRegistry) clientCtx := client.Context{}. WithCodec(marshaler). - WithLegacyAmino(makeCodec()). + WithLegacyAmino(makeAminoCodec()). WithHomeDir(home) ctx := context.Background() @@ -256,7 +256,7 @@ func TestInitConfig(t *testing.T) { marshaler := codec.NewProtoCodec(interfaceRegistry) clientCtx := client.Context{}. WithCodec(marshaler). - WithLegacyAmino(makeCodec()). + WithLegacyAmino(makeAminoCodec()). WithChainID("foo"). // add chain-id to clientCtx WithHomeDir(home) @@ -302,7 +302,7 @@ func TestInitWithHeight(t *testing.T) { marshaler := codec.NewProtoCodec(interfaceRegistry) clientCtx := client.Context{}. WithCodec(marshaler). - WithLegacyAmino(makeCodec()). + WithLegacyAmino(makeAminoCodec()). WithChainID("foo"). // add chain-id to clientCtx WithHomeDir(home) @@ -334,7 +334,7 @@ func TestInitWithNegativeHeight(t *testing.T) { marshaler := codec.NewProtoCodec(interfaceRegistry) clientCtx := client.Context{}. WithCodec(marshaler). - WithLegacyAmino(makeCodec()). + WithLegacyAmino(makeAminoCodec()). WithChainID("foo"). // add chain-id to clientCtx WithHomeDir(home) @@ -356,9 +356,14 @@ func TestInitWithNegativeHeight(t *testing.T) { } // custom tx codec -func makeCodec() *codec.LegacyAmino { +func makeAminoCodec() *codec.LegacyAmino { cdc := codec.NewLegacyAmino() sdk.RegisterLegacyAminoCodec(cdc) cryptocodec.RegisterCrypto(cdc) return cdc } + +func makeCodec() codec.Codec { + interfaceRegistry := types.NewInterfaceRegistry() + return codec.NewProtoCodec(interfaceRegistry) +} diff --git a/x/genutil/client/cli/validate_genesis.go b/x/genutil/client/cli/validate_genesis.go index 71011f1f0989..232097cda5c0 100644 --- a/x/genutil/client/cli/validate_genesis.go +++ b/x/genutil/client/cli/validate_genesis.go @@ -6,7 +6,6 @@ import ( "github.com/spf13/cobra" - "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/server" "github.com/cosmos/cosmos-sdk/types/module" "github.com/cosmos/cosmos-sdk/x/genutil/types" @@ -23,9 +22,6 @@ func ValidateGenesisCmd(mm *module.Manager) *cobra.Command { Short: "Validates the genesis file at the default location or at the location passed as an arg", RunE: func(cmd *cobra.Command, args []string) (err error) { serverCtx := server.GetServerContextFromCmd(cmd) - clientCtx := client.GetClientContextFromCmd(cmd) - - cdc := clientCtx.Codec // Load default if passed no args, otherwise load passed file var genesis string @@ -50,7 +46,7 @@ func ValidateGenesisCmd(mm *module.Manager) *cobra.Command { } if mm != nil { - if err = mm.ValidateGenesis(cdc, clientCtx.TxConfig, genState); err != nil { + if err = mm.ValidateGenesis(genState); err != nil { return fmt.Errorf("error validating genesis file %s: %w", genesis, err) } } diff --git a/x/genutil/depinject.go b/x/genutil/depinject.go index d8fb7ee6ed79..6b6f2beabfa0 100644 --- a/x/genutil/depinject.go +++ b/x/genutil/depinject.go @@ -8,6 +8,7 @@ import ( "cosmossdk.io/depinject/appconfig" "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/x/genutil/types" ) @@ -30,6 +31,7 @@ type ModuleInputs struct { StakingKeeper types.StakingKeeper DeliverTx genesis.TxHandler Config client.TxConfig + Cdc codec.Codec GenTxValidator types.MessageValidator `optional:"true"` } @@ -38,6 +40,6 @@ func ProvideModule(in ModuleInputs) appmodule.AppModule { in.GenTxValidator = types.DefaultMessageValidator } - m := NewAppModule(in.AccountKeeper, in.StakingKeeper, in.DeliverTx, in.Config, in.GenTxValidator) + m := NewAppModule(in.Cdc, in.AccountKeeper, in.StakingKeeper, in.DeliverTx, in.Config, in.GenTxValidator) return m } diff --git a/x/genutil/module.go b/x/genutil/module.go index 118cd2ea3d49..b16694ec2f6e 100644 --- a/x/genutil/module.go +++ b/x/genutil/module.go @@ -26,6 +26,7 @@ var ( // AppModule implements an application module for the genutil module. type AppModule struct { + cdc codec.Codec accountKeeper types.AccountKeeper stakingKeeper types.StakingKeeper deliverTx genesis.TxHandler @@ -35,6 +36,7 @@ type AppModule struct { // NewAppModule creates a new AppModule object func NewAppModule( + cdc codec.Codec, accountKeeper types.AccountKeeper, stakingKeeper types.StakingKeeper, deliverTx genesis.TxHandler, @@ -42,6 +44,7 @@ func NewAppModule( genTxValidator types.MessageValidator, ) module.AppModule { return AppModule{ + cdc: cdc, accountKeeper: accountKeeper, stakingKeeper: stakingKeeper, deliverTx: deliverTx, @@ -59,24 +62,24 @@ func (AppModule) Name() string { } // DefaultGenesis returns default genesis state as raw bytes for the genutil module. -func (AppModule) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { - return cdc.MustMarshalJSON(types.DefaultGenesisState()) +func (am AppModule) DefaultGenesis() json.RawMessage { + return am.cdc.MustMarshalJSON(types.DefaultGenesisState()) } // ValidateGenesis performs genesis state validation for the genutil module. -func (b AppModule) ValidateGenesis(cdc codec.JSONCodec, txEncodingConfig client.TxEncodingConfig, bz json.RawMessage) error { +func (am AppModule) ValidateGenesis(bz json.RawMessage) error { var data types.GenesisState - if err := cdc.UnmarshalJSON(bz, &data); err != nil { + if err := am.cdc.UnmarshalJSON(bz, &data); err != nil { return fmt.Errorf("failed to unmarshal %s genesis state: %w", types.ModuleName, err) } - return types.ValidateGenesis(&data, txEncodingConfig.TxJSONDecoder(), b.genTxValidator) + return types.ValidateGenesis(&data, am.txEncodingConfig.TxJSONDecoder(), am.genTxValidator) } // InitGenesis performs genesis initialization for the genutil module. -func (am AppModule) InitGenesis(ctx context.Context, cdc codec.JSONCodec, data json.RawMessage) []abci.ValidatorUpdate { +func (am AppModule) InitGenesis(ctx context.Context, data json.RawMessage) []abci.ValidatorUpdate { var genesisState types.GenesisState - cdc.MustUnmarshalJSON(data, &genesisState) + am.cdc.MustUnmarshalJSON(data, &genesisState) validators, err := InitGenesis(ctx, am.stakingKeeper, am.deliverTx, genesisState, am.txEncodingConfig) if err != nil { panic(err) @@ -85,8 +88,8 @@ func (am AppModule) InitGenesis(ctx context.Context, cdc codec.JSONCodec, data j } // ExportGenesis returns the exported genesis state as raw bytes for the genutil module. -func (am AppModule) ExportGenesis(_ context.Context, cdc codec.JSONCodec) json.RawMessage { - return am.DefaultGenesis(cdc) +func (am AppModule) ExportGenesis(_ context.Context) json.RawMessage { + return am.DefaultGenesis() } // GenTxValidator returns the genutil module's genesis transaction validator. diff --git a/x/gov/genesis.go b/x/gov/genesis.go index 65fa70b4b216..09975f458bf4 100644 --- a/x/gov/genesis.go +++ b/x/gov/genesis.go @@ -13,20 +13,20 @@ import ( ) // InitGenesis - store genesis parameters -func InitGenesis(ctx context.Context, ak types.AccountKeeper, bk types.BankKeeper, k *keeper.Keeper, data *v1.GenesisState) { +func InitGenesis(ctx context.Context, ak types.AccountKeeper, bk types.BankKeeper, k *keeper.Keeper, data *v1.GenesisState) error { err := k.ProposalID.Set(ctx, data.StartingProposalId) if err != nil { - panic(err) + return err } err = k.Params.Set(ctx, *data.Params) if err != nil { - panic(err) + return err } err = k.Constitution.Set(ctx, data.Constitution) if err != nil { - panic(err) + return err } // check if the deposits pool account exists @@ -39,7 +39,7 @@ func InitGenesis(ctx context.Context, ak types.AccountKeeper, bk types.BankKeepe for _, deposit := range data.Deposits { err := k.SetDeposit(ctx, *deposit) if err != nil { - panic(err) + return err } totalDeposits = totalDeposits.Add(deposit.Amount...) } @@ -47,11 +47,11 @@ func InitGenesis(ctx context.Context, ak types.AccountKeeper, bk types.BankKeepe for _, vote := range data.Votes { addr, err := ak.AddressCodec().StringToBytes(vote.Voter) if err != nil { - panic(err) + return err } err = k.Votes.Set(ctx, collections.Join(vote.ProposalId, sdk.AccAddress(addr)), *vote) if err != nil { - panic(err) + return err } } @@ -60,16 +60,16 @@ func InitGenesis(ctx context.Context, ak types.AccountKeeper, bk types.BankKeepe case v1.StatusDepositPeriod: err := k.InactiveProposalsQueue.Set(ctx, collections.Join(*proposal.DepositEndTime, proposal.Id), proposal.Id) if err != nil { - panic(err) + return err } case v1.StatusVotingPeriod: err := k.ActiveProposalsQueue.Set(ctx, collections.Join(*proposal.VotingEndTime, proposal.Id), proposal.Id) if err != nil { - panic(err) + return err } } if err := k.Proposals.Set(ctx, proposal.Id, *proposal); err != nil { - panic(err) + return err } } @@ -83,6 +83,7 @@ func InitGenesis(ctx context.Context, ak types.AccountKeeper, bk types.BankKeepe if !balance.Equal(totalDeposits) { panic(fmt.Sprintf("expected module account was %s but we got %s", balance.String(), totalDeposits.String())) } + return nil } // ExportGenesis - output genesis parameters @@ -117,7 +118,7 @@ func ExportGenesis(ctx context.Context, k *keeper.Keeper) (*v1.GenesisState, err return false, nil }) if err != nil { - panic(err) + return nil, err } // export proposals votes @@ -127,7 +128,7 @@ func ExportGenesis(ctx context.Context, k *keeper.Keeper) (*v1.GenesisState, err return false, nil }) if err != nil { - panic(err) + return nil, err } return &v1.GenesisState{ diff --git a/x/gov/module.go b/x/gov/module.go index f169e4b8c754..aa5069183b86 100644 --- a/x/gov/module.go +++ b/x/gov/module.go @@ -10,6 +10,7 @@ import ( "google.golang.org/grpc" "cosmossdk.io/core/appmodule" + appmodulev2 "cosmossdk.io/core/appmodule/v2" "cosmossdk.io/core/registry" govclient "cosmossdk.io/x/gov/client" "cosmossdk.io/x/gov/client/cli" @@ -34,7 +35,7 @@ var ( _ module.HasGRPCGateway = AppModule{} _ appmodule.HasRegisterInterfaces = AppModule{} _ module.AppModuleSimulation = AppModule{} - _ module.HasGenesis = AppModule{} + _ appmodulev2.HasGenesis = AppModule{} _ module.HasInvariants = AppModule{} _ appmodule.AppModule = AppModule{} @@ -159,14 +160,14 @@ func (am AppModule) RegisterMigrations(mr appmodule.MigrationRegistrar) error { } // DefaultGenesis returns default genesis state as raw bytes for the gov module. -func (AppModule) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { - return cdc.MustMarshalJSON(v1.DefaultGenesisState()) +func (am AppModule) DefaultGenesis() json.RawMessage { + return am.cdc.MustMarshalJSON(v1.DefaultGenesisState()) } // ValidateGenesis performs genesis state validation for the gov module. -func (am AppModule) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncodingConfig, bz json.RawMessage) error { +func (am AppModule) ValidateGenesis(bz json.RawMessage) error { var data v1.GenesisState - if err := cdc.UnmarshalJSON(bz, &data); err != nil { + if err := am.cdc.UnmarshalJSON(bz, &data); err != nil { return fmt.Errorf("failed to unmarshal %s genesis state: %w", govtypes.ModuleName, err) } @@ -174,19 +175,21 @@ func (am AppModule) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncodin } // InitGenesis performs genesis initialization for the gov module. -func (am AppModule) InitGenesis(ctx context.Context, cdc codec.JSONCodec, data json.RawMessage) { +func (am AppModule) InitGenesis(ctx context.Context, data json.RawMessage) error { var genesisState v1.GenesisState - cdc.MustUnmarshalJSON(data, &genesisState) - InitGenesis(ctx, am.accountKeeper, am.bankKeeper, am.keeper, &genesisState) + if err := am.cdc.UnmarshalJSON(data, &genesisState); err != nil { + return err + } + return InitGenesis(ctx, am.accountKeeper, am.bankKeeper, am.keeper, &genesisState) } // ExportGenesis returns the exported genesis state as raw bytes for the gov module. -func (am AppModule) ExportGenesis(ctx context.Context, cdc codec.JSONCodec) json.RawMessage { +func (am AppModule) ExportGenesis(ctx context.Context) (json.RawMessage, error) { gs, err := ExportGenesis(ctx, am.keeper) if err != nil { - panic(err) + return nil, err } - return cdc.MustMarshalJSON(gs) + return am.cdc.MarshalJSON(gs) } // ConsensusVersion implements HasConsensusVersion diff --git a/x/gov/testutil/expected_keepers_mocks.go b/x/gov/testutil/expected_keepers_mocks.go index 78c9e669385f..3784d76377cd 100644 --- a/x/gov/testutil/expected_keepers_mocks.go +++ b/x/gov/testutil/expected_keepers_mocks.go @@ -574,9 +574,11 @@ func (mr *MockBankKeeperMockRecorder) HasSupply(ctx, denom interface{}) *gomock. } // InitGenesis mocks base method. -func (m *MockBankKeeper) InitGenesis(arg0 context.Context, arg1 *types.GenesisState) { +func (m *MockBankKeeper) InitGenesis(arg0 context.Context, arg1 *types.GenesisState) error { m.ctrl.T.Helper() - m.ctrl.Call(m, "InitGenesis", arg0, arg1) + ret := m.ctrl.Call(m, "InitGenesis", arg0, arg1) + ret0, _ := ret[0].(error) + return ret0 } // InitGenesis indicates an expected call of InitGenesis. diff --git a/x/group/keeper/genesis.go b/x/group/keeper/genesis.go index f378f3775799..70d61ff69230 100644 --- a/x/group/keeper/genesis.go +++ b/x/group/keeper/genesis.go @@ -4,8 +4,6 @@ import ( "context" "encoding/json" - abci "github.com/cometbft/cometbft/abci/types" - "cosmossdk.io/errors" "cosmossdk.io/x/group" @@ -13,37 +11,37 @@ import ( ) // InitGenesis initializes the group module's genesis state. -func (k Keeper) InitGenesis(ctx context.Context, cdc codec.JSONCodec, data json.RawMessage) []abci.ValidatorUpdate { +func (k Keeper) InitGenesis(ctx context.Context, cdc codec.JSONCodec, data json.RawMessage) error { var genesisState group.GenesisState cdc.MustUnmarshalJSON(data, &genesisState) store := k.environment.KVStoreService.OpenKVStore(ctx) if err := k.groupTable.Import(store, genesisState.Groups, genesisState.GroupSeq); err != nil { - panic(errors.Wrap(err, "groups")) + return errors.Wrap(err, "groups") } if err := k.groupMemberTable.Import(store, genesisState.GroupMembers, 0); err != nil { - panic(errors.Wrap(err, "group members")) + return errors.Wrap(err, "group members") } if err := k.groupPolicyTable.Import(store, genesisState.GroupPolicies, 0); err != nil { - panic(errors.Wrap(err, "group policies")) + return errors.Wrap(err, "group policies") } if err := k.groupPolicySeq.InitVal(store, genesisState.GroupPolicySeq); err != nil { - panic(errors.Wrap(err, "group policy account seq")) + return errors.Wrap(err, "group policy account seq") } if err := k.proposalTable.Import(store, genesisState.Proposals, genesisState.ProposalSeq); err != nil { - panic(errors.Wrap(err, "proposals")) + return errors.Wrap(err, "proposals") } if err := k.voteTable.Import(store, genesisState.Votes, 0); err != nil { - panic(errors.Wrap(err, "votes")) + return errors.Wrap(err, "votes") } - return []abci.ValidatorUpdate{} + return nil } // ExportGenesis returns the group module's exported genesis. diff --git a/x/group/keeper/genesis_test.go b/x/group/keeper/genesis_test.go index 0af3c8678d86..967867a1f271 100644 --- a/x/group/keeper/genesis_test.go +++ b/x/group/keeper/genesis_test.go @@ -145,7 +145,8 @@ func (s *GenesisTestSuite) TestInitExportGenesis() { group.ModuleName: genesisBytes, } - s.keeper.InitGenesis(sdkCtx, cdc, genesisData[group.ModuleName]) + err = s.keeper.InitGenesis(sdkCtx, cdc, genesisData[group.ModuleName]) + s.Require().NoError(err) for i, g := range genesisState.Groups { res, err := s.keeper.GroupInfo(ctx, &group.QueryGroupInfoRequest{ diff --git a/x/group/module/module.go b/x/group/module/module.go index 4a232b9c142f..ab323da0b01f 100644 --- a/x/group/module/module.go +++ b/x/group/module/module.go @@ -10,6 +10,7 @@ import ( "google.golang.org/grpc" "cosmossdk.io/core/appmodule" + appmodulev2 "cosmossdk.io/core/appmodule/v2" "cosmossdk.io/core/registry" "cosmossdk.io/x/group" "cosmossdk.io/x/group/client/cli" @@ -33,7 +34,7 @@ var ( _ module.HasGRPCGateway = AppModule{} _ appmodule.HasRegisterInterfaces = AppModule{} _ module.AppModuleSimulation = AppModule{} - _ module.HasGenesis = AppModule{} + _ appmodulev2.HasGenesis = AppModule{} _ module.HasInvariants = AppModule{} _ appmodule.AppModule = AppModule{} @@ -124,28 +125,28 @@ func (am AppModule) EndBlock(ctx context.Context) error { } // DefaultGenesis returns default genesis state as raw bytes for the group module. -func (AppModule) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { - return cdc.MustMarshalJSON(group.NewGenesisState()) +func (am AppModule) DefaultGenesis() json.RawMessage { + return am.cdc.MustMarshalJSON(group.NewGenesisState()) } // ValidateGenesis performs genesis state validation for the group module. -func (AppModule) ValidateGenesis(cdc codec.JSONCodec, config sdkclient.TxEncodingConfig, bz json.RawMessage) error { +func (am AppModule) ValidateGenesis(bz json.RawMessage) error { var data group.GenesisState - if err := cdc.UnmarshalJSON(bz, &data); err != nil { + if err := am.cdc.UnmarshalJSON(bz, &data); err != nil { return fmt.Errorf("failed to unmarshal %s genesis state: %w", group.ModuleName, err) } return data.Validate() } // InitGenesis performs genesis initialization for the group module. -func (am AppModule) InitGenesis(ctx context.Context, cdc codec.JSONCodec, data json.RawMessage) { - am.keeper.InitGenesis(ctx, cdc, data) +func (am AppModule) InitGenesis(ctx context.Context, data json.RawMessage) error { + return am.keeper.InitGenesis(ctx, am.cdc, data) } // ExportGenesis returns the exported genesis state as raw bytes for the group module. -func (am AppModule) ExportGenesis(ctx context.Context, cdc codec.JSONCodec) json.RawMessage { - gs := am.keeper.ExportGenesis(ctx, cdc) - return cdc.MustMarshalJSON(gs) +func (am AppModule) ExportGenesis(ctx context.Context) (json.RawMessage, error) { + gs := am.keeper.ExportGenesis(ctx, am.cdc) + return am.cdc.MarshalJSON(gs) } // GenerateGenesisState creates a randomized GenState of the group module. diff --git a/x/mint/keeper/genesis.go b/x/mint/keeper/genesis.go index 57b2faf5adb9..446b9066512d 100644 --- a/x/mint/keeper/genesis.go +++ b/x/mint/keeper/genesis.go @@ -7,29 +7,31 @@ import ( ) // InitGenesis new mint genesis -func (keeper Keeper) InitGenesis(ctx context.Context, ak types.AccountKeeper, data *types.GenesisState) { +func (keeper Keeper) InitGenesis(ctx context.Context, ak types.AccountKeeper, data *types.GenesisState) error { if err := keeper.Minter.Set(ctx, data.Minter); err != nil { - panic(err) + return err } if err := keeper.Params.Set(ctx, data.Params); err != nil { - panic(err) + return err } ak.GetModuleAccount(ctx, types.ModuleName) + + return nil } // ExportGenesis returns a GenesisState for a given context and keeper. -func (keeper Keeper) ExportGenesis(ctx context.Context) *types.GenesisState { +func (keeper Keeper) ExportGenesis(ctx context.Context) (*types.GenesisState, error) { minter, err := keeper.Minter.Get(ctx) if err != nil { - panic(err) + return nil, err } params, err := keeper.Params.Get(ctx) if err != nil { - panic(err) + return nil, err } - return types.NewGenesisState(minter, params) + return types.NewGenesisState(minter, params), nil } diff --git a/x/mint/keeper/genesis_test.go b/x/mint/keeper/genesis_test.go index 5fc6e9e03678..4dce9bf881da 100644 --- a/x/mint/keeper/genesis_test.go +++ b/x/mint/keeper/genesis_test.go @@ -73,7 +73,8 @@ func (s *GenesisTestSuite) TestImportExportGenesis() { uint64(60*60*8766/5), ) - s.keeper.InitGenesis(s.sdkCtx, s.accountKeeper, genesisState) + err := s.keeper.InitGenesis(s.sdkCtx, s.accountKeeper, genesisState) + s.Require().NoError(err) minter, err := s.keeper.Minter.Get(s.sdkCtx) s.Require().Equal(genesisState.Minter, minter) @@ -87,6 +88,7 @@ func (s *GenesisTestSuite) TestImportExportGenesis() { s.Require().Equal(genesisState.Params, params) s.Require().NoError(err) - genesisState2 := s.keeper.ExportGenesis(s.sdkCtx) + genesisState2, err := s.keeper.ExportGenesis(s.sdkCtx) + s.Require().NoError(err) s.Require().Equal(genesisState, genesisState2) } diff --git a/x/mint/module.go b/x/mint/module.go index 8f228900c8d8..2336c6306ef0 100644 --- a/x/mint/module.go +++ b/x/mint/module.go @@ -9,6 +9,7 @@ import ( "google.golang.org/grpc" "cosmossdk.io/core/appmodule" + appmodulev2 "cosmossdk.io/core/appmodule/v2" "cosmossdk.io/core/registry" "cosmossdk.io/x/mint/keeper" "cosmossdk.io/x/mint/simulation" @@ -29,7 +30,7 @@ var ( _ module.HasGRPCGateway = AppModule{} _ appmodule.HasRegisterInterfaces = AppModule{} _ module.AppModuleSimulation = AppModule{} - _ module.HasGenesis = AppModule{} + _ appmodulev2.HasGenesis = AppModule{} _ appmodule.AppModule = AppModule{} _ appmodule.HasBeginBlocker = AppModule{} @@ -113,14 +114,14 @@ func (am AppModule) RegisterMigrations(mr appmodule.MigrationRegistrar) error { } // DefaultGenesis returns default genesis state as raw bytes for the mint module. -func (AppModule) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { - return cdc.MustMarshalJSON(types.DefaultGenesisState()) +func (am AppModule) DefaultGenesis() json.RawMessage { + return am.cdc.MustMarshalJSON(types.DefaultGenesisState()) } // ValidateGenesis performs genesis state validation for the mint module. -func (AppModule) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncodingConfig, bz json.RawMessage) error { +func (am AppModule) ValidateGenesis(bz json.RawMessage) error { var data types.GenesisState - if err := cdc.UnmarshalJSON(bz, &data); err != nil { + if err := am.cdc.UnmarshalJSON(bz, &data); err != nil { return fmt.Errorf("failed to unmarshal %s genesis state: %w", types.ModuleName, err) } @@ -128,18 +129,23 @@ func (AppModule) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncodingCo } // InitGenesis performs genesis initialization for the mint module. -func (am AppModule) InitGenesis(ctx context.Context, cdc codec.JSONCodec, data json.RawMessage) { +func (am AppModule) InitGenesis(ctx context.Context, data json.RawMessage) error { var genesisState types.GenesisState - cdc.MustUnmarshalJSON(data, &genesisState) + if err := am.cdc.UnmarshalJSON(data, &genesisState); err != nil { + return err + } - am.keeper.InitGenesis(ctx, am.authKeeper, &genesisState) + return am.keeper.InitGenesis(ctx, am.authKeeper, &genesisState) } // ExportGenesis returns the exported genesis state as raw bytes for the mint // module. -func (am AppModule) ExportGenesis(ctx context.Context, cdc codec.JSONCodec) json.RawMessage { - gs := am.keeper.ExportGenesis(ctx) - return cdc.MustMarshalJSON(gs) +func (am AppModule) ExportGenesis(ctx context.Context) (json.RawMessage, error) { + gs, err := am.keeper.ExportGenesis(ctx) + if err != nil { + return nil, err + } + return am.cdc.MarshalJSON(gs) } // ConsensusVersion implements HasConsensusVersion diff --git a/x/nft/keeper/genesis.go b/x/nft/keeper/genesis.go index b0a435dafb44..5e5dcae184fd 100644 --- a/x/nft/keeper/genesis.go +++ b/x/nft/keeper/genesis.go @@ -9,24 +9,25 @@ import ( // InitGenesis initializes the nft module's genesis state from a given // genesis state. -func (k Keeper) InitGenesis(ctx context.Context, data *nft.GenesisState) { +func (k Keeper) InitGenesis(ctx context.Context, data *nft.GenesisState) error { for _, class := range data.Classes { if err := k.SaveClass(ctx, *class); err != nil { - panic(err) + return err } } for _, entry := range data.Entries { for _, nft := range entry.Nfts { owner, err := k.ac.StringToBytes(entry.Owner) if err != nil { - panic(err) + return err } if err := k.Mint(ctx, *nft, owner); err != nil { - panic(err) + return err } } } + return nil } // ExportGenesis returns a GenesisState for a given context. diff --git a/x/nft/keeper/keeper_test.go b/x/nft/keeper/keeper_test.go index 823553727bd5..e3ac2dfd0563 100644 --- a/x/nft/keeper/keeper_test.go +++ b/x/nft/keeper/keeper_test.go @@ -386,7 +386,8 @@ func (s *TestSuite) TestInitGenesis() { Nfts: []*nft.NFT{&expNFT}, }}, } - s.nftKeeper.InitGenesis(s.ctx, expGenesis) + err := s.nftKeeper.InitGenesis(s.ctx, expGenesis) + s.Require().NoError(err) actual, has := s.nftKeeper.GetClass(s.ctx, testClassID) s.Require().True(has) diff --git a/x/nft/module/module.go b/x/nft/module/module.go index b782d14c39fb..9a5ca47effa0 100644 --- a/x/nft/module/module.go +++ b/x/nft/module/module.go @@ -8,6 +8,7 @@ import ( "google.golang.org/grpc" "cosmossdk.io/core/appmodule" + appmodulev2 "cosmossdk.io/core/appmodule/v2" "cosmossdk.io/core/registry" "cosmossdk.io/errors" "cosmossdk.io/x/nft" @@ -26,7 +27,7 @@ var ( _ module.HasGRPCGateway = AppModule{} _ appmodule.HasRegisterInterfaces = AppModule{} _ module.AppModuleSimulation = AppModule{} - _ module.HasGenesis = AppModule{} + _ appmodulev2.HasGenesis = AppModule{} _ appmodule.AppModule = AppModule{} ) @@ -83,14 +84,14 @@ func (AppModule) RegisterGRPCGatewayRoutes(clientCtx sdkclient.Context, mux *gwr } // DefaultGenesis returns default genesis state as raw bytes for the nft module. -func (AppModule) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { - return cdc.MustMarshalJSON(nft.DefaultGenesisState()) +func (am AppModule) DefaultGenesis() json.RawMessage { + return am.cdc.MustMarshalJSON(nft.DefaultGenesisState()) } // ValidateGenesis performs genesis state validation for the nft module. -func (am AppModule) ValidateGenesis(cdc codec.JSONCodec, config sdkclient.TxEncodingConfig, bz json.RawMessage) error { +func (am AppModule) ValidateGenesis(bz json.RawMessage) error { var data nft.GenesisState - if err := cdc.UnmarshalJSON(bz, &data); err != nil { + if err := am.cdc.UnmarshalJSON(bz, &data); err != nil { return errors.Wrapf(err, "failed to unmarshal %s genesis state", nft.ModuleName) } @@ -98,16 +99,18 @@ func (am AppModule) ValidateGenesis(cdc codec.JSONCodec, config sdkclient.TxEnco } // InitGenesis performs genesis initialization for the nft module. -func (am AppModule) InitGenesis(ctx context.Context, cdc codec.JSONCodec, data json.RawMessage) { +func (am AppModule) InitGenesis(ctx context.Context, data json.RawMessage) error { var genesisState nft.GenesisState - cdc.MustUnmarshalJSON(data, &genesisState) - am.keeper.InitGenesis(ctx, &genesisState) + if err := am.cdc.UnmarshalJSON(data, &genesisState); err != nil { + return err + } + return am.keeper.InitGenesis(ctx, &genesisState) } // ExportGenesis returns the exported genesis state as raw bytes for the nft module. -func (am AppModule) ExportGenesis(ctx context.Context, cdc codec.JSONCodec) json.RawMessage { +func (am AppModule) ExportGenesis(ctx context.Context) (json.RawMessage, error) { gs := am.keeper.ExportGenesis(ctx) - return cdc.MustMarshalJSON(gs) + return am.cdc.MarshalJSON(gs) } // ConsensusVersion implements HasConsensusVersion diff --git a/x/protocolpool/module.go b/x/protocolpool/module.go index 03c56baed7ac..4539e9b1ab28 100644 --- a/x/protocolpool/module.go +++ b/x/protocolpool/module.go @@ -9,6 +9,7 @@ import ( "google.golang.org/grpc" "cosmossdk.io/core/appmodule" + appmodulev2 "cosmossdk.io/core/appmodule/v2" "cosmossdk.io/core/registry" "cosmossdk.io/x/protocolpool/keeper" "cosmossdk.io/x/protocolpool/types" @@ -22,13 +23,13 @@ import ( const ConsensusVersion = 1 var ( - _ module.HasName = AppModule{} - _ module.HasAminoCodec = AppModule{} - _ module.HasGRPCGateway = AppModule{} - _ appmodule.HasRegisterInterfaces = AppModule{} - _ module.AppModule = AppModule{} - _ module.AppModuleSimulation = AppModule{} - _ module.HasGenesis = AppModule{} + _ module.HasName = AppModule{} + _ module.HasAminoCodec = AppModule{} + _ module.HasGRPCGateway = AppModule{} + _ module.HasRegisterInterfaces = AppModule{} + _ module.AppModule = AppModule{} + _ module.AppModuleSimulation = AppModule{} + _ appmodulev2.HasGenesis = AppModule{} _ appmodule.AppModule = AppModule{} _ appmodule.HasServices = AppModule{} @@ -84,14 +85,14 @@ func (am AppModule) RegisterServices(registrar grpc.ServiceRegistrar) error { } // DefaultGenesis returns default genesis state as raw bytes for the protocolpool module. -func (AppModule) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { - return cdc.MustMarshalJSON(types.DefaultGenesisState()) +func (am AppModule) DefaultGenesis() json.RawMessage { + return am.cdc.MustMarshalJSON(types.DefaultGenesisState()) } // ValidateGenesis performs genesis state validation for the protocolpool module. -func (AppModule) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncodingConfig, bz json.RawMessage) error { +func (am AppModule) ValidateGenesis(bz json.RawMessage) error { var data types.GenesisState - if err := cdc.UnmarshalJSON(bz, &data); err != nil { + if err := am.cdc.UnmarshalJSON(bz, &data); err != nil { return fmt.Errorf("failed to unmarshal %s genesis state: %w", types.ModuleName, err) } @@ -99,21 +100,24 @@ func (AppModule) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncodingCo } // InitGenesis performs genesis initialization for the protocolpool module. -func (am AppModule) InitGenesis(ctx context.Context, cdc codec.JSONCodec, data json.RawMessage) { +func (am AppModule) InitGenesis(ctx context.Context, data json.RawMessage) error { var genesisState types.GenesisState - cdc.MustUnmarshalJSON(data, &genesisState) + if err := am.cdc.UnmarshalJSON(data, &genesisState); err != nil { + return err + } if err := am.keeper.InitGenesis(ctx, &genesisState); err != nil { - panic(err) + return err } + return nil } // ExportGenesis returns the exported genesis state as raw bytes for the protocolpool module. -func (am AppModule) ExportGenesis(ctx context.Context, cdc codec.JSONCodec) json.RawMessage { +func (am AppModule) ExportGenesis(ctx context.Context) (json.RawMessage, error) { gs, err := am.keeper.ExportGenesis(ctx) if err != nil { - panic(err) + return nil, err } - return cdc.MustMarshalJSON(gs) + return am.cdc.MarshalJSON(gs) } // ConsensusVersion implements HasConsensusVersion diff --git a/x/slashing/keeper/genesis.go b/x/slashing/keeper/genesis.go index d0528fa0a0eb..ac4af63f0054 100644 --- a/x/slashing/keeper/genesis.go +++ b/x/slashing/keeper/genesis.go @@ -10,7 +10,7 @@ import ( // InitGenesis initializes default parameters and the keeper's address to // pubkey map. -func (keeper Keeper) InitGenesis(ctx context.Context, stakingKeeper types.StakingKeeper, data *types.GenesisState) { +func (keeper Keeper) InitGenesis(ctx context.Context, stakingKeeper types.StakingKeeper, data *types.GenesisState) error { err := stakingKeeper.IterateValidators(ctx, func(index int64, validator sdk.ValidatorI) bool { consPk, err := validator.ConsPubKey() @@ -26,36 +26,37 @@ func (keeper Keeper) InitGenesis(ctx context.Context, stakingKeeper types.Stakin }, ) if err != nil { - panic(err) + return err } for _, info := range data.SigningInfos { address, err := keeper.sk.ConsensusAddressCodec().StringToBytes(info.Address) if err != nil { - panic(err) + return err } err = keeper.ValidatorSigningInfo.Set(ctx, address, info.ValidatorSigningInfo) if err != nil { - panic(err) + return err } } for _, array := range data.MissedBlocks { address, err := keeper.sk.ConsensusAddressCodec().StringToBytes(array.Address) if err != nil { - panic(err) + return err } for _, missed := range array.MissedBlocks { if err := keeper.SetMissedBlockBitmapValue(ctx, address, missed.Index, missed.Missed); err != nil { - panic(err) + return err } } } if err := keeper.Params.Set(ctx, data.Params); err != nil { - panic(err) + return err } + return nil } // ExportGenesis writes the current store values diff --git a/x/slashing/keeper/genesis_test.go b/x/slashing/keeper/genesis_test.go index eee5bfe98d57..c8ba1131da7c 100644 --- a/x/slashing/keeper/genesis_test.go +++ b/x/slashing/keeper/genesis_test.go @@ -50,7 +50,8 @@ func (s *KeeperTestSuite) TestExportAndInitGenesis() { // Initialize genesis with genesis state before tombstone s.stakingKeeper.EXPECT().IterateValidators(ctx, gomock.Any()).Return(nil) - keeper.InitGenesis(ctx, s.stakingKeeper, genesisState) + err = keeper.InitGenesis(ctx, s.stakingKeeper, genesisState) + s.Require().NoError(err) // Validator isTombstoned should return false as GenesisState is initialized ok = keeper.IsTombstoned(ctx, consAddr1) diff --git a/x/slashing/module.go b/x/slashing/module.go index 6c78a386166d..875727d62c0b 100644 --- a/x/slashing/module.go +++ b/x/slashing/module.go @@ -9,6 +9,7 @@ import ( "google.golang.org/grpc" "cosmossdk.io/core/appmodule" + appmodulev2 "cosmossdk.io/core/appmodule/v2" "cosmossdk.io/core/registry" "cosmossdk.io/x/slashing/keeper" "cosmossdk.io/x/slashing/simulation" @@ -25,12 +26,12 @@ import ( const ConsensusVersion = 4 var ( - _ module.HasName = AppModule{} - _ module.HasAminoCodec = AppModule{} - _ module.HasGRPCGateway = AppModule{} - _ appmodule.HasRegisterInterfaces = AppModule{} - _ module.AppModuleSimulation = AppModule{} - _ module.HasGenesis = AppModule{} + _ module.HasName = AppModule{} + _ module.HasAminoCodec = AppModule{} + _ module.HasGRPCGateway = AppModule{} + _ module.HasRegisterInterfaces = AppModule{} + _ module.AppModuleSimulation = AppModule{} + _ appmodulev2.HasGenesis = AppModule{} _ appmodule.AppModule = AppModule{} _ appmodule.HasBeginBlocker = AppModule{} @@ -121,14 +122,14 @@ func (am AppModule) RegisterMigrations(mr appmodule.MigrationRegistrar) error { } // DefaultGenesis returns default genesis state as raw bytes for the slashing module. -func (AppModule) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { - return cdc.MustMarshalJSON(types.DefaultGenesisState()) +func (am AppModule) DefaultGenesis() json.RawMessage { + return am.cdc.MustMarshalJSON(types.DefaultGenesisState()) } // ValidateGenesis performs genesis state validation for the slashing module. -func (AppModule) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncodingConfig, bz json.RawMessage) error { +func (am AppModule) ValidateGenesis(bz json.RawMessage) error { var data types.GenesisState - if err := cdc.UnmarshalJSON(bz, &data); err != nil { + if err := am.cdc.UnmarshalJSON(bz, &data); err != nil { return fmt.Errorf("failed to unmarshal %s genesis state: %w", types.ModuleName, err) } @@ -136,16 +137,18 @@ func (AppModule) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncodingCo } // InitGenesis performs genesis initialization for the slashing module. -func (am AppModule) InitGenesis(ctx context.Context, cdc codec.JSONCodec, data json.RawMessage) { +func (am AppModule) InitGenesis(ctx context.Context, data json.RawMessage) error { var genesisState types.GenesisState - cdc.MustUnmarshalJSON(data, &genesisState) - am.keeper.InitGenesis(ctx, am.stakingKeeper, &genesisState) + if err := am.cdc.UnmarshalJSON(data, &genesisState); err != nil { + return err + } + return am.keeper.InitGenesis(ctx, am.stakingKeeper, &genesisState) } // ExportGenesis returns the exported genesis state as raw bytes for the slashing module. -func (am AppModule) ExportGenesis(ctx context.Context, cdc codec.JSONCodec) json.RawMessage { +func (am AppModule) ExportGenesis(ctx context.Context) (json.RawMessage, error) { gs := am.keeper.ExportGenesis(ctx) - return cdc.MustMarshalJSON(gs) + return am.cdc.MarshalJSON(gs) } // ConsensusVersion implements HasConsensusVersion diff --git a/x/staking/module.go b/x/staking/module.go index d3d28ce25043..bbeefee67e85 100644 --- a/x/staking/module.go +++ b/x/staking/module.go @@ -131,14 +131,14 @@ func (am AppModule) RegisterMigrations(mr appmodule.MigrationRegistrar) error { } // DefaultGenesis returns default genesis state as raw bytes for the staking module. -func (AppModule) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { - return cdc.MustMarshalJSON(types.DefaultGenesisState()) +func (am AppModule) DefaultGenesis() json.RawMessage { + return am.cdc.MustMarshalJSON(types.DefaultGenesisState()) } // ValidateGenesis performs genesis state validation for the staking module. -func (AppModule) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncodingConfig, bz json.RawMessage) error { +func (am AppModule) ValidateGenesis(bz json.RawMessage) error { var data types.GenesisState - if err := cdc.UnmarshalJSON(bz, &data); err != nil { + if err := am.cdc.UnmarshalJSON(bz, &data); err != nil { return fmt.Errorf("failed to unmarshal %s genesis state: %w", types.ModuleName, err) } @@ -146,18 +146,18 @@ func (AppModule) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncodingCo } // InitGenesis performs genesis initialization for the staking module. -func (am AppModule) InitGenesis(ctx context.Context, cdc codec.JSONCodec, data json.RawMessage) []abci.ValidatorUpdate { +func (am AppModule) InitGenesis(ctx context.Context, data json.RawMessage) []abci.ValidatorUpdate { var genesisState types.GenesisState - cdc.MustUnmarshalJSON(data, &genesisState) + am.cdc.MustUnmarshalJSON(data, &genesisState) return am.keeper.InitGenesis(ctx, &genesisState) } // ExportGenesis returns the exported genesis state as raw bytes for the staking // module. -func (am AppModule) ExportGenesis(ctx context.Context, cdc codec.JSONCodec) json.RawMessage { - return cdc.MustMarshalJSON(am.keeper.ExportGenesis(ctx)) +func (am AppModule) ExportGenesis(ctx context.Context) json.RawMessage { + return am.cdc.MustMarshalJSON(am.keeper.ExportGenesis(ctx)) } // ConsensusVersion implements HasConsensusVersion diff --git a/x/upgrade/module.go b/x/upgrade/module.go index 7ddebb6bc1e8..7b0f1a53f32e 100644 --- a/x/upgrade/module.go +++ b/x/upgrade/module.go @@ -10,6 +10,7 @@ import ( "google.golang.org/grpc" "cosmossdk.io/core/appmodule" + appmodulev2 "cosmossdk.io/core/appmodule/v2" "cosmossdk.io/core/registry" "cosmossdk.io/x/upgrade/client/cli" "cosmossdk.io/x/upgrade/keeper" @@ -28,11 +29,11 @@ func init() { const ConsensusVersion uint64 = 3 var ( - _ module.HasName = AppModule{} - _ module.HasAminoCodec = AppModule{} - _ module.HasGRPCGateway = AppModule{} - _ appmodule.HasRegisterInterfaces = AppModule{} - _ module.HasGenesis = AppModule{} + _ module.HasName = AppModule{} + _ module.HasAminoCodec = AppModule{} + _ module.HasGRPCGateway = AppModule{} + _ module.HasRegisterInterfaces = AppModule{} + _ appmodulev2.HasGenesis = AppModule{} _ appmodule.AppModule = AppModule{} _ appmodule.HasPreBlocker = AppModule{} @@ -105,24 +106,24 @@ func (am AppModule) RegisterMigrations(mr appmodule.MigrationRegistrar) error { } // DefaultGenesis is an empty object -func (AppModule) DefaultGenesis(_ codec.JSONCodec) json.RawMessage { +func (AppModule) DefaultGenesis() json.RawMessage { return []byte("{}") } // ValidateGenesis is always successful, as we ignore the value -func (AppModule) ValidateGenesis(_ codec.JSONCodec, _ client.TxEncodingConfig, _ json.RawMessage) error { +func (AppModule) ValidateGenesis(_ json.RawMessage) error { return nil } // InitGenesis is ignored, no sense in serializing future upgrades -func (am AppModule) InitGenesis(ctx context.Context, _ codec.JSONCodec, _ json.RawMessage) { +func (am AppModule) InitGenesis(ctx context.Context, _ json.RawMessage) error { // set version map automatically if available if versionMap := am.keeper.GetInitVersionMap(); versionMap != nil { // chains can still use a custom init chainer for setting the version map // this means that we need to combine the manually wired modules version map with app wiring enabled modules version map moduleVM, err := am.keeper.GetModuleVersionMap(ctx) if err != nil { - panic(err) + return err } for name, version := range moduleVM { @@ -133,14 +134,15 @@ func (am AppModule) InitGenesis(ctx context.Context, _ codec.JSONCodec, _ json.R err = am.keeper.SetModuleVersionMap(ctx, versionMap) if err != nil { - panic(err) + return err } } + return nil } // ExportGenesis is always empty, as InitGenesis does nothing either -func (am AppModule) ExportGenesis(_ context.Context, cdc codec.JSONCodec) json.RawMessage { - return am.DefaultGenesis(cdc) +func (am AppModule) ExportGenesis(_ context.Context) (json.RawMessage, error) { + return am.DefaultGenesis(), nil } // ConsensusVersion implements HasConsensusVersion From 0091851ef716c7148581a955fbd70ed3b45ef3ae Mon Sep 17 00:00:00 2001 From: Julien Robert Date: Mon, 11 Mar 2024 11:51:12 +0100 Subject: [PATCH 09/30] feat(x/distribution): add rewards-by-validator autocli config (#19707) --- x/distribution/autocli.go | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/x/distribution/autocli.go b/x/distribution/autocli.go index fbfde063d93f..c53abc4eda4e 100644 --- a/x/distribution/autocli.go +++ b/x/distribution/autocli.go @@ -61,15 +61,24 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { }, { RpcMethod: "DelegationRewards", - Use: "rewards [delegator-addr] [validator-addr]", - Short: "Query all distribution delegator rewards or rewards from a particular validator", - Long: "Query all rewards earned by a delegator, optionally restrict to rewards from a single validator.", + Use: "rewards-by-validator [delegator-addr] [validator-addr]", + Short: "Query all distribution delegator from a particular validator", Example: fmt.Sprintf("$ %s query distribution rewards [delegator-address] [validator-address]", version.AppName), PositionalArgs: []*autocliv1.PositionalArgDescriptor{ {ProtoField: "delegator_address"}, {ProtoField: "validator_address"}, }, }, + { + RpcMethod: "DelegationTotalRewards", + Use: "rewards [delegator-addr]", + Short: "Query all distribution delegator rewards", + Long: "Query all rewards earned by a delegator", + Example: fmt.Sprintf("$ %s query distribution rewards [delegator-address]", version.AppName), + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "delegator_address"}, + }, + }, { RpcMethod: "CommunityPool", Use: "community-pool", From defab1a1a1520cd6dd0d80768d345560d7c99663 Mon Sep 17 00:00:00 2001 From: Cosmos SDK <113218068+github-prbot@users.noreply.github.com> Date: Mon, 11 Mar 2024 13:36:10 +0100 Subject: [PATCH 10/30] chore: fix spelling errors (#19716) Co-authored-by: github-merge-queue <118344674+github-merge-queue@users.noreply.github.com> --- x/evidence/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/evidence/CHANGELOG.md b/x/evidence/CHANGELOG.md index eba342d7870d..7683aa73566e 100644 --- a/x/evidence/CHANGELOG.md +++ b/x/evidence/CHANGELOG.md @@ -28,7 +28,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ ### Api Breaking Changes * [#19482](https://github.com/cosmos/cosmos-sdk/pull/19482) `appmodule.Environment` is passed to `NewKeeper` instead of individual services -* [#19627](https://github.com/cosmos/cosmos-sdk/pull/19627) `NewAppModule` now takes in a `codec.Codec` as its first arguement +* [#19627](https://github.com/cosmos/cosmos-sdk/pull/19627) `NewAppModule` now takes in a `codec.Codec` as its first argument ## [v0.1.0](https://github.com/cosmos/cosmos-sdk/releases/tag/x/evidence/v0.1.0) - 2023-11-07 From fea88d13c52f66e93cf5e7f72d79d47cc90bc015 Mon Sep 17 00:00:00 2001 From: Julien Robert Date: Mon, 11 Mar 2024 15:39:37 +0100 Subject: [PATCH 11/30] refactor(core)!: clean-up core and simplify preblock (#19672) --- CHANGELOG.md | 1 + baseapp/abci_test.go | 16 ++--- baseapp/baseapp.go | 17 +++-- core/CHANGELOG.md | 3 +- core/appmodule/migrations.go | 27 ++++---- core/appmodule/module.go | 63 ++++--------------- core/appmodule/v2/migrations.go | 4 +- core/appmodule/v2/{appmodule.go => module.go} | 8 +++ runtime/app.go | 2 +- runtime/services/autocli.go | 4 +- simapp/app.go | 2 +- testutil/mock/types_mock_appmodule.go | 7 +-- types/abci.go | 10 +-- types/module/configurator.go | 6 +- types/module/mock_appmodule_test.go | 4 +- types/module/module.go | 15 ++--- types/module/module_test.go | 19 ++---- x/upgrade/CHANGELOG.md | 6 +- x/upgrade/keeper/abci.go | 37 ++++------- x/upgrade/keeper/abci_test.go | 34 +++++----- x/upgrade/module.go | 2 +- 21 files changed, 110 insertions(+), 177 deletions(-) rename core/appmodule/v2/{appmodule.go => module.go} (93%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4e96570e82c5..7c08fd6566c3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -57,6 +57,7 @@ Every module contains its own CHANGELOG.md. Please refer to the module you are i ### Improvements +* (types) [#19672](https://github.com/cosmos/cosmos-sdk/pull/19672) `PreBlock` now returns only an error for consistency with server/v2. The SDK has upgraded x/upgrade accordingly. `ResponsePreBlock` hence has been removed. * (server) [#19455](https://github.com/cosmos/cosmos-sdk/pull/19455) Allow calling back into the application struct in PostSetup. * (types) [#19512](https://github.com/cosmos/cosmos-sdk/pull/19512) The notion of basic manager does not exist anymore. * The module manager now can do everything that the basic manager was doing. diff --git a/baseapp/abci_test.go b/baseapp/abci_test.go index 3fd7d86bb647..33c4d75284bb 100644 --- a/baseapp/abci_test.go +++ b/baseapp/abci_test.go @@ -2041,11 +2041,9 @@ func TestBaseApp_PreBlocker(t *testing.T) { require.NoError(t, err) wasHookCalled := false - app.SetPreBlocker(func(ctx sdk.Context, req *abci.RequestFinalizeBlock) (*sdk.ResponsePreBlock, error) { + app.SetPreBlocker(func(ctx sdk.Context, req *abci.RequestFinalizeBlock) error { wasHookCalled = true - return &sdk.ResponsePreBlock{ - ConsensusParamsChanged: true, - }, nil + return nil }) app.Seal() @@ -2058,8 +2056,8 @@ func TestBaseApp_PreBlocker(t *testing.T) { _, err = app.InitChain(&abci.RequestInitChain{}) require.NoError(t, err) - app.SetPreBlocker(func(ctx sdk.Context, req *abci.RequestFinalizeBlock) (*sdk.ResponsePreBlock, error) { - return nil, errors.New("some error") + app.SetPreBlocker(func(ctx sdk.Context, req *abci.RequestFinalizeBlock) error { + return errors.New("some error") }) app.Seal() @@ -2148,7 +2146,7 @@ func TestBaseApp_VoteExtensions(t *testing.T) { return &abci.ResponseProcessProposal{Status: abci.ResponseProcessProposal_ACCEPT}, nil }) - app.SetPreBlocker(func(ctx sdk.Context, req *abci.RequestFinalizeBlock) (*sdk.ResponsePreBlock, error) { + app.SetPreBlocker(func(ctx sdk.Context, req *abci.RequestFinalizeBlock) error { count := uint64(0) pricesSum := uint64(0) for _, v := range req.Txs { @@ -2167,9 +2165,7 @@ func TestBaseApp_VoteExtensions(t *testing.T) { ctx.KVStore(capKey1).Set([]byte("avgPrice"), buf) } - return &sdk.ResponsePreBlock{ - ConsensusParamsChanged: true, - }, nil + return nil }) } diff --git a/baseapp/baseapp.go b/baseapp/baseapp.go index 672e5a6dea30..2cef05e7ccd5 100644 --- a/baseapp/baseapp.go +++ b/baseapp/baseapp.go @@ -706,19 +706,16 @@ func (app *BaseApp) cacheTxContext(ctx sdk.Context, txBytes []byte) (sdk.Context func (app *BaseApp) preBlock(req *abci.RequestFinalizeBlock) error { if app.preBlocker != nil { ctx := app.finalizeBlockState.Context() - rsp, err := app.preBlocker(ctx, req) - if err != nil { + if err := app.preBlocker(ctx, req); err != nil { return err } - // rsp.ConsensusParamsChanged is true from preBlocker means ConsensusParams in store get changed + // ConsensusParams can change in preblocker, so we need to // write the consensus parameters in store to context - if rsp.ConsensusParamsChanged { - ctx = ctx.WithConsensusParams(app.GetConsensusParams(ctx)) - // GasMeter must be set after we get a context with updated consensus params. - gasMeter := app.getBlockGasMeter(ctx) - ctx = ctx.WithBlockGasMeter(gasMeter) - app.finalizeBlockState.SetContext(ctx) - } + ctx = ctx.WithConsensusParams(app.GetConsensusParams(ctx)) + // GasMeter must be set after we get a context with updated consensus params. + gasMeter := app.getBlockGasMeter(ctx) + ctx = ctx.WithBlockGasMeter(gasMeter) + app.finalizeBlockState.SetContext(ctx) } return nil } diff --git a/core/CHANGELOG.md b/core/CHANGELOG.md index 2f556daf6a24..d44c84f4c1a0 100644 --- a/core/CHANGELOG.md +++ b/core/CHANGELOG.md @@ -54,10 +54,9 @@ Ref: https://keepachangelog.com/en/1.0.0/ * Add `MsgHandler` as an alternative to grpc handlers * Provide separate `MigrationRegistrar` instead of grouping with `RegisterServices` -### Improvements - ### API Breaking Changes +* [#19672](https://github.com/cosmos/cosmos-sdk/pull/19672) `PreBlock` now returns only an error for consistency with server/v2. The SDK has upgraded x/upgrade accordingly. * [#18857](https://github.com/cosmos/cosmos-sdk/pull/18857) Moved `FormatCoins` to `x/tx`. * [#18861](httpes://github.com/cosmos/cosmos-sdk/pull/18861) Moved `coin.ParseCoin` to `client/v2/internal`. * [#18866](https://github.com/cosmos/cosmos-sdk/pull/18866) All items related to depinject have been moved to `cosmossdk.io/depinject` (`Provide`, `Invoke`, `Register`) diff --git a/core/appmodule/migrations.go b/core/appmodule/migrations.go index 63c724108b65..e5fe6fbcfaf1 100644 --- a/core/appmodule/migrations.go +++ b/core/appmodule/migrations.go @@ -1,16 +1,17 @@ package appmodule -import "context" +import ( + "cosmossdk.io/core/appmodule/v2" +) -type MigrationRegistrar interface { - // Register registers an in-place store migration for a module. The - // handler is a migration script to perform in-place migrations from version - // `fromVersion` to version `fromVersion+1`. - // - // EACH TIME a module's ConsensusVersion increments, a new migration MUST - // be registered using this function. If a migration handler is missing for - // a particular function, the upgrade logic (see RunMigrations function) - // will panic. If the ConsensusVersion bump does not introduce any store - // changes, then a no-op function must be registered here. - Register(moduleName string, fromVersion uint64, handler func(context.Context) error) error -} +// HasConsensusVersion is the interface for declaring a module consensus version. +type HasConsensusVersion = appmodule.HasConsensusVersion + +// HasMigrations is implemented by a module which upgrades or has upgraded to a new consensus version. +type HasMigrations = appmodule.HasMigrations + +// MigrationRegistrar is the interface for registering in-place store migrations. +type MigrationRegistrar = appmodule.MigrationRegistrar + +// MigrationHandler is the migration function that each module registers. +type MigrationHandler = appmodule.MigrationHandler diff --git a/core/appmodule/module.go b/core/appmodule/module.go index 4646d11d17b3..60c4f80c3558 100644 --- a/core/appmodule/module.go +++ b/core/appmodule/module.go @@ -4,7 +4,6 @@ import ( "context" "google.golang.org/grpc" - "google.golang.org/protobuf/runtime/protoiface" "cosmossdk.io/core/appmodule/v2" ) @@ -15,16 +14,20 @@ import ( // by other modules (usually via depinject) as app modules. type AppModule = appmodule.AppModule -// HasMigrations is the extension interface that modules should implement to register migrations. -type HasMigrations interface { - AppModule +// HasPreBlocker is the extension interface that modules should implement to run +// custom logic before BeginBlock. +type HasPreBlocker = appmodule.HasPreBlocker - // RegisterMigrations registers the module's migrations with the app's migrator. - RegisterMigrations(MigrationRegistrar) error -} +// HasBeginBlocker is the extension interface that modules should implement to run +// custom logic before transaction processing in a block. +type HasBeginBlocker = appmodule.HasBeginBlocker + +// HasEndBlocker is the extension interface that modules should implement to run +// custom logic after transaction processing in a block. +type HasEndBlocker = appmodule.HasEndBlocker -// HasConsensusVersion is the interface for declaring a module consensus version. -type HasConsensusVersion = appmodule.HasConsensusVersion +// HasRegisterInterfaces is the interface for modules to register their msg types. +type HasRegisterInterfaces = appmodule.HasRegisterInterfaces // HasServices is the extension interface that modules should implement to register // implementations of services defined in .proto files. @@ -46,48 +49,6 @@ type HasServices interface { RegisterServices(grpc.ServiceRegistrar) error } -// ResponsePreBlock represents the response from the PreBlock method. -// It can modify consensus parameters in storage and signal the caller through the return value. -// When it returns ConsensusParamsChanged=true, the caller must refresh the consensus parameter in the finalize context. -// The new context (ctx) must be passed to all the other lifecycle methods. -type ResponsePreBlock interface { - IsConsensusParamsChanged() bool -} - -// HasPreBlocker is the extension interface that modules should implement to run -// custom logic before BeginBlock. -type HasPreBlocker interface { - appmodule.AppModule - // PreBlock is method that will be run before BeginBlock. - PreBlock(context.Context) (ResponsePreBlock, error) -} - -// HasBeginBlocker is the extension interface that modules should implement to run -// custom logic before transaction processing in a block. -type HasBeginBlocker = appmodule.HasBeginBlocker - -// HasEndBlocker is the extension interface that modules should implement to run -// custom logic after transaction processing in a block. -type HasEndBlocker = appmodule.HasEndBlocker - -// HasRegisterInterfaces is the interface for modules to register their msg types. -type HasRegisterInterfaces = appmodule.HasRegisterInterfaces - -// MsgHandlerRouter is implemented by the runtime provider. -type MsgHandlerRouter interface { - // RegisterHandler is called by modules to register msg handler functions. - RegisterHandler(name string, handler func(ctx context.Context, msg protoiface.MessageV1) (msgResp protoiface.MessageV1, err error)) -} - -// HasMsgHandler is implemented by modules that instead of exposing msg server expose -// a set of handlers. -type HasMsgHandler interface { - // RegisterMsgHandlers is implemented by the module that will register msg handlers. - RegisterMsgHandlers(router MsgHandlerRouter) -} - -// ---------------------------------------------------------------------------- // - // HasPrepareCheckState is an extension interface that contains information about the AppModule // and PrepareCheckState. type HasPrepareCheckState interface { diff --git a/core/appmodule/v2/migrations.go b/core/appmodule/v2/migrations.go index 794fb4a28cc8..3e62ad7dfee4 100644 --- a/core/appmodule/v2/migrations.go +++ b/core/appmodule/v2/migrations.go @@ -11,8 +11,7 @@ type HasConsensusVersion interface { ConsensusVersion() uint64 } -// HasMigrations is implemented by a module which upgrades or has upgraded -// to a new consensus version. +// HasMigrations is implemented by a module which upgrades or has upgraded to a new consensus version. type HasMigrations interface { AppModule HasConsensusVersion @@ -21,6 +20,7 @@ type HasMigrations interface { RegisterMigrations(MigrationRegistrar) error } +// MigrationRegistrar is the interface for registering in-place store migrations. type MigrationRegistrar interface { // Register registers an in-place store migration for a module. The // handler is a migration script to perform in-place migrations from version diff --git a/core/appmodule/v2/appmodule.go b/core/appmodule/v2/module.go similarity index 93% rename from core/appmodule/v2/appmodule.go rename to core/appmodule/v2/module.go index b0bfb19d2fcc..2fe0cc99f07b 100644 --- a/core/appmodule/v2/appmodule.go +++ b/core/appmodule/v2/module.go @@ -19,6 +19,14 @@ type AppModule interface { IsOnePerModuleType() } +// HasPreBlocker is the extension interface that modules should implement to run +// custom logic before BeginBlock. +type HasPreBlocker interface { + AppModule + // PreBlock is method that will be run before BeginBlock. + PreBlock(context.Context) error +} + // HasBeginBlocker is the extension interface that modules should implement to run // custom logic before transaction processing in a block. type HasBeginBlocker interface { diff --git a/runtime/app.go b/runtime/app.go index c5ac9329d9e5..6fdfe08ca1f0 100644 --- a/runtime/app.go +++ b/runtime/app.go @@ -153,7 +153,7 @@ func (a *App) Load(loadLatest bool) error { } // PreBlocker application updates every pre block -func (a *App) PreBlocker(ctx sdk.Context, _ *abci.RequestFinalizeBlock) (*sdk.ResponsePreBlock, error) { +func (a *App) PreBlocker(ctx sdk.Context, _ *abci.RequestFinalizeBlock) error { return a.ModuleManager.PreBlock(ctx) } diff --git a/runtime/services/autocli.go b/runtime/services/autocli.go index e8a4682e3732..b130af0f1c11 100644 --- a/runtime/services/autocli.go +++ b/runtime/services/autocli.go @@ -113,7 +113,9 @@ func (a *autocliConfigurator) RegisterMigration(string, uint64, module.Migration return nil } -func (a *autocliConfigurator) Register(string, uint64, func(context.Context) error) error { return nil } +func (a *autocliConfigurator) Register(string, uint64, appmodule.MigrationHandler) error { + return nil +} func (a *autocliConfigurator) RegisterService(sd *grpc.ServiceDesc, ss interface{}) { if a.registryCache == nil { diff --git a/simapp/app.go b/simapp/app.go index 59e7b03410e2..3304c335b4ec 100644 --- a/simapp/app.go +++ b/simapp/app.go @@ -615,7 +615,7 @@ func (app *SimApp) Close() error { func (app *SimApp) Name() string { return app.BaseApp.Name() } // PreBlocker application updates every pre block -func (app *SimApp) PreBlocker(ctx sdk.Context, _ *abci.RequestFinalizeBlock) (*sdk.ResponsePreBlock, error) { +func (app *SimApp) PreBlocker(ctx sdk.Context, _ *abci.RequestFinalizeBlock) error { return app.ModuleManager.PreBlock(ctx) } diff --git a/testutil/mock/types_mock_appmodule.go b/testutil/mock/types_mock_appmodule.go index 13f1c97b7124..6118f774fd9f 100644 --- a/testutil/mock/types_mock_appmodule.go +++ b/testutil/mock/types_mock_appmodule.go @@ -659,12 +659,11 @@ func (mr *MockCoreAppModuleWithPreBlockMockRecorder) IsOnePerModuleType() *gomoc } // PreBlock mocks base method. -func (m *MockCoreAppModuleWithPreBlock) PreBlock(arg0 context.Context) (appmodule.ResponsePreBlock, error) { +func (m *MockCoreAppModuleWithPreBlock) PreBlock(arg0 context.Context) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "PreBlock", arg0) - ret0, _ := ret[0].(appmodule.ResponsePreBlock) - ret1, _ := ret[1].(error) - return ret0, ret1 + ret0, _ := ret[0].(error) + return ret0 } // PreBlock indicates an expected call of PreBlock. diff --git a/types/abci.go b/types/abci.go index 8325f5dadf0c..701772806d93 100644 --- a/types/abci.go +++ b/types/abci.go @@ -36,7 +36,7 @@ type VerifyVoteExtensionHandler func(Context, *abci.RequestVerifyVoteExtension) // persist their results in state. // // Note: returning an error will make FinalizeBlock fail. -type PreBlocker func(Context, *abci.RequestFinalizeBlock) (*ResponsePreBlock, error) +type PreBlocker func(Context, *abci.RequestFinalizeBlock) error // BeginBlocker defines a function type alias for executing application // business logic before transactions are executed. @@ -66,11 +66,3 @@ type EndBlock struct { type BeginBlock struct { Events []abci.Event } - -type ResponsePreBlock struct { - ConsensusParamsChanged bool -} - -func (r ResponsePreBlock) IsConsensusParamsChanged() bool { - return r.ConsensusParamsChanged -} diff --git a/types/module/configurator.go b/types/module/configurator.go index 0ef80fca96ae..06d648ff1ff2 100644 --- a/types/module/configurator.go +++ b/types/module/configurator.go @@ -1,7 +1,6 @@ package module import ( - "context" "fmt" "github.com/cosmos/gogoproto/grpc" @@ -10,6 +9,7 @@ import ( "google.golang.org/protobuf/reflect/protoreflect" cosmosmsg "cosmossdk.io/api/cosmos/msg/v1" + "cosmossdk.io/core/appmodule" errorsmod "cosmossdk.io/errors" "github.com/cosmos/cosmos-sdk/codec" @@ -47,7 +47,7 @@ type Configurator interface { // Register registers an in-place store migration for a module. // It permits to register modules migrations that have migrated to serverv2 but still be compatible with baseapp. - Register(moduleName string, fromVersion uint64, handler func(context.Context) error) error + Register(moduleName string, fromVersion uint64, handler appmodule.MigrationHandler) error } type configurator struct { @@ -124,7 +124,7 @@ func (c *configurator) RegisterMigration(moduleName string, fromVersion uint64, // Register implements the Configurator.Register method // It allows to register modules migrations that have migrated to server/v2 but still be compatible with baseapp. -func (c *configurator) Register(moduleName string, fromVersion uint64, handler func(context.Context) error) error { +func (c *configurator) Register(moduleName string, fromVersion uint64, handler appmodule.MigrationHandler) error { return c.RegisterMigration(moduleName, fromVersion, func(sdkCtx sdk.Context) error { return handler(sdkCtx) }) diff --git a/types/module/mock_appmodule_test.go b/types/module/mock_appmodule_test.go index 848280147fb1..6d470b7d64a6 100644 --- a/types/module/mock_appmodule_test.go +++ b/types/module/mock_appmodule_test.go @@ -1,3 +1,5 @@ +// module_test inconsistenctly import appmodulev2 & appmodulev1 due to limitation in mockgen +// eventually, when we change mocking library, we should be consistent in our appmodule imports package module_test import ( @@ -43,5 +45,5 @@ type CoreAppModule interface { type CoreAppModuleWithPreBlock interface { CoreAppModule - appmodule.HasPreBlocker + appmodulev2.HasPreBlocker } diff --git a/types/module/module.go b/types/module/module.go index 9bad87df98a2..6dd626f7cd20 100644 --- a/types/module/module.go +++ b/types/module/module.go @@ -706,23 +706,16 @@ func (m Manager) RunMigrations(ctx context.Context, cfg Configurator, fromVM Ver // PreBlock performs begin block functionality for upgrade module. // It takes the current context as a parameter and returns a boolean value // indicating whether the migration was successfully executed or not. -func (m *Manager) PreBlock(ctx sdk.Context) (*sdk.ResponsePreBlock, error) { +func (m *Manager) PreBlock(ctx sdk.Context) error { ctx = ctx.WithEventManager(sdk.NewEventManager()) - paramsChanged := false for _, moduleName := range m.OrderPreBlockers { if module, ok := m.Modules[moduleName].(appmodule.HasPreBlocker); ok { - rsp, err := module.PreBlock(ctx) - if err != nil { - return nil, err - } - if rsp.IsConsensusParamsChanged() { - paramsChanged = true + if err := module.PreBlock(ctx); err != nil { + return err } } } - return &sdk.ResponsePreBlock{ - ConsensusParamsChanged: paramsChanged, - }, nil + return nil } // BeginBlock performs begin block functionality for all modules. It creates a diff --git a/types/module/module_test.go b/types/module/module_test.go index 373d9cca68ca..670b088d5366 100644 --- a/types/module/module_test.go +++ b/types/module/module_test.go @@ -418,24 +418,13 @@ func TestCoreAPIManager_PreBlock(t *testing.T) { require.Equal(t, 2, len(mm.Modules)) require.Equal(t, 1, len(mm.OrderPreBlockers)) - mockAppModule1.EXPECT().PreBlock(gomock.Any()).Times(1).Return(&sdk.ResponsePreBlock{ - ConsensusParamsChanged: true, - }, nil) - res, err := mm.PreBlock(sdk.Context{}) + mockAppModule1.EXPECT().PreBlock(gomock.Any()).Times(1).Return(nil) + err := mm.PreBlock(sdk.Context{}) require.NoError(t, err) - require.True(t, res.ConsensusParamsChanged) - - // test false - mockAppModule1.EXPECT().PreBlock(gomock.Any()).Times(1).Return(&sdk.ResponsePreBlock{ - ConsensusParamsChanged: false, - }, nil) - res, err = mm.PreBlock(sdk.Context{}) - require.NoError(t, err) - require.False(t, res.ConsensusParamsChanged) // test error - mockAppModule1.EXPECT().PreBlock(gomock.Any()).Times(1).Return(nil, errors.New("some error")) - _, err = mm.PreBlock(sdk.Context{}) + mockAppModule1.EXPECT().PreBlock(gomock.Any()).Times(1).Return(errors.New("some error")) + err = mm.PreBlock(sdk.Context{}) require.EqualError(t, err, "some error") } diff --git a/x/upgrade/CHANGELOG.md b/x/upgrade/CHANGELOG.md index 7ff56275c000..94422712d9f5 100644 --- a/x/upgrade/CHANGELOG.md +++ b/x/upgrade/CHANGELOG.md @@ -25,13 +25,17 @@ Ref: https://keepachangelog.com/en/1.0.0/ ## [Unreleased] +### Improvements + +* [#19672](https://github.com/cosmos/cosmos-sdk/pull/19672) Follow latest `cosmossdk.io/core` `PreBlock` simplification. + ### State Machine Breaking * (x/upgrade) [#16244](https://github.com/cosmos/cosmos-sdk/pull/16244) Upgrade module no longer stores the app version but gets and sets the app version stored in the `ParamStore` of baseapp. ### API Breaking Changes -* [#19443](https://github.com/cosmos/cosmos-sdk/pull/19443) Creation of upgrade module receives `appmodule.Environment` instead of individual services +* [#19443](https://github.com/cosmos/cosmos-sdk/pull/19443) `NewKeeper` takes an `appmodule.Environment` instead of individual services. ## [v0.1.1](https://github.com/cosmos/cosmos-sdk/releases/tag/x/upgrade/v0.1.1) - 2023-12-11 diff --git a/x/upgrade/keeper/abci.go b/x/upgrade/keeper/abci.go index cd867f9f654b..6ef39c8062b0 100644 --- a/x/upgrade/keeper/abci.go +++ b/x/upgrade/keeper/abci.go @@ -6,7 +6,6 @@ import ( "fmt" "time" - "cosmossdk.io/core/appmodule" storetypes "cosmossdk.io/store/types" "cosmossdk.io/x/upgrade/types" @@ -22,13 +21,13 @@ import ( // The purpose is to ensure the binary is switched EXACTLY at the desired block, and to allow // a migration to be executed if needed upon this switch (migration defined in the new binary) // skipUpgradeHeightArray is a set of block heights for which the upgrade must be skipped -func (k Keeper) PreBlocker(ctx context.Context) (appmodule.ResponsePreBlock, error) { +func (k Keeper) PreBlocker(ctx context.Context) error { defer telemetry.ModuleMeasureSince(types.ModuleName, time.Now(), telemetry.MetricKeyBeginBlocker) blockHeight := k.environment.HeaderService.GetHeaderInfo(ctx).Height plan, err := k.GetUpgradePlan(ctx) if err != nil && !errors.Is(err, types.ErrNoUpgradePlanFound) { - return nil, err + return err } found := err == nil @@ -43,7 +42,7 @@ func (k Keeper) PreBlocker(ctx context.Context) (appmodule.ResponsePreBlock, err if !found || !plan.ShouldExecute(blockHeight) || (plan.ShouldExecute(blockHeight) && k.IsSkipHeight(blockHeight)) { lastAppliedPlan, _, err := k.GetLastCompletedUpgrade(ctx) if err != nil { - return nil, err + return err } if lastAppliedPlan != "" && !k.HasHandler(lastAppliedPlan) { @@ -54,15 +53,13 @@ func (k Keeper) PreBlocker(ctx context.Context) (appmodule.ResponsePreBlock, err appVersion = cp.Version.App } - return nil, fmt.Errorf("wrong app version %d, upgrade handler is missing for %s upgrade plan", appVersion, lastAppliedPlan) + return fmt.Errorf("wrong app version %d, upgrade handler is missing for %s upgrade plan", appVersion, lastAppliedPlan) } } } if !found { - return &sdk.ResponsePreBlock{ - ConsensusParamsChanged: false, - }, nil + return nil } logger := k.Logger(ctx) @@ -76,11 +73,9 @@ func (k Keeper) PreBlocker(ctx context.Context) (appmodule.ResponsePreBlock, err // Clear the upgrade plan at current height if err := k.ClearUpgradePlan(ctx); err != nil { - return nil, err + return err } - return &sdk.ResponsePreBlock{ - ConsensusParamsChanged: false, - }, nil + return nil } // Prepare shutdown if we don't have an upgrade handler for this upgrade name (meaning this software is out of date) @@ -89,27 +84,23 @@ func (k Keeper) PreBlocker(ctx context.Context) (appmodule.ResponsePreBlock, err // store migrations. err := k.DumpUpgradeInfoToDisk(blockHeight, plan) if err != nil { - return nil, fmt.Errorf("unable to write upgrade info to filesystem: %w", err) + return fmt.Errorf("unable to write upgrade info to filesystem: %w", err) } upgradeMsg := BuildUpgradeNeededMsg(plan) logger.Error(upgradeMsg) // Returning an error will end up in a panic - return nil, errors.New(upgradeMsg) + return errors.New(upgradeMsg) } // We have an upgrade handler for this upgrade name, so apply the upgrade logger.Info(fmt.Sprintf("applying upgrade \"%s\" at %s", plan.Name, plan.DueAt())) sdkCtx = sdkCtx.WithBlockGasMeter(storetypes.NewInfiniteGasMeter()) if err := k.ApplyUpgrade(sdkCtx, plan); err != nil { - return nil, err + return err } - return &sdk.ResponsePreBlock{ - // the consensus parameters might be modified in the migration, - // refresh the consensus parameters in context. - ConsensusParamsChanged: true, - }, nil + return nil } // if we have a pending upgrade, but it is not yet time, make sure we did not @@ -119,11 +110,9 @@ func (k Keeper) PreBlocker(ctx context.Context) (appmodule.ResponsePreBlock, err logger.Error(downgradeMsg) // Returning an error will end up in a panic - return nil, errors.New(downgradeMsg) + return errors.New(downgradeMsg) } - return &sdk.ResponsePreBlock{ - ConsensusParamsChanged: false, - }, nil + return nil } // BuildUpgradeNeededMsg prints the message that notifies that an upgrade is needed. diff --git a/x/upgrade/keeper/abci_test.go b/x/upgrade/keeper/abci_test.go index 831d39cf1957..66c10f3cbd43 100644 --- a/x/upgrade/keeper/abci_test.go +++ b/x/upgrade/keeper/abci_test.go @@ -45,7 +45,7 @@ func (s *TestSuite) VerifyDoUpgrade(t *testing.T) { t.Log("Verify that a panic happens at the upgrade height") newCtx := s.ctx.WithHeaderInfo(header.Info{Height: s.ctx.HeaderInfo().Height + 1, Time: time.Now()}) - _, err := s.preModule.PreBlock(newCtx) + err := s.preModule.PreBlock(newCtx) require.ErrorContains(t, err, "UPGRADE \"test\" NEEDED at height: 11: ") t.Log("Verify that the upgrade can be successfully applied with a handler") @@ -53,7 +53,7 @@ func (s *TestSuite) VerifyDoUpgrade(t *testing.T) { return vm, nil }) - _, err = s.preModule.PreBlock(newCtx) + err = s.preModule.PreBlock(newCtx) require.NoError(t, err) s.VerifyCleared(t, newCtx) @@ -63,7 +63,7 @@ func (s *TestSuite) VerifyDoUpgradeWithCtx(t *testing.T, newCtx sdk.Context, pro t.Helper() t.Log("Verify that a panic happens at the upgrade height") - _, err := s.preModule.PreBlock(newCtx) + err := s.preModule.PreBlock(newCtx) require.ErrorContains(t, err, "UPGRADE \""+proposalName+"\" NEEDED at height: ") t.Log("Verify that the upgrade can be successfully applied with a handler") @@ -71,7 +71,7 @@ func (s *TestSuite) VerifyDoUpgradeWithCtx(t *testing.T, newCtx sdk.Context, pro return vm, nil }) - _, err = s.preModule.PreBlock(newCtx) + err = s.preModule.PreBlock(newCtx) require.NoError(t, err) s.VerifyCleared(t, newCtx) @@ -175,21 +175,21 @@ func TestHaltIfTooNew(t *testing.T) { }) newCtx := s.ctx.WithHeaderInfo(header.Info{Height: s.ctx.HeaderInfo().Height + 1, Time: time.Now()}) - _, err := s.preModule.PreBlock(newCtx) + err := s.preModule.PreBlock(newCtx) require.NoError(t, err) require.Equal(t, 0, called) t.Log("Verify we error if we have a registered handler ahead of time") err = s.keeper.ScheduleUpgrade(s.ctx, types.Plan{Name: "future", Height: s.ctx.HeaderInfo().Height + 3}) require.NoError(t, err) - _, err = s.preModule.PreBlock(newCtx) + err = s.preModule.PreBlock(newCtx) require.EqualError(t, err, "BINARY UPDATED BEFORE TRIGGER! UPGRADE \"future\" - in binary but not executed on chain. Downgrade your binary") require.Equal(t, 0, called) t.Log("Verify we no longer panic if the plan is on time") futCtx := s.ctx.WithHeaderInfo(header.Info{Height: s.ctx.HeaderInfo().Height + 3, Time: time.Now()}) - _, err = s.preModule.PreBlock(futCtx) + err = s.preModule.PreBlock(futCtx) require.NoError(t, err) require.Equal(t, 1, called) @@ -223,7 +223,7 @@ func TestCantApplySameUpgradeTwice(t *testing.T) { func TestNoSpuriousUpgrades(t *testing.T) { s := setupTest(t, 10, map[int64]bool{}) t.Log("Verify that no upgrade panic is triggered in the BeginBlocker when we haven't scheduled an upgrade") - _, err := s.preModule.PreBlock(s.ctx) + err := s.preModule.PreBlock(s.ctx) require.NoError(t, err) } @@ -260,7 +260,7 @@ func TestSkipUpgradeSkippingAll(t *testing.T) { s.VerifySet(t, map[int64]bool{skipOne: true, skipTwo: true}) newCtx = newCtx.WithHeaderInfo(header.Info{Height: skipOne}) - _, err = s.preModule.PreBlock(newCtx) + err = s.preModule.PreBlock(newCtx) require.NoError(t, err) t.Log("Verify a second proposal also is being cleared") @@ -268,7 +268,7 @@ func TestSkipUpgradeSkippingAll(t *testing.T) { require.NoError(t, err) newCtx = newCtx.WithHeaderInfo(header.Info{Height: skipTwo}) - _, err = s.preModule.PreBlock(newCtx) + err = s.preModule.PreBlock(newCtx) require.NoError(t, err) // To ensure verification is being done only after both upgrades are cleared @@ -295,7 +295,7 @@ func TestUpgradeSkippingOne(t *testing.T) { // Setting block height of proposal test newCtx = newCtx.WithHeaderInfo(header.Info{Height: skipOne}) - _, err = s.preModule.PreBlock(newCtx) + err = s.preModule.PreBlock(newCtx) require.NoError(t, err) t.Log("Verify the second proposal is not skipped") @@ -328,7 +328,7 @@ func TestUpgradeSkippingOnlyTwo(t *testing.T) { // Setting block height of proposal test newCtx = newCtx.WithHeaderInfo(header.Info{Height: skipOne}) - _, err = s.preModule.PreBlock(newCtx) + err = s.preModule.PreBlock(newCtx) require.NoError(t, err) // A new proposal with height in skipUpgradeHeights @@ -336,7 +336,7 @@ func TestUpgradeSkippingOnlyTwo(t *testing.T) { require.NoError(t, err) // Setting block height of proposal test2 newCtx = newCtx.WithHeaderInfo(header.Info{Height: skipTwo}) - _, err = s.preModule.PreBlock(newCtx) + err = s.preModule.PreBlock(newCtx) require.NoError(t, err) t.Log("Verify a new proposal is not skipped") @@ -357,7 +357,7 @@ func TestUpgradeWithoutSkip(t *testing.T) { err := s.keeper.ScheduleUpgrade(s.ctx, types.Plan{Name: "test", Height: s.ctx.HeaderInfo().Height + 1}) require.NoError(t, err) t.Log("Verify if upgrade happens without skip upgrade") - _, err = s.preModule.PreBlock(newCtx) + err = s.preModule.PreBlock(newCtx) require.ErrorContains(t, err, "UPGRADE \"test\" NEEDED at height:") s.VerifyDoUpgrade(t) @@ -447,7 +447,7 @@ func TestBinaryVersion(t *testing.T) { for _, tc := range testCases { ctx := tc.preRun() - _, err := s.preModule.PreBlock(ctx) + err := s.preModule.PreBlock(ctx) if tc.expectError { require.Error(t, err) } else { @@ -486,7 +486,7 @@ func TestDowngradeVerification(t *testing.T) { }) // successful upgrade. - _, err = m.PreBlock(ctx) + err = m.PreBlock(ctx) require.NoError(t, err) ctx = ctx.WithHeaderInfo(header.Info{Height: ctx.HeaderInfo().Height + 1}) @@ -536,7 +536,7 @@ func TestDowngradeVerification(t *testing.T) { tc.preRun(k, ctx, name) } - _, err = m.PreBlock(ctx) + err = m.PreBlock(ctx) if tc.expectError { require.Error(t, err, name) } else { diff --git a/x/upgrade/module.go b/x/upgrade/module.go index 7b0f1a53f32e..7b7dbc50ec4d 100644 --- a/x/upgrade/module.go +++ b/x/upgrade/module.go @@ -151,6 +151,6 @@ func (AppModule) ConsensusVersion() uint64 { return ConsensusVersion } // PreBlock calls the upgrade module hooks // // CONTRACT: this is called *before* all other modules' BeginBlock functions -func (am AppModule) PreBlock(ctx context.Context) (appmodule.ResponsePreBlock, error) { +func (am AppModule) PreBlock(ctx context.Context) error { return am.keeper.PreBlocker(ctx) } From d808ef82e5d7f2059fbf4995e1fe6a1aa79aabfc Mon Sep 17 00:00:00 2001 From: Julien Robert Date: Tue, 12 Mar 2024 09:44:20 +0100 Subject: [PATCH 12/30] refactor(x/gov): swap vote alias (#19718) --- api/cosmos/gov/v1/gov.pulsar.go | 62 ++++++++++++------------- x/gov/client/utils/utils_test.go | 14 +++--- x/gov/keeper/msg_server_test.go | 10 ++-- x/gov/proto/cosmos/gov/v1/gov.proto | 16 +++---- x/gov/types/v1/gov.pb.go | 72 ++++++++++++++--------------- x/gov/types/v1/vote_test.go | 61 ++++++++++++++++++++++++ 6 files changed, 148 insertions(+), 87 deletions(-) create mode 100644 x/gov/types/v1/vote_test.go diff --git a/api/cosmos/gov/v1/gov.pulsar.go b/api/cosmos/gov/v1/gov.pulsar.go index 3a1022a415f2..9efdf3c56d3f 100644 --- a/api/cosmos/gov/v1/gov.pulsar.go +++ b/api/cosmos/gov/v1/gov.pulsar.go @@ -9119,22 +9119,22 @@ type VoteOption int32 const ( // VOTE_OPTION_UNSPECIFIED defines a no-op vote option. VoteOption_VOTE_OPTION_UNSPECIFIED VoteOption = 0 - // VOTE_OPTION_ONE defines the first proposal vote option. - VoteOption_VOTE_OPTION_ONE VoteOption = 1 // VOTE_OPTION_YES defines the yes proposal vote option. VoteOption_VOTE_OPTION_YES VoteOption = 1 - // VOTE_OPTION_TWO defines the second proposal vote option. - VoteOption_VOTE_OPTION_TWO VoteOption = 2 + // VOTE_OPTION_ONE defines the first proposal vote option. + VoteOption_VOTE_OPTION_ONE VoteOption = 1 // VOTE_OPTION_ABSTAIN defines the abstain proposal vote option. VoteOption_VOTE_OPTION_ABSTAIN VoteOption = 2 - // VOTE_OPTION_THREE defines the third proposal vote option. - VoteOption_VOTE_OPTION_THREE VoteOption = 3 + // VOTE_OPTION_TWO defines the second proposal vote option. + VoteOption_VOTE_OPTION_TWO VoteOption = 2 // VOTE_OPTION_NO defines the no proposal vote option. VoteOption_VOTE_OPTION_NO VoteOption = 3 - // VOTE_OPTION_FOUR defines the fourth proposal vote option. - VoteOption_VOTE_OPTION_FOUR VoteOption = 4 + // VOTE_OPTION_THREE defines the third proposal vote option. + VoteOption_VOTE_OPTION_THREE VoteOption = 3 // VOTE_OPTION_NO_WITH_VETO defines the no with veto proposal vote option. VoteOption_VOTE_OPTION_NO_WITH_VETO VoteOption = 4 + // VOTE_OPTION_FOUR defines the fourth proposal vote option. + VoteOption_VOTE_OPTION_FOUR VoteOption = 4 // VOTE_OPTION_SPAM defines the spam proposal vote option. VoteOption_VOTE_OPTION_SPAM VoteOption = 5 ) @@ -9143,26 +9143,26 @@ const ( var ( VoteOption_name = map[int32]string{ 0: "VOTE_OPTION_UNSPECIFIED", - 1: "VOTE_OPTION_ONE", - // Duplicate value: 1: "VOTE_OPTION_YES", - 2: "VOTE_OPTION_TWO", - // Duplicate value: 2: "VOTE_OPTION_ABSTAIN", - 3: "VOTE_OPTION_THREE", - // Duplicate value: 3: "VOTE_OPTION_NO", - 4: "VOTE_OPTION_FOUR", - // Duplicate value: 4: "VOTE_OPTION_NO_WITH_VETO", + 1: "VOTE_OPTION_YES", + // Duplicate value: 1: "VOTE_OPTION_ONE", + 2: "VOTE_OPTION_ABSTAIN", + // Duplicate value: 2: "VOTE_OPTION_TWO", + 3: "VOTE_OPTION_NO", + // Duplicate value: 3: "VOTE_OPTION_THREE", + 4: "VOTE_OPTION_NO_WITH_VETO", + // Duplicate value: 4: "VOTE_OPTION_FOUR", 5: "VOTE_OPTION_SPAM", } VoteOption_value = map[string]int32{ "VOTE_OPTION_UNSPECIFIED": 0, - "VOTE_OPTION_ONE": 1, "VOTE_OPTION_YES": 1, - "VOTE_OPTION_TWO": 2, + "VOTE_OPTION_ONE": 1, "VOTE_OPTION_ABSTAIN": 2, - "VOTE_OPTION_THREE": 3, + "VOTE_OPTION_TWO": 2, "VOTE_OPTION_NO": 3, - "VOTE_OPTION_FOUR": 4, + "VOTE_OPTION_THREE": 3, "VOTE_OPTION_NO_WITH_VETO": 4, + "VOTE_OPTION_FOUR": 4, "VOTE_OPTION_SPAM": 5, } ) @@ -10583,17 +10583,17 @@ var file_cosmos_gov_v1_gov_proto_rawDesc = []byte{ 0x01, 0x0a, 0x0a, 0x56, 0x6f, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x17, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x56, 0x4f, - 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4f, 0x4e, 0x45, 0x10, 0x01, 0x12, - 0x13, 0x0a, 0x0f, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x59, - 0x45, 0x53, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, - 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x57, 0x4f, 0x10, 0x02, 0x12, 0x17, 0x0a, 0x13, 0x56, 0x4f, 0x54, - 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x41, 0x42, 0x53, 0x54, 0x41, 0x49, 0x4e, - 0x10, 0x02, 0x12, 0x15, 0x0a, 0x11, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, - 0x4e, 0x5f, 0x54, 0x48, 0x52, 0x45, 0x45, 0x10, 0x03, 0x12, 0x12, 0x0a, 0x0e, 0x56, 0x4f, 0x54, - 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x10, 0x03, 0x12, 0x14, 0x0a, - 0x10, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x46, 0x4f, 0x55, - 0x52, 0x10, 0x04, 0x12, 0x1c, 0x0a, 0x18, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, - 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x5f, 0x56, 0x45, 0x54, 0x4f, 0x10, + 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x59, 0x45, 0x53, 0x10, 0x01, 0x12, + 0x13, 0x0a, 0x0f, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4f, + 0x4e, 0x45, 0x10, 0x01, 0x12, 0x17, 0x0a, 0x13, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, + 0x49, 0x4f, 0x4e, 0x5f, 0x41, 0x42, 0x53, 0x54, 0x41, 0x49, 0x4e, 0x10, 0x02, 0x12, 0x13, 0x0a, + 0x0f, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x57, 0x4f, + 0x10, 0x02, 0x12, 0x12, 0x0a, 0x0e, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, + 0x4e, 0x5f, 0x4e, 0x4f, 0x10, 0x03, 0x12, 0x15, 0x0a, 0x11, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, + 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x48, 0x52, 0x45, 0x45, 0x10, 0x03, 0x12, 0x1c, 0x0a, + 0x18, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x5f, + 0x57, 0x49, 0x54, 0x48, 0x5f, 0x56, 0x45, 0x54, 0x4f, 0x10, 0x04, 0x12, 0x14, 0x0a, 0x10, 0x56, + 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x46, 0x4f, 0x55, 0x52, 0x10, 0x04, 0x12, 0x14, 0x0a, 0x10, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x50, 0x41, 0x4d, 0x10, 0x05, 0x1a, 0x02, 0x10, 0x01, 0x2a, 0xce, 0x01, 0x0a, 0x0e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1f, diff --git a/x/gov/client/utils/utils_test.go b/x/gov/client/utils/utils_test.go index 135d64c2b79e..1ff88f1f16dc 100644 --- a/x/gov/client/utils/utils_test.go +++ b/x/gov/client/utils/utils_test.go @@ -15,31 +15,31 @@ func TestNormalizeWeightedVoteOptions(t *testing.T) { }{ "simple Yes": { options: "Yes", - normalized: "VOTE_OPTION_ONE=1", + normalized: "VOTE_OPTION_YES=1", }, "simple yes": { options: "yes", - normalized: "VOTE_OPTION_ONE=1", + normalized: "VOTE_OPTION_YES=1", }, "formal yes": { options: "yes=1", - normalized: "VOTE_OPTION_ONE=1", + normalized: "VOTE_OPTION_YES=1", }, "half yes half no": { options: "yes=0.5,no=0.5", - normalized: "VOTE_OPTION_ONE=0.5,VOTE_OPTION_THREE=0.5", + normalized: "VOTE_OPTION_YES=0.5,VOTE_OPTION_NO=0.5", }, "3 options": { options: "Yes=0.5,No=0.4,NoWithVeto=0.1", - normalized: "VOTE_OPTION_ONE=0.5,VOTE_OPTION_THREE=0.4,VOTE_OPTION_FOUR=0.1", + normalized: "VOTE_OPTION_YES=0.5,VOTE_OPTION_NO=0.4,VOTE_OPTION_NO_WITH_VETO=0.1", }, "zero weight option": { options: "Yes=0.5,No=0.5,NoWithVeto=0", - normalized: "VOTE_OPTION_ONE=0.5,VOTE_OPTION_THREE=0.5,VOTE_OPTION_FOUR=0", + normalized: "VOTE_OPTION_YES=0.5,VOTE_OPTION_NO=0.5,VOTE_OPTION_NO_WITH_VETO=0", }, "minus weight option": { options: "Yes=0.5,No=0.6,NoWithVeto=-0.1", - normalized: "VOTE_OPTION_ONE=0.5,VOTE_OPTION_THREE=0.6,VOTE_OPTION_FOUR=-0.1", + normalized: "VOTE_OPTION_YES=0.5,VOTE_OPTION_NO=0.6,VOTE_OPTION_NO_WITH_VETO=-0.1", }, "empty options": { options: "", diff --git a/x/gov/keeper/msg_server_test.go b/x/gov/keeper/msg_server_test.go index 3f0632d06fc0..5425c3fd215b 100644 --- a/x/gov/keeper/msg_server_test.go +++ b/x/gov/keeper/msg_server_test.go @@ -726,7 +726,7 @@ func (suite *KeeperTestSuite) TestMsgVoteWeighted() { voter: proposer, metadata: "", expErr: true, - expErrMsg: `option:VOTE_OPTION_ONE weight:"0.000000000000000000" : invalid vote option`, + expErrMsg: `option:VOTE_OPTION_YES weight:"0.000000000000000000" : invalid vote option`, }, "negative weight": { preRun: func() uint64 { @@ -738,7 +738,7 @@ func (suite *KeeperTestSuite) TestMsgVoteWeighted() { voter: proposer, metadata: "", expErr: true, - expErrMsg: `option:VOTE_OPTION_ONE weight:"-1.000000000000000000" : invalid vote option`, + expErrMsg: `option:VOTE_OPTION_YES weight:"-1.000000000000000000" : invalid vote option`, }, "individual weight > 1 but weights sum == 1": { preRun: func() uint64 { @@ -751,7 +751,7 @@ func (suite *KeeperTestSuite) TestMsgVoteWeighted() { voter: proposer, metadata: "", expErr: true, - expErrMsg: `option:VOTE_OPTION_ONE weight:"2.000000000000000000" : invalid vote option`, + expErrMsg: `option:VOTE_OPTION_YES weight:"2.000000000000000000" : invalid vote option`, }, "empty options": { preRun: func() uint64 { @@ -1368,7 +1368,7 @@ func (suite *KeeperTestSuite) TestLegacyVoteWeighted() { voter: proposer, metadata: "", expErr: true, - expErrMsg: `option:VOTE_OPTION_ONE weight:"0.000000000000000000" : invalid vote option`, + expErrMsg: `option:VOTE_OPTION_YES weight:"0.000000000000000000" : invalid vote option`, }, "negative weight": { preRun: func() uint64 { @@ -1383,7 +1383,7 @@ func (suite *KeeperTestSuite) TestLegacyVoteWeighted() { voter: proposer, metadata: "", expErr: true, - expErrMsg: `option:VOTE_OPTION_ONE weight:"-1.000000000000000000" : invalid vote option`, + expErrMsg: `option:VOTE_OPTION_YES weight:"-1.000000000000000000" : invalid vote option`, }, "empty options": { preRun: func() uint64 { diff --git a/x/gov/proto/cosmos/gov/v1/gov.proto b/x/gov/proto/cosmos/gov/v1/gov.proto index 3d9ff64f9269..3ce0608c69ad 100644 --- a/x/gov/proto/cosmos/gov/v1/gov.proto +++ b/x/gov/proto/cosmos/gov/v1/gov.proto @@ -33,22 +33,22 @@ enum VoteOption { // VOTE_OPTION_UNSPECIFIED defines a no-op vote option. VOTE_OPTION_UNSPECIFIED = 0; - // VOTE_OPTION_ONE defines the first proposal vote option. - VOTE_OPTION_ONE = 1; // VOTE_OPTION_YES defines the yes proposal vote option. VOTE_OPTION_YES = 1; - // VOTE_OPTION_TWO defines the second proposal vote option. - VOTE_OPTION_TWO = 2; + // VOTE_OPTION_ONE defines the first proposal vote option. + VOTE_OPTION_ONE = 1; // VOTE_OPTION_ABSTAIN defines the abstain proposal vote option. VOTE_OPTION_ABSTAIN = 2; - // VOTE_OPTION_THREE defines the third proposal vote option. - VOTE_OPTION_THREE = 3; + // VOTE_OPTION_TWO defines the second proposal vote option. + VOTE_OPTION_TWO = 2; // VOTE_OPTION_NO defines the no proposal vote option. VOTE_OPTION_NO = 3; - // VOTE_OPTION_FOUR defines the fourth proposal vote option. - VOTE_OPTION_FOUR = 4; + // VOTE_OPTION_THREE defines the third proposal vote option. + VOTE_OPTION_THREE = 3; // VOTE_OPTION_NO_WITH_VETO defines the no with veto proposal vote option. VOTE_OPTION_NO_WITH_VETO = 4; + // VOTE_OPTION_FOUR defines the fourth proposal vote option. + VOTE_OPTION_FOUR = 4; // VOTE_OPTION_SPAM defines the spam proposal vote option. VOTE_OPTION_SPAM = 5; } diff --git a/x/gov/types/v1/gov.pb.go b/x/gov/types/v1/gov.pb.go index b9ee0a367ea7..9dfd99de9af0 100644 --- a/x/gov/types/v1/gov.pb.go +++ b/x/gov/types/v1/gov.pb.go @@ -79,49 +79,49 @@ type VoteOption int32 const ( // VOTE_OPTION_UNSPECIFIED defines a no-op vote option. VoteOption_VOTE_OPTION_UNSPECIFIED VoteOption = 0 - // VOTE_OPTION_ONE defines the first proposal vote option. - VoteOption_VOTE_OPTION_ONE VoteOption = 1 // VOTE_OPTION_YES defines the yes proposal vote option. VoteOption_VOTE_OPTION_YES VoteOption = 1 - // VOTE_OPTION_TWO defines the second proposal vote option. - VoteOption_VOTE_OPTION_TWO VoteOption = 2 + // VOTE_OPTION_ONE defines the first proposal vote option. + VoteOption_VOTE_OPTION_ONE VoteOption = 1 // VOTE_OPTION_ABSTAIN defines the abstain proposal vote option. VoteOption_VOTE_OPTION_ABSTAIN VoteOption = 2 - // VOTE_OPTION_THREE defines the third proposal vote option. - VoteOption_VOTE_OPTION_THREE VoteOption = 3 + // VOTE_OPTION_TWO defines the second proposal vote option. + VoteOption_VOTE_OPTION_TWO VoteOption = 2 // VOTE_OPTION_NO defines the no proposal vote option. VoteOption_VOTE_OPTION_NO VoteOption = 3 - // VOTE_OPTION_FOUR defines the fourth proposal vote option. - VoteOption_VOTE_OPTION_FOUR VoteOption = 4 + // VOTE_OPTION_THREE defines the third proposal vote option. + VoteOption_VOTE_OPTION_THREE VoteOption = 3 // VOTE_OPTION_NO_WITH_VETO defines the no with veto proposal vote option. VoteOption_VOTE_OPTION_NO_WITH_VETO VoteOption = 4 + // VOTE_OPTION_FOUR defines the fourth proposal vote option. + VoteOption_VOTE_OPTION_FOUR VoteOption = 4 // VOTE_OPTION_SPAM defines the spam proposal vote option. VoteOption_VOTE_OPTION_SPAM VoteOption = 5 ) var VoteOption_name = map[int32]string{ 0: "VOTE_OPTION_UNSPECIFIED", - 1: "VOTE_OPTION_ONE", - // Duplicate value: 1: "VOTE_OPTION_YES", - 2: "VOTE_OPTION_TWO", - // Duplicate value: 2: "VOTE_OPTION_ABSTAIN", - 3: "VOTE_OPTION_THREE", - // Duplicate value: 3: "VOTE_OPTION_NO", - 4: "VOTE_OPTION_FOUR", - // Duplicate value: 4: "VOTE_OPTION_NO_WITH_VETO", + 1: "VOTE_OPTION_YES", + // Duplicate value: 1: "VOTE_OPTION_ONE", + 2: "VOTE_OPTION_ABSTAIN", + // Duplicate value: 2: "VOTE_OPTION_TWO", + 3: "VOTE_OPTION_NO", + // Duplicate value: 3: "VOTE_OPTION_THREE", + 4: "VOTE_OPTION_NO_WITH_VETO", + // Duplicate value: 4: "VOTE_OPTION_FOUR", 5: "VOTE_OPTION_SPAM", } var VoteOption_value = map[string]int32{ "VOTE_OPTION_UNSPECIFIED": 0, - "VOTE_OPTION_ONE": 1, "VOTE_OPTION_YES": 1, - "VOTE_OPTION_TWO": 2, + "VOTE_OPTION_ONE": 1, "VOTE_OPTION_ABSTAIN": 2, - "VOTE_OPTION_THREE": 3, + "VOTE_OPTION_TWO": 2, "VOTE_OPTION_NO": 3, - "VOTE_OPTION_FOUR": 4, + "VOTE_OPTION_THREE": 3, "VOTE_OPTION_NO_WITH_VETO": 4, + "VOTE_OPTION_FOUR": 4, "VOTE_OPTION_SPAM": 5, } @@ -1322,7 +1322,7 @@ func init() { func init() { proto.RegisterFile("cosmos/gov/v1/gov.proto", fileDescriptor_e05cb1c0d030febb) } var fileDescriptor_e05cb1c0d030febb = []byte{ - // 1856 bytes of a gzipped FileDescriptorProto + // 1854 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x58, 0xcd, 0x73, 0xe3, 0x48, 0x15, 0x1f, 0xd9, 0x8e, 0x63, 0xbf, 0x38, 0x8e, 0xa6, 0x93, 0xd9, 0x28, 0xc9, 0xe6, 0x63, 0xcc, 0xd6, 0x56, 0x6a, 0xd8, 0xd8, 0x64, 0x61, 0x28, 0x6a, 0x59, 0x0a, 0xec, 0x58, 0x43, 0x34, 0x24, @@ -1424,21 +1424,21 @@ var fileDescriptor_e05cb1c0d030febb = []byte{ 0xed, 0x3d, 0xdd, 0xde, 0xd9, 0x6d, 0x19, 0x3b, 0xba, 0x9a, 0x41, 0xef, 0x82, 0x36, 0x0a, 0x69, 0xb5, 0x2d, 0x63, 0xdf, 0xe8, 0x58, 0xc6, 0x8e, 0x9a, 0x45, 0x2b, 0xb0, 0x38, 0xaa, 0xd5, 0x9f, 0xb7, 0xf5, 0xa6, 0x61, 0xe9, 0x4d, 0x35, 0xf7, 0xe8, 0xbf, 0x0a, 0x40, 0xea, 0x73, 0xc5, 0x0a, - 0x2c, 0x1e, 0xb6, 0x2c, 0x61, 0xa0, 0x75, 0x30, 0xe6, 0xe5, 0x3c, 0xcc, 0xa5, 0x95, 0xad, 0x03, - 0x5d, 0x55, 0xc6, 0x85, 0x2f, 0xf4, 0xce, 0x55, 0xa1, 0x75, 0xd4, 0x52, 0x33, 0x68, 0x11, 0xe6, - 0xd3, 0xc2, 0x7a, 0xa3, 0x63, 0xd5, 0x8d, 0x03, 0x35, 0x83, 0x1e, 0xc0, 0xfd, 0x11, 0xf4, 0xae, - 0xa9, 0xeb, 0x6a, 0x16, 0x21, 0x28, 0xa7, 0xc5, 0x07, 0x2d, 0x35, 0x8b, 0x16, 0x40, 0x4d, 0xcb, - 0x9e, 0xb4, 0x9e, 0x99, 0x6a, 0x8e, 0xed, 0x7f, 0x14, 0x69, 0x1f, 0x19, 0xd6, 0xae, 0x7d, 0xa8, - 0x5b, 0x2d, 0x35, 0x37, 0xce, 0xe9, 0xb4, 0xeb, 0xfb, 0xea, 0xd4, 0x72, 0x46, 0x55, 0x1e, 0xfd, - 0x5d, 0x81, 0xf2, 0xe8, 0x37, 0x03, 0xb4, 0x0e, 0x2b, 0xc3, 0x60, 0x75, 0xac, 0xba, 0xf5, 0xac, - 0x33, 0x16, 0x84, 0x0a, 0xac, 0x8d, 0x03, 0x9a, 0x7a, 0xbb, 0xd5, 0x31, 0x2c, 0xbb, 0xad, 0x9b, - 0x46, 0x6b, 0x3c, 0x65, 0x12, 0x73, 0xd8, 0xb2, 0x8c, 0x83, 0x1f, 0xc7, 0x90, 0xcc, 0x48, 0xc6, - 0x25, 0xa4, 0x5d, 0xef, 0x74, 0xf4, 0xa6, 0x9a, 0x1d, 0x49, 0xa7, 0xd4, 0x99, 0xfa, 0x53, 0x7d, - 0x87, 0x67, 0x6c, 0x12, 0xf3, 0x49, 0xdd, 0xd8, 0xd3, 0x9b, 0xea, 0x54, 0xe3, 0xf1, 0x67, 0xaf, - 0xd7, 0x94, 0xcf, 0x5f, 0xaf, 0x29, 0xff, 0x7e, 0xbd, 0xa6, 0x7c, 0xf2, 0x66, 0xed, 0xde, 0xe7, - 0x6f, 0xd6, 0xee, 0xfd, 0xe3, 0xcd, 0xda, 0xbd, 0x9f, 0xad, 0x88, 0x62, 0x8d, 0xdc, 0x5f, 0x56, - 0x3d, 0x52, 0xbb, 0xe4, 0x5f, 0xe3, 0xd8, 0xcf, 0xd0, 0xa8, 0x76, 0xbe, 0x7d, 0x9c, 0xe7, 0x1d, - 0xf9, 0xed, 0xff, 0x07, 0x00, 0x00, 0xff, 0xff, 0xdf, 0x3d, 0xf3, 0x07, 0xab, 0x13, 0x00, 0x00, + 0x2c, 0x1e, 0xb6, 0x2c, 0x61, 0xa0, 0x75, 0x30, 0xe6, 0xe5, 0x3c, 0xcc, 0xa5, 0x95, 0x2f, 0xf4, + 0x8e, 0xaa, 0x8c, 0x0b, 0x5b, 0x07, 0xba, 0xaa, 0xa0, 0x45, 0x98, 0x4f, 0x0b, 0xeb, 0x8d, 0x8e, + 0x55, 0x37, 0x0e, 0xd4, 0xcc, 0x38, 0xda, 0x3a, 0x6a, 0xa9, 0x19, 0x84, 0xa0, 0x9c, 0x16, 0x1e, + 0xb4, 0xd4, 0x2c, 0x7a, 0x00, 0xf7, 0x47, 0x80, 0xbb, 0xa6, 0xae, 0xab, 0x59, 0xb6, 0xd3, 0x51, + 0xa8, 0x7d, 0x64, 0x58, 0xbb, 0xf6, 0xa1, 0x6e, 0xb5, 0xd4, 0x1c, 0x5a, 0x00, 0x35, 0xad, 0x7d, + 0xd2, 0x7a, 0x66, 0x5e, 0x95, 0x76, 0xda, 0xf5, 0x7d, 0x75, 0x6a, 0x39, 0xa3, 0x2a, 0x8f, 0xfe, + 0xae, 0x40, 0x79, 0xf4, 0x9b, 0x01, 0x5a, 0x87, 0x95, 0x61, 0xb0, 0x3a, 0x56, 0xdd, 0x7a, 0xd6, + 0x19, 0x0b, 0x42, 0x05, 0xd6, 0xc6, 0x01, 0x4d, 0xbd, 0xdd, 0xea, 0x18, 0x96, 0xdd, 0xd6, 0x4d, + 0xa3, 0x35, 0x9e, 0x32, 0x89, 0x39, 0x6c, 0x59, 0xc6, 0xc1, 0x8f, 0x63, 0x48, 0x66, 0x24, 0xe3, + 0x12, 0xd2, 0xae, 0x77, 0x3a, 0x7a, 0x53, 0x6c, 0x72, 0x5c, 0x67, 0xea, 0x4f, 0xf5, 0x1d, 0x9e, + 0xb1, 0x49, 0xcc, 0x27, 0x75, 0x63, 0x4f, 0x6f, 0xaa, 0x53, 0x8d, 0xc7, 0x9f, 0xbd, 0x5e, 0x53, + 0x3e, 0x7f, 0xbd, 0xa6, 0xfc, 0xfb, 0xf5, 0x9a, 0xf2, 0xc9, 0x9b, 0xb5, 0x7b, 0x9f, 0xbf, 0x59, + 0xbb, 0xf7, 0x8f, 0x37, 0x6b, 0xf7, 0x7e, 0xb6, 0x22, 0x8a, 0x35, 0x72, 0x7f, 0x59, 0xf5, 0x48, + 0xed, 0x92, 0x7f, 0x8d, 0x63, 0x3f, 0x43, 0xa3, 0xda, 0xf9, 0xf6, 0x71, 0x9e, 0x77, 0xe4, 0xb7, + 0xff, 0x1f, 0x00, 0x00, 0xff, 0xff, 0xdf, 0x80, 0xb6, 0x5a, 0xab, 0x13, 0x00, 0x00, } func (m *WeightedVoteOption) Marshal() (dAtA []byte, err error) { diff --git a/x/gov/types/v1/vote_test.go b/x/gov/types/v1/vote_test.go new file mode 100644 index 000000000000..c2d17e496b0e --- /dev/null +++ b/x/gov/types/v1/vote_test.go @@ -0,0 +1,61 @@ +package v1_test + +import ( + "testing" + + "github.com/stretchr/testify/require" + + v1 "cosmossdk.io/x/gov/types/v1" + + codectestutil "github.com/cosmos/cosmos-sdk/codec/testutil" + moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" +) + +func TestVoteAlias(t *testing.T) { + cdc := moduletestutil.MakeTestEncodingConfig(codectestutil.CodecOptions{}).Codec + + testCases := []struct { + name string + input string + expected v1.MsgVote + expectedErrMsg string + }{ + { + name: "valid vote", + input: `{"proposal_id":"1","voter":"cosmos1qperwt9wrnkg5k9e5gzfgjppzpqhyav5j24d66","option":"VOTE_OPTION_YES","metadata":"test"}`, + expected: v1.MsgVote{ + ProposalId: 1, + Voter: "cosmos1qperwt9wrnkg5k9e5gzfgjppzpqhyav5j24d66", + Option: v1.VoteOption_VOTE_OPTION_YES, + Metadata: "test", + }, + }, + { + name: "valid vote alias", + input: `{"proposal_id":"1","voter":"cosmos1qperwt9wrnkg5k9e5gzfgjppzpqhyav5j24d66","option":"VOTE_OPTION_ONE","metadata":"test"}`, + expected: v1.MsgVote{ + ProposalId: 1, + Voter: "cosmos1qperwt9wrnkg5k9e5gzfgjppzpqhyav5j24d66", + Option: v1.VoteOption_VOTE_OPTION_ONE, + Metadata: "test", + }, + }, + { + name: "invalid vote", + input: `{"proposal_id":"1","voter":"cosmos1qperwt9wrnkg5k9e5gzfgjppzpqhyav5j24d66","option":"VOTE_OPTION_HELLO","metadata":"test"}`, + expectedErrMsg: "unknown value \"VOTE_OPTION_HELLO\" for enum cosmos.gov.v1.VoteOption", + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + vote := &v1.MsgVote{} + err := cdc.UnmarshalJSON([]byte(tc.input), vote) + if tc.expectedErrMsg != "" { + require.ErrorContains(t, err, tc.expectedErrMsg) + } else { + require.NoError(t, err) + } + }) + } +} From d961aef76b637053b228dd4f0a41fb2279aa31e9 Mon Sep 17 00:00:00 2001 From: David Tumcharoen Date: Tue, 12 Mar 2024 16:28:20 +0700 Subject: [PATCH 13/30] fix(x/gov): grpc query tally for failed proposal (#19725) --- CHANGELOG.md | 1 + x/gov/keeper/grpc_query.go | 2 +- x/gov/keeper/grpc_query_test.go | 75 +++++++++++++++++++++++++++++++++ 3 files changed, 77 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7c08fd6566c3..451611a93617 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -85,6 +85,7 @@ Every module contains its own CHANGELOG.md. Please refer to the module you are i ### Bug Fixes +* (x/gov) [#19725](https://github.com/cosmos/cosmos-sdk/pull/19725) Fetch a failed proposal tally from proposal.FinalTallyResult in the gprc query. * (baseapp) [#18727](https://github.com/cosmos/cosmos-sdk/pull/18727) Ensure that `BaseApp.Init` firstly returns any errors from a nil commit multistore instead of panicking on nil dereferencing and before sealing the app. * (client) [#18622](https://github.com/cosmos/cosmos-sdk/pull/18622) Fixed a potential under/overflow from `uint64->int64` when computing gas fees as a LegacyDec. * (client/keys) [#18562](https://github.com/cosmos/cosmos-sdk/pull/18562) `keys delete` won't terminate when a key is not found. diff --git a/x/gov/keeper/grpc_query.go b/x/gov/keeper/grpc_query.go index e163d9a373ef..c863e84ee37e 100644 --- a/x/gov/keeper/grpc_query.go +++ b/x/gov/keeper/grpc_query.go @@ -319,7 +319,7 @@ func (q queryServer) TallyResult(ctx context.Context, req *v1.QueryTallyResultRe case proposal.Status == v1.StatusDepositPeriod: tallyResult = v1.EmptyTallyResult() - case proposal.Status == v1.StatusPassed || proposal.Status == v1.StatusRejected: + case proposal.Status == v1.StatusPassed || proposal.Status == v1.StatusRejected || proposal.Status == v1.StatusFailed: tallyResult = *proposal.FinalTallyResult default: diff --git a/x/gov/keeper/grpc_query_test.go b/x/gov/keeper/grpc_query_test.go index f0fac0d4df6a..28ceb6236d9e 100644 --- a/x/gov/keeper/grpc_query_test.go +++ b/x/gov/keeper/grpc_query_test.go @@ -1640,6 +1640,48 @@ func (suite *KeeperTestSuite) TestGRPCQueryTallyResult() { }, true, }, + { + "proposal status failed", + func() { + propTime := time.Now() + proposal := v1.Proposal{ + Id: 1, + Status: v1.StatusFailed, + FinalTallyResult: &v1.TallyResult{ + YesCount: "4", + AbstainCount: "1", + NoCount: "0", + NoWithVetoCount: "0", + OptionOneCount: "4", + OptionTwoCount: "1", + OptionThreeCount: "0", + OptionFourCount: "0", + SpamCount: "0", + }, + SubmitTime: &propTime, + VotingStartTime: &propTime, + VotingEndTime: &propTime, + Metadata: "proposal metadata", + } + err := suite.govKeeper.Proposals.Set(suite.ctx, proposal.Id, proposal) + suite.Require().NoError(err) + + req = &v1.QueryTallyResultRequest{ProposalId: proposal.Id} + + expTally = &v1.TallyResult{ + YesCount: "4", + AbstainCount: "1", + NoCount: "0", + NoWithVetoCount: "0", + OptionOneCount: "4", + OptionTwoCount: "1", + OptionThreeCount: "0", + OptionFourCount: "0", + SpamCount: "0", + } + }, + true, + }, } for _, tc := range testCases { @@ -1781,6 +1823,39 @@ func (suite *KeeperTestSuite) TestLegacyGRPCQueryTallyResult() { }, true, }, + { + "proposal status failed", + func() { + propTime := time.Now() + proposal := v1.Proposal{ + Id: 1, + Status: v1.StatusFailed, + FinalTallyResult: &v1.TallyResult{ + YesCount: "4", + AbstainCount: "1", + NoCount: "0", + NoWithVetoCount: "0", + SpamCount: "0", + }, + SubmitTime: &propTime, + VotingStartTime: &propTime, + VotingEndTime: &propTime, + Metadata: "proposal metadata", + } + err := suite.govKeeper.Proposals.Set(suite.ctx, proposal.Id, proposal) + suite.Require().NoError(err) + + req = &v1beta1.QueryTallyResultRequest{ProposalId: proposal.Id} + + expTally = &v1beta1.TallyResult{ + Yes: math.NewInt(4), + Abstain: math.NewInt(1), + No: math.NewInt(0), + NoWithVeto: math.NewInt(0), + } + }, + true, + }, } for _, tc := range testCases { From a569ba6d29d40774013d6f0b1b69bf7743e879ee Mon Sep 17 00:00:00 2001 From: Julien Robert Date: Tue, 12 Mar 2024 20:57:10 +0100 Subject: [PATCH 14/30] chore: add v0.47.10 and v0.50.5 changelogs (#19717) --- CHANGELOG.md | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 451611a93617..a073a86882cd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -85,7 +85,6 @@ Every module contains its own CHANGELOG.md. Please refer to the module you are i ### Bug Fixes -* (x/gov) [#19725](https://github.com/cosmos/cosmos-sdk/pull/19725) Fetch a failed proposal tally from proposal.FinalTallyResult in the gprc query. * (baseapp) [#18727](https://github.com/cosmos/cosmos-sdk/pull/18727) Ensure that `BaseApp.Init` firstly returns any errors from a nil commit multistore instead of panicking on nil dereferencing and before sealing the app. * (client) [#18622](https://github.com/cosmos/cosmos-sdk/pull/18622) Fixed a potential under/overflow from `uint64->int64` when computing gas fees as a LegacyDec. * (client/keys) [#18562](https://github.com/cosmos/cosmos-sdk/pull/18562) `keys delete` won't terminate when a key is not found. @@ -160,6 +159,25 @@ Every module contains its own CHANGELOG.md. Please refer to the module you are i * (simapp) [#19146](https://github.com/cosmos/cosmos-sdk/pull/19146) Replace `--v` CLI option with `--validator-count`/`-n`. * (module) [#19370](https://github.com/cosmos/cosmos-sdk/pull/19370) Deprecate `module.Configurator`, use `appmodule.HasMigrations` and `appmodule.HasServices` instead from Core API. +## [v0.50.5](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.50.5) - 2024-03-12 + +### Features + +* (baseapp) [#19626](https://github.com/cosmos/cosmos-sdk/pull/19626) Add `DisableBlockGasMeter` option to `BaseApp`, which removes the block gas meter during transaction execution. + +### Improvements + +* (x/distribution) [#19707](https://github.com/cosmos/cosmos-sdk/pull/19707) Add autocli config for `DelegationTotalRewards` for CLI consistency with `q rewards` commands in previous versions. +* (x/auth) [#19651](https://github.com/cosmos/cosmos-sdk/pull/19651) Allow empty public keys in `GetSignBytesAdapter`. + +### Bug Fixes + +* (x/gov) [#19725](https://github.com/cosmos/cosmos-sdk/pull/19725) Fetch a failed proposal tally from proposal.FinalTallyResult in the gprc query. +* (types) [#19709](https://github.com/cosmos/cosmos-sdk/pull/19709) Fix skip staking genesis export when using `CoreAppModuleAdaptor` / `CoreAppModuleBasicAdaptor` for it. +* (x/auth) [#19549](https://github.com/cosmos/cosmos-sdk/pull/19549) Accept custom get signers when injecting `x/auth/tx`. +* (x/staking) Fix a possible bypass of delegator slashing: [GHSA-86h5-xcpx-cfqc](https://github.com/cosmos/cosmos-sdk/security/advisories/GHSA-86h5-xcpx-cfqc) +* (baseapp) Fix a bug in `baseapp.ValidateVoteExtensions` helper ([GHSA-95rx-m9m5-m94v](https://github.com/cosmos/cosmos-sdk/security/advisories/GHSA-95rx-m9m5-m94v)). The helper has been fixed and for avoiding API breaking changes `currentHeight` and `chainID` arguments are ignored. Those arguments are removed from the helper in v0.51+. + ## [v0.50.4](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.50.4) - 2023-02-19 ### Features @@ -577,6 +595,13 @@ Every module contains its own CHANGELOG.md. Please refer to the module you are i * (x/staking) [#14567](https://github.com/cosmos/cosmos-sdk/pull/14567) The `delegator_address` field of `MsgCreateValidator` has been deprecated. The validator address bytes and delegator address bytes refer to the same account while creating validator (defer only in bech32 notation). +## [v0.47.10](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.47.10) - 2024-02-27 + +### Bug Fixes + +* (x/staking) Fix a possible bypass of delagator slashing: [GHSA-86h5-xcpx-cfqc](https://github.com/cosmos/cosmos-sdk/security/advisories/GHSA-86h5-xcpx-cfqc) +* (server) [#19573](https://github.com/cosmos/cosmos-sdk/pull/19573) Use proper `db_backend` type when reading chain-id + ## [v0.47.9](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.47.9) - 2024-02-19 ### Bug Fixes From cdc329189b0fa11c13b36faf27d7f5bf96a19ff4 Mon Sep 17 00:00:00 2001 From: Julien Robert Date: Wed, 13 Mar 2024 06:43:24 +0100 Subject: [PATCH 15/30] refactor(types): align genesis api (#19735) --- CHANGELOG.md | 10 +- UPGRADING.md | 11 ++- core/appmodule/environment.go | 2 +- core/appmodule/migrations.go | 3 + runtime/app.go | 4 +- simapp/app.go | 15 +-- simapp/app_test.go | 2 +- simapp/sim_test.go | 2 +- testutil/mock/types_mock_appmodule.go | 27 +++--- testutil/mock/types_module_module.go | 58 +++--------- types/module/core_module.go | 34 ++++--- types/module/mock_appmodule_test.go | 6 +- types/module/module.go | 131 ++++++++++++++++++-------- types/module/module_test.go | 30 +++--- x/accounts/module.go | 17 ++-- x/auth/module.go | 3 +- x/authz/module/module.go | 21 ++--- x/bank/module.go | 21 ++--- x/circuit/module.go | 13 ++- x/consensus/module.go | 10 +- x/counter/module.go | 6 +- x/crisis/module.go | 17 ++-- x/distribution/module.go | 23 +++-- x/evidence/module.go | 17 ++-- x/feegrant/module/module.go | 21 ++--- x/genutil/module.go | 34 +++++-- x/gov/module.go | 23 +++-- x/group/module/module.go | 23 +++-- x/mint/module.go | 21 ++--- x/nft/module/module.go | 13 ++- x/params/module.go | 14 +-- x/protocolpool/module.go | 20 ++-- x/slashing/module.go | 23 +++-- x/staking/CHANGELOG.md | 3 +- x/staking/module.go | 84 ++++++++++++----- x/upgrade/module.go | 21 ++--- 36 files changed, 420 insertions(+), 363 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a073a86882cd..4886f460ef5b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -59,9 +59,10 @@ Every module contains its own CHANGELOG.md. Please refer to the module you are i * (types) [#19672](https://github.com/cosmos/cosmos-sdk/pull/19672) `PreBlock` now returns only an error for consistency with server/v2. The SDK has upgraded x/upgrade accordingly. `ResponsePreBlock` hence has been removed. * (server) [#19455](https://github.com/cosmos/cosmos-sdk/pull/19455) Allow calling back into the application struct in PostSetup. -* (types) [#19512](https://github.com/cosmos/cosmos-sdk/pull/19512) The notion of basic manager does not exist anymore. +* (types) [#19512](https://github.com/cosmos/cosmos-sdk/pull/19512) The notion of basic manager does not exist anymore (and all related helpers). * The module manager now can do everything that the basic manager was doing. - * `AppModuleBasic` has been deprecated for extension interfaces. Modules can now implement `HasRegisterInterfaces`, `HasGRPCGateway` and `HasAminoCodec` when relevant. + * `AppModuleBasic` has been deprecated for extension interfaces. + * Modules can now implement `appmodule.HasRegisterInterfaces`, `modue.HasGRPCGateway` and `module.HasAminoCodec` when relevant. * SDK modules now directly implement those extension interfaces on `AppModule` instead of `AppModuleBasic`. * (client/keys) [#18950](https://github.com/cosmos/cosmos-sdk/pull/18950) Improve ` keys add`, ` keys import` and ` keys rename` by checking name validation. * (client/keys) [#18745](https://github.com/cosmos/cosmos-sdk/pull/18745) Improve ` keys export` and ` keys mnemonic` by adding --yes option to skip interactive confirmation. @@ -82,6 +83,7 @@ Every module contains its own CHANGELOG.md. Please refer to the module you are i * (crypto | x/auth) [#14372](https://github.com/cosmos/cosmos-sdk/pull/18194) Key checks on signatures antehandle. * (types) [#18963](https://github.com/cosmos/cosmos-sdk/pull/18963) Swap out amino json encoding of `ABCIMessageLogs` for std lib json encoding * (x/auth) [#19651](https://github.com/cosmos/cosmos-sdk/pull/19651) Allow empty public keys in `GetSignBytesAdapter`. +* (x/genutil) [#19735](https://github.com/cosmos/cosmos-sdk/pull/19735) Update genesis api to match new `appmodule.HasGenesis` interface. ### Bug Fixes @@ -144,7 +146,9 @@ Every module contains its own CHANGELOG.md. Please refer to the module you are i * (types) [#19652](https://github.com/cosmos/cosmos-sdk/pull/19652) * Moved`types/module.HasRegisterInterfaces` to `cosmossdk.io/core`. * Moved `RegisterInterfaces` and `RegisterImplementations` from `InterfaceRegistry` to `cosmossdk.io/core/registry.LegacyRegistry` interface. -* (types) [#19627](https://github.com/cosmos/cosmos-sdk/pull/19627) All genesis interfaces now don't take `codec.JsonCodec`. Every module has the codec already, passing it created an unneeded dependency. Additionally, to reflect this change, the module manager does not take a codec either. +* (types) [#19627](https://github.com/cosmos/cosmos-sdk/pull/19627) and [#19735](https://github.com/cosmos/cosmos-sdk/pull/19735) All genesis interfaces now don't take `codec.JsonCodec`. + * Every module has the codec already, passing it created an unneeded dependency. + * Additionally, to reflect this change, the module manager does not take a codec either. ### Client Breaking Changes diff --git a/UPGRADING.md b/UPGRADING.md index 1519b8f80efc..3a21dee49158 100644 --- a/UPGRADING.md +++ b/UPGRADING.md @@ -52,6 +52,8 @@ For non depinject users, simply call `RegisterLegacyAminoCodec` and `RegisterInt +app.ModuleManager.RegisterInterfaces(interfaceRegistry) ``` +Additionally, thanks to the genesis simplification, as explained in [the genesis interface update](#genesis-interface), the module manager `InitGenesis` and `ExportGenesis` methods do not require the codec anymore. + ##### AnteHandlers The `GasConsumptionDecorator` and `IncreaseSequenceDecorator` have been merged with the SigVerificationDecorator, so you'll @@ -182,15 +184,16 @@ Previous module migrations have been removed. It is required to migrate to v0.50 ##### Genesis Interface -All genesis interfaces have been migrated to take context.Context instead of sdk.Context. Secondly, the codec is no longer passed in by the framework. The codec is now passed in by the module. +All genesis interfaces have been migrated to take `context.Context` instead of `sdk.Context`. +Secondly, the codec is no longer passed in by the framework. The codec is now passed in by the module. +Lastly, all InitGenesis and ExportGenesis functions now return an error. ```go -// InitGenesis performs genesis initialization for the authz module. +// InitGenesis performs genesis initialization for the module. func (am AppModule) InitGenesis(ctx context.Context, data json.RawMessage) error { } -// ExportGenesis returns the exported genesis state as raw bytes for the authz -// module. +// ExportGenesis returns the exported genesis state as raw bytes for the module. func (am AppModule) ExportGenesis(ctx context.Context) (json.RawMessage, error) { } ``` diff --git a/core/appmodule/environment.go b/core/appmodule/environment.go index 93778e9e9bbe..d65c32a5f83f 100644 --- a/core/appmodule/environment.go +++ b/core/appmodule/environment.go @@ -1,7 +1,7 @@ package appmodule import ( - appmodule "cosmossdk.io/core/appmodule/v2" + "cosmossdk.io/core/appmodule/v2" ) // Environment is used to get all services to their respective module diff --git a/core/appmodule/migrations.go b/core/appmodule/migrations.go index e5fe6fbcfaf1..8c4ec594f6de 100644 --- a/core/appmodule/migrations.go +++ b/core/appmodule/migrations.go @@ -15,3 +15,6 @@ type MigrationRegistrar = appmodule.MigrationRegistrar // MigrationHandler is the migration function that each module registers. type MigrationHandler = appmodule.MigrationHandler + +// VersionMap is a map of moduleName -> version +type VersionMap = appmodule.VersionMap diff --git a/runtime/app.go b/runtime/app.go index 6fdfe08ca1f0..ced302636a9e 100644 --- a/runtime/app.go +++ b/runtime/app.go @@ -187,9 +187,9 @@ func (a *App) PrepareCheckStater(ctx sdk.Context) { func (a *App) InitChainer(ctx sdk.Context, req *abci.RequestInitChain) (*abci.ResponseInitChain, error) { var genesisState map[string]json.RawMessage if err := json.Unmarshal(req.AppStateBytes, &genesisState); err != nil { - panic(err) + return nil, err } - return a.ModuleManager.InitGenesis(ctx, a.cdc, genesisState) + return a.ModuleManager.InitGenesis(ctx, genesisState) } // RegisterAPIRoutes registers all application module routes with the provided diff --git a/simapp/app.go b/simapp/app.go index 3304c335b4ec..6c265cc1148f 100644 --- a/simapp/app.go +++ b/simapp/app.go @@ -17,7 +17,6 @@ import ( autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" reflectionv1 "cosmossdk.io/api/cosmos/reflection/v1" "cosmossdk.io/client/v2/autocli" - "cosmossdk.io/core/appmodule" "cosmossdk.io/log" storetypes "cosmossdk.io/store/types" "cosmossdk.io/x/accounts" @@ -644,7 +643,7 @@ func (app *SimApp) InitChainer(ctx sdk.Context, req *abci.RequestInitChain) (*ab if err != nil { return nil, err } - return app.ModuleManager.InitGenesis(ctx, app.appCodec, genesisState) + return app.ModuleManager.InitGenesis(ctx, genesisState) } // LoadHeight loads a particular height @@ -680,18 +679,8 @@ func (app *SimApp) TxConfig() client.TxConfig { // AutoCliOpts returns the autocli options for the app. func (app *SimApp) AutoCliOpts() autocli.AppOptions { - modules := make(map[string]appmodule.AppModule, 0) - for _, m := range app.ModuleManager.Modules { - if moduleWithName, ok := m.(module.HasName); ok { - moduleName := moduleWithName.Name() - if appModule, ok := moduleWithName.(appmodule.AppModule); ok { - modules[moduleName] = appModule - } - } - } - return autocli.AppOptions{ - Modules: modules, + Modules: app.ModuleManager.Modules, ModuleOptions: runtimeservices.ExtractAutoCLIOptions(app.ModuleManager.Modules), } } diff --git a/simapp/app_test.go b/simapp/app_test.go index 8c1c5a8d8ef3..406017291cd3 100644 --- a/simapp/app_test.go +++ b/simapp/app_test.go @@ -278,7 +278,7 @@ func TestUpgradeStateOnGenesis(t *testing.T) { vm, err := app.UpgradeKeeper.GetModuleVersionMap(ctx) require.NoError(t, err) for v, i := range app.ModuleManager.Modules { - if i, ok := i.(module.HasConsensusVersion); ok { + if i, ok := i.(appmodule.HasConsensusVersion); ok { require.Equal(t, vm[v], i.ConsensusVersion()) } } diff --git a/simapp/sim_test.go b/simapp/sim_test.go index 8001d48d0749..960490f168bd 100644 --- a/simapp/sim_test.go +++ b/simapp/sim_test.go @@ -175,7 +175,7 @@ func TestAppImportExport(t *testing.T) { ctxA := app.NewContextLegacy(true, cmtproto.Header{Height: app.LastBlockHeight()}) ctxB := newApp.NewContextLegacy(true, cmtproto.Header{Height: app.LastBlockHeight()}) - _, err = newApp.ModuleManager.InitGenesis(ctxB, app.AppCodec(), genesisState) + _, err = newApp.ModuleManager.InitGenesis(ctxB, genesisState) if err != nil { if strings.Contains(err.Error(), "validator set is empty after InitGenesis") { logger.Info("Skipping simulation as all validators have been unbonded") diff --git a/testutil/mock/types_mock_appmodule.go b/testutil/mock/types_mock_appmodule.go index 6118f774fd9f..0d668299abfa 100644 --- a/testutil/mock/types_mock_appmodule.go +++ b/testutil/mock/types_mock_appmodule.go @@ -11,8 +11,7 @@ import ( appmodule "cosmossdk.io/core/appmodule" registry "cosmossdk.io/core/registry" - types "github.com/cometbft/cometbft/abci/types" - types0 "github.com/cosmos/cosmos-sdk/types" + types "github.com/cosmos/cosmos-sdk/types" module "github.com/cosmos/cosmos-sdk/types/module" gomock "github.com/golang/mock/gomock" ) @@ -69,10 +68,10 @@ func (mr *MockAppModuleWithAllExtensionsMockRecorder) DefaultGenesis() *gomock.C } // EndBlock mocks base method. -func (m *MockAppModuleWithAllExtensions) EndBlock(arg0 context.Context) ([]types.ValidatorUpdate, error) { +func (m *MockAppModuleWithAllExtensions) EndBlock(arg0 context.Context) ([]module.ValidatorUpdate, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "EndBlock", arg0) - ret0, _ := ret[0].([]types.ValidatorUpdate) + ret0, _ := ret[0].([]module.ValidatorUpdate) ret1, _ := ret[1].(error) return ret0, ret1 } @@ -163,7 +162,7 @@ func (mr *MockAppModuleWithAllExtensionsMockRecorder) RegisterInterfaces(arg0 in } // RegisterInvariants mocks base method. -func (m *MockAppModuleWithAllExtensions) RegisterInvariants(arg0 types0.InvariantRegistry) { +func (m *MockAppModuleWithAllExtensions) RegisterInvariants(arg0 types.InvariantRegistry) { m.ctrl.T.Helper() m.ctrl.Call(m, "RegisterInvariants", arg0) } @@ -252,10 +251,10 @@ func (mr *MockAppModuleWithAllExtensionsABCIMockRecorder) DefaultGenesis() *gomo } // EndBlock mocks base method. -func (m *MockAppModuleWithAllExtensionsABCI) EndBlock(arg0 context.Context) ([]types.ValidatorUpdate, error) { +func (m *MockAppModuleWithAllExtensionsABCI) EndBlock(arg0 context.Context) ([]module.ValidatorUpdate, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "EndBlock", arg0) - ret0, _ := ret[0].([]types.ValidatorUpdate) + ret0, _ := ret[0].([]module.ValidatorUpdate) ret1, _ := ret[1].(error) return ret0, ret1 } @@ -267,11 +266,12 @@ func (mr *MockAppModuleWithAllExtensionsABCIMockRecorder) EndBlock(arg0 interfac } // ExportGenesis mocks base method. -func (m *MockAppModuleWithAllExtensionsABCI) ExportGenesis(arg0 context.Context) json.RawMessage { +func (m *MockAppModuleWithAllExtensionsABCI) ExportGenesis(arg0 context.Context) (json.RawMessage, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "ExportGenesis", arg0) ret0, _ := ret[0].(json.RawMessage) - return ret0 + ret1, _ := ret[1].(error) + return ret0, ret1 } // ExportGenesis indicates an expected call of ExportGenesis. @@ -281,11 +281,12 @@ func (mr *MockAppModuleWithAllExtensionsABCIMockRecorder) ExportGenesis(arg0 int } // InitGenesis mocks base method. -func (m *MockAppModuleWithAllExtensionsABCI) InitGenesis(arg0 context.Context, arg1 json.RawMessage) []types.ValidatorUpdate { +func (m *MockAppModuleWithAllExtensionsABCI) InitGenesis(arg0 context.Context, arg1 json.RawMessage) ([]module.ValidatorUpdate, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "InitGenesis", arg0, arg1) - ret0, _ := ret[0].([]types.ValidatorUpdate) - return ret0 + ret0, _ := ret[0].([]module.ValidatorUpdate) + ret1, _ := ret[1].(error) + return ret0, ret1 } // InitGenesis indicates an expected call of InitGenesis. @@ -345,7 +346,7 @@ func (mr *MockAppModuleWithAllExtensionsABCIMockRecorder) RegisterInterfaces(arg } // RegisterInvariants mocks base method. -func (m *MockAppModuleWithAllExtensionsABCI) RegisterInvariants(arg0 types0.InvariantRegistry) { +func (m *MockAppModuleWithAllExtensionsABCI) RegisterInvariants(arg0 types.InvariantRegistry) { m.ctrl.T.Helper() m.ctrl.Call(m, "RegisterInvariants", arg0) } diff --git a/testutil/mock/types_module_module.go b/testutil/mock/types_module_module.go index b3e6283f509b..01a7e3219496 100644 --- a/testutil/mock/types_module_module.go +++ b/testutil/mock/types_module_module.go @@ -10,10 +10,9 @@ import ( reflect "reflect" registry "cosmossdk.io/core/registry" - types "github.com/cometbft/cometbft/abci/types" client "github.com/cosmos/cosmos-sdk/client" codec "github.com/cosmos/cosmos-sdk/codec" - types0 "github.com/cosmos/cosmos-sdk/types" + types "github.com/cosmos/cosmos-sdk/types" module "github.com/cosmos/cosmos-sdk/types/module" gomock "github.com/golang/mock/gomock" runtime "github.com/grpc-ecosystem/grpc-gateway/runtime" @@ -375,11 +374,12 @@ func (mr *MockHasABCIGenesisMockRecorder) DefaultGenesis() *gomock.Call { } // ExportGenesis mocks base method. -func (m *MockHasABCIGenesis) ExportGenesis(arg0 context.Context) json.RawMessage { +func (m *MockHasABCIGenesis) ExportGenesis(arg0 context.Context) (json.RawMessage, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "ExportGenesis", arg0) ret0, _ := ret[0].(json.RawMessage) - return ret0 + ret1, _ := ret[1].(error) + return ret0, ret1 } // ExportGenesis indicates an expected call of ExportGenesis. @@ -389,11 +389,12 @@ func (mr *MockHasABCIGenesisMockRecorder) ExportGenesis(arg0 interface{}) *gomoc } // InitGenesis mocks base method. -func (m *MockHasABCIGenesis) InitGenesis(arg0 context.Context, arg1 json.RawMessage) []types.ValidatorUpdate { +func (m *MockHasABCIGenesis) InitGenesis(arg0 context.Context, arg1 json.RawMessage) ([]module.ValidatorUpdate, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "InitGenesis", arg0, arg1) - ret0, _ := ret[0].([]types.ValidatorUpdate) - return ret0 + ret0, _ := ret[0].([]module.ValidatorUpdate) + ret1, _ := ret[1].(error) + return ret0, ret1 } // InitGenesis indicates an expected call of InitGenesis. @@ -454,7 +455,7 @@ func (m *MockHasInvariants) EXPECT() *MockHasInvariantsMockRecorder { } // RegisterInvariants mocks base method. -func (m *MockHasInvariants) RegisterInvariants(arg0 types0.InvariantRegistry) { +func (m *MockHasInvariants) RegisterInvariants(arg0 types.InvariantRegistry) { m.ctrl.T.Helper() m.ctrl.Call(m, "RegisterInvariants", arg0) } @@ -500,43 +501,6 @@ func (mr *MockHasServicesMockRecorder) RegisterServices(arg0 interface{}) *gomoc return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterServices", reflect.TypeOf((*MockHasServices)(nil).RegisterServices), arg0) } -// MockHasConsensusVersion is a mock of HasConsensusVersion interface. -type MockHasConsensusVersion struct { - ctrl *gomock.Controller - recorder *MockHasConsensusVersionMockRecorder -} - -// MockHasConsensusVersionMockRecorder is the mock recorder for MockHasConsensusVersion. -type MockHasConsensusVersionMockRecorder struct { - mock *MockHasConsensusVersion -} - -// NewMockHasConsensusVersion creates a new mock instance. -func NewMockHasConsensusVersion(ctrl *gomock.Controller) *MockHasConsensusVersion { - mock := &MockHasConsensusVersion{ctrl: ctrl} - mock.recorder = &MockHasConsensusVersionMockRecorder{mock} - return mock -} - -// EXPECT returns an object that allows the caller to indicate expected use. -func (m *MockHasConsensusVersion) EXPECT() *MockHasConsensusVersionMockRecorder { - return m.recorder -} - -// ConsensusVersion mocks base method. -func (m *MockHasConsensusVersion) ConsensusVersion() uint64 { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ConsensusVersion") - ret0, _ := ret[0].(uint64) - return ret0 -} - -// ConsensusVersion indicates an expected call of ConsensusVersion. -func (mr *MockHasConsensusVersionMockRecorder) ConsensusVersion() *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConsensusVersion", reflect.TypeOf((*MockHasConsensusVersion)(nil).ConsensusVersion)) -} - // MockHasABCIEndBlock is a mock of HasABCIEndBlock interface. type MockHasABCIEndBlock struct { ctrl *gomock.Controller @@ -561,10 +525,10 @@ func (m *MockHasABCIEndBlock) EXPECT() *MockHasABCIEndBlockMockRecorder { } // EndBlock mocks base method. -func (m *MockHasABCIEndBlock) EndBlock(arg0 context.Context) ([]types.ValidatorUpdate, error) { +func (m *MockHasABCIEndBlock) EndBlock(arg0 context.Context) ([]module.ValidatorUpdate, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "EndBlock", arg0) - ret0, _ := ret[0].([]types.ValidatorUpdate) + ret0, _ := ret[0].([]module.ValidatorUpdate) ret1, _ := ret[1].(error) return ret0, ret1 } diff --git a/types/module/core_module.go b/types/module/core_module.go index 7b59b430c019..398800f0fcb0 100644 --- a/types/module/core_module.go +++ b/types/module/core_module.go @@ -4,7 +4,6 @@ import ( "context" "encoding/json" - abci "github.com/cometbft/cometbft/abci/types" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" @@ -95,21 +94,21 @@ func (c coreAppModuleAdaptor) ValidateGenesis(bz json.RawMessage) error { } // ExportGenesis implements HasGenesis -func (c coreAppModuleAdaptor) ExportGenesis(ctx context.Context) json.RawMessage { +func (c coreAppModuleAdaptor) ExportGenesis(ctx context.Context) (json.RawMessage, error) { if module, ok := c.module.(appmodule.HasGenesisAuto); ok { ctx := sdk.UnwrapSDKContext(ctx).WithGasMeter(storetypes.NewInfiniteGasMeter()) // avoid race conditions target := genesis.RawJSONTarget{} err := module.ExportGenesis(ctx, target.Target()) if err != nil { - panic(err) + return nil, err } rawJSON, err := target.JSON() if err != nil { - panic(err) + return nil, err } - return rawJSON + return rawJSON, nil } if mod, ok := c.module.(HasABCIGenesis); ok { @@ -119,26 +118,26 @@ func (c coreAppModuleAdaptor) ExportGenesis(ctx context.Context) json.RawMessage if mod, ok := c.module.(HasGenesis); ok { eg, err := mod.ExportGenesis(ctx) if err != nil { - panic(err) + return nil, err } - return eg + + return eg, nil } - return nil + return nil, nil } // InitGenesis implements HasGenesis -func (c coreAppModuleAdaptor) InitGenesis(ctx context.Context, bz json.RawMessage) []abci.ValidatorUpdate { +func (c coreAppModuleAdaptor) InitGenesis(ctx context.Context, bz json.RawMessage) ([]ValidatorUpdate, error) { if module, ok := c.module.(appmodule.HasGenesisAuto); ok { // core API genesis source, err := genesis.SourceFromRawJSON(bz) if err != nil { - panic(err) + return nil, err } - err = module.InitGenesis(ctx, source) - if err != nil { - panic(err) + if err = module.InitGenesis(ctx, source); err != nil { + return nil, err } } @@ -147,13 +146,12 @@ func (c coreAppModuleAdaptor) InitGenesis(ctx context.Context, bz json.RawMessag } if mod, ok := c.module.(HasGenesis); ok { - err := mod.InitGenesis(ctx, bz) - if err != nil { - panic(err) + if err := mod.InitGenesis(ctx, bz); err != nil { + return nil, err } - } - return nil + + return nil, nil } // Name implements HasName diff --git a/types/module/mock_appmodule_test.go b/types/module/mock_appmodule_test.go index 6d470b7d64a6..1be48c882264 100644 --- a/types/module/mock_appmodule_test.go +++ b/types/module/mock_appmodule_test.go @@ -14,9 +14,9 @@ import ( type AppModuleWithAllExtensions interface { module.AppModule module.HasServices - appmodulev2.HasGenesis module.HasInvariants - module.HasConsensusVersion + appmodulev2.HasConsensusVersion + appmodulev2.HasGenesis module.HasABCIEndBlock module.HasName } @@ -27,7 +27,7 @@ type AppModuleWithAllExtensionsABCI interface { module.HasServices module.HasABCIGenesis module.HasInvariants - module.HasConsensusVersion + appmodulev2.HasConsensusVersion module.HasABCIEndBlock module.HasName } diff --git a/types/module/module.go b/types/module/module.go index 6dd626f7cd20..fba59b89ea05 100644 --- a/types/module/module.go +++ b/types/module/module.go @@ -27,6 +27,7 @@ import ( "sort" abci "github.com/cometbft/cometbft/abci/types" + cmtcryptoproto "github.com/cometbft/cometbft/proto/tendermint/crypto" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" "golang.org/x/exp/maps" @@ -46,11 +47,11 @@ import ( // Deprecated: use the embed extension interfaces instead, when needed. type AppModuleBasic interface { - appmodulev2.HasRegisterInterfaces - HasName HasGRPCGateway HasAminoCodec + + appmodulev2.HasRegisterInterfaces } // AppModule is the form for an application module. Most of @@ -84,22 +85,20 @@ type HasAminoCodec interface { RegisterLegacyAminoCodec(*codec.LegacyAmino) } -// HasRegisterInterfaces is the interface for modules to register their msg types. -type HasRegisterInterfaces appmodulev2.HasRegisterInterfaces - // HasGRPCGateway is the interface for modules to register their gRPC gateway routes. type HasGRPCGateway interface { RegisterGRPCGatewayRoutes(client.Context, *runtime.ServeMux) } // HasGenesis is the extension interface for stateful genesis methods. +// Prefer directly importing appmodulev2 or appmodule instead of using this alias. type HasGenesis = appmodulev2.HasGenesis // HasABCIGenesis is the extension interface for stateful genesis methods which returns validator updates. type HasABCIGenesis interface { HasGenesisBasics - InitGenesis(context.Context, json.RawMessage) []abci.ValidatorUpdate - ExportGenesis(context.Context) json.RawMessage + InitGenesis(context.Context, json.RawMessage) ([]ValidatorUpdate, error) + ExportGenesis(context.Context) (json.RawMessage, error) } // HasInvariants is the interface for registering invariants. @@ -114,19 +113,19 @@ type HasServices interface { RegisterServices(Configurator) } -// HasConsensusVersion is the interface for declaring a module consensus version. -type HasConsensusVersion interface { - // ConsensusVersion is a sequence number for state-breaking change of the - // module. It should be incremented on each consensus-breaking change - // introduced by the module. To avoid wrong/empty versions, the initial version - // should be set to 1. - ConsensusVersion() uint64 -} +// MigrationHandler is the migration function that each module registers. +type MigrationHandler func(sdk.Context) error + +// VersionMap is a map of moduleName -> version +type VersionMap appmodule.VersionMap + +// ValidatorUpdate is the type for validator updates. +type ValidatorUpdate = appmodulev2.ValidatorUpdate // HasABCIEndBlock is the interface for modules that need to run code at the end of the block. type HasABCIEndBlock interface { AppModule - EndBlock(context.Context) ([]abci.ValidatorUpdate, error) + EndBlock(context.Context) ([]ValidatorUpdate, error) } // Manager defines a module manager that provides the high level utility for managing and executing @@ -324,11 +323,13 @@ func (m *Manager) RegisterInterfaces(registry registry.LegacyRegistry) { // DefaultGenesis provides default genesis information for all modules func (m *Manager) DefaultGenesis() map[string]json.RawMessage { genesisData := make(map[string]json.RawMessage) - for _, b := range m.Modules { + for name, b := range m.Modules { if mod, ok := b.(HasGenesisBasics); ok { genesisData[mod.Name()] = mod.DefaultGenesis() - } else if mod, ok := b.(HasName); ok { - genesisData[mod.Name()] = []byte("{}") + } else if mod, ok := b.(appmodule.HasGenesis); ok { + genesisData[name] = mod.DefaultGenesis() + } else { + genesisData[name] = []byte("{}") } } @@ -337,12 +338,15 @@ func (m *Manager) DefaultGenesis() map[string]json.RawMessage { // ValidateGenesis performs genesis state validation for all modules func (m *Manager) ValidateGenesis(genesisData map[string]json.RawMessage) error { - for _, b := range m.Modules { - // first check if the module is an adapted Core API Module + for name, b := range m.Modules { if mod, ok := b.(HasGenesisBasics); ok { if err := mod.ValidateGenesis(genesisData[mod.Name()]); err != nil { return err } + } else if mod, ok := b.(appmodule.HasGenesis); ok { + if err := mod.ValidateGenesis(genesisData[name]); err != nil { + return err + } } } @@ -425,8 +429,8 @@ func (m *Manager) RegisterServices(cfg Configurator) error { // InitGenesis performs init genesis functionality for modules. Exactly one // module must return a non-empty validator set update to correctly initialize // the chain. -func (m *Manager) InitGenesis(ctx sdk.Context, _ codec.JSONCodec, genesisData map[string]json.RawMessage) (*abci.ResponseInitChain, error) { - var validatorUpdates []abci.ValidatorUpdate +func (m *Manager) InitGenesis(ctx sdk.Context, genesisData map[string]json.RawMessage) (*abci.ResponseInitChain, error) { + var validatorUpdates []ValidatorUpdate ctx.Logger().Info("initializing blockchain state from genesis.json") for _, moduleName := range m.OrderInitGenesis { if genesisData[moduleName] == nil { @@ -454,7 +458,10 @@ func (m *Manager) InitGenesis(ctx sdk.Context, _ codec.JSONCodec, genesisData ma } } else if module, ok := mod.(HasABCIGenesis); ok { ctx.Logger().Debug("running initialization for module", "module", moduleName) - moduleValUpdates := module.InitGenesis(ctx, genesisData[moduleName]) + moduleValUpdates, err := module.InitGenesis(ctx, genesisData[moduleName]) + if err != nil { + return &abci.ResponseInitChain{}, err + } // use these validator updates if provided, the module manager assumes // only one module will update the validator set @@ -472,8 +479,32 @@ func (m *Manager) InitGenesis(ctx sdk.Context, _ codec.JSONCodec, genesisData ma return &abci.ResponseInitChain{}, fmt.Errorf("validator set is empty after InitGenesis, please ensure at least one validator is initialized with a delegation greater than or equal to the DefaultPowerReduction (%d)", sdk.DefaultPowerReduction) } + cometValidatorUpdates := make([]abci.ValidatorUpdate, len(validatorUpdates)) + for i, v := range validatorUpdates { + var pubkey cmtcryptoproto.PublicKey + switch v.PubKeyType { + case "ed25519": + pubkey = cmtcryptoproto.PublicKey{ + Sum: &cmtcryptoproto.PublicKey_Ed25519{ + Ed25519: v.PubKey, + }, + } + case "secp256k1": + pubkey = cmtcryptoproto.PublicKey{ + Sum: &cmtcryptoproto.PublicKey_Secp256K1{ + Secp256K1: v.PubKey, + }, + } + } + + cometValidatorUpdates[i] = abci.ValidatorUpdate{ + PubKey: pubkey, + Power: v.Power, + } + } + return &abci.ResponseInitChain{ - Validators: validatorUpdates, + Validators: cometValidatorUpdates, }, nil } @@ -535,7 +566,11 @@ func (m *Manager) ExportGenesisForModules(ctx sdk.Context, modulesToExport []str channels[moduleName] = make(chan genesisResult) go func(module HasABCIGenesis, ch chan genesisResult) { ctx := ctx.WithGasMeter(storetypes.NewInfiniteGasMeter()) // avoid race conditions - ch <- genesisResult{module.ExportGenesis(ctx), nil} + jm, err := module.ExportGenesis(ctx) + if err != nil { + ch <- genesisResult{nil, err} + } + ch <- genesisResult{jm, nil} }(module, channels[moduleName]) } } @@ -590,12 +625,6 @@ func (m *Manager) assertNoForgottenModules(setOrderFnName string, moduleNames [] } } -// MigrationHandler is the migration function that each module registers. -type MigrationHandler func(sdk.Context) error - -// VersionMap is a map of moduleName -> version -type VersionMap map[string]uint64 - // RunMigrations performs in-place store migrations for all modules. This // function MUST be called inside an x/upgrade UpgradeHandler. // @@ -663,7 +692,7 @@ func (m Manager) RunMigrations(ctx context.Context, cfg Configurator, fromVM Ver module := m.Modules[moduleName] fromVersion, exists := fromVM[moduleName] toVersion := uint64(0) - if module, ok := module.(HasConsensusVersion); ok { + if module, ok := module.(appmodule.HasConsensusVersion); ok { toVersion = module.ConsensusVersion() } @@ -688,7 +717,11 @@ func (m Manager) RunMigrations(ctx context.Context, cfg Configurator, fromVM Ver } } if module, ok := m.Modules[moduleName].(HasABCIGenesis); ok { - moduleValUpdates := module.InitGenesis(sdkCtx, module.DefaultGenesis()) + moduleValUpdates, err := module.InitGenesis(sdkCtx, module.DefaultGenesis()) + if err != nil { + return nil, err + } + // The module manager assumes only one module will update the // validator set, and it can't be a new module. if len(moduleValUpdates) > 0 { @@ -741,7 +774,7 @@ func (m *Manager) BeginBlock(ctx sdk.Context) (sdk.BeginBlock, error) { // modules. func (m *Manager) EndBlock(ctx sdk.Context) (sdk.EndBlock, error) { ctx = ctx.WithEventManager(sdk.NewEventManager()) - validatorUpdates := []abci.ValidatorUpdate{} + validatorUpdates := []ValidatorUpdate{} for _, moduleName := range m.OrderEndBlockers { if module, ok := m.Modules[moduleName].(appmodule.HasEndBlocker); ok { @@ -766,8 +799,32 @@ func (m *Manager) EndBlock(ctx sdk.Context) (sdk.EndBlock, error) { } } + cometValidatorUpdates := make([]abci.ValidatorUpdate, len(validatorUpdates)) + for i, v := range validatorUpdates { + var pubkey cmtcryptoproto.PublicKey + switch v.PubKeyType { + case "ed25519": + pubkey = cmtcryptoproto.PublicKey{ + Sum: &cmtcryptoproto.PublicKey_Ed25519{ + Ed25519: v.PubKey, + }, + } + case "secp256k1": + pubkey = cmtcryptoproto.PublicKey{ + Sum: &cmtcryptoproto.PublicKey_Secp256K1{ + Secp256K1: v.PubKey, + }, + } + } + + cometValidatorUpdates[i] = abci.ValidatorUpdate{ + PubKey: pubkey, + Power: v.Power, + } + } + return sdk.EndBlock{ - ValidatorUpdates: validatorUpdates, + ValidatorUpdates: cometValidatorUpdates, Events: ctx.EventManager().ABCIEvents(), }, nil } @@ -805,7 +862,7 @@ func (m *Manager) GetVersionMap() VersionMap { vermap := make(VersionMap) for name, v := range m.Modules { version := uint64(0) - if v, ok := v.(HasConsensusVersion); ok { + if v, ok := v.(appmodule.HasConsensusVersion); ok { version = v.ConsensusVersion() } name := name diff --git a/types/module/module_test.go b/types/module/module_test.go index 670b088d5366..635b1ebe1d5e 100644 --- a/types/module/module_test.go +++ b/types/module/module_test.go @@ -172,16 +172,14 @@ func TestManager_InitGenesis(t *testing.T) { require.Equal(t, 3, len(mm.Modules)) ctx := sdk.NewContext(nil, false, log.NewNopLogger()) - interfaceRegistry := types.NewInterfaceRegistry() - cdc := codec.NewProtoCodec(interfaceRegistry) genesisData := map[string]json.RawMessage{"module1": json.RawMessage(`{"key": "value"}`)} - // this should panic since the validator set is empty even after init genesis + // this should error since the validator set is empty even after init genesis mockAppModule1.EXPECT().InitGenesis(gomock.Eq(ctx), gomock.Eq(genesisData["module1"])).Times(1) - _, err := mm.InitGenesis(ctx, cdc, genesisData) + _, err := mm.InitGenesis(ctx, genesisData) require.ErrorContains(t, err, "validator set is empty after InitGenesis") - // test panic + // test error genesisData = map[string]json.RawMessage{ "module1": json.RawMessage(`{"key": "value"}`), "module2": json.RawMessage(`{"key": "value"}`), @@ -193,19 +191,19 @@ func TestManager_InitGenesis(t *testing.T) { mockAppModuleABCI1.EXPECT().Name().Times(4).Return("module1") mockAppModuleABCI2.EXPECT().Name().Times(2).Return("module2") mmABCI := module.NewManager(mockAppModuleABCI1, mockAppModuleABCI2) - // panic because more than one module returns validator set updates - mockAppModuleABCI1.EXPECT().InitGenesis(gomock.Eq(ctx), gomock.Eq(genesisData["module1"])).Times(1).Return([]abci.ValidatorUpdate{{}}) - mockAppModuleABCI2.EXPECT().InitGenesis(gomock.Eq(ctx), gomock.Eq(genesisData["module2"])).Times(1).Return([]abci.ValidatorUpdate{{}}) - _, err = mmABCI.InitGenesis(ctx, cdc, genesisData) + // errors because more than one module returns validator set updates + mockAppModuleABCI1.EXPECT().InitGenesis(gomock.Eq(ctx), gomock.Eq(genesisData["module1"])).Times(1).Return([]module.ValidatorUpdate{{}}, nil) + mockAppModuleABCI2.EXPECT().InitGenesis(gomock.Eq(ctx), gomock.Eq(genesisData["module2"])).Times(1).Return([]module.ValidatorUpdate{{}}, nil) + _, err = mmABCI.InitGenesis(ctx, genesisData) require.ErrorContains(t, err, "validator InitGenesis updates already set by a previous module") // happy path mm2 := module.NewManager(mockAppModuleABCI1, mockAppModule2, module.CoreAppModuleAdaptor("module3", mockAppModule3)) - mockAppModuleABCI1.EXPECT().InitGenesis(gomock.Eq(ctx), gomock.Eq(genesisData["module1"])).Times(1).Return([]abci.ValidatorUpdate{{}}) + mockAppModuleABCI1.EXPECT().InitGenesis(gomock.Eq(ctx), gomock.Eq(genesisData["module1"])).Times(1).Return([]module.ValidatorUpdate{{}}, nil) mockAppModule2.EXPECT().InitGenesis(gomock.Eq(ctx), gomock.Eq(genesisData["module2"])).Times(1) mockAppModule3.EXPECT().InitGenesis(gomock.Eq(ctx), gomock.Any()).Times(1).Return(nil) - _, err = mm2.InitGenesis(ctx, cdc, genesisData) + _, err = mm2.InitGenesis(ctx, genesisData) require.NoError(t, err) } @@ -268,15 +266,15 @@ func TestManager_EndBlock(t *testing.T) { require.NotNil(t, mm) require.Equal(t, 3, len(mm.Modules)) - mockAppModule1.EXPECT().EndBlock(gomock.Any()).Times(1).Return([]abci.ValidatorUpdate{{}}, nil) + mockAppModule1.EXPECT().EndBlock(gomock.Any()).Times(1).Return([]module.ValidatorUpdate{{}}, nil) mockAppModule2.EXPECT().EndBlock(gomock.Any()).Times(1) ret, err := mm.EndBlock(sdk.Context{}) require.NoError(t, err) require.Equal(t, []abci.ValidatorUpdate{{}}, ret.ValidatorUpdates) // test panic - mockAppModule1.EXPECT().EndBlock(gomock.Any()).Times(1).Return([]abci.ValidatorUpdate{{}}, nil) - mockAppModule2.EXPECT().EndBlock(gomock.Any()).Times(1).Return([]abci.ValidatorUpdate{{}}, nil) + mockAppModule1.EXPECT().EndBlock(gomock.Any()).Times(1).Return([]module.ValidatorUpdate{{}}, nil) + mockAppModule2.EXPECT().EndBlock(gomock.Any()).Times(1).Return([]module.ValidatorUpdate{{}}, nil) _, err = mm.EndBlock(sdk.Context{}) require.Error(t, err) } @@ -307,13 +305,11 @@ func TestCoreAPIManager_InitGenesis(t *testing.T) { require.Equal(t, 1, len(mm.Modules)) ctx := sdk.NewContext(nil, false, log.NewNopLogger()) - interfaceRegistry := types.NewInterfaceRegistry() - cdc := codec.NewProtoCodec(interfaceRegistry) genesisData := map[string]json.RawMessage{"module1": json.RawMessage(`{"key": "value"}`)} // this should panic since the validator set is empty even after init genesis mockAppModule1.EXPECT().InitGenesis(gomock.Eq(ctx), gomock.Any()).Times(1).Return(nil) - _, err := mm.InitGenesis(ctx, cdc, genesisData) + _, err := mm.InitGenesis(ctx, genesisData) require.ErrorContains(t, err, "validator set is empty after InitGenesis, please ensure at least one validator is initialized with a delegation greater than or equal to the DefaultPowerReduction") // TODO: add happy path test. We are not returning any validator updates, this will come with the services. diff --git a/x/accounts/module.go b/x/accounts/module.go index 71a16cff195a..6d19dde0a5ca 100644 --- a/x/accounts/module.go +++ b/x/accounts/module.go @@ -8,7 +8,6 @@ import ( "google.golang.org/grpc" "cosmossdk.io/core/appmodule" - appmodulev2 "cosmossdk.io/core/appmodule/v2" "cosmossdk.io/core/registry" "cosmossdk.io/x/accounts/cli" v1 "cosmossdk.io/x/accounts/v1" @@ -22,22 +21,20 @@ import ( const ( ModuleName = "accounts" StoreKey = "_" + ModuleName // unfortunately accounts collides with auth store key + + ConsensusVersion = 1 ) // ModuleAccountAddress defines the x/accounts module address. var ModuleAccountAddress = address.Module(ModuleName) -const ( - ConsensusVersion = 1 -) - var ( - _ appmodule.AppModule = AppModule{} - _ appmodule.HasServices = AppModule{} + _ module.HasName = AppModule{} - _ module.HasName = AppModule{} - _ appmodulev2.HasGenesis = AppModule{} - _ module.HasConsensusVersion = AppModule{} + _ appmodule.AppModule = AppModule{} + _ appmodule.HasServices = AppModule{} + _ appmodule.HasGenesis = AppModule{} + _ appmodule.HasConsensusVersion = AppModule{} ) func NewAppModule(cdc codec.Codec, k Keeper) AppModule { diff --git a/x/auth/module.go b/x/auth/module.go index d92176043dfb..e46711451a7b 100644 --- a/x/auth/module.go +++ b/x/auth/module.go @@ -9,7 +9,6 @@ import ( "google.golang.org/grpc" "cosmossdk.io/core/appmodule" - appmodulev2 "cosmossdk.io/core/appmodule/v2" "cosmossdk.io/core/registry" "cosmossdk.io/x/auth/keeper" "cosmossdk.io/x/auth/simulation" @@ -30,8 +29,8 @@ const ( var ( _ module.AppModuleSimulation = AppModule{} _ module.HasName = AppModule{} - _ appmodulev2.HasGenesis = AppModule{} + _ appmodule.HasGenesis = AppModule{} _ appmodule.AppModule = AppModule{} _ appmodule.HasServices = AppModule{} _ appmodule.HasMigrations = AppModule{} diff --git a/x/authz/module/module.go b/x/authz/module/module.go index 65a9d00a97e5..9eb34ac5fd06 100644 --- a/x/authz/module/module.go +++ b/x/authz/module/module.go @@ -10,7 +10,6 @@ import ( "google.golang.org/grpc" "cosmossdk.io/core/appmodule" - appmodulev2 "cosmossdk.io/core/appmodule/v2" "cosmossdk.io/core/registry" "cosmossdk.io/errors" "cosmossdk.io/x/authz" @@ -28,17 +27,17 @@ import ( const ConsensusVersion = 2 var ( - _ module.HasName = AppModule{} - _ module.HasAminoCodec = AppModule{} - _ module.HasGRPCGateway = AppModule{} - _ appmodule.HasRegisterInterfaces = AppModule{} - _ module.AppModuleSimulation = AppModule{} - _ appmodulev2.HasGenesis = AppModule{} + _ module.HasName = AppModule{} + _ module.HasAminoCodec = AppModule{} + _ module.HasGRPCGateway = AppModule{} + _ module.AppModuleSimulation = AppModule{} - _ appmodule.AppModule = AppModule{} - _ appmodule.HasBeginBlocker = AppModule{} - _ appmodule.HasServices = AppModule{} - _ appmodule.HasMigrations = AppModule{} + _ appmodule.HasRegisterInterfaces = AppModule{} + _ appmodule.HasGenesis = AppModule{} + _ appmodule.AppModule = AppModule{} + _ appmodule.HasBeginBlocker = AppModule{} + _ appmodule.HasServices = AppModule{} + _ appmodule.HasMigrations = AppModule{} ) // AppModule implements the sdk.AppModule interface diff --git a/x/bank/module.go b/x/bank/module.go index cee6253cd31a..62bafcb41778 100644 --- a/x/bank/module.go +++ b/x/bank/module.go @@ -10,7 +10,6 @@ import ( "google.golang.org/grpc" "cosmossdk.io/core/appmodule" - appmodulev2 "cosmossdk.io/core/appmodule/v2" "cosmossdk.io/core/registry" "cosmossdk.io/x/bank/client/cli" "cosmossdk.io/x/bank/keeper" @@ -28,17 +27,17 @@ import ( const ConsensusVersion = 4 var ( - _ module.HasName = AppModule{} - _ module.HasAminoCodec = AppModule{} - _ module.HasGRPCGateway = AppModule{} + _ module.HasName = AppModule{} + _ module.HasAminoCodec = AppModule{} + _ module.HasGRPCGateway = AppModule{} + _ module.AppModuleSimulation = AppModule{} + _ module.HasInvariants = AppModule{} + + _ appmodule.AppModule = AppModule{} + _ appmodule.HasServices = AppModule{} + _ appmodule.HasMigrations = AppModule{} + _ appmodule.HasGenesis = AppModule{} _ appmodule.HasRegisterInterfaces = AppModule{} - _ module.AppModuleSimulation = AppModule{} - _ appmodulev2.HasGenesis = AppModule{} - _ module.HasInvariants = AppModule{} - - _ appmodule.AppModule = AppModule{} - _ appmodule.HasServices = AppModule{} - _ appmodule.HasMigrations = AppModule{} ) // AppModule implements an application module for the bank module. diff --git a/x/circuit/module.go b/x/circuit/module.go index 71dc7ca417dc..c33d1c69e8c8 100644 --- a/x/circuit/module.go +++ b/x/circuit/module.go @@ -10,7 +10,6 @@ import ( "google.golang.org/grpc" "cosmossdk.io/core/appmodule" - appmodulev2 "cosmossdk.io/core/appmodule/v2" "cosmossdk.io/core/registry" "cosmossdk.io/x/circuit/keeper" "cosmossdk.io/x/circuit/types" @@ -25,13 +24,13 @@ import ( const ConsensusVersion = 1 var ( - _ module.HasName = AppModule{} - _ module.HasGRPCGateway = AppModule{} - _ appmodule.HasRegisterInterfaces = AppModule{} - _ appmodulev2.HasGenesis = AppModule{} + _ module.HasName = AppModule{} + _ module.HasGRPCGateway = AppModule{} - _ appmodule.AppModule = AppModule{} - _ appmodule.HasServices = AppModule{} + _ appmodule.AppModule = AppModule{} + _ appmodule.HasServices = AppModule{} + _ appmodule.HasGenesis = AppModule{} + _ appmodule.HasRegisterInterfaces = AppModule{} ) // AppModule implements an application module for the circuit module. diff --git a/x/consensus/module.go b/x/consensus/module.go index 107ac6431b3c..c77502cc5ee3 100644 --- a/x/consensus/module.go +++ b/x/consensus/module.go @@ -20,12 +20,12 @@ import ( const ConsensusVersion = 1 var ( - _ module.HasName = AppModule{} - _ module.HasAminoCodec = AppModule{} - _ module.HasGRPCGateway = AppModule{} - _ appmodule.HasRegisterInterfaces = AppModule{} + _ module.HasName = AppModule{} + _ module.HasAminoCodec = AppModule{} + _ module.HasGRPCGateway = AppModule{} - _ appmodule.AppModule = AppModule{} + _ appmodule.AppModule = AppModule{} + _ appmodule.HasRegisterInterfaces = AppModule{} ) // AppModule implements an application module diff --git a/x/counter/module.go b/x/counter/module.go index 5f4ea4312498..314db6ebefed 100644 --- a/x/counter/module.go +++ b/x/counter/module.go @@ -12,10 +12,10 @@ import ( ) var ( - _ module.HasName = AppModule{} - _ appmodule.HasRegisterInterfaces = AppModule{} + _ module.HasName = AppModule{} - _ appmodule.AppModule = AppModule{} + _ appmodule.AppModule = AppModule{} + _ appmodule.HasRegisterInterfaces = AppModule{} ) // AppModule implements an application module diff --git a/x/crisis/module.go b/x/crisis/module.go index 3773561197aa..bc981e86cea2 100644 --- a/x/crisis/module.go +++ b/x/crisis/module.go @@ -10,7 +10,6 @@ import ( "google.golang.org/grpc" "cosmossdk.io/core/appmodule" - appmodulev2 "cosmossdk.io/core/appmodule/v2" "cosmossdk.io/core/registry" "github.com/cosmos/cosmos-sdk/codec" @@ -24,15 +23,15 @@ import ( const ConsensusVersion = 2 var ( - _ module.HasName = AppModule{} - _ module.HasAminoCodec = AppModule{} - _ appmodule.HasRegisterInterfaces = AppModule{} - _ appmodulev2.HasGenesis = AppModule{} + _ module.HasName = AppModule{} + _ module.HasAminoCodec = AppModule{} - _ appmodule.AppModule = AppModule{} - _ appmodule.HasEndBlocker = AppModule{} - _ appmodule.HasServices = AppModule{} - _ appmodule.HasMigrations = AppModule{} + _ appmodule.AppModule = AppModule{} + _ appmodule.HasEndBlocker = AppModule{} + _ appmodule.HasServices = AppModule{} + _ appmodule.HasMigrations = AppModule{} + _ appmodule.HasRegisterInterfaces = AppModule{} + _ appmodule.HasGenesis = AppModule{} ) // Module init related flags diff --git a/x/distribution/module.go b/x/distribution/module.go index 116c613190ed..0d61ce1c47a1 100644 --- a/x/distribution/module.go +++ b/x/distribution/module.go @@ -10,7 +10,6 @@ import ( "google.golang.org/grpc" "cosmossdk.io/core/appmodule" - appmodulev2 "cosmossdk.io/core/appmodule/v2" "cosmossdk.io/core/registry" "cosmossdk.io/x/distribution/client/cli" "cosmossdk.io/x/distribution/keeper" @@ -28,18 +27,18 @@ import ( const ConsensusVersion = 4 var ( - _ module.HasName = AppModule{} - _ module.HasAminoCodec = AppModule{} - _ module.HasGRPCGateway = AppModule{} + _ module.HasName = AppModule{} + _ module.HasAminoCodec = AppModule{} + _ module.HasGRPCGateway = AppModule{} + _ module.AppModuleSimulation = AppModule{} + _ module.HasInvariants = AppModule{} + + _ appmodule.AppModule = AppModule{} + _ appmodule.HasBeginBlocker = AppModule{} + _ appmodule.HasServices = AppModule{} + _ appmodule.HasMigrations = AppModule{} _ appmodule.HasRegisterInterfaces = AppModule{} - _ module.AppModuleSimulation = AppModule{} - _ appmodulev2.HasGenesis = AppModule{} - _ module.HasInvariants = AppModule{} - - _ appmodule.AppModule = AppModule{} - _ appmodule.HasBeginBlocker = AppModule{} - _ appmodule.HasServices = AppModule{} - _ appmodule.HasMigrations = AppModule{} + _ appmodule.HasGenesis = AppModule{} ) // AppModule implements an application module for the distribution module. diff --git a/x/evidence/module.go b/x/evidence/module.go index 85ae9866b078..54d0ded5353b 100644 --- a/x/evidence/module.go +++ b/x/evidence/module.go @@ -10,7 +10,6 @@ import ( "google.golang.org/grpc" "cosmossdk.io/core/appmodule" - appmodulev2 "cosmossdk.io/core/appmodule/v2" "cosmossdk.io/core/registry" eviclient "cosmossdk.io/x/evidence/client" "cosmossdk.io/x/evidence/client/cli" @@ -25,15 +24,15 @@ import ( ) var ( - _ module.HasName = AppModule{} - _ module.HasAminoCodec = AppModule{} - _ module.HasGRPCGateway = AppModule{} - _ appmodule.HasRegisterInterfaces = AppModule{} - _ module.AppModuleSimulation = AppModule{} - _ appmodulev2.HasGenesis = AppModule{} + _ module.HasName = AppModule{} + _ module.HasAminoCodec = AppModule{} + _ module.HasGRPCGateway = AppModule{} + _ module.AppModuleSimulation = AppModule{} - _ appmodule.AppModule = AppModule{} - _ appmodule.HasBeginBlocker = AppModule{} + _ appmodule.AppModule = AppModule{} + _ appmodule.HasBeginBlocker = AppModule{} + _ appmodule.HasRegisterInterfaces = AppModule{} + _ appmodule.HasGenesis = AppModule{} ) const ConsensusVersion = 1 diff --git a/x/feegrant/module/module.go b/x/feegrant/module/module.go index 42edb16f1ded..4f4ce2f29da3 100644 --- a/x/feegrant/module/module.go +++ b/x/feegrant/module/module.go @@ -10,7 +10,6 @@ import ( "google.golang.org/grpc" "cosmossdk.io/core/appmodule" - appmodulev2 "cosmossdk.io/core/appmodule/v2" "cosmossdk.io/core/registry" "cosmossdk.io/errors" "cosmossdk.io/x/feegrant" @@ -24,17 +23,17 @@ import ( ) var ( - _ module.HasName = AppModule{} - _ module.HasAminoCodec = AppModule{} - _ module.HasGRPCGateway = AppModule{} + _ module.HasName = AppModule{} + _ module.HasAminoCodec = AppModule{} + _ module.HasGRPCGateway = AppModule{} + _ module.AppModuleSimulation = AppModule{} + + _ appmodule.AppModule = AppModule{} + _ appmodule.HasEndBlocker = AppModule{} + _ appmodule.HasServices = AppModule{} + _ appmodule.HasMigrations = AppModule{} + _ appmodule.HasGenesis = AppModule{} _ appmodule.HasRegisterInterfaces = AppModule{} - _ module.AppModuleSimulation = AppModule{} - _ appmodulev2.HasGenesis = AppModule{} - - _ appmodule.AppModule = AppModule{} - _ appmodule.HasEndBlocker = AppModule{} - _ appmodule.HasServices = AppModule{} - _ appmodule.HasMigrations = AppModule{} ) // AppModule implements an application module for the feegrant module. diff --git a/x/genutil/module.go b/x/genutil/module.go index b16694ec2f6e..a37b7f021d3e 100644 --- a/x/genutil/module.go +++ b/x/genutil/module.go @@ -5,8 +5,6 @@ import ( "encoding/json" "fmt" - abci "github.com/cometbft/cometbft/abci/types" - "cosmossdk.io/core/appmodule" "cosmossdk.io/core/genesis" "cosmossdk.io/core/registry" @@ -77,19 +75,39 @@ func (am AppModule) ValidateGenesis(bz json.RawMessage) error { } // InitGenesis performs genesis initialization for the genutil module. -func (am AppModule) InitGenesis(ctx context.Context, data json.RawMessage) []abci.ValidatorUpdate { +func (am AppModule) InitGenesis(ctx context.Context, data json.RawMessage) ([]module.ValidatorUpdate, error) { var genesisState types.GenesisState am.cdc.MustUnmarshalJSON(data, &genesisState) - validators, err := InitGenesis(ctx, am.stakingKeeper, am.deliverTx, genesisState, am.txEncodingConfig) + cometValidatorUpdates, err := InitGenesis(ctx, am.stakingKeeper, am.deliverTx, genesisState, am.txEncodingConfig) if err != nil { - panic(err) + return nil, err + } + + validatorUpdates := make([]module.ValidatorUpdate, len(cometValidatorUpdates)) + for i, v := range cometValidatorUpdates { + if ed25519 := v.PubKey.GetEd25519(); len(ed25519) > 0 { + validatorUpdates[i] = module.ValidatorUpdate{ + PubKey: ed25519, + PubKeyType: "ed25519", + Power: v.Power, + } + } else if secp256k1 := v.PubKey.GetSecp256K1(); len(secp256k1) > 0 { + validatorUpdates[i] = module.ValidatorUpdate{ + PubKey: secp256k1, + PubKeyType: "secp256k1", + Power: v.Power, + } + } else { + return nil, fmt.Errorf("unexpected validator pubkey type: %T", v.PubKey) + } } - return validators + + return validatorUpdates, nil } // ExportGenesis returns the exported genesis state as raw bytes for the genutil module. -func (am AppModule) ExportGenesis(_ context.Context) json.RawMessage { - return am.DefaultGenesis() +func (am AppModule) ExportGenesis(_ context.Context) (json.RawMessage, error) { + return am.DefaultGenesis(), nil } // GenTxValidator returns the genutil module's genesis transaction validator. diff --git a/x/gov/module.go b/x/gov/module.go index aa5069183b86..d36627293a2c 100644 --- a/x/gov/module.go +++ b/x/gov/module.go @@ -10,7 +10,6 @@ import ( "google.golang.org/grpc" "cosmossdk.io/core/appmodule" - appmodulev2 "cosmossdk.io/core/appmodule/v2" "cosmossdk.io/core/registry" govclient "cosmossdk.io/x/gov/client" "cosmossdk.io/x/gov/client/cli" @@ -30,18 +29,18 @@ import ( const ConsensusVersion = 6 var ( - _ module.HasName = AppModule{} - _ module.HasAminoCodec = AppModule{} - _ module.HasGRPCGateway = AppModule{} + _ module.HasName = AppModule{} + _ module.HasAminoCodec = AppModule{} + _ module.HasGRPCGateway = AppModule{} + _ module.AppModuleSimulation = AppModule{} + _ module.HasInvariants = AppModule{} + + _ appmodule.AppModule = AppModule{} + _ appmodule.HasEndBlocker = AppModule{} + _ appmodule.HasServices = AppModule{} + _ appmodule.HasMigrations = AppModule{} _ appmodule.HasRegisterInterfaces = AppModule{} - _ module.AppModuleSimulation = AppModule{} - _ appmodulev2.HasGenesis = AppModule{} - _ module.HasInvariants = AppModule{} - - _ appmodule.AppModule = AppModule{} - _ appmodule.HasEndBlocker = AppModule{} - _ appmodule.HasServices = AppModule{} - _ appmodule.HasMigrations = AppModule{} + _ appmodule.HasGenesis = AppModule{} ) // AppModule implements an application module for the gov module. diff --git a/x/group/module/module.go b/x/group/module/module.go index ab323da0b01f..a1f00cd9f1fa 100644 --- a/x/group/module/module.go +++ b/x/group/module/module.go @@ -10,7 +10,6 @@ import ( "google.golang.org/grpc" "cosmossdk.io/core/appmodule" - appmodulev2 "cosmossdk.io/core/appmodule/v2" "cosmossdk.io/core/registry" "cosmossdk.io/x/group" "cosmossdk.io/x/group/client/cli" @@ -29,18 +28,18 @@ import ( const ConsensusVersion = 2 var ( - _ module.HasName = AppModule{} - _ module.HasAminoCodec = AppModule{} - _ module.HasGRPCGateway = AppModule{} + _ module.HasName = AppModule{} + _ module.HasAminoCodec = AppModule{} + _ module.HasGRPCGateway = AppModule{} + _ module.AppModuleSimulation = AppModule{} + _ module.HasInvariants = AppModule{} + + _ appmodule.AppModule = AppModule{} + _ appmodule.HasEndBlocker = AppModule{} + _ appmodule.HasServices = AppModule{} + _ appmodule.HasMigrations = AppModule{} _ appmodule.HasRegisterInterfaces = AppModule{} - _ module.AppModuleSimulation = AppModule{} - _ appmodulev2.HasGenesis = AppModule{} - _ module.HasInvariants = AppModule{} - - _ appmodule.AppModule = AppModule{} - _ appmodule.HasEndBlocker = AppModule{} - _ appmodule.HasServices = AppModule{} - _ appmodule.HasMigrations = AppModule{} + _ appmodule.HasGenesis = AppModule{} ) type AppModule struct { diff --git a/x/mint/module.go b/x/mint/module.go index 2336c6306ef0..49192c2230a8 100644 --- a/x/mint/module.go +++ b/x/mint/module.go @@ -9,7 +9,6 @@ import ( "google.golang.org/grpc" "cosmossdk.io/core/appmodule" - appmodulev2 "cosmossdk.io/core/appmodule/v2" "cosmossdk.io/core/registry" "cosmossdk.io/x/mint/keeper" "cosmossdk.io/x/mint/simulation" @@ -25,17 +24,17 @@ import ( const ConsensusVersion = 2 var ( - _ module.HasName = AppModule{} - _ module.HasAminoCodec = AppModule{} - _ module.HasGRPCGateway = AppModule{} + _ module.HasName = AppModule{} + _ module.HasAminoCodec = AppModule{} + _ module.HasGRPCGateway = AppModule{} + _ module.AppModuleSimulation = AppModule{} + + _ appmodule.AppModule = AppModule{} + _ appmodule.HasBeginBlocker = AppModule{} + _ appmodule.HasServices = AppModule{} + _ appmodule.HasMigrations = AppModule{} _ appmodule.HasRegisterInterfaces = AppModule{} - _ module.AppModuleSimulation = AppModule{} - _ appmodulev2.HasGenesis = AppModule{} - - _ appmodule.AppModule = AppModule{} - _ appmodule.HasBeginBlocker = AppModule{} - _ appmodule.HasServices = AppModule{} - _ appmodule.HasMigrations = AppModule{} + _ appmodule.HasGenesis = AppModule{} ) // AppModule implements an application module for the mint module. diff --git a/x/nft/module/module.go b/x/nft/module/module.go index 9a5ca47effa0..c9a8e8b5b484 100644 --- a/x/nft/module/module.go +++ b/x/nft/module/module.go @@ -8,7 +8,6 @@ import ( "google.golang.org/grpc" "cosmossdk.io/core/appmodule" - appmodulev2 "cosmossdk.io/core/appmodule/v2" "cosmossdk.io/core/registry" "cosmossdk.io/errors" "cosmossdk.io/x/nft" @@ -23,13 +22,13 @@ import ( ) var ( - _ module.HasName = AppModule{} - _ module.HasGRPCGateway = AppModule{} - _ appmodule.HasRegisterInterfaces = AppModule{} - _ module.AppModuleSimulation = AppModule{} - _ appmodulev2.HasGenesis = AppModule{} + _ module.HasName = AppModule{} + _ module.HasGRPCGateway = AppModule{} + _ module.AppModuleSimulation = AppModule{} - _ appmodule.AppModule = AppModule{} + _ appmodule.AppModule = AppModule{} + _ appmodule.HasGenesis = AppModule{} + _ appmodule.HasRegisterInterfaces = AppModule{} ) const ConsensusVersion = 1 diff --git a/x/params/module.go b/x/params/module.go index 5cd796cc867c..6622e045a2e8 100644 --- a/x/params/module.go +++ b/x/params/module.go @@ -18,14 +18,14 @@ import ( ) var ( - _ module.HasName = AppModule{} - _ module.HasAminoCodec = AppModule{} - _ module.HasGRPCGateway = AppModule{} - _ appmodule.HasRegisterInterfaces = AppModule{} - _ module.AppModuleSimulation = AppModule{} + _ module.HasName = AppModule{} + _ module.HasAminoCodec = AppModule{} + _ module.HasGRPCGateway = AppModule{} + _ module.AppModuleSimulation = AppModule{} - _ appmodule.AppModule = AppModule{} - _ appmodule.HasServices = AppModule{} + _ appmodule.AppModule = AppModule{} + _ appmodule.HasServices = AppModule{} + _ appmodule.HasRegisterInterfaces = AppModule{} ) // ConsensusVersion defines the current x/params module consensus version. diff --git a/x/protocolpool/module.go b/x/protocolpool/module.go index 4539e9b1ab28..c9683d2fa570 100644 --- a/x/protocolpool/module.go +++ b/x/protocolpool/module.go @@ -9,7 +9,6 @@ import ( "google.golang.org/grpc" "cosmossdk.io/core/appmodule" - appmodulev2 "cosmossdk.io/core/appmodule/v2" "cosmossdk.io/core/registry" "cosmossdk.io/x/protocolpool/keeper" "cosmossdk.io/x/protocolpool/types" @@ -23,16 +22,15 @@ import ( const ConsensusVersion = 1 var ( - _ module.HasName = AppModule{} - _ module.HasAminoCodec = AppModule{} - _ module.HasGRPCGateway = AppModule{} - _ module.HasRegisterInterfaces = AppModule{} - _ module.AppModule = AppModule{} - _ module.AppModuleSimulation = AppModule{} - _ appmodulev2.HasGenesis = AppModule{} - - _ appmodule.AppModule = AppModule{} - _ appmodule.HasServices = AppModule{} + _ module.HasName = AppModule{} + _ module.HasAminoCodec = AppModule{} + _ module.HasGRPCGateway = AppModule{} + _ module.AppModuleSimulation = AppModule{} + + _ appmodule.AppModule = AppModule{} + _ appmodule.HasServices = AppModule{} + _ appmodule.HasGenesis = AppModule{} + _ appmodule.HasRegisterInterfaces = AppModule{} ) // AppModule implements an application module for the pool module diff --git a/x/slashing/module.go b/x/slashing/module.go index 875727d62c0b..7d8499629a3c 100644 --- a/x/slashing/module.go +++ b/x/slashing/module.go @@ -9,7 +9,6 @@ import ( "google.golang.org/grpc" "cosmossdk.io/core/appmodule" - appmodulev2 "cosmossdk.io/core/appmodule/v2" "cosmossdk.io/core/registry" "cosmossdk.io/x/slashing/keeper" "cosmossdk.io/x/slashing/simulation" @@ -26,17 +25,17 @@ import ( const ConsensusVersion = 4 var ( - _ module.HasName = AppModule{} - _ module.HasAminoCodec = AppModule{} - _ module.HasGRPCGateway = AppModule{} - _ module.HasRegisterInterfaces = AppModule{} - _ module.AppModuleSimulation = AppModule{} - _ appmodulev2.HasGenesis = AppModule{} - - _ appmodule.AppModule = AppModule{} - _ appmodule.HasBeginBlocker = AppModule{} - _ appmodule.HasServices = AppModule{} - _ appmodule.HasMigrations = AppModule{} + _ module.HasName = AppModule{} + _ module.HasAminoCodec = AppModule{} + _ module.HasGRPCGateway = AppModule{} + _ module.AppModuleSimulation = AppModule{} + + _ appmodule.AppModule = AppModule{} + _ appmodule.HasBeginBlocker = AppModule{} + _ appmodule.HasServices = AppModule{} + _ appmodule.HasMigrations = AppModule{} + _ appmodule.HasGenesis = AppModule{} + _ appmodule.HasRegisterInterfaces = AppModule{} ) // AppModule implements an application module for the slashing module. diff --git a/x/staking/CHANGELOG.md b/x/staking/CHANGELOG.md index 4e635690e03c..522fc2dce0e3 100644 --- a/x/staking/CHANGELOG.md +++ b/x/staking/CHANGELOG.md @@ -41,7 +41,8 @@ Ref: https://keepachangelog.com/en/1.0.0/ ### API Breaking Changes -* [#18198](https://github.com/cosmos/cosmos-sdk/pull/18198): `Validator` and `Delegator` interfaces were moved to `github.com/cosmos/cosmos-sdk/types` to avoid interface dependency on staking in other modules. +* [#19735](https://github.com/cosmos/cosmos-sdk/pull/19735) Update genesis api to match new `appmodule.HasGenesis` interface. +* [#18198](https://github.com/cosmos/cosmos-sdk/pull/18198) `Validator` and `Delegator` interfaces were moved to `github.com/cosmos/cosmos-sdk/types` to avoid interface dependency on staking in other modules. * [#17778](https://github.com/cosmos/cosmos-sdk/pull/17778) Use collections for `Params` * remove from `Keeper`: `GetParams`, `SetParams` * [#17486](https://github.com/cosmos/cosmos-sdk/pull/17486) Use collections for `RedelegationQueueKey`: diff --git a/x/staking/module.go b/x/staking/module.go index bbeefee67e85..c841b70546f3 100644 --- a/x/staking/module.go +++ b/x/staking/module.go @@ -5,7 +5,6 @@ import ( "encoding/json" "fmt" - abci "github.com/cometbft/cometbft/abci/types" gwruntime "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" "google.golang.org/grpc" @@ -28,19 +27,19 @@ const ( ) var ( - _ module.AppModuleSimulation = AppModule{} - _ module.HasName = AppModule{} - _ module.HasAminoCodec = AppModule{} - _ module.HasGRPCGateway = AppModule{} + _ module.AppModuleSimulation = AppModule{} + _ module.HasName = AppModule{} + _ module.HasAminoCodec = AppModule{} + _ module.HasGRPCGateway = AppModule{} + _ module.HasInvariants = AppModule{} + _ module.HasABCIGenesis = AppModule{} + _ module.HasABCIEndBlock = AppModule{} + + _ appmodule.AppModule = AppModule{} + _ appmodule.HasBeginBlocker = AppModule{} + _ appmodule.HasServices = AppModule{} + _ appmodule.HasMigrations = AppModule{} _ appmodule.HasRegisterInterfaces = AppModule{} - _ module.HasInvariants = AppModule{} - _ module.HasABCIGenesis = AppModule{} - _ module.HasABCIEndBlock = AppModule{} - - _ appmodule.AppModule = AppModule{} - _ appmodule.HasBeginBlocker = AppModule{} - _ appmodule.HasServices = AppModule{} - _ appmodule.HasMigrations = AppModule{} _ depinject.OnePerModuleType = AppModule{} ) @@ -146,18 +145,37 @@ func (am AppModule) ValidateGenesis(bz json.RawMessage) error { } // InitGenesis performs genesis initialization for the staking module. -func (am AppModule) InitGenesis(ctx context.Context, data json.RawMessage) []abci.ValidatorUpdate { +func (am AppModule) InitGenesis(ctx context.Context, data json.RawMessage) ([]module.ValidatorUpdate, error) { var genesisState types.GenesisState am.cdc.MustUnmarshalJSON(data, &genesisState) - return am.keeper.InitGenesis(ctx, &genesisState) + cometValidatorUpdates := am.keeper.InitGenesis(ctx, &genesisState) // TODO: refactor to return ValidatorUpdate higher up the stack + validatorUpdates := make([]module.ValidatorUpdate, len(cometValidatorUpdates)) + for i, v := range cometValidatorUpdates { + if ed25519 := v.PubKey.GetEd25519(); len(ed25519) > 0 { + validatorUpdates[i] = module.ValidatorUpdate{ + PubKey: ed25519, + PubKeyType: "ed25519", + Power: v.Power, + } + } else if secp256k1 := v.PubKey.GetSecp256K1(); len(secp256k1) > 0 { + validatorUpdates[i] = module.ValidatorUpdate{ + PubKey: secp256k1, + PubKeyType: "secp256k1", + Power: v.Power, + } + } else { + return nil, fmt.Errorf("unexpected validator pubkey type: %T", v.PubKey) + } + } + + return validatorUpdates, nil } -// ExportGenesis returns the exported genesis state as raw bytes for the staking -// module. -func (am AppModule) ExportGenesis(ctx context.Context) json.RawMessage { - return am.cdc.MustMarshalJSON(am.keeper.ExportGenesis(ctx)) +// ExportGenesis returns the exported genesis state as raw bytes for the staking module. +func (am AppModule) ExportGenesis(ctx context.Context) (json.RawMessage, error) { + return am.cdc.MarshalJSON(am.keeper.ExportGenesis(ctx)) } // ConsensusVersion implements HasConsensusVersion @@ -169,6 +187,30 @@ func (am AppModule) BeginBlock(ctx context.Context) error { } // EndBlock returns the end blocker for the staking module. -func (am AppModule) EndBlock(ctx context.Context) ([]abci.ValidatorUpdate, error) { - return am.keeper.EndBlocker(ctx) +func (am AppModule) EndBlock(ctx context.Context) ([]module.ValidatorUpdate, error) { + cometValidatorUpdates, err := am.keeper.EndBlocker(ctx) // TODO: refactor to return appmodule.ValidatorUpdate higher up the stack + if err != nil { + return nil, err + } + + validatorUpdates := make([]module.ValidatorUpdate, len(cometValidatorUpdates)) + for i, v := range cometValidatorUpdates { + if ed25519 := v.PubKey.GetEd25519(); len(ed25519) > 0 { + validatorUpdates[i] = module.ValidatorUpdate{ + PubKey: ed25519, + PubKeyType: "ed25519", + Power: v.Power, + } + } else if secp256k1 := v.PubKey.GetSecp256K1(); len(secp256k1) > 0 { + validatorUpdates[i] = module.ValidatorUpdate{ + PubKey: secp256k1, + PubKeyType: "secp256k1", + Power: v.Power, + } + } else { + return nil, fmt.Errorf("unexpected validator pubkey type: %T", v.PubKey) + } + } + + return validatorUpdates, nil } diff --git a/x/upgrade/module.go b/x/upgrade/module.go index 7b7dbc50ec4d..8f011f79449a 100644 --- a/x/upgrade/module.go +++ b/x/upgrade/module.go @@ -10,7 +10,6 @@ import ( "google.golang.org/grpc" "cosmossdk.io/core/appmodule" - appmodulev2 "cosmossdk.io/core/appmodule/v2" "cosmossdk.io/core/registry" "cosmossdk.io/x/upgrade/client/cli" "cosmossdk.io/x/upgrade/keeper" @@ -29,16 +28,16 @@ func init() { const ConsensusVersion uint64 = 3 var ( - _ module.HasName = AppModule{} - _ module.HasAminoCodec = AppModule{} - _ module.HasGRPCGateway = AppModule{} - _ module.HasRegisterInterfaces = AppModule{} - _ appmodulev2.HasGenesis = AppModule{} - - _ appmodule.AppModule = AppModule{} - _ appmodule.HasPreBlocker = AppModule{} - _ appmodule.HasServices = AppModule{} - _ appmodule.HasMigrations = AppModule{} + _ module.HasName = AppModule{} + _ module.HasAminoCodec = AppModule{} + _ module.HasGRPCGateway = AppModule{} + + _ appmodule.AppModule = AppModule{} + _ appmodule.HasPreBlocker = AppModule{} + _ appmodule.HasServices = AppModule{} + _ appmodule.HasMigrations = AppModule{} + _ appmodule.HasGenesis = AppModule{} + _ appmodule.HasRegisterInterfaces = AppModule{} ) // AppModule implements the sdk.AppModule interface From db82004074bf97fe5a411318868ca0c3b8961d69 Mon Sep 17 00:00:00 2001 From: Chi Xiao Wen <940313784@qq.com> Date: Wed, 13 Mar 2024 19:44:43 +0800 Subject: [PATCH 16/30] refactor(x/**)!: genesis return errors (#19740) Co-authored-by: chixiaoxiao --- tests/integration/gov/genesis_test.go | 6 +- .../staking/keeper/genesis_test.go | 45 +++++----- x/authz/CHANGELOG.md | 2 +- x/authz/keeper/genesis.go | 3 +- x/bank/CHANGELOG.md | 1 + x/bank/keeper/genesis.go | 6 +- x/bank/keeper/genesis_test.go | 3 +- x/bank/keeper/keeper.go | 2 +- x/bank/module.go | 5 +- x/crisis/keeper/genesis.go | 6 +- x/crisis/keeper/genesis_test.go | 6 +- x/crisis/module.go | 5 +- x/distribution/CHANGELOG.md | 1 + x/distribution/keeper/genesis.go | 4 +- x/gov/CHANGELOG.md | 1 + x/gov/genesis.go | 6 +- x/group/CHANGELOG.md | 1 + x/group/keeper/genesis.go | 14 +-- x/group/keeper/genesis_test.go | 3 +- x/group/module/module.go | 5 +- x/nft/CHANGELOG.md | 4 + x/nft/keeper/genesis.go | 6 +- x/nft/keeper/keeper_test.go | 3 +- x/nft/keeper/msg_server_test.go | 3 +- x/nft/module/module.go | 5 +- x/slashing/CHANGELOG.md | 1 + x/slashing/keeper/genesis.go | 22 +++-- x/slashing/keeper/genesis_test.go | 3 +- x/slashing/module.go | 5 +- x/staking/CHANGELOG.md | 1 + x/staking/keeper/genesis.go | 86 ++++++++++--------- x/staking/module.go | 15 +++- 32 files changed, 167 insertions(+), 112 deletions(-) diff --git a/tests/integration/gov/genesis_test.go b/tests/integration/gov/genesis_test.go index 86599ff3073c..6cbe8e7be48c 100644 --- a/tests/integration/gov/genesis_test.go +++ b/tests/integration/gov/genesis_test.go @@ -102,8 +102,10 @@ func TestImportExportQueues(t *testing.T) { authGenState, err := s1.AccountKeeper.ExportGenesis(ctx) require.NoError(t, err) - bankGenState := s1.BankKeeper.ExportGenesis(ctx) - stakingGenState := s1.StakingKeeper.ExportGenesis(ctx) + bankGenState, err := s1.BankKeeper.ExportGenesis(ctx) + require.NoError(t, err) + stakingGenState, err := s1.StakingKeeper.ExportGenesis(ctx) + require.NoError(t, err) // export the state and import it into a new app govGenState, _ := gov.ExportGenesis(ctx, s1.GovKeeper) diff --git a/tests/integration/staking/keeper/genesis_test.go b/tests/integration/staking/keeper/genesis_test.go index 96527dd20942..128af43cbc60 100644 --- a/tests/integration/staking/keeper/genesis_test.go +++ b/tests/integration/staking/keeper/genesis_test.go @@ -98,9 +98,11 @@ func TestInitGenesis(t *testing.T) { delegations = append(delegations, genesisDelegations...) genesisState := types.NewGenesisState(params, validators, delegations) - vals := (f.stakingKeeper.InitGenesis(f.sdkCtx, genesisState)) + vals, err := (f.stakingKeeper.InitGenesis(f.sdkCtx, genesisState)) + assert.NilError(t, err) - actualGenesis := (f.stakingKeeper.ExportGenesis(f.sdkCtx)) + actualGenesis, err := (f.stakingKeeper.ExportGenesis(f.sdkCtx)) + assert.NilError(t, err) assert.DeepEqual(t, genesisState.Params, actualGenesis.Params) assert.DeepEqual(t, genesisState.Delegations, actualGenesis.Delegations) @@ -157,27 +159,23 @@ func TestInitGenesis_PoolsBalanceMismatch(t *testing.T) { BondDenom: "stake", } - require.Panics(t, func() { - // setting validator status to bonded so the balance counts towards bonded pool - validator.Status = types.Bonded - f.stakingKeeper.InitGenesis(f.sdkCtx, &types.GenesisState{ - Params: params, - Validators: []types.Validator{validator}, - }) - }, - // "should panic because bonded pool balance is different from bonded pool coins", - ) - - require.Panics(t, func() { - // setting validator status to unbonded so the balance counts towards not bonded pool - validator.Status = types.Unbonded - f.stakingKeeper.InitGenesis(f.sdkCtx, &types.GenesisState{ - Params: params, - Validators: []types.Validator{validator}, - }) - }, + // setting validator status to bonded so the balance counts towards bonded pool + validator.Status = types.Bonded + _, err = f.stakingKeeper.InitGenesis(f.sdkCtx, &types.GenesisState{ + Params: params, + Validators: []types.Validator{validator}, + }) + // "should error because bonded pool balance is different from bonded pool coins", + require.NotNil(t, err) + + // setting validator status to unbonded so the balance counts towards not bonded pool + validator.Status = types.Unbonded + _, err = f.stakingKeeper.InitGenesis(f.sdkCtx, &types.GenesisState{ + Params: params, + Validators: []types.Validator{validator}, + }) // "should panic because not bonded pool balance is different from not bonded pool coins", - ) + require.NotNil(t, err) } func TestInitGenesisLargeValidatorSet(t *testing.T) { @@ -228,7 +226,8 @@ func TestInitGenesisLargeValidatorSet(t *testing.T) { ), ) - vals := f.stakingKeeper.InitGenesis(f.sdkCtx, genesisState) + vals, err := f.stakingKeeper.InitGenesis(f.sdkCtx, genesisState) + assert.NilError(t, err) abcivals := make([]abci.ValidatorUpdate, 100) for i, val := range validators[:100] { diff --git a/x/authz/CHANGELOG.md b/x/authz/CHANGELOG.md index 0e4e5795d1c1..e6de2c18baca 100644 --- a/x/authz/CHANGELOG.md +++ b/x/authz/CHANGELOG.md @@ -35,7 +35,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ * [#19490](https://github.com/cosmos/cosmos-sdk/pull/19490) `appmodule.Environment` is received on the Keeper to get access to different application services. * [#18737](https://github.com/cosmos/cosmos-sdk/pull/18737) Update the keeper method `DequeueAndDeleteExpiredGrants` to take a limit argument for the number of grants to prune. * [#16509](https://github.com/cosmos/cosmos-sdk/pull/16509) `AcceptResponse` has been moved to sdk/types/authz and the `Updated` field is now of the type `sdk.Msg` instead of `authz.Authorization`. - +* [#19740](https://github.com/cosmos/cosmos-sdk/pull/19740) Verify `InitGenesis` and `ExportGenesis` module code and keeper code do not panic. ### Consensus Breaking Changes * [#19188](https://github.com/cosmos/cosmos-sdk/pull/19188) Remove creation of `BaseAccount` when sending a message to an account that does not exist. diff --git a/x/authz/keeper/genesis.go b/x/authz/keeper/genesis.go index e014f5265748..d5de1d741b09 100644 --- a/x/authz/keeper/genesis.go +++ b/x/authz/keeper/genesis.go @@ -2,6 +2,7 @@ package keeper import ( "context" + "errors" "cosmossdk.io/x/authz" @@ -28,7 +29,7 @@ func (k Keeper) InitGenesis(ctx context.Context, data *authz.GenesisState) error a, ok := entry.Authorization.GetCachedValue().(authz.Authorization) if !ok { - panic("expected authorization") + return errors.New("expected authorization") } err = k.SaveGrant(ctx, grantee, granter, a, entry.Expiration) diff --git a/x/bank/CHANGELOG.md b/x/bank/CHANGELOG.md index fc76c3c85efd..3d1944d2c446 100644 --- a/x/bank/CHANGELOG.md +++ b/x/bank/CHANGELOG.md @@ -38,6 +38,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ * [#17569](https://github.com/cosmos/cosmos-sdk/pull/17569) `BurnCoins` takes an address instead of a module name * [#19477](https://github.com/cosmos/cosmos-sdk/pull/19477) `appmodule.Environment` is passed to bank `NewKeeper` * [#19627](https://github.com/cosmos/cosmos-sdk/pull/19627) The genesis api has been updated to match `appmodule.HasGenesis`. +* [#19740](https://github.com/cosmos/cosmos-sdk/pull/19740) Verify `InitGenesis` and `ExportGenesis` module code and keeper code do not panic. ### Consensus Breaking Changes diff --git a/x/bank/keeper/genesis.go b/x/bank/keeper/genesis.go index 61a0729becab..dd094055c79a 100644 --- a/x/bank/keeper/genesis.go +++ b/x/bank/keeper/genesis.go @@ -57,10 +57,10 @@ func (k BaseKeeper) InitGenesis(ctx context.Context, genState *types.GenesisStat } // ExportGenesis returns the bank module's genesis state. -func (k BaseKeeper) ExportGenesis(ctx context.Context) *types.GenesisState { +func (k BaseKeeper) ExportGenesis(ctx context.Context) (*types.GenesisState, error) { totalSupply, _, err := k.GetPaginatedTotalSupply(ctx, &query.PageRequest{Limit: query.PaginationMaxLimit}) if err != nil { - panic(fmt.Errorf("unable to fetch total supply %v", err)) + return nil, fmt.Errorf("unable to fetch total supply %v", err) } rv := types.NewGenesisState( @@ -70,5 +70,5 @@ func (k BaseKeeper) ExportGenesis(ctx context.Context) *types.GenesisState { k.GetAllDenomMetaData(ctx), k.GetAllSendEnabledEntries(ctx), ) - return rv + return rv, nil } diff --git a/x/bank/keeper/genesis_test.go b/x/bank/keeper/genesis_test.go index 8798c51d5044..5462ca52802f 100644 --- a/x/bank/keeper/genesis_test.go +++ b/x/bank/keeper/genesis_test.go @@ -38,7 +38,8 @@ func (suite *KeeperTestSuite) TestExportGenesis() { suite.Require().NoError(suite.bankKeeper.SetParams(ctx, types.DefaultParams())) - exportGenesis := suite.bankKeeper.ExportGenesis(ctx) + exportGenesis, err := suite.bankKeeper.ExportGenesis(ctx) + suite.Require().NoError(err) suite.Require().Len(exportGenesis.Params.SendEnabled, 0) //nolint:staticcheck // we're testing the old way here suite.Require().Equal(types.DefaultParams().DefaultSendEnabled, exportGenesis.Params.DefaultSendEnabled) diff --git a/x/bank/keeper/keeper.go b/x/bank/keeper/keeper.go index e4d76312a419..c643eb01489b 100644 --- a/x/bank/keeper/keeper.go +++ b/x/bank/keeper/keeper.go @@ -27,7 +27,7 @@ type Keeper interface { WithMintCoinsRestriction(types.MintingRestrictionFn) BaseKeeper InitGenesis(context.Context, *types.GenesisState) error - ExportGenesis(context.Context) *types.GenesisState + ExportGenesis(context.Context) (*types.GenesisState, error) GetSupply(ctx context.Context, denom string) sdk.Coin HasSupply(ctx context.Context, denom string) bool diff --git a/x/bank/module.go b/x/bank/module.go index 62bafcb41778..6390360f4b0f 100644 --- a/x/bank/module.go +++ b/x/bank/module.go @@ -144,7 +144,10 @@ func (am AppModule) InitGenesis(ctx context.Context, data json.RawMessage) error // ExportGenesis returns the exported genesis state as raw bytes for the bank // module. func (am AppModule) ExportGenesis(ctx context.Context) (json.RawMessage, error) { - gs := am.keeper.ExportGenesis(ctx) + gs, err := am.keeper.ExportGenesis(ctx) + if err != nil { + return nil, err + } return am.cdc.MarshalJSON(gs) } diff --git a/x/crisis/keeper/genesis.go b/x/crisis/keeper/genesis.go index b2bd54af50df..f95f28ad937a 100644 --- a/x/crisis/keeper/genesis.go +++ b/x/crisis/keeper/genesis.go @@ -14,10 +14,10 @@ func (k *Keeper) InitGenesis(ctx context.Context, data *types.GenesisState) { } // ExportGenesis returns a GenesisState for a given context and keeper. -func (k *Keeper) ExportGenesis(ctx context.Context) *types.GenesisState { +func (k *Keeper) ExportGenesis(ctx context.Context) (*types.GenesisState, error) { constantFee, err := k.ConstantFee.Get(ctx) if err != nil { - panic(err) + return nil, err } - return types.NewGenesisState(constantFee) + return types.NewGenesisState(constantFee), nil } diff --git a/x/crisis/keeper/genesis_test.go b/x/crisis/keeper/genesis_test.go index a2b392c3a6a0..c49754d8561b 100644 --- a/x/crisis/keeper/genesis_test.go +++ b/x/crisis/keeper/genesis_test.go @@ -55,7 +55,8 @@ func (s *GenesisTestSuite) TestImportExportGenesis() { constantFee := sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(1000)) err := s.keeper.ConstantFee.Set(s.sdkCtx, constantFee) s.Require().NoError(err) - genesis := s.keeper.ExportGenesis(s.sdkCtx) + genesis, err := s.keeper.ExportGenesis(s.sdkCtx) + s.Require().NoError(err) // set constant fee to zero constantFee = sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(0)) @@ -63,7 +64,8 @@ func (s *GenesisTestSuite) TestImportExportGenesis() { s.Require().NoError(err) s.keeper.InitGenesis(s.sdkCtx, genesis) - newGenesis := s.keeper.ExportGenesis(s.sdkCtx) + newGenesis, err := s.keeper.ExportGenesis(s.sdkCtx) + s.Require().NoError(err) s.Require().Equal(genesis, newGenesis) } diff --git a/x/crisis/module.go b/x/crisis/module.go index bc981e86cea2..ad7c10e6e894 100644 --- a/x/crisis/module.go +++ b/x/crisis/module.go @@ -134,7 +134,10 @@ func (am AppModule) InitGenesis(ctx context.Context, data json.RawMessage) error // ExportGenesis returns the exported genesis state as raw bytes for the crisis module. func (am AppModule) ExportGenesis(ctx context.Context) (json.RawMessage, error) { - gs := am.keeper.ExportGenesis(ctx) + gs, err := am.keeper.ExportGenesis(ctx) + if err != nil { + return nil, err + } return am.cdc.MarshalJSON(gs) } diff --git a/x/distribution/CHANGELOG.md b/x/distribution/CHANGELOG.md index f1c3f4c59689..610ac8103bce 100644 --- a/x/distribution/CHANGELOG.md +++ b/x/distribution/CHANGELOG.md @@ -49,6 +49,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ * remove `Keeper`: `IterateValidatorCurrentRewards`, `GetValidatorCurrentRewards`, `SetValidatorCurrentRewards`, `DeleteValidatorCurrentRewards` * [#17657](https://github.com/cosmos/cosmos-sdk/pull/17657) The distribution module keeper now takes a new argument `PoolKeeper` in addition. * [#17670](https://github.com/cosmos/cosmos-sdk/pull/17670) `AllocateTokens` takes `comet.VoteInfos` instead of `[]abci.VoteInfo` +* [#19740](https://github.com/cosmos/cosmos-sdk/pull/19740) Verify `InitGenesis` and `ExportGenesis` module code and keeper code do not panic. ### Improvements diff --git a/x/distribution/keeper/genesis.go b/x/distribution/keeper/genesis.go index e77a1475551f..527ef35ba952 100644 --- a/x/distribution/keeper/genesis.go +++ b/x/distribution/keeper/genesis.go @@ -132,7 +132,7 @@ func (k Keeper) InitGenesis(ctx context.Context, data types.GenesisState) error // check if the module account exists moduleAcc := k.GetDistributionAccount(ctx) if moduleAcc == nil { - panic(fmt.Sprintf("%s module account has not been set", types.ModuleName)) + return fmt.Errorf("%s module account has not been set", types.ModuleName) } balances := k.bankKeeper.GetAllBalances(ctx, moduleAcc.GetAddress()) @@ -140,7 +140,7 @@ func (k Keeper) InitGenesis(ctx context.Context, data types.GenesisState) error k.authKeeper.SetModuleAccount(ctx, moduleAcc) } if !balances.Equal(moduleHoldingsInt) { - panic(fmt.Sprintf("distribution module balance does not match the module holdings: %s <-> %s", balances, moduleHoldingsInt)) + return fmt.Errorf("distribution module balance does not match the module holdings: %s <-> %s", balances, moduleHoldingsInt) } return nil } diff --git a/x/gov/CHANGELOG.md b/x/gov/CHANGELOG.md index 116e87afc38c..b1d565a9a4d4 100644 --- a/x/gov/CHANGELOG.md +++ b/x/gov/CHANGELOG.md @@ -67,6 +67,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ * [#18532](https://github.com/cosmos/cosmos-sdk/pull/18532) All functions that were taking an expedited bool parameter now take a `ProposalType` parameter instead. * [#17496](https://github.com/cosmos/cosmos-sdk/pull/17496) in `x/gov/types/v1beta1/vote.go` `NewVote` was removed, constructing the struct is required for this type. * [#19101](https://github.com/cosmos/cosmos-sdk/pull/19101) Move `QueryProposalVotesParams` and `QueryVoteParams` from the `types/v1` package to `utils` and remove unused `querier.go` file. +* [#19740](https://github.com/cosmos/cosmos-sdk/pull/19740) Verify `InitGenesis` and `ExportGenesis` module code and keeper code do not panic. ### Deprecated diff --git a/x/gov/genesis.go b/x/gov/genesis.go index 09975f458bf4..dd9e42b18017 100644 --- a/x/gov/genesis.go +++ b/x/gov/genesis.go @@ -32,7 +32,7 @@ func InitGenesis(ctx context.Context, ak types.AccountKeeper, bk types.BankKeepe // check if the deposits pool account exists moduleAcc := k.GetGovernanceAccount(ctx) if moduleAcc == nil { - panic(fmt.Sprintf("%s module account has not been set", types.ModuleName)) + return fmt.Errorf("%s module account has not been set", types.ModuleName) } var totalDeposits sdk.Coins @@ -79,9 +79,9 @@ func InitGenesis(ctx context.Context, ak types.AccountKeeper, bk types.BankKeepe ak.SetModuleAccount(ctx, moduleAcc) } - // check if total deposits equals balance, if it doesn't panic because there were export/import errors + // check if total deposits equals balance, if it doesn't return an error if !balance.Equal(totalDeposits) { - panic(fmt.Sprintf("expected module account was %s but we got %s", balance.String(), totalDeposits.String())) + return fmt.Errorf("expected module account was %s but we got %s", balance.String(), totalDeposits.String()) } return nil } diff --git a/x/group/CHANGELOG.md b/x/group/CHANGELOG.md index 9e67e2a664d1..0f6182d12bda 100644 --- a/x/group/CHANGELOG.md +++ b/x/group/CHANGELOG.md @@ -35,3 +35,4 @@ Ref: https://keepachangelog.com/en/1.0.0/ * [#19638](https://github.com/cosmos/cosmos-sdk/pull/19638) Migrate module to use `appmodule.Environment` router service so no `baseapp.MessageRouter` is required is `NewKeeper` anymore. * [#19489](https://github.com/cosmos/cosmos-sdk/pull/19489) `appmodule.Environment` is received on the Keeper to get access to different application services. * [#19410](https://github.com/cosmos/cosmos-sdk/pull/19410) Migrate to Store Service. +* [#19740](https://github.com/cosmos/cosmos-sdk/pull/19740) Verify `InitGenesis` and `ExportGenesis` module code and keeper code do not panic. diff --git a/x/group/keeper/genesis.go b/x/group/keeper/genesis.go index 70d61ff69230..a119a24bc32c 100644 --- a/x/group/keeper/genesis.go +++ b/x/group/keeper/genesis.go @@ -45,7 +45,7 @@ func (k Keeper) InitGenesis(ctx context.Context, cdc codec.JSONCodec, data json. } // ExportGenesis returns the group module's exported genesis. -func (k Keeper) ExportGenesis(ctx context.Context, _ codec.JSONCodec) *group.GenesisState { +func (k Keeper) ExportGenesis(ctx context.Context, _ codec.JSONCodec) (*group.GenesisState, error) { genesisState := group.NewGenesisState() var groups []*group.GroupInfo @@ -54,7 +54,7 @@ func (k Keeper) ExportGenesis(ctx context.Context, _ codec.JSONCodec) *group.Gen groupSeq, err := k.groupTable.Export(store, &groups) if err != nil { - panic(errors.Wrap(err, "groups")) + return nil, errors.Wrap(err, "groups") } genesisState.Groups = groups genesisState.GroupSeq = groupSeq @@ -62,14 +62,14 @@ func (k Keeper) ExportGenesis(ctx context.Context, _ codec.JSONCodec) *group.Gen var groupMembers []*group.GroupMember _, err = k.groupMemberTable.Export(store, &groupMembers) if err != nil { - panic(errors.Wrap(err, "group members")) + return nil, errors.Wrap(err, "group members") } genesisState.GroupMembers = groupMembers var groupPolicies []*group.GroupPolicyInfo _, err = k.groupPolicyTable.Export(store, &groupPolicies) if err != nil { - panic(errors.Wrap(err, "group policies")) + return nil, errors.Wrap(err, "group policies") } genesisState.GroupPolicies = groupPolicies genesisState.GroupPolicySeq = k.groupPolicySeq.CurVal(store) @@ -77,7 +77,7 @@ func (k Keeper) ExportGenesis(ctx context.Context, _ codec.JSONCodec) *group.Gen var proposals []*group.Proposal proposalSeq, err := k.proposalTable.Export(store, &proposals) if err != nil { - panic(errors.Wrap(err, "proposals")) + return nil, errors.Wrap(err, "proposals") } genesisState.Proposals = proposals genesisState.ProposalSeq = proposalSeq @@ -85,9 +85,9 @@ func (k Keeper) ExportGenesis(ctx context.Context, _ codec.JSONCodec) *group.Gen var votes []*group.Vote _, err = k.voteTable.Export(store, &votes) if err != nil { - panic(errors.Wrap(err, "votes")) + return nil, errors.Wrap(err, "votes") } genesisState.Votes = votes - return genesisState + return genesisState, nil } diff --git a/x/group/keeper/genesis_test.go b/x/group/keeper/genesis_test.go index 967867a1f271..ee92089f8c22 100644 --- a/x/group/keeper/genesis_test.go +++ b/x/group/keeper/genesis_test.go @@ -186,7 +186,8 @@ func (s *GenesisTestSuite) TestInitExportGenesis() { s.Require().Equal(votesRes.Votes[0], genesisState.Votes[0]) } - exported := s.keeper.ExportGenesis(sdkCtx, cdc) + exported, err := s.keeper.ExportGenesis(sdkCtx, cdc) + s.Require().NoError(err) bz, err := cdc.MarshalJSON(exported) s.Require().NoError(err) diff --git a/x/group/module/module.go b/x/group/module/module.go index a1f00cd9f1fa..9a044274ec7c 100644 --- a/x/group/module/module.go +++ b/x/group/module/module.go @@ -144,7 +144,10 @@ func (am AppModule) InitGenesis(ctx context.Context, data json.RawMessage) error // ExportGenesis returns the exported genesis state as raw bytes for the group module. func (am AppModule) ExportGenesis(ctx context.Context) (json.RawMessage, error) { - gs := am.keeper.ExportGenesis(ctx, am.cdc) + gs, err := am.keeper.ExportGenesis(ctx, am.cdc) + if err != nil { + return nil, err + } return am.cdc.MarshalJSON(gs) } diff --git a/x/nft/CHANGELOG.md b/x/nft/CHANGELOG.md index 8e939e4fe3d2..4c8cc88e930d 100644 --- a/x/nft/CHANGELOG.md +++ b/x/nft/CHANGELOG.md @@ -37,6 +37,10 @@ Ref: https://keepachangelog.com/en/1.0.0/ * [#19367](https://github.com/cosmos/cosmos-sdk/pull/19367) `appmodule.Environment` is received on the Keeper to get access to different application services +### API Breaking Changes + +* [#19740](https://github.com/cosmos/cosmos-sdk/pull/19740) Verify `InitGenesis` and `ExportGenesis` module code and keeper code do not panic. + ## [v0.1.0](https://github.com/cosmos/cosmos-sdk/releases/tag/x/nft/v0.1.0) - 2023-11-07 diff --git a/x/nft/keeper/genesis.go b/x/nft/keeper/genesis.go index 5e5dcae184fd..1c9aae22d73b 100644 --- a/x/nft/keeper/genesis.go +++ b/x/nft/keeper/genesis.go @@ -31,7 +31,7 @@ func (k Keeper) InitGenesis(ctx context.Context, data *nft.GenesisState) error { } // ExportGenesis returns a GenesisState for a given context. -func (k Keeper) ExportGenesis(ctx context.Context) *nft.GenesisState { +func (k Keeper) ExportGenesis(ctx context.Context) (*nft.GenesisState, error) { classes := k.GetClasses(ctx) nftMap := make(map[string][]*nft.NFT) for _, class := range classes { @@ -40,7 +40,7 @@ func (k Keeper) ExportGenesis(ctx context.Context) *nft.GenesisState { owner := k.GetOwner(ctx, n.ClassId, n.Id) ownerStr, err := k.ac.BytesToString(owner.Bytes()) if err != nil { - panic(err) + return nil, err } nftArr, ok := nftMap[ownerStr] if !ok { @@ -66,5 +66,5 @@ func (k Keeper) ExportGenesis(ctx context.Context) *nft.GenesisState { return &nft.GenesisState{ Classes: classes, Entries: entries, - } + }, nil } diff --git a/x/nft/keeper/keeper_test.go b/x/nft/keeper/keeper_test.go index e3ac2dfd0563..27c929bba25e 100644 --- a/x/nft/keeper/keeper_test.go +++ b/x/nft/keeper/keeper_test.go @@ -361,7 +361,8 @@ func (s *TestSuite) TestExportGenesis() { Nfts: []*nft.NFT{&expNFT}, }}, } - genesis := s.nftKeeper.ExportGenesis(s.ctx) + genesis, err := s.nftKeeper.ExportGenesis(s.ctx) + s.Require().NoError(err) s.Require().Equal(expGenesis, genesis) } diff --git a/x/nft/keeper/msg_server_test.go b/x/nft/keeper/msg_server_test.go index ae70d60b52d9..5209a7d4010f 100644 --- a/x/nft/keeper/msg_server_test.go +++ b/x/nft/keeper/msg_server_test.go @@ -41,7 +41,8 @@ func (s *TestSuite) TestSend() { Nfts: []*nft.NFT{&ExpNFT}, }}, } - genesis := s.nftKeeper.ExportGenesis(s.ctx) + genesis, err := s.nftKeeper.ExportGenesis(s.ctx) + s.Require().NoError(err) s.Require().Equal(expGenesis, genesis) testCases := []struct { diff --git a/x/nft/module/module.go b/x/nft/module/module.go index c9a8e8b5b484..1c61a048f53d 100644 --- a/x/nft/module/module.go +++ b/x/nft/module/module.go @@ -108,7 +108,10 @@ func (am AppModule) InitGenesis(ctx context.Context, data json.RawMessage) error // ExportGenesis returns the exported genesis state as raw bytes for the nft module. func (am AppModule) ExportGenesis(ctx context.Context) (json.RawMessage, error) { - gs := am.keeper.ExportGenesis(ctx) + gs, err := am.keeper.ExportGenesis(ctx) + if err != nil { + return nil, err + } return am.cdc.MarshalJSON(gs) } diff --git a/x/slashing/CHANGELOG.md b/x/slashing/CHANGELOG.md index c5e3852773ef..81a7018057d4 100644 --- a/x/slashing/CHANGELOG.md +++ b/x/slashing/CHANGELOG.md @@ -43,5 +43,6 @@ Ref: https://keepachangelog.com/en/1.0.0/ * remove from `Keeper`: `AddPubkey` * [#19440](https://github.com/cosmos/cosmos-sdk/pull/19440) Slashing Module creation takes `appmodule.Environment` instead of individual services * [#19458](https://github.com/cosmos/cosmos-sdk/pull/19458) ValidatorSigningInfo.IndexOffset is deprecated, and no longer used. The index is now derived using just the StartHeight. +* [#19740](https://github.com/cosmos/cosmos-sdk/pull/19740) Verify `InitGenesis` and `ExportGenesis` module code and keeper code do not panic. ### Bug Fixes diff --git a/x/slashing/keeper/genesis.go b/x/slashing/keeper/genesis.go index ac4af63f0054..f551fe748551 100644 --- a/x/slashing/keeper/genesis.go +++ b/x/slashing/keeper/genesis.go @@ -11,16 +11,19 @@ import ( // InitGenesis initializes default parameters and the keeper's address to // pubkey map. func (keeper Keeper) InitGenesis(ctx context.Context, stakingKeeper types.StakingKeeper, data *types.GenesisState) error { + var fnErr error err := stakingKeeper.IterateValidators(ctx, func(index int64, validator sdk.ValidatorI) bool { consPk, err := validator.ConsPubKey() if err != nil { - panic(err) + fnErr = err + return true } err = keeper.AddrPubkeyRelation.Set(ctx, consPk.Address(), consPk) if err != nil { - panic(err) + fnErr = err + return true } return false }, @@ -28,6 +31,9 @@ func (keeper Keeper) InitGenesis(ctx context.Context, stakingKeeper types.Stakin if err != nil { return err } + if fnErr != nil { + return fnErr + } for _, info := range data.SigningInfos { address, err := keeper.sk.ConsensusAddressCodec().StringToBytes(info.Address) @@ -62,17 +68,17 @@ func (keeper Keeper) InitGenesis(ctx context.Context, stakingKeeper types.Stakin // ExportGenesis writes the current store values // to a genesis file, which can be imported again // with InitGenesis -func (keeper Keeper) ExportGenesis(ctx context.Context) (data *types.GenesisState) { +func (keeper Keeper) ExportGenesis(ctx context.Context) (*types.GenesisState, error) { params, err := keeper.Params.Get(ctx) if err != nil { - panic(err) + return nil, err } signingInfos := make([]types.SigningInfo, 0) missedBlocks := make([]types.ValidatorMissedBlocks, 0) err = keeper.ValidatorSigningInfo.Walk(ctx, nil, func(address sdk.ConsAddress, info types.ValidatorSigningInfo) (stop bool, err error) { bechAddr, err := keeper.sk.ConsensusAddressCodec().BytesToString(address) if err != nil { - panic(err) + return true, err } signingInfos = append(signingInfos, types.SigningInfo{ Address: bechAddr, @@ -81,7 +87,7 @@ func (keeper Keeper) ExportGenesis(ctx context.Context) (data *types.GenesisStat localMissedBlocks, err := keeper.GetValidatorMissedBlocks(ctx, address) if err != nil { - panic(err) + return true, err } missedBlocks = append(missedBlocks, types.ValidatorMissedBlocks{ @@ -92,7 +98,7 @@ func (keeper Keeper) ExportGenesis(ctx context.Context) (data *types.GenesisStat return false, nil }) if err != nil { - panic(err) + return nil, err } - return types.NewGenesisState(params, signingInfos, missedBlocks) + return types.NewGenesisState(params, signingInfos, missedBlocks), nil } diff --git a/x/slashing/keeper/genesis_test.go b/x/slashing/keeper/genesis_test.go index c8ba1131da7c..0f5485c01bcf 100644 --- a/x/slashing/keeper/genesis_test.go +++ b/x/slashing/keeper/genesis_test.go @@ -30,7 +30,8 @@ func (s *KeeperTestSuite) TestExportAndInitGenesis() { s.Require().NoError(keeper.ValidatorSigningInfo.Set(ctx, consAddr1, info1)) s.Require().NoError(keeper.ValidatorSigningInfo.Set(ctx, consAddr2, info2)) - genesisState := keeper.ExportGenesis(ctx) + genesisState, err := keeper.ExportGenesis(ctx) + require.NoError(err) require.Equal(genesisState.Params, testutil.TestParams()) require.Len(genesisState.SigningInfos, 2) diff --git a/x/slashing/module.go b/x/slashing/module.go index 7d8499629a3c..1371ecdcee8e 100644 --- a/x/slashing/module.go +++ b/x/slashing/module.go @@ -146,7 +146,10 @@ func (am AppModule) InitGenesis(ctx context.Context, data json.RawMessage) error // ExportGenesis returns the exported genesis state as raw bytes for the slashing module. func (am AppModule) ExportGenesis(ctx context.Context) (json.RawMessage, error) { - gs := am.keeper.ExportGenesis(ctx) + gs, err := am.keeper.ExportGenesis(ctx) + if err != nil { + return nil, err + } return am.cdc.MarshalJSON(gs) } diff --git a/x/staking/CHANGELOG.md b/x/staking/CHANGELOG.md index 522fc2dce0e3..1cf49509062e 100644 --- a/x/staking/CHANGELOG.md +++ b/x/staking/CHANGELOG.md @@ -95,3 +95,4 @@ Ref: https://keepachangelog.com/en/1.0.0/ * [#18841](https://github.com/cosmos/cosmos-sdk/pull/18841) In a undelegation or redelegation if the shares being left delegated correspond to less than 1 token (in base denom) the entire delegation gets removed. * [#18142](https://github.com/cosmos/cosmos-sdk/pull/18142) Introduce `key_rotation_fee` param to calculate fees while rotating the keys * [#17655](https://github.com/cosmos/cosmos-sdk/pull/17655) `HistoricalInfo` was replaced with `HistoricalRecord`, it removes the validator set and comet header and only keep what is needed for IBC. +* [#19740](https://github.com/cosmos/cosmos-sdk/pull/19740) Verify `InitGenesis` and `ExportGenesis` module code and keeper code do not panic. \ No newline at end of file diff --git a/x/staking/keeper/genesis.go b/x/staking/keeper/genesis.go index f41e214219bd..662f56972e28 100644 --- a/x/staking/keeper/genesis.go +++ b/x/staking/keeper/genesis.go @@ -18,7 +18,7 @@ import ( // setting the indexes. In addition, it also sets any delegations found in // data. Finally, it updates the bonded validators. // Returns final validator set after applying all declaration and delegations -func (k Keeper) InitGenesis(ctx context.Context, data *types.GenesisState) (res []abci.ValidatorUpdate) { +func (k Keeper) InitGenesis(ctx context.Context, data *types.GenesisState) (res []abci.ValidatorUpdate, err error) { bondedTokens := math.ZeroInt() notBondedTokens := math.ZeroInt() @@ -32,42 +32,42 @@ func (k Keeper) InitGenesis(ctx context.Context, data *types.GenesisState) (res ctx = sdkCtx if err := k.Params.Set(ctx, data.Params); err != nil { - panic(err) + return nil, err } if err := k.LastTotalPower.Set(ctx, data.LastTotalPower); err != nil { - panic(err) + return nil, err } for _, validator := range data.Validators { if err := k.SetValidator(ctx, validator); err != nil { - panic(err) + return nil, err } // Manually set indices for the first time if err := k.SetValidatorByConsAddr(ctx, validator); err != nil { - panic(err) + return nil, err } if err := k.SetValidatorByPowerIndex(ctx, validator); err != nil { - panic(err) + return nil, err } // Call the creation hook if not exported if !data.Exported { valbz, err := k.ValidatorAddressCodec().StringToBytes(validator.GetOperator()) if err != nil { - panic(err) + return nil, err } if err := k.Hooks().AfterValidatorCreated(ctx, valbz); err != nil { - panic(err) + return nil, err } } // update timeslice if necessary if validator.IsUnbonding() { if err := k.InsertUnbondingValidatorQueue(ctx, validator); err != nil { - panic(err) + return nil, err } } @@ -79,48 +79,48 @@ func (k Keeper) InitGenesis(ctx context.Context, data *types.GenesisState) (res notBondedTokens = notBondedTokens.Add(validator.GetTokens()) default: - panic(fmt.Sprintf("invalid validator status: %v", validator.GetStatus())) + return nil, fmt.Errorf("invalid validator status: %v", validator.GetStatus()) } } for _, delegation := range data.Delegations { delegatorAddress, err := k.authKeeper.AddressCodec().StringToBytes(delegation.DelegatorAddress) if err != nil { - panic(fmt.Errorf("invalid delegator address: %s", err)) + return nil, fmt.Errorf("invalid delegator address: %s", err) } valAddr, err := k.validatorAddressCodec.StringToBytes(delegation.GetValidatorAddr()) if err != nil { - panic(err) + return nil, err } // Call the before-creation hook if not exported if !data.Exported { if err := k.Hooks().BeforeDelegationCreated(ctx, delegatorAddress, valAddr); err != nil { - panic(err) + return nil, err } } if err := k.SetDelegation(ctx, delegation); err != nil { - panic(err) + return nil, err } // Call the after-modification hook if not exported if !data.Exported { if err := k.Hooks().AfterDelegationModified(ctx, delegatorAddress, valAddr); err != nil { - panic(err) + return nil, err } } } for _, ubd := range data.UnbondingDelegations { if err := k.SetUnbondingDelegation(ctx, ubd); err != nil { - panic(err) + return nil, err } for _, entry := range ubd.Entries { if err := k.InsertUBDQueue(ctx, ubd, entry.CompletionTime); err != nil { - panic(err) + return nil, err } notBondedTokens = notBondedTokens.Add(entry.Balance) } @@ -128,12 +128,12 @@ func (k Keeper) InitGenesis(ctx context.Context, data *types.GenesisState) (res for _, red := range data.Redelegations { if err := k.SetRedelegation(ctx, red); err != nil { - panic(err) + return nil, err } for _, entry := range red.Entries { if err := k.InsertRedelegationQueue(ctx, red, entry.CompletionTime); err != nil { - panic(err) + return nil, err } } } @@ -144,7 +144,7 @@ func (k Keeper) InitGenesis(ctx context.Context, data *types.GenesisState) (res // check if the unbonded and bonded pools accounts exists bondedPool := k.GetBondedPool(ctx) if bondedPool == nil { - panic(fmt.Sprintf("%s module account has not been set", types.BondedPoolName)) + return nil, fmt.Errorf("%s module account has not been set", types.BondedPoolName) } // TODO: remove with genesis 2-phases refactor https://github.com/cosmos/cosmos-sdk/issues/2862 @@ -154,14 +154,14 @@ func (k Keeper) InitGenesis(ctx context.Context, data *types.GenesisState) (res k.authKeeper.SetModuleAccount(ctx, bondedPool) } - // if balance is different from bonded coins panic because genesis is most likely malformed + // if balance is different from bonded coins error because genesis is most likely malformed if !bondedBalance.Equal(bondedCoins) { - panic(fmt.Sprintf("bonded pool balance is different from bonded coins: %s <-> %s", bondedBalance, bondedCoins)) + return nil, fmt.Errorf("bonded pool balance is different from bonded coins: %s <-> %s", bondedBalance, bondedCoins) } notBondedPool := k.GetNotBondedPool(ctx) if notBondedPool == nil { - panic(fmt.Sprintf("%s module account has not been set", types.NotBondedPoolName)) + return nil, fmt.Errorf("%s module account has not been set", types.NotBondedPoolName) } notBondedBalance := k.bankKeeper.GetAllBalances(ctx, notBondedPool.GetAddress()) @@ -169,10 +169,10 @@ func (k Keeper) InitGenesis(ctx context.Context, data *types.GenesisState) (res k.authKeeper.SetModuleAccount(ctx, notBondedPool) } - // If balance is different from non bonded coins panic because genesis is most + // If balance is different from non bonded coins error because genesis is most // likely malformed. if !notBondedBalance.Equal(notBondedCoins) { - panic(fmt.Sprintf("not bonded pool balance is different from not bonded coins: %s <-> %s", notBondedBalance, notBondedCoins)) + return nil, fmt.Errorf("not bonded pool balance is different from not bonded coins: %s <-> %s", notBondedBalance, notBondedCoins) } // don't need to run CometBFT updates if we exported @@ -180,17 +180,17 @@ func (k Keeper) InitGenesis(ctx context.Context, data *types.GenesisState) (res for _, lv := range data.LastValidatorPowers { valAddr, err := k.validatorAddressCodec.StringToBytes(lv.Address) if err != nil { - panic(err) + return nil, err } err = k.SetLastValidatorPower(ctx, valAddr, lv.Power) if err != nil { - panic(err) + return nil, err } validator, err := k.GetValidator(ctx, valAddr) if err != nil { - panic(fmt.Sprintf("validator %s not found", lv.Address)) + return nil, fmt.Errorf("validator %s not found", lv.Address) } update := validator.ABCIValidatorUpdate(k.PowerReduction(ctx)) @@ -202,19 +202,19 @@ func (k Keeper) InitGenesis(ctx context.Context, data *types.GenesisState) (res res, err = k.ApplyAndReturnValidatorSetUpdates(ctx) if err != nil { - panic(err) + return nil, err } } - return res + return res, nil } // ExportGenesis returns a GenesisState for a given context and keeper. The // GenesisState will contain the pool, params, validators, and bonds found in // the keeper. -func (k Keeper) ExportGenesis(ctx context.Context) *types.GenesisState { +func (k Keeper) ExportGenesis(ctx context.Context) (*types.GenesisState, error) { var unbondingDelegations []types.UnbondingDelegation - + var fnErr error err := k.UnbondingDelegations.Walk( ctx, nil, @@ -224,7 +224,7 @@ func (k Keeper) ExportGenesis(ctx context.Context) *types.GenesisState { }, ) if err != nil { - panic(err) + return nil, err } var redelegations []types.Redelegation @@ -234,7 +234,7 @@ func (k Keeper) ExportGenesis(ctx context.Context) *types.GenesisState { return false }) if err != nil { - panic(err) + return nil, err } var lastValidatorPowers []types.LastValidatorPower @@ -242,33 +242,37 @@ func (k Keeper) ExportGenesis(ctx context.Context) *types.GenesisState { err = k.IterateLastValidatorPowers(ctx, func(addr sdk.ValAddress, power int64) (stop bool) { addrStr, err := k.validatorAddressCodec.BytesToString(addr) if err != nil { - panic(err) + fnErr = err + return true } lastValidatorPowers = append(lastValidatorPowers, types.LastValidatorPower{Address: addrStr, Power: power}) return false }) if err != nil { - panic(err) + return nil, err + } + if fnErr != nil { + return nil, fnErr } params, err := k.Params.Get(ctx) if err != nil { - panic(err) + return nil, err } totalPower, err := k.LastTotalPower.Get(ctx) if err != nil { - panic(err) + return nil, err } allDelegations, err := k.GetAllDelegations(ctx) if err != nil { - panic(err) + return nil, err } allValidators, err := k.GetAllValidators(ctx) if err != nil { - panic(err) + return nil, err } return &types.GenesisState{ @@ -280,5 +284,5 @@ func (k Keeper) ExportGenesis(ctx context.Context) *types.GenesisState { UnbondingDelegations: unbondingDelegations, Redelegations: redelegations, Exported: true, - } + }, nil } diff --git a/x/staking/module.go b/x/staking/module.go index c841b70546f3..359b0beb83ac 100644 --- a/x/staking/module.go +++ b/x/staking/module.go @@ -150,7 +150,10 @@ func (am AppModule) InitGenesis(ctx context.Context, data json.RawMessage) ([]mo am.cdc.MustUnmarshalJSON(data, &genesisState) - cometValidatorUpdates := am.keeper.InitGenesis(ctx, &genesisState) // TODO: refactor to return ValidatorUpdate higher up the stack + cometValidatorUpdates, err := am.keeper.InitGenesis(ctx, &genesisState) // TODO: refactor to return ValidatorUpdate higher up the stack + if err != nil { + return nil, err + } validatorUpdates := make([]module.ValidatorUpdate, len(cometValidatorUpdates)) for i, v := range cometValidatorUpdates { if ed25519 := v.PubKey.GetEd25519(); len(ed25519) > 0 { @@ -175,7 +178,15 @@ func (am AppModule) InitGenesis(ctx context.Context, data json.RawMessage) ([]mo // ExportGenesis returns the exported genesis state as raw bytes for the staking module. func (am AppModule) ExportGenesis(ctx context.Context) (json.RawMessage, error) { - return am.cdc.MarshalJSON(am.keeper.ExportGenesis(ctx)) + genesis, err := am.keeper.ExportGenesis(ctx) + if err != nil { + return nil, err + } + marshalJSON, err := am.cdc.MarshalJSON(genesis) + if err != nil { + return nil, err + } + return marshalJSON, nil } // ConsensusVersion implements HasConsensusVersion From 7193d88814de5830e39e769900a8c5b24804a956 Mon Sep 17 00:00:00 2001 From: Marko Date: Wed, 13 Mar 2024 12:45:04 +0100 Subject: [PATCH 17/30] chore(proto): add module safe query warning (#19743) --- api/cosmos/query/v1/query.pulsar.go | 4 +++- proto/cosmos/query/v1/query.proto | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/api/cosmos/query/v1/query.pulsar.go b/api/cosmos/query/v1/query.pulsar.go index 0c3a26a6f9a9..9cada85879eb 100644 --- a/api/cosmos/query/v1/query.pulsar.go +++ b/api/cosmos/query/v1/query.pulsar.go @@ -36,7 +36,9 @@ var file_cosmos_query_v1_query_proto_extTypes = []protoimpl.ExtensionInfo{ var ( // module_query_safe is set to true when the query is safe to be called from // within the state machine, for example from another module's Keeper, via - // ADR-033 calls or from CosmWasm contracts. + // a query router calls or from CosmWasm contracts. + // WARNING: marking a query as safe in a non consensus breaking release may cause non determinism. + // It is recommended to only mark a query as safe in a consensus breaking release. // Concretely, it means that the query is: // 1. deterministic: given a block height, returns the exact same response // upon multiple calls; and doesn't introduce any state-machine-breaking diff --git a/proto/cosmos/query/v1/query.proto b/proto/cosmos/query/v1/query.proto index e42e73d74d0b..f9811f09ad4e 100644 --- a/proto/cosmos/query/v1/query.proto +++ b/proto/cosmos/query/v1/query.proto @@ -11,7 +11,9 @@ option go_package = "github.com/cosmos/cosmos-sdk/types/query"; extend google.protobuf.MethodOptions { // module_query_safe is set to true when the query is safe to be called from // within the state machine, for example from another module's Keeper, via - // ADR-033 calls or from CosmWasm contracts. + // a query router calls or from CosmWasm contracts. + // WARNING: marking a query as safe in a non consensus breaking release may cause non determinism. + // It is recommended to only mark a query as safe in a consensus breaking release. // Concretely, it means that the query is: // 1. deterministic: given a block height, returns the exact same response // upon multiple calls; and doesn't introduce any state-machine-breaking @@ -32,4 +34,4 @@ extend google.protobuf.MethodOptions { // // When set to true, the query can safely be called bool module_query_safe = 11110001; -} \ No newline at end of file +} From 069d6cf7df4374c3c8b234ccc5c7923232374084 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 13 Mar 2024 19:28:19 +0100 Subject: [PATCH 18/30] build(deps): Bump github.com/cosmos/cosmos-sdk from 0.50.4 to 0.50.5 in /tools/cosmovisor (#19734) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- tools/cosmovisor/go.mod | 4 ++-- tools/cosmovisor/go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/cosmovisor/go.mod b/tools/cosmovisor/go.mod index faa3e3f9983b..6f9586bd3cdf 100644 --- a/tools/cosmovisor/go.mod +++ b/tools/cosmovisor/go.mod @@ -23,7 +23,7 @@ require ( cosmossdk.io/errors v1.0.1 // indirect cosmossdk.io/math v1.3.0 // indirect cosmossdk.io/store v1.0.2 // indirect - cosmossdk.io/x/tx v0.13.0 // indirect + cosmossdk.io/x/tx v0.13.1 // indirect filippo.io/edwards25519 v1.1.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.1 // indirect @@ -47,7 +47,7 @@ require ( github.com/cosmos/btcutil v1.0.5 // indirect github.com/cosmos/cosmos-db v1.0.2 // indirect github.com/cosmos/cosmos-proto v1.0.0-beta.4 // indirect - github.com/cosmos/cosmos-sdk v0.50.4 // indirect + github.com/cosmos/cosmos-sdk v0.50.5 // indirect github.com/cosmos/go-bip39 v1.0.0 // indirect github.com/cosmos/gogogateway v1.2.0 // indirect github.com/cosmos/gogoproto v1.4.11 // indirect diff --git a/tools/cosmovisor/go.sum b/tools/cosmovisor/go.sum index b310dd511383..b3a06d571b71 100644 --- a/tools/cosmovisor/go.sum +++ b/tools/cosmovisor/go.sum @@ -200,8 +200,8 @@ cosmossdk.io/math v1.3.0 h1:RC+jryuKeytIiictDslBP9i1fhkVm6ZDmZEoNP316zE= cosmossdk.io/math v1.3.0/go.mod h1:vnRTxewy+M7BtXBNFybkuhSH4WfedVAAnERHgVFhp3k= cosmossdk.io/store v1.0.2 h1:lSg5BTvJBHUDwswNNyeh4K/CbqiHER73VU4nDNb8uk0= cosmossdk.io/store v1.0.2/go.mod h1:EFtENTqVTuWwitGW1VwaBct+yDagk7oG/axBMPH+FXs= -cosmossdk.io/x/tx v0.13.0 h1:8lzyOh3zONPpZv2uTcUmsv0WTXy6T1/aCVDCqShmpzU= -cosmossdk.io/x/tx v0.13.0/go.mod h1:CpNQtmoqbXa33/DVxWQNx5Dcnbkv2xGUhL7tYQ5wUsY= +cosmossdk.io/x/tx v0.13.1 h1:Mg+EMp67Pz+NukbJqYxuo8uRp7N/a9uR+oVS9pONtj8= +cosmossdk.io/x/tx v0.13.1/go.mod h1:CBCU6fsRVz23QGFIQBb1DNX2DztJCf3jWyEkHY2nJQ0= cosmossdk.io/x/upgrade v0.1.1 h1:aoPe2gNvH+Gwt/Pgq3dOxxQVU3j5P6Xf+DaUJTDZATc= cosmossdk.io/x/upgrade v0.1.1/go.mod h1:MNLptLPcIFK9CWt7Ra//8WUZAxweyRDNcbs5nkOcQy0= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= @@ -326,8 +326,8 @@ github.com/cosmos/cosmos-db v1.0.2 h1:hwMjozuY1OlJs/uh6vddqnk9j7VamLv+0DBlbEXbAK github.com/cosmos/cosmos-db v1.0.2/go.mod h1:Z8IXcFJ9PqKK6BIsVOB3QXtkKoqUOp1vRvPT39kOXEA= github.com/cosmos/cosmos-proto v1.0.0-beta.4 h1:aEL7tU/rLOmxZQ9z4i7mzxcLbSCY48OdY7lIWTLG7oU= github.com/cosmos/cosmos-proto v1.0.0-beta.4/go.mod h1:oeB+FyVzG3XrQJbJng0EnV8Vljfk9XvTIpGILNU/9Co= -github.com/cosmos/cosmos-sdk v0.50.4 h1:hQT5/+Z1XXNF7skaPq0i247Ts2dzzqg/j2WO/BPHSto= -github.com/cosmos/cosmos-sdk v0.50.4/go.mod h1:UbShFs6P8Ly29xxJvkNGaNaL/UGj5a686NRtb1Cqra0= +github.com/cosmos/cosmos-sdk v0.50.5 h1:MOEi+DKYgW67YaPgB+Pf+nHbD3V9S/ayitRKJYLfGIA= +github.com/cosmos/cosmos-sdk v0.50.5/go.mod h1:oV/k6GJgXV9QPoM2fsYDPPsyPBgQbdotv532O6Mz1OQ= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= From abfd79a9f157c43742e64cff6ddbc7d10aaa4365 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 13 Mar 2024 19:28:34 +0100 Subject: [PATCH 19/30] build(deps): Bump github.com/cosmos/cosmos-sdk from 0.50.4 to 0.50.5 in /tools/hubl (#19733) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- tools/hubl/go.mod | 4 ++-- tools/hubl/go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/hubl/go.mod b/tools/hubl/go.mod index 40d58febc528..8b36b25760db 100644 --- a/tools/hubl/go.mod +++ b/tools/hubl/go.mod @@ -8,7 +8,7 @@ require ( cosmossdk.io/core v0.11.0 cosmossdk.io/errors v1.0.1 github.com/cockroachdb/errors v1.11.1 - github.com/cosmos/cosmos-sdk v0.50.4 + github.com/cosmos/cosmos-sdk v0.50.5 github.com/manifoldco/promptui v0.9.0 github.com/pelletier/go-toml/v2 v2.1.1 github.com/spf13/cobra v1.8.0 @@ -22,7 +22,7 @@ require ( cosmossdk.io/log v1.3.1 // indirect cosmossdk.io/math v1.3.0 // indirect cosmossdk.io/store v1.0.2 // indirect - cosmossdk.io/x/tx v0.13.0 // indirect + cosmossdk.io/x/tx v0.13.1 // indirect filippo.io/edwards25519 v1.1.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.2 // indirect diff --git a/tools/hubl/go.sum b/tools/hubl/go.sum index b6a948fda5c2..becfc2ee033f 100644 --- a/tools/hubl/go.sum +++ b/tools/hubl/go.sum @@ -18,8 +18,8 @@ cosmossdk.io/math v1.3.0 h1:RC+jryuKeytIiictDslBP9i1fhkVm6ZDmZEoNP316zE= cosmossdk.io/math v1.3.0/go.mod h1:vnRTxewy+M7BtXBNFybkuhSH4WfedVAAnERHgVFhp3k= cosmossdk.io/store v1.0.2 h1:lSg5BTvJBHUDwswNNyeh4K/CbqiHER73VU4nDNb8uk0= cosmossdk.io/store v1.0.2/go.mod h1:EFtENTqVTuWwitGW1VwaBct+yDagk7oG/axBMPH+FXs= -cosmossdk.io/x/tx v0.13.0 h1:8lzyOh3zONPpZv2uTcUmsv0WTXy6T1/aCVDCqShmpzU= -cosmossdk.io/x/tx v0.13.0/go.mod h1:CpNQtmoqbXa33/DVxWQNx5Dcnbkv2xGUhL7tYQ5wUsY= +cosmossdk.io/x/tx v0.13.1 h1:Mg+EMp67Pz+NukbJqYxuo8uRp7N/a9uR+oVS9pONtj8= +cosmossdk.io/x/tx v0.13.1/go.mod h1:CBCU6fsRVz23QGFIQBb1DNX2DztJCf3jWyEkHY2nJQ0= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= @@ -149,8 +149,8 @@ github.com/cosmos/cosmos-db v1.0.2 h1:hwMjozuY1OlJs/uh6vddqnk9j7VamLv+0DBlbEXbAK github.com/cosmos/cosmos-db v1.0.2/go.mod h1:Z8IXcFJ9PqKK6BIsVOB3QXtkKoqUOp1vRvPT39kOXEA= github.com/cosmos/cosmos-proto v1.0.0-beta.4 h1:aEL7tU/rLOmxZQ9z4i7mzxcLbSCY48OdY7lIWTLG7oU= github.com/cosmos/cosmos-proto v1.0.0-beta.4/go.mod h1:oeB+FyVzG3XrQJbJng0EnV8Vljfk9XvTIpGILNU/9Co= -github.com/cosmos/cosmos-sdk v0.50.4 h1:hQT5/+Z1XXNF7skaPq0i247Ts2dzzqg/j2WO/BPHSto= -github.com/cosmos/cosmos-sdk v0.50.4/go.mod h1:UbShFs6P8Ly29xxJvkNGaNaL/UGj5a686NRtb1Cqra0= +github.com/cosmos/cosmos-sdk v0.50.5 h1:MOEi+DKYgW67YaPgB+Pf+nHbD3V9S/ayitRKJYLfGIA= +github.com/cosmos/cosmos-sdk v0.50.5/go.mod h1:oV/k6GJgXV9QPoM2fsYDPPsyPBgQbdotv532O6Mz1OQ= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= From 10c1d7c59cb85fa61f7367d964884320f56ea30c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 13 Mar 2024 19:28:49 +0100 Subject: [PATCH 20/30] build(deps): Bump github.com/cosmos/cosmos-sdk from 0.50.4 to 0.50.5 in /tools/confix (#19732) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- tools/confix/go.mod | 4 ++-- tools/confix/go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/confix/go.mod b/tools/confix/go.mod index bed27f8df432..839ad5ee0588 100644 --- a/tools/confix/go.mod +++ b/tools/confix/go.mod @@ -3,7 +3,7 @@ module cosmossdk.io/tools/confix go 1.21 require ( - github.com/cosmos/cosmos-sdk v0.50.4 + github.com/cosmos/cosmos-sdk v0.50.5 github.com/creachadair/atomicfile v0.3.3 github.com/creachadair/tomledit v0.0.25 github.com/pelletier/go-toml/v2 v2.1.1 @@ -22,7 +22,7 @@ require ( cosmossdk.io/log v1.3.1 // indirect cosmossdk.io/math v1.3.0 // indirect cosmossdk.io/store v1.0.2 // indirect - cosmossdk.io/x/tx v0.13.0 // indirect + cosmossdk.io/x/tx v0.13.1 // indirect filippo.io/edwards25519 v1.1.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.1 // indirect diff --git a/tools/confix/go.sum b/tools/confix/go.sum index 4d0df6b00584..8136af44a437 100644 --- a/tools/confix/go.sum +++ b/tools/confix/go.sum @@ -16,8 +16,8 @@ cosmossdk.io/math v1.3.0 h1:RC+jryuKeytIiictDslBP9i1fhkVm6ZDmZEoNP316zE= cosmossdk.io/math v1.3.0/go.mod h1:vnRTxewy+M7BtXBNFybkuhSH4WfedVAAnERHgVFhp3k= cosmossdk.io/store v1.0.2 h1:lSg5BTvJBHUDwswNNyeh4K/CbqiHER73VU4nDNb8uk0= cosmossdk.io/store v1.0.2/go.mod h1:EFtENTqVTuWwitGW1VwaBct+yDagk7oG/axBMPH+FXs= -cosmossdk.io/x/tx v0.13.0 h1:8lzyOh3zONPpZv2uTcUmsv0WTXy6T1/aCVDCqShmpzU= -cosmossdk.io/x/tx v0.13.0/go.mod h1:CpNQtmoqbXa33/DVxWQNx5Dcnbkv2xGUhL7tYQ5wUsY= +cosmossdk.io/x/tx v0.13.1 h1:Mg+EMp67Pz+NukbJqYxuo8uRp7N/a9uR+oVS9pONtj8= +cosmossdk.io/x/tx v0.13.1/go.mod h1:CBCU6fsRVz23QGFIQBb1DNX2DztJCf3jWyEkHY2nJQ0= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= @@ -143,8 +143,8 @@ github.com/cosmos/cosmos-db v1.0.2 h1:hwMjozuY1OlJs/uh6vddqnk9j7VamLv+0DBlbEXbAK github.com/cosmos/cosmos-db v1.0.2/go.mod h1:Z8IXcFJ9PqKK6BIsVOB3QXtkKoqUOp1vRvPT39kOXEA= github.com/cosmos/cosmos-proto v1.0.0-beta.4 h1:aEL7tU/rLOmxZQ9z4i7mzxcLbSCY48OdY7lIWTLG7oU= github.com/cosmos/cosmos-proto v1.0.0-beta.4/go.mod h1:oeB+FyVzG3XrQJbJng0EnV8Vljfk9XvTIpGILNU/9Co= -github.com/cosmos/cosmos-sdk v0.50.4 h1:hQT5/+Z1XXNF7skaPq0i247Ts2dzzqg/j2WO/BPHSto= -github.com/cosmos/cosmos-sdk v0.50.4/go.mod h1:UbShFs6P8Ly29xxJvkNGaNaL/UGj5a686NRtb1Cqra0= +github.com/cosmos/cosmos-sdk v0.50.5 h1:MOEi+DKYgW67YaPgB+Pf+nHbD3V9S/ayitRKJYLfGIA= +github.com/cosmos/cosmos-sdk v0.50.5/go.mod h1:oV/k6GJgXV9QPoM2fsYDPPsyPBgQbdotv532O6Mz1OQ= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= From 9c47292d8d59a9a29a5b0d5d9c91cf7133f44636 Mon Sep 17 00:00:00 2001 From: Julien Robert Date: Wed, 13 Mar 2024 19:34:55 +0100 Subject: [PATCH 21/30] feat(x/gov): add expedited proposal quorum param (#19741) Co-authored-by: Likhita Polavarapu <78951027+likhita-809@users.noreply.github.com> --- api/cosmos/gov/v1/gov.pulsar.go | 220 ++++++++++++++------- x/gov/CHANGELOG.md | 3 +- x/gov/README.md | 20 +- x/gov/keeper/msg_server_test.go | 84 ++++++++ x/gov/keeper/tally.go | 6 +- x/gov/keeper/tally_test.go | 17 +- x/gov/migrations/v6/store.go | 1 + x/gov/migrations/v6/store_test.go | 2 + x/gov/proto/cosmos/gov/v1/gov.proto | 6 + x/gov/simulation/genesis.go | 32 ++- x/gov/simulation/genesis_test.go | 39 ++-- x/gov/types/v1/gov.pb.go | 292 +++++++++++++++++----------- x/gov/types/v1/params.go | 23 ++- 13 files changed, 516 insertions(+), 229 deletions(-) diff --git a/api/cosmos/gov/v1/gov.pulsar.go b/api/cosmos/gov/v1/gov.pulsar.go index 9efdf3c56d3f..f09b58293bdd 100644 --- a/api/cosmos/gov/v1/gov.pulsar.go +++ b/api/cosmos/gov/v1/gov.pulsar.go @@ -6644,6 +6644,7 @@ var ( fd_Params_optimistic_authorized_addresses protoreflect.FieldDescriptor fd_Params_optimistic_rejected_threshold protoreflect.FieldDescriptor fd_Params_yes_quorum protoreflect.FieldDescriptor + fd_Params_expedited_quorum protoreflect.FieldDescriptor ) func init() { @@ -6669,6 +6670,7 @@ func init() { fd_Params_optimistic_authorized_addresses = md_Params.Fields().ByName("optimistic_authorized_addresses") fd_Params_optimistic_rejected_threshold = md_Params.Fields().ByName("optimistic_rejected_threshold") fd_Params_yes_quorum = md_Params.Fields().ByName("yes_quorum") + fd_Params_expedited_quorum = md_Params.Fields().ByName("expedited_quorum") } var _ protoreflect.Message = (*fastReflection_Params)(nil) @@ -6856,6 +6858,12 @@ func (x *fastReflection_Params) Range(f func(protoreflect.FieldDescriptor, proto return } } + if x.ExpeditedQuorum != "" { + value := protoreflect.ValueOfString(x.ExpeditedQuorum) + if !f(fd_Params_expedited_quorum, value) { + return + } + } } // Has reports whether a field is populated. @@ -6911,6 +6919,8 @@ func (x *fastReflection_Params) Has(fd protoreflect.FieldDescriptor) bool { return x.OptimisticRejectedThreshold != "" case "cosmos.gov.v1.Params.yes_quorum": return x.YesQuorum != "" + case "cosmos.gov.v1.Params.expedited_quorum": + return x.ExpeditedQuorum != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.Params")) @@ -6967,6 +6977,8 @@ func (x *fastReflection_Params) Clear(fd protoreflect.FieldDescriptor) { x.OptimisticRejectedThreshold = "" case "cosmos.gov.v1.Params.yes_quorum": x.YesQuorum = "" + case "cosmos.gov.v1.Params.expedited_quorum": + x.ExpeditedQuorum = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.Params")) @@ -7052,6 +7064,9 @@ func (x *fastReflection_Params) Get(descriptor protoreflect.FieldDescriptor) pro case "cosmos.gov.v1.Params.yes_quorum": value := x.YesQuorum return protoreflect.ValueOfString(value) + case "cosmos.gov.v1.Params.expedited_quorum": + value := x.ExpeditedQuorum + return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.Params")) @@ -7118,6 +7133,8 @@ func (x *fastReflection_Params) Set(fd protoreflect.FieldDescriptor, value proto x.OptimisticRejectedThreshold = value.Interface().(string) case "cosmos.gov.v1.Params.yes_quorum": x.YesQuorum = value.Interface().(string) + case "cosmos.gov.v1.Params.expedited_quorum": + x.ExpeditedQuorum = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.Params")) @@ -7199,6 +7216,8 @@ func (x *fastReflection_Params) Mutable(fd protoreflect.FieldDescriptor) protore panic(fmt.Errorf("field optimistic_rejected_threshold of message cosmos.gov.v1.Params is not mutable")) case "cosmos.gov.v1.Params.yes_quorum": panic(fmt.Errorf("field yes_quorum of message cosmos.gov.v1.Params is not mutable")) + case "cosmos.gov.v1.Params.expedited_quorum": + panic(fmt.Errorf("field expedited_quorum of message cosmos.gov.v1.Params is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.Params")) @@ -7258,6 +7277,8 @@ func (x *fastReflection_Params) NewField(fd protoreflect.FieldDescriptor) protor return protoreflect.ValueOfString("") case "cosmos.gov.v1.Params.yes_quorum": return protoreflect.ValueOfString("") + case "cosmos.gov.v1.Params.expedited_quorum": + return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.Params")) @@ -7410,6 +7431,10 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { if l > 0 { n += 2 + l + runtime.Sov(uint64(l)) } + l = len(x.ExpeditedQuorum) + if l > 0 { + n += 2 + l + runtime.Sov(uint64(l)) + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -7439,6 +7464,15 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if len(x.ExpeditedQuorum) > 0 { + i -= len(x.ExpeditedQuorum) + copy(dAtA[i:], x.ExpeditedQuorum) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ExpeditedQuorum))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xaa + } if len(x.YesQuorum) > 0 { i -= len(x.YesQuorum) copy(dAtA[i:], x.YesQuorum) @@ -8308,6 +8342,38 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { } x.YesQuorum = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 21: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ExpeditedQuorum", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.ExpeditedQuorum = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -10055,6 +10121,11 @@ type Params struct { // // Since: x/gov v1.0.0 YesQuorum string `protobuf:"bytes,20,opt,name=yes_quorum,json=yesQuorum,proto3" json:"yes_quorum,omitempty"` + // Minimum percentage of total stake needed to vote for a result to be + // considered valid for an expedited proposal. + // + // Since: x/gov v1.0.0 + ExpeditedQuorum string `protobuf:"bytes,21,opt,name=expedited_quorum,json=expeditedQuorum,proto3" json:"expedited_quorum,omitempty"` } func (x *Params) Reset() { @@ -10217,6 +10288,13 @@ func (x *Params) GetYesQuorum() string { return "" } +func (x *Params) GetExpeditedQuorum() string { + if x != nil { + return x.ExpeditedQuorum + } + return "" +} + // MessageBasedParams defines the parameters of specific messages in a proposal. // It is used to define the parameters of a proposal that is based on a specific message. // Once a message has message based params, it only supports a standard proposal type. @@ -10467,7 +10545,7 @@ var file_cosmos_gov_v1_gov_proto_rawDesc = []byte{ 0x76, 0x65, 0x74, 0x6f, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x0d, 0x76, 0x65, 0x74, 0x6f, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, - 0x6f, 0x6c, 0x64, 0x3a, 0x02, 0x18, 0x01, 0x22, 0xc1, 0x0a, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, + 0x6f, 0x6c, 0x64, 0x3a, 0x02, 0x18, 0x01, 0x22, 0xfc, 0x0a, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x45, 0x0a, 0x0b, 0x6d, 0x69, 0x6e, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, @@ -10551,74 +10629,78 @@ var file_cosmos_gov_v1_gov_proto_rawDesc = []byte{ 0x74, 0x65, 0x64, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x2d, 0x0a, 0x0a, 0x79, 0x65, 0x73, 0x5f, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x18, 0x14, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, - 0x52, 0x09, 0x79, 0x65, 0x73, 0x51, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x22, 0x96, 0x02, 0x0a, 0x12, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x42, 0x61, 0x73, 0x65, 0x64, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x12, 0x44, 0x0a, 0x0d, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, - 0x69, 0x6f, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x04, 0x98, 0xdf, 0x1f, 0x01, 0x52, 0x0c, 0x76, 0x6f, 0x74, 0x69, - 0x6e, 0x67, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, 0x26, 0x0a, 0x06, 0x71, 0x75, 0x6f, 0x72, - 0x75, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x06, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, - 0x12, 0x2d, 0x0a, 0x0a, 0x79, 0x65, 0x73, 0x5f, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x18, 0x14, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x44, 0x65, 0x63, 0x52, 0x09, 0x79, 0x65, 0x73, 0x51, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x12, - 0x2c, 0x0a, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, - 0x65, 0x63, 0x52, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x35, 0x0a, - 0x0e, 0x76, 0x65, 0x74, 0x6f, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x0d, 0x76, 0x65, 0x74, 0x6f, 0x54, 0x68, 0x72, 0x65, 0x73, - 0x68, 0x6f, 0x6c, 0x64, 0x2a, 0xa7, 0x01, 0x0a, 0x0c, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, - 0x6c, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1d, 0x0a, 0x19, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, - 0x4c, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, - 0x45, 0x44, 0x10, 0x00, 0x12, 0x1a, 0x0a, 0x16, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, - 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x4e, 0x44, 0x41, 0x52, 0x44, 0x10, 0x01, - 0x12, 0x21, 0x0a, 0x1d, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x54, 0x59, 0x50, - 0x45, 0x5f, 0x4d, 0x55, 0x4c, 0x54, 0x49, 0x50, 0x4c, 0x45, 0x5f, 0x43, 0x48, 0x4f, 0x49, 0x43, - 0x45, 0x10, 0x02, 0x12, 0x1c, 0x0a, 0x18, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, - 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4d, 0x49, 0x53, 0x54, 0x49, 0x43, 0x10, - 0x03, 0x12, 0x1b, 0x0a, 0x17, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x54, 0x59, - 0x50, 0x45, 0x5f, 0x45, 0x58, 0x50, 0x45, 0x44, 0x49, 0x54, 0x45, 0x44, 0x10, 0x04, 0x2a, 0xfa, - 0x01, 0x0a, 0x0a, 0x56, 0x6f, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, - 0x17, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, - 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x56, 0x4f, - 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x59, 0x45, 0x53, 0x10, 0x01, 0x12, - 0x13, 0x0a, 0x0f, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4f, - 0x4e, 0x45, 0x10, 0x01, 0x12, 0x17, 0x0a, 0x13, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, - 0x49, 0x4f, 0x4e, 0x5f, 0x41, 0x42, 0x53, 0x54, 0x41, 0x49, 0x4e, 0x10, 0x02, 0x12, 0x13, 0x0a, - 0x0f, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x57, 0x4f, - 0x10, 0x02, 0x12, 0x12, 0x0a, 0x0e, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, - 0x4e, 0x5f, 0x4e, 0x4f, 0x10, 0x03, 0x12, 0x15, 0x0a, 0x11, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, - 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x48, 0x52, 0x45, 0x45, 0x10, 0x03, 0x12, 0x1c, 0x0a, - 0x18, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x5f, - 0x57, 0x49, 0x54, 0x48, 0x5f, 0x56, 0x45, 0x54, 0x4f, 0x10, 0x04, 0x12, 0x14, 0x0a, 0x10, 0x56, - 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x46, 0x4f, 0x55, 0x52, 0x10, - 0x04, 0x12, 0x14, 0x0a, 0x10, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, - 0x5f, 0x53, 0x50, 0x41, 0x4d, 0x10, 0x05, 0x1a, 0x02, 0x10, 0x01, 0x2a, 0xce, 0x01, 0x0a, 0x0e, - 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1f, - 0x0a, 0x1b, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, - 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, - 0x22, 0x0a, 0x1e, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, - 0x55, 0x53, 0x5f, 0x44, 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x5f, 0x50, 0x45, 0x52, 0x49, 0x4f, - 0x44, 0x10, 0x01, 0x12, 0x21, 0x0a, 0x1d, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, - 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x56, 0x4f, 0x54, 0x49, 0x4e, 0x47, 0x5f, 0x50, 0x45, - 0x52, 0x49, 0x4f, 0x44, 0x10, 0x02, 0x12, 0x1a, 0x0a, 0x16, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, - 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, 0x41, 0x53, 0x53, 0x45, 0x44, - 0x10, 0x03, 0x12, 0x1c, 0x0a, 0x18, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, - 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, 0x45, 0x44, 0x10, 0x04, - 0x12, 0x1a, 0x0a, 0x16, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, - 0x54, 0x55, 0x53, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x05, 0x42, 0x99, 0x01, 0x0a, - 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, - 0x76, 0x31, 0x42, 0x08, 0x47, 0x6f, 0x76, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x24, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x3b, 0x67, - 0x6f, 0x76, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x47, 0x58, 0xaa, 0x02, 0x0d, 0x43, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x47, 0x6f, 0x76, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0d, 0x43, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x6f, 0x76, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x19, 0x43, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x6f, 0x76, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, - 0x3a, 0x47, 0x6f, 0x76, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x52, 0x09, 0x79, 0x65, 0x73, 0x51, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x12, 0x39, 0x0a, 0x10, 0x65, + 0x78, 0x70, 0x65, 0x64, 0x69, 0x74, 0x65, 0x64, 0x5f, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x18, + 0x15, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x0f, 0x65, 0x78, 0x70, 0x65, 0x64, 0x69, 0x74, 0x65, 0x64, + 0x51, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x22, 0x96, 0x02, 0x0a, 0x12, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x42, 0x61, 0x73, 0x65, 0x64, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x44, 0x0a, + 0x0d, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, + 0x04, 0x98, 0xdf, 0x1f, 0x01, 0x52, 0x0c, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x65, 0x72, + 0x69, 0x6f, 0x64, 0x12, 0x26, 0x0a, 0x06, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x44, 0x65, 0x63, 0x52, 0x06, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x12, 0x2d, 0x0a, 0x0a, 0x79, + 0x65, 0x73, 0x5f, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x18, 0x14, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, + 0x09, 0x79, 0x65, 0x73, 0x51, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x12, 0x2c, 0x0a, 0x09, 0x74, 0x68, + 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, + 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x09, 0x74, + 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x35, 0x0a, 0x0e, 0x76, 0x65, 0x74, 0x6f, + 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, + 0x52, 0x0d, 0x76, 0x65, 0x74, 0x6f, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x2a, + 0xa7, 0x01, 0x0a, 0x0c, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x1d, 0x0a, 0x19, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x54, 0x59, 0x50, + 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, + 0x1a, 0x0a, 0x16, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x54, 0x59, 0x50, 0x45, + 0x5f, 0x53, 0x54, 0x41, 0x4e, 0x44, 0x41, 0x52, 0x44, 0x10, 0x01, 0x12, 0x21, 0x0a, 0x1d, 0x50, + 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x55, 0x4c, + 0x54, 0x49, 0x50, 0x4c, 0x45, 0x5f, 0x43, 0x48, 0x4f, 0x49, 0x43, 0x45, 0x10, 0x02, 0x12, 0x1c, + 0x0a, 0x18, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x4f, 0x50, 0x54, 0x49, 0x4d, 0x49, 0x53, 0x54, 0x49, 0x43, 0x10, 0x03, 0x12, 0x1b, 0x0a, 0x17, + 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x58, + 0x50, 0x45, 0x44, 0x49, 0x54, 0x45, 0x44, 0x10, 0x04, 0x2a, 0xfa, 0x01, 0x0a, 0x0a, 0x56, 0x6f, + 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x17, 0x56, 0x4f, 0x54, 0x45, + 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, + 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, + 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x59, 0x45, 0x53, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x56, 0x4f, + 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4f, 0x4e, 0x45, 0x10, 0x01, 0x12, + 0x17, 0x0a, 0x13, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x41, + 0x42, 0x53, 0x54, 0x41, 0x49, 0x4e, 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x56, 0x4f, 0x54, 0x45, + 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x57, 0x4f, 0x10, 0x02, 0x12, 0x12, 0x0a, + 0x0e, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x10, + 0x03, 0x12, 0x15, 0x0a, 0x11, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, + 0x5f, 0x54, 0x48, 0x52, 0x45, 0x45, 0x10, 0x03, 0x12, 0x1c, 0x0a, 0x18, 0x56, 0x4f, 0x54, 0x45, + 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x5f, + 0x56, 0x45, 0x54, 0x4f, 0x10, 0x04, 0x12, 0x14, 0x0a, 0x10, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, + 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x46, 0x4f, 0x55, 0x52, 0x10, 0x04, 0x12, 0x14, 0x0a, 0x10, + 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x50, 0x41, 0x4d, + 0x10, 0x05, 0x1a, 0x02, 0x10, 0x01, 0x2a, 0xce, 0x01, 0x0a, 0x0e, 0x50, 0x72, 0x6f, 0x70, 0x6f, + 0x73, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1f, 0x0a, 0x1b, 0x50, 0x52, 0x4f, + 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, + 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x22, 0x0a, 0x1e, 0x50, 0x52, + 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x44, 0x45, + 0x50, 0x4f, 0x53, 0x49, 0x54, 0x5f, 0x50, 0x45, 0x52, 0x49, 0x4f, 0x44, 0x10, 0x01, 0x12, 0x21, + 0x0a, 0x1d, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, + 0x53, 0x5f, 0x56, 0x4f, 0x54, 0x49, 0x4e, 0x47, 0x5f, 0x50, 0x45, 0x52, 0x49, 0x4f, 0x44, 0x10, + 0x02, 0x12, 0x1a, 0x0a, 0x16, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, + 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, 0x41, 0x53, 0x53, 0x45, 0x44, 0x10, 0x03, 0x12, 0x1c, 0x0a, + 0x18, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, + 0x5f, 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, 0x45, 0x44, 0x10, 0x04, 0x12, 0x1a, 0x0a, 0x16, 0x50, + 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x46, + 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x05, 0x42, 0x99, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x42, 0x08, 0x47, + 0x6f, 0x76, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x24, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x3b, 0x67, 0x6f, 0x76, 0x76, 0x31, 0xa2, + 0x02, 0x03, 0x43, 0x47, 0x58, 0xaa, 0x02, 0x0d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x47, + 0x6f, 0x76, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, + 0x6f, 0x76, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x19, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, + 0x6f, 0x76, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0xea, 0x02, 0x0f, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x47, 0x6f, 0x76, 0x3a, + 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/x/gov/CHANGELOG.md b/x/gov/CHANGELOG.md index b1d565a9a4d4..94bc8b201fa7 100644 --- a/x/gov/CHANGELOG.md +++ b/x/gov/CHANGELOG.md @@ -37,6 +37,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ ### Improvements +* [#19741](https://github.com/cosmos/cosmos-sdk/pull/19741) Add `ExpeditedQuorum` parameter specifying a minimum quorum for expedited proposals, that can differ from the regular quorum. * [#19352](https://github.com/cosmos/cosmos-sdk/pull/19352) `TallyResult` include vote options counts. Those counts replicates the now deprecated (but not removed) yes, no, abstain and veto count fields. * [#18976](https://github.com/cosmos/cosmos-sdk/pull/18976) Log and send an event when a proposal deposit refund or burn has failed. * [#18856](https://github.com/cosmos/cosmos-sdk/pull/18856) Add `ProposalCancelMaxPeriod` parameter for modifying how long a proposal can be cancelled after it has been submitted. @@ -61,7 +62,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ ### API Breaking Changes * [#19481](https://github.com/cosmos/cosmos-sdk/pull/19481) Migrate module to use `appmodule.Environment`; `NewKeeper` now takes `appmodule.Environment` instead of a store service and no `baseapp.MessageRouter` anymore. -* [#19481](https://github.com/cosmos/cosmos-sdk/pull/19481) v1beta1 proposal handlers now take a `context.Context` instead of an `sdk.Context`. +* [#19481](https://github.com/cosmos/cosmos-sdk/pull/19481) v1beta1 proposal handlers now take a `context.Context` instead of an `sdk.Context`. * [#19592](https://github.com/cosmos/cosmos-sdk/pull/19592) `types.Config` and `types.DefaultConfig` have been moved to the keeper package in order to support the custom tallying function. * [#19349](https://github.com/cosmos/cosmos-sdk/pull/19349) Simplify state management in `x/gov`. Note `k.VotingPeriodProposals` and `k.SetProposal` are no longer needed and have been removed. * [#18532](https://github.com/cosmos/cosmos-sdk/pull/18532) All functions that were taking an expedited bool parameter now take a `ProposalType` parameter instead. diff --git a/x/gov/README.md b/x/gov/README.md index 2d0d82bf075c..919afe01ec72 100644 --- a/x/gov/README.md +++ b/x/gov/README.md @@ -188,6 +188,18 @@ For a weighted vote to be valid, the `options` field must not contain duplicate Quorum is defined as the minimum percentage of voting power that needs to be cast on a proposal for the result to be valid. +### Expedited Quorum + +Expedited Quorum is defined as the minimum percentage of voting power that needs to be +cast on an **expedited** proposal for the result to be valid. + +### Yes Quorum + +Yes quorum is a more restrictive quorum that is used to determine if a proposal passes. +It is defined as the minimum percentage of voting power that needs to have voted `Yes` for the proposal to pass. +It differs from `Threshold` as it takes the whole voting power into account, not only `Yes` and `No` votes. +By default, `YesQuorum` is set to 0, which means no minimum. + ### Proposal Types Proposal types have been introduced in ADR-069. @@ -235,13 +247,6 @@ This means that proposals are accepted iff: For expedited proposals, by default, the threshold is higher than with a *normal proposal*, namely, 66.7%. -### Yes Quorum - -Yes quorum is a more restrictive quorum that is used to determine if a proposal passes. -It is defined as the minimum percentage of voting power that needs to have voted `Yes` for the proposal to pass. -It differs from `Threshold` as it takes the whole voting power into account, not only `Yes` and `No` votes. -By default, `YesQuorum` is set to 0, which means no minimum. - #### Inheritance If a delegator does not vote, it will inherit its validator vote. @@ -616,6 +621,7 @@ The governance module contains the following parameters: | expedited_threshold | string (time ns) | "0.667000000000000000" | | expedited_voting_period | string (time ns) | "86400000000000" (8600s) | | expedited_min_deposit | array (coins) | [{"denom":"uatom","amount":"50000000"}] | +| expedited_quorum | string (dec) | "0.5" | | burn_proposal_deposit_prevote | bool | false | | burn_vote_quorum | bool | false | | burn_vote_veto | bool | true | diff --git a/x/gov/keeper/msg_server_test.go b/x/gov/keeper/msg_server_test.go index 5425c3fd215b..994d4672825b 100644 --- a/x/gov/keeper/msg_server_test.go +++ b/x/gov/keeper/msg_server_test.go @@ -1727,6 +1727,90 @@ func (suite *KeeperTestSuite) TestMsgUpdateParams() { expErr: true, expErrMsg: "quorum too large", }, + { + name: "invalid yes quorum", + input: func() *v1.MsgUpdateParams { + params1 := params + params1.YesQuorum = abc + + return &v1.MsgUpdateParams{ + Authority: authority, + Params: params1, + } + }, + expErr: true, + expErrMsg: "invalid yes_quorum string", + }, + { + name: "negative yes quorum", + input: func() *v1.MsgUpdateParams { + params1 := params + params1.YesQuorum = o1 + + return &v1.MsgUpdateParams{ + Authority: authority, + Params: params1, + } + }, + expErr: true, + expErrMsg: "yes_quorum cannot be negative", + }, + { + name: "yes quorum > 1", + input: func() *v1.MsgUpdateParams { + params1 := params + params1.YesQuorum = "2" + + return &v1.MsgUpdateParams{ + Authority: authority, + Params: params1, + } + }, + expErr: true, + expErrMsg: "yes_quorum too large", + }, + { + name: "invalid expedited quorum", + input: func() *v1.MsgUpdateParams { + params1 := params + params1.ExpeditedQuorum = abc + + return &v1.MsgUpdateParams{ + Authority: authority, + Params: params1, + } + }, + expErr: true, + expErrMsg: "invalid expedited_quorum string", + }, + { + name: "negative expedited quorum", + input: func() *v1.MsgUpdateParams { + params1 := params + params1.ExpeditedQuorum = o1 + + return &v1.MsgUpdateParams{ + Authority: authority, + Params: params1, + } + }, + expErr: true, + expErrMsg: "expedited_quorum cannot be negative", + }, + { + name: "expedited quorum > 1", + input: func() *v1.MsgUpdateParams { + params1 := params + params1.ExpeditedQuorum = "2" + + return &v1.MsgUpdateParams{ + Authority: authority, + Params: params1, + } + }, + expErr: true, + expErrMsg: "expedited_quorum too large", + }, { name: "invalid threshold", input: func() *v1.MsgUpdateParams { diff --git a/x/gov/keeper/tally.go b/x/gov/keeper/tally.go index 8f87ec3570d2..dc1b1c57285c 100644 --- a/x/gov/keeper/tally.go +++ b/x/gov/keeper/tally.go @@ -125,7 +125,7 @@ func (k Keeper) tallyStandard(ctx context.Context, proposal v1.Proposal, totalVo } // tallyExpedited tallies the votes of an expedited proposal -// If there is not enough quorum of votes, the proposal fails +// If there is not enough expedited quorum of votes, the proposal fails // If no one votes (everyone abstains), proposal fails // If more than 1/3 of voters veto, proposal fails // If more than 2/3 of non-abstaining voters vote Yes, proposal passes @@ -136,8 +136,8 @@ func (k Keeper) tallyExpedited(totalVoterPower math.LegacyDec, totalBonded math. // If there is not enough quorum of votes, the proposal fails percentVoting := totalVoterPower.Quo(math.LegacyNewDecFromInt(totalBonded)) - quorum, _ := math.LegacyNewDecFromStr(params.Quorum) - if percentVoting.LT(quorum) { + expeditedQuorum, _ := math.LegacyNewDecFromStr(params.ExpeditedQuorum) + if percentVoting.LT(expeditedQuorum) { return false, params.BurnVoteQuorum, tallyResults, nil } diff --git a/x/gov/keeper/tally_test.go b/x/gov/keeper/tally_test.go index 90de90a33b29..723cfb779f31 100644 --- a/x/gov/keeper/tally_test.go +++ b/x/gov/keeper/tally_test.go @@ -712,16 +712,17 @@ func TestTally_Expedited(t *testing.T) { validatorVote(s, s.valAddrs[1], v1.VoteOption_VOTE_OPTION_TWO) validatorVote(s, s.valAddrs[2], v1.VoteOption_VOTE_OPTION_TWO) validatorVote(s, s.valAddrs[3], v1.VoteOption_VOTE_OPTION_TWO) + validatorVote(s, s.valAddrs[4], v1.VoteOption_VOTE_OPTION_TWO) }, expectedPass: false, expectedBurn: false, expectedTally: v1.TallyResult{ YesCount: "0", - AbstainCount: "4000000", + AbstainCount: "5000000", NoCount: "0", NoWithVetoCount: "0", OptionOneCount: "0", - OptionTwoCount: "4000000", + OptionTwoCount: "5000000", OptionThreeCount: "0", OptionFourCount: "0", SpamCount: "0", @@ -759,19 +760,21 @@ func TestTally_Expedited(t *testing.T) { setTotalBonded(s, 10000000) validatorVote(s, s.valAddrs[0], v1.VoteOption_VOTE_OPTION_ONE) validatorVote(s, s.valAddrs[1], v1.VoteOption_VOTE_OPTION_ONE) - validatorVote(s, s.valAddrs[2], v1.VoteOption_VOTE_OPTION_THREE) + validatorVote(s, s.valAddrs[2], v1.VoteOption_VOTE_OPTION_ONE) validatorVote(s, s.valAddrs[3], v1.VoteOption_VOTE_OPTION_THREE) + validatorVote(s, s.valAddrs[4], v1.VoteOption_VOTE_OPTION_THREE) + validatorVote(s, s.valAddrs[5], v1.VoteOption_VOTE_OPTION_THREE) }, expectedPass: false, expectedBurn: false, expectedTally: v1.TallyResult{ - YesCount: "2000000", + YesCount: "3000000", AbstainCount: "0", - NoCount: "2000000", + NoCount: "3000000", NoWithVetoCount: "0", - OptionOneCount: "2000000", + OptionOneCount: "3000000", OptionTwoCount: "0", - OptionThreeCount: "2000000", + OptionThreeCount: "3000000", OptionFourCount: "0", SpamCount: "0", }, diff --git a/x/gov/migrations/v6/store.go b/x/gov/migrations/v6/store.go index be30f95f509b..f45388e89aeb 100644 --- a/x/gov/migrations/v6/store.go +++ b/x/gov/migrations/v6/store.go @@ -49,6 +49,7 @@ func MigrateStore(ctx context.Context, storeService corestoretypes.KVStoreServic if err != nil { return fmt.Errorf("failed to get gov params: %w", err) } + govParams.ExpeditedQuorum = govParams.Quorum defaultParams := v1.DefaultParams() govParams.YesQuorum = defaultParams.YesQuorum diff --git a/x/gov/migrations/v6/store_test.go b/x/gov/migrations/v6/store_test.go index 76a6aa654e6a..ffeff54213d0 100644 --- a/x/gov/migrations/v6/store_test.go +++ b/x/gov/migrations/v6/store_test.go @@ -31,6 +31,7 @@ func TestMigrateStore(t *testing.T) { // set defaults without newly added fields previousParams := v1.DefaultParams() previousParams.YesQuorum = "" + previousParams.ExpeditedQuorum = "" previousParams.ProposalCancelMaxPeriod = "" previousParams.OptimisticAuthorizedAddresses = nil previousParams.OptimisticRejectedThreshold = "" @@ -45,6 +46,7 @@ func TestMigrateStore(t *testing.T) { newParams, err := paramsCollection.Get(ctx) require.NoError(t, err) require.Equal(t, v1.DefaultParams().YesQuorum, newParams.YesQuorum) + require.Equal(t, v1.DefaultParams().Quorum, newParams.ExpeditedQuorum) // ExpeditedQuorum is set to Quorum during the migration instead of the default SDK value, for avoiding behavior change. require.Equal(t, v1.DefaultParams().ProposalCancelMaxPeriod, newParams.ProposalCancelMaxPeriod) require.Equal(t, v1.DefaultParams().OptimisticAuthorizedAddresses, newParams.OptimisticAuthorizedAddresses) require.Equal(t, v1.DefaultParams().OptimisticRejectedThreshold, newParams.OptimisticRejectedThreshold) diff --git a/x/gov/proto/cosmos/gov/v1/gov.proto b/x/gov/proto/cosmos/gov/v1/gov.proto index 3ce0608c69ad..f83ef8735bc8 100644 --- a/x/gov/proto/cosmos/gov/v1/gov.proto +++ b/x/gov/proto/cosmos/gov/v1/gov.proto @@ -367,6 +367,12 @@ message Params { // // Since: x/gov v1.0.0 string yes_quorum = 20 [(cosmos_proto.scalar) = "cosmos.Dec"]; + + // Minimum percentage of total stake needed to vote for a result to be + // considered valid for an expedited proposal. + // + // Since: x/gov v1.0.0 + string expedited_quorum = 21 [(cosmos_proto.scalar) = "cosmos.Dec"]; } // MessageBasedParams defines the parameters of specific messages in a proposal. diff --git a/x/gov/simulation/genesis.go b/x/gov/simulation/genesis.go index 39d73037eca1..f029f692f07d 100644 --- a/x/gov/simulation/genesis.go +++ b/x/gov/simulation/genesis.go @@ -24,6 +24,7 @@ const ( VotingPeriod = "voting_period" ExpeditedVotingPeriod = "expedited_voting_period" Quorum = "quorum" + ExpeditedQuorum = "expedited_quorum" YesQuorum = "yes_quorum" Threshold = "threshold" ExpeditedThreshold = "expedited_threshold" @@ -151,11 +152,14 @@ func RandomizedGenState(simState *module.SimulationState) { var yesQuorum sdkmath.LegacyDec simState.AppParams.GetOrGenerate(YesQuorum, &yesQuorum, simState.Rand, func(r *rand.Rand) { yesQuorum = GenQuorum(r) }) + var expeditedQuorum sdkmath.LegacyDec + simState.AppParams.GetOrGenerate(ExpeditedQuorum, &expeditedQuorum, simState.Rand, func(r *rand.Rand) { expeditedQuorum = GenQuorum(r) }) + var threshold sdkmath.LegacyDec simState.AppParams.GetOrGenerate(Threshold, &threshold, simState.Rand, func(r *rand.Rand) { threshold = GenThreshold(r) }) - var expitedVotingThreshold sdkmath.LegacyDec - simState.AppParams.GetOrGenerate(ExpeditedThreshold, &expitedVotingThreshold, simState.Rand, func(r *rand.Rand) { expitedVotingThreshold = GenExpeditedThreshold(r) }) + var expeditedVotingThreshold sdkmath.LegacyDec + simState.AppParams.GetOrGenerate(ExpeditedThreshold, &expeditedVotingThreshold, simState.Rand, func(r *rand.Rand) { expeditedVotingThreshold = GenExpeditedThreshold(r) }) var veto sdkmath.LegacyDec simState.AppParams.GetOrGenerate(Veto, &veto, simState.Rand, func(r *rand.Rand) { veto = GenVeto(r) }) @@ -168,7 +172,29 @@ func RandomizedGenState(simState *module.SimulationState) { govGenesis := v1.NewGenesisState( startingProposalID, - v1.NewParams(minDeposit, expeditedMinDeposit, depositPeriod, votingPeriod, expeditedVotingPeriod, quorum.String(), yesQuorum.String(), threshold.String(), expitedVotingThreshold.String(), veto.String(), minInitialDepositRatio.String(), proposalCancelRate.String(), "", proposalMaxCancelVotingPeriod.String(), simState.Rand.Intn(2) == 0, simState.Rand.Intn(2) == 0, simState.Rand.Intn(2) == 0, minDepositRatio.String(), optimisticRejectedThreshold.String(), []string{}), + v1.NewParams( + minDeposit, + expeditedMinDeposit, + depositPeriod, + votingPeriod, + expeditedVotingPeriod, + quorum.String(), + yesQuorum.String(), + expeditedQuorum.String(), + threshold.String(), + expeditedVotingThreshold.String(), + veto.String(), + minInitialDepositRatio.String(), + proposalCancelRate.String(), + "", + proposalMaxCancelVotingPeriod.String(), + simState.Rand.Intn(2) == 0, + simState.Rand.Intn(2) == 0, + simState.Rand.Intn(2) == 0, + minDepositRatio.String(), + optimisticRejectedThreshold.String(), + []string{}, + ), ) bz, err := json.MarshalIndent(&govGenesis, "", " ") diff --git a/x/gov/simulation/genesis_test.go b/x/gov/simulation/genesis_test.go index 5a9cbd898261..702350a40978 100644 --- a/x/gov/simulation/genesis_test.go +++ b/x/gov/simulation/genesis_test.go @@ -6,7 +6,6 @@ import ( "testing" "github.com/stretchr/testify/require" - "gotest.tools/v3/assert" sdkmath "cosmossdk.io/math" "cosmossdk.io/x/gov/simulation" @@ -48,28 +47,30 @@ func TestRandomizedGenState(t *testing.T) { const ( tallyQuorum = "0.387000000000000000" tallyYesQuorum = "0.449000000000000000" - tallyThreshold = "0.464000000000000000" - tallyExpeditedThreshold = "0.506000000000000000" - tallyVetoThreshold = "0.309000000000000000" + tallyExpeditedQuorum = "0.457000000000000000" + tallyThreshold = "0.479000000000000000" + tallyExpeditedThreshold = "0.545000000000000000" + tallyVetoThreshold = "0.280000000000000000" minInitialDepositDec = "0.880000000000000000" proposalCancelMaxPeriod = "0.110000000000000000" ) - assert.Equal(t, "272stake", govGenesis.Params.MinDeposit[0].String()) - assert.Equal(t, "800stake", govGenesis.Params.ExpeditedMinDeposit[0].String()) - assert.Equal(t, "41h11m36s", govGenesis.Params.MaxDepositPeriod.String()) - assert.Equal(t, float64(291928), govGenesis.Params.VotingPeriod.Seconds()) - assert.Equal(t, float64(33502), govGenesis.Params.ExpeditedVotingPeriod.Seconds()) - assert.Equal(t, tallyQuorum, govGenesis.Params.Quorum) - assert.Equal(t, tallyYesQuorum, govGenesis.Params.YesQuorum) - assert.Equal(t, tallyThreshold, govGenesis.Params.Threshold) - assert.Equal(t, tallyExpeditedThreshold, govGenesis.Params.ExpeditedThreshold) - assert.Equal(t, tallyVetoThreshold, govGenesis.Params.VetoThreshold) - assert.Equal(t, proposalCancelMaxPeriod, govGenesis.Params.ProposalCancelMaxPeriod) - assert.Equal(t, uint64(0x28), govGenesis.StartingProposalId) - assert.DeepEqual(t, []*v1.Deposit{}, govGenesis.Deposits) - assert.DeepEqual(t, []*v1.Vote{}, govGenesis.Votes) - assert.DeepEqual(t, []*v1.Proposal{}, govGenesis.Proposals) + require.Equal(t, "272stake", govGenesis.Params.MinDeposit[0].String()) + require.Equal(t, "800stake", govGenesis.Params.ExpeditedMinDeposit[0].String()) + require.Equal(t, "41h11m36s", govGenesis.Params.MaxDepositPeriod.String()) + require.Equal(t, float64(291928), govGenesis.Params.VotingPeriod.Seconds()) + require.Equal(t, float64(33502), govGenesis.Params.ExpeditedVotingPeriod.Seconds()) + require.Equal(t, tallyQuorum, govGenesis.Params.Quorum) + require.Equal(t, tallyYesQuorum, govGenesis.Params.YesQuorum) + require.Equal(t, tallyExpeditedQuorum, govGenesis.Params.ExpeditedQuorum) + require.Equal(t, tallyThreshold, govGenesis.Params.Threshold) + require.Equal(t, tallyExpeditedThreshold, govGenesis.Params.ExpeditedThreshold) + require.Equal(t, tallyVetoThreshold, govGenesis.Params.VetoThreshold) + require.Equal(t, proposalCancelMaxPeriod, govGenesis.Params.ProposalCancelMaxPeriod) + require.Equal(t, uint64(0x28), govGenesis.StartingProposalId) + require.Equal(t, []*v1.Deposit{}, govGenesis.Deposits) + require.Equal(t, []*v1.Vote{}, govGenesis.Votes) + require.Equal(t, []*v1.Proposal{}, govGenesis.Proposals) } // TestRandomizedGenState tests abnormal scenarios of applying RandomizedGenState. diff --git a/x/gov/types/v1/gov.pb.go b/x/gov/types/v1/gov.pb.go index 9dfd99de9af0..cc9b058d7ddd 100644 --- a/x/gov/types/v1/gov.pb.go +++ b/x/gov/types/v1/gov.pb.go @@ -1040,6 +1040,11 @@ type Params struct { // // Since: x/gov v1.0.0 YesQuorum string `protobuf:"bytes,20,opt,name=yes_quorum,json=yesQuorum,proto3" json:"yes_quorum,omitempty"` + // Minimum percentage of total stake needed to vote for a result to be + // considered valid for an expedited proposal. + // + // Since: x/gov v1.0.0 + ExpeditedQuorum string `protobuf:"bytes,21,opt,name=expedited_quorum,json=expeditedQuorum,proto3" json:"expedited_quorum,omitempty"` } func (m *Params) Reset() { *m = Params{} } @@ -1215,6 +1220,13 @@ func (m *Params) GetYesQuorum() string { return "" } +func (m *Params) GetExpeditedQuorum() string { + if m != nil { + return m.ExpeditedQuorum + } + return "" +} + // MessageBasedParams defines the parameters of specific messages in a proposal. // It is used to define the parameters of a proposal that is based on a specific message. // Once a message has message based params, it only supports a standard proposal type. @@ -1322,123 +1334,124 @@ func init() { func init() { proto.RegisterFile("cosmos/gov/v1/gov.proto", fileDescriptor_e05cb1c0d030febb) } var fileDescriptor_e05cb1c0d030febb = []byte{ - // 1854 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x58, 0xcd, 0x73, 0xe3, 0x48, - 0x15, 0x1f, 0xd9, 0x8e, 0x63, 0xbf, 0x38, 0x8e, 0xa6, 0x93, 0xd9, 0x28, 0xc9, 0xe6, 0x63, 0xcc, - 0xd6, 0x56, 0x6a, 0xd8, 0xd8, 0x64, 0x61, 0x28, 0x6a, 0x59, 0x0a, 0xec, 0x58, 0x43, 0x34, 0x24, - 0xb1, 0x91, 0x35, 0xc9, 0x0c, 0x17, 0xa1, 0x44, 0x3d, 0x89, 0xc0, 0x52, 0x1b, 0xa9, 0x9d, 0xc4, - 0xfc, 0x15, 0x7b, 0xa2, 0x38, 0x51, 0xdc, 0xe0, 0xc8, 0x61, 0x8b, 0xe2, 0xca, 0x6d, 0x8b, 0x03, - 0xb5, 0xb5, 0x27, 0x2e, 0x0c, 0xd4, 0xcc, 0x81, 0xaa, 0xfd, 0x13, 0x28, 0x0e, 0x54, 0x7f, 0xc8, - 0x92, 0x1d, 0x67, 0x92, 0x6c, 0xed, 0x25, 0x91, 0xde, 0xfb, 0xfd, 0x5e, 0xbf, 0x7e, 0x5f, 0xdd, - 0x16, 0x2c, 0x9e, 0x90, 0xc8, 0x27, 0x51, 0xed, 0x94, 0x9c, 0xd7, 0xce, 0xb7, 0xd9, 0xbf, 0x6a, - 0x2f, 0x24, 0x94, 0xa0, 0x59, 0xa1, 0xa8, 0x32, 0xc9, 0xf9, 0xf6, 0xf2, 0x9a, 0xc4, 0x1d, 0x3b, - 0x11, 0xae, 0x9d, 0x6f, 0x1f, 0x63, 0xea, 0x6c, 0xd7, 0x4e, 0x88, 0x17, 0x08, 0xf8, 0xf2, 0xc2, - 0x29, 0x39, 0x25, 0xfc, 0xb1, 0xc6, 0x9e, 0xa4, 0x74, 0xfd, 0x94, 0x90, 0xd3, 0x2e, 0xae, 0xf1, - 0xb7, 0xe3, 0xfe, 0xcb, 0x1a, 0xf5, 0x7c, 0x1c, 0x51, 0xc7, 0xef, 0x49, 0xc0, 0xd2, 0x38, 0xc0, - 0x09, 0x06, 0x52, 0xb5, 0x36, 0xae, 0x72, 0xfb, 0xa1, 0x43, 0x3d, 0x12, 0xaf, 0xb8, 0x24, 0x3c, - 0xb2, 0xc5, 0xa2, 0xd2, 0x5b, 0xa1, 0xba, 0xef, 0xf8, 0x5e, 0x40, 0x6a, 0xfc, 0xaf, 0x10, 0x55, - 0x08, 0xa0, 0x23, 0xec, 0x9d, 0x9e, 0x51, 0xec, 0x1e, 0x12, 0x8a, 0x5b, 0x3d, 0x66, 0x09, 0x6d, - 0x43, 0x9e, 0xf0, 0x27, 0x4d, 0xd9, 0x50, 0x36, 0xcb, 0x1f, 0x2e, 0x55, 0x47, 0x76, 0x5d, 0x4d, - 0xa0, 0xa6, 0x04, 0xa2, 0xf7, 0x21, 0x7f, 0xc1, 0x0d, 0x69, 0x99, 0x0d, 0x65, 0xb3, 0xd8, 0x28, - 0x7f, 0xf1, 0xe9, 0x16, 0x48, 0x56, 0x13, 0x9f, 0x98, 0x52, 0x5b, 0xf9, 0xbd, 0x02, 0xd3, 0x4d, - 0xdc, 0x23, 0x91, 0x47, 0xd1, 0x3a, 0xcc, 0xf4, 0x42, 0xd2, 0x23, 0x91, 0xd3, 0xb5, 0x3d, 0x97, - 0xaf, 0x95, 0x33, 0x21, 0x16, 0x19, 0x2e, 0xfa, 0x2e, 0x14, 0x5d, 0x81, 0x25, 0xa1, 0xb4, 0xab, - 0x7d, 0xf1, 0xe9, 0xd6, 0x82, 0xb4, 0x5b, 0x77, 0xdd, 0x10, 0x47, 0x51, 0x87, 0x86, 0x5e, 0x70, - 0x6a, 0x26, 0x50, 0xf4, 0x31, 0xe4, 0x1d, 0x9f, 0xf4, 0x03, 0xaa, 0x65, 0x37, 0xb2, 0x9b, 0x33, - 0x89, 0xff, 0x2c, 0x4d, 0x55, 0x99, 0xa6, 0xea, 0x0e, 0xf1, 0x82, 0x46, 0xf1, 0xb3, 0x57, 0xeb, - 0xf7, 0xfe, 0xf8, 0x9f, 0x3f, 0x3d, 0x52, 0x4c, 0xc9, 0xa9, 0xfc, 0x2d, 0x0f, 0x85, 0xb6, 0x74, - 0x02, 0x95, 0x21, 0x33, 0x74, 0x2d, 0xe3, 0xb9, 0xe8, 0x5b, 0x50, 0xf0, 0x71, 0x14, 0x39, 0xa7, - 0x38, 0xd2, 0x32, 0xdc, 0xf8, 0x42, 0x55, 0x64, 0xa4, 0x1a, 0x67, 0xa4, 0x5a, 0x0f, 0x06, 0xe6, - 0x10, 0x85, 0x1e, 0x43, 0x3e, 0xa2, 0x0e, 0xed, 0x47, 0x5a, 0x96, 0x07, 0x73, 0x75, 0x2c, 0x98, - 0xf1, 0x52, 0x1d, 0x0e, 0x32, 0x25, 0x18, 0xed, 0x02, 0x7a, 0xe9, 0x05, 0x4e, 0xd7, 0xa6, 0x4e, - 0xb7, 0x3b, 0xb0, 0x43, 0x1c, 0xf5, 0xbb, 0x54, 0xcb, 0x6d, 0x28, 0x9b, 0x33, 0x1f, 0x2e, 0x8f, - 0x99, 0xb0, 0x18, 0xc4, 0xe4, 0x08, 0x53, 0xe5, 0xac, 0x94, 0x04, 0xd5, 0x61, 0x26, 0xea, 0x1f, - 0xfb, 0x1e, 0xb5, 0x59, 0x99, 0x69, 0x53, 0xd2, 0xc4, 0xb8, 0xd7, 0x56, 0x5c, 0x83, 0x8d, 0xdc, - 0x27, 0xff, 0x5a, 0x57, 0x4c, 0x10, 0x24, 0x26, 0x46, 0x4f, 0x41, 0x95, 0xd1, 0xb5, 0x71, 0xe0, - 0x0a, 0x3b, 0xf9, 0x5b, 0xda, 0x29, 0x4b, 0xa6, 0x1e, 0xb8, 0xdc, 0x96, 0x01, 0xb3, 0x94, 0x50, - 0xa7, 0x6b, 0x4b, 0xb9, 0x36, 0x7d, 0x87, 0x1c, 0x95, 0x38, 0x35, 0x2e, 0xa0, 0x3d, 0xb8, 0x7f, - 0x4e, 0xa8, 0x17, 0x9c, 0xda, 0x11, 0x75, 0x42, 0xb9, 0xbf, 0xc2, 0x2d, 0xfd, 0x9a, 0x13, 0xd4, - 0x0e, 0x63, 0x72, 0xc7, 0x76, 0x41, 0x8a, 0x92, 0x3d, 0x16, 0x6f, 0x69, 0x6b, 0x56, 0x10, 0xe3, - 0x2d, 0x2e, 0xb3, 0x22, 0xa1, 0x8e, 0xeb, 0x50, 0x47, 0x03, 0x56, 0xb6, 0xe6, 0xf0, 0x1d, 0x2d, - 0xc0, 0x14, 0xf5, 0x68, 0x17, 0x6b, 0x33, 0x5c, 0x21, 0x5e, 0x90, 0x06, 0xd3, 0x51, 0xdf, 0xf7, - 0x9d, 0x70, 0xa0, 0x95, 0xb8, 0x3c, 0x7e, 0x45, 0xdf, 0x81, 0x82, 0xe8, 0x08, 0x1c, 0x6a, 0xb3, - 0x37, 0xb4, 0xc0, 0x10, 0x89, 0x36, 0xa0, 0x88, 0x2f, 0x7b, 0xd8, 0xf5, 0x28, 0x76, 0xb5, 0xf2, - 0x86, 0xb2, 0x59, 0x68, 0x64, 0x34, 0xc5, 0x4c, 0x84, 0xe8, 0x1b, 0x30, 0xfb, 0xd2, 0xf1, 0xba, - 0xd8, 0xb5, 0x43, 0xec, 0x44, 0x24, 0xd0, 0xe6, 0xf8, 0xba, 0x25, 0x21, 0x34, 0xb9, 0x0c, 0xfd, - 0x08, 0x66, 0x87, 0x1d, 0x4a, 0x07, 0x3d, 0xac, 0xa9, 0xbc, 0x84, 0x57, 0xae, 0x29, 0x61, 0x6b, - 0xd0, 0xc3, 0x66, 0xa9, 0x97, 0x7a, 0xab, 0xfc, 0x45, 0x81, 0xf9, 0x58, 0x9d, 0x8c, 0x8d, 0x08, - 0xad, 0x02, 0x88, 0xc9, 0x61, 0x93, 0x00, 0xf3, 0xfe, 0x2a, 0x9a, 0x45, 0x21, 0x69, 0x05, 0x38, - 0xa5, 0xa6, 0x17, 0x44, 0xb4, 0x7e, 0xac, 0xb6, 0x2e, 0x08, 0x7a, 0x08, 0xa5, 0x58, 0x7d, 0x16, - 0x62, 0xcc, 0x3b, 0xab, 0x68, 0xce, 0x48, 0x00, 0x13, 0xb1, 0xe1, 0x22, 0x21, 0x2f, 0x49, 0x3f, - 0xe4, 0x8d, 0x53, 0x34, 0xa5, 0xd1, 0x27, 0xa4, 0x1f, 0xa6, 0x00, 0x51, 0xcf, 0xf1, 0x79, 0x5b, - 0x0c, 0x01, 0x9d, 0x9e, 0xe3, 0x57, 0xfe, 0x97, 0x85, 0x99, 0x74, 0x1f, 0x6d, 0x41, 0x71, 0x80, - 0x23, 0xfb, 0x84, 0x0f, 0x16, 0xee, 0x71, 0x43, 0x4d, 0x4d, 0x39, 0x83, 0x49, 0xcd, 0xc2, 0x00, - 0x47, 0x3b, 0x0c, 0x81, 0x1e, 0xc3, 0xac, 0x73, 0x1c, 0x51, 0xc7, 0x0b, 0x24, 0x25, 0x73, 0x0d, - 0xa5, 0x24, 0x61, 0x82, 0xf6, 0x4d, 0x28, 0x04, 0x44, 0x32, 0xb2, 0xd7, 0x30, 0xa6, 0x03, 0x22, - 0xc0, 0x3f, 0x00, 0x14, 0x10, 0xfb, 0xc2, 0xa3, 0x67, 0xf6, 0x39, 0xa6, 0x31, 0x2d, 0x77, 0x0d, - 0x6d, 0x2e, 0x20, 0x47, 0x1e, 0x3d, 0x3b, 0xc4, 0x54, 0xd2, 0xbf, 0x07, 0x6a, 0x92, 0x04, 0x49, - 0x9e, 0xba, 0x32, 0xbe, 0x8d, 0x80, 0x9a, 0xe5, 0x61, 0x6a, 0xc6, 0x99, 0xf4, 0x22, 0x5e, 0x36, - 0xff, 0x36, 0xa6, 0x75, 0x21, 0xd7, 0xfc, 0x18, 0x50, 0x3a, 0x75, 0x92, 0x3b, 0x3d, 0x91, 0xab, - 0xa6, 0x12, 0x2a, 0xd8, 0x1f, 0xc1, 0xfd, 0x54, 0x56, 0x25, 0xb9, 0x30, 0x91, 0x3c, 0x97, 0xe4, - 0x5a, 0x70, 0xb7, 0x00, 0x58, 0xa6, 0x25, 0xa9, 0x38, 0x91, 0x54, 0x64, 0x08, 0x0e, 0xaf, 0xfc, - 0x59, 0x81, 0x1c, 0xab, 0xd8, 0x9b, 0x8f, 0xa9, 0x2a, 0x4c, 0x9d, 0x13, 0x8a, 0x6f, 0x3e, 0xa2, - 0x04, 0x0c, 0x7d, 0x1f, 0xa6, 0x85, 0x6f, 0x91, 0x96, 0xe3, 0xb3, 0xef, 0xe1, 0x58, 0x3f, 0x5d, - 0x3d, 0x92, 0xcd, 0x98, 0x31, 0x32, 0x5b, 0xa6, 0x46, 0x67, 0xcb, 0xd3, 0x5c, 0x21, 0xab, 0xe6, - 0x2a, 0xff, 0x54, 0x60, 0x56, 0x4e, 0xc8, 0xb6, 0x13, 0x3a, 0x7e, 0x84, 0x5e, 0xc0, 0x8c, 0xef, - 0x05, 0xc3, 0x81, 0xab, 0xdc, 0x34, 0x70, 0x57, 0xd9, 0xc0, 0xfd, 0xf2, 0xd5, 0xfa, 0x83, 0x14, - 0xeb, 0x03, 0xe2, 0x7b, 0x14, 0xfb, 0x3d, 0x3a, 0x30, 0xc1, 0xf7, 0x82, 0x78, 0x04, 0xfb, 0x80, - 0x7c, 0xe7, 0x32, 0x06, 0xd9, 0x3d, 0x1c, 0x7a, 0xc4, 0xe5, 0x81, 0x60, 0x2b, 0x8c, 0xcf, 0xcd, - 0xa6, 0xbc, 0xab, 0x34, 0xde, 0xfb, 0xf2, 0xd5, 0xfa, 0xbb, 0x57, 0x89, 0xc9, 0x22, 0xbf, 0x65, - 0x63, 0x55, 0xf5, 0x9d, 0xcb, 0x78, 0x27, 0x5c, 0xff, 0x51, 0x46, 0x53, 0x2a, 0xcf, 0xa1, 0x74, - 0xc8, 0xc7, 0xad, 0xdc, 0x5d, 0x13, 0xe4, 0xf8, 0x8d, 0x57, 0x57, 0x6e, 0x5a, 0x3d, 0xc7, 0xad, - 0x97, 0x04, 0x2b, 0x65, 0xf9, 0x77, 0x8a, 0xec, 0x78, 0x69, 0xf9, 0x7d, 0xc8, 0xff, 0xaa, 0x4f, - 0xc2, 0xbe, 0x2f, 0xdb, 0xfd, 0xca, 0xa5, 0x46, 0x68, 0xd1, 0x07, 0x50, 0x64, 0xc5, 0x1c, 0x9d, - 0x91, 0xae, 0x7b, 0xcd, 0xfd, 0x27, 0x01, 0xa0, 0xc7, 0x50, 0xe6, 0xcd, 0x9a, 0x50, 0xb2, 0x13, - 0x29, 0xb3, 0x0c, 0x65, 0xc5, 0x20, 0xee, 0xe0, 0x5f, 0x01, 0xf2, 0xd2, 0x37, 0xfd, 0x8e, 0x39, - 0x4d, 0x1d, 0xa2, 0xe9, 0xfc, 0xed, 0x7f, 0xb5, 0xfc, 0xe5, 0x26, 0xe7, 0xe7, 0x6a, 0x2e, 0xb2, - 0x5f, 0x21, 0x17, 0xa9, 0xb8, 0xe7, 0x6e, 0x1f, 0xf7, 0xa9, 0xbb, 0xc7, 0x3d, 0x7f, 0x8b, 0xb8, - 0x23, 0x03, 0x96, 0x58, 0xa0, 0xbd, 0xc0, 0xa3, 0x5e, 0x72, 0x6b, 0xb1, 0xb9, 0xfb, 0x13, 0xe6, - 0x16, 0xb3, 0xf0, 0x8e, 0xef, 0x05, 0x86, 0xc0, 0xcb, 0xf0, 0x98, 0x0c, 0x8d, 0x1a, 0xf0, 0x60, - 0x38, 0x49, 0x4e, 0x9c, 0xe0, 0x04, 0x77, 0xa5, 0x99, 0xc2, 0x44, 0x33, 0xf3, 0x31, 0x78, 0x87, - 0x63, 0x85, 0x8d, 0xa7, 0xb0, 0x30, 0x6e, 0xc3, 0xc5, 0x51, 0x3c, 0xcf, 0xae, 0x9f, 0x3d, 0x68, - 0xd4, 0x58, 0x13, 0x47, 0x14, 0x1d, 0xc1, 0xe2, 0xf0, 0x42, 0x60, 0x8f, 0xe6, 0x0d, 0x6e, 0x97, - 0xb7, 0x07, 0x43, 0xfe, 0x61, 0x3a, 0x81, 0x3f, 0x84, 0xf9, 0xc4, 0x70, 0x12, 0xef, 0x99, 0x89, - 0xdb, 0x44, 0x43, 0x68, 0x12, 0xf4, 0xe7, 0x90, 0x58, 0xb6, 0xd3, 0x75, 0x5e, 0xba, 0x43, 0x9d, - 0x27, 0x3e, 0xec, 0x27, 0x05, 0xbf, 0x09, 0xea, 0x71, 0x3f, 0x0c, 0xd8, 0x76, 0xb1, 0x2d, 0xab, - 0x8c, 0xdd, 0xab, 0x0a, 0x66, 0x99, 0xc9, 0xd9, 0xc8, 0xfd, 0xa9, 0xa8, 0xae, 0x3a, 0xac, 0x72, - 0xe4, 0x30, 0xdc, 0xc3, 0x26, 0x09, 0x31, 0x63, 0x8b, 0x7b, 0x95, 0xb9, 0xcc, 0x40, 0xf1, 0x15, - 0x27, 0xee, 0x06, 0x81, 0x40, 0xef, 0x41, 0x39, 0x59, 0x8c, 0x95, 0x15, 0xbf, 0x65, 0x15, 0xcc, - 0x52, 0xbc, 0x14, 0x3b, 0x8b, 0xd9, 0xa1, 0x96, 0xda, 0xa2, 0x2c, 0x09, 0x75, 0x62, 0xac, 0xe6, - 0x92, 0xd6, 0x15, 0xe5, 0xf0, 0x13, 0x58, 0x1e, 0x2f, 0x07, 0xd6, 0xcf, 0x32, 0x8b, 0xf7, 0x27, - 0x1a, 0x59, 0x1c, 0x2d, 0x85, 0x7d, 0xe7, 0x52, 0xa6, 0xed, 0xe7, 0xb0, 0xce, 0x8e, 0x19, 0xdf, - 0x8b, 0xa8, 0x77, 0x62, 0x3b, 0x7d, 0x7a, 0x46, 0x42, 0xef, 0xd7, 0xd8, 0xb5, 0x1d, 0x51, 0x4a, - 0x38, 0xd2, 0xd0, 0x46, 0xf6, 0xad, 0x65, 0xb6, 0x9a, 0x18, 0xa8, 0x0f, 0xf9, 0xf5, 0x98, 0x8e, - 0x4c, 0x48, 0x01, 0xec, 0x10, 0xff, 0x02, 0x9f, 0x8c, 0x96, 0xc8, 0xfc, 0x44, 0x8f, 0x57, 0x12, - 0x92, 0x29, 0x39, 0x49, 0xad, 0x6c, 0x01, 0xb0, 0x7b, 0x99, 0xcc, 0xe5, 0xc2, 0xe4, 0x31, 0x30, - 0xc0, 0x91, 0x48, 0x6b, 0xe5, 0x37, 0x19, 0x40, 0xfb, 0xe2, 0xc7, 0x59, 0xc3, 0x89, 0xb0, 0xfb, - 0x75, 0x9e, 0x22, 0xa9, 0xc9, 0x95, 0x79, 0xeb, 0xe4, 0xba, 0x9b, 0xcf, 0xa3, 0x83, 0x2e, 0x7b, - 0xf7, 0x41, 0x97, 0xbb, 0xc5, 0xa0, 0x7b, 0xf4, 0x07, 0x05, 0x4a, 0xe9, 0x9b, 0x3c, 0x5a, 0x85, - 0xa5, 0xb6, 0xd9, 0x6a, 0xb7, 0x3a, 0xf5, 0x3d, 0xdb, 0x7a, 0xd1, 0xd6, 0xed, 0x67, 0x07, 0x9d, - 0xb6, 0xbe, 0x63, 0x3c, 0x31, 0xf4, 0xa6, 0x7a, 0x0f, 0x2d, 0xc3, 0x3b, 0xa3, 0xea, 0x8e, 0x55, - 0x3f, 0x68, 0xd6, 0xcd, 0xa6, 0xaa, 0xa0, 0x87, 0xb0, 0x3a, 0xaa, 0xdb, 0x7f, 0xb6, 0x67, 0x19, - 0xed, 0x3d, 0xdd, 0xde, 0xd9, 0x6d, 0x19, 0x3b, 0xba, 0x9a, 0x41, 0xef, 0x82, 0x36, 0x0a, 0x69, - 0xb5, 0x2d, 0x63, 0xdf, 0xe8, 0x58, 0xc6, 0x8e, 0x9a, 0x45, 0x2b, 0xb0, 0x38, 0xaa, 0xd5, 0x9f, - 0xb7, 0xf5, 0xa6, 0x61, 0xe9, 0x4d, 0x35, 0xf7, 0xe8, 0xbf, 0x0a, 0x40, 0xea, 0x73, 0xc5, 0x0a, - 0x2c, 0x1e, 0xb6, 0x2c, 0x61, 0xa0, 0x75, 0x30, 0xe6, 0xe5, 0x3c, 0xcc, 0xa5, 0x95, 0x2f, 0xf4, - 0x8e, 0xaa, 0x8c, 0x0b, 0x5b, 0x07, 0xba, 0xaa, 0xa0, 0x45, 0x98, 0x4f, 0x0b, 0xeb, 0x8d, 0x8e, - 0x55, 0x37, 0x0e, 0xd4, 0xcc, 0x38, 0xda, 0x3a, 0x6a, 0xa9, 0x19, 0x84, 0xa0, 0x9c, 0x16, 0x1e, - 0xb4, 0xd4, 0x2c, 0x7a, 0x00, 0xf7, 0x47, 0x80, 0xbb, 0xa6, 0xae, 0xab, 0x59, 0xb6, 0xd3, 0x51, - 0xa8, 0x7d, 0x64, 0x58, 0xbb, 0xf6, 0xa1, 0x6e, 0xb5, 0xd4, 0x1c, 0x5a, 0x00, 0x35, 0xad, 0x7d, - 0xd2, 0x7a, 0x66, 0x5e, 0x95, 0x76, 0xda, 0xf5, 0x7d, 0x75, 0x6a, 0x39, 0xa3, 0x2a, 0x8f, 0xfe, - 0xae, 0x40, 0x79, 0xf4, 0x9b, 0x01, 0x5a, 0x87, 0x95, 0x61, 0xb0, 0x3a, 0x56, 0xdd, 0x7a, 0xd6, - 0x19, 0x0b, 0x42, 0x05, 0xd6, 0xc6, 0x01, 0x4d, 0xbd, 0xdd, 0xea, 0x18, 0x96, 0xdd, 0xd6, 0x4d, - 0xa3, 0x35, 0x9e, 0x32, 0x89, 0x39, 0x6c, 0x59, 0xc6, 0xc1, 0x8f, 0x63, 0x48, 0x66, 0x24, 0xe3, - 0x12, 0xd2, 0xae, 0x77, 0x3a, 0x7a, 0x53, 0x6c, 0x72, 0x5c, 0x67, 0xea, 0x4f, 0xf5, 0x1d, 0x9e, - 0xb1, 0x49, 0xcc, 0x27, 0x75, 0x63, 0x4f, 0x6f, 0xaa, 0x53, 0x8d, 0xc7, 0x9f, 0xbd, 0x5e, 0x53, - 0x3e, 0x7f, 0xbd, 0xa6, 0xfc, 0xfb, 0xf5, 0x9a, 0xf2, 0xc9, 0x9b, 0xb5, 0x7b, 0x9f, 0xbf, 0x59, - 0xbb, 0xf7, 0x8f, 0x37, 0x6b, 0xf7, 0x7e, 0xb6, 0x22, 0x8a, 0x35, 0x72, 0x7f, 0x59, 0xf5, 0x48, - 0xed, 0x92, 0x7f, 0x8d, 0x63, 0x3f, 0x43, 0xa3, 0xda, 0xf9, 0xf6, 0x71, 0x9e, 0x77, 0xe4, 0xb7, - 0xff, 0x1f, 0x00, 0x00, 0xff, 0xff, 0xdf, 0x80, 0xb6, 0x5a, 0xab, 0x13, 0x00, 0x00, + // 1867 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x58, 0x4f, 0x73, 0xe3, 0x48, + 0x15, 0x1f, 0xd9, 0x8e, 0x63, 0xbf, 0x38, 0x8e, 0xa6, 0x93, 0xd9, 0x28, 0xc9, 0xe6, 0xcf, 0x98, + 0xad, 0xad, 0xd4, 0xb0, 0xb1, 0xc9, 0xc2, 0x50, 0xb0, 0x2c, 0x05, 0x76, 0xac, 0x21, 0x1a, 0x92, + 0xd8, 0xc8, 0x9a, 0x64, 0x86, 0x8b, 0x50, 0xa2, 0x9e, 0x44, 0x60, 0xa9, 0x8d, 0xd4, 0x4e, 0x62, + 0x3e, 0xc5, 0x9e, 0x28, 0x4e, 0x14, 0x37, 0x38, 0x72, 0xd8, 0xa2, 0xf8, 0x08, 0x5b, 0x1c, 0xa8, + 0xad, 0x3d, 0x71, 0x61, 0xa0, 0x66, 0x0e, 0x54, 0xed, 0x47, 0xa0, 0xf6, 0x40, 0xf5, 0x1f, 0x59, + 0xb2, 0xe3, 0x4c, 0x92, 0x2d, 0x2e, 0x89, 0xf5, 0xde, 0xef, 0xf7, 0xfa, 0xf5, 0xfb, 0xd7, 0x2d, + 0xc1, 0xe2, 0x09, 0x89, 0x7c, 0x12, 0xd5, 0x4e, 0xc9, 0x79, 0xed, 0x7c, 0x9b, 0xfd, 0xab, 0xf6, + 0x42, 0x42, 0x09, 0x9a, 0x15, 0x8a, 0x2a, 0x93, 0x9c, 0x6f, 0x2f, 0xaf, 0x49, 0xdc, 0xb1, 0x13, + 0xe1, 0xda, 0xf9, 0xf6, 0x31, 0xa6, 0xce, 0x76, 0xed, 0x84, 0x78, 0x81, 0x80, 0x2f, 0x2f, 0x9c, + 0x92, 0x53, 0xc2, 0x7f, 0xd6, 0xd8, 0x2f, 0x29, 0x5d, 0x3f, 0x25, 0xe4, 0xb4, 0x8b, 0x6b, 0xfc, + 0xe9, 0xb8, 0xff, 0xb2, 0x46, 0x3d, 0x1f, 0x47, 0xd4, 0xf1, 0x7b, 0x12, 0xb0, 0x34, 0x0e, 0x70, + 0x82, 0x81, 0x54, 0xad, 0x8d, 0xab, 0xdc, 0x7e, 0xe8, 0x50, 0x8f, 0xc4, 0x2b, 0x2e, 0x09, 0x8f, + 0x6c, 0xb1, 0xa8, 0xf4, 0x56, 0xa8, 0xee, 0x3b, 0xbe, 0x17, 0x90, 0x1a, 0xff, 0x2b, 0x44, 0x15, + 0x02, 0xe8, 0x08, 0x7b, 0xa7, 0x67, 0x14, 0xbb, 0x87, 0x84, 0xe2, 0x56, 0x8f, 0x59, 0x42, 0xdb, + 0x90, 0x27, 0xfc, 0x97, 0xa6, 0x6c, 0x28, 0x9b, 0xe5, 0x0f, 0x97, 0xaa, 0x23, 0xbb, 0xae, 0x26, + 0x50, 0x53, 0x02, 0xd1, 0xfb, 0x90, 0xbf, 0xe0, 0x86, 0xb4, 0xcc, 0x86, 0xb2, 0x59, 0x6c, 0x94, + 0xbf, 0xf8, 0x74, 0x0b, 0x24, 0xab, 0x89, 0x4f, 0x4c, 0xa9, 0xad, 0xfc, 0x41, 0x81, 0xe9, 0x26, + 0xee, 0x91, 0xc8, 0xa3, 0x68, 0x1d, 0x66, 0x7a, 0x21, 0xe9, 0x91, 0xc8, 0xe9, 0xda, 0x9e, 0xcb, + 0xd7, 0xca, 0x99, 0x10, 0x8b, 0x0c, 0x17, 0x7d, 0x17, 0x8a, 0xae, 0xc0, 0x92, 0x50, 0xda, 0xd5, + 0xbe, 0xf8, 0x74, 0x6b, 0x41, 0xda, 0xad, 0xbb, 0x6e, 0x88, 0xa3, 0xa8, 0x43, 0x43, 0x2f, 0x38, + 0x35, 0x13, 0x28, 0xfa, 0x18, 0xf2, 0x8e, 0x4f, 0xfa, 0x01, 0xd5, 0xb2, 0x1b, 0xd9, 0xcd, 0x99, + 0xc4, 0x7f, 0x96, 0xa6, 0xaa, 0x4c, 0x53, 0x75, 0x87, 0x78, 0x41, 0xa3, 0xf8, 0xd9, 0xab, 0xf5, + 0x7b, 0x7f, 0xfa, 0xcf, 0x9f, 0x1f, 0x29, 0xa6, 0xe4, 0x54, 0xfe, 0x96, 0x87, 0x42, 0x5b, 0x3a, + 0x81, 0xca, 0x90, 0x19, 0xba, 0x96, 0xf1, 0x5c, 0xf4, 0x2d, 0x28, 0xf8, 0x38, 0x8a, 0x9c, 0x53, + 0x1c, 0x69, 0x19, 0x6e, 0x7c, 0xa1, 0x2a, 0x32, 0x52, 0x8d, 0x33, 0x52, 0xad, 0x07, 0x03, 0x73, + 0x88, 0x42, 0x8f, 0x21, 0x1f, 0x51, 0x87, 0xf6, 0x23, 0x2d, 0xcb, 0x83, 0xb9, 0x3a, 0x16, 0xcc, + 0x78, 0xa9, 0x0e, 0x07, 0x99, 0x12, 0x8c, 0x76, 0x01, 0xbd, 0xf4, 0x02, 0xa7, 0x6b, 0x53, 0xa7, + 0xdb, 0x1d, 0xd8, 0x21, 0x8e, 0xfa, 0x5d, 0xaa, 0xe5, 0x36, 0x94, 0xcd, 0x99, 0x0f, 0x97, 0xc7, + 0x4c, 0x58, 0x0c, 0x62, 0x72, 0x84, 0xa9, 0x72, 0x56, 0x4a, 0x82, 0xea, 0x30, 0x13, 0xf5, 0x8f, + 0x7d, 0x8f, 0xda, 0xac, 0xcc, 0xb4, 0x29, 0x69, 0x62, 0xdc, 0x6b, 0x2b, 0xae, 0xc1, 0x46, 0xee, + 0x93, 0x7f, 0xad, 0x2b, 0x26, 0x08, 0x12, 0x13, 0xa3, 0xa7, 0xa0, 0xca, 0xe8, 0xda, 0x38, 0x70, + 0x85, 0x9d, 0xfc, 0x2d, 0xed, 0x94, 0x25, 0x53, 0x0f, 0x5c, 0x6e, 0xcb, 0x80, 0x59, 0x4a, 0xa8, + 0xd3, 0xb5, 0xa5, 0x5c, 0x9b, 0xbe, 0x43, 0x8e, 0x4a, 0x9c, 0x1a, 0x17, 0xd0, 0x1e, 0xdc, 0x3f, + 0x27, 0xd4, 0x0b, 0x4e, 0xed, 0x88, 0x3a, 0xa1, 0xdc, 0x5f, 0xe1, 0x96, 0x7e, 0xcd, 0x09, 0x6a, + 0x87, 0x31, 0xb9, 0x63, 0xbb, 0x20, 0x45, 0xc9, 0x1e, 0x8b, 0xb7, 0xb4, 0x35, 0x2b, 0x88, 0xf1, + 0x16, 0x97, 0x59, 0x91, 0x50, 0xc7, 0x75, 0xa8, 0xa3, 0x01, 0x2b, 0x5b, 0x73, 0xf8, 0x8c, 0x16, + 0x60, 0x8a, 0x7a, 0xb4, 0x8b, 0xb5, 0x19, 0xae, 0x10, 0x0f, 0x48, 0x83, 0xe9, 0xa8, 0xef, 0xfb, + 0x4e, 0x38, 0xd0, 0x4a, 0x5c, 0x1e, 0x3f, 0xa2, 0xef, 0x40, 0x41, 0x74, 0x04, 0x0e, 0xb5, 0xd9, + 0x1b, 0x5a, 0x60, 0x88, 0x44, 0x1b, 0x50, 0xc4, 0x97, 0x3d, 0xec, 0x7a, 0x14, 0xbb, 0x5a, 0x79, + 0x43, 0xd9, 0x2c, 0x34, 0x32, 0x9a, 0x62, 0x26, 0x42, 0xf4, 0x0d, 0x98, 0x7d, 0xe9, 0x78, 0x5d, + 0xec, 0xda, 0x21, 0x76, 0x22, 0x12, 0x68, 0x73, 0x7c, 0xdd, 0x92, 0x10, 0x9a, 0x5c, 0x86, 0x7e, + 0x0c, 0xb3, 0xc3, 0x0e, 0xa5, 0x83, 0x1e, 0xd6, 0x54, 0x5e, 0xc2, 0x2b, 0xd7, 0x94, 0xb0, 0x35, + 0xe8, 0x61, 0xb3, 0xd4, 0x4b, 0x3d, 0x55, 0xfe, 0xaa, 0xc0, 0x7c, 0xac, 0x4e, 0xc6, 0x46, 0x84, + 0x56, 0x01, 0xc4, 0xe4, 0xb0, 0x49, 0x80, 0x79, 0x7f, 0x15, 0xcd, 0xa2, 0x90, 0xb4, 0x02, 0x9c, + 0x52, 0xd3, 0x0b, 0x22, 0x5a, 0x3f, 0x56, 0x5b, 0x17, 0x04, 0x3d, 0x84, 0x52, 0xac, 0x3e, 0x0b, + 0x31, 0xe6, 0x9d, 0x55, 0x34, 0x67, 0x24, 0x80, 0x89, 0xd8, 0x70, 0x91, 0x90, 0x97, 0xa4, 0x1f, + 0xf2, 0xc6, 0x29, 0x9a, 0xd2, 0xe8, 0x13, 0xd2, 0x0f, 0x53, 0x80, 0xa8, 0xe7, 0xf8, 0xbc, 0x2d, + 0x86, 0x80, 0x4e, 0xcf, 0xf1, 0x2b, 0x5f, 0x65, 0x61, 0x26, 0xdd, 0x47, 0x5b, 0x50, 0x1c, 0xe0, + 0xc8, 0x3e, 0xe1, 0x83, 0x85, 0x7b, 0xdc, 0x50, 0x53, 0x53, 0xce, 0x60, 0x52, 0xb3, 0x30, 0xc0, + 0xd1, 0x0e, 0x43, 0xa0, 0xc7, 0x30, 0xeb, 0x1c, 0x47, 0xd4, 0xf1, 0x02, 0x49, 0xc9, 0x5c, 0x43, + 0x29, 0x49, 0x98, 0xa0, 0x7d, 0x13, 0x0a, 0x01, 0x91, 0x8c, 0xec, 0x35, 0x8c, 0xe9, 0x80, 0x08, + 0xf0, 0x0f, 0x01, 0x05, 0xc4, 0xbe, 0xf0, 0xe8, 0x99, 0x7d, 0x8e, 0x69, 0x4c, 0xcb, 0x5d, 0x43, + 0x9b, 0x0b, 0xc8, 0x91, 0x47, 0xcf, 0x0e, 0x31, 0x95, 0xf4, 0xef, 0x81, 0x9a, 0x24, 0x41, 0x92, + 0xa7, 0xae, 0x8c, 0x6f, 0x23, 0xa0, 0x66, 0x79, 0x98, 0x9a, 0x71, 0x26, 0xbd, 0x88, 0x97, 0xcd, + 0xbf, 0x8d, 0x69, 0x5d, 0xc8, 0x35, 0x3f, 0x06, 0x94, 0x4e, 0x9d, 0xe4, 0x4e, 0x4f, 0xe4, 0xaa, + 0xa9, 0x84, 0x0a, 0xf6, 0x47, 0x70, 0x3f, 0x95, 0x55, 0x49, 0x2e, 0x4c, 0x24, 0xcf, 0x25, 0xb9, + 0x16, 0xdc, 0x2d, 0x00, 0x96, 0x69, 0x49, 0x2a, 0x4e, 0x24, 0x15, 0x19, 0x82, 0xc3, 0x2b, 0x7f, + 0x51, 0x20, 0xc7, 0x2a, 0xf6, 0xe6, 0x63, 0xaa, 0x0a, 0x53, 0xe7, 0x84, 0xe2, 0x9b, 0x8f, 0x28, + 0x01, 0x43, 0x3f, 0x80, 0x69, 0xe1, 0x5b, 0xa4, 0xe5, 0xf8, 0xec, 0x7b, 0x38, 0xd6, 0x4f, 0x57, + 0x8f, 0x64, 0x33, 0x66, 0x8c, 0xcc, 0x96, 0xa9, 0xd1, 0xd9, 0xf2, 0x34, 0x57, 0xc8, 0xaa, 0xb9, + 0xca, 0x3f, 0x15, 0x98, 0x95, 0x13, 0xb2, 0xed, 0x84, 0x8e, 0x1f, 0xa1, 0x17, 0x30, 0xe3, 0x7b, + 0xc1, 0x70, 0xe0, 0x2a, 0x37, 0x0d, 0xdc, 0x55, 0x36, 0x70, 0xbf, 0x7c, 0xb5, 0xfe, 0x20, 0xc5, + 0xfa, 0x80, 0xf8, 0x1e, 0xc5, 0x7e, 0x8f, 0x0e, 0x4c, 0xf0, 0xbd, 0x20, 0x1e, 0xc1, 0x3e, 0x20, + 0xdf, 0xb9, 0x8c, 0x41, 0x76, 0x0f, 0x87, 0x1e, 0x71, 0x79, 0x20, 0xd8, 0x0a, 0xe3, 0x73, 0xb3, + 0x29, 0xef, 0x2a, 0x8d, 0xf7, 0xbe, 0x7c, 0xb5, 0xfe, 0xee, 0x55, 0x62, 0xb2, 0xc8, 0xef, 0xd8, + 0x58, 0x55, 0x7d, 0xe7, 0x32, 0xde, 0x09, 0xd7, 0x7f, 0x94, 0xd1, 0x94, 0xca, 0x73, 0x28, 0x1d, + 0xf2, 0x71, 0x2b, 0x77, 0xd7, 0x04, 0x39, 0x7e, 0xe3, 0xd5, 0x95, 0x9b, 0x56, 0xcf, 0x71, 0xeb, + 0x25, 0xc1, 0x4a, 0x59, 0xfe, 0xbd, 0x22, 0x3b, 0x5e, 0x5a, 0x7e, 0x1f, 0xf2, 0xbf, 0xee, 0x93, + 0xb0, 0xef, 0xcb, 0x76, 0xbf, 0x72, 0xa9, 0x11, 0x5a, 0xf4, 0x01, 0x14, 0x59, 0x31, 0x47, 0x67, + 0xa4, 0xeb, 0x5e, 0x73, 0xff, 0x49, 0x00, 0xe8, 0x31, 0x94, 0x79, 0xb3, 0x26, 0x94, 0xec, 0x44, + 0xca, 0x2c, 0x43, 0x59, 0x31, 0x88, 0x3b, 0xf8, 0x15, 0x40, 0x5e, 0xfa, 0xa6, 0xdf, 0x31, 0xa7, + 0xa9, 0x43, 0x34, 0x9d, 0xbf, 0xfd, 0xaf, 0x97, 0xbf, 0xdc, 0xe4, 0xfc, 0x5c, 0xcd, 0x45, 0xf6, + 0x6b, 0xe4, 0x22, 0x15, 0xf7, 0xdc, 0xed, 0xe3, 0x3e, 0x75, 0xf7, 0xb8, 0xe7, 0x6f, 0x11, 0x77, + 0x64, 0xc0, 0x12, 0x0b, 0xb4, 0x17, 0x78, 0xd4, 0x4b, 0x6e, 0x2d, 0x36, 0x77, 0x7f, 0xc2, 0xdc, + 0x62, 0x16, 0xde, 0xf1, 0xbd, 0xc0, 0x10, 0x78, 0x19, 0x1e, 0x93, 0xa1, 0x51, 0x03, 0x1e, 0x0c, + 0x27, 0xc9, 0x89, 0x13, 0x9c, 0xe0, 0xae, 0x34, 0x53, 0x98, 0x68, 0x66, 0x3e, 0x06, 0xef, 0x70, + 0xac, 0xb0, 0xf1, 0x14, 0x16, 0xc6, 0x6d, 0xb8, 0x38, 0x8a, 0xe7, 0xd9, 0xf5, 0xb3, 0x07, 0x8d, + 0x1a, 0x6b, 0xe2, 0x88, 0xa2, 0x23, 0x58, 0x1c, 0x5e, 0x08, 0xec, 0xd1, 0xbc, 0xc1, 0xed, 0xf2, + 0xf6, 0x60, 0xc8, 0x3f, 0x4c, 0x27, 0xf0, 0x47, 0x30, 0x9f, 0x18, 0x4e, 0xe2, 0x3d, 0x33, 0x71, + 0x9b, 0x68, 0x08, 0x4d, 0x82, 0xfe, 0x1c, 0x12, 0xcb, 0x76, 0xba, 0xce, 0x4b, 0x77, 0xa8, 0xf3, + 0xc4, 0x87, 0xfd, 0xa4, 0xe0, 0x37, 0x41, 0x3d, 0xee, 0x87, 0x01, 0xdb, 0x2e, 0xb6, 0x65, 0x95, + 0xb1, 0x7b, 0x55, 0xc1, 0x2c, 0x33, 0x39, 0x1b, 0xb9, 0x3f, 0x13, 0xd5, 0x55, 0x87, 0x55, 0x8e, + 0x1c, 0x86, 0x7b, 0xd8, 0x24, 0x21, 0x66, 0x6c, 0x71, 0xaf, 0x32, 0x97, 0x19, 0x28, 0xbe, 0xe2, + 0xc4, 0xdd, 0x20, 0x10, 0xe8, 0x3d, 0x28, 0x27, 0x8b, 0xb1, 0xb2, 0xe2, 0xb7, 0xac, 0x82, 0x59, + 0x8a, 0x97, 0x62, 0x67, 0x31, 0x3b, 0xd4, 0x52, 0x5b, 0x94, 0x25, 0xa1, 0x4e, 0x8c, 0xd5, 0x5c, + 0xd2, 0xba, 0xa2, 0x1c, 0x7e, 0x0a, 0xcb, 0xe3, 0xe5, 0xc0, 0xfa, 0x59, 0x66, 0xf1, 0xfe, 0x44, + 0x23, 0x8b, 0xa3, 0xa5, 0xb0, 0xef, 0x5c, 0xca, 0xb4, 0xfd, 0x02, 0xd6, 0xd9, 0x31, 0xe3, 0x7b, + 0x11, 0xf5, 0x4e, 0x6c, 0xa7, 0x4f, 0xcf, 0x48, 0xe8, 0xfd, 0x06, 0xbb, 0xb6, 0x23, 0x4a, 0x09, + 0x47, 0x1a, 0xda, 0xc8, 0xbe, 0xb5, 0xcc, 0x56, 0x13, 0x03, 0xf5, 0x21, 0xbf, 0x1e, 0xd3, 0x91, + 0x09, 0x29, 0x80, 0x1d, 0xe2, 0x5f, 0xe2, 0x93, 0xd1, 0x12, 0x99, 0x9f, 0xe8, 0xf1, 0x4a, 0x42, + 0x32, 0x25, 0x27, 0xa9, 0x95, 0x2d, 0x00, 0x76, 0x2f, 0x93, 0xb9, 0x5c, 0x98, 0x3c, 0x06, 0x06, + 0x38, 0x92, 0x69, 0xfd, 0x3e, 0xa8, 0x49, 0x69, 0x49, 0xd2, 0x83, 0xc9, 0xc1, 0x1e, 0xe2, 0x04, + 0xb5, 0xf2, 0xdb, 0x0c, 0xa0, 0x7d, 0xf1, 0x5e, 0xd7, 0x70, 0x22, 0xec, 0xfe, 0x3f, 0x0f, 0xa0, + 0xd4, 0xd0, 0xcb, 0xbc, 0x75, 0xe8, 0xdd, 0x71, 0xbb, 0x23, 0x33, 0x32, 0x7b, 0xf7, 0x19, 0x99, + 0xbb, 0xc5, 0x8c, 0x7c, 0xf4, 0x47, 0x05, 0x4a, 0xe9, 0x97, 0x00, 0xb4, 0x0a, 0x4b, 0x6d, 0xb3, + 0xd5, 0x6e, 0x75, 0xea, 0x7b, 0xb6, 0xf5, 0xa2, 0xad, 0xdb, 0xcf, 0x0e, 0x3a, 0x6d, 0x7d, 0xc7, + 0x78, 0x62, 0xe8, 0x4d, 0xf5, 0x1e, 0x5a, 0x86, 0x77, 0x46, 0xd5, 0x1d, 0xab, 0x7e, 0xd0, 0xac, + 0x9b, 0x4d, 0x55, 0x41, 0x0f, 0x61, 0x75, 0x54, 0xb7, 0xff, 0x6c, 0xcf, 0x32, 0xda, 0x7b, 0xba, + 0xbd, 0xb3, 0xdb, 0x32, 0x76, 0x74, 0x35, 0x83, 0xde, 0x05, 0x6d, 0x14, 0xd2, 0x6a, 0x5b, 0xc6, + 0xbe, 0xd1, 0xb1, 0x8c, 0x1d, 0x35, 0x8b, 0x56, 0x60, 0x71, 0x54, 0xab, 0x3f, 0x6f, 0xeb, 0x4d, + 0xc3, 0xd2, 0x9b, 0x6a, 0xee, 0xd1, 0x7f, 0x15, 0x80, 0xd4, 0x97, 0x8e, 0x15, 0x58, 0x3c, 0x6c, + 0x59, 0xc2, 0x40, 0xeb, 0x60, 0xcc, 0xcb, 0x79, 0x98, 0x4b, 0x2b, 0x5f, 0xe8, 0x1d, 0x55, 0x19, + 0x17, 0xb6, 0x0e, 0x74, 0x55, 0x41, 0x8b, 0x30, 0x9f, 0x16, 0xd6, 0x1b, 0x1d, 0xab, 0x6e, 0x1c, + 0xa8, 0x99, 0x71, 0xb4, 0x75, 0xd4, 0x52, 0x33, 0x08, 0x41, 0x39, 0x2d, 0x3c, 0x68, 0xa9, 0x59, + 0xf4, 0x00, 0xee, 0x8f, 0x00, 0x77, 0x4d, 0x5d, 0x57, 0xb3, 0x6c, 0xa7, 0xa3, 0x50, 0xfb, 0xc8, + 0xb0, 0x76, 0xed, 0x43, 0xdd, 0x6a, 0xa9, 0x39, 0xb4, 0x00, 0x6a, 0x5a, 0xfb, 0xa4, 0xf5, 0xcc, + 0xbc, 0x2a, 0xed, 0xb4, 0xeb, 0xfb, 0xea, 0xd4, 0x72, 0x46, 0x55, 0x1e, 0xfd, 0x5d, 0x81, 0xf2, + 0xe8, 0xe7, 0x06, 0xb4, 0x0e, 0x2b, 0xc3, 0x60, 0x75, 0xac, 0xba, 0xf5, 0xac, 0x33, 0x16, 0x84, + 0x0a, 0xac, 0x8d, 0x03, 0x9a, 0x7a, 0xbb, 0xd5, 0x31, 0x2c, 0xbb, 0xad, 0x9b, 0x46, 0x6b, 0x3c, + 0x65, 0x12, 0x73, 0xd8, 0xb2, 0x8c, 0x83, 0x9f, 0xc4, 0x90, 0xcc, 0x48, 0xc6, 0x25, 0xa4, 0x5d, + 0xef, 0x74, 0xf4, 0xa6, 0xd8, 0xe4, 0xb8, 0xce, 0xd4, 0x9f, 0xea, 0x3b, 0x3c, 0x63, 0x93, 0x98, + 0x4f, 0xea, 0xc6, 0x9e, 0xde, 0x54, 0xa7, 0x1a, 0x8f, 0x3f, 0x7b, 0xbd, 0xa6, 0x7c, 0xfe, 0x7a, + 0x4d, 0xf9, 0xf7, 0xeb, 0x35, 0xe5, 0x93, 0x37, 0x6b, 0xf7, 0x3e, 0x7f, 0xb3, 0x76, 0xef, 0x1f, + 0x6f, 0xd6, 0xee, 0xfd, 0x7c, 0x45, 0x14, 0x6b, 0xe4, 0xfe, 0xaa, 0xea, 0x91, 0xda, 0x25, 0xff, + 0x90, 0xc7, 0xde, 0x60, 0xa3, 0xda, 0xf9, 0xf6, 0x71, 0x9e, 0x77, 0xe4, 0xb7, 0xff, 0x17, 0x00, + 0x00, 0xff, 0xff, 0xb0, 0x5e, 0x88, 0xa8, 0xe6, 0x13, 0x00, 0x00, } func (m *WeightedVoteOption) Marshal() (dAtA []byte, err error) { @@ -2034,6 +2047,15 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.ExpeditedQuorum) > 0 { + i -= len(m.ExpeditedQuorum) + copy(dAtA[i:], m.ExpeditedQuorum) + i = encodeVarintGov(dAtA, i, uint64(len(m.ExpeditedQuorum))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xaa + } if len(m.YesQuorum) > 0 { i -= len(m.YesQuorum) copy(dAtA[i:], m.YesQuorum) @@ -2648,6 +2670,10 @@ func (m *Params) Size() (n int) { if l > 0 { n += 2 + l + sovGov(uint64(l)) } + l = len(m.ExpeditedQuorum) + if l > 0 { + n += 2 + l + sovGov(uint64(l)) + } return n } @@ -5173,6 +5199,38 @@ func (m *Params) Unmarshal(dAtA []byte) error { } m.YesQuorum = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 21: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ExpeditedQuorum", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGov + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGov + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGov + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ExpeditedQuorum = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGov(dAtA[iNdEx:]) diff --git a/x/gov/types/v1/params.go b/x/gov/types/v1/params.go index 00c54ee8be8f..66efdf0d43c9 100644 --- a/x/gov/types/v1/params.go +++ b/x/gov/types/v1/params.go @@ -23,6 +23,7 @@ var ( DefaultMinExpeditedDepositTokens = DefaultMinDepositTokens.Mul(sdkmath.NewInt(DefaultMinExpeditedDepositTokensRatio)) DefaultQuorum = sdkmath.LegacyNewDecWithPrec(334, 3) DefaultYesQuorum = sdkmath.LegacyNewDecWithPrec(0, 1) + DefaultExpeditedQuorum = sdkmath.LegacyNewDecWithPrec(500, 3) DefaultThreshold = sdkmath.LegacyNewDecWithPrec(5, 1) DefaultExpeditedThreshold = sdkmath.LegacyNewDecWithPrec(667, 3) DefaultVetoThreshold = sdkmath.LegacyNewDecWithPrec(334, 3) @@ -40,9 +41,12 @@ var ( // NewParams creates a new Params instance with given values. func NewParams( - minDeposit, expeditedminDeposit sdk.Coins, maxDepositPeriod, votingPeriod, expeditedVotingPeriod time.Duration, - quorum, yesQuorum, threshold, expeditedThreshold, vetoThreshold, minInitialDepositRatio, proposalCancelRatio, proposalCancelDest, proposalMaxCancelVotingPeriod string, - burnProposalDeposit, burnVoteQuorum, burnVoteVeto bool, minDepositRatio, optimisticRejectedThreshold string, optimisticAuthorizedAddresses []string, + minDeposit, expeditedminDeposit sdk.Coins, + maxDepositPeriod, votingPeriod, expeditedVotingPeriod time.Duration, + quorum, yesQuorum, expeditedQuorum, threshold, expeditedThreshold, vetoThreshold, minInitialDepositRatio, proposalCancelRatio, proposalCancelDest, proposalMaxCancelVotingPeriod string, + burnProposalDeposit, burnVoteQuorum, burnVoteVeto bool, + minDepositRatio, optimisticRejectedThreshold string, + optimisticAuthorizedAddresses []string, ) Params { return Params{ MinDeposit: minDeposit, @@ -52,6 +56,7 @@ func NewParams( ExpeditedVotingPeriod: &expeditedVotingPeriod, Quorum: quorum, YesQuorum: yesQuorum, + ExpeditedQuorum: expeditedQuorum, Threshold: threshold, ExpeditedThreshold: expeditedThreshold, VetoThreshold: vetoThreshold, @@ -78,6 +83,7 @@ func DefaultParams() Params { DefaultExpeditedPeriod, DefaultQuorum.String(), DefaultYesQuorum.String(), + DefaultExpeditedQuorum.String(), DefaultThreshold.String(), DefaultExpeditedThreshold.String(), DefaultVetoThreshold.String(), @@ -137,6 +143,17 @@ func (p Params) ValidateBasic(addressCodec address.Codec) error { return fmt.Errorf("yes_quorum too large: %s", p.YesQuorum) } + expeditedQuorum, err := sdkmath.LegacyNewDecFromStr(p.ExpeditedQuorum) + if err != nil { + return fmt.Errorf("invalid expedited_quorum string: %w", err) + } + if expeditedQuorum.IsNegative() { + return fmt.Errorf("expedited_quorum cannot be negative: %s", expeditedQuorum) + } + if expeditedQuorum.GT(sdkmath.LegacyOneDec()) { + return fmt.Errorf("expedited_quorum too large: %s", p.ExpeditedQuorum) + } + threshold, err := sdkmath.LegacyNewDecFromStr(p.Threshold) if err != nil { return fmt.Errorf("invalid threshold string: %w", err) From 5424b55c5706c2acfd98898b9877c3b846583af5 Mon Sep 17 00:00:00 2001 From: Rootul P Date: Wed, 13 Mar 2024 15:07:34 -0400 Subject: [PATCH 22/30] fix(crypto): error if incorrect ledger public key (#19691) Co-authored-by: Marko --- CHANGELOG.md | 3 +- crypto/keyring/keyring.go | 8 ++++ crypto/keyring/keyring_ledger_test.go | 66 +++++++++++++++++++++++++++ 3 files changed, 76 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4886f460ef5b..32447138ffd1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -96,6 +96,7 @@ Every module contains its own CHANGELOG.md. Please refer to the module you are i * (simulation) [#18196](https://github.com/cosmos/cosmos-sdk/pull/18196) Fix the problem of `validator set is empty after InitGenesis` in simulation test. * (baseapp) [#18551](https://github.com/cosmos/cosmos-sdk/pull/18551) Fix SelectTxForProposal the calculation method of tx bytes size is inconsistent with CometBFT * (server) [#18994](https://github.com/cosmos/cosmos-sdk/pull/18994) Update server context directly rather than a reference to a sub-object +* (crypto) [#19691](https://github.com/cosmos/cosmos-sdk/pull/19691) Fix tx sign doesn't throw an error when incorrect Ledger is used. ### API Breaking Changes @@ -143,7 +144,7 @@ Every module contains its own CHANGELOG.md. Please refer to the module you are i * (types) [#18607](https://github.com/cosmos/cosmos-sdk/pull/18607) Removed address verifier from global config, moved verifier function to bech32 codec. * (server) [#18909](https://github.com/cosmos/cosmos-sdk/pull/18909) Remove configuration endpoint on grpc reflection endpoint in favour of auth module bech32prefix endpoint already exposed. * (crypto) [#19541](https://github.com/cosmos/cosmos-sdk/pull/19541) The deprecated `FromTmProtoPublicKey`, `ToTmProtoPublicKey`, `FromTmPubKeyInterface` and `ToTmPubKeyInterface` functions have been removed. Use their replacements (`Cmt` instead of `Tm`) instead. -* (types) [#19652](https://github.com/cosmos/cosmos-sdk/pull/19652) +* (types) [#19652](https://github.com/cosmos/cosmos-sdk/pull/19652) * Moved`types/module.HasRegisterInterfaces` to `cosmossdk.io/core`. * Moved `RegisterInterfaces` and `RegisterImplementations` from `InterfaceRegistry` to `cosmossdk.io/core/registry.LegacyRegistry` interface. * (types) [#19627](https://github.com/cosmos/cosmos-sdk/pull/19627) and [#19735](https://github.com/cosmos/cosmos-sdk/pull/19735) All genesis interfaces now don't take `codec.JsonCodec`. diff --git a/crypto/keyring/keyring.go b/crypto/keyring/keyring.go index e46db74693b3..d5392821404a 100644 --- a/crypto/keyring/keyring.go +++ b/crypto/keyring/keyring.go @@ -634,6 +634,14 @@ func SignWithLedger(k *Record, msg []byte, signMode signing.SignMode) (sig []byt if err != nil { return nil, nil, err } + ledgerPubKey := priv.PubKey() + pubKey, err := k.GetPubKey() + if err != nil { + return nil, nil, err + } + if !pubKey.Equals(ledgerPubKey) { + return nil, nil, fmt.Errorf("the public key that the user attempted to sign with does not match the public key on the ledger device. %v does not match %v", pubKey.String(), ledgerPubKey.String()) + } switch signMode { case signing.SignMode_SIGN_MODE_TEXTUAL: diff --git a/crypto/keyring/keyring_ledger_test.go b/crypto/keyring/keyring_ledger_test.go index 89f1013b6428..244e877f1747 100644 --- a/crypto/keyring/keyring_ledger_test.go +++ b/crypto/keyring/keyring_ledger_test.go @@ -8,9 +8,13 @@ import ( "errors" "testing" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/cosmos/cosmos-sdk/crypto/hd" + "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" + "github.com/cosmos/cosmos-sdk/crypto/ledger" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/tx/signing" ) @@ -133,3 +137,65 @@ func TestAltKeyring_SaveLedgerKey(t *testing.T) { path := ledgerInfo.GetPath() require.Equal(t, "m/44'/118'/3'/0/1", path.String()) } + +func TestSignWithLedger(t *testing.T) { + // Create two distinct Ledger records: recordA and recordB. + // RecordA is added to the Ledger but recordB is not added. + pathA := hd.NewFundraiserParams(0, types.CoinType, 0) + privA, _, err := ledger.NewPrivKeySecp256k1(*pathA, "cosmos") + require.NoError(t, err) + recordA, err := NewLedgerRecord("ledgerA", privA.PubKey(), pathA) + require.NoError(t, err) + pubA, err := recordA.GetPubKey() + require.NoError(t, err) + + pathB := hd.NewFundraiserParams(0, types.CoinType, 1) + // privB won't be added to the Ledger because it doesn't use ledger.NewPrivKeySecp256k1 + privB := secp256k1.GenPrivKey() + recordB, err := NewLedgerRecord("ledgerB", privB.PubKey(), pathB) + require.NoError(t, err) + pubB, err := recordB.GetPubKey() + require.NoError(t, err) + + require.NotEqual(t, pubA, pubB) + type testCase struct { + name string + record *Record + msg []byte + wantSig []byte + wantPub cryptotypes.PubKey + wantErr bool + wantErrContains string + } + testCases := []testCase{ + { + name: "ordinary ledger tx", + record: recordA, + msg: []byte("msg"), + wantSig: []byte{0xfb, 0x93, 0x1b, 0xb9, 0x75, 0x25, 0xe7, 0x99, 0x64, 0xc2, 0x78, 0xf7, 0x94, 0x9a, 0x63, 0x83, 0xe2, 0x59, 0x76, 0x48, 0x1d, 0x2, 0xbc, 0xc2, 0x83, 0x21, 0x24, 0x4b, 0x95, 0x99, 0x25, 0x8b, 0x30, 0x38, 0x6, 0x61, 0x79, 0x9a, 0x9e, 0x8, 0x98, 0xfd, 0x34, 0xc6, 0x7e, 0x47, 0x4d, 0x5f, 0xe, 0xf3, 0xc3, 0xe7, 0xdd, 0xe3, 0x89, 0x80, 0xda, 0x8b, 0x48, 0x15, 0x34, 0xce, 0xdf, 0x1c}, + wantPub: pubA, + wantErr: false, + }, + { + name: "want error when the public key the user attempted to sign with doesn't match the public key on the ledger", + record: recordB, + msg: []byte("msg"), + wantSig: []byte(nil), + wantPub: nil, + wantErr: true, + wantErrContains: "the public key that the user attempted to sign with does not match the public key on the ledger device", + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + sig, pub, err := SignWithLedger(tc.record, tc.msg, signing.SignMode_SIGN_MODE_LEGACY_AMINO_JSON) + assert.Equal(t, tc.wantSig, sig) + assert.Equal(t, tc.wantPub, pub) + if tc.wantErr { + assert.Error(t, err) + assert.Contains(t, err.Error(), tc.wantErrContains) + } + }) + } +} From 3ce9224f00e223d73f2733d43e9bf7df15faada2 Mon Sep 17 00:00:00 2001 From: son trinh Date: Thu, 14 Mar 2024 16:06:02 +0700 Subject: [PATCH 23/30] feat(x/accounts): Add new lockup account type (#19048) Co-authored-by: testinginprod Co-authored-by: Facundo Medica <14063057+facundomedica@users.noreply.github.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- .../accounts/defaults/lockup/lockup.pulsar.go | 761 ++ .../accounts/defaults/lockup/query.pulsar.go | 2903 ++++++++ .../accounts/defaults/lockup/tx.pulsar.go | 6174 +++++++++++++++++ api/cosmos/lockup/lockup.pulsar.go | 752 ++ api/cosmos/lockup/query.pulsar.go | 2891 ++++++++ api/cosmos/lockup/tx.pulsar.go | 6162 ++++++++++++++++ go.work.example | 1 + simapp/app.go | 6 + simapp/go.mod | 37 +- simapp/go.sum | 72 +- tests/go.mod | 36 +- tests/go.sum | 74 +- x/accounts/defaults/lockup/README.md | 5 + .../lockup/continuous_locking_account.go | 225 + .../lockup/delayed_locking_account.go | 158 + x/accounts/defaults/lockup/go.mod | 184 + x/accounts/defaults/lockup/go.sum | 1009 +++ x/accounts/defaults/lockup/lockup.go | 587 ++ .../lockup/periodic_locking_account.go | 337 + .../lockup/permanent_locking_account.go | 109 + x/accounts/defaults/lockup/protov2_wrapper.go | 70 + x/accounts/defaults/lockup/types/encoding.go | 26 + x/accounts/defaults/lockup/types/lockup.pb.go | 399 ++ x/accounts/defaults/lockup/types/query.pb.go | 1203 ++++ x/accounts/defaults/lockup/types/tx.pb.go | 2476 +++++++ x/accounts/defaults/lockup/validate.go | 18 + .../accounts/defaults/lockup/lockup.proto | 22 + .../accounts/defaults/lockup/query.proto | 53 + .../cosmos/accounts/defaults/lockup/tx.proto | 126 + 29 files changed, 26748 insertions(+), 128 deletions(-) create mode 100644 api/cosmos/accounts/defaults/lockup/lockup.pulsar.go create mode 100644 api/cosmos/accounts/defaults/lockup/query.pulsar.go create mode 100644 api/cosmos/accounts/defaults/lockup/tx.pulsar.go create mode 100644 api/cosmos/lockup/lockup.pulsar.go create mode 100644 api/cosmos/lockup/query.pulsar.go create mode 100644 api/cosmos/lockup/tx.pulsar.go create mode 100644 x/accounts/defaults/lockup/README.md create mode 100644 x/accounts/defaults/lockup/continuous_locking_account.go create mode 100644 x/accounts/defaults/lockup/delayed_locking_account.go create mode 100644 x/accounts/defaults/lockup/go.mod create mode 100644 x/accounts/defaults/lockup/go.sum create mode 100644 x/accounts/defaults/lockup/lockup.go create mode 100644 x/accounts/defaults/lockup/periodic_locking_account.go create mode 100644 x/accounts/defaults/lockup/permanent_locking_account.go create mode 100644 x/accounts/defaults/lockup/protov2_wrapper.go create mode 100644 x/accounts/defaults/lockup/types/encoding.go create mode 100644 x/accounts/defaults/lockup/types/lockup.pb.go create mode 100644 x/accounts/defaults/lockup/types/query.pb.go create mode 100644 x/accounts/defaults/lockup/types/tx.pb.go create mode 100644 x/accounts/defaults/lockup/validate.go create mode 100644 x/accounts/proto/cosmos/accounts/defaults/lockup/lockup.proto create mode 100644 x/accounts/proto/cosmos/accounts/defaults/lockup/query.proto create mode 100644 x/accounts/proto/cosmos/accounts/defaults/lockup/tx.proto diff --git a/api/cosmos/accounts/defaults/lockup/lockup.pulsar.go b/api/cosmos/accounts/defaults/lockup/lockup.pulsar.go new file mode 100644 index 000000000000..78b5cfce1568 --- /dev/null +++ b/api/cosmos/accounts/defaults/lockup/lockup.pulsar.go @@ -0,0 +1,761 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package lockup + +import ( + _ "cosmossdk.io/api/amino" + v1beta1 "cosmossdk.io/api/cosmos/base/v1beta1" + fmt "fmt" + runtime "github.com/cosmos/cosmos-proto/runtime" + _ "github.com/cosmos/gogoproto/gogoproto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoiface "google.golang.org/protobuf/runtime/protoiface" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + durationpb "google.golang.org/protobuf/types/known/durationpb" + io "io" + reflect "reflect" + sync "sync" +) + +var _ protoreflect.List = (*_Period_2_list)(nil) + +type _Period_2_list struct { + list *[]*v1beta1.Coin +} + +func (x *_Period_2_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_Period_2_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_Period_2_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + (*x.list)[i] = concreteValue +} + +func (x *_Period_2_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + *x.list = append(*x.list, concreteValue) +} + +func (x *_Period_2_list) AppendMutable() protoreflect.Value { + v := new(v1beta1.Coin) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_Period_2_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_Period_2_list) NewElement() protoreflect.Value { + v := new(v1beta1.Coin) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_Period_2_list) IsValid() bool { + return x.list != nil +} + +var ( + md_Period protoreflect.MessageDescriptor + fd_Period_length protoreflect.FieldDescriptor + fd_Period_amount protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_accounts_defaults_lockup_lockup_proto_init() + md_Period = File_cosmos_accounts_defaults_lockup_lockup_proto.Messages().ByName("Period") + fd_Period_length = md_Period.Fields().ByName("length") + fd_Period_amount = md_Period.Fields().ByName("amount") +} + +var _ protoreflect.Message = (*fastReflection_Period)(nil) + +type fastReflection_Period Period + +func (x *Period) ProtoReflect() protoreflect.Message { + return (*fastReflection_Period)(x) +} + +func (x *Period) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_accounts_defaults_lockup_lockup_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) +} + +var _fastReflection_Period_messageType fastReflection_Period_messageType +var _ protoreflect.MessageType = fastReflection_Period_messageType{} + +type fastReflection_Period_messageType struct{} + +func (x fastReflection_Period_messageType) Zero() protoreflect.Message { + return (*fastReflection_Period)(nil) +} +func (x fastReflection_Period_messageType) New() protoreflect.Message { + return new(fastReflection_Period) +} +func (x fastReflection_Period_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Period +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_Period) Descriptor() protoreflect.MessageDescriptor { + return md_Period +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_Period) Type() protoreflect.MessageType { + return _fastReflection_Period_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_Period) New() protoreflect.Message { + return new(fastReflection_Period) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_Period) Interface() protoreflect.ProtoMessage { + return (*Period)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_Period) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Length != nil { + value := protoreflect.ValueOfMessage(x.Length.ProtoReflect()) + if !f(fd_Period_length, value) { + return + } + } + if len(x.Amount) != 0 { + value := protoreflect.ValueOfList(&_Period_2_list{list: &x.Amount}) + if !f(fd_Period_amount, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_Period) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.accounts.defaults.lockup.Period.length": + return x.Length != nil + case "cosmos.accounts.defaults.lockup.Period.amount": + return len(x.Amount) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.Period")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.Period does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Period) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.accounts.defaults.lockup.Period.length": + x.Length = nil + case "cosmos.accounts.defaults.lockup.Period.amount": + x.Amount = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.Period")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.Period does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_Period) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.accounts.defaults.lockup.Period.length": + value := x.Length + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "cosmos.accounts.defaults.lockup.Period.amount": + if len(x.Amount) == 0 { + return protoreflect.ValueOfList(&_Period_2_list{}) + } + listValue := &_Period_2_list{list: &x.Amount} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.Period")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.Period does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Period) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.accounts.defaults.lockup.Period.length": + x.Length = value.Message().Interface().(*durationpb.Duration) + case "cosmos.accounts.defaults.lockup.Period.amount": + lv := value.List() + clv := lv.(*_Period_2_list) + x.Amount = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.Period")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.Period does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Period) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.accounts.defaults.lockup.Period.length": + if x.Length == nil { + x.Length = new(durationpb.Duration) + } + return protoreflect.ValueOfMessage(x.Length.ProtoReflect()) + case "cosmos.accounts.defaults.lockup.Period.amount": + if x.Amount == nil { + x.Amount = []*v1beta1.Coin{} + } + value := &_Period_2_list{list: &x.Amount} + return protoreflect.ValueOfList(value) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.Period")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.Period does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_Period) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.accounts.defaults.lockup.Period.length": + m := new(durationpb.Duration) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "cosmos.accounts.defaults.lockup.Period.amount": + list := []*v1beta1.Coin{} + return protoreflect.ValueOfList(&_Period_2_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.Period")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.Period does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_Period) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.accounts.defaults.lockup.Period", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_Period) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Period) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_Period) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_Period) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*Period) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.Length != nil { + l = options.Size(x.Length) + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.Amount) > 0 { + for _, e := range x.Amount { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*Period) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Amount) > 0 { + for iNdEx := len(x.Amount) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Amount[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + } + if x.Length != nil { + encoded, err := options.Marshal(x.Length) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*Period) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Period: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Period: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Length", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Length == nil { + x.Length = &durationpb.Duration{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Length); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Amount = append(x.Amount, &v1beta1.Coin{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Amount[len(x.Amount)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: cosmos/accounts/defaults/lockup/lockup.proto + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Period defines a length of time and amount of coins that will be lock. +type Period struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Period duration + Length *durationpb.Duration `protobuf:"bytes,1,opt,name=length,proto3" json:"length,omitempty"` + Amount []*v1beta1.Coin `protobuf:"bytes,2,rep,name=amount,proto3" json:"amount,omitempty"` +} + +func (x *Period) Reset() { + *x = Period{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_accounts_defaults_lockup_lockup_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Period) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Period) ProtoMessage() {} + +// Deprecated: Use Period.ProtoReflect.Descriptor instead. +func (*Period) Descriptor() ([]byte, []int) { + return file_cosmos_accounts_defaults_lockup_lockup_proto_rawDescGZIP(), []int{0} +} + +func (x *Period) GetLength() *durationpb.Duration { + if x != nil { + return x.Length + } + return nil +} + +func (x *Period) GetAmount() []*v1beta1.Coin { + if x != nil { + return x.Amount + } + return nil +} + +var File_cosmos_accounts_defaults_lockup_lockup_proto protoreflect.FileDescriptor + +var file_cosmos_accounts_defaults_lockup_lockup_proto_rawDesc = []byte{ + 0x0a, 0x2c, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x73, 0x2f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x2f, 0x6c, 0x6f, 0x63, 0x6b, 0x75, + 0x70, 0x2f, 0x6c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1f, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, + 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x2e, 0x6c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x1a, + 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, + 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc5, 0x01, 0x0a, 0x06, 0x50, 0x65, 0x72, + 0x69, 0x6f, 0x64, 0x12, 0x40, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0d, + 0xc8, 0xde, 0x1f, 0x00, 0x98, 0xdf, 0x1f, 0x01, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x6c, + 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x79, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, + 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, + 0x42, 0x46, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, + 0x6e, 0x73, 0x9a, 0xe7, 0xb0, 0x2a, 0x0c, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x5f, 0x63, 0x6f, + 0x69, 0x6e, 0x73, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, + 0x42, 0x84, 0x02, 0x0a, 0x23, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, + 0x73, 0x2e, 0x6c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x42, 0x0b, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x30, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, + 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, + 0x74, 0x73, 0x2f, 0x6c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0xa2, 0x02, 0x04, 0x43, 0x41, 0x44, 0x4c, + 0xaa, 0x02, 0x1f, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x73, 0x2e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x2e, 0x4c, 0x6f, 0x63, 0x6b, + 0x75, 0x70, 0xca, 0x02, 0x1f, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x73, 0x5c, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x5c, 0x4c, 0x6f, + 0x63, 0x6b, 0x75, 0x70, 0xe2, 0x02, 0x2b, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x5c, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x5c, + 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0xea, 0x02, 0x22, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x3a, 0x3a, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x3a, + 0x3a, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_cosmos_accounts_defaults_lockup_lockup_proto_rawDescOnce sync.Once + file_cosmos_accounts_defaults_lockup_lockup_proto_rawDescData = file_cosmos_accounts_defaults_lockup_lockup_proto_rawDesc +) + +func file_cosmos_accounts_defaults_lockup_lockup_proto_rawDescGZIP() []byte { + file_cosmos_accounts_defaults_lockup_lockup_proto_rawDescOnce.Do(func() { + file_cosmos_accounts_defaults_lockup_lockup_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_accounts_defaults_lockup_lockup_proto_rawDescData) + }) + return file_cosmos_accounts_defaults_lockup_lockup_proto_rawDescData +} + +var file_cosmos_accounts_defaults_lockup_lockup_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_cosmos_accounts_defaults_lockup_lockup_proto_goTypes = []interface{}{ + (*Period)(nil), // 0: cosmos.accounts.defaults.lockup.Period + (*durationpb.Duration)(nil), // 1: google.protobuf.Duration + (*v1beta1.Coin)(nil), // 2: cosmos.base.v1beta1.Coin +} +var file_cosmos_accounts_defaults_lockup_lockup_proto_depIdxs = []int32{ + 1, // 0: cosmos.accounts.defaults.lockup.Period.length:type_name -> google.protobuf.Duration + 2, // 1: cosmos.accounts.defaults.lockup.Period.amount:type_name -> cosmos.base.v1beta1.Coin + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_cosmos_accounts_defaults_lockup_lockup_proto_init() } +func file_cosmos_accounts_defaults_lockup_lockup_proto_init() { + if File_cosmos_accounts_defaults_lockup_lockup_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_cosmos_accounts_defaults_lockup_lockup_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Period); 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: file_cosmos_accounts_defaults_lockup_lockup_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_cosmos_accounts_defaults_lockup_lockup_proto_goTypes, + DependencyIndexes: file_cosmos_accounts_defaults_lockup_lockup_proto_depIdxs, + MessageInfos: file_cosmos_accounts_defaults_lockup_lockup_proto_msgTypes, + }.Build() + File_cosmos_accounts_defaults_lockup_lockup_proto = out.File + file_cosmos_accounts_defaults_lockup_lockup_proto_rawDesc = nil + file_cosmos_accounts_defaults_lockup_lockup_proto_goTypes = nil + file_cosmos_accounts_defaults_lockup_lockup_proto_depIdxs = nil +} diff --git a/api/cosmos/accounts/defaults/lockup/query.pulsar.go b/api/cosmos/accounts/defaults/lockup/query.pulsar.go new file mode 100644 index 000000000000..8499b9274554 --- /dev/null +++ b/api/cosmos/accounts/defaults/lockup/query.pulsar.go @@ -0,0 +1,2903 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package lockup + +import ( + v1beta1 "cosmossdk.io/api/cosmos/base/v1beta1" + fmt "fmt" + runtime "github.com/cosmos/cosmos-proto/runtime" + _ "github.com/cosmos/gogoproto/gogoproto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoiface "google.golang.org/protobuf/runtime/protoiface" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + io "io" + reflect "reflect" + sync "sync" +) + +var ( + md_QueryLockupAccountInfoRequest protoreflect.MessageDescriptor +) + +func init() { + file_cosmos_accounts_defaults_lockup_query_proto_init() + md_QueryLockupAccountInfoRequest = File_cosmos_accounts_defaults_lockup_query_proto.Messages().ByName("QueryLockupAccountInfoRequest") +} + +var _ protoreflect.Message = (*fastReflection_QueryLockupAccountInfoRequest)(nil) + +type fastReflection_QueryLockupAccountInfoRequest QueryLockupAccountInfoRequest + +func (x *QueryLockupAccountInfoRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryLockupAccountInfoRequest)(x) +} + +func (x *QueryLockupAccountInfoRequest) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_accounts_defaults_lockup_query_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) +} + +var _fastReflection_QueryLockupAccountInfoRequest_messageType fastReflection_QueryLockupAccountInfoRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryLockupAccountInfoRequest_messageType{} + +type fastReflection_QueryLockupAccountInfoRequest_messageType struct{} + +func (x fastReflection_QueryLockupAccountInfoRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryLockupAccountInfoRequest)(nil) +} +func (x fastReflection_QueryLockupAccountInfoRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryLockupAccountInfoRequest) +} +func (x fastReflection_QueryLockupAccountInfoRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryLockupAccountInfoRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryLockupAccountInfoRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryLockupAccountInfoRequest +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryLockupAccountInfoRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryLockupAccountInfoRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryLockupAccountInfoRequest) New() protoreflect.Message { + return new(fastReflection_QueryLockupAccountInfoRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryLockupAccountInfoRequest) Interface() protoreflect.ProtoMessage { + return (*QueryLockupAccountInfoRequest)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryLockupAccountInfoRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryLockupAccountInfoRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.QueryLockupAccountInfoRequest")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.QueryLockupAccountInfoRequest does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryLockupAccountInfoRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.QueryLockupAccountInfoRequest")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.QueryLockupAccountInfoRequest does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryLockupAccountInfoRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.QueryLockupAccountInfoRequest")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.QueryLockupAccountInfoRequest does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryLockupAccountInfoRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.QueryLockupAccountInfoRequest")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.QueryLockupAccountInfoRequest does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryLockupAccountInfoRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.QueryLockupAccountInfoRequest")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.QueryLockupAccountInfoRequest does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryLockupAccountInfoRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.QueryLockupAccountInfoRequest")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.QueryLockupAccountInfoRequest does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryLockupAccountInfoRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.accounts.defaults.lockup.QueryLockupAccountInfoRequest", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryLockupAccountInfoRequest) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryLockupAccountInfoRequest) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryLockupAccountInfoRequest) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryLockupAccountInfoRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryLockupAccountInfoRequest) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryLockupAccountInfoRequest) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryLockupAccountInfoRequest) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryLockupAccountInfoRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryLockupAccountInfoRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_QueryLockupAccountInfoResponse_1_list)(nil) + +type _QueryLockupAccountInfoResponse_1_list struct { + list *[]*v1beta1.Coin +} + +func (x *_QueryLockupAccountInfoResponse_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_QueryLockupAccountInfoResponse_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_QueryLockupAccountInfoResponse_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + (*x.list)[i] = concreteValue +} + +func (x *_QueryLockupAccountInfoResponse_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + *x.list = append(*x.list, concreteValue) +} + +func (x *_QueryLockupAccountInfoResponse_1_list) AppendMutable() protoreflect.Value { + v := new(v1beta1.Coin) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryLockupAccountInfoResponse_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_QueryLockupAccountInfoResponse_1_list) NewElement() protoreflect.Value { + v := new(v1beta1.Coin) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryLockupAccountInfoResponse_1_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_QueryLockupAccountInfoResponse_2_list)(nil) + +type _QueryLockupAccountInfoResponse_2_list struct { + list *[]*v1beta1.Coin +} + +func (x *_QueryLockupAccountInfoResponse_2_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_QueryLockupAccountInfoResponse_2_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_QueryLockupAccountInfoResponse_2_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + (*x.list)[i] = concreteValue +} + +func (x *_QueryLockupAccountInfoResponse_2_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + *x.list = append(*x.list, concreteValue) +} + +func (x *_QueryLockupAccountInfoResponse_2_list) AppendMutable() protoreflect.Value { + v := new(v1beta1.Coin) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryLockupAccountInfoResponse_2_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_QueryLockupAccountInfoResponse_2_list) NewElement() protoreflect.Value { + v := new(v1beta1.Coin) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryLockupAccountInfoResponse_2_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_QueryLockupAccountInfoResponse_3_list)(nil) + +type _QueryLockupAccountInfoResponse_3_list struct { + list *[]*v1beta1.Coin +} + +func (x *_QueryLockupAccountInfoResponse_3_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_QueryLockupAccountInfoResponse_3_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_QueryLockupAccountInfoResponse_3_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + (*x.list)[i] = concreteValue +} + +func (x *_QueryLockupAccountInfoResponse_3_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + *x.list = append(*x.list, concreteValue) +} + +func (x *_QueryLockupAccountInfoResponse_3_list) AppendMutable() protoreflect.Value { + v := new(v1beta1.Coin) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryLockupAccountInfoResponse_3_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_QueryLockupAccountInfoResponse_3_list) NewElement() protoreflect.Value { + v := new(v1beta1.Coin) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryLockupAccountInfoResponse_3_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_QueryLockupAccountInfoResponse_6_list)(nil) + +type _QueryLockupAccountInfoResponse_6_list struct { + list *[]*v1beta1.Coin +} + +func (x *_QueryLockupAccountInfoResponse_6_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_QueryLockupAccountInfoResponse_6_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_QueryLockupAccountInfoResponse_6_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + (*x.list)[i] = concreteValue +} + +func (x *_QueryLockupAccountInfoResponse_6_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + *x.list = append(*x.list, concreteValue) +} + +func (x *_QueryLockupAccountInfoResponse_6_list) AppendMutable() protoreflect.Value { + v := new(v1beta1.Coin) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryLockupAccountInfoResponse_6_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_QueryLockupAccountInfoResponse_6_list) NewElement() protoreflect.Value { + v := new(v1beta1.Coin) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryLockupAccountInfoResponse_6_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_QueryLockupAccountInfoResponse_7_list)(nil) + +type _QueryLockupAccountInfoResponse_7_list struct { + list *[]*v1beta1.Coin +} + +func (x *_QueryLockupAccountInfoResponse_7_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_QueryLockupAccountInfoResponse_7_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_QueryLockupAccountInfoResponse_7_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + (*x.list)[i] = concreteValue +} + +func (x *_QueryLockupAccountInfoResponse_7_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + *x.list = append(*x.list, concreteValue) +} + +func (x *_QueryLockupAccountInfoResponse_7_list) AppendMutable() protoreflect.Value { + v := new(v1beta1.Coin) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryLockupAccountInfoResponse_7_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_QueryLockupAccountInfoResponse_7_list) NewElement() protoreflect.Value { + v := new(v1beta1.Coin) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryLockupAccountInfoResponse_7_list) IsValid() bool { + return x.list != nil +} + +var ( + md_QueryLockupAccountInfoResponse protoreflect.MessageDescriptor + fd_QueryLockupAccountInfoResponse_original_locking protoreflect.FieldDescriptor + fd_QueryLockupAccountInfoResponse_delegated_free protoreflect.FieldDescriptor + fd_QueryLockupAccountInfoResponse_delegated_locking protoreflect.FieldDescriptor + fd_QueryLockupAccountInfoResponse_start_time protoreflect.FieldDescriptor + fd_QueryLockupAccountInfoResponse_end_time protoreflect.FieldDescriptor + fd_QueryLockupAccountInfoResponse_locked_coins protoreflect.FieldDescriptor + fd_QueryLockupAccountInfoResponse_unlocked_coins protoreflect.FieldDescriptor + fd_QueryLockupAccountInfoResponse_owner protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_accounts_defaults_lockup_query_proto_init() + md_QueryLockupAccountInfoResponse = File_cosmos_accounts_defaults_lockup_query_proto.Messages().ByName("QueryLockupAccountInfoResponse") + fd_QueryLockupAccountInfoResponse_original_locking = md_QueryLockupAccountInfoResponse.Fields().ByName("original_locking") + fd_QueryLockupAccountInfoResponse_delegated_free = md_QueryLockupAccountInfoResponse.Fields().ByName("delegated_free") + fd_QueryLockupAccountInfoResponse_delegated_locking = md_QueryLockupAccountInfoResponse.Fields().ByName("delegated_locking") + fd_QueryLockupAccountInfoResponse_start_time = md_QueryLockupAccountInfoResponse.Fields().ByName("start_time") + fd_QueryLockupAccountInfoResponse_end_time = md_QueryLockupAccountInfoResponse.Fields().ByName("end_time") + fd_QueryLockupAccountInfoResponse_locked_coins = md_QueryLockupAccountInfoResponse.Fields().ByName("locked_coins") + fd_QueryLockupAccountInfoResponse_unlocked_coins = md_QueryLockupAccountInfoResponse.Fields().ByName("unlocked_coins") + fd_QueryLockupAccountInfoResponse_owner = md_QueryLockupAccountInfoResponse.Fields().ByName("owner") +} + +var _ protoreflect.Message = (*fastReflection_QueryLockupAccountInfoResponse)(nil) + +type fastReflection_QueryLockupAccountInfoResponse QueryLockupAccountInfoResponse + +func (x *QueryLockupAccountInfoResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryLockupAccountInfoResponse)(x) +} + +func (x *QueryLockupAccountInfoResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_accounts_defaults_lockup_query_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) +} + +var _fastReflection_QueryLockupAccountInfoResponse_messageType fastReflection_QueryLockupAccountInfoResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryLockupAccountInfoResponse_messageType{} + +type fastReflection_QueryLockupAccountInfoResponse_messageType struct{} + +func (x fastReflection_QueryLockupAccountInfoResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryLockupAccountInfoResponse)(nil) +} +func (x fastReflection_QueryLockupAccountInfoResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryLockupAccountInfoResponse) +} +func (x fastReflection_QueryLockupAccountInfoResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryLockupAccountInfoResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryLockupAccountInfoResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryLockupAccountInfoResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryLockupAccountInfoResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryLockupAccountInfoResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryLockupAccountInfoResponse) New() protoreflect.Message { + return new(fastReflection_QueryLockupAccountInfoResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryLockupAccountInfoResponse) Interface() protoreflect.ProtoMessage { + return (*QueryLockupAccountInfoResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryLockupAccountInfoResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.OriginalLocking) != 0 { + value := protoreflect.ValueOfList(&_QueryLockupAccountInfoResponse_1_list{list: &x.OriginalLocking}) + if !f(fd_QueryLockupAccountInfoResponse_original_locking, value) { + return + } + } + if len(x.DelegatedFree) != 0 { + value := protoreflect.ValueOfList(&_QueryLockupAccountInfoResponse_2_list{list: &x.DelegatedFree}) + if !f(fd_QueryLockupAccountInfoResponse_delegated_free, value) { + return + } + } + if len(x.DelegatedLocking) != 0 { + value := protoreflect.ValueOfList(&_QueryLockupAccountInfoResponse_3_list{list: &x.DelegatedLocking}) + if !f(fd_QueryLockupAccountInfoResponse_delegated_locking, value) { + return + } + } + if x.StartTime != nil { + value := protoreflect.ValueOfMessage(x.StartTime.ProtoReflect()) + if !f(fd_QueryLockupAccountInfoResponse_start_time, value) { + return + } + } + if x.EndTime != nil { + value := protoreflect.ValueOfMessage(x.EndTime.ProtoReflect()) + if !f(fd_QueryLockupAccountInfoResponse_end_time, value) { + return + } + } + if len(x.LockedCoins) != 0 { + value := protoreflect.ValueOfList(&_QueryLockupAccountInfoResponse_6_list{list: &x.LockedCoins}) + if !f(fd_QueryLockupAccountInfoResponse_locked_coins, value) { + return + } + } + if len(x.UnlockedCoins) != 0 { + value := protoreflect.ValueOfList(&_QueryLockupAccountInfoResponse_7_list{list: &x.UnlockedCoins}) + if !f(fd_QueryLockupAccountInfoResponse_unlocked_coins, value) { + return + } + } + if x.Owner != "" { + value := protoreflect.ValueOfString(x.Owner) + if !f(fd_QueryLockupAccountInfoResponse_owner, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryLockupAccountInfoResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.accounts.defaults.lockup.QueryLockupAccountInfoResponse.original_locking": + return len(x.OriginalLocking) != 0 + case "cosmos.accounts.defaults.lockup.QueryLockupAccountInfoResponse.delegated_free": + return len(x.DelegatedFree) != 0 + case "cosmos.accounts.defaults.lockup.QueryLockupAccountInfoResponse.delegated_locking": + return len(x.DelegatedLocking) != 0 + case "cosmos.accounts.defaults.lockup.QueryLockupAccountInfoResponse.start_time": + return x.StartTime != nil + case "cosmos.accounts.defaults.lockup.QueryLockupAccountInfoResponse.end_time": + return x.EndTime != nil + case "cosmos.accounts.defaults.lockup.QueryLockupAccountInfoResponse.locked_coins": + return len(x.LockedCoins) != 0 + case "cosmos.accounts.defaults.lockup.QueryLockupAccountInfoResponse.unlocked_coins": + return len(x.UnlockedCoins) != 0 + case "cosmos.accounts.defaults.lockup.QueryLockupAccountInfoResponse.owner": + return x.Owner != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.QueryLockupAccountInfoResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.QueryLockupAccountInfoResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryLockupAccountInfoResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.accounts.defaults.lockup.QueryLockupAccountInfoResponse.original_locking": + x.OriginalLocking = nil + case "cosmos.accounts.defaults.lockup.QueryLockupAccountInfoResponse.delegated_free": + x.DelegatedFree = nil + case "cosmos.accounts.defaults.lockup.QueryLockupAccountInfoResponse.delegated_locking": + x.DelegatedLocking = nil + case "cosmos.accounts.defaults.lockup.QueryLockupAccountInfoResponse.start_time": + x.StartTime = nil + case "cosmos.accounts.defaults.lockup.QueryLockupAccountInfoResponse.end_time": + x.EndTime = nil + case "cosmos.accounts.defaults.lockup.QueryLockupAccountInfoResponse.locked_coins": + x.LockedCoins = nil + case "cosmos.accounts.defaults.lockup.QueryLockupAccountInfoResponse.unlocked_coins": + x.UnlockedCoins = nil + case "cosmos.accounts.defaults.lockup.QueryLockupAccountInfoResponse.owner": + x.Owner = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.QueryLockupAccountInfoResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.QueryLockupAccountInfoResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryLockupAccountInfoResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.accounts.defaults.lockup.QueryLockupAccountInfoResponse.original_locking": + if len(x.OriginalLocking) == 0 { + return protoreflect.ValueOfList(&_QueryLockupAccountInfoResponse_1_list{}) + } + listValue := &_QueryLockupAccountInfoResponse_1_list{list: &x.OriginalLocking} + return protoreflect.ValueOfList(listValue) + case "cosmos.accounts.defaults.lockup.QueryLockupAccountInfoResponse.delegated_free": + if len(x.DelegatedFree) == 0 { + return protoreflect.ValueOfList(&_QueryLockupAccountInfoResponse_2_list{}) + } + listValue := &_QueryLockupAccountInfoResponse_2_list{list: &x.DelegatedFree} + return protoreflect.ValueOfList(listValue) + case "cosmos.accounts.defaults.lockup.QueryLockupAccountInfoResponse.delegated_locking": + if len(x.DelegatedLocking) == 0 { + return protoreflect.ValueOfList(&_QueryLockupAccountInfoResponse_3_list{}) + } + listValue := &_QueryLockupAccountInfoResponse_3_list{list: &x.DelegatedLocking} + return protoreflect.ValueOfList(listValue) + case "cosmos.accounts.defaults.lockup.QueryLockupAccountInfoResponse.start_time": + value := x.StartTime + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "cosmos.accounts.defaults.lockup.QueryLockupAccountInfoResponse.end_time": + value := x.EndTime + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "cosmos.accounts.defaults.lockup.QueryLockupAccountInfoResponse.locked_coins": + if len(x.LockedCoins) == 0 { + return protoreflect.ValueOfList(&_QueryLockupAccountInfoResponse_6_list{}) + } + listValue := &_QueryLockupAccountInfoResponse_6_list{list: &x.LockedCoins} + return protoreflect.ValueOfList(listValue) + case "cosmos.accounts.defaults.lockup.QueryLockupAccountInfoResponse.unlocked_coins": + if len(x.UnlockedCoins) == 0 { + return protoreflect.ValueOfList(&_QueryLockupAccountInfoResponse_7_list{}) + } + listValue := &_QueryLockupAccountInfoResponse_7_list{list: &x.UnlockedCoins} + return protoreflect.ValueOfList(listValue) + case "cosmos.accounts.defaults.lockup.QueryLockupAccountInfoResponse.owner": + value := x.Owner + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.QueryLockupAccountInfoResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.QueryLockupAccountInfoResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryLockupAccountInfoResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.accounts.defaults.lockup.QueryLockupAccountInfoResponse.original_locking": + lv := value.List() + clv := lv.(*_QueryLockupAccountInfoResponse_1_list) + x.OriginalLocking = *clv.list + case "cosmos.accounts.defaults.lockup.QueryLockupAccountInfoResponse.delegated_free": + lv := value.List() + clv := lv.(*_QueryLockupAccountInfoResponse_2_list) + x.DelegatedFree = *clv.list + case "cosmos.accounts.defaults.lockup.QueryLockupAccountInfoResponse.delegated_locking": + lv := value.List() + clv := lv.(*_QueryLockupAccountInfoResponse_3_list) + x.DelegatedLocking = *clv.list + case "cosmos.accounts.defaults.lockup.QueryLockupAccountInfoResponse.start_time": + x.StartTime = value.Message().Interface().(*timestamppb.Timestamp) + case "cosmos.accounts.defaults.lockup.QueryLockupAccountInfoResponse.end_time": + x.EndTime = value.Message().Interface().(*timestamppb.Timestamp) + case "cosmos.accounts.defaults.lockup.QueryLockupAccountInfoResponse.locked_coins": + lv := value.List() + clv := lv.(*_QueryLockupAccountInfoResponse_6_list) + x.LockedCoins = *clv.list + case "cosmos.accounts.defaults.lockup.QueryLockupAccountInfoResponse.unlocked_coins": + lv := value.List() + clv := lv.(*_QueryLockupAccountInfoResponse_7_list) + x.UnlockedCoins = *clv.list + case "cosmos.accounts.defaults.lockup.QueryLockupAccountInfoResponse.owner": + x.Owner = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.QueryLockupAccountInfoResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.QueryLockupAccountInfoResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryLockupAccountInfoResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.accounts.defaults.lockup.QueryLockupAccountInfoResponse.original_locking": + if x.OriginalLocking == nil { + x.OriginalLocking = []*v1beta1.Coin{} + } + value := &_QueryLockupAccountInfoResponse_1_list{list: &x.OriginalLocking} + return protoreflect.ValueOfList(value) + case "cosmos.accounts.defaults.lockup.QueryLockupAccountInfoResponse.delegated_free": + if x.DelegatedFree == nil { + x.DelegatedFree = []*v1beta1.Coin{} + } + value := &_QueryLockupAccountInfoResponse_2_list{list: &x.DelegatedFree} + return protoreflect.ValueOfList(value) + case "cosmos.accounts.defaults.lockup.QueryLockupAccountInfoResponse.delegated_locking": + if x.DelegatedLocking == nil { + x.DelegatedLocking = []*v1beta1.Coin{} + } + value := &_QueryLockupAccountInfoResponse_3_list{list: &x.DelegatedLocking} + return protoreflect.ValueOfList(value) + case "cosmos.accounts.defaults.lockup.QueryLockupAccountInfoResponse.start_time": + if x.StartTime == nil { + x.StartTime = new(timestamppb.Timestamp) + } + return protoreflect.ValueOfMessage(x.StartTime.ProtoReflect()) + case "cosmos.accounts.defaults.lockup.QueryLockupAccountInfoResponse.end_time": + if x.EndTime == nil { + x.EndTime = new(timestamppb.Timestamp) + } + return protoreflect.ValueOfMessage(x.EndTime.ProtoReflect()) + case "cosmos.accounts.defaults.lockup.QueryLockupAccountInfoResponse.locked_coins": + if x.LockedCoins == nil { + x.LockedCoins = []*v1beta1.Coin{} + } + value := &_QueryLockupAccountInfoResponse_6_list{list: &x.LockedCoins} + return protoreflect.ValueOfList(value) + case "cosmos.accounts.defaults.lockup.QueryLockupAccountInfoResponse.unlocked_coins": + if x.UnlockedCoins == nil { + x.UnlockedCoins = []*v1beta1.Coin{} + } + value := &_QueryLockupAccountInfoResponse_7_list{list: &x.UnlockedCoins} + return protoreflect.ValueOfList(value) + case "cosmos.accounts.defaults.lockup.QueryLockupAccountInfoResponse.owner": + panic(fmt.Errorf("field owner of message cosmos.accounts.defaults.lockup.QueryLockupAccountInfoResponse is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.QueryLockupAccountInfoResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.QueryLockupAccountInfoResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryLockupAccountInfoResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.accounts.defaults.lockup.QueryLockupAccountInfoResponse.original_locking": + list := []*v1beta1.Coin{} + return protoreflect.ValueOfList(&_QueryLockupAccountInfoResponse_1_list{list: &list}) + case "cosmos.accounts.defaults.lockup.QueryLockupAccountInfoResponse.delegated_free": + list := []*v1beta1.Coin{} + return protoreflect.ValueOfList(&_QueryLockupAccountInfoResponse_2_list{list: &list}) + case "cosmos.accounts.defaults.lockup.QueryLockupAccountInfoResponse.delegated_locking": + list := []*v1beta1.Coin{} + return protoreflect.ValueOfList(&_QueryLockupAccountInfoResponse_3_list{list: &list}) + case "cosmos.accounts.defaults.lockup.QueryLockupAccountInfoResponse.start_time": + m := new(timestamppb.Timestamp) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "cosmos.accounts.defaults.lockup.QueryLockupAccountInfoResponse.end_time": + m := new(timestamppb.Timestamp) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "cosmos.accounts.defaults.lockup.QueryLockupAccountInfoResponse.locked_coins": + list := []*v1beta1.Coin{} + return protoreflect.ValueOfList(&_QueryLockupAccountInfoResponse_6_list{list: &list}) + case "cosmos.accounts.defaults.lockup.QueryLockupAccountInfoResponse.unlocked_coins": + list := []*v1beta1.Coin{} + return protoreflect.ValueOfList(&_QueryLockupAccountInfoResponse_7_list{list: &list}) + case "cosmos.accounts.defaults.lockup.QueryLockupAccountInfoResponse.owner": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.QueryLockupAccountInfoResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.QueryLockupAccountInfoResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryLockupAccountInfoResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.accounts.defaults.lockup.QueryLockupAccountInfoResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryLockupAccountInfoResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryLockupAccountInfoResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryLockupAccountInfoResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryLockupAccountInfoResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryLockupAccountInfoResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if len(x.OriginalLocking) > 0 { + for _, e := range x.OriginalLocking { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if len(x.DelegatedFree) > 0 { + for _, e := range x.DelegatedFree { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if len(x.DelegatedLocking) > 0 { + for _, e := range x.DelegatedLocking { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.StartTime != nil { + l = options.Size(x.StartTime) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.EndTime != nil { + l = options.Size(x.EndTime) + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.LockedCoins) > 0 { + for _, e := range x.LockedCoins { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if len(x.UnlockedCoins) > 0 { + for _, e := range x.UnlockedCoins { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + l = len(x.Owner) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryLockupAccountInfoResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Owner) > 0 { + i -= len(x.Owner) + copy(dAtA[i:], x.Owner) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Owner))) + i-- + dAtA[i] = 0x42 + } + if len(x.UnlockedCoins) > 0 { + for iNdEx := len(x.UnlockedCoins) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.UnlockedCoins[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x3a + } + } + if len(x.LockedCoins) > 0 { + for iNdEx := len(x.LockedCoins) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.LockedCoins[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x32 + } + } + if x.EndTime != nil { + encoded, err := options.Marshal(x.EndTime) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x2a + } + if x.StartTime != nil { + encoded, err := options.Marshal(x.StartTime) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x22 + } + if len(x.DelegatedLocking) > 0 { + for iNdEx := len(x.DelegatedLocking) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.DelegatedLocking[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x1a + } + } + if len(x.DelegatedFree) > 0 { + for iNdEx := len(x.DelegatedFree) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.DelegatedFree[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + } + if len(x.OriginalLocking) > 0 { + for iNdEx := len(x.OriginalLocking) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.OriginalLocking[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryLockupAccountInfoResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryLockupAccountInfoResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryLockupAccountInfoResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field OriginalLocking", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.OriginalLocking = append(x.OriginalLocking, &v1beta1.Coin{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.OriginalLocking[len(x.OriginalLocking)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DelegatedFree", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.DelegatedFree = append(x.DelegatedFree, &v1beta1.Coin{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.DelegatedFree[len(x.DelegatedFree)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DelegatedLocking", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.DelegatedLocking = append(x.DelegatedLocking, &v1beta1.Coin{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.DelegatedLocking[len(x.DelegatedLocking)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field StartTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.StartTime == nil { + x.StartTime = ×tamppb.Timestamp{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.StartTime); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field EndTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.EndTime == nil { + x.EndTime = ×tamppb.Timestamp{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.EndTime); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field LockedCoins", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.LockedCoins = append(x.LockedCoins, &v1beta1.Coin{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.LockedCoins[len(x.LockedCoins)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field UnlockedCoins", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.UnlockedCoins = append(x.UnlockedCoins, &v1beta1.Coin{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.UnlockedCoins[len(x.UnlockedCoins)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Owner", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryLockingPeriodsRequest protoreflect.MessageDescriptor +) + +func init() { + file_cosmos_accounts_defaults_lockup_query_proto_init() + md_QueryLockingPeriodsRequest = File_cosmos_accounts_defaults_lockup_query_proto.Messages().ByName("QueryLockingPeriodsRequest") +} + +var _ protoreflect.Message = (*fastReflection_QueryLockingPeriodsRequest)(nil) + +type fastReflection_QueryLockingPeriodsRequest QueryLockingPeriodsRequest + +func (x *QueryLockingPeriodsRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryLockingPeriodsRequest)(x) +} + +func (x *QueryLockingPeriodsRequest) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_accounts_defaults_lockup_query_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) +} + +var _fastReflection_QueryLockingPeriodsRequest_messageType fastReflection_QueryLockingPeriodsRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryLockingPeriodsRequest_messageType{} + +type fastReflection_QueryLockingPeriodsRequest_messageType struct{} + +func (x fastReflection_QueryLockingPeriodsRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryLockingPeriodsRequest)(nil) +} +func (x fastReflection_QueryLockingPeriodsRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryLockingPeriodsRequest) +} +func (x fastReflection_QueryLockingPeriodsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryLockingPeriodsRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryLockingPeriodsRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryLockingPeriodsRequest +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryLockingPeriodsRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryLockingPeriodsRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryLockingPeriodsRequest) New() protoreflect.Message { + return new(fastReflection_QueryLockingPeriodsRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryLockingPeriodsRequest) Interface() protoreflect.ProtoMessage { + return (*QueryLockingPeriodsRequest)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryLockingPeriodsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryLockingPeriodsRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.QueryLockingPeriodsRequest")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.QueryLockingPeriodsRequest does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryLockingPeriodsRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.QueryLockingPeriodsRequest")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.QueryLockingPeriodsRequest does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryLockingPeriodsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.QueryLockingPeriodsRequest")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.QueryLockingPeriodsRequest does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryLockingPeriodsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.QueryLockingPeriodsRequest")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.QueryLockingPeriodsRequest does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryLockingPeriodsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.QueryLockingPeriodsRequest")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.QueryLockingPeriodsRequest does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryLockingPeriodsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.QueryLockingPeriodsRequest")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.QueryLockingPeriodsRequest does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryLockingPeriodsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.accounts.defaults.lockup.QueryLockingPeriodsRequest", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryLockingPeriodsRequest) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryLockingPeriodsRequest) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryLockingPeriodsRequest) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryLockingPeriodsRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryLockingPeriodsRequest) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryLockingPeriodsRequest) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryLockingPeriodsRequest) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryLockingPeriodsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryLockingPeriodsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_QueryLockingPeriodsResponse_1_list)(nil) + +type _QueryLockingPeriodsResponse_1_list struct { + list *[]*Period +} + +func (x *_QueryLockingPeriodsResponse_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_QueryLockingPeriodsResponse_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_QueryLockingPeriodsResponse_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Period) + (*x.list)[i] = concreteValue +} + +func (x *_QueryLockingPeriodsResponse_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Period) + *x.list = append(*x.list, concreteValue) +} + +func (x *_QueryLockingPeriodsResponse_1_list) AppendMutable() protoreflect.Value { + v := new(Period) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryLockingPeriodsResponse_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_QueryLockingPeriodsResponse_1_list) NewElement() protoreflect.Value { + v := new(Period) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryLockingPeriodsResponse_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_QueryLockingPeriodsResponse protoreflect.MessageDescriptor + fd_QueryLockingPeriodsResponse_locking_periods protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_accounts_defaults_lockup_query_proto_init() + md_QueryLockingPeriodsResponse = File_cosmos_accounts_defaults_lockup_query_proto.Messages().ByName("QueryLockingPeriodsResponse") + fd_QueryLockingPeriodsResponse_locking_periods = md_QueryLockingPeriodsResponse.Fields().ByName("locking_periods") +} + +var _ protoreflect.Message = (*fastReflection_QueryLockingPeriodsResponse)(nil) + +type fastReflection_QueryLockingPeriodsResponse QueryLockingPeriodsResponse + +func (x *QueryLockingPeriodsResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryLockingPeriodsResponse)(x) +} + +func (x *QueryLockingPeriodsResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_accounts_defaults_lockup_query_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) +} + +var _fastReflection_QueryLockingPeriodsResponse_messageType fastReflection_QueryLockingPeriodsResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryLockingPeriodsResponse_messageType{} + +type fastReflection_QueryLockingPeriodsResponse_messageType struct{} + +func (x fastReflection_QueryLockingPeriodsResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryLockingPeriodsResponse)(nil) +} +func (x fastReflection_QueryLockingPeriodsResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryLockingPeriodsResponse) +} +func (x fastReflection_QueryLockingPeriodsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryLockingPeriodsResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryLockingPeriodsResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryLockingPeriodsResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryLockingPeriodsResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryLockingPeriodsResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryLockingPeriodsResponse) New() protoreflect.Message { + return new(fastReflection_QueryLockingPeriodsResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryLockingPeriodsResponse) Interface() protoreflect.ProtoMessage { + return (*QueryLockingPeriodsResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryLockingPeriodsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.LockingPeriods) != 0 { + value := protoreflect.ValueOfList(&_QueryLockingPeriodsResponse_1_list{list: &x.LockingPeriods}) + if !f(fd_QueryLockingPeriodsResponse_locking_periods, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryLockingPeriodsResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.accounts.defaults.lockup.QueryLockingPeriodsResponse.locking_periods": + return len(x.LockingPeriods) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.QueryLockingPeriodsResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.QueryLockingPeriodsResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryLockingPeriodsResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.accounts.defaults.lockup.QueryLockingPeriodsResponse.locking_periods": + x.LockingPeriods = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.QueryLockingPeriodsResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.QueryLockingPeriodsResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryLockingPeriodsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.accounts.defaults.lockup.QueryLockingPeriodsResponse.locking_periods": + if len(x.LockingPeriods) == 0 { + return protoreflect.ValueOfList(&_QueryLockingPeriodsResponse_1_list{}) + } + listValue := &_QueryLockingPeriodsResponse_1_list{list: &x.LockingPeriods} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.QueryLockingPeriodsResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.QueryLockingPeriodsResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryLockingPeriodsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.accounts.defaults.lockup.QueryLockingPeriodsResponse.locking_periods": + lv := value.List() + clv := lv.(*_QueryLockingPeriodsResponse_1_list) + x.LockingPeriods = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.QueryLockingPeriodsResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.QueryLockingPeriodsResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryLockingPeriodsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.accounts.defaults.lockup.QueryLockingPeriodsResponse.locking_periods": + if x.LockingPeriods == nil { + x.LockingPeriods = []*Period{} + } + value := &_QueryLockingPeriodsResponse_1_list{list: &x.LockingPeriods} + return protoreflect.ValueOfList(value) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.QueryLockingPeriodsResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.QueryLockingPeriodsResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryLockingPeriodsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.accounts.defaults.lockup.QueryLockingPeriodsResponse.locking_periods": + list := []*Period{} + return protoreflect.ValueOfList(&_QueryLockingPeriodsResponse_1_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.QueryLockingPeriodsResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.QueryLockingPeriodsResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryLockingPeriodsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.accounts.defaults.lockup.QueryLockingPeriodsResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryLockingPeriodsResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryLockingPeriodsResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryLockingPeriodsResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryLockingPeriodsResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryLockingPeriodsResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if len(x.LockingPeriods) > 0 { + for _, e := range x.LockingPeriods { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryLockingPeriodsResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.LockingPeriods) > 0 { + for iNdEx := len(x.LockingPeriods) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.LockingPeriods[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryLockingPeriodsResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryLockingPeriodsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryLockingPeriodsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field LockingPeriods", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.LockingPeriods = append(x.LockingPeriods, &Period{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.LockingPeriods[len(x.LockingPeriods)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: cosmos/accounts/defaults/lockup/query.proto + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// QueryLockupAccountInfoRequest get lockup account info +type QueryLockupAccountInfoRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *QueryLockupAccountInfoRequest) Reset() { + *x = QueryLockupAccountInfoRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_accounts_defaults_lockup_query_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryLockupAccountInfoRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryLockupAccountInfoRequest) ProtoMessage() {} + +// Deprecated: Use QueryLockupAccountInfoRequest.ProtoReflect.Descriptor instead. +func (*QueryLockupAccountInfoRequest) Descriptor() ([]byte, []int) { + return file_cosmos_accounts_defaults_lockup_query_proto_rawDescGZIP(), []int{0} +} + +// QueryLockupAccountInfoResponse return lockup account info +type QueryLockupAccountInfoResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // original_locking defines the value of the account original locking coins. + OriginalLocking []*v1beta1.Coin `protobuf:"bytes,1,rep,name=original_locking,json=originalLocking,proto3" json:"original_locking,omitempty"` + // delegated_free defines the value of the account free delegated amount. + DelegatedFree []*v1beta1.Coin `protobuf:"bytes,2,rep,name=delegated_free,json=delegatedFree,proto3" json:"delegated_free,omitempty"` + // delegated_locking defines the value of the account locking delegated amount. + DelegatedLocking []*v1beta1.Coin `protobuf:"bytes,3,rep,name=delegated_locking,json=delegatedLocking,proto3" json:"delegated_locking,omitempty"` + // end_time defines the value of the account lockup start time. + StartTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` + // end_time defines the value of the account lockup end time. + EndTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` + // locked_coins defines the value of the account locking coins. + LockedCoins []*v1beta1.Coin `protobuf:"bytes,6,rep,name=locked_coins,json=lockedCoins,proto3" json:"locked_coins,omitempty"` + // unlocked_coins defines the value of the account released coins from lockup. + UnlockedCoins []*v1beta1.Coin `protobuf:"bytes,7,rep,name=unlocked_coins,json=unlockedCoins,proto3" json:"unlocked_coins,omitempty"` + // owner defines the value of the owner of the lockup account. + Owner string `protobuf:"bytes,8,opt,name=owner,proto3" json:"owner,omitempty"` +} + +func (x *QueryLockupAccountInfoResponse) Reset() { + *x = QueryLockupAccountInfoResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_accounts_defaults_lockup_query_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryLockupAccountInfoResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryLockupAccountInfoResponse) ProtoMessage() {} + +// Deprecated: Use QueryLockupAccountInfoResponse.ProtoReflect.Descriptor instead. +func (*QueryLockupAccountInfoResponse) Descriptor() ([]byte, []int) { + return file_cosmos_accounts_defaults_lockup_query_proto_rawDescGZIP(), []int{1} +} + +func (x *QueryLockupAccountInfoResponse) GetOriginalLocking() []*v1beta1.Coin { + if x != nil { + return x.OriginalLocking + } + return nil +} + +func (x *QueryLockupAccountInfoResponse) GetDelegatedFree() []*v1beta1.Coin { + if x != nil { + return x.DelegatedFree + } + return nil +} + +func (x *QueryLockupAccountInfoResponse) GetDelegatedLocking() []*v1beta1.Coin { + if x != nil { + return x.DelegatedLocking + } + return nil +} + +func (x *QueryLockupAccountInfoResponse) GetStartTime() *timestamppb.Timestamp { + if x != nil { + return x.StartTime + } + return nil +} + +func (x *QueryLockupAccountInfoResponse) GetEndTime() *timestamppb.Timestamp { + if x != nil { + return x.EndTime + } + return nil +} + +func (x *QueryLockupAccountInfoResponse) GetLockedCoins() []*v1beta1.Coin { + if x != nil { + return x.LockedCoins + } + return nil +} + +func (x *QueryLockupAccountInfoResponse) GetUnlockedCoins() []*v1beta1.Coin { + if x != nil { + return x.UnlockedCoins + } + return nil +} + +func (x *QueryLockupAccountInfoResponse) GetOwner() string { + if x != nil { + return x.Owner + } + return "" +} + +// QueryLockingPeriodsRequest is used to query the periodic lockup account locking periods. +type QueryLockingPeriodsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *QueryLockingPeriodsRequest) Reset() { + *x = QueryLockingPeriodsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_accounts_defaults_lockup_query_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryLockingPeriodsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryLockingPeriodsRequest) ProtoMessage() {} + +// Deprecated: Use QueryLockingPeriodsRequest.ProtoReflect.Descriptor instead. +func (*QueryLockingPeriodsRequest) Descriptor() ([]byte, []int) { + return file_cosmos_accounts_defaults_lockup_query_proto_rawDescGZIP(), []int{2} +} + +// QueryLockingPeriodsResponse returns the periodic lockup account locking periods. +type QueryLockingPeriodsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // lockup_periods defines the value of the periodic lockup account locking periods. + LockingPeriods []*Period `protobuf:"bytes,1,rep,name=locking_periods,json=lockingPeriods,proto3" json:"locking_periods,omitempty"` +} + +func (x *QueryLockingPeriodsResponse) Reset() { + *x = QueryLockingPeriodsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_accounts_defaults_lockup_query_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryLockingPeriodsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryLockingPeriodsResponse) ProtoMessage() {} + +// Deprecated: Use QueryLockingPeriodsResponse.ProtoReflect.Descriptor instead. +func (*QueryLockingPeriodsResponse) Descriptor() ([]byte, []int) { + return file_cosmos_accounts_defaults_lockup_query_proto_rawDescGZIP(), []int{3} +} + +func (x *QueryLockingPeriodsResponse) GetLockingPeriods() []*Period { + if x != nil { + return x.LockingPeriods + } + return nil +} + +var File_cosmos_accounts_defaults_lockup_query_proto protoreflect.FileDescriptor + +var file_cosmos_accounts_defaults_lockup_query_proto_rawDesc = []byte{ + 0x0a, 0x2b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x73, 0x2f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x2f, 0x6c, 0x6f, 0x63, 0x6b, 0x75, + 0x70, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1f, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x64, + 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x2e, 0x6c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x1a, 0x2c, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, + 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x2f, 0x6c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x2f, + 0x6c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, + 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x22, 0x1f, 0x0a, 0x1d, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4c, 0x6f, 0x63, 0x6b, + 0x75, 0x70, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x22, 0xfe, 0x05, 0x0a, 0x1e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4c, 0x6f, + 0x63, 0x6b, 0x75, 0x70, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x76, 0x0a, 0x10, 0x6f, 0x72, 0x69, 0x67, 0x69, + 0x6e, 0x61, 0x6c, 0x5f, 0x6c, 0x6f, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x30, 0xc8, 0xde, + 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, + 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x0f, + 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x4c, 0x6f, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x12, + 0x72, 0x0a, 0x0e, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x72, 0x65, + 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, + 0x69, 0x6e, 0x42, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, + 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x0d, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x46, + 0x72, 0x65, 0x65, 0x12, 0x78, 0x0a, 0x11, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, + 0x5f, 0x6c, 0x6f, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, + 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xaa, + 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, + 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x10, 0x64, 0x65, 0x6c, + 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x4c, 0x6f, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x12, 0x3f, 0x0a, + 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x04, 0x90, + 0xdf, 0x1f, 0x01, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3b, + 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x04, 0x90, 0xdf, + 0x1f, 0x01, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x6e, 0x0a, 0x0c, 0x6c, + 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x69, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x30, 0xc8, 0xde, + 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, + 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x0b, + 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x12, 0x72, 0x0a, 0x0e, 0x75, + 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x69, 0x6e, 0x73, 0x18, 0x07, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, + 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x30, + 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, + 0x52, 0x0d, 0x75, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x12, + 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x22, 0x1c, 0x0a, 0x1a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4c, 0x6f, + 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x22, 0x6f, 0x0a, 0x1b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4c, 0x6f, 0x63, 0x6b, + 0x69, 0x6e, 0x67, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x50, 0x0a, 0x0f, 0x6c, 0x6f, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, + 0x72, 0x69, 0x6f, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x64, 0x65, + 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x2e, 0x6c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x2e, 0x50, 0x65, + 0x72, 0x69, 0x6f, 0x64, 0x52, 0x0e, 0x6c, 0x6f, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x50, 0x65, 0x72, + 0x69, 0x6f, 0x64, 0x73, 0x42, 0x83, 0x02, 0x0a, 0x23, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x64, 0x65, 0x66, + 0x61, 0x75, 0x6c, 0x74, 0x73, 0x2e, 0x6c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x42, 0x0a, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x30, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x64, 0x65, 0x66, + 0x61, 0x75, 0x6c, 0x74, 0x73, 0x2f, 0x6c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0xa2, 0x02, 0x04, 0x43, + 0x41, 0x44, 0x4c, 0xaa, 0x02, 0x1f, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x2e, 0x4c, + 0x6f, 0x63, 0x6b, 0x75, 0x70, 0xca, 0x02, 0x1f, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x5c, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, + 0x5c, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0xe2, 0x02, 0x2b, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x5c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x5c, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, + 0x74, 0x73, 0x5c, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x22, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x3a, 0x3a, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, + 0x74, 0x73, 0x3a, 0x3a, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, +} + +var ( + file_cosmos_accounts_defaults_lockup_query_proto_rawDescOnce sync.Once + file_cosmos_accounts_defaults_lockup_query_proto_rawDescData = file_cosmos_accounts_defaults_lockup_query_proto_rawDesc +) + +func file_cosmos_accounts_defaults_lockup_query_proto_rawDescGZIP() []byte { + file_cosmos_accounts_defaults_lockup_query_proto_rawDescOnce.Do(func() { + file_cosmos_accounts_defaults_lockup_query_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_accounts_defaults_lockup_query_proto_rawDescData) + }) + return file_cosmos_accounts_defaults_lockup_query_proto_rawDescData +} + +var file_cosmos_accounts_defaults_lockup_query_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_cosmos_accounts_defaults_lockup_query_proto_goTypes = []interface{}{ + (*QueryLockupAccountInfoRequest)(nil), // 0: cosmos.accounts.defaults.lockup.QueryLockupAccountInfoRequest + (*QueryLockupAccountInfoResponse)(nil), // 1: cosmos.accounts.defaults.lockup.QueryLockupAccountInfoResponse + (*QueryLockingPeriodsRequest)(nil), // 2: cosmos.accounts.defaults.lockup.QueryLockingPeriodsRequest + (*QueryLockingPeriodsResponse)(nil), // 3: cosmos.accounts.defaults.lockup.QueryLockingPeriodsResponse + (*v1beta1.Coin)(nil), // 4: cosmos.base.v1beta1.Coin + (*timestamppb.Timestamp)(nil), // 5: google.protobuf.Timestamp + (*Period)(nil), // 6: cosmos.accounts.defaults.lockup.Period +} +var file_cosmos_accounts_defaults_lockup_query_proto_depIdxs = []int32{ + 4, // 0: cosmos.accounts.defaults.lockup.QueryLockupAccountInfoResponse.original_locking:type_name -> cosmos.base.v1beta1.Coin + 4, // 1: cosmos.accounts.defaults.lockup.QueryLockupAccountInfoResponse.delegated_free:type_name -> cosmos.base.v1beta1.Coin + 4, // 2: cosmos.accounts.defaults.lockup.QueryLockupAccountInfoResponse.delegated_locking:type_name -> cosmos.base.v1beta1.Coin + 5, // 3: cosmos.accounts.defaults.lockup.QueryLockupAccountInfoResponse.start_time:type_name -> google.protobuf.Timestamp + 5, // 4: cosmos.accounts.defaults.lockup.QueryLockupAccountInfoResponse.end_time:type_name -> google.protobuf.Timestamp + 4, // 5: cosmos.accounts.defaults.lockup.QueryLockupAccountInfoResponse.locked_coins:type_name -> cosmos.base.v1beta1.Coin + 4, // 6: cosmos.accounts.defaults.lockup.QueryLockupAccountInfoResponse.unlocked_coins:type_name -> cosmos.base.v1beta1.Coin + 6, // 7: cosmos.accounts.defaults.lockup.QueryLockingPeriodsResponse.locking_periods:type_name -> cosmos.accounts.defaults.lockup.Period + 8, // [8:8] is the sub-list for method output_type + 8, // [8:8] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name +} + +func init() { file_cosmos_accounts_defaults_lockup_query_proto_init() } +func file_cosmos_accounts_defaults_lockup_query_proto_init() { + if File_cosmos_accounts_defaults_lockup_query_proto != nil { + return + } + file_cosmos_accounts_defaults_lockup_lockup_proto_init() + if !protoimpl.UnsafeEnabled { + file_cosmos_accounts_defaults_lockup_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryLockupAccountInfoRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_accounts_defaults_lockup_query_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryLockupAccountInfoResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_accounts_defaults_lockup_query_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryLockingPeriodsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_accounts_defaults_lockup_query_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryLockingPeriodsResponse); 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: file_cosmos_accounts_defaults_lockup_query_proto_rawDesc, + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_cosmos_accounts_defaults_lockup_query_proto_goTypes, + DependencyIndexes: file_cosmos_accounts_defaults_lockup_query_proto_depIdxs, + MessageInfos: file_cosmos_accounts_defaults_lockup_query_proto_msgTypes, + }.Build() + File_cosmos_accounts_defaults_lockup_query_proto = out.File + file_cosmos_accounts_defaults_lockup_query_proto_rawDesc = nil + file_cosmos_accounts_defaults_lockup_query_proto_goTypes = nil + file_cosmos_accounts_defaults_lockup_query_proto_depIdxs = nil +} diff --git a/api/cosmos/accounts/defaults/lockup/tx.pulsar.go b/api/cosmos/accounts/defaults/lockup/tx.pulsar.go new file mode 100644 index 000000000000..816b0b7ace7f --- /dev/null +++ b/api/cosmos/accounts/defaults/lockup/tx.pulsar.go @@ -0,0 +1,6174 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package lockup + +import ( + _ "cosmossdk.io/api/amino" + v1beta1 "cosmossdk.io/api/cosmos/base/v1beta1" + _ "cosmossdk.io/api/cosmos/msg/v1" + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + runtime "github.com/cosmos/cosmos-proto/runtime" + _ "github.com/cosmos/gogoproto/gogoproto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoiface "google.golang.org/protobuf/runtime/protoiface" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + anypb "google.golang.org/protobuf/types/known/anypb" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + io "io" + reflect "reflect" + sync "sync" +) + +var ( + md_MsgInitLockupAccount protoreflect.MessageDescriptor + fd_MsgInitLockupAccount_owner protoreflect.FieldDescriptor + fd_MsgInitLockupAccount_end_time protoreflect.FieldDescriptor + fd_MsgInitLockupAccount_start_time protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_accounts_defaults_lockup_tx_proto_init() + md_MsgInitLockupAccount = File_cosmos_accounts_defaults_lockup_tx_proto.Messages().ByName("MsgInitLockupAccount") + fd_MsgInitLockupAccount_owner = md_MsgInitLockupAccount.Fields().ByName("owner") + fd_MsgInitLockupAccount_end_time = md_MsgInitLockupAccount.Fields().ByName("end_time") + fd_MsgInitLockupAccount_start_time = md_MsgInitLockupAccount.Fields().ByName("start_time") +} + +var _ protoreflect.Message = (*fastReflection_MsgInitLockupAccount)(nil) + +type fastReflection_MsgInitLockupAccount MsgInitLockupAccount + +func (x *MsgInitLockupAccount) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgInitLockupAccount)(x) +} + +func (x *MsgInitLockupAccount) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_accounts_defaults_lockup_tx_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) +} + +var _fastReflection_MsgInitLockupAccount_messageType fastReflection_MsgInitLockupAccount_messageType +var _ protoreflect.MessageType = fastReflection_MsgInitLockupAccount_messageType{} + +type fastReflection_MsgInitLockupAccount_messageType struct{} + +func (x fastReflection_MsgInitLockupAccount_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgInitLockupAccount)(nil) +} +func (x fastReflection_MsgInitLockupAccount_messageType) New() protoreflect.Message { + return new(fastReflection_MsgInitLockupAccount) +} +func (x fastReflection_MsgInitLockupAccount_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgInitLockupAccount +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgInitLockupAccount) Descriptor() protoreflect.MessageDescriptor { + return md_MsgInitLockupAccount +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgInitLockupAccount) Type() protoreflect.MessageType { + return _fastReflection_MsgInitLockupAccount_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgInitLockupAccount) New() protoreflect.Message { + return new(fastReflection_MsgInitLockupAccount) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgInitLockupAccount) Interface() protoreflect.ProtoMessage { + return (*MsgInitLockupAccount)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgInitLockupAccount) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Owner != "" { + value := protoreflect.ValueOfString(x.Owner) + if !f(fd_MsgInitLockupAccount_owner, value) { + return + } + } + if x.EndTime != nil { + value := protoreflect.ValueOfMessage(x.EndTime.ProtoReflect()) + if !f(fd_MsgInitLockupAccount_end_time, value) { + return + } + } + if x.StartTime != nil { + value := protoreflect.ValueOfMessage(x.StartTime.ProtoReflect()) + if !f(fd_MsgInitLockupAccount_start_time, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgInitLockupAccount) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.accounts.defaults.lockup.MsgInitLockupAccount.owner": + return x.Owner != "" + case "cosmos.accounts.defaults.lockup.MsgInitLockupAccount.end_time": + return x.EndTime != nil + case "cosmos.accounts.defaults.lockup.MsgInitLockupAccount.start_time": + return x.StartTime != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.MsgInitLockupAccount")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.MsgInitLockupAccount does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgInitLockupAccount) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.accounts.defaults.lockup.MsgInitLockupAccount.owner": + x.Owner = "" + case "cosmos.accounts.defaults.lockup.MsgInitLockupAccount.end_time": + x.EndTime = nil + case "cosmos.accounts.defaults.lockup.MsgInitLockupAccount.start_time": + x.StartTime = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.MsgInitLockupAccount")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.MsgInitLockupAccount does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgInitLockupAccount) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.accounts.defaults.lockup.MsgInitLockupAccount.owner": + value := x.Owner + return protoreflect.ValueOfString(value) + case "cosmos.accounts.defaults.lockup.MsgInitLockupAccount.end_time": + value := x.EndTime + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "cosmos.accounts.defaults.lockup.MsgInitLockupAccount.start_time": + value := x.StartTime + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.MsgInitLockupAccount")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.MsgInitLockupAccount does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgInitLockupAccount) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.accounts.defaults.lockup.MsgInitLockupAccount.owner": + x.Owner = value.Interface().(string) + case "cosmos.accounts.defaults.lockup.MsgInitLockupAccount.end_time": + x.EndTime = value.Message().Interface().(*timestamppb.Timestamp) + case "cosmos.accounts.defaults.lockup.MsgInitLockupAccount.start_time": + x.StartTime = value.Message().Interface().(*timestamppb.Timestamp) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.MsgInitLockupAccount")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.MsgInitLockupAccount does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgInitLockupAccount) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.accounts.defaults.lockup.MsgInitLockupAccount.end_time": + if x.EndTime == nil { + x.EndTime = new(timestamppb.Timestamp) + } + return protoreflect.ValueOfMessage(x.EndTime.ProtoReflect()) + case "cosmos.accounts.defaults.lockup.MsgInitLockupAccount.start_time": + if x.StartTime == nil { + x.StartTime = new(timestamppb.Timestamp) + } + return protoreflect.ValueOfMessage(x.StartTime.ProtoReflect()) + case "cosmos.accounts.defaults.lockup.MsgInitLockupAccount.owner": + panic(fmt.Errorf("field owner of message cosmos.accounts.defaults.lockup.MsgInitLockupAccount is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.MsgInitLockupAccount")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.MsgInitLockupAccount does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgInitLockupAccount) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.accounts.defaults.lockup.MsgInitLockupAccount.owner": + return protoreflect.ValueOfString("") + case "cosmos.accounts.defaults.lockup.MsgInitLockupAccount.end_time": + m := new(timestamppb.Timestamp) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "cosmos.accounts.defaults.lockup.MsgInitLockupAccount.start_time": + m := new(timestamppb.Timestamp) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.MsgInitLockupAccount")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.MsgInitLockupAccount does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgInitLockupAccount) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.accounts.defaults.lockup.MsgInitLockupAccount", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgInitLockupAccount) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgInitLockupAccount) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgInitLockupAccount) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgInitLockupAccount) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgInitLockupAccount) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Owner) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.EndTime != nil { + l = options.Size(x.EndTime) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.StartTime != nil { + l = options.Size(x.StartTime) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgInitLockupAccount) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.StartTime != nil { + encoded, err := options.Marshal(x.StartTime) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x1a + } + if x.EndTime != nil { + encoded, err := options.Marshal(x.EndTime) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + if len(x.Owner) > 0 { + i -= len(x.Owner) + copy(dAtA[i:], x.Owner) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Owner))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgInitLockupAccount) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgInitLockupAccount: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgInitLockupAccount: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Owner", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field EndTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.EndTime == nil { + x.EndTime = ×tamppb.Timestamp{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.EndTime); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field StartTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.StartTime == nil { + x.StartTime = ×tamppb.Timestamp{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.StartTime); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgInitLockupAccountResponse protoreflect.MessageDescriptor +) + +func init() { + file_cosmos_accounts_defaults_lockup_tx_proto_init() + md_MsgInitLockupAccountResponse = File_cosmos_accounts_defaults_lockup_tx_proto.Messages().ByName("MsgInitLockupAccountResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgInitLockupAccountResponse)(nil) + +type fastReflection_MsgInitLockupAccountResponse MsgInitLockupAccountResponse + +func (x *MsgInitLockupAccountResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgInitLockupAccountResponse)(x) +} + +func (x *MsgInitLockupAccountResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_accounts_defaults_lockup_tx_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) +} + +var _fastReflection_MsgInitLockupAccountResponse_messageType fastReflection_MsgInitLockupAccountResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgInitLockupAccountResponse_messageType{} + +type fastReflection_MsgInitLockupAccountResponse_messageType struct{} + +func (x fastReflection_MsgInitLockupAccountResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgInitLockupAccountResponse)(nil) +} +func (x fastReflection_MsgInitLockupAccountResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgInitLockupAccountResponse) +} +func (x fastReflection_MsgInitLockupAccountResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgInitLockupAccountResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgInitLockupAccountResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgInitLockupAccountResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgInitLockupAccountResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgInitLockupAccountResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgInitLockupAccountResponse) New() protoreflect.Message { + return new(fastReflection_MsgInitLockupAccountResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgInitLockupAccountResponse) Interface() protoreflect.ProtoMessage { + return (*MsgInitLockupAccountResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgInitLockupAccountResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgInitLockupAccountResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.MsgInitLockupAccountResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.MsgInitLockupAccountResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgInitLockupAccountResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.MsgInitLockupAccountResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.MsgInitLockupAccountResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgInitLockupAccountResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.MsgInitLockupAccountResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.MsgInitLockupAccountResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgInitLockupAccountResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.MsgInitLockupAccountResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.MsgInitLockupAccountResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgInitLockupAccountResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.MsgInitLockupAccountResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.MsgInitLockupAccountResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgInitLockupAccountResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.MsgInitLockupAccountResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.MsgInitLockupAccountResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgInitLockupAccountResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.accounts.defaults.lockup.MsgInitLockupAccountResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgInitLockupAccountResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgInitLockupAccountResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgInitLockupAccountResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgInitLockupAccountResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgInitLockupAccountResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgInitLockupAccountResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgInitLockupAccountResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgInitLockupAccountResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgInitLockupAccountResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_MsgInitPeriodicLockingAccount_3_list)(nil) + +type _MsgInitPeriodicLockingAccount_3_list struct { + list *[]*Period +} + +func (x *_MsgInitPeriodicLockingAccount_3_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_MsgInitPeriodicLockingAccount_3_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_MsgInitPeriodicLockingAccount_3_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Period) + (*x.list)[i] = concreteValue +} + +func (x *_MsgInitPeriodicLockingAccount_3_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Period) + *x.list = append(*x.list, concreteValue) +} + +func (x *_MsgInitPeriodicLockingAccount_3_list) AppendMutable() protoreflect.Value { + v := new(Period) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgInitPeriodicLockingAccount_3_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_MsgInitPeriodicLockingAccount_3_list) NewElement() protoreflect.Value { + v := new(Period) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgInitPeriodicLockingAccount_3_list) IsValid() bool { + return x.list != nil +} + +var ( + md_MsgInitPeriodicLockingAccount protoreflect.MessageDescriptor + fd_MsgInitPeriodicLockingAccount_owner protoreflect.FieldDescriptor + fd_MsgInitPeriodicLockingAccount_start_time protoreflect.FieldDescriptor + fd_MsgInitPeriodicLockingAccount_locking_periods protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_accounts_defaults_lockup_tx_proto_init() + md_MsgInitPeriodicLockingAccount = File_cosmos_accounts_defaults_lockup_tx_proto.Messages().ByName("MsgInitPeriodicLockingAccount") + fd_MsgInitPeriodicLockingAccount_owner = md_MsgInitPeriodicLockingAccount.Fields().ByName("owner") + fd_MsgInitPeriodicLockingAccount_start_time = md_MsgInitPeriodicLockingAccount.Fields().ByName("start_time") + fd_MsgInitPeriodicLockingAccount_locking_periods = md_MsgInitPeriodicLockingAccount.Fields().ByName("locking_periods") +} + +var _ protoreflect.Message = (*fastReflection_MsgInitPeriodicLockingAccount)(nil) + +type fastReflection_MsgInitPeriodicLockingAccount MsgInitPeriodicLockingAccount + +func (x *MsgInitPeriodicLockingAccount) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgInitPeriodicLockingAccount)(x) +} + +func (x *MsgInitPeriodicLockingAccount) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_accounts_defaults_lockup_tx_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) +} + +var _fastReflection_MsgInitPeriodicLockingAccount_messageType fastReflection_MsgInitPeriodicLockingAccount_messageType +var _ protoreflect.MessageType = fastReflection_MsgInitPeriodicLockingAccount_messageType{} + +type fastReflection_MsgInitPeriodicLockingAccount_messageType struct{} + +func (x fastReflection_MsgInitPeriodicLockingAccount_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgInitPeriodicLockingAccount)(nil) +} +func (x fastReflection_MsgInitPeriodicLockingAccount_messageType) New() protoreflect.Message { + return new(fastReflection_MsgInitPeriodicLockingAccount) +} +func (x fastReflection_MsgInitPeriodicLockingAccount_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgInitPeriodicLockingAccount +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgInitPeriodicLockingAccount) Descriptor() protoreflect.MessageDescriptor { + return md_MsgInitPeriodicLockingAccount +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgInitPeriodicLockingAccount) Type() protoreflect.MessageType { + return _fastReflection_MsgInitPeriodicLockingAccount_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgInitPeriodicLockingAccount) New() protoreflect.Message { + return new(fastReflection_MsgInitPeriodicLockingAccount) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgInitPeriodicLockingAccount) Interface() protoreflect.ProtoMessage { + return (*MsgInitPeriodicLockingAccount)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgInitPeriodicLockingAccount) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Owner != "" { + value := protoreflect.ValueOfString(x.Owner) + if !f(fd_MsgInitPeriodicLockingAccount_owner, value) { + return + } + } + if x.StartTime != nil { + value := protoreflect.ValueOfMessage(x.StartTime.ProtoReflect()) + if !f(fd_MsgInitPeriodicLockingAccount_start_time, value) { + return + } + } + if len(x.LockingPeriods) != 0 { + value := protoreflect.ValueOfList(&_MsgInitPeriodicLockingAccount_3_list{list: &x.LockingPeriods}) + if !f(fd_MsgInitPeriodicLockingAccount_locking_periods, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgInitPeriodicLockingAccount) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.accounts.defaults.lockup.MsgInitPeriodicLockingAccount.owner": + return x.Owner != "" + case "cosmos.accounts.defaults.lockup.MsgInitPeriodicLockingAccount.start_time": + return x.StartTime != nil + case "cosmos.accounts.defaults.lockup.MsgInitPeriodicLockingAccount.locking_periods": + return len(x.LockingPeriods) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.MsgInitPeriodicLockingAccount")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.MsgInitPeriodicLockingAccount does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgInitPeriodicLockingAccount) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.accounts.defaults.lockup.MsgInitPeriodicLockingAccount.owner": + x.Owner = "" + case "cosmos.accounts.defaults.lockup.MsgInitPeriodicLockingAccount.start_time": + x.StartTime = nil + case "cosmos.accounts.defaults.lockup.MsgInitPeriodicLockingAccount.locking_periods": + x.LockingPeriods = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.MsgInitPeriodicLockingAccount")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.MsgInitPeriodicLockingAccount does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgInitPeriodicLockingAccount) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.accounts.defaults.lockup.MsgInitPeriodicLockingAccount.owner": + value := x.Owner + return protoreflect.ValueOfString(value) + case "cosmos.accounts.defaults.lockup.MsgInitPeriodicLockingAccount.start_time": + value := x.StartTime + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "cosmos.accounts.defaults.lockup.MsgInitPeriodicLockingAccount.locking_periods": + if len(x.LockingPeriods) == 0 { + return protoreflect.ValueOfList(&_MsgInitPeriodicLockingAccount_3_list{}) + } + listValue := &_MsgInitPeriodicLockingAccount_3_list{list: &x.LockingPeriods} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.MsgInitPeriodicLockingAccount")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.MsgInitPeriodicLockingAccount does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgInitPeriodicLockingAccount) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.accounts.defaults.lockup.MsgInitPeriodicLockingAccount.owner": + x.Owner = value.Interface().(string) + case "cosmos.accounts.defaults.lockup.MsgInitPeriodicLockingAccount.start_time": + x.StartTime = value.Message().Interface().(*timestamppb.Timestamp) + case "cosmos.accounts.defaults.lockup.MsgInitPeriodicLockingAccount.locking_periods": + lv := value.List() + clv := lv.(*_MsgInitPeriodicLockingAccount_3_list) + x.LockingPeriods = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.MsgInitPeriodicLockingAccount")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.MsgInitPeriodicLockingAccount does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgInitPeriodicLockingAccount) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.accounts.defaults.lockup.MsgInitPeriodicLockingAccount.start_time": + if x.StartTime == nil { + x.StartTime = new(timestamppb.Timestamp) + } + return protoreflect.ValueOfMessage(x.StartTime.ProtoReflect()) + case "cosmos.accounts.defaults.lockup.MsgInitPeriodicLockingAccount.locking_periods": + if x.LockingPeriods == nil { + x.LockingPeriods = []*Period{} + } + value := &_MsgInitPeriodicLockingAccount_3_list{list: &x.LockingPeriods} + return protoreflect.ValueOfList(value) + case "cosmos.accounts.defaults.lockup.MsgInitPeriodicLockingAccount.owner": + panic(fmt.Errorf("field owner of message cosmos.accounts.defaults.lockup.MsgInitPeriodicLockingAccount is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.MsgInitPeriodicLockingAccount")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.MsgInitPeriodicLockingAccount does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgInitPeriodicLockingAccount) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.accounts.defaults.lockup.MsgInitPeriodicLockingAccount.owner": + return protoreflect.ValueOfString("") + case "cosmos.accounts.defaults.lockup.MsgInitPeriodicLockingAccount.start_time": + m := new(timestamppb.Timestamp) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "cosmos.accounts.defaults.lockup.MsgInitPeriodicLockingAccount.locking_periods": + list := []*Period{} + return protoreflect.ValueOfList(&_MsgInitPeriodicLockingAccount_3_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.MsgInitPeriodicLockingAccount")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.MsgInitPeriodicLockingAccount does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgInitPeriodicLockingAccount) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.accounts.defaults.lockup.MsgInitPeriodicLockingAccount", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgInitPeriodicLockingAccount) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgInitPeriodicLockingAccount) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgInitPeriodicLockingAccount) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgInitPeriodicLockingAccount) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgInitPeriodicLockingAccount) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Owner) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.StartTime != nil { + l = options.Size(x.StartTime) + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.LockingPeriods) > 0 { + for _, e := range x.LockingPeriods { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgInitPeriodicLockingAccount) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.LockingPeriods) > 0 { + for iNdEx := len(x.LockingPeriods) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.LockingPeriods[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x1a + } + } + if x.StartTime != nil { + encoded, err := options.Marshal(x.StartTime) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + if len(x.Owner) > 0 { + i -= len(x.Owner) + copy(dAtA[i:], x.Owner) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Owner))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgInitPeriodicLockingAccount) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgInitPeriodicLockingAccount: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgInitPeriodicLockingAccount: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Owner", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field StartTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.StartTime == nil { + x.StartTime = ×tamppb.Timestamp{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.StartTime); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field LockingPeriods", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.LockingPeriods = append(x.LockingPeriods, &Period{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.LockingPeriods[len(x.LockingPeriods)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgInitPeriodicLockingAccountResponse protoreflect.MessageDescriptor +) + +func init() { + file_cosmos_accounts_defaults_lockup_tx_proto_init() + md_MsgInitPeriodicLockingAccountResponse = File_cosmos_accounts_defaults_lockup_tx_proto.Messages().ByName("MsgInitPeriodicLockingAccountResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgInitPeriodicLockingAccountResponse)(nil) + +type fastReflection_MsgInitPeriodicLockingAccountResponse MsgInitPeriodicLockingAccountResponse + +func (x *MsgInitPeriodicLockingAccountResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgInitPeriodicLockingAccountResponse)(x) +} + +func (x *MsgInitPeriodicLockingAccountResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_accounts_defaults_lockup_tx_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) +} + +var _fastReflection_MsgInitPeriodicLockingAccountResponse_messageType fastReflection_MsgInitPeriodicLockingAccountResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgInitPeriodicLockingAccountResponse_messageType{} + +type fastReflection_MsgInitPeriodicLockingAccountResponse_messageType struct{} + +func (x fastReflection_MsgInitPeriodicLockingAccountResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgInitPeriodicLockingAccountResponse)(nil) +} +func (x fastReflection_MsgInitPeriodicLockingAccountResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgInitPeriodicLockingAccountResponse) +} +func (x fastReflection_MsgInitPeriodicLockingAccountResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgInitPeriodicLockingAccountResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgInitPeriodicLockingAccountResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgInitPeriodicLockingAccountResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgInitPeriodicLockingAccountResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgInitPeriodicLockingAccountResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgInitPeriodicLockingAccountResponse) New() protoreflect.Message { + return new(fastReflection_MsgInitPeriodicLockingAccountResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgInitPeriodicLockingAccountResponse) Interface() protoreflect.ProtoMessage { + return (*MsgInitPeriodicLockingAccountResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgInitPeriodicLockingAccountResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgInitPeriodicLockingAccountResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.MsgInitPeriodicLockingAccountResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.MsgInitPeriodicLockingAccountResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgInitPeriodicLockingAccountResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.MsgInitPeriodicLockingAccountResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.MsgInitPeriodicLockingAccountResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgInitPeriodicLockingAccountResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.MsgInitPeriodicLockingAccountResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.MsgInitPeriodicLockingAccountResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgInitPeriodicLockingAccountResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.MsgInitPeriodicLockingAccountResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.MsgInitPeriodicLockingAccountResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgInitPeriodicLockingAccountResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.MsgInitPeriodicLockingAccountResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.MsgInitPeriodicLockingAccountResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgInitPeriodicLockingAccountResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.MsgInitPeriodicLockingAccountResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.MsgInitPeriodicLockingAccountResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgInitPeriodicLockingAccountResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.accounts.defaults.lockup.MsgInitPeriodicLockingAccountResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgInitPeriodicLockingAccountResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgInitPeriodicLockingAccountResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgInitPeriodicLockingAccountResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgInitPeriodicLockingAccountResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgInitPeriodicLockingAccountResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgInitPeriodicLockingAccountResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgInitPeriodicLockingAccountResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgInitPeriodicLockingAccountResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgInitPeriodicLockingAccountResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgDelegate protoreflect.MessageDescriptor + fd_MsgDelegate_sender protoreflect.FieldDescriptor + fd_MsgDelegate_validator_address protoreflect.FieldDescriptor + fd_MsgDelegate_amount protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_accounts_defaults_lockup_tx_proto_init() + md_MsgDelegate = File_cosmos_accounts_defaults_lockup_tx_proto.Messages().ByName("MsgDelegate") + fd_MsgDelegate_sender = md_MsgDelegate.Fields().ByName("sender") + fd_MsgDelegate_validator_address = md_MsgDelegate.Fields().ByName("validator_address") + fd_MsgDelegate_amount = md_MsgDelegate.Fields().ByName("amount") +} + +var _ protoreflect.Message = (*fastReflection_MsgDelegate)(nil) + +type fastReflection_MsgDelegate MsgDelegate + +func (x *MsgDelegate) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgDelegate)(x) +} + +func (x *MsgDelegate) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_accounts_defaults_lockup_tx_proto_msgTypes[4] + 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) +} + +var _fastReflection_MsgDelegate_messageType fastReflection_MsgDelegate_messageType +var _ protoreflect.MessageType = fastReflection_MsgDelegate_messageType{} + +type fastReflection_MsgDelegate_messageType struct{} + +func (x fastReflection_MsgDelegate_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgDelegate)(nil) +} +func (x fastReflection_MsgDelegate_messageType) New() protoreflect.Message { + return new(fastReflection_MsgDelegate) +} +func (x fastReflection_MsgDelegate_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgDelegate +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgDelegate) Descriptor() protoreflect.MessageDescriptor { + return md_MsgDelegate +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgDelegate) Type() protoreflect.MessageType { + return _fastReflection_MsgDelegate_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgDelegate) New() protoreflect.Message { + return new(fastReflection_MsgDelegate) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgDelegate) Interface() protoreflect.ProtoMessage { + return (*MsgDelegate)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgDelegate) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Sender != "" { + value := protoreflect.ValueOfString(x.Sender) + if !f(fd_MsgDelegate_sender, value) { + return + } + } + if x.ValidatorAddress != "" { + value := protoreflect.ValueOfString(x.ValidatorAddress) + if !f(fd_MsgDelegate_validator_address, value) { + return + } + } + if x.Amount != nil { + value := protoreflect.ValueOfMessage(x.Amount.ProtoReflect()) + if !f(fd_MsgDelegate_amount, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgDelegate) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.accounts.defaults.lockup.MsgDelegate.sender": + return x.Sender != "" + case "cosmos.accounts.defaults.lockup.MsgDelegate.validator_address": + return x.ValidatorAddress != "" + case "cosmos.accounts.defaults.lockup.MsgDelegate.amount": + return x.Amount != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.MsgDelegate")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.MsgDelegate does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgDelegate) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.accounts.defaults.lockup.MsgDelegate.sender": + x.Sender = "" + case "cosmos.accounts.defaults.lockup.MsgDelegate.validator_address": + x.ValidatorAddress = "" + case "cosmos.accounts.defaults.lockup.MsgDelegate.amount": + x.Amount = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.MsgDelegate")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.MsgDelegate does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgDelegate) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.accounts.defaults.lockup.MsgDelegate.sender": + value := x.Sender + return protoreflect.ValueOfString(value) + case "cosmos.accounts.defaults.lockup.MsgDelegate.validator_address": + value := x.ValidatorAddress + return protoreflect.ValueOfString(value) + case "cosmos.accounts.defaults.lockup.MsgDelegate.amount": + value := x.Amount + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.MsgDelegate")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.MsgDelegate does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgDelegate) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.accounts.defaults.lockup.MsgDelegate.sender": + x.Sender = value.Interface().(string) + case "cosmos.accounts.defaults.lockup.MsgDelegate.validator_address": + x.ValidatorAddress = value.Interface().(string) + case "cosmos.accounts.defaults.lockup.MsgDelegate.amount": + x.Amount = value.Message().Interface().(*v1beta1.Coin) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.MsgDelegate")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.MsgDelegate does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgDelegate) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.accounts.defaults.lockup.MsgDelegate.amount": + if x.Amount == nil { + x.Amount = new(v1beta1.Coin) + } + return protoreflect.ValueOfMessage(x.Amount.ProtoReflect()) + case "cosmos.accounts.defaults.lockup.MsgDelegate.sender": + panic(fmt.Errorf("field sender of message cosmos.accounts.defaults.lockup.MsgDelegate is not mutable")) + case "cosmos.accounts.defaults.lockup.MsgDelegate.validator_address": + panic(fmt.Errorf("field validator_address of message cosmos.accounts.defaults.lockup.MsgDelegate is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.MsgDelegate")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.MsgDelegate does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgDelegate) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.accounts.defaults.lockup.MsgDelegate.sender": + return protoreflect.ValueOfString("") + case "cosmos.accounts.defaults.lockup.MsgDelegate.validator_address": + return protoreflect.ValueOfString("") + case "cosmos.accounts.defaults.lockup.MsgDelegate.amount": + m := new(v1beta1.Coin) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.MsgDelegate")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.MsgDelegate does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgDelegate) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.accounts.defaults.lockup.MsgDelegate", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgDelegate) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgDelegate) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgDelegate) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgDelegate) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgDelegate) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Sender) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.ValidatorAddress) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Amount != nil { + l = options.Size(x.Amount) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgDelegate) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Amount != nil { + encoded, err := options.Marshal(x.Amount) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x1a + } + if len(x.ValidatorAddress) > 0 { + i -= len(x.ValidatorAddress) + copy(dAtA[i:], x.ValidatorAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ValidatorAddress))) + i-- + dAtA[i] = 0x12 + } + if len(x.Sender) > 0 { + i -= len(x.Sender) + copy(dAtA[i:], x.Sender) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Sender))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgDelegate) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgDelegate: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgDelegate: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.ValidatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Amount == nil { + x.Amount = &v1beta1.Coin{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Amount); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgUndelegate protoreflect.MessageDescriptor + fd_MsgUndelegate_sender protoreflect.FieldDescriptor + fd_MsgUndelegate_validator_address protoreflect.FieldDescriptor + fd_MsgUndelegate_amount protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_accounts_defaults_lockup_tx_proto_init() + md_MsgUndelegate = File_cosmos_accounts_defaults_lockup_tx_proto.Messages().ByName("MsgUndelegate") + fd_MsgUndelegate_sender = md_MsgUndelegate.Fields().ByName("sender") + fd_MsgUndelegate_validator_address = md_MsgUndelegate.Fields().ByName("validator_address") + fd_MsgUndelegate_amount = md_MsgUndelegate.Fields().ByName("amount") +} + +var _ protoreflect.Message = (*fastReflection_MsgUndelegate)(nil) + +type fastReflection_MsgUndelegate MsgUndelegate + +func (x *MsgUndelegate) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgUndelegate)(x) +} + +func (x *MsgUndelegate) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_accounts_defaults_lockup_tx_proto_msgTypes[5] + 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) +} + +var _fastReflection_MsgUndelegate_messageType fastReflection_MsgUndelegate_messageType +var _ protoreflect.MessageType = fastReflection_MsgUndelegate_messageType{} + +type fastReflection_MsgUndelegate_messageType struct{} + +func (x fastReflection_MsgUndelegate_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgUndelegate)(nil) +} +func (x fastReflection_MsgUndelegate_messageType) New() protoreflect.Message { + return new(fastReflection_MsgUndelegate) +} +func (x fastReflection_MsgUndelegate_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUndelegate +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgUndelegate) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUndelegate +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgUndelegate) Type() protoreflect.MessageType { + return _fastReflection_MsgUndelegate_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgUndelegate) New() protoreflect.Message { + return new(fastReflection_MsgUndelegate) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgUndelegate) Interface() protoreflect.ProtoMessage { + return (*MsgUndelegate)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgUndelegate) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Sender != "" { + value := protoreflect.ValueOfString(x.Sender) + if !f(fd_MsgUndelegate_sender, value) { + return + } + } + if x.ValidatorAddress != "" { + value := protoreflect.ValueOfString(x.ValidatorAddress) + if !f(fd_MsgUndelegate_validator_address, value) { + return + } + } + if x.Amount != nil { + value := protoreflect.ValueOfMessage(x.Amount.ProtoReflect()) + if !f(fd_MsgUndelegate_amount, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgUndelegate) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.accounts.defaults.lockup.MsgUndelegate.sender": + return x.Sender != "" + case "cosmos.accounts.defaults.lockup.MsgUndelegate.validator_address": + return x.ValidatorAddress != "" + case "cosmos.accounts.defaults.lockup.MsgUndelegate.amount": + return x.Amount != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.MsgUndelegate")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.MsgUndelegate does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgUndelegate) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.accounts.defaults.lockup.MsgUndelegate.sender": + x.Sender = "" + case "cosmos.accounts.defaults.lockup.MsgUndelegate.validator_address": + x.ValidatorAddress = "" + case "cosmos.accounts.defaults.lockup.MsgUndelegate.amount": + x.Amount = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.MsgUndelegate")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.MsgUndelegate does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgUndelegate) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.accounts.defaults.lockup.MsgUndelegate.sender": + value := x.Sender + return protoreflect.ValueOfString(value) + case "cosmos.accounts.defaults.lockup.MsgUndelegate.validator_address": + value := x.ValidatorAddress + return protoreflect.ValueOfString(value) + case "cosmos.accounts.defaults.lockup.MsgUndelegate.amount": + value := x.Amount + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.MsgUndelegate")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.MsgUndelegate does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgUndelegate) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.accounts.defaults.lockup.MsgUndelegate.sender": + x.Sender = value.Interface().(string) + case "cosmos.accounts.defaults.lockup.MsgUndelegate.validator_address": + x.ValidatorAddress = value.Interface().(string) + case "cosmos.accounts.defaults.lockup.MsgUndelegate.amount": + x.Amount = value.Message().Interface().(*v1beta1.Coin) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.MsgUndelegate")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.MsgUndelegate does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgUndelegate) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.accounts.defaults.lockup.MsgUndelegate.amount": + if x.Amount == nil { + x.Amount = new(v1beta1.Coin) + } + return protoreflect.ValueOfMessage(x.Amount.ProtoReflect()) + case "cosmos.accounts.defaults.lockup.MsgUndelegate.sender": + panic(fmt.Errorf("field sender of message cosmos.accounts.defaults.lockup.MsgUndelegate is not mutable")) + case "cosmos.accounts.defaults.lockup.MsgUndelegate.validator_address": + panic(fmt.Errorf("field validator_address of message cosmos.accounts.defaults.lockup.MsgUndelegate is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.MsgUndelegate")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.MsgUndelegate does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgUndelegate) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.accounts.defaults.lockup.MsgUndelegate.sender": + return protoreflect.ValueOfString("") + case "cosmos.accounts.defaults.lockup.MsgUndelegate.validator_address": + return protoreflect.ValueOfString("") + case "cosmos.accounts.defaults.lockup.MsgUndelegate.amount": + m := new(v1beta1.Coin) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.MsgUndelegate")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.MsgUndelegate does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgUndelegate) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.accounts.defaults.lockup.MsgUndelegate", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgUndelegate) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgUndelegate) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgUndelegate) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgUndelegate) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgUndelegate) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Sender) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.ValidatorAddress) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Amount != nil { + l = options.Size(x.Amount) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgUndelegate) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Amount != nil { + encoded, err := options.Marshal(x.Amount) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x1a + } + if len(x.ValidatorAddress) > 0 { + i -= len(x.ValidatorAddress) + copy(dAtA[i:], x.ValidatorAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ValidatorAddress))) + i-- + dAtA[i] = 0x12 + } + if len(x.Sender) > 0 { + i -= len(x.Sender) + copy(dAtA[i:], x.Sender) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Sender))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgUndelegate) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUndelegate: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUndelegate: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.ValidatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Amount == nil { + x.Amount = &v1beta1.Coin{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Amount); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_MsgSend_3_list)(nil) + +type _MsgSend_3_list struct { + list *[]*v1beta1.Coin +} + +func (x *_MsgSend_3_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_MsgSend_3_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_MsgSend_3_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + (*x.list)[i] = concreteValue +} + +func (x *_MsgSend_3_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + *x.list = append(*x.list, concreteValue) +} + +func (x *_MsgSend_3_list) AppendMutable() protoreflect.Value { + v := new(v1beta1.Coin) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgSend_3_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_MsgSend_3_list) NewElement() protoreflect.Value { + v := new(v1beta1.Coin) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgSend_3_list) IsValid() bool { + return x.list != nil +} + +var ( + md_MsgSend protoreflect.MessageDescriptor + fd_MsgSend_sender protoreflect.FieldDescriptor + fd_MsgSend_to_address protoreflect.FieldDescriptor + fd_MsgSend_amount protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_accounts_defaults_lockup_tx_proto_init() + md_MsgSend = File_cosmos_accounts_defaults_lockup_tx_proto.Messages().ByName("MsgSend") + fd_MsgSend_sender = md_MsgSend.Fields().ByName("sender") + fd_MsgSend_to_address = md_MsgSend.Fields().ByName("to_address") + fd_MsgSend_amount = md_MsgSend.Fields().ByName("amount") +} + +var _ protoreflect.Message = (*fastReflection_MsgSend)(nil) + +type fastReflection_MsgSend MsgSend + +func (x *MsgSend) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgSend)(x) +} + +func (x *MsgSend) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_accounts_defaults_lockup_tx_proto_msgTypes[6] + 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) +} + +var _fastReflection_MsgSend_messageType fastReflection_MsgSend_messageType +var _ protoreflect.MessageType = fastReflection_MsgSend_messageType{} + +type fastReflection_MsgSend_messageType struct{} + +func (x fastReflection_MsgSend_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgSend)(nil) +} +func (x fastReflection_MsgSend_messageType) New() protoreflect.Message { + return new(fastReflection_MsgSend) +} +func (x fastReflection_MsgSend_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgSend +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgSend) Descriptor() protoreflect.MessageDescriptor { + return md_MsgSend +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgSend) Type() protoreflect.MessageType { + return _fastReflection_MsgSend_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgSend) New() protoreflect.Message { + return new(fastReflection_MsgSend) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgSend) Interface() protoreflect.ProtoMessage { + return (*MsgSend)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgSend) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Sender != "" { + value := protoreflect.ValueOfString(x.Sender) + if !f(fd_MsgSend_sender, value) { + return + } + } + if x.ToAddress != "" { + value := protoreflect.ValueOfString(x.ToAddress) + if !f(fd_MsgSend_to_address, value) { + return + } + } + if len(x.Amount) != 0 { + value := protoreflect.ValueOfList(&_MsgSend_3_list{list: &x.Amount}) + if !f(fd_MsgSend_amount, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgSend) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.accounts.defaults.lockup.MsgSend.sender": + return x.Sender != "" + case "cosmos.accounts.defaults.lockup.MsgSend.to_address": + return x.ToAddress != "" + case "cosmos.accounts.defaults.lockup.MsgSend.amount": + return len(x.Amount) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.MsgSend")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.MsgSend does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgSend) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.accounts.defaults.lockup.MsgSend.sender": + x.Sender = "" + case "cosmos.accounts.defaults.lockup.MsgSend.to_address": + x.ToAddress = "" + case "cosmos.accounts.defaults.lockup.MsgSend.amount": + x.Amount = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.MsgSend")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.MsgSend does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgSend) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.accounts.defaults.lockup.MsgSend.sender": + value := x.Sender + return protoreflect.ValueOfString(value) + case "cosmos.accounts.defaults.lockup.MsgSend.to_address": + value := x.ToAddress + return protoreflect.ValueOfString(value) + case "cosmos.accounts.defaults.lockup.MsgSend.amount": + if len(x.Amount) == 0 { + return protoreflect.ValueOfList(&_MsgSend_3_list{}) + } + listValue := &_MsgSend_3_list{list: &x.Amount} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.MsgSend")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.MsgSend does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgSend) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.accounts.defaults.lockup.MsgSend.sender": + x.Sender = value.Interface().(string) + case "cosmos.accounts.defaults.lockup.MsgSend.to_address": + x.ToAddress = value.Interface().(string) + case "cosmos.accounts.defaults.lockup.MsgSend.amount": + lv := value.List() + clv := lv.(*_MsgSend_3_list) + x.Amount = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.MsgSend")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.MsgSend does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgSend) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.accounts.defaults.lockup.MsgSend.amount": + if x.Amount == nil { + x.Amount = []*v1beta1.Coin{} + } + value := &_MsgSend_3_list{list: &x.Amount} + return protoreflect.ValueOfList(value) + case "cosmos.accounts.defaults.lockup.MsgSend.sender": + panic(fmt.Errorf("field sender of message cosmos.accounts.defaults.lockup.MsgSend is not mutable")) + case "cosmos.accounts.defaults.lockup.MsgSend.to_address": + panic(fmt.Errorf("field to_address of message cosmos.accounts.defaults.lockup.MsgSend is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.MsgSend")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.MsgSend does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgSend) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.accounts.defaults.lockup.MsgSend.sender": + return protoreflect.ValueOfString("") + case "cosmos.accounts.defaults.lockup.MsgSend.to_address": + return protoreflect.ValueOfString("") + case "cosmos.accounts.defaults.lockup.MsgSend.amount": + list := []*v1beta1.Coin{} + return protoreflect.ValueOfList(&_MsgSend_3_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.MsgSend")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.MsgSend does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgSend) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.accounts.defaults.lockup.MsgSend", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgSend) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgSend) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgSend) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgSend) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgSend) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Sender) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.ToAddress) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.Amount) > 0 { + for _, e := range x.Amount { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgSend) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Amount) > 0 { + for iNdEx := len(x.Amount) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Amount[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x1a + } + } + if len(x.ToAddress) > 0 { + i -= len(x.ToAddress) + copy(dAtA[i:], x.ToAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ToAddress))) + i-- + dAtA[i] = 0x12 + } + if len(x.Sender) > 0 { + i -= len(x.Sender) + copy(dAtA[i:], x.Sender) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Sender))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgSend) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSend: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSend: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ToAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.ToAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Amount = append(x.Amount, &v1beta1.Coin{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Amount[len(x.Amount)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_MsgExecuteMessagesResponse_1_list)(nil) + +type _MsgExecuteMessagesResponse_1_list struct { + list *[]*anypb.Any +} + +func (x *_MsgExecuteMessagesResponse_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_MsgExecuteMessagesResponse_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_MsgExecuteMessagesResponse_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*anypb.Any) + (*x.list)[i] = concreteValue +} + +func (x *_MsgExecuteMessagesResponse_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*anypb.Any) + *x.list = append(*x.list, concreteValue) +} + +func (x *_MsgExecuteMessagesResponse_1_list) AppendMutable() protoreflect.Value { + v := new(anypb.Any) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgExecuteMessagesResponse_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_MsgExecuteMessagesResponse_1_list) NewElement() protoreflect.Value { + v := new(anypb.Any) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgExecuteMessagesResponse_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_MsgExecuteMessagesResponse protoreflect.MessageDescriptor + fd_MsgExecuteMessagesResponse_responses protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_accounts_defaults_lockup_tx_proto_init() + md_MsgExecuteMessagesResponse = File_cosmos_accounts_defaults_lockup_tx_proto.Messages().ByName("MsgExecuteMessagesResponse") + fd_MsgExecuteMessagesResponse_responses = md_MsgExecuteMessagesResponse.Fields().ByName("responses") +} + +var _ protoreflect.Message = (*fastReflection_MsgExecuteMessagesResponse)(nil) + +type fastReflection_MsgExecuteMessagesResponse MsgExecuteMessagesResponse + +func (x *MsgExecuteMessagesResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgExecuteMessagesResponse)(x) +} + +func (x *MsgExecuteMessagesResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_accounts_defaults_lockup_tx_proto_msgTypes[7] + 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) +} + +var _fastReflection_MsgExecuteMessagesResponse_messageType fastReflection_MsgExecuteMessagesResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgExecuteMessagesResponse_messageType{} + +type fastReflection_MsgExecuteMessagesResponse_messageType struct{} + +func (x fastReflection_MsgExecuteMessagesResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgExecuteMessagesResponse)(nil) +} +func (x fastReflection_MsgExecuteMessagesResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgExecuteMessagesResponse) +} +func (x fastReflection_MsgExecuteMessagesResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgExecuteMessagesResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgExecuteMessagesResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgExecuteMessagesResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgExecuteMessagesResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgExecuteMessagesResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgExecuteMessagesResponse) New() protoreflect.Message { + return new(fastReflection_MsgExecuteMessagesResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgExecuteMessagesResponse) Interface() protoreflect.ProtoMessage { + return (*MsgExecuteMessagesResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgExecuteMessagesResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Responses) != 0 { + value := protoreflect.ValueOfList(&_MsgExecuteMessagesResponse_1_list{list: &x.Responses}) + if !f(fd_MsgExecuteMessagesResponse_responses, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgExecuteMessagesResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.accounts.defaults.lockup.MsgExecuteMessagesResponse.responses": + return len(x.Responses) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.MsgExecuteMessagesResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.MsgExecuteMessagesResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgExecuteMessagesResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.accounts.defaults.lockup.MsgExecuteMessagesResponse.responses": + x.Responses = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.MsgExecuteMessagesResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.MsgExecuteMessagesResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgExecuteMessagesResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.accounts.defaults.lockup.MsgExecuteMessagesResponse.responses": + if len(x.Responses) == 0 { + return protoreflect.ValueOfList(&_MsgExecuteMessagesResponse_1_list{}) + } + listValue := &_MsgExecuteMessagesResponse_1_list{list: &x.Responses} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.MsgExecuteMessagesResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.MsgExecuteMessagesResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgExecuteMessagesResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.accounts.defaults.lockup.MsgExecuteMessagesResponse.responses": + lv := value.List() + clv := lv.(*_MsgExecuteMessagesResponse_1_list) + x.Responses = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.MsgExecuteMessagesResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.MsgExecuteMessagesResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgExecuteMessagesResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.accounts.defaults.lockup.MsgExecuteMessagesResponse.responses": + if x.Responses == nil { + x.Responses = []*anypb.Any{} + } + value := &_MsgExecuteMessagesResponse_1_list{list: &x.Responses} + return protoreflect.ValueOfList(value) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.MsgExecuteMessagesResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.MsgExecuteMessagesResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgExecuteMessagesResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.accounts.defaults.lockup.MsgExecuteMessagesResponse.responses": + list := []*anypb.Any{} + return protoreflect.ValueOfList(&_MsgExecuteMessagesResponse_1_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.MsgExecuteMessagesResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.MsgExecuteMessagesResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgExecuteMessagesResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.accounts.defaults.lockup.MsgExecuteMessagesResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgExecuteMessagesResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgExecuteMessagesResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgExecuteMessagesResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgExecuteMessagesResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgExecuteMessagesResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if len(x.Responses) > 0 { + for _, e := range x.Responses { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgExecuteMessagesResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Responses) > 0 { + for iNdEx := len(x.Responses) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Responses[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgExecuteMessagesResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgExecuteMessagesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgExecuteMessagesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Responses", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Responses = append(x.Responses, &anypb.Any{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Responses[len(x.Responses)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_MsgWithdraw_3_list)(nil) + +type _MsgWithdraw_3_list struct { + list *[]string +} + +func (x *_MsgWithdraw_3_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_MsgWithdraw_3_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfString((*x.list)[i]) +} + +func (x *_MsgWithdraw_3_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_MsgWithdraw_3_list) Append(value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_MsgWithdraw_3_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message MsgWithdraw at list field Denoms as it is not of Message kind")) +} + +func (x *_MsgWithdraw_3_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_MsgWithdraw_3_list) NewElement() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_MsgWithdraw_3_list) IsValid() bool { + return x.list != nil +} + +var ( + md_MsgWithdraw protoreflect.MessageDescriptor + fd_MsgWithdraw_withdrawer protoreflect.FieldDescriptor + fd_MsgWithdraw_to_address protoreflect.FieldDescriptor + fd_MsgWithdraw_denoms protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_accounts_defaults_lockup_tx_proto_init() + md_MsgWithdraw = File_cosmos_accounts_defaults_lockup_tx_proto.Messages().ByName("MsgWithdraw") + fd_MsgWithdraw_withdrawer = md_MsgWithdraw.Fields().ByName("withdrawer") + fd_MsgWithdraw_to_address = md_MsgWithdraw.Fields().ByName("to_address") + fd_MsgWithdraw_denoms = md_MsgWithdraw.Fields().ByName("denoms") +} + +var _ protoreflect.Message = (*fastReflection_MsgWithdraw)(nil) + +type fastReflection_MsgWithdraw MsgWithdraw + +func (x *MsgWithdraw) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgWithdraw)(x) +} + +func (x *MsgWithdraw) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_accounts_defaults_lockup_tx_proto_msgTypes[8] + 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) +} + +var _fastReflection_MsgWithdraw_messageType fastReflection_MsgWithdraw_messageType +var _ protoreflect.MessageType = fastReflection_MsgWithdraw_messageType{} + +type fastReflection_MsgWithdraw_messageType struct{} + +func (x fastReflection_MsgWithdraw_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgWithdraw)(nil) +} +func (x fastReflection_MsgWithdraw_messageType) New() protoreflect.Message { + return new(fastReflection_MsgWithdraw) +} +func (x fastReflection_MsgWithdraw_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgWithdraw +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgWithdraw) Descriptor() protoreflect.MessageDescriptor { + return md_MsgWithdraw +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgWithdraw) Type() protoreflect.MessageType { + return _fastReflection_MsgWithdraw_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgWithdraw) New() protoreflect.Message { + return new(fastReflection_MsgWithdraw) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgWithdraw) Interface() protoreflect.ProtoMessage { + return (*MsgWithdraw)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgWithdraw) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Withdrawer != "" { + value := protoreflect.ValueOfString(x.Withdrawer) + if !f(fd_MsgWithdraw_withdrawer, value) { + return + } + } + if x.ToAddress != "" { + value := protoreflect.ValueOfString(x.ToAddress) + if !f(fd_MsgWithdraw_to_address, value) { + return + } + } + if len(x.Denoms) != 0 { + value := protoreflect.ValueOfList(&_MsgWithdraw_3_list{list: &x.Denoms}) + if !f(fd_MsgWithdraw_denoms, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgWithdraw) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.accounts.defaults.lockup.MsgWithdraw.withdrawer": + return x.Withdrawer != "" + case "cosmos.accounts.defaults.lockup.MsgWithdraw.to_address": + return x.ToAddress != "" + case "cosmos.accounts.defaults.lockup.MsgWithdraw.denoms": + return len(x.Denoms) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.MsgWithdraw")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.MsgWithdraw does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgWithdraw) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.accounts.defaults.lockup.MsgWithdraw.withdrawer": + x.Withdrawer = "" + case "cosmos.accounts.defaults.lockup.MsgWithdraw.to_address": + x.ToAddress = "" + case "cosmos.accounts.defaults.lockup.MsgWithdraw.denoms": + x.Denoms = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.MsgWithdraw")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.MsgWithdraw does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgWithdraw) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.accounts.defaults.lockup.MsgWithdraw.withdrawer": + value := x.Withdrawer + return protoreflect.ValueOfString(value) + case "cosmos.accounts.defaults.lockup.MsgWithdraw.to_address": + value := x.ToAddress + return protoreflect.ValueOfString(value) + case "cosmos.accounts.defaults.lockup.MsgWithdraw.denoms": + if len(x.Denoms) == 0 { + return protoreflect.ValueOfList(&_MsgWithdraw_3_list{}) + } + listValue := &_MsgWithdraw_3_list{list: &x.Denoms} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.MsgWithdraw")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.MsgWithdraw does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgWithdraw) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.accounts.defaults.lockup.MsgWithdraw.withdrawer": + x.Withdrawer = value.Interface().(string) + case "cosmos.accounts.defaults.lockup.MsgWithdraw.to_address": + x.ToAddress = value.Interface().(string) + case "cosmos.accounts.defaults.lockup.MsgWithdraw.denoms": + lv := value.List() + clv := lv.(*_MsgWithdraw_3_list) + x.Denoms = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.MsgWithdraw")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.MsgWithdraw does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgWithdraw) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.accounts.defaults.lockup.MsgWithdraw.denoms": + if x.Denoms == nil { + x.Denoms = []string{} + } + value := &_MsgWithdraw_3_list{list: &x.Denoms} + return protoreflect.ValueOfList(value) + case "cosmos.accounts.defaults.lockup.MsgWithdraw.withdrawer": + panic(fmt.Errorf("field withdrawer of message cosmos.accounts.defaults.lockup.MsgWithdraw is not mutable")) + case "cosmos.accounts.defaults.lockup.MsgWithdraw.to_address": + panic(fmt.Errorf("field to_address of message cosmos.accounts.defaults.lockup.MsgWithdraw is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.MsgWithdraw")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.MsgWithdraw does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgWithdraw) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.accounts.defaults.lockup.MsgWithdraw.withdrawer": + return protoreflect.ValueOfString("") + case "cosmos.accounts.defaults.lockup.MsgWithdraw.to_address": + return protoreflect.ValueOfString("") + case "cosmos.accounts.defaults.lockup.MsgWithdraw.denoms": + list := []string{} + return protoreflect.ValueOfList(&_MsgWithdraw_3_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.MsgWithdraw")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.MsgWithdraw does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgWithdraw) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.accounts.defaults.lockup.MsgWithdraw", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgWithdraw) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgWithdraw) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgWithdraw) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgWithdraw) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgWithdraw) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Withdrawer) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.ToAddress) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.Denoms) > 0 { + for _, s := range x.Denoms { + l = len(s) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgWithdraw) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Denoms) > 0 { + for iNdEx := len(x.Denoms) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.Denoms[iNdEx]) + copy(dAtA[i:], x.Denoms[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Denoms[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } + if len(x.ToAddress) > 0 { + i -= len(x.ToAddress) + copy(dAtA[i:], x.ToAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ToAddress))) + i-- + dAtA[i] = 0x12 + } + if len(x.Withdrawer) > 0 { + i -= len(x.Withdrawer) + copy(dAtA[i:], x.Withdrawer) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Withdrawer))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgWithdraw) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgWithdraw: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgWithdraw: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Withdrawer", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Withdrawer = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ToAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.ToAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Denoms", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Denoms = append(x.Denoms, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_MsgWithdrawResponse_2_list)(nil) + +type _MsgWithdrawResponse_2_list struct { + list *[]*v1beta1.Coin +} + +func (x *_MsgWithdrawResponse_2_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_MsgWithdrawResponse_2_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_MsgWithdrawResponse_2_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + (*x.list)[i] = concreteValue +} + +func (x *_MsgWithdrawResponse_2_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + *x.list = append(*x.list, concreteValue) +} + +func (x *_MsgWithdrawResponse_2_list) AppendMutable() protoreflect.Value { + v := new(v1beta1.Coin) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgWithdrawResponse_2_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_MsgWithdrawResponse_2_list) NewElement() protoreflect.Value { + v := new(v1beta1.Coin) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgWithdrawResponse_2_list) IsValid() bool { + return x.list != nil +} + +var ( + md_MsgWithdrawResponse protoreflect.MessageDescriptor + fd_MsgWithdrawResponse_reciever protoreflect.FieldDescriptor + fd_MsgWithdrawResponse_amount_received protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_accounts_defaults_lockup_tx_proto_init() + md_MsgWithdrawResponse = File_cosmos_accounts_defaults_lockup_tx_proto.Messages().ByName("MsgWithdrawResponse") + fd_MsgWithdrawResponse_reciever = md_MsgWithdrawResponse.Fields().ByName("reciever") + fd_MsgWithdrawResponse_amount_received = md_MsgWithdrawResponse.Fields().ByName("amount_received") +} + +var _ protoreflect.Message = (*fastReflection_MsgWithdrawResponse)(nil) + +type fastReflection_MsgWithdrawResponse MsgWithdrawResponse + +func (x *MsgWithdrawResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgWithdrawResponse)(x) +} + +func (x *MsgWithdrawResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_accounts_defaults_lockup_tx_proto_msgTypes[9] + 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) +} + +var _fastReflection_MsgWithdrawResponse_messageType fastReflection_MsgWithdrawResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgWithdrawResponse_messageType{} + +type fastReflection_MsgWithdrawResponse_messageType struct{} + +func (x fastReflection_MsgWithdrawResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgWithdrawResponse)(nil) +} +func (x fastReflection_MsgWithdrawResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgWithdrawResponse) +} +func (x fastReflection_MsgWithdrawResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgWithdrawResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgWithdrawResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgWithdrawResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgWithdrawResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgWithdrawResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgWithdrawResponse) New() protoreflect.Message { + return new(fastReflection_MsgWithdrawResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgWithdrawResponse) Interface() protoreflect.ProtoMessage { + return (*MsgWithdrawResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgWithdrawResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Reciever != "" { + value := protoreflect.ValueOfString(x.Reciever) + if !f(fd_MsgWithdrawResponse_reciever, value) { + return + } + } + if len(x.AmountReceived) != 0 { + value := protoreflect.ValueOfList(&_MsgWithdrawResponse_2_list{list: &x.AmountReceived}) + if !f(fd_MsgWithdrawResponse_amount_received, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgWithdrawResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.accounts.defaults.lockup.MsgWithdrawResponse.reciever": + return x.Reciever != "" + case "cosmos.accounts.defaults.lockup.MsgWithdrawResponse.amount_received": + return len(x.AmountReceived) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.MsgWithdrawResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.MsgWithdrawResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgWithdrawResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.accounts.defaults.lockup.MsgWithdrawResponse.reciever": + x.Reciever = "" + case "cosmos.accounts.defaults.lockup.MsgWithdrawResponse.amount_received": + x.AmountReceived = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.MsgWithdrawResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.MsgWithdrawResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgWithdrawResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.accounts.defaults.lockup.MsgWithdrawResponse.reciever": + value := x.Reciever + return protoreflect.ValueOfString(value) + case "cosmos.accounts.defaults.lockup.MsgWithdrawResponse.amount_received": + if len(x.AmountReceived) == 0 { + return protoreflect.ValueOfList(&_MsgWithdrawResponse_2_list{}) + } + listValue := &_MsgWithdrawResponse_2_list{list: &x.AmountReceived} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.MsgWithdrawResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.MsgWithdrawResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgWithdrawResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.accounts.defaults.lockup.MsgWithdrawResponse.reciever": + x.Reciever = value.Interface().(string) + case "cosmos.accounts.defaults.lockup.MsgWithdrawResponse.amount_received": + lv := value.List() + clv := lv.(*_MsgWithdrawResponse_2_list) + x.AmountReceived = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.MsgWithdrawResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.MsgWithdrawResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgWithdrawResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.accounts.defaults.lockup.MsgWithdrawResponse.amount_received": + if x.AmountReceived == nil { + x.AmountReceived = []*v1beta1.Coin{} + } + value := &_MsgWithdrawResponse_2_list{list: &x.AmountReceived} + return protoreflect.ValueOfList(value) + case "cosmos.accounts.defaults.lockup.MsgWithdrawResponse.reciever": + panic(fmt.Errorf("field reciever of message cosmos.accounts.defaults.lockup.MsgWithdrawResponse is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.MsgWithdrawResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.MsgWithdrawResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgWithdrawResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.accounts.defaults.lockup.MsgWithdrawResponse.reciever": + return protoreflect.ValueOfString("") + case "cosmos.accounts.defaults.lockup.MsgWithdrawResponse.amount_received": + list := []*v1beta1.Coin{} + return protoreflect.ValueOfList(&_MsgWithdrawResponse_2_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.MsgWithdrawResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.MsgWithdrawResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgWithdrawResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.accounts.defaults.lockup.MsgWithdrawResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgWithdrawResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgWithdrawResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgWithdrawResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgWithdrawResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgWithdrawResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Reciever) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.AmountReceived) > 0 { + for _, e := range x.AmountReceived { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgWithdrawResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.AmountReceived) > 0 { + for iNdEx := len(x.AmountReceived) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.AmountReceived[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + } + if len(x.Reciever) > 0 { + i -= len(x.Reciever) + copy(dAtA[i:], x.Reciever) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Reciever))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgWithdrawResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgWithdrawResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgWithdrawResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Reciever", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Reciever = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AmountReceived", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.AmountReceived = append(x.AmountReceived, &v1beta1.Coin{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.AmountReceived[len(x.AmountReceived)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: cosmos/accounts/defaults/lockup/tx.proto + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// MsgInitLockupAccount defines a message that enables creating a lockup +// account. +type MsgInitLockupAccount struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // owner of the vesting account + Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"` + // end of lockup + EndTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` + // start of lockup + StartTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` +} + +func (x *MsgInitLockupAccount) Reset() { + *x = MsgInitLockupAccount{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_accounts_defaults_lockup_tx_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgInitLockupAccount) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgInitLockupAccount) ProtoMessage() {} + +// Deprecated: Use MsgInitLockupAccount.ProtoReflect.Descriptor instead. +func (*MsgInitLockupAccount) Descriptor() ([]byte, []int) { + return file_cosmos_accounts_defaults_lockup_tx_proto_rawDescGZIP(), []int{0} +} + +func (x *MsgInitLockupAccount) GetOwner() string { + if x != nil { + return x.Owner + } + return "" +} + +func (x *MsgInitLockupAccount) GetEndTime() *timestamppb.Timestamp { + if x != nil { + return x.EndTime + } + return nil +} + +func (x *MsgInitLockupAccount) GetStartTime() *timestamppb.Timestamp { + if x != nil { + return x.StartTime + } + return nil +} + +// MsgInitLockupAccountResponse defines the Msg/InitLockupAccount response type. +type MsgInitLockupAccountResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgInitLockupAccountResponse) Reset() { + *x = MsgInitLockupAccountResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_accounts_defaults_lockup_tx_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgInitLockupAccountResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgInitLockupAccountResponse) ProtoMessage() {} + +// Deprecated: Use MsgInitLockupAccountResponse.ProtoReflect.Descriptor instead. +func (*MsgInitLockupAccountResponse) Descriptor() ([]byte, []int) { + return file_cosmos_accounts_defaults_lockup_tx_proto_rawDescGZIP(), []int{1} +} + +// MsgInitPeriodicLockingAccount defines a message that enables creating a periodic locking +// account. +type MsgInitPeriodicLockingAccount struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // owner of the lockup account + Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"` + // start of lockup + StartTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` + LockingPeriods []*Period `protobuf:"bytes,3,rep,name=locking_periods,json=lockingPeriods,proto3" json:"locking_periods,omitempty"` +} + +func (x *MsgInitPeriodicLockingAccount) Reset() { + *x = MsgInitPeriodicLockingAccount{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_accounts_defaults_lockup_tx_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgInitPeriodicLockingAccount) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgInitPeriodicLockingAccount) ProtoMessage() {} + +// Deprecated: Use MsgInitPeriodicLockingAccount.ProtoReflect.Descriptor instead. +func (*MsgInitPeriodicLockingAccount) Descriptor() ([]byte, []int) { + return file_cosmos_accounts_defaults_lockup_tx_proto_rawDescGZIP(), []int{2} +} + +func (x *MsgInitPeriodicLockingAccount) GetOwner() string { + if x != nil { + return x.Owner + } + return "" +} + +func (x *MsgInitPeriodicLockingAccount) GetStartTime() *timestamppb.Timestamp { + if x != nil { + return x.StartTime + } + return nil +} + +func (x *MsgInitPeriodicLockingAccount) GetLockingPeriods() []*Period { + if x != nil { + return x.LockingPeriods + } + return nil +} + +// MsgInitPeriodicLockingAccountResponse defines the Msg/InitPeriodicLockingAccount +// response type. +type MsgInitPeriodicLockingAccountResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgInitPeriodicLockingAccountResponse) Reset() { + *x = MsgInitPeriodicLockingAccountResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_accounts_defaults_lockup_tx_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgInitPeriodicLockingAccountResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgInitPeriodicLockingAccountResponse) ProtoMessage() {} + +// Deprecated: Use MsgInitPeriodicLockingAccountResponse.ProtoReflect.Descriptor instead. +func (*MsgInitPeriodicLockingAccountResponse) Descriptor() ([]byte, []int) { + return file_cosmos_accounts_defaults_lockup_tx_proto_rawDescGZIP(), []int{3} +} + +// MsgDelegate defines a message that enable lockup account to execute delegate message +type MsgDelegate struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // sender is the owner of the lockup account + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` + Amount *v1beta1.Coin `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount,omitempty"` +} + +func (x *MsgDelegate) Reset() { + *x = MsgDelegate{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_accounts_defaults_lockup_tx_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgDelegate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgDelegate) ProtoMessage() {} + +// Deprecated: Use MsgDelegate.ProtoReflect.Descriptor instead. +func (*MsgDelegate) Descriptor() ([]byte, []int) { + return file_cosmos_accounts_defaults_lockup_tx_proto_rawDescGZIP(), []int{4} +} + +func (x *MsgDelegate) GetSender() string { + if x != nil { + return x.Sender + } + return "" +} + +func (x *MsgDelegate) GetValidatorAddress() string { + if x != nil { + return x.ValidatorAddress + } + return "" +} + +func (x *MsgDelegate) GetAmount() *v1beta1.Coin { + if x != nil { + return x.Amount + } + return nil +} + +// MsgUndelegate defines a message that enable lockup account to execute undelegate message +type MsgUndelegate struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` + Amount *v1beta1.Coin `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount,omitempty"` +} + +func (x *MsgUndelegate) Reset() { + *x = MsgUndelegate{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_accounts_defaults_lockup_tx_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgUndelegate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgUndelegate) ProtoMessage() {} + +// Deprecated: Use MsgUndelegate.ProtoReflect.Descriptor instead. +func (*MsgUndelegate) Descriptor() ([]byte, []int) { + return file_cosmos_accounts_defaults_lockup_tx_proto_rawDescGZIP(), []int{5} +} + +func (x *MsgUndelegate) GetSender() string { + if x != nil { + return x.Sender + } + return "" +} + +func (x *MsgUndelegate) GetValidatorAddress() string { + if x != nil { + return x.ValidatorAddress + } + return "" +} + +func (x *MsgUndelegate) GetAmount() *v1beta1.Coin { + if x != nil { + return x.Amount + } + return nil +} + +// MsgSend defines a message that enable lockup account to execute send message +type MsgSend struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + ToAddress string `protobuf:"bytes,2,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"` + Amount []*v1beta1.Coin `protobuf:"bytes,3,rep,name=amount,proto3" json:"amount,omitempty"` +} + +func (x *MsgSend) Reset() { + *x = MsgSend{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_accounts_defaults_lockup_tx_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgSend) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgSend) ProtoMessage() {} + +// Deprecated: Use MsgSend.ProtoReflect.Descriptor instead. +func (*MsgSend) Descriptor() ([]byte, []int) { + return file_cosmos_accounts_defaults_lockup_tx_proto_rawDescGZIP(), []int{6} +} + +func (x *MsgSend) GetSender() string { + if x != nil { + return x.Sender + } + return "" +} + +func (x *MsgSend) GetToAddress() string { + if x != nil { + return x.ToAddress + } + return "" +} + +func (x *MsgSend) GetAmount() []*v1beta1.Coin { + if x != nil { + return x.Amount + } + return nil +} + +// MsgExecuteMessagesResponse defines the response for lockup execute operations +type MsgExecuteMessagesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Responses []*anypb.Any `protobuf:"bytes,1,rep,name=responses,proto3" json:"responses,omitempty"` +} + +func (x *MsgExecuteMessagesResponse) Reset() { + *x = MsgExecuteMessagesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_accounts_defaults_lockup_tx_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgExecuteMessagesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgExecuteMessagesResponse) ProtoMessage() {} + +// Deprecated: Use MsgExecuteMessagesResponse.ProtoReflect.Descriptor instead. +func (*MsgExecuteMessagesResponse) Descriptor() ([]byte, []int) { + return file_cosmos_accounts_defaults_lockup_tx_proto_rawDescGZIP(), []int{7} +} + +func (x *MsgExecuteMessagesResponse) GetResponses() []*anypb.Any { + if x != nil { + return x.Responses + } + return nil +} + +// MsgWithdraw defines a message that the owner of the lockup can perform to withdraw unlocked token to an account of +// choice +type MsgWithdraw struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Withdrawer string `protobuf:"bytes,1,opt,name=withdrawer,proto3" json:"withdrawer,omitempty"` + ToAddress string `protobuf:"bytes,2,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"` + Denoms []string `protobuf:"bytes,3,rep,name=denoms,proto3" json:"denoms,omitempty"` +} + +func (x *MsgWithdraw) Reset() { + *x = MsgWithdraw{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_accounts_defaults_lockup_tx_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgWithdraw) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgWithdraw) ProtoMessage() {} + +// Deprecated: Use MsgWithdraw.ProtoReflect.Descriptor instead. +func (*MsgWithdraw) Descriptor() ([]byte, []int) { + return file_cosmos_accounts_defaults_lockup_tx_proto_rawDescGZIP(), []int{8} +} + +func (x *MsgWithdraw) GetWithdrawer() string { + if x != nil { + return x.Withdrawer + } + return "" +} + +func (x *MsgWithdraw) GetToAddress() string { + if x != nil { + return x.ToAddress + } + return "" +} + +func (x *MsgWithdraw) GetDenoms() []string { + if x != nil { + return x.Denoms + } + return nil +} + +// MsgWithdrawResponse defines the response for MsgWithdraw +type MsgWithdrawResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Reciever string `protobuf:"bytes,1,opt,name=reciever,proto3" json:"reciever,omitempty"` + AmountReceived []*v1beta1.Coin `protobuf:"bytes,2,rep,name=amount_received,json=amountReceived,proto3" json:"amount_received,omitempty"` +} + +func (x *MsgWithdrawResponse) Reset() { + *x = MsgWithdrawResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_accounts_defaults_lockup_tx_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgWithdrawResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgWithdrawResponse) ProtoMessage() {} + +// Deprecated: Use MsgWithdrawResponse.ProtoReflect.Descriptor instead. +func (*MsgWithdrawResponse) Descriptor() ([]byte, []int) { + return file_cosmos_accounts_defaults_lockup_tx_proto_rawDescGZIP(), []int{9} +} + +func (x *MsgWithdrawResponse) GetReciever() string { + if x != nil { + return x.Reciever + } + return "" +} + +func (x *MsgWithdrawResponse) GetAmountReceived() []*v1beta1.Coin { + if x != nil { + return x.AmountReceived + } + return nil +} + +var File_cosmos_accounts_defaults_lockup_tx_proto protoreflect.FileDescriptor + +var file_cosmos_accounts_defaults_lockup_tx_proto_rawDesc = []byte{ + 0x0a, 0x28, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x73, 0x2f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x2f, 0x6c, 0x6f, 0x63, 0x6b, 0x75, + 0x70, 0x2f, 0x74, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1f, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x64, 0x65, 0x66, 0x61, + 0x75, 0x6c, 0x74, 0x73, 0x2e, 0x6c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x1a, 0x11, 0x61, 0x6d, 0x69, + 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2c, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, + 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x2f, 0x6c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x2f, + 0x6c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x73, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x73, 0x67, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x22, 0x80, 0x02, 0x0a, 0x14, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x69, 0x74, 0x4c, 0x6f, + 0x63, 0x6b, 0x75, 0x70, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2e, 0x0a, 0x05, 0x6f, + 0x77, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, + 0x72, 0x69, 0x6e, 0x67, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x44, 0x0a, 0x08, 0x65, + 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x0d, 0xc8, 0xde, 0x1f, 0x00, 0x90, + 0xdf, 0x1f, 0x01, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, + 0x65, 0x12, 0x48, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x42, 0x0d, 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, + 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x3a, 0x28, 0xe8, 0xa0, 0x1f, + 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x1f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, + 0x2f, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x69, 0x74, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x1e, 0x0a, 0x1c, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x69, 0x74, + 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xa6, 0x02, 0x0a, 0x1d, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x69, + 0x74, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x69, 0x63, 0x4c, 0x6f, 0x63, 0x6b, 0x69, 0x6e, 0x67, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2e, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x48, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, + 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x0d, 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, + 0x01, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, + 0x65, 0x12, 0x5b, 0x0a, 0x0f, 0x6c, 0x6f, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, + 0x69, 0x6f, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x64, 0x65, 0x66, + 0x61, 0x75, 0x6c, 0x74, 0x73, 0x2e, 0x6c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x2e, 0x50, 0x65, 0x72, + 0x69, 0x6f, 0x64, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0e, + 0x6c, 0x6f, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x73, 0x3a, 0x2e, + 0xe8, 0xa0, 0x1f, 0x00, 0x8a, 0xe7, 0xb0, 0x2a, 0x25, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, + 0x73, 0x64, 0x6b, 0x2f, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x69, 0x74, 0x50, 0x65, 0x72, 0x69, 0x6f, + 0x64, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x27, + 0x0a, 0x25, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x69, 0x74, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x69, + 0x63, 0x4c, 0x6f, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xe2, 0x01, 0x0a, 0x0b, 0x4d, 0x73, 0x67, 0x44, + 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, + 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x4e, 0x0a, 0x11, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x21, 0xd2, 0xb4, 0x2d, 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x3c, 0x0a, 0x06, 0x61, 0x6d, 0x6f, + 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, + 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x13, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, + 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x22, 0xe4, 0x01, 0x0a, + 0x0d, 0x4d, 0x73, 0x67, 0x55, 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x12, 0x30, + 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, + 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, + 0x12, 0x4e, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x21, 0xd2, 0xb4, 0x2d, + 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x10, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x12, 0x3c, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x09, 0xc8, 0xde, 0x1f, + 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x13, + 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x65, 0x6e, + 0x64, 0x65, 0x72, 0x22, 0x84, 0x02, 0x0a, 0x07, 0x4d, 0x73, 0x67, 0x53, 0x65, 0x6e, 0x64, 0x12, + 0x30, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, + 0x72, 0x12, 0x37, 0x0a, 0x0a, 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, + 0x09, 0x74, 0x6f, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x79, 0x0a, 0x06, 0x61, 0x6d, + 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x46, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, + 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x9a, 0xe7, 0xb0, 0x2a, 0x0c, 0x6c, 0x65, 0x67, 0x61, + 0x63, 0x79, 0x5f, 0x63, 0x6f, 0x69, 0x6e, 0x73, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x61, + 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x13, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x82, + 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x22, 0x50, 0x0a, 0x1a, 0x4d, 0x73, + 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, + 0x79, 0x52, 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x22, 0xb1, 0x01, 0x0a, + 0x0b, 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x12, 0x38, 0x0a, 0x0a, + 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x0a, 0x77, 0x69, 0x74, 0x68, + 0x64, 0x72, 0x61, 0x77, 0x65, 0x72, 0x12, 0x37, 0x0a, 0x0a, 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, + 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x74, 0x6f, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, + 0x16, 0x0a, 0x06, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x06, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x73, 0x3a, 0x17, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, + 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x0a, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x65, 0x72, + 0x22, 0xd8, 0x01, 0x0a, 0x13, 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x08, 0x72, 0x65, 0x63, 0x69, + 0x65, 0x76, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, + 0x72, 0x69, 0x6e, 0x67, 0x52, 0x08, 0x72, 0x65, 0x63, 0x69, 0x65, 0x76, 0x65, 0x72, 0x12, 0x8a, + 0x01, 0x0a, 0x0f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, + 0x65, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, + 0x6f, 0x69, 0x6e, 0x42, 0x46, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, + 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x9a, 0xe7, 0xb0, 0x2a, 0x0c, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, + 0x5f, 0x63, 0x6f, 0x69, 0x6e, 0x73, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0e, 0x61, 0x6d, 0x6f, + 0x75, 0x6e, 0x74, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x42, 0x80, 0x02, 0x0a, 0x23, + 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x73, 0x2e, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x2e, 0x6c, 0x6f, 0x63, + 0x6b, 0x75, 0x70, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x30, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, + 0x2f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x2f, 0x6c, 0x6f, 0x63, 0x6b, 0x75, 0x70, + 0xa2, 0x02, 0x04, 0x43, 0x41, 0x44, 0x4c, 0xaa, 0x02, 0x1f, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, + 0x74, 0x73, 0x2e, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0xca, 0x02, 0x1f, 0x43, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x5c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x5c, 0x44, 0x65, 0x66, 0x61, + 0x75, 0x6c, 0x74, 0x73, 0x5c, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0xe2, 0x02, 0x2b, 0x43, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x5c, 0x44, 0x65, + 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x5c, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x5c, 0x47, 0x50, + 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x22, 0x43, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x3a, 0x3a, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x3a, 0x3a, 0x44, 0x65, + 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x3a, 0x3a, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_cosmos_accounts_defaults_lockup_tx_proto_rawDescOnce sync.Once + file_cosmos_accounts_defaults_lockup_tx_proto_rawDescData = file_cosmos_accounts_defaults_lockup_tx_proto_rawDesc +) + +func file_cosmos_accounts_defaults_lockup_tx_proto_rawDescGZIP() []byte { + file_cosmos_accounts_defaults_lockup_tx_proto_rawDescOnce.Do(func() { + file_cosmos_accounts_defaults_lockup_tx_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_accounts_defaults_lockup_tx_proto_rawDescData) + }) + return file_cosmos_accounts_defaults_lockup_tx_proto_rawDescData +} + +var file_cosmos_accounts_defaults_lockup_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 10) +var file_cosmos_accounts_defaults_lockup_tx_proto_goTypes = []interface{}{ + (*MsgInitLockupAccount)(nil), // 0: cosmos.accounts.defaults.lockup.MsgInitLockupAccount + (*MsgInitLockupAccountResponse)(nil), // 1: cosmos.accounts.defaults.lockup.MsgInitLockupAccountResponse + (*MsgInitPeriodicLockingAccount)(nil), // 2: cosmos.accounts.defaults.lockup.MsgInitPeriodicLockingAccount + (*MsgInitPeriodicLockingAccountResponse)(nil), // 3: cosmos.accounts.defaults.lockup.MsgInitPeriodicLockingAccountResponse + (*MsgDelegate)(nil), // 4: cosmos.accounts.defaults.lockup.MsgDelegate + (*MsgUndelegate)(nil), // 5: cosmos.accounts.defaults.lockup.MsgUndelegate + (*MsgSend)(nil), // 6: cosmos.accounts.defaults.lockup.MsgSend + (*MsgExecuteMessagesResponse)(nil), // 7: cosmos.accounts.defaults.lockup.MsgExecuteMessagesResponse + (*MsgWithdraw)(nil), // 8: cosmos.accounts.defaults.lockup.MsgWithdraw + (*MsgWithdrawResponse)(nil), // 9: cosmos.accounts.defaults.lockup.MsgWithdrawResponse + (*timestamppb.Timestamp)(nil), // 10: google.protobuf.Timestamp + (*Period)(nil), // 11: cosmos.accounts.defaults.lockup.Period + (*v1beta1.Coin)(nil), // 12: cosmos.base.v1beta1.Coin + (*anypb.Any)(nil), // 13: google.protobuf.Any +} +var file_cosmos_accounts_defaults_lockup_tx_proto_depIdxs = []int32{ + 10, // 0: cosmos.accounts.defaults.lockup.MsgInitLockupAccount.end_time:type_name -> google.protobuf.Timestamp + 10, // 1: cosmos.accounts.defaults.lockup.MsgInitLockupAccount.start_time:type_name -> google.protobuf.Timestamp + 10, // 2: cosmos.accounts.defaults.lockup.MsgInitPeriodicLockingAccount.start_time:type_name -> google.protobuf.Timestamp + 11, // 3: cosmos.accounts.defaults.lockup.MsgInitPeriodicLockingAccount.locking_periods:type_name -> cosmos.accounts.defaults.lockup.Period + 12, // 4: cosmos.accounts.defaults.lockup.MsgDelegate.amount:type_name -> cosmos.base.v1beta1.Coin + 12, // 5: cosmos.accounts.defaults.lockup.MsgUndelegate.amount:type_name -> cosmos.base.v1beta1.Coin + 12, // 6: cosmos.accounts.defaults.lockup.MsgSend.amount:type_name -> cosmos.base.v1beta1.Coin + 13, // 7: cosmos.accounts.defaults.lockup.MsgExecuteMessagesResponse.responses:type_name -> google.protobuf.Any + 12, // 8: cosmos.accounts.defaults.lockup.MsgWithdrawResponse.amount_received:type_name -> cosmos.base.v1beta1.Coin + 9, // [9:9] is the sub-list for method output_type + 9, // [9:9] is the sub-list for method input_type + 9, // [9:9] is the sub-list for extension type_name + 9, // [9:9] is the sub-list for extension extendee + 0, // [0:9] is the sub-list for field type_name +} + +func init() { file_cosmos_accounts_defaults_lockup_tx_proto_init() } +func file_cosmos_accounts_defaults_lockup_tx_proto_init() { + if File_cosmos_accounts_defaults_lockup_tx_proto != nil { + return + } + file_cosmos_accounts_defaults_lockup_lockup_proto_init() + if !protoimpl.UnsafeEnabled { + file_cosmos_accounts_defaults_lockup_tx_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgInitLockupAccount); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_accounts_defaults_lockup_tx_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgInitLockupAccountResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_accounts_defaults_lockup_tx_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgInitPeriodicLockingAccount); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_accounts_defaults_lockup_tx_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgInitPeriodicLockingAccountResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_accounts_defaults_lockup_tx_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgDelegate); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_accounts_defaults_lockup_tx_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgUndelegate); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_accounts_defaults_lockup_tx_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgSend); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_accounts_defaults_lockup_tx_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgExecuteMessagesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_accounts_defaults_lockup_tx_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgWithdraw); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_accounts_defaults_lockup_tx_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgWithdrawResponse); 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: file_cosmos_accounts_defaults_lockup_tx_proto_rawDesc, + NumEnums: 0, + NumMessages: 10, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_cosmos_accounts_defaults_lockup_tx_proto_goTypes, + DependencyIndexes: file_cosmos_accounts_defaults_lockup_tx_proto_depIdxs, + MessageInfos: file_cosmos_accounts_defaults_lockup_tx_proto_msgTypes, + }.Build() + File_cosmos_accounts_defaults_lockup_tx_proto = out.File + file_cosmos_accounts_defaults_lockup_tx_proto_rawDesc = nil + file_cosmos_accounts_defaults_lockup_tx_proto_goTypes = nil + file_cosmos_accounts_defaults_lockup_tx_proto_depIdxs = nil +} diff --git a/api/cosmos/lockup/lockup.pulsar.go b/api/cosmos/lockup/lockup.pulsar.go new file mode 100644 index 000000000000..d4caff540c05 --- /dev/null +++ b/api/cosmos/lockup/lockup.pulsar.go @@ -0,0 +1,752 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package lockup + +import ( + _ "cosmossdk.io/api/amino" + v1beta1 "cosmossdk.io/api/cosmos/base/v1beta1" + fmt "fmt" + runtime "github.com/cosmos/cosmos-proto/runtime" + _ "github.com/cosmos/gogoproto/gogoproto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoiface "google.golang.org/protobuf/runtime/protoiface" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + durationpb "google.golang.org/protobuf/types/known/durationpb" + io "io" + reflect "reflect" + sync "sync" +) + +var _ protoreflect.List = (*_Period_2_list)(nil) + +type _Period_2_list struct { + list *[]*v1beta1.Coin +} + +func (x *_Period_2_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_Period_2_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_Period_2_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + (*x.list)[i] = concreteValue +} + +func (x *_Period_2_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + *x.list = append(*x.list, concreteValue) +} + +func (x *_Period_2_list) AppendMutable() protoreflect.Value { + v := new(v1beta1.Coin) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_Period_2_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_Period_2_list) NewElement() protoreflect.Value { + v := new(v1beta1.Coin) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_Period_2_list) IsValid() bool { + return x.list != nil +} + +var ( + md_Period protoreflect.MessageDescriptor + fd_Period_length protoreflect.FieldDescriptor + fd_Period_amount protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_lockup_lockup_proto_init() + md_Period = File_cosmos_lockup_lockup_proto.Messages().ByName("Period") + fd_Period_length = md_Period.Fields().ByName("length") + fd_Period_amount = md_Period.Fields().ByName("amount") +} + +var _ protoreflect.Message = (*fastReflection_Period)(nil) + +type fastReflection_Period Period + +func (x *Period) ProtoReflect() protoreflect.Message { + return (*fastReflection_Period)(x) +} + +func (x *Period) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_lockup_lockup_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) +} + +var _fastReflection_Period_messageType fastReflection_Period_messageType +var _ protoreflect.MessageType = fastReflection_Period_messageType{} + +type fastReflection_Period_messageType struct{} + +func (x fastReflection_Period_messageType) Zero() protoreflect.Message { + return (*fastReflection_Period)(nil) +} +func (x fastReflection_Period_messageType) New() protoreflect.Message { + return new(fastReflection_Period) +} +func (x fastReflection_Period_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Period +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_Period) Descriptor() protoreflect.MessageDescriptor { + return md_Period +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_Period) Type() protoreflect.MessageType { + return _fastReflection_Period_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_Period) New() protoreflect.Message { + return new(fastReflection_Period) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_Period) Interface() protoreflect.ProtoMessage { + return (*Period)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_Period) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Length != nil { + value := protoreflect.ValueOfMessage(x.Length.ProtoReflect()) + if !f(fd_Period_length, value) { + return + } + } + if len(x.Amount) != 0 { + value := protoreflect.ValueOfList(&_Period_2_list{list: &x.Amount}) + if !f(fd_Period_amount, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_Period) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.lockup.Period.length": + return x.Length != nil + case "cosmos.lockup.Period.amount": + return len(x.Amount) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.Period")) + } + panic(fmt.Errorf("message cosmos.lockup.Period does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Period) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.lockup.Period.length": + x.Length = nil + case "cosmos.lockup.Period.amount": + x.Amount = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.Period")) + } + panic(fmt.Errorf("message cosmos.lockup.Period does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_Period) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.lockup.Period.length": + value := x.Length + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "cosmos.lockup.Period.amount": + if len(x.Amount) == 0 { + return protoreflect.ValueOfList(&_Period_2_list{}) + } + listValue := &_Period_2_list{list: &x.Amount} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.Period")) + } + panic(fmt.Errorf("message cosmos.lockup.Period does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Period) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.lockup.Period.length": + x.Length = value.Message().Interface().(*durationpb.Duration) + case "cosmos.lockup.Period.amount": + lv := value.List() + clv := lv.(*_Period_2_list) + x.Amount = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.Period")) + } + panic(fmt.Errorf("message cosmos.lockup.Period does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Period) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.lockup.Period.length": + if x.Length == nil { + x.Length = new(durationpb.Duration) + } + return protoreflect.ValueOfMessage(x.Length.ProtoReflect()) + case "cosmos.lockup.Period.amount": + if x.Amount == nil { + x.Amount = []*v1beta1.Coin{} + } + value := &_Period_2_list{list: &x.Amount} + return protoreflect.ValueOfList(value) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.Period")) + } + panic(fmt.Errorf("message cosmos.lockup.Period does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_Period) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.lockup.Period.length": + m := new(durationpb.Duration) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "cosmos.lockup.Period.amount": + list := []*v1beta1.Coin{} + return protoreflect.ValueOfList(&_Period_2_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.Period")) + } + panic(fmt.Errorf("message cosmos.lockup.Period does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_Period) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.lockup.Period", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_Period) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Period) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_Period) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_Period) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*Period) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.Length != nil { + l = options.Size(x.Length) + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.Amount) > 0 { + for _, e := range x.Amount { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*Period) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Amount) > 0 { + for iNdEx := len(x.Amount) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Amount[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + } + if x.Length != nil { + encoded, err := options.Marshal(x.Length) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*Period) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Period: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Period: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Length", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Length == nil { + x.Length = &durationpb.Duration{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Length); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Amount = append(x.Amount, &v1beta1.Coin{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Amount[len(x.Amount)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: cosmos/lockup/lockup.proto + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Period defines a length of time and amount of coins that will be lock. +type Period struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Period duration + Length *durationpb.Duration `protobuf:"bytes,1,opt,name=length,proto3" json:"length,omitempty"` + Amount []*v1beta1.Coin `protobuf:"bytes,2,rep,name=amount,proto3" json:"amount,omitempty"` +} + +func (x *Period) Reset() { + *x = Period{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_lockup_lockup_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Period) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Period) ProtoMessage() {} + +// Deprecated: Use Period.ProtoReflect.Descriptor instead. +func (*Period) Descriptor() ([]byte, []int) { + return file_cosmos_lockup_lockup_proto_rawDescGZIP(), []int{0} +} + +func (x *Period) GetLength() *durationpb.Duration { + if x != nil { + return x.Length + } + return nil +} + +func (x *Period) GetAmount() []*v1beta1.Coin { + if x != nil { + return x.Amount + } + return nil +} + +var File_cosmos_lockup_lockup_proto protoreflect.FileDescriptor + +var file_cosmos_lockup_lockup_proto_rawDesc = []byte{ + 0x0a, 0x1a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x2f, + 0x6c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x1a, 0x11, 0x61, 0x6d, 0x69, + 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, + 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc5, 0x01, 0x0a, 0x06, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, + 0x40, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0d, 0xc8, 0xde, 0x1f, 0x00, + 0x98, 0xdf, 0x1f, 0x01, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, + 0x68, 0x12, 0x79, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x46, 0xc8, 0xde, + 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, + 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x9a, 0xe7, + 0xb0, 0x2a, 0x0c, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x5f, 0x63, 0x6f, 0x69, 0x6e, 0x73, 0xa8, + 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x95, 0x01, 0x0a, + 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6c, 0x6f, 0x63, 0x6b, + 0x75, 0x70, 0x42, 0x0b, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6c, 0x6f, 0x63, 0x6b, 0x75, + 0x70, 0xa2, 0x02, 0x03, 0x43, 0x4c, 0x58, 0xaa, 0x02, 0x0d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0xca, 0x02, 0x0d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x5c, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0xe2, 0x02, 0x19, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x5c, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x4c, 0x6f, + 0x63, 0x6b, 0x75, 0x70, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_cosmos_lockup_lockup_proto_rawDescOnce sync.Once + file_cosmos_lockup_lockup_proto_rawDescData = file_cosmos_lockup_lockup_proto_rawDesc +) + +func file_cosmos_lockup_lockup_proto_rawDescGZIP() []byte { + file_cosmos_lockup_lockup_proto_rawDescOnce.Do(func() { + file_cosmos_lockup_lockup_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_lockup_lockup_proto_rawDescData) + }) + return file_cosmos_lockup_lockup_proto_rawDescData +} + +var file_cosmos_lockup_lockup_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_cosmos_lockup_lockup_proto_goTypes = []interface{}{ + (*Period)(nil), // 0: cosmos.lockup.Period + (*durationpb.Duration)(nil), // 1: google.protobuf.Duration + (*v1beta1.Coin)(nil), // 2: cosmos.base.v1beta1.Coin +} +var file_cosmos_lockup_lockup_proto_depIdxs = []int32{ + 1, // 0: cosmos.lockup.Period.length:type_name -> google.protobuf.Duration + 2, // 1: cosmos.lockup.Period.amount:type_name -> cosmos.base.v1beta1.Coin + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_cosmos_lockup_lockup_proto_init() } +func file_cosmos_lockup_lockup_proto_init() { + if File_cosmos_lockup_lockup_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_cosmos_lockup_lockup_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Period); 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: file_cosmos_lockup_lockup_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_cosmos_lockup_lockup_proto_goTypes, + DependencyIndexes: file_cosmos_lockup_lockup_proto_depIdxs, + MessageInfos: file_cosmos_lockup_lockup_proto_msgTypes, + }.Build() + File_cosmos_lockup_lockup_proto = out.File + file_cosmos_lockup_lockup_proto_rawDesc = nil + file_cosmos_lockup_lockup_proto_goTypes = nil + file_cosmos_lockup_lockup_proto_depIdxs = nil +} diff --git a/api/cosmos/lockup/query.pulsar.go b/api/cosmos/lockup/query.pulsar.go new file mode 100644 index 000000000000..385d923ef222 --- /dev/null +++ b/api/cosmos/lockup/query.pulsar.go @@ -0,0 +1,2891 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package lockup + +import ( + v1beta1 "cosmossdk.io/api/cosmos/base/v1beta1" + fmt "fmt" + runtime "github.com/cosmos/cosmos-proto/runtime" + _ "github.com/cosmos/gogoproto/gogoproto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoiface "google.golang.org/protobuf/runtime/protoiface" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + io "io" + reflect "reflect" + sync "sync" +) + +var ( + md_QueryLockupAccountInfoRequest protoreflect.MessageDescriptor +) + +func init() { + file_cosmos_lockup_query_proto_init() + md_QueryLockupAccountInfoRequest = File_cosmos_lockup_query_proto.Messages().ByName("QueryLockupAccountInfoRequest") +} + +var _ protoreflect.Message = (*fastReflection_QueryLockupAccountInfoRequest)(nil) + +type fastReflection_QueryLockupAccountInfoRequest QueryLockupAccountInfoRequest + +func (x *QueryLockupAccountInfoRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryLockupAccountInfoRequest)(x) +} + +func (x *QueryLockupAccountInfoRequest) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_lockup_query_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) +} + +var _fastReflection_QueryLockupAccountInfoRequest_messageType fastReflection_QueryLockupAccountInfoRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryLockupAccountInfoRequest_messageType{} + +type fastReflection_QueryLockupAccountInfoRequest_messageType struct{} + +func (x fastReflection_QueryLockupAccountInfoRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryLockupAccountInfoRequest)(nil) +} +func (x fastReflection_QueryLockupAccountInfoRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryLockupAccountInfoRequest) +} +func (x fastReflection_QueryLockupAccountInfoRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryLockupAccountInfoRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryLockupAccountInfoRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryLockupAccountInfoRequest +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryLockupAccountInfoRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryLockupAccountInfoRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryLockupAccountInfoRequest) New() protoreflect.Message { + return new(fastReflection_QueryLockupAccountInfoRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryLockupAccountInfoRequest) Interface() protoreflect.ProtoMessage { + return (*QueryLockupAccountInfoRequest)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryLockupAccountInfoRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryLockupAccountInfoRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.QueryLockupAccountInfoRequest")) + } + panic(fmt.Errorf("message cosmos.lockup.QueryLockupAccountInfoRequest does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryLockupAccountInfoRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.QueryLockupAccountInfoRequest")) + } + panic(fmt.Errorf("message cosmos.lockup.QueryLockupAccountInfoRequest does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryLockupAccountInfoRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.QueryLockupAccountInfoRequest")) + } + panic(fmt.Errorf("message cosmos.lockup.QueryLockupAccountInfoRequest does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryLockupAccountInfoRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.QueryLockupAccountInfoRequest")) + } + panic(fmt.Errorf("message cosmos.lockup.QueryLockupAccountInfoRequest does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryLockupAccountInfoRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.QueryLockupAccountInfoRequest")) + } + panic(fmt.Errorf("message cosmos.lockup.QueryLockupAccountInfoRequest does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryLockupAccountInfoRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.QueryLockupAccountInfoRequest")) + } + panic(fmt.Errorf("message cosmos.lockup.QueryLockupAccountInfoRequest does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryLockupAccountInfoRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.lockup.QueryLockupAccountInfoRequest", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryLockupAccountInfoRequest) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryLockupAccountInfoRequest) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryLockupAccountInfoRequest) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryLockupAccountInfoRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryLockupAccountInfoRequest) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryLockupAccountInfoRequest) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryLockupAccountInfoRequest) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryLockupAccountInfoRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryLockupAccountInfoRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_QueryLockupAccountInfoResponse_1_list)(nil) + +type _QueryLockupAccountInfoResponse_1_list struct { + list *[]*v1beta1.Coin +} + +func (x *_QueryLockupAccountInfoResponse_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_QueryLockupAccountInfoResponse_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_QueryLockupAccountInfoResponse_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + (*x.list)[i] = concreteValue +} + +func (x *_QueryLockupAccountInfoResponse_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + *x.list = append(*x.list, concreteValue) +} + +func (x *_QueryLockupAccountInfoResponse_1_list) AppendMutable() protoreflect.Value { + v := new(v1beta1.Coin) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryLockupAccountInfoResponse_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_QueryLockupAccountInfoResponse_1_list) NewElement() protoreflect.Value { + v := new(v1beta1.Coin) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryLockupAccountInfoResponse_1_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_QueryLockupAccountInfoResponse_2_list)(nil) + +type _QueryLockupAccountInfoResponse_2_list struct { + list *[]*v1beta1.Coin +} + +func (x *_QueryLockupAccountInfoResponse_2_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_QueryLockupAccountInfoResponse_2_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_QueryLockupAccountInfoResponse_2_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + (*x.list)[i] = concreteValue +} + +func (x *_QueryLockupAccountInfoResponse_2_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + *x.list = append(*x.list, concreteValue) +} + +func (x *_QueryLockupAccountInfoResponse_2_list) AppendMutable() protoreflect.Value { + v := new(v1beta1.Coin) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryLockupAccountInfoResponse_2_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_QueryLockupAccountInfoResponse_2_list) NewElement() protoreflect.Value { + v := new(v1beta1.Coin) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryLockupAccountInfoResponse_2_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_QueryLockupAccountInfoResponse_3_list)(nil) + +type _QueryLockupAccountInfoResponse_3_list struct { + list *[]*v1beta1.Coin +} + +func (x *_QueryLockupAccountInfoResponse_3_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_QueryLockupAccountInfoResponse_3_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_QueryLockupAccountInfoResponse_3_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + (*x.list)[i] = concreteValue +} + +func (x *_QueryLockupAccountInfoResponse_3_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + *x.list = append(*x.list, concreteValue) +} + +func (x *_QueryLockupAccountInfoResponse_3_list) AppendMutable() protoreflect.Value { + v := new(v1beta1.Coin) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryLockupAccountInfoResponse_3_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_QueryLockupAccountInfoResponse_3_list) NewElement() protoreflect.Value { + v := new(v1beta1.Coin) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryLockupAccountInfoResponse_3_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_QueryLockupAccountInfoResponse_6_list)(nil) + +type _QueryLockupAccountInfoResponse_6_list struct { + list *[]*v1beta1.Coin +} + +func (x *_QueryLockupAccountInfoResponse_6_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_QueryLockupAccountInfoResponse_6_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_QueryLockupAccountInfoResponse_6_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + (*x.list)[i] = concreteValue +} + +func (x *_QueryLockupAccountInfoResponse_6_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + *x.list = append(*x.list, concreteValue) +} + +func (x *_QueryLockupAccountInfoResponse_6_list) AppendMutable() protoreflect.Value { + v := new(v1beta1.Coin) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryLockupAccountInfoResponse_6_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_QueryLockupAccountInfoResponse_6_list) NewElement() protoreflect.Value { + v := new(v1beta1.Coin) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryLockupAccountInfoResponse_6_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_QueryLockupAccountInfoResponse_7_list)(nil) + +type _QueryLockupAccountInfoResponse_7_list struct { + list *[]*v1beta1.Coin +} + +func (x *_QueryLockupAccountInfoResponse_7_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_QueryLockupAccountInfoResponse_7_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_QueryLockupAccountInfoResponse_7_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + (*x.list)[i] = concreteValue +} + +func (x *_QueryLockupAccountInfoResponse_7_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + *x.list = append(*x.list, concreteValue) +} + +func (x *_QueryLockupAccountInfoResponse_7_list) AppendMutable() protoreflect.Value { + v := new(v1beta1.Coin) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryLockupAccountInfoResponse_7_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_QueryLockupAccountInfoResponse_7_list) NewElement() protoreflect.Value { + v := new(v1beta1.Coin) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryLockupAccountInfoResponse_7_list) IsValid() bool { + return x.list != nil +} + +var ( + md_QueryLockupAccountInfoResponse protoreflect.MessageDescriptor + fd_QueryLockupAccountInfoResponse_original_locking protoreflect.FieldDescriptor + fd_QueryLockupAccountInfoResponse_delegated_free protoreflect.FieldDescriptor + fd_QueryLockupAccountInfoResponse_delegated_locking protoreflect.FieldDescriptor + fd_QueryLockupAccountInfoResponse_start_time protoreflect.FieldDescriptor + fd_QueryLockupAccountInfoResponse_end_time protoreflect.FieldDescriptor + fd_QueryLockupAccountInfoResponse_locked_coins protoreflect.FieldDescriptor + fd_QueryLockupAccountInfoResponse_unlocked_coins protoreflect.FieldDescriptor + fd_QueryLockupAccountInfoResponse_owner protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_lockup_query_proto_init() + md_QueryLockupAccountInfoResponse = File_cosmos_lockup_query_proto.Messages().ByName("QueryLockupAccountInfoResponse") + fd_QueryLockupAccountInfoResponse_original_locking = md_QueryLockupAccountInfoResponse.Fields().ByName("original_locking") + fd_QueryLockupAccountInfoResponse_delegated_free = md_QueryLockupAccountInfoResponse.Fields().ByName("delegated_free") + fd_QueryLockupAccountInfoResponse_delegated_locking = md_QueryLockupAccountInfoResponse.Fields().ByName("delegated_locking") + fd_QueryLockupAccountInfoResponse_start_time = md_QueryLockupAccountInfoResponse.Fields().ByName("start_time") + fd_QueryLockupAccountInfoResponse_end_time = md_QueryLockupAccountInfoResponse.Fields().ByName("end_time") + fd_QueryLockupAccountInfoResponse_locked_coins = md_QueryLockupAccountInfoResponse.Fields().ByName("locked_coins") + fd_QueryLockupAccountInfoResponse_unlocked_coins = md_QueryLockupAccountInfoResponse.Fields().ByName("unlocked_coins") + fd_QueryLockupAccountInfoResponse_owner = md_QueryLockupAccountInfoResponse.Fields().ByName("owner") +} + +var _ protoreflect.Message = (*fastReflection_QueryLockupAccountInfoResponse)(nil) + +type fastReflection_QueryLockupAccountInfoResponse QueryLockupAccountInfoResponse + +func (x *QueryLockupAccountInfoResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryLockupAccountInfoResponse)(x) +} + +func (x *QueryLockupAccountInfoResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_lockup_query_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) +} + +var _fastReflection_QueryLockupAccountInfoResponse_messageType fastReflection_QueryLockupAccountInfoResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryLockupAccountInfoResponse_messageType{} + +type fastReflection_QueryLockupAccountInfoResponse_messageType struct{} + +func (x fastReflection_QueryLockupAccountInfoResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryLockupAccountInfoResponse)(nil) +} +func (x fastReflection_QueryLockupAccountInfoResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryLockupAccountInfoResponse) +} +func (x fastReflection_QueryLockupAccountInfoResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryLockupAccountInfoResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryLockupAccountInfoResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryLockupAccountInfoResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryLockupAccountInfoResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryLockupAccountInfoResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryLockupAccountInfoResponse) New() protoreflect.Message { + return new(fastReflection_QueryLockupAccountInfoResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryLockupAccountInfoResponse) Interface() protoreflect.ProtoMessage { + return (*QueryLockupAccountInfoResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryLockupAccountInfoResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.OriginalLocking) != 0 { + value := protoreflect.ValueOfList(&_QueryLockupAccountInfoResponse_1_list{list: &x.OriginalLocking}) + if !f(fd_QueryLockupAccountInfoResponse_original_locking, value) { + return + } + } + if len(x.DelegatedFree) != 0 { + value := protoreflect.ValueOfList(&_QueryLockupAccountInfoResponse_2_list{list: &x.DelegatedFree}) + if !f(fd_QueryLockupAccountInfoResponse_delegated_free, value) { + return + } + } + if len(x.DelegatedLocking) != 0 { + value := protoreflect.ValueOfList(&_QueryLockupAccountInfoResponse_3_list{list: &x.DelegatedLocking}) + if !f(fd_QueryLockupAccountInfoResponse_delegated_locking, value) { + return + } + } + if x.StartTime != nil { + value := protoreflect.ValueOfMessage(x.StartTime.ProtoReflect()) + if !f(fd_QueryLockupAccountInfoResponse_start_time, value) { + return + } + } + if x.EndTime != nil { + value := protoreflect.ValueOfMessage(x.EndTime.ProtoReflect()) + if !f(fd_QueryLockupAccountInfoResponse_end_time, value) { + return + } + } + if len(x.LockedCoins) != 0 { + value := protoreflect.ValueOfList(&_QueryLockupAccountInfoResponse_6_list{list: &x.LockedCoins}) + if !f(fd_QueryLockupAccountInfoResponse_locked_coins, value) { + return + } + } + if len(x.UnlockedCoins) != 0 { + value := protoreflect.ValueOfList(&_QueryLockupAccountInfoResponse_7_list{list: &x.UnlockedCoins}) + if !f(fd_QueryLockupAccountInfoResponse_unlocked_coins, value) { + return + } + } + if x.Owner != "" { + value := protoreflect.ValueOfString(x.Owner) + if !f(fd_QueryLockupAccountInfoResponse_owner, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryLockupAccountInfoResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.lockup.QueryLockupAccountInfoResponse.original_locking": + return len(x.OriginalLocking) != 0 + case "cosmos.lockup.QueryLockupAccountInfoResponse.delegated_free": + return len(x.DelegatedFree) != 0 + case "cosmos.lockup.QueryLockupAccountInfoResponse.delegated_locking": + return len(x.DelegatedLocking) != 0 + case "cosmos.lockup.QueryLockupAccountInfoResponse.start_time": + return x.StartTime != nil + case "cosmos.lockup.QueryLockupAccountInfoResponse.end_time": + return x.EndTime != nil + case "cosmos.lockup.QueryLockupAccountInfoResponse.locked_coins": + return len(x.LockedCoins) != 0 + case "cosmos.lockup.QueryLockupAccountInfoResponse.unlocked_coins": + return len(x.UnlockedCoins) != 0 + case "cosmos.lockup.QueryLockupAccountInfoResponse.owner": + return x.Owner != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.QueryLockupAccountInfoResponse")) + } + panic(fmt.Errorf("message cosmos.lockup.QueryLockupAccountInfoResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryLockupAccountInfoResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.lockup.QueryLockupAccountInfoResponse.original_locking": + x.OriginalLocking = nil + case "cosmos.lockup.QueryLockupAccountInfoResponse.delegated_free": + x.DelegatedFree = nil + case "cosmos.lockup.QueryLockupAccountInfoResponse.delegated_locking": + x.DelegatedLocking = nil + case "cosmos.lockup.QueryLockupAccountInfoResponse.start_time": + x.StartTime = nil + case "cosmos.lockup.QueryLockupAccountInfoResponse.end_time": + x.EndTime = nil + case "cosmos.lockup.QueryLockupAccountInfoResponse.locked_coins": + x.LockedCoins = nil + case "cosmos.lockup.QueryLockupAccountInfoResponse.unlocked_coins": + x.UnlockedCoins = nil + case "cosmos.lockup.QueryLockupAccountInfoResponse.owner": + x.Owner = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.QueryLockupAccountInfoResponse")) + } + panic(fmt.Errorf("message cosmos.lockup.QueryLockupAccountInfoResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryLockupAccountInfoResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.lockup.QueryLockupAccountInfoResponse.original_locking": + if len(x.OriginalLocking) == 0 { + return protoreflect.ValueOfList(&_QueryLockupAccountInfoResponse_1_list{}) + } + listValue := &_QueryLockupAccountInfoResponse_1_list{list: &x.OriginalLocking} + return protoreflect.ValueOfList(listValue) + case "cosmos.lockup.QueryLockupAccountInfoResponse.delegated_free": + if len(x.DelegatedFree) == 0 { + return protoreflect.ValueOfList(&_QueryLockupAccountInfoResponse_2_list{}) + } + listValue := &_QueryLockupAccountInfoResponse_2_list{list: &x.DelegatedFree} + return protoreflect.ValueOfList(listValue) + case "cosmos.lockup.QueryLockupAccountInfoResponse.delegated_locking": + if len(x.DelegatedLocking) == 0 { + return protoreflect.ValueOfList(&_QueryLockupAccountInfoResponse_3_list{}) + } + listValue := &_QueryLockupAccountInfoResponse_3_list{list: &x.DelegatedLocking} + return protoreflect.ValueOfList(listValue) + case "cosmos.lockup.QueryLockupAccountInfoResponse.start_time": + value := x.StartTime + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "cosmos.lockup.QueryLockupAccountInfoResponse.end_time": + value := x.EndTime + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "cosmos.lockup.QueryLockupAccountInfoResponse.locked_coins": + if len(x.LockedCoins) == 0 { + return protoreflect.ValueOfList(&_QueryLockupAccountInfoResponse_6_list{}) + } + listValue := &_QueryLockupAccountInfoResponse_6_list{list: &x.LockedCoins} + return protoreflect.ValueOfList(listValue) + case "cosmos.lockup.QueryLockupAccountInfoResponse.unlocked_coins": + if len(x.UnlockedCoins) == 0 { + return protoreflect.ValueOfList(&_QueryLockupAccountInfoResponse_7_list{}) + } + listValue := &_QueryLockupAccountInfoResponse_7_list{list: &x.UnlockedCoins} + return protoreflect.ValueOfList(listValue) + case "cosmos.lockup.QueryLockupAccountInfoResponse.owner": + value := x.Owner + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.QueryLockupAccountInfoResponse")) + } + panic(fmt.Errorf("message cosmos.lockup.QueryLockupAccountInfoResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryLockupAccountInfoResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.lockup.QueryLockupAccountInfoResponse.original_locking": + lv := value.List() + clv := lv.(*_QueryLockupAccountInfoResponse_1_list) + x.OriginalLocking = *clv.list + case "cosmos.lockup.QueryLockupAccountInfoResponse.delegated_free": + lv := value.List() + clv := lv.(*_QueryLockupAccountInfoResponse_2_list) + x.DelegatedFree = *clv.list + case "cosmos.lockup.QueryLockupAccountInfoResponse.delegated_locking": + lv := value.List() + clv := lv.(*_QueryLockupAccountInfoResponse_3_list) + x.DelegatedLocking = *clv.list + case "cosmos.lockup.QueryLockupAccountInfoResponse.start_time": + x.StartTime = value.Message().Interface().(*timestamppb.Timestamp) + case "cosmos.lockup.QueryLockupAccountInfoResponse.end_time": + x.EndTime = value.Message().Interface().(*timestamppb.Timestamp) + case "cosmos.lockup.QueryLockupAccountInfoResponse.locked_coins": + lv := value.List() + clv := lv.(*_QueryLockupAccountInfoResponse_6_list) + x.LockedCoins = *clv.list + case "cosmos.lockup.QueryLockupAccountInfoResponse.unlocked_coins": + lv := value.List() + clv := lv.(*_QueryLockupAccountInfoResponse_7_list) + x.UnlockedCoins = *clv.list + case "cosmos.lockup.QueryLockupAccountInfoResponse.owner": + x.Owner = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.QueryLockupAccountInfoResponse")) + } + panic(fmt.Errorf("message cosmos.lockup.QueryLockupAccountInfoResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryLockupAccountInfoResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.lockup.QueryLockupAccountInfoResponse.original_locking": + if x.OriginalLocking == nil { + x.OriginalLocking = []*v1beta1.Coin{} + } + value := &_QueryLockupAccountInfoResponse_1_list{list: &x.OriginalLocking} + return protoreflect.ValueOfList(value) + case "cosmos.lockup.QueryLockupAccountInfoResponse.delegated_free": + if x.DelegatedFree == nil { + x.DelegatedFree = []*v1beta1.Coin{} + } + value := &_QueryLockupAccountInfoResponse_2_list{list: &x.DelegatedFree} + return protoreflect.ValueOfList(value) + case "cosmos.lockup.QueryLockupAccountInfoResponse.delegated_locking": + if x.DelegatedLocking == nil { + x.DelegatedLocking = []*v1beta1.Coin{} + } + value := &_QueryLockupAccountInfoResponse_3_list{list: &x.DelegatedLocking} + return protoreflect.ValueOfList(value) + case "cosmos.lockup.QueryLockupAccountInfoResponse.start_time": + if x.StartTime == nil { + x.StartTime = new(timestamppb.Timestamp) + } + return protoreflect.ValueOfMessage(x.StartTime.ProtoReflect()) + case "cosmos.lockup.QueryLockupAccountInfoResponse.end_time": + if x.EndTime == nil { + x.EndTime = new(timestamppb.Timestamp) + } + return protoreflect.ValueOfMessage(x.EndTime.ProtoReflect()) + case "cosmos.lockup.QueryLockupAccountInfoResponse.locked_coins": + if x.LockedCoins == nil { + x.LockedCoins = []*v1beta1.Coin{} + } + value := &_QueryLockupAccountInfoResponse_6_list{list: &x.LockedCoins} + return protoreflect.ValueOfList(value) + case "cosmos.lockup.QueryLockupAccountInfoResponse.unlocked_coins": + if x.UnlockedCoins == nil { + x.UnlockedCoins = []*v1beta1.Coin{} + } + value := &_QueryLockupAccountInfoResponse_7_list{list: &x.UnlockedCoins} + return protoreflect.ValueOfList(value) + case "cosmos.lockup.QueryLockupAccountInfoResponse.owner": + panic(fmt.Errorf("field owner of message cosmos.lockup.QueryLockupAccountInfoResponse is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.QueryLockupAccountInfoResponse")) + } + panic(fmt.Errorf("message cosmos.lockup.QueryLockupAccountInfoResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryLockupAccountInfoResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.lockup.QueryLockupAccountInfoResponse.original_locking": + list := []*v1beta1.Coin{} + return protoreflect.ValueOfList(&_QueryLockupAccountInfoResponse_1_list{list: &list}) + case "cosmos.lockup.QueryLockupAccountInfoResponse.delegated_free": + list := []*v1beta1.Coin{} + return protoreflect.ValueOfList(&_QueryLockupAccountInfoResponse_2_list{list: &list}) + case "cosmos.lockup.QueryLockupAccountInfoResponse.delegated_locking": + list := []*v1beta1.Coin{} + return protoreflect.ValueOfList(&_QueryLockupAccountInfoResponse_3_list{list: &list}) + case "cosmos.lockup.QueryLockupAccountInfoResponse.start_time": + m := new(timestamppb.Timestamp) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "cosmos.lockup.QueryLockupAccountInfoResponse.end_time": + m := new(timestamppb.Timestamp) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "cosmos.lockup.QueryLockupAccountInfoResponse.locked_coins": + list := []*v1beta1.Coin{} + return protoreflect.ValueOfList(&_QueryLockupAccountInfoResponse_6_list{list: &list}) + case "cosmos.lockup.QueryLockupAccountInfoResponse.unlocked_coins": + list := []*v1beta1.Coin{} + return protoreflect.ValueOfList(&_QueryLockupAccountInfoResponse_7_list{list: &list}) + case "cosmos.lockup.QueryLockupAccountInfoResponse.owner": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.QueryLockupAccountInfoResponse")) + } + panic(fmt.Errorf("message cosmos.lockup.QueryLockupAccountInfoResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryLockupAccountInfoResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.lockup.QueryLockupAccountInfoResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryLockupAccountInfoResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryLockupAccountInfoResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryLockupAccountInfoResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryLockupAccountInfoResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryLockupAccountInfoResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if len(x.OriginalLocking) > 0 { + for _, e := range x.OriginalLocking { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if len(x.DelegatedFree) > 0 { + for _, e := range x.DelegatedFree { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if len(x.DelegatedLocking) > 0 { + for _, e := range x.DelegatedLocking { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.StartTime != nil { + l = options.Size(x.StartTime) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.EndTime != nil { + l = options.Size(x.EndTime) + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.LockedCoins) > 0 { + for _, e := range x.LockedCoins { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if len(x.UnlockedCoins) > 0 { + for _, e := range x.UnlockedCoins { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + l = len(x.Owner) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryLockupAccountInfoResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Owner) > 0 { + i -= len(x.Owner) + copy(dAtA[i:], x.Owner) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Owner))) + i-- + dAtA[i] = 0x42 + } + if len(x.UnlockedCoins) > 0 { + for iNdEx := len(x.UnlockedCoins) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.UnlockedCoins[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x3a + } + } + if len(x.LockedCoins) > 0 { + for iNdEx := len(x.LockedCoins) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.LockedCoins[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x32 + } + } + if x.EndTime != nil { + encoded, err := options.Marshal(x.EndTime) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x2a + } + if x.StartTime != nil { + encoded, err := options.Marshal(x.StartTime) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x22 + } + if len(x.DelegatedLocking) > 0 { + for iNdEx := len(x.DelegatedLocking) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.DelegatedLocking[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x1a + } + } + if len(x.DelegatedFree) > 0 { + for iNdEx := len(x.DelegatedFree) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.DelegatedFree[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + } + if len(x.OriginalLocking) > 0 { + for iNdEx := len(x.OriginalLocking) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.OriginalLocking[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryLockupAccountInfoResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryLockupAccountInfoResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryLockupAccountInfoResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field OriginalLocking", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.OriginalLocking = append(x.OriginalLocking, &v1beta1.Coin{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.OriginalLocking[len(x.OriginalLocking)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DelegatedFree", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.DelegatedFree = append(x.DelegatedFree, &v1beta1.Coin{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.DelegatedFree[len(x.DelegatedFree)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DelegatedLocking", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.DelegatedLocking = append(x.DelegatedLocking, &v1beta1.Coin{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.DelegatedLocking[len(x.DelegatedLocking)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field StartTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.StartTime == nil { + x.StartTime = ×tamppb.Timestamp{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.StartTime); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field EndTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.EndTime == nil { + x.EndTime = ×tamppb.Timestamp{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.EndTime); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field LockedCoins", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.LockedCoins = append(x.LockedCoins, &v1beta1.Coin{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.LockedCoins[len(x.LockedCoins)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field UnlockedCoins", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.UnlockedCoins = append(x.UnlockedCoins, &v1beta1.Coin{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.UnlockedCoins[len(x.UnlockedCoins)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Owner", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryLockingPeriodsRequest protoreflect.MessageDescriptor +) + +func init() { + file_cosmos_lockup_query_proto_init() + md_QueryLockingPeriodsRequest = File_cosmos_lockup_query_proto.Messages().ByName("QueryLockingPeriodsRequest") +} + +var _ protoreflect.Message = (*fastReflection_QueryLockingPeriodsRequest)(nil) + +type fastReflection_QueryLockingPeriodsRequest QueryLockingPeriodsRequest + +func (x *QueryLockingPeriodsRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryLockingPeriodsRequest)(x) +} + +func (x *QueryLockingPeriodsRequest) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_lockup_query_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) +} + +var _fastReflection_QueryLockingPeriodsRequest_messageType fastReflection_QueryLockingPeriodsRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryLockingPeriodsRequest_messageType{} + +type fastReflection_QueryLockingPeriodsRequest_messageType struct{} + +func (x fastReflection_QueryLockingPeriodsRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryLockingPeriodsRequest)(nil) +} +func (x fastReflection_QueryLockingPeriodsRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryLockingPeriodsRequest) +} +func (x fastReflection_QueryLockingPeriodsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryLockingPeriodsRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryLockingPeriodsRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryLockingPeriodsRequest +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryLockingPeriodsRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryLockingPeriodsRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryLockingPeriodsRequest) New() protoreflect.Message { + return new(fastReflection_QueryLockingPeriodsRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryLockingPeriodsRequest) Interface() protoreflect.ProtoMessage { + return (*QueryLockingPeriodsRequest)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryLockingPeriodsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryLockingPeriodsRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.QueryLockingPeriodsRequest")) + } + panic(fmt.Errorf("message cosmos.lockup.QueryLockingPeriodsRequest does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryLockingPeriodsRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.QueryLockingPeriodsRequest")) + } + panic(fmt.Errorf("message cosmos.lockup.QueryLockingPeriodsRequest does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryLockingPeriodsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.QueryLockingPeriodsRequest")) + } + panic(fmt.Errorf("message cosmos.lockup.QueryLockingPeriodsRequest does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryLockingPeriodsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.QueryLockingPeriodsRequest")) + } + panic(fmt.Errorf("message cosmos.lockup.QueryLockingPeriodsRequest does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryLockingPeriodsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.QueryLockingPeriodsRequest")) + } + panic(fmt.Errorf("message cosmos.lockup.QueryLockingPeriodsRequest does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryLockingPeriodsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.QueryLockingPeriodsRequest")) + } + panic(fmt.Errorf("message cosmos.lockup.QueryLockingPeriodsRequest does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryLockingPeriodsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.lockup.QueryLockingPeriodsRequest", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryLockingPeriodsRequest) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryLockingPeriodsRequest) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryLockingPeriodsRequest) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryLockingPeriodsRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryLockingPeriodsRequest) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryLockingPeriodsRequest) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryLockingPeriodsRequest) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryLockingPeriodsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryLockingPeriodsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_QueryLockingPeriodsResponse_1_list)(nil) + +type _QueryLockingPeriodsResponse_1_list struct { + list *[]*Period +} + +func (x *_QueryLockingPeriodsResponse_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_QueryLockingPeriodsResponse_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_QueryLockingPeriodsResponse_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Period) + (*x.list)[i] = concreteValue +} + +func (x *_QueryLockingPeriodsResponse_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Period) + *x.list = append(*x.list, concreteValue) +} + +func (x *_QueryLockingPeriodsResponse_1_list) AppendMutable() protoreflect.Value { + v := new(Period) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryLockingPeriodsResponse_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_QueryLockingPeriodsResponse_1_list) NewElement() protoreflect.Value { + v := new(Period) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryLockingPeriodsResponse_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_QueryLockingPeriodsResponse protoreflect.MessageDescriptor + fd_QueryLockingPeriodsResponse_locking_periods protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_lockup_query_proto_init() + md_QueryLockingPeriodsResponse = File_cosmos_lockup_query_proto.Messages().ByName("QueryLockingPeriodsResponse") + fd_QueryLockingPeriodsResponse_locking_periods = md_QueryLockingPeriodsResponse.Fields().ByName("locking_periods") +} + +var _ protoreflect.Message = (*fastReflection_QueryLockingPeriodsResponse)(nil) + +type fastReflection_QueryLockingPeriodsResponse QueryLockingPeriodsResponse + +func (x *QueryLockingPeriodsResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryLockingPeriodsResponse)(x) +} + +func (x *QueryLockingPeriodsResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_lockup_query_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) +} + +var _fastReflection_QueryLockingPeriodsResponse_messageType fastReflection_QueryLockingPeriodsResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryLockingPeriodsResponse_messageType{} + +type fastReflection_QueryLockingPeriodsResponse_messageType struct{} + +func (x fastReflection_QueryLockingPeriodsResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryLockingPeriodsResponse)(nil) +} +func (x fastReflection_QueryLockingPeriodsResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryLockingPeriodsResponse) +} +func (x fastReflection_QueryLockingPeriodsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryLockingPeriodsResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryLockingPeriodsResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryLockingPeriodsResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryLockingPeriodsResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryLockingPeriodsResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryLockingPeriodsResponse) New() protoreflect.Message { + return new(fastReflection_QueryLockingPeriodsResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryLockingPeriodsResponse) Interface() protoreflect.ProtoMessage { + return (*QueryLockingPeriodsResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryLockingPeriodsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.LockingPeriods) != 0 { + value := protoreflect.ValueOfList(&_QueryLockingPeriodsResponse_1_list{list: &x.LockingPeriods}) + if !f(fd_QueryLockingPeriodsResponse_locking_periods, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryLockingPeriodsResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.lockup.QueryLockingPeriodsResponse.locking_periods": + return len(x.LockingPeriods) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.QueryLockingPeriodsResponse")) + } + panic(fmt.Errorf("message cosmos.lockup.QueryLockingPeriodsResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryLockingPeriodsResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.lockup.QueryLockingPeriodsResponse.locking_periods": + x.LockingPeriods = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.QueryLockingPeriodsResponse")) + } + panic(fmt.Errorf("message cosmos.lockup.QueryLockingPeriodsResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryLockingPeriodsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.lockup.QueryLockingPeriodsResponse.locking_periods": + if len(x.LockingPeriods) == 0 { + return protoreflect.ValueOfList(&_QueryLockingPeriodsResponse_1_list{}) + } + listValue := &_QueryLockingPeriodsResponse_1_list{list: &x.LockingPeriods} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.QueryLockingPeriodsResponse")) + } + panic(fmt.Errorf("message cosmos.lockup.QueryLockingPeriodsResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryLockingPeriodsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.lockup.QueryLockingPeriodsResponse.locking_periods": + lv := value.List() + clv := lv.(*_QueryLockingPeriodsResponse_1_list) + x.LockingPeriods = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.QueryLockingPeriodsResponse")) + } + panic(fmt.Errorf("message cosmos.lockup.QueryLockingPeriodsResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryLockingPeriodsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.lockup.QueryLockingPeriodsResponse.locking_periods": + if x.LockingPeriods == nil { + x.LockingPeriods = []*Period{} + } + value := &_QueryLockingPeriodsResponse_1_list{list: &x.LockingPeriods} + return protoreflect.ValueOfList(value) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.QueryLockingPeriodsResponse")) + } + panic(fmt.Errorf("message cosmos.lockup.QueryLockingPeriodsResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryLockingPeriodsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.lockup.QueryLockingPeriodsResponse.locking_periods": + list := []*Period{} + return protoreflect.ValueOfList(&_QueryLockingPeriodsResponse_1_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.QueryLockingPeriodsResponse")) + } + panic(fmt.Errorf("message cosmos.lockup.QueryLockingPeriodsResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryLockingPeriodsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.lockup.QueryLockingPeriodsResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryLockingPeriodsResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryLockingPeriodsResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryLockingPeriodsResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryLockingPeriodsResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryLockingPeriodsResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if len(x.LockingPeriods) > 0 { + for _, e := range x.LockingPeriods { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryLockingPeriodsResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.LockingPeriods) > 0 { + for iNdEx := len(x.LockingPeriods) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.LockingPeriods[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryLockingPeriodsResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryLockingPeriodsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryLockingPeriodsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field LockingPeriods", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.LockingPeriods = append(x.LockingPeriods, &Period{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.LockingPeriods[len(x.LockingPeriods)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: cosmos/lockup/query.proto + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// QueryLockupAccountInfoRequest get lockup account info +type QueryLockupAccountInfoRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *QueryLockupAccountInfoRequest) Reset() { + *x = QueryLockupAccountInfoRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_lockup_query_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryLockupAccountInfoRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryLockupAccountInfoRequest) ProtoMessage() {} + +// Deprecated: Use QueryLockupAccountInfoRequest.ProtoReflect.Descriptor instead. +func (*QueryLockupAccountInfoRequest) Descriptor() ([]byte, []int) { + return file_cosmos_lockup_query_proto_rawDescGZIP(), []int{0} +} + +// QueryLockupAccountInfoResponse return lockup account info +type QueryLockupAccountInfoResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // original_locking defines the value of the account original locking coins. + OriginalLocking []*v1beta1.Coin `protobuf:"bytes,1,rep,name=original_locking,json=originalLocking,proto3" json:"original_locking,omitempty"` + // delegated_free defines the value of the account free delegated amount. + DelegatedFree []*v1beta1.Coin `protobuf:"bytes,2,rep,name=delegated_free,json=delegatedFree,proto3" json:"delegated_free,omitempty"` + // delegated_locking defines the value of the account locking delegated amount. + DelegatedLocking []*v1beta1.Coin `protobuf:"bytes,3,rep,name=delegated_locking,json=delegatedLocking,proto3" json:"delegated_locking,omitempty"` + // end_time defines the value of the account lockup start time. + StartTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` + // end_time defines the value of the account lockup end time. + EndTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` + // locked_coins defines the value of the account locking coins. + LockedCoins []*v1beta1.Coin `protobuf:"bytes,6,rep,name=locked_coins,json=lockedCoins,proto3" json:"locked_coins,omitempty"` + // unlocked_coins defines the value of the account released coins from lockup. + UnlockedCoins []*v1beta1.Coin `protobuf:"bytes,7,rep,name=unlocked_coins,json=unlockedCoins,proto3" json:"unlocked_coins,omitempty"` + // owner defines the value of the owner of the lockup account. + Owner string `protobuf:"bytes,8,opt,name=owner,proto3" json:"owner,omitempty"` +} + +func (x *QueryLockupAccountInfoResponse) Reset() { + *x = QueryLockupAccountInfoResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_lockup_query_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryLockupAccountInfoResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryLockupAccountInfoResponse) ProtoMessage() {} + +// Deprecated: Use QueryLockupAccountInfoResponse.ProtoReflect.Descriptor instead. +func (*QueryLockupAccountInfoResponse) Descriptor() ([]byte, []int) { + return file_cosmos_lockup_query_proto_rawDescGZIP(), []int{1} +} + +func (x *QueryLockupAccountInfoResponse) GetOriginalLocking() []*v1beta1.Coin { + if x != nil { + return x.OriginalLocking + } + return nil +} + +func (x *QueryLockupAccountInfoResponse) GetDelegatedFree() []*v1beta1.Coin { + if x != nil { + return x.DelegatedFree + } + return nil +} + +func (x *QueryLockupAccountInfoResponse) GetDelegatedLocking() []*v1beta1.Coin { + if x != nil { + return x.DelegatedLocking + } + return nil +} + +func (x *QueryLockupAccountInfoResponse) GetStartTime() *timestamppb.Timestamp { + if x != nil { + return x.StartTime + } + return nil +} + +func (x *QueryLockupAccountInfoResponse) GetEndTime() *timestamppb.Timestamp { + if x != nil { + return x.EndTime + } + return nil +} + +func (x *QueryLockupAccountInfoResponse) GetLockedCoins() []*v1beta1.Coin { + if x != nil { + return x.LockedCoins + } + return nil +} + +func (x *QueryLockupAccountInfoResponse) GetUnlockedCoins() []*v1beta1.Coin { + if x != nil { + return x.UnlockedCoins + } + return nil +} + +func (x *QueryLockupAccountInfoResponse) GetOwner() string { + if x != nil { + return x.Owner + } + return "" +} + +// QueryLockingPeriodsRequest is used to query the periodic lockup account locking periods. +type QueryLockingPeriodsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *QueryLockingPeriodsRequest) Reset() { + *x = QueryLockingPeriodsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_lockup_query_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryLockingPeriodsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryLockingPeriodsRequest) ProtoMessage() {} + +// Deprecated: Use QueryLockingPeriodsRequest.ProtoReflect.Descriptor instead. +func (*QueryLockingPeriodsRequest) Descriptor() ([]byte, []int) { + return file_cosmos_lockup_query_proto_rawDescGZIP(), []int{2} +} + +// QueryLockingPeriodsResponse returns the periodic lockup account locking periods. +type QueryLockingPeriodsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // lockup_periods defines the value of the periodic lockup account locking periods. + LockingPeriods []*Period `protobuf:"bytes,1,rep,name=locking_periods,json=lockingPeriods,proto3" json:"locking_periods,omitempty"` +} + +func (x *QueryLockingPeriodsResponse) Reset() { + *x = QueryLockingPeriodsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_lockup_query_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryLockingPeriodsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryLockingPeriodsResponse) ProtoMessage() {} + +// Deprecated: Use QueryLockingPeriodsResponse.ProtoReflect.Descriptor instead. +func (*QueryLockingPeriodsResponse) Descriptor() ([]byte, []int) { + return file_cosmos_lockup_query_proto_rawDescGZIP(), []int{3} +} + +func (x *QueryLockingPeriodsResponse) GetLockingPeriods() []*Period { + if x != nil { + return x.LockingPeriods + } + return nil +} + +var File_cosmos_lockup_query_proto protoreflect.FileDescriptor + +var file_cosmos_lockup_query_proto_rawDesc = []byte{ + 0x0a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x2f, + 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x6c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x1a, 0x1a, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2f, 0x6c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x2f, 0x6c, 0x6f, 0x63, 0x6b, 0x75, 0x70, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, + 0x61, 0x73, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x69, 0x6e, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x1f, 0x0a, + 0x1d, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x41, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xfe, + 0x05, 0x0a, 0x1e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x76, 0x0a, 0x10, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x6c, 0x6f, + 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, + 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x0f, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, + 0x61, 0x6c, 0x4c, 0x6f, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x12, 0x72, 0x0a, 0x0e, 0x64, 0x65, 0x6c, + 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x72, 0x65, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x30, 0xc8, 0xde, + 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, + 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x0d, + 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x46, 0x72, 0x65, 0x65, 0x12, 0x78, 0x0a, + 0x11, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6c, 0x6f, 0x63, 0x6b, 0x69, + 0x6e, 0x67, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, + 0x6f, 0x69, 0x6e, 0x42, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, + 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x10, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, + 0x4c, 0x6f, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x12, 0x3f, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, + 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x04, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x09, 0x73, + 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3b, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x5f, + 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x04, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x07, 0x65, 0x6e, + 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x6e, 0x0a, 0x0c, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x5f, + 0x63, 0x6f, 0x69, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, + 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x0b, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, + 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x12, 0x72, 0x0a, 0x0e, 0x75, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x65, + 0x64, 0x5f, 0x63, 0x6f, 0x69, 0x6e, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, + 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, + 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x0d, 0x75, 0x6e, 0x6c, 0x6f, + 0x63, 0x6b, 0x65, 0x64, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, + 0x65, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x22, + 0x1c, 0x0a, 0x1a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4c, 0x6f, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x50, + 0x65, 0x72, 0x69, 0x6f, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x5d, 0x0a, + 0x1b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4c, 0x6f, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x50, 0x65, 0x72, + 0x69, 0x6f, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x0f, + 0x6c, 0x6f, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6c, + 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x2e, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x52, 0x0e, 0x6c, 0x6f, + 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x73, 0x42, 0x94, 0x01, 0x0a, + 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6c, 0x6f, 0x63, 0x6b, + 0x75, 0x70, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6c, 0x6f, 0x63, 0x6b, 0x75, 0x70, + 0xa2, 0x02, 0x03, 0x43, 0x4c, 0x58, 0xaa, 0x02, 0x0d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0xca, 0x02, 0x0d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, + 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0xe2, 0x02, 0x19, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, + 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0xea, 0x02, 0x0e, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x4c, 0x6f, 0x63, + 0x6b, 0x75, 0x70, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_cosmos_lockup_query_proto_rawDescOnce sync.Once + file_cosmos_lockup_query_proto_rawDescData = file_cosmos_lockup_query_proto_rawDesc +) + +func file_cosmos_lockup_query_proto_rawDescGZIP() []byte { + file_cosmos_lockup_query_proto_rawDescOnce.Do(func() { + file_cosmos_lockup_query_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_lockup_query_proto_rawDescData) + }) + return file_cosmos_lockup_query_proto_rawDescData +} + +var file_cosmos_lockup_query_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_cosmos_lockup_query_proto_goTypes = []interface{}{ + (*QueryLockupAccountInfoRequest)(nil), // 0: cosmos.lockup.QueryLockupAccountInfoRequest + (*QueryLockupAccountInfoResponse)(nil), // 1: cosmos.lockup.QueryLockupAccountInfoResponse + (*QueryLockingPeriodsRequest)(nil), // 2: cosmos.lockup.QueryLockingPeriodsRequest + (*QueryLockingPeriodsResponse)(nil), // 3: cosmos.lockup.QueryLockingPeriodsResponse + (*v1beta1.Coin)(nil), // 4: cosmos.base.v1beta1.Coin + (*timestamppb.Timestamp)(nil), // 5: google.protobuf.Timestamp + (*Period)(nil), // 6: cosmos.lockup.Period +} +var file_cosmos_lockup_query_proto_depIdxs = []int32{ + 4, // 0: cosmos.lockup.QueryLockupAccountInfoResponse.original_locking:type_name -> cosmos.base.v1beta1.Coin + 4, // 1: cosmos.lockup.QueryLockupAccountInfoResponse.delegated_free:type_name -> cosmos.base.v1beta1.Coin + 4, // 2: cosmos.lockup.QueryLockupAccountInfoResponse.delegated_locking:type_name -> cosmos.base.v1beta1.Coin + 5, // 3: cosmos.lockup.QueryLockupAccountInfoResponse.start_time:type_name -> google.protobuf.Timestamp + 5, // 4: cosmos.lockup.QueryLockupAccountInfoResponse.end_time:type_name -> google.protobuf.Timestamp + 4, // 5: cosmos.lockup.QueryLockupAccountInfoResponse.locked_coins:type_name -> cosmos.base.v1beta1.Coin + 4, // 6: cosmos.lockup.QueryLockupAccountInfoResponse.unlocked_coins:type_name -> cosmos.base.v1beta1.Coin + 6, // 7: cosmos.lockup.QueryLockingPeriodsResponse.locking_periods:type_name -> cosmos.lockup.Period + 8, // [8:8] is the sub-list for method output_type + 8, // [8:8] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name +} + +func init() { file_cosmos_lockup_query_proto_init() } +func file_cosmos_lockup_query_proto_init() { + if File_cosmos_lockup_query_proto != nil { + return + } + file_cosmos_lockup_lockup_proto_init() + if !protoimpl.UnsafeEnabled { + file_cosmos_lockup_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryLockupAccountInfoRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_lockup_query_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryLockupAccountInfoResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_lockup_query_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryLockingPeriodsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_lockup_query_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryLockingPeriodsResponse); 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: file_cosmos_lockup_query_proto_rawDesc, + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_cosmos_lockup_query_proto_goTypes, + DependencyIndexes: file_cosmos_lockup_query_proto_depIdxs, + MessageInfos: file_cosmos_lockup_query_proto_msgTypes, + }.Build() + File_cosmos_lockup_query_proto = out.File + file_cosmos_lockup_query_proto_rawDesc = nil + file_cosmos_lockup_query_proto_goTypes = nil + file_cosmos_lockup_query_proto_depIdxs = nil +} diff --git a/api/cosmos/lockup/tx.pulsar.go b/api/cosmos/lockup/tx.pulsar.go new file mode 100644 index 000000000000..9633724feefd --- /dev/null +++ b/api/cosmos/lockup/tx.pulsar.go @@ -0,0 +1,6162 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package lockup + +import ( + _ "cosmossdk.io/api/amino" + v1beta1 "cosmossdk.io/api/cosmos/base/v1beta1" + _ "cosmossdk.io/api/cosmos/msg/v1" + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + runtime "github.com/cosmos/cosmos-proto/runtime" + _ "github.com/cosmos/gogoproto/gogoproto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoiface "google.golang.org/protobuf/runtime/protoiface" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + anypb "google.golang.org/protobuf/types/known/anypb" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + io "io" + reflect "reflect" + sync "sync" +) + +var ( + md_MsgInitLockupAccount protoreflect.MessageDescriptor + fd_MsgInitLockupAccount_owner protoreflect.FieldDescriptor + fd_MsgInitLockupAccount_end_time protoreflect.FieldDescriptor + fd_MsgInitLockupAccount_start_time protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_lockup_tx_proto_init() + md_MsgInitLockupAccount = File_cosmos_lockup_tx_proto.Messages().ByName("MsgInitLockupAccount") + fd_MsgInitLockupAccount_owner = md_MsgInitLockupAccount.Fields().ByName("owner") + fd_MsgInitLockupAccount_end_time = md_MsgInitLockupAccount.Fields().ByName("end_time") + fd_MsgInitLockupAccount_start_time = md_MsgInitLockupAccount.Fields().ByName("start_time") +} + +var _ protoreflect.Message = (*fastReflection_MsgInitLockupAccount)(nil) + +type fastReflection_MsgInitLockupAccount MsgInitLockupAccount + +func (x *MsgInitLockupAccount) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgInitLockupAccount)(x) +} + +func (x *MsgInitLockupAccount) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_lockup_tx_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) +} + +var _fastReflection_MsgInitLockupAccount_messageType fastReflection_MsgInitLockupAccount_messageType +var _ protoreflect.MessageType = fastReflection_MsgInitLockupAccount_messageType{} + +type fastReflection_MsgInitLockupAccount_messageType struct{} + +func (x fastReflection_MsgInitLockupAccount_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgInitLockupAccount)(nil) +} +func (x fastReflection_MsgInitLockupAccount_messageType) New() protoreflect.Message { + return new(fastReflection_MsgInitLockupAccount) +} +func (x fastReflection_MsgInitLockupAccount_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgInitLockupAccount +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgInitLockupAccount) Descriptor() protoreflect.MessageDescriptor { + return md_MsgInitLockupAccount +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgInitLockupAccount) Type() protoreflect.MessageType { + return _fastReflection_MsgInitLockupAccount_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgInitLockupAccount) New() protoreflect.Message { + return new(fastReflection_MsgInitLockupAccount) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgInitLockupAccount) Interface() protoreflect.ProtoMessage { + return (*MsgInitLockupAccount)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgInitLockupAccount) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Owner != "" { + value := protoreflect.ValueOfString(x.Owner) + if !f(fd_MsgInitLockupAccount_owner, value) { + return + } + } + if x.EndTime != nil { + value := protoreflect.ValueOfMessage(x.EndTime.ProtoReflect()) + if !f(fd_MsgInitLockupAccount_end_time, value) { + return + } + } + if x.StartTime != nil { + value := protoreflect.ValueOfMessage(x.StartTime.ProtoReflect()) + if !f(fd_MsgInitLockupAccount_start_time, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgInitLockupAccount) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.lockup.MsgInitLockupAccount.owner": + return x.Owner != "" + case "cosmos.lockup.MsgInitLockupAccount.end_time": + return x.EndTime != nil + case "cosmos.lockup.MsgInitLockupAccount.start_time": + return x.StartTime != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgInitLockupAccount")) + } + panic(fmt.Errorf("message cosmos.lockup.MsgInitLockupAccount does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgInitLockupAccount) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.lockup.MsgInitLockupAccount.owner": + x.Owner = "" + case "cosmos.lockup.MsgInitLockupAccount.end_time": + x.EndTime = nil + case "cosmos.lockup.MsgInitLockupAccount.start_time": + x.StartTime = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgInitLockupAccount")) + } + panic(fmt.Errorf("message cosmos.lockup.MsgInitLockupAccount does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgInitLockupAccount) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.lockup.MsgInitLockupAccount.owner": + value := x.Owner + return protoreflect.ValueOfString(value) + case "cosmos.lockup.MsgInitLockupAccount.end_time": + value := x.EndTime + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "cosmos.lockup.MsgInitLockupAccount.start_time": + value := x.StartTime + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgInitLockupAccount")) + } + panic(fmt.Errorf("message cosmos.lockup.MsgInitLockupAccount does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgInitLockupAccount) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.lockup.MsgInitLockupAccount.owner": + x.Owner = value.Interface().(string) + case "cosmos.lockup.MsgInitLockupAccount.end_time": + x.EndTime = value.Message().Interface().(*timestamppb.Timestamp) + case "cosmos.lockup.MsgInitLockupAccount.start_time": + x.StartTime = value.Message().Interface().(*timestamppb.Timestamp) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgInitLockupAccount")) + } + panic(fmt.Errorf("message cosmos.lockup.MsgInitLockupAccount does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgInitLockupAccount) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.lockup.MsgInitLockupAccount.end_time": + if x.EndTime == nil { + x.EndTime = new(timestamppb.Timestamp) + } + return protoreflect.ValueOfMessage(x.EndTime.ProtoReflect()) + case "cosmos.lockup.MsgInitLockupAccount.start_time": + if x.StartTime == nil { + x.StartTime = new(timestamppb.Timestamp) + } + return protoreflect.ValueOfMessage(x.StartTime.ProtoReflect()) + case "cosmos.lockup.MsgInitLockupAccount.owner": + panic(fmt.Errorf("field owner of message cosmos.lockup.MsgInitLockupAccount is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgInitLockupAccount")) + } + panic(fmt.Errorf("message cosmos.lockup.MsgInitLockupAccount does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgInitLockupAccount) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.lockup.MsgInitLockupAccount.owner": + return protoreflect.ValueOfString("") + case "cosmos.lockup.MsgInitLockupAccount.end_time": + m := new(timestamppb.Timestamp) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "cosmos.lockup.MsgInitLockupAccount.start_time": + m := new(timestamppb.Timestamp) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgInitLockupAccount")) + } + panic(fmt.Errorf("message cosmos.lockup.MsgInitLockupAccount does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgInitLockupAccount) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.lockup.MsgInitLockupAccount", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgInitLockupAccount) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgInitLockupAccount) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgInitLockupAccount) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgInitLockupAccount) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgInitLockupAccount) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Owner) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.EndTime != nil { + l = options.Size(x.EndTime) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.StartTime != nil { + l = options.Size(x.StartTime) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgInitLockupAccount) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.StartTime != nil { + encoded, err := options.Marshal(x.StartTime) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x1a + } + if x.EndTime != nil { + encoded, err := options.Marshal(x.EndTime) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + if len(x.Owner) > 0 { + i -= len(x.Owner) + copy(dAtA[i:], x.Owner) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Owner))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgInitLockupAccount) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgInitLockupAccount: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgInitLockupAccount: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Owner", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field EndTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.EndTime == nil { + x.EndTime = ×tamppb.Timestamp{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.EndTime); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field StartTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.StartTime == nil { + x.StartTime = ×tamppb.Timestamp{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.StartTime); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgInitLockupAccountResponse protoreflect.MessageDescriptor +) + +func init() { + file_cosmos_lockup_tx_proto_init() + md_MsgInitLockupAccountResponse = File_cosmos_lockup_tx_proto.Messages().ByName("MsgInitLockupAccountResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgInitLockupAccountResponse)(nil) + +type fastReflection_MsgInitLockupAccountResponse MsgInitLockupAccountResponse + +func (x *MsgInitLockupAccountResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgInitLockupAccountResponse)(x) +} + +func (x *MsgInitLockupAccountResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_lockup_tx_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) +} + +var _fastReflection_MsgInitLockupAccountResponse_messageType fastReflection_MsgInitLockupAccountResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgInitLockupAccountResponse_messageType{} + +type fastReflection_MsgInitLockupAccountResponse_messageType struct{} + +func (x fastReflection_MsgInitLockupAccountResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgInitLockupAccountResponse)(nil) +} +func (x fastReflection_MsgInitLockupAccountResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgInitLockupAccountResponse) +} +func (x fastReflection_MsgInitLockupAccountResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgInitLockupAccountResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgInitLockupAccountResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgInitLockupAccountResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgInitLockupAccountResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgInitLockupAccountResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgInitLockupAccountResponse) New() protoreflect.Message { + return new(fastReflection_MsgInitLockupAccountResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgInitLockupAccountResponse) Interface() protoreflect.ProtoMessage { + return (*MsgInitLockupAccountResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgInitLockupAccountResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgInitLockupAccountResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgInitLockupAccountResponse")) + } + panic(fmt.Errorf("message cosmos.lockup.MsgInitLockupAccountResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgInitLockupAccountResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgInitLockupAccountResponse")) + } + panic(fmt.Errorf("message cosmos.lockup.MsgInitLockupAccountResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgInitLockupAccountResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgInitLockupAccountResponse")) + } + panic(fmt.Errorf("message cosmos.lockup.MsgInitLockupAccountResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgInitLockupAccountResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgInitLockupAccountResponse")) + } + panic(fmt.Errorf("message cosmos.lockup.MsgInitLockupAccountResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgInitLockupAccountResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgInitLockupAccountResponse")) + } + panic(fmt.Errorf("message cosmos.lockup.MsgInitLockupAccountResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgInitLockupAccountResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgInitLockupAccountResponse")) + } + panic(fmt.Errorf("message cosmos.lockup.MsgInitLockupAccountResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgInitLockupAccountResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.lockup.MsgInitLockupAccountResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgInitLockupAccountResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgInitLockupAccountResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgInitLockupAccountResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgInitLockupAccountResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgInitLockupAccountResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgInitLockupAccountResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgInitLockupAccountResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgInitLockupAccountResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgInitLockupAccountResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_MsgInitPeriodicLockingAccount_3_list)(nil) + +type _MsgInitPeriodicLockingAccount_3_list struct { + list *[]*Period +} + +func (x *_MsgInitPeriodicLockingAccount_3_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_MsgInitPeriodicLockingAccount_3_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_MsgInitPeriodicLockingAccount_3_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Period) + (*x.list)[i] = concreteValue +} + +func (x *_MsgInitPeriodicLockingAccount_3_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Period) + *x.list = append(*x.list, concreteValue) +} + +func (x *_MsgInitPeriodicLockingAccount_3_list) AppendMutable() protoreflect.Value { + v := new(Period) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgInitPeriodicLockingAccount_3_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_MsgInitPeriodicLockingAccount_3_list) NewElement() protoreflect.Value { + v := new(Period) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgInitPeriodicLockingAccount_3_list) IsValid() bool { + return x.list != nil +} + +var ( + md_MsgInitPeriodicLockingAccount protoreflect.MessageDescriptor + fd_MsgInitPeriodicLockingAccount_owner protoreflect.FieldDescriptor + fd_MsgInitPeriodicLockingAccount_start_time protoreflect.FieldDescriptor + fd_MsgInitPeriodicLockingAccount_locking_periods protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_lockup_tx_proto_init() + md_MsgInitPeriodicLockingAccount = File_cosmos_lockup_tx_proto.Messages().ByName("MsgInitPeriodicLockingAccount") + fd_MsgInitPeriodicLockingAccount_owner = md_MsgInitPeriodicLockingAccount.Fields().ByName("owner") + fd_MsgInitPeriodicLockingAccount_start_time = md_MsgInitPeriodicLockingAccount.Fields().ByName("start_time") + fd_MsgInitPeriodicLockingAccount_locking_periods = md_MsgInitPeriodicLockingAccount.Fields().ByName("locking_periods") +} + +var _ protoreflect.Message = (*fastReflection_MsgInitPeriodicLockingAccount)(nil) + +type fastReflection_MsgInitPeriodicLockingAccount MsgInitPeriodicLockingAccount + +func (x *MsgInitPeriodicLockingAccount) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgInitPeriodicLockingAccount)(x) +} + +func (x *MsgInitPeriodicLockingAccount) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_lockup_tx_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) +} + +var _fastReflection_MsgInitPeriodicLockingAccount_messageType fastReflection_MsgInitPeriodicLockingAccount_messageType +var _ protoreflect.MessageType = fastReflection_MsgInitPeriodicLockingAccount_messageType{} + +type fastReflection_MsgInitPeriodicLockingAccount_messageType struct{} + +func (x fastReflection_MsgInitPeriodicLockingAccount_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgInitPeriodicLockingAccount)(nil) +} +func (x fastReflection_MsgInitPeriodicLockingAccount_messageType) New() protoreflect.Message { + return new(fastReflection_MsgInitPeriodicLockingAccount) +} +func (x fastReflection_MsgInitPeriodicLockingAccount_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgInitPeriodicLockingAccount +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgInitPeriodicLockingAccount) Descriptor() protoreflect.MessageDescriptor { + return md_MsgInitPeriodicLockingAccount +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgInitPeriodicLockingAccount) Type() protoreflect.MessageType { + return _fastReflection_MsgInitPeriodicLockingAccount_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgInitPeriodicLockingAccount) New() protoreflect.Message { + return new(fastReflection_MsgInitPeriodicLockingAccount) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgInitPeriodicLockingAccount) Interface() protoreflect.ProtoMessage { + return (*MsgInitPeriodicLockingAccount)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgInitPeriodicLockingAccount) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Owner != "" { + value := protoreflect.ValueOfString(x.Owner) + if !f(fd_MsgInitPeriodicLockingAccount_owner, value) { + return + } + } + if x.StartTime != nil { + value := protoreflect.ValueOfMessage(x.StartTime.ProtoReflect()) + if !f(fd_MsgInitPeriodicLockingAccount_start_time, value) { + return + } + } + if len(x.LockingPeriods) != 0 { + value := protoreflect.ValueOfList(&_MsgInitPeriodicLockingAccount_3_list{list: &x.LockingPeriods}) + if !f(fd_MsgInitPeriodicLockingAccount_locking_periods, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgInitPeriodicLockingAccount) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.lockup.MsgInitPeriodicLockingAccount.owner": + return x.Owner != "" + case "cosmos.lockup.MsgInitPeriodicLockingAccount.start_time": + return x.StartTime != nil + case "cosmos.lockup.MsgInitPeriodicLockingAccount.locking_periods": + return len(x.LockingPeriods) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgInitPeriodicLockingAccount")) + } + panic(fmt.Errorf("message cosmos.lockup.MsgInitPeriodicLockingAccount does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgInitPeriodicLockingAccount) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.lockup.MsgInitPeriodicLockingAccount.owner": + x.Owner = "" + case "cosmos.lockup.MsgInitPeriodicLockingAccount.start_time": + x.StartTime = nil + case "cosmos.lockup.MsgInitPeriodicLockingAccount.locking_periods": + x.LockingPeriods = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgInitPeriodicLockingAccount")) + } + panic(fmt.Errorf("message cosmos.lockup.MsgInitPeriodicLockingAccount does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgInitPeriodicLockingAccount) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.lockup.MsgInitPeriodicLockingAccount.owner": + value := x.Owner + return protoreflect.ValueOfString(value) + case "cosmos.lockup.MsgInitPeriodicLockingAccount.start_time": + value := x.StartTime + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "cosmos.lockup.MsgInitPeriodicLockingAccount.locking_periods": + if len(x.LockingPeriods) == 0 { + return protoreflect.ValueOfList(&_MsgInitPeriodicLockingAccount_3_list{}) + } + listValue := &_MsgInitPeriodicLockingAccount_3_list{list: &x.LockingPeriods} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgInitPeriodicLockingAccount")) + } + panic(fmt.Errorf("message cosmos.lockup.MsgInitPeriodicLockingAccount does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgInitPeriodicLockingAccount) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.lockup.MsgInitPeriodicLockingAccount.owner": + x.Owner = value.Interface().(string) + case "cosmos.lockup.MsgInitPeriodicLockingAccount.start_time": + x.StartTime = value.Message().Interface().(*timestamppb.Timestamp) + case "cosmos.lockup.MsgInitPeriodicLockingAccount.locking_periods": + lv := value.List() + clv := lv.(*_MsgInitPeriodicLockingAccount_3_list) + x.LockingPeriods = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgInitPeriodicLockingAccount")) + } + panic(fmt.Errorf("message cosmos.lockup.MsgInitPeriodicLockingAccount does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgInitPeriodicLockingAccount) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.lockup.MsgInitPeriodicLockingAccount.start_time": + if x.StartTime == nil { + x.StartTime = new(timestamppb.Timestamp) + } + return protoreflect.ValueOfMessage(x.StartTime.ProtoReflect()) + case "cosmos.lockup.MsgInitPeriodicLockingAccount.locking_periods": + if x.LockingPeriods == nil { + x.LockingPeriods = []*Period{} + } + value := &_MsgInitPeriodicLockingAccount_3_list{list: &x.LockingPeriods} + return protoreflect.ValueOfList(value) + case "cosmos.lockup.MsgInitPeriodicLockingAccount.owner": + panic(fmt.Errorf("field owner of message cosmos.lockup.MsgInitPeriodicLockingAccount is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgInitPeriodicLockingAccount")) + } + panic(fmt.Errorf("message cosmos.lockup.MsgInitPeriodicLockingAccount does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgInitPeriodicLockingAccount) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.lockup.MsgInitPeriodicLockingAccount.owner": + return protoreflect.ValueOfString("") + case "cosmos.lockup.MsgInitPeriodicLockingAccount.start_time": + m := new(timestamppb.Timestamp) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "cosmos.lockup.MsgInitPeriodicLockingAccount.locking_periods": + list := []*Period{} + return protoreflect.ValueOfList(&_MsgInitPeriodicLockingAccount_3_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgInitPeriodicLockingAccount")) + } + panic(fmt.Errorf("message cosmos.lockup.MsgInitPeriodicLockingAccount does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgInitPeriodicLockingAccount) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.lockup.MsgInitPeriodicLockingAccount", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgInitPeriodicLockingAccount) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgInitPeriodicLockingAccount) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgInitPeriodicLockingAccount) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgInitPeriodicLockingAccount) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgInitPeriodicLockingAccount) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Owner) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.StartTime != nil { + l = options.Size(x.StartTime) + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.LockingPeriods) > 0 { + for _, e := range x.LockingPeriods { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgInitPeriodicLockingAccount) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.LockingPeriods) > 0 { + for iNdEx := len(x.LockingPeriods) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.LockingPeriods[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x1a + } + } + if x.StartTime != nil { + encoded, err := options.Marshal(x.StartTime) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + if len(x.Owner) > 0 { + i -= len(x.Owner) + copy(dAtA[i:], x.Owner) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Owner))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgInitPeriodicLockingAccount) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgInitPeriodicLockingAccount: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgInitPeriodicLockingAccount: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Owner", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field StartTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.StartTime == nil { + x.StartTime = ×tamppb.Timestamp{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.StartTime); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field LockingPeriods", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.LockingPeriods = append(x.LockingPeriods, &Period{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.LockingPeriods[len(x.LockingPeriods)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgInitPeriodicLockingAccountResponse protoreflect.MessageDescriptor +) + +func init() { + file_cosmos_lockup_tx_proto_init() + md_MsgInitPeriodicLockingAccountResponse = File_cosmos_lockup_tx_proto.Messages().ByName("MsgInitPeriodicLockingAccountResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgInitPeriodicLockingAccountResponse)(nil) + +type fastReflection_MsgInitPeriodicLockingAccountResponse MsgInitPeriodicLockingAccountResponse + +func (x *MsgInitPeriodicLockingAccountResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgInitPeriodicLockingAccountResponse)(x) +} + +func (x *MsgInitPeriodicLockingAccountResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_lockup_tx_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) +} + +var _fastReflection_MsgInitPeriodicLockingAccountResponse_messageType fastReflection_MsgInitPeriodicLockingAccountResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgInitPeriodicLockingAccountResponse_messageType{} + +type fastReflection_MsgInitPeriodicLockingAccountResponse_messageType struct{} + +func (x fastReflection_MsgInitPeriodicLockingAccountResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgInitPeriodicLockingAccountResponse)(nil) +} +func (x fastReflection_MsgInitPeriodicLockingAccountResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgInitPeriodicLockingAccountResponse) +} +func (x fastReflection_MsgInitPeriodicLockingAccountResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgInitPeriodicLockingAccountResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgInitPeriodicLockingAccountResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgInitPeriodicLockingAccountResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgInitPeriodicLockingAccountResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgInitPeriodicLockingAccountResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgInitPeriodicLockingAccountResponse) New() protoreflect.Message { + return new(fastReflection_MsgInitPeriodicLockingAccountResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgInitPeriodicLockingAccountResponse) Interface() protoreflect.ProtoMessage { + return (*MsgInitPeriodicLockingAccountResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgInitPeriodicLockingAccountResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgInitPeriodicLockingAccountResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgInitPeriodicLockingAccountResponse")) + } + panic(fmt.Errorf("message cosmos.lockup.MsgInitPeriodicLockingAccountResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgInitPeriodicLockingAccountResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgInitPeriodicLockingAccountResponse")) + } + panic(fmt.Errorf("message cosmos.lockup.MsgInitPeriodicLockingAccountResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgInitPeriodicLockingAccountResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgInitPeriodicLockingAccountResponse")) + } + panic(fmt.Errorf("message cosmos.lockup.MsgInitPeriodicLockingAccountResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgInitPeriodicLockingAccountResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgInitPeriodicLockingAccountResponse")) + } + panic(fmt.Errorf("message cosmos.lockup.MsgInitPeriodicLockingAccountResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgInitPeriodicLockingAccountResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgInitPeriodicLockingAccountResponse")) + } + panic(fmt.Errorf("message cosmos.lockup.MsgInitPeriodicLockingAccountResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgInitPeriodicLockingAccountResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgInitPeriodicLockingAccountResponse")) + } + panic(fmt.Errorf("message cosmos.lockup.MsgInitPeriodicLockingAccountResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgInitPeriodicLockingAccountResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.lockup.MsgInitPeriodicLockingAccountResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgInitPeriodicLockingAccountResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgInitPeriodicLockingAccountResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgInitPeriodicLockingAccountResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgInitPeriodicLockingAccountResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgInitPeriodicLockingAccountResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgInitPeriodicLockingAccountResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgInitPeriodicLockingAccountResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgInitPeriodicLockingAccountResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgInitPeriodicLockingAccountResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgDelegate protoreflect.MessageDescriptor + fd_MsgDelegate_sender protoreflect.FieldDescriptor + fd_MsgDelegate_validator_address protoreflect.FieldDescriptor + fd_MsgDelegate_amount protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_lockup_tx_proto_init() + md_MsgDelegate = File_cosmos_lockup_tx_proto.Messages().ByName("MsgDelegate") + fd_MsgDelegate_sender = md_MsgDelegate.Fields().ByName("sender") + fd_MsgDelegate_validator_address = md_MsgDelegate.Fields().ByName("validator_address") + fd_MsgDelegate_amount = md_MsgDelegate.Fields().ByName("amount") +} + +var _ protoreflect.Message = (*fastReflection_MsgDelegate)(nil) + +type fastReflection_MsgDelegate MsgDelegate + +func (x *MsgDelegate) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgDelegate)(x) +} + +func (x *MsgDelegate) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_lockup_tx_proto_msgTypes[4] + 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) +} + +var _fastReflection_MsgDelegate_messageType fastReflection_MsgDelegate_messageType +var _ protoreflect.MessageType = fastReflection_MsgDelegate_messageType{} + +type fastReflection_MsgDelegate_messageType struct{} + +func (x fastReflection_MsgDelegate_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgDelegate)(nil) +} +func (x fastReflection_MsgDelegate_messageType) New() protoreflect.Message { + return new(fastReflection_MsgDelegate) +} +func (x fastReflection_MsgDelegate_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgDelegate +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgDelegate) Descriptor() protoreflect.MessageDescriptor { + return md_MsgDelegate +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgDelegate) Type() protoreflect.MessageType { + return _fastReflection_MsgDelegate_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgDelegate) New() protoreflect.Message { + return new(fastReflection_MsgDelegate) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgDelegate) Interface() protoreflect.ProtoMessage { + return (*MsgDelegate)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgDelegate) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Sender != "" { + value := protoreflect.ValueOfString(x.Sender) + if !f(fd_MsgDelegate_sender, value) { + return + } + } + if x.ValidatorAddress != "" { + value := protoreflect.ValueOfString(x.ValidatorAddress) + if !f(fd_MsgDelegate_validator_address, value) { + return + } + } + if x.Amount != nil { + value := protoreflect.ValueOfMessage(x.Amount.ProtoReflect()) + if !f(fd_MsgDelegate_amount, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgDelegate) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.lockup.MsgDelegate.sender": + return x.Sender != "" + case "cosmos.lockup.MsgDelegate.validator_address": + return x.ValidatorAddress != "" + case "cosmos.lockup.MsgDelegate.amount": + return x.Amount != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgDelegate")) + } + panic(fmt.Errorf("message cosmos.lockup.MsgDelegate does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgDelegate) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.lockup.MsgDelegate.sender": + x.Sender = "" + case "cosmos.lockup.MsgDelegate.validator_address": + x.ValidatorAddress = "" + case "cosmos.lockup.MsgDelegate.amount": + x.Amount = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgDelegate")) + } + panic(fmt.Errorf("message cosmos.lockup.MsgDelegate does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgDelegate) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.lockup.MsgDelegate.sender": + value := x.Sender + return protoreflect.ValueOfString(value) + case "cosmos.lockup.MsgDelegate.validator_address": + value := x.ValidatorAddress + return protoreflect.ValueOfString(value) + case "cosmos.lockup.MsgDelegate.amount": + value := x.Amount + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgDelegate")) + } + panic(fmt.Errorf("message cosmos.lockup.MsgDelegate does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgDelegate) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.lockup.MsgDelegate.sender": + x.Sender = value.Interface().(string) + case "cosmos.lockup.MsgDelegate.validator_address": + x.ValidatorAddress = value.Interface().(string) + case "cosmos.lockup.MsgDelegate.amount": + x.Amount = value.Message().Interface().(*v1beta1.Coin) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgDelegate")) + } + panic(fmt.Errorf("message cosmos.lockup.MsgDelegate does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgDelegate) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.lockup.MsgDelegate.amount": + if x.Amount == nil { + x.Amount = new(v1beta1.Coin) + } + return protoreflect.ValueOfMessage(x.Amount.ProtoReflect()) + case "cosmos.lockup.MsgDelegate.sender": + panic(fmt.Errorf("field sender of message cosmos.lockup.MsgDelegate is not mutable")) + case "cosmos.lockup.MsgDelegate.validator_address": + panic(fmt.Errorf("field validator_address of message cosmos.lockup.MsgDelegate is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgDelegate")) + } + panic(fmt.Errorf("message cosmos.lockup.MsgDelegate does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgDelegate) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.lockup.MsgDelegate.sender": + return protoreflect.ValueOfString("") + case "cosmos.lockup.MsgDelegate.validator_address": + return protoreflect.ValueOfString("") + case "cosmos.lockup.MsgDelegate.amount": + m := new(v1beta1.Coin) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgDelegate")) + } + panic(fmt.Errorf("message cosmos.lockup.MsgDelegate does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgDelegate) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.lockup.MsgDelegate", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgDelegate) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgDelegate) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgDelegate) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgDelegate) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgDelegate) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Sender) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.ValidatorAddress) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Amount != nil { + l = options.Size(x.Amount) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgDelegate) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Amount != nil { + encoded, err := options.Marshal(x.Amount) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x1a + } + if len(x.ValidatorAddress) > 0 { + i -= len(x.ValidatorAddress) + copy(dAtA[i:], x.ValidatorAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ValidatorAddress))) + i-- + dAtA[i] = 0x12 + } + if len(x.Sender) > 0 { + i -= len(x.Sender) + copy(dAtA[i:], x.Sender) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Sender))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgDelegate) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgDelegate: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgDelegate: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.ValidatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Amount == nil { + x.Amount = &v1beta1.Coin{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Amount); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgUndelegate protoreflect.MessageDescriptor + fd_MsgUndelegate_sender protoreflect.FieldDescriptor + fd_MsgUndelegate_validator_address protoreflect.FieldDescriptor + fd_MsgUndelegate_amount protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_lockup_tx_proto_init() + md_MsgUndelegate = File_cosmos_lockup_tx_proto.Messages().ByName("MsgUndelegate") + fd_MsgUndelegate_sender = md_MsgUndelegate.Fields().ByName("sender") + fd_MsgUndelegate_validator_address = md_MsgUndelegate.Fields().ByName("validator_address") + fd_MsgUndelegate_amount = md_MsgUndelegate.Fields().ByName("amount") +} + +var _ protoreflect.Message = (*fastReflection_MsgUndelegate)(nil) + +type fastReflection_MsgUndelegate MsgUndelegate + +func (x *MsgUndelegate) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgUndelegate)(x) +} + +func (x *MsgUndelegate) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_lockup_tx_proto_msgTypes[5] + 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) +} + +var _fastReflection_MsgUndelegate_messageType fastReflection_MsgUndelegate_messageType +var _ protoreflect.MessageType = fastReflection_MsgUndelegate_messageType{} + +type fastReflection_MsgUndelegate_messageType struct{} + +func (x fastReflection_MsgUndelegate_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgUndelegate)(nil) +} +func (x fastReflection_MsgUndelegate_messageType) New() protoreflect.Message { + return new(fastReflection_MsgUndelegate) +} +func (x fastReflection_MsgUndelegate_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUndelegate +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgUndelegate) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUndelegate +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgUndelegate) Type() protoreflect.MessageType { + return _fastReflection_MsgUndelegate_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgUndelegate) New() protoreflect.Message { + return new(fastReflection_MsgUndelegate) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgUndelegate) Interface() protoreflect.ProtoMessage { + return (*MsgUndelegate)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgUndelegate) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Sender != "" { + value := protoreflect.ValueOfString(x.Sender) + if !f(fd_MsgUndelegate_sender, value) { + return + } + } + if x.ValidatorAddress != "" { + value := protoreflect.ValueOfString(x.ValidatorAddress) + if !f(fd_MsgUndelegate_validator_address, value) { + return + } + } + if x.Amount != nil { + value := protoreflect.ValueOfMessage(x.Amount.ProtoReflect()) + if !f(fd_MsgUndelegate_amount, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgUndelegate) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.lockup.MsgUndelegate.sender": + return x.Sender != "" + case "cosmos.lockup.MsgUndelegate.validator_address": + return x.ValidatorAddress != "" + case "cosmos.lockup.MsgUndelegate.amount": + return x.Amount != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgUndelegate")) + } + panic(fmt.Errorf("message cosmos.lockup.MsgUndelegate does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgUndelegate) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.lockup.MsgUndelegate.sender": + x.Sender = "" + case "cosmos.lockup.MsgUndelegate.validator_address": + x.ValidatorAddress = "" + case "cosmos.lockup.MsgUndelegate.amount": + x.Amount = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgUndelegate")) + } + panic(fmt.Errorf("message cosmos.lockup.MsgUndelegate does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgUndelegate) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.lockup.MsgUndelegate.sender": + value := x.Sender + return protoreflect.ValueOfString(value) + case "cosmos.lockup.MsgUndelegate.validator_address": + value := x.ValidatorAddress + return protoreflect.ValueOfString(value) + case "cosmos.lockup.MsgUndelegate.amount": + value := x.Amount + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgUndelegate")) + } + panic(fmt.Errorf("message cosmos.lockup.MsgUndelegate does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgUndelegate) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.lockup.MsgUndelegate.sender": + x.Sender = value.Interface().(string) + case "cosmos.lockup.MsgUndelegate.validator_address": + x.ValidatorAddress = value.Interface().(string) + case "cosmos.lockup.MsgUndelegate.amount": + x.Amount = value.Message().Interface().(*v1beta1.Coin) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgUndelegate")) + } + panic(fmt.Errorf("message cosmos.lockup.MsgUndelegate does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgUndelegate) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.lockup.MsgUndelegate.amount": + if x.Amount == nil { + x.Amount = new(v1beta1.Coin) + } + return protoreflect.ValueOfMessage(x.Amount.ProtoReflect()) + case "cosmos.lockup.MsgUndelegate.sender": + panic(fmt.Errorf("field sender of message cosmos.lockup.MsgUndelegate is not mutable")) + case "cosmos.lockup.MsgUndelegate.validator_address": + panic(fmt.Errorf("field validator_address of message cosmos.lockup.MsgUndelegate is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgUndelegate")) + } + panic(fmt.Errorf("message cosmos.lockup.MsgUndelegate does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgUndelegate) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.lockup.MsgUndelegate.sender": + return protoreflect.ValueOfString("") + case "cosmos.lockup.MsgUndelegate.validator_address": + return protoreflect.ValueOfString("") + case "cosmos.lockup.MsgUndelegate.amount": + m := new(v1beta1.Coin) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgUndelegate")) + } + panic(fmt.Errorf("message cosmos.lockup.MsgUndelegate does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgUndelegate) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.lockup.MsgUndelegate", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgUndelegate) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgUndelegate) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgUndelegate) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgUndelegate) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgUndelegate) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Sender) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.ValidatorAddress) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Amount != nil { + l = options.Size(x.Amount) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgUndelegate) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Amount != nil { + encoded, err := options.Marshal(x.Amount) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x1a + } + if len(x.ValidatorAddress) > 0 { + i -= len(x.ValidatorAddress) + copy(dAtA[i:], x.ValidatorAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ValidatorAddress))) + i-- + dAtA[i] = 0x12 + } + if len(x.Sender) > 0 { + i -= len(x.Sender) + copy(dAtA[i:], x.Sender) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Sender))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgUndelegate) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUndelegate: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUndelegate: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.ValidatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Amount == nil { + x.Amount = &v1beta1.Coin{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Amount); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_MsgSend_3_list)(nil) + +type _MsgSend_3_list struct { + list *[]*v1beta1.Coin +} + +func (x *_MsgSend_3_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_MsgSend_3_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_MsgSend_3_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + (*x.list)[i] = concreteValue +} + +func (x *_MsgSend_3_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + *x.list = append(*x.list, concreteValue) +} + +func (x *_MsgSend_3_list) AppendMutable() protoreflect.Value { + v := new(v1beta1.Coin) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgSend_3_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_MsgSend_3_list) NewElement() protoreflect.Value { + v := new(v1beta1.Coin) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgSend_3_list) IsValid() bool { + return x.list != nil +} + +var ( + md_MsgSend protoreflect.MessageDescriptor + fd_MsgSend_sender protoreflect.FieldDescriptor + fd_MsgSend_to_address protoreflect.FieldDescriptor + fd_MsgSend_amount protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_lockup_tx_proto_init() + md_MsgSend = File_cosmos_lockup_tx_proto.Messages().ByName("MsgSend") + fd_MsgSend_sender = md_MsgSend.Fields().ByName("sender") + fd_MsgSend_to_address = md_MsgSend.Fields().ByName("to_address") + fd_MsgSend_amount = md_MsgSend.Fields().ByName("amount") +} + +var _ protoreflect.Message = (*fastReflection_MsgSend)(nil) + +type fastReflection_MsgSend MsgSend + +func (x *MsgSend) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgSend)(x) +} + +func (x *MsgSend) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_lockup_tx_proto_msgTypes[6] + 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) +} + +var _fastReflection_MsgSend_messageType fastReflection_MsgSend_messageType +var _ protoreflect.MessageType = fastReflection_MsgSend_messageType{} + +type fastReflection_MsgSend_messageType struct{} + +func (x fastReflection_MsgSend_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgSend)(nil) +} +func (x fastReflection_MsgSend_messageType) New() protoreflect.Message { + return new(fastReflection_MsgSend) +} +func (x fastReflection_MsgSend_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgSend +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgSend) Descriptor() protoreflect.MessageDescriptor { + return md_MsgSend +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgSend) Type() protoreflect.MessageType { + return _fastReflection_MsgSend_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgSend) New() protoreflect.Message { + return new(fastReflection_MsgSend) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgSend) Interface() protoreflect.ProtoMessage { + return (*MsgSend)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgSend) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Sender != "" { + value := protoreflect.ValueOfString(x.Sender) + if !f(fd_MsgSend_sender, value) { + return + } + } + if x.ToAddress != "" { + value := protoreflect.ValueOfString(x.ToAddress) + if !f(fd_MsgSend_to_address, value) { + return + } + } + if len(x.Amount) != 0 { + value := protoreflect.ValueOfList(&_MsgSend_3_list{list: &x.Amount}) + if !f(fd_MsgSend_amount, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgSend) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.lockup.MsgSend.sender": + return x.Sender != "" + case "cosmos.lockup.MsgSend.to_address": + return x.ToAddress != "" + case "cosmos.lockup.MsgSend.amount": + return len(x.Amount) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgSend")) + } + panic(fmt.Errorf("message cosmos.lockup.MsgSend does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgSend) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.lockup.MsgSend.sender": + x.Sender = "" + case "cosmos.lockup.MsgSend.to_address": + x.ToAddress = "" + case "cosmos.lockup.MsgSend.amount": + x.Amount = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgSend")) + } + panic(fmt.Errorf("message cosmos.lockup.MsgSend does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgSend) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.lockup.MsgSend.sender": + value := x.Sender + return protoreflect.ValueOfString(value) + case "cosmos.lockup.MsgSend.to_address": + value := x.ToAddress + return protoreflect.ValueOfString(value) + case "cosmos.lockup.MsgSend.amount": + if len(x.Amount) == 0 { + return protoreflect.ValueOfList(&_MsgSend_3_list{}) + } + listValue := &_MsgSend_3_list{list: &x.Amount} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgSend")) + } + panic(fmt.Errorf("message cosmos.lockup.MsgSend does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgSend) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.lockup.MsgSend.sender": + x.Sender = value.Interface().(string) + case "cosmos.lockup.MsgSend.to_address": + x.ToAddress = value.Interface().(string) + case "cosmos.lockup.MsgSend.amount": + lv := value.List() + clv := lv.(*_MsgSend_3_list) + x.Amount = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgSend")) + } + panic(fmt.Errorf("message cosmos.lockup.MsgSend does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgSend) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.lockup.MsgSend.amount": + if x.Amount == nil { + x.Amount = []*v1beta1.Coin{} + } + value := &_MsgSend_3_list{list: &x.Amount} + return protoreflect.ValueOfList(value) + case "cosmos.lockup.MsgSend.sender": + panic(fmt.Errorf("field sender of message cosmos.lockup.MsgSend is not mutable")) + case "cosmos.lockup.MsgSend.to_address": + panic(fmt.Errorf("field to_address of message cosmos.lockup.MsgSend is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgSend")) + } + panic(fmt.Errorf("message cosmos.lockup.MsgSend does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgSend) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.lockup.MsgSend.sender": + return protoreflect.ValueOfString("") + case "cosmos.lockup.MsgSend.to_address": + return protoreflect.ValueOfString("") + case "cosmos.lockup.MsgSend.amount": + list := []*v1beta1.Coin{} + return protoreflect.ValueOfList(&_MsgSend_3_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgSend")) + } + panic(fmt.Errorf("message cosmos.lockup.MsgSend does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgSend) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.lockup.MsgSend", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgSend) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgSend) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgSend) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgSend) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgSend) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Sender) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.ToAddress) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.Amount) > 0 { + for _, e := range x.Amount { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgSend) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Amount) > 0 { + for iNdEx := len(x.Amount) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Amount[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x1a + } + } + if len(x.ToAddress) > 0 { + i -= len(x.ToAddress) + copy(dAtA[i:], x.ToAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ToAddress))) + i-- + dAtA[i] = 0x12 + } + if len(x.Sender) > 0 { + i -= len(x.Sender) + copy(dAtA[i:], x.Sender) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Sender))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgSend) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSend: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSend: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ToAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.ToAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Amount = append(x.Amount, &v1beta1.Coin{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Amount[len(x.Amount)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_MsgExecuteMessagesResponse_1_list)(nil) + +type _MsgExecuteMessagesResponse_1_list struct { + list *[]*anypb.Any +} + +func (x *_MsgExecuteMessagesResponse_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_MsgExecuteMessagesResponse_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_MsgExecuteMessagesResponse_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*anypb.Any) + (*x.list)[i] = concreteValue +} + +func (x *_MsgExecuteMessagesResponse_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*anypb.Any) + *x.list = append(*x.list, concreteValue) +} + +func (x *_MsgExecuteMessagesResponse_1_list) AppendMutable() protoreflect.Value { + v := new(anypb.Any) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgExecuteMessagesResponse_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_MsgExecuteMessagesResponse_1_list) NewElement() protoreflect.Value { + v := new(anypb.Any) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgExecuteMessagesResponse_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_MsgExecuteMessagesResponse protoreflect.MessageDescriptor + fd_MsgExecuteMessagesResponse_responses protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_lockup_tx_proto_init() + md_MsgExecuteMessagesResponse = File_cosmos_lockup_tx_proto.Messages().ByName("MsgExecuteMessagesResponse") + fd_MsgExecuteMessagesResponse_responses = md_MsgExecuteMessagesResponse.Fields().ByName("responses") +} + +var _ protoreflect.Message = (*fastReflection_MsgExecuteMessagesResponse)(nil) + +type fastReflection_MsgExecuteMessagesResponse MsgExecuteMessagesResponse + +func (x *MsgExecuteMessagesResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgExecuteMessagesResponse)(x) +} + +func (x *MsgExecuteMessagesResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_lockup_tx_proto_msgTypes[7] + 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) +} + +var _fastReflection_MsgExecuteMessagesResponse_messageType fastReflection_MsgExecuteMessagesResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgExecuteMessagesResponse_messageType{} + +type fastReflection_MsgExecuteMessagesResponse_messageType struct{} + +func (x fastReflection_MsgExecuteMessagesResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgExecuteMessagesResponse)(nil) +} +func (x fastReflection_MsgExecuteMessagesResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgExecuteMessagesResponse) +} +func (x fastReflection_MsgExecuteMessagesResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgExecuteMessagesResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgExecuteMessagesResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgExecuteMessagesResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgExecuteMessagesResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgExecuteMessagesResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgExecuteMessagesResponse) New() protoreflect.Message { + return new(fastReflection_MsgExecuteMessagesResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgExecuteMessagesResponse) Interface() protoreflect.ProtoMessage { + return (*MsgExecuteMessagesResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgExecuteMessagesResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Responses) != 0 { + value := protoreflect.ValueOfList(&_MsgExecuteMessagesResponse_1_list{list: &x.Responses}) + if !f(fd_MsgExecuteMessagesResponse_responses, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgExecuteMessagesResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.lockup.MsgExecuteMessagesResponse.responses": + return len(x.Responses) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgExecuteMessagesResponse")) + } + panic(fmt.Errorf("message cosmos.lockup.MsgExecuteMessagesResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgExecuteMessagesResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.lockup.MsgExecuteMessagesResponse.responses": + x.Responses = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgExecuteMessagesResponse")) + } + panic(fmt.Errorf("message cosmos.lockup.MsgExecuteMessagesResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgExecuteMessagesResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.lockup.MsgExecuteMessagesResponse.responses": + if len(x.Responses) == 0 { + return protoreflect.ValueOfList(&_MsgExecuteMessagesResponse_1_list{}) + } + listValue := &_MsgExecuteMessagesResponse_1_list{list: &x.Responses} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgExecuteMessagesResponse")) + } + panic(fmt.Errorf("message cosmos.lockup.MsgExecuteMessagesResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgExecuteMessagesResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.lockup.MsgExecuteMessagesResponse.responses": + lv := value.List() + clv := lv.(*_MsgExecuteMessagesResponse_1_list) + x.Responses = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgExecuteMessagesResponse")) + } + panic(fmt.Errorf("message cosmos.lockup.MsgExecuteMessagesResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgExecuteMessagesResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.lockup.MsgExecuteMessagesResponse.responses": + if x.Responses == nil { + x.Responses = []*anypb.Any{} + } + value := &_MsgExecuteMessagesResponse_1_list{list: &x.Responses} + return protoreflect.ValueOfList(value) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgExecuteMessagesResponse")) + } + panic(fmt.Errorf("message cosmos.lockup.MsgExecuteMessagesResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgExecuteMessagesResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.lockup.MsgExecuteMessagesResponse.responses": + list := []*anypb.Any{} + return protoreflect.ValueOfList(&_MsgExecuteMessagesResponse_1_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgExecuteMessagesResponse")) + } + panic(fmt.Errorf("message cosmos.lockup.MsgExecuteMessagesResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgExecuteMessagesResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.lockup.MsgExecuteMessagesResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgExecuteMessagesResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgExecuteMessagesResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgExecuteMessagesResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgExecuteMessagesResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgExecuteMessagesResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if len(x.Responses) > 0 { + for _, e := range x.Responses { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgExecuteMessagesResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Responses) > 0 { + for iNdEx := len(x.Responses) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Responses[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgExecuteMessagesResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgExecuteMessagesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgExecuteMessagesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Responses", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Responses = append(x.Responses, &anypb.Any{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Responses[len(x.Responses)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_MsgWithdraw_3_list)(nil) + +type _MsgWithdraw_3_list struct { + list *[]string +} + +func (x *_MsgWithdraw_3_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_MsgWithdraw_3_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfString((*x.list)[i]) +} + +func (x *_MsgWithdraw_3_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_MsgWithdraw_3_list) Append(value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_MsgWithdraw_3_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message MsgWithdraw at list field Denoms as it is not of Message kind")) +} + +func (x *_MsgWithdraw_3_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_MsgWithdraw_3_list) NewElement() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_MsgWithdraw_3_list) IsValid() bool { + return x.list != nil +} + +var ( + md_MsgWithdraw protoreflect.MessageDescriptor + fd_MsgWithdraw_withdrawer protoreflect.FieldDescriptor + fd_MsgWithdraw_to_address protoreflect.FieldDescriptor + fd_MsgWithdraw_denoms protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_lockup_tx_proto_init() + md_MsgWithdraw = File_cosmos_lockup_tx_proto.Messages().ByName("MsgWithdraw") + fd_MsgWithdraw_withdrawer = md_MsgWithdraw.Fields().ByName("withdrawer") + fd_MsgWithdraw_to_address = md_MsgWithdraw.Fields().ByName("to_address") + fd_MsgWithdraw_denoms = md_MsgWithdraw.Fields().ByName("denoms") +} + +var _ protoreflect.Message = (*fastReflection_MsgWithdraw)(nil) + +type fastReflection_MsgWithdraw MsgWithdraw + +func (x *MsgWithdraw) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgWithdraw)(x) +} + +func (x *MsgWithdraw) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_lockup_tx_proto_msgTypes[8] + 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) +} + +var _fastReflection_MsgWithdraw_messageType fastReflection_MsgWithdraw_messageType +var _ protoreflect.MessageType = fastReflection_MsgWithdraw_messageType{} + +type fastReflection_MsgWithdraw_messageType struct{} + +func (x fastReflection_MsgWithdraw_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgWithdraw)(nil) +} +func (x fastReflection_MsgWithdraw_messageType) New() protoreflect.Message { + return new(fastReflection_MsgWithdraw) +} +func (x fastReflection_MsgWithdraw_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgWithdraw +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgWithdraw) Descriptor() protoreflect.MessageDescriptor { + return md_MsgWithdraw +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgWithdraw) Type() protoreflect.MessageType { + return _fastReflection_MsgWithdraw_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgWithdraw) New() protoreflect.Message { + return new(fastReflection_MsgWithdraw) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgWithdraw) Interface() protoreflect.ProtoMessage { + return (*MsgWithdraw)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgWithdraw) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Withdrawer != "" { + value := protoreflect.ValueOfString(x.Withdrawer) + if !f(fd_MsgWithdraw_withdrawer, value) { + return + } + } + if x.ToAddress != "" { + value := protoreflect.ValueOfString(x.ToAddress) + if !f(fd_MsgWithdraw_to_address, value) { + return + } + } + if len(x.Denoms) != 0 { + value := protoreflect.ValueOfList(&_MsgWithdraw_3_list{list: &x.Denoms}) + if !f(fd_MsgWithdraw_denoms, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgWithdraw) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.lockup.MsgWithdraw.withdrawer": + return x.Withdrawer != "" + case "cosmos.lockup.MsgWithdraw.to_address": + return x.ToAddress != "" + case "cosmos.lockup.MsgWithdraw.denoms": + return len(x.Denoms) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgWithdraw")) + } + panic(fmt.Errorf("message cosmos.lockup.MsgWithdraw does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgWithdraw) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.lockup.MsgWithdraw.withdrawer": + x.Withdrawer = "" + case "cosmos.lockup.MsgWithdraw.to_address": + x.ToAddress = "" + case "cosmos.lockup.MsgWithdraw.denoms": + x.Denoms = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgWithdraw")) + } + panic(fmt.Errorf("message cosmos.lockup.MsgWithdraw does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgWithdraw) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.lockup.MsgWithdraw.withdrawer": + value := x.Withdrawer + return protoreflect.ValueOfString(value) + case "cosmos.lockup.MsgWithdraw.to_address": + value := x.ToAddress + return protoreflect.ValueOfString(value) + case "cosmos.lockup.MsgWithdraw.denoms": + if len(x.Denoms) == 0 { + return protoreflect.ValueOfList(&_MsgWithdraw_3_list{}) + } + listValue := &_MsgWithdraw_3_list{list: &x.Denoms} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgWithdraw")) + } + panic(fmt.Errorf("message cosmos.lockup.MsgWithdraw does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgWithdraw) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.lockup.MsgWithdraw.withdrawer": + x.Withdrawer = value.Interface().(string) + case "cosmos.lockup.MsgWithdraw.to_address": + x.ToAddress = value.Interface().(string) + case "cosmos.lockup.MsgWithdraw.denoms": + lv := value.List() + clv := lv.(*_MsgWithdraw_3_list) + x.Denoms = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgWithdraw")) + } + panic(fmt.Errorf("message cosmos.lockup.MsgWithdraw does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgWithdraw) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.lockup.MsgWithdraw.denoms": + if x.Denoms == nil { + x.Denoms = []string{} + } + value := &_MsgWithdraw_3_list{list: &x.Denoms} + return protoreflect.ValueOfList(value) + case "cosmos.lockup.MsgWithdraw.withdrawer": + panic(fmt.Errorf("field withdrawer of message cosmos.lockup.MsgWithdraw is not mutable")) + case "cosmos.lockup.MsgWithdraw.to_address": + panic(fmt.Errorf("field to_address of message cosmos.lockup.MsgWithdraw is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgWithdraw")) + } + panic(fmt.Errorf("message cosmos.lockup.MsgWithdraw does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgWithdraw) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.lockup.MsgWithdraw.withdrawer": + return protoreflect.ValueOfString("") + case "cosmos.lockup.MsgWithdraw.to_address": + return protoreflect.ValueOfString("") + case "cosmos.lockup.MsgWithdraw.denoms": + list := []string{} + return protoreflect.ValueOfList(&_MsgWithdraw_3_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgWithdraw")) + } + panic(fmt.Errorf("message cosmos.lockup.MsgWithdraw does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgWithdraw) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.lockup.MsgWithdraw", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgWithdraw) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgWithdraw) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgWithdraw) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgWithdraw) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgWithdraw) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Withdrawer) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.ToAddress) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.Denoms) > 0 { + for _, s := range x.Denoms { + l = len(s) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgWithdraw) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Denoms) > 0 { + for iNdEx := len(x.Denoms) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.Denoms[iNdEx]) + copy(dAtA[i:], x.Denoms[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Denoms[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } + if len(x.ToAddress) > 0 { + i -= len(x.ToAddress) + copy(dAtA[i:], x.ToAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ToAddress))) + i-- + dAtA[i] = 0x12 + } + if len(x.Withdrawer) > 0 { + i -= len(x.Withdrawer) + copy(dAtA[i:], x.Withdrawer) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Withdrawer))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgWithdraw) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgWithdraw: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgWithdraw: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Withdrawer", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Withdrawer = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ToAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.ToAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Denoms", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Denoms = append(x.Denoms, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_MsgWithdrawResponse_2_list)(nil) + +type _MsgWithdrawResponse_2_list struct { + list *[]*v1beta1.Coin +} + +func (x *_MsgWithdrawResponse_2_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_MsgWithdrawResponse_2_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_MsgWithdrawResponse_2_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + (*x.list)[i] = concreteValue +} + +func (x *_MsgWithdrawResponse_2_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + *x.list = append(*x.list, concreteValue) +} + +func (x *_MsgWithdrawResponse_2_list) AppendMutable() protoreflect.Value { + v := new(v1beta1.Coin) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgWithdrawResponse_2_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_MsgWithdrawResponse_2_list) NewElement() protoreflect.Value { + v := new(v1beta1.Coin) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgWithdrawResponse_2_list) IsValid() bool { + return x.list != nil +} + +var ( + md_MsgWithdrawResponse protoreflect.MessageDescriptor + fd_MsgWithdrawResponse_reciever protoreflect.FieldDescriptor + fd_MsgWithdrawResponse_amount_received protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_lockup_tx_proto_init() + md_MsgWithdrawResponse = File_cosmos_lockup_tx_proto.Messages().ByName("MsgWithdrawResponse") + fd_MsgWithdrawResponse_reciever = md_MsgWithdrawResponse.Fields().ByName("reciever") + fd_MsgWithdrawResponse_amount_received = md_MsgWithdrawResponse.Fields().ByName("amount_received") +} + +var _ protoreflect.Message = (*fastReflection_MsgWithdrawResponse)(nil) + +type fastReflection_MsgWithdrawResponse MsgWithdrawResponse + +func (x *MsgWithdrawResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgWithdrawResponse)(x) +} + +func (x *MsgWithdrawResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_lockup_tx_proto_msgTypes[9] + 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) +} + +var _fastReflection_MsgWithdrawResponse_messageType fastReflection_MsgWithdrawResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgWithdrawResponse_messageType{} + +type fastReflection_MsgWithdrawResponse_messageType struct{} + +func (x fastReflection_MsgWithdrawResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgWithdrawResponse)(nil) +} +func (x fastReflection_MsgWithdrawResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgWithdrawResponse) +} +func (x fastReflection_MsgWithdrawResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgWithdrawResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgWithdrawResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgWithdrawResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgWithdrawResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgWithdrawResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgWithdrawResponse) New() protoreflect.Message { + return new(fastReflection_MsgWithdrawResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgWithdrawResponse) Interface() protoreflect.ProtoMessage { + return (*MsgWithdrawResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgWithdrawResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Reciever != "" { + value := protoreflect.ValueOfString(x.Reciever) + if !f(fd_MsgWithdrawResponse_reciever, value) { + return + } + } + if len(x.AmountReceived) != 0 { + value := protoreflect.ValueOfList(&_MsgWithdrawResponse_2_list{list: &x.AmountReceived}) + if !f(fd_MsgWithdrawResponse_amount_received, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgWithdrawResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.lockup.MsgWithdrawResponse.reciever": + return x.Reciever != "" + case "cosmos.lockup.MsgWithdrawResponse.amount_received": + return len(x.AmountReceived) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgWithdrawResponse")) + } + panic(fmt.Errorf("message cosmos.lockup.MsgWithdrawResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgWithdrawResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.lockup.MsgWithdrawResponse.reciever": + x.Reciever = "" + case "cosmos.lockup.MsgWithdrawResponse.amount_received": + x.AmountReceived = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgWithdrawResponse")) + } + panic(fmt.Errorf("message cosmos.lockup.MsgWithdrawResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgWithdrawResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.lockup.MsgWithdrawResponse.reciever": + value := x.Reciever + return protoreflect.ValueOfString(value) + case "cosmos.lockup.MsgWithdrawResponse.amount_received": + if len(x.AmountReceived) == 0 { + return protoreflect.ValueOfList(&_MsgWithdrawResponse_2_list{}) + } + listValue := &_MsgWithdrawResponse_2_list{list: &x.AmountReceived} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgWithdrawResponse")) + } + panic(fmt.Errorf("message cosmos.lockup.MsgWithdrawResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgWithdrawResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.lockup.MsgWithdrawResponse.reciever": + x.Reciever = value.Interface().(string) + case "cosmos.lockup.MsgWithdrawResponse.amount_received": + lv := value.List() + clv := lv.(*_MsgWithdrawResponse_2_list) + x.AmountReceived = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgWithdrawResponse")) + } + panic(fmt.Errorf("message cosmos.lockup.MsgWithdrawResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgWithdrawResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.lockup.MsgWithdrawResponse.amount_received": + if x.AmountReceived == nil { + x.AmountReceived = []*v1beta1.Coin{} + } + value := &_MsgWithdrawResponse_2_list{list: &x.AmountReceived} + return protoreflect.ValueOfList(value) + case "cosmos.lockup.MsgWithdrawResponse.reciever": + panic(fmt.Errorf("field reciever of message cosmos.lockup.MsgWithdrawResponse is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgWithdrawResponse")) + } + panic(fmt.Errorf("message cosmos.lockup.MsgWithdrawResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgWithdrawResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.lockup.MsgWithdrawResponse.reciever": + return protoreflect.ValueOfString("") + case "cosmos.lockup.MsgWithdrawResponse.amount_received": + list := []*v1beta1.Coin{} + return protoreflect.ValueOfList(&_MsgWithdrawResponse_2_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgWithdrawResponse")) + } + panic(fmt.Errorf("message cosmos.lockup.MsgWithdrawResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgWithdrawResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.lockup.MsgWithdrawResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgWithdrawResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgWithdrawResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgWithdrawResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgWithdrawResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgWithdrawResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Reciever) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.AmountReceived) > 0 { + for _, e := range x.AmountReceived { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgWithdrawResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.AmountReceived) > 0 { + for iNdEx := len(x.AmountReceived) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.AmountReceived[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + } + if len(x.Reciever) > 0 { + i -= len(x.Reciever) + copy(dAtA[i:], x.Reciever) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Reciever))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgWithdrawResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgWithdrawResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgWithdrawResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Reciever", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Reciever = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AmountReceived", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.AmountReceived = append(x.AmountReceived, &v1beta1.Coin{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.AmountReceived[len(x.AmountReceived)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: cosmos/lockup/tx.proto + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// MsgInitLockupAccount defines a message that enables creating a lockup +// account. +type MsgInitLockupAccount struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // owner of the vesting account + Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"` + // end of lockup + EndTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` + // start of lockup + StartTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` +} + +func (x *MsgInitLockupAccount) Reset() { + *x = MsgInitLockupAccount{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_lockup_tx_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgInitLockupAccount) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgInitLockupAccount) ProtoMessage() {} + +// Deprecated: Use MsgInitLockupAccount.ProtoReflect.Descriptor instead. +func (*MsgInitLockupAccount) Descriptor() ([]byte, []int) { + return file_cosmos_lockup_tx_proto_rawDescGZIP(), []int{0} +} + +func (x *MsgInitLockupAccount) GetOwner() string { + if x != nil { + return x.Owner + } + return "" +} + +func (x *MsgInitLockupAccount) GetEndTime() *timestamppb.Timestamp { + if x != nil { + return x.EndTime + } + return nil +} + +func (x *MsgInitLockupAccount) GetStartTime() *timestamppb.Timestamp { + if x != nil { + return x.StartTime + } + return nil +} + +// MsgInitLockupAccountResponse defines the Msg/InitLockupAccount response type. +type MsgInitLockupAccountResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgInitLockupAccountResponse) Reset() { + *x = MsgInitLockupAccountResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_lockup_tx_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgInitLockupAccountResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgInitLockupAccountResponse) ProtoMessage() {} + +// Deprecated: Use MsgInitLockupAccountResponse.ProtoReflect.Descriptor instead. +func (*MsgInitLockupAccountResponse) Descriptor() ([]byte, []int) { + return file_cosmos_lockup_tx_proto_rawDescGZIP(), []int{1} +} + +// MsgInitPeriodicLockingAccount defines a message that enables creating a periodic locking +// account. +type MsgInitPeriodicLockingAccount struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // owner of the lockup account + Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"` + // start of lockup + StartTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` + LockingPeriods []*Period `protobuf:"bytes,3,rep,name=locking_periods,json=lockingPeriods,proto3" json:"locking_periods,omitempty"` +} + +func (x *MsgInitPeriodicLockingAccount) Reset() { + *x = MsgInitPeriodicLockingAccount{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_lockup_tx_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgInitPeriodicLockingAccount) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgInitPeriodicLockingAccount) ProtoMessage() {} + +// Deprecated: Use MsgInitPeriodicLockingAccount.ProtoReflect.Descriptor instead. +func (*MsgInitPeriodicLockingAccount) Descriptor() ([]byte, []int) { + return file_cosmos_lockup_tx_proto_rawDescGZIP(), []int{2} +} + +func (x *MsgInitPeriodicLockingAccount) GetOwner() string { + if x != nil { + return x.Owner + } + return "" +} + +func (x *MsgInitPeriodicLockingAccount) GetStartTime() *timestamppb.Timestamp { + if x != nil { + return x.StartTime + } + return nil +} + +func (x *MsgInitPeriodicLockingAccount) GetLockingPeriods() []*Period { + if x != nil { + return x.LockingPeriods + } + return nil +} + +// MsgInitPeriodicLockingAccountResponse defines the Msg/InitPeriodicLockingAccount +// response type. +type MsgInitPeriodicLockingAccountResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgInitPeriodicLockingAccountResponse) Reset() { + *x = MsgInitPeriodicLockingAccountResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_lockup_tx_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgInitPeriodicLockingAccountResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgInitPeriodicLockingAccountResponse) ProtoMessage() {} + +// Deprecated: Use MsgInitPeriodicLockingAccountResponse.ProtoReflect.Descriptor instead. +func (*MsgInitPeriodicLockingAccountResponse) Descriptor() ([]byte, []int) { + return file_cosmos_lockup_tx_proto_rawDescGZIP(), []int{3} +} + +// MsgDelegate defines a message that enable lockup account to execute delegate message +type MsgDelegate struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // sender is the owner of the lockup account + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` + Amount *v1beta1.Coin `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount,omitempty"` +} + +func (x *MsgDelegate) Reset() { + *x = MsgDelegate{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_lockup_tx_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgDelegate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgDelegate) ProtoMessage() {} + +// Deprecated: Use MsgDelegate.ProtoReflect.Descriptor instead. +func (*MsgDelegate) Descriptor() ([]byte, []int) { + return file_cosmos_lockup_tx_proto_rawDescGZIP(), []int{4} +} + +func (x *MsgDelegate) GetSender() string { + if x != nil { + return x.Sender + } + return "" +} + +func (x *MsgDelegate) GetValidatorAddress() string { + if x != nil { + return x.ValidatorAddress + } + return "" +} + +func (x *MsgDelegate) GetAmount() *v1beta1.Coin { + if x != nil { + return x.Amount + } + return nil +} + +// MsgUndelegate defines a message that enable lockup account to execute undelegate message +type MsgUndelegate struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` + Amount *v1beta1.Coin `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount,omitempty"` +} + +func (x *MsgUndelegate) Reset() { + *x = MsgUndelegate{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_lockup_tx_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgUndelegate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgUndelegate) ProtoMessage() {} + +// Deprecated: Use MsgUndelegate.ProtoReflect.Descriptor instead. +func (*MsgUndelegate) Descriptor() ([]byte, []int) { + return file_cosmos_lockup_tx_proto_rawDescGZIP(), []int{5} +} + +func (x *MsgUndelegate) GetSender() string { + if x != nil { + return x.Sender + } + return "" +} + +func (x *MsgUndelegate) GetValidatorAddress() string { + if x != nil { + return x.ValidatorAddress + } + return "" +} + +func (x *MsgUndelegate) GetAmount() *v1beta1.Coin { + if x != nil { + return x.Amount + } + return nil +} + +// MsgSend defines a message that enable lockup account to execute send message +type MsgSend struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + ToAddress string `protobuf:"bytes,2,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"` + Amount []*v1beta1.Coin `protobuf:"bytes,3,rep,name=amount,proto3" json:"amount,omitempty"` +} + +func (x *MsgSend) Reset() { + *x = MsgSend{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_lockup_tx_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgSend) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgSend) ProtoMessage() {} + +// Deprecated: Use MsgSend.ProtoReflect.Descriptor instead. +func (*MsgSend) Descriptor() ([]byte, []int) { + return file_cosmos_lockup_tx_proto_rawDescGZIP(), []int{6} +} + +func (x *MsgSend) GetSender() string { + if x != nil { + return x.Sender + } + return "" +} + +func (x *MsgSend) GetToAddress() string { + if x != nil { + return x.ToAddress + } + return "" +} + +func (x *MsgSend) GetAmount() []*v1beta1.Coin { + if x != nil { + return x.Amount + } + return nil +} + +// MsgExecuteMessagesResponse defines the response for lockup execute operations +type MsgExecuteMessagesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Responses []*anypb.Any `protobuf:"bytes,1,rep,name=responses,proto3" json:"responses,omitempty"` +} + +func (x *MsgExecuteMessagesResponse) Reset() { + *x = MsgExecuteMessagesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_lockup_tx_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgExecuteMessagesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgExecuteMessagesResponse) ProtoMessage() {} + +// Deprecated: Use MsgExecuteMessagesResponse.ProtoReflect.Descriptor instead. +func (*MsgExecuteMessagesResponse) Descriptor() ([]byte, []int) { + return file_cosmos_lockup_tx_proto_rawDescGZIP(), []int{7} +} + +func (x *MsgExecuteMessagesResponse) GetResponses() []*anypb.Any { + if x != nil { + return x.Responses + } + return nil +} + +// MsgWithdraw defines a message that the owner of the lockup can perform to withdraw unlocked token to an account of +// choice +type MsgWithdraw struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Withdrawer string `protobuf:"bytes,1,opt,name=withdrawer,proto3" json:"withdrawer,omitempty"` + ToAddress string `protobuf:"bytes,2,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"` + Denoms []string `protobuf:"bytes,3,rep,name=denoms,proto3" json:"denoms,omitempty"` +} + +func (x *MsgWithdraw) Reset() { + *x = MsgWithdraw{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_lockup_tx_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgWithdraw) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgWithdraw) ProtoMessage() {} + +// Deprecated: Use MsgWithdraw.ProtoReflect.Descriptor instead. +func (*MsgWithdraw) Descriptor() ([]byte, []int) { + return file_cosmos_lockup_tx_proto_rawDescGZIP(), []int{8} +} + +func (x *MsgWithdraw) GetWithdrawer() string { + if x != nil { + return x.Withdrawer + } + return "" +} + +func (x *MsgWithdraw) GetToAddress() string { + if x != nil { + return x.ToAddress + } + return "" +} + +func (x *MsgWithdraw) GetDenoms() []string { + if x != nil { + return x.Denoms + } + return nil +} + +// MsgWithdrawResponse defines the response for MsgWithdraw +type MsgWithdrawResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Reciever string `protobuf:"bytes,1,opt,name=reciever,proto3" json:"reciever,omitempty"` + AmountReceived []*v1beta1.Coin `protobuf:"bytes,2,rep,name=amount_received,json=amountReceived,proto3" json:"amount_received,omitempty"` +} + +func (x *MsgWithdrawResponse) Reset() { + *x = MsgWithdrawResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_lockup_tx_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgWithdrawResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgWithdrawResponse) ProtoMessage() {} + +// Deprecated: Use MsgWithdrawResponse.ProtoReflect.Descriptor instead. +func (*MsgWithdrawResponse) Descriptor() ([]byte, []int) { + return file_cosmos_lockup_tx_proto_rawDescGZIP(), []int{9} +} + +func (x *MsgWithdrawResponse) GetReciever() string { + if x != nil { + return x.Reciever + } + return "" +} + +func (x *MsgWithdrawResponse) GetAmountReceived() []*v1beta1.Coin { + if x != nil { + return x.AmountReceived + } + return nil +} + +var File_cosmos_lockup_tx_proto protoreflect.FileDescriptor + +var file_cosmos_lockup_tx_proto_rawDesc = []byte{ + 0x0a, 0x16, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x2f, + 0x74, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x6c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, + 0x6d, 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, + 0x63, 0x6f, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2f, 0x6c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x2f, 0x6c, 0x6f, 0x63, 0x6b, 0x75, 0x70, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, + 0x73, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x80, 0x02, 0x0a, + 0x14, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x69, 0x74, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2e, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x05, + 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x44, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x42, 0x0d, 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, 0xa8, 0xe7, 0xb0, + 0x2a, 0x01, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x48, 0x0a, 0x0a, 0x73, + 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x0d, 0xc8, 0xde, 0x1f, + 0x00, 0x90, 0xdf, 0x1f, 0x01, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, + 0x74, 0x54, 0x69, 0x6d, 0x65, 0x3a, 0x28, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x1f, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x4d, 0x73, 0x67, 0x49, 0x6e, + 0x69, 0x74, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, + 0x1e, 0x0a, 0x1c, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x69, 0x74, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x94, 0x02, 0x0a, 0x1d, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x69, 0x74, 0x50, 0x65, 0x72, 0x69, 0x6f, + 0x64, 0x69, 0x63, 0x4c, 0x6f, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x12, 0x2e, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, + 0x72, 0x12, 0x48, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x42, 0x0d, 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, + 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x49, 0x0a, 0x0f, 0x6c, + 0x6f, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x73, 0x18, 0x03, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6c, 0x6f, + 0x63, 0x6b, 0x75, 0x70, 0x2e, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x42, 0x09, 0xc8, 0xde, 0x1f, + 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0e, 0x6c, 0x6f, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x50, + 0x65, 0x72, 0x69, 0x6f, 0x64, 0x73, 0x3a, 0x2e, 0xe8, 0xa0, 0x1f, 0x00, 0x8a, 0xe7, 0xb0, 0x2a, + 0x25, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x4d, 0x73, 0x67, 0x49, + 0x6e, 0x69, 0x74, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x41, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x27, 0x0a, 0x25, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x69, + 0x74, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x69, 0x63, 0x4c, 0x6f, 0x63, 0x6b, 0x69, 0x6e, 0x67, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0xe2, 0x01, 0x0a, 0x0b, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x12, + 0x30, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, + 0x72, 0x12, 0x4e, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x21, 0xd2, 0xb4, + 0x2d, 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, + 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x12, 0x3c, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x09, 0xc8, 0xde, + 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x3a, + 0x13, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x65, + 0x6e, 0x64, 0x65, 0x72, 0x22, 0xe4, 0x01, 0x0a, 0x0d, 0x4d, 0x73, 0x67, 0x55, 0x6e, 0x64, 0x65, + 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x4e, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x21, 0xd2, 0xb4, 0x2d, 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x3c, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, + 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, + 0x6f, 0x69, 0x6e, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, + 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x13, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, + 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x22, 0x84, 0x02, 0x0a, 0x07, + 0x4d, 0x73, 0x67, 0x53, 0x65, 0x6e, 0x64, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, + 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x37, 0x0a, 0x0a, 0x74, 0x6f, 0x5f, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, + 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x74, 0x6f, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x12, 0x79, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x46, 0xc8, + 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, + 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x9a, + 0xe7, 0xb0, 0x2a, 0x0c, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x5f, 0x63, 0x6f, 0x69, 0x6e, 0x73, + 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x13, 0x88, + 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x65, 0x6e, 0x64, + 0x65, 0x72, 0x22, 0x50, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x32, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x73, 0x22, 0xb1, 0x01, 0x0a, 0x0b, 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, + 0x64, 0x72, 0x61, 0x77, 0x12, 0x38, 0x0a, 0x0a, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, + 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, + 0x6e, 0x67, 0x52, 0x0a, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x65, 0x72, 0x12, 0x37, + 0x0a, 0x0a, 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x74, 0x6f, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x65, 0x6e, 0x6f, 0x6d, + 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x73, 0x3a, + 0x17, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x0a, 0x77, 0x69, + 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x65, 0x72, 0x22, 0xd8, 0x01, 0x0a, 0x13, 0x4d, 0x73, 0x67, + 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x34, 0x0a, 0x08, 0x72, 0x65, 0x63, 0x69, 0x65, 0x76, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x08, 0x72, 0x65, + 0x63, 0x69, 0x65, 0x76, 0x65, 0x72, 0x12, 0x8a, 0x01, 0x0a, 0x0f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, + 0x74, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x46, 0xc8, 0xde, 0x1f, + 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, + 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x9a, 0xe7, 0xb0, + 0x2a, 0x0c, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x5f, 0x63, 0x6f, 0x69, 0x6e, 0x73, 0xa8, 0xe7, + 0xb0, 0x2a, 0x01, 0x52, 0x0e, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x63, 0x65, 0x69, + 0x76, 0x65, 0x64, 0x42, 0x91, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x6c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, + 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6c, 0x6f, + 0x63, 0x6b, 0x75, 0x70, 0xa2, 0x02, 0x03, 0x43, 0x4c, 0x58, 0xaa, 0x02, 0x0d, 0x43, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0xca, 0x02, 0x0d, 0x43, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x5c, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0xe2, 0x02, 0x19, 0x43, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x5c, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, + 0x3a, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_cosmos_lockup_tx_proto_rawDescOnce sync.Once + file_cosmos_lockup_tx_proto_rawDescData = file_cosmos_lockup_tx_proto_rawDesc +) + +func file_cosmos_lockup_tx_proto_rawDescGZIP() []byte { + file_cosmos_lockup_tx_proto_rawDescOnce.Do(func() { + file_cosmos_lockup_tx_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_lockup_tx_proto_rawDescData) + }) + return file_cosmos_lockup_tx_proto_rawDescData +} + +var file_cosmos_lockup_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 10) +var file_cosmos_lockup_tx_proto_goTypes = []interface{}{ + (*MsgInitLockupAccount)(nil), // 0: cosmos.lockup.MsgInitLockupAccount + (*MsgInitLockupAccountResponse)(nil), // 1: cosmos.lockup.MsgInitLockupAccountResponse + (*MsgInitPeriodicLockingAccount)(nil), // 2: cosmos.lockup.MsgInitPeriodicLockingAccount + (*MsgInitPeriodicLockingAccountResponse)(nil), // 3: cosmos.lockup.MsgInitPeriodicLockingAccountResponse + (*MsgDelegate)(nil), // 4: cosmos.lockup.MsgDelegate + (*MsgUndelegate)(nil), // 5: cosmos.lockup.MsgUndelegate + (*MsgSend)(nil), // 6: cosmos.lockup.MsgSend + (*MsgExecuteMessagesResponse)(nil), // 7: cosmos.lockup.MsgExecuteMessagesResponse + (*MsgWithdraw)(nil), // 8: cosmos.lockup.MsgWithdraw + (*MsgWithdrawResponse)(nil), // 9: cosmos.lockup.MsgWithdrawResponse + (*timestamppb.Timestamp)(nil), // 10: google.protobuf.Timestamp + (*Period)(nil), // 11: cosmos.lockup.Period + (*v1beta1.Coin)(nil), // 12: cosmos.base.v1beta1.Coin + (*anypb.Any)(nil), // 13: google.protobuf.Any +} +var file_cosmos_lockup_tx_proto_depIdxs = []int32{ + 10, // 0: cosmos.lockup.MsgInitLockupAccount.end_time:type_name -> google.protobuf.Timestamp + 10, // 1: cosmos.lockup.MsgInitLockupAccount.start_time:type_name -> google.protobuf.Timestamp + 10, // 2: cosmos.lockup.MsgInitPeriodicLockingAccount.start_time:type_name -> google.protobuf.Timestamp + 11, // 3: cosmos.lockup.MsgInitPeriodicLockingAccount.locking_periods:type_name -> cosmos.lockup.Period + 12, // 4: cosmos.lockup.MsgDelegate.amount:type_name -> cosmos.base.v1beta1.Coin + 12, // 5: cosmos.lockup.MsgUndelegate.amount:type_name -> cosmos.base.v1beta1.Coin + 12, // 6: cosmos.lockup.MsgSend.amount:type_name -> cosmos.base.v1beta1.Coin + 13, // 7: cosmos.lockup.MsgExecuteMessagesResponse.responses:type_name -> google.protobuf.Any + 12, // 8: cosmos.lockup.MsgWithdrawResponse.amount_received:type_name -> cosmos.base.v1beta1.Coin + 9, // [9:9] is the sub-list for method output_type + 9, // [9:9] is the sub-list for method input_type + 9, // [9:9] is the sub-list for extension type_name + 9, // [9:9] is the sub-list for extension extendee + 0, // [0:9] is the sub-list for field type_name +} + +func init() { file_cosmos_lockup_tx_proto_init() } +func file_cosmos_lockup_tx_proto_init() { + if File_cosmos_lockup_tx_proto != nil { + return + } + file_cosmos_lockup_lockup_proto_init() + if !protoimpl.UnsafeEnabled { + file_cosmos_lockup_tx_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgInitLockupAccount); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_lockup_tx_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgInitLockupAccountResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_lockup_tx_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgInitPeriodicLockingAccount); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_lockup_tx_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgInitPeriodicLockingAccountResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_lockup_tx_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgDelegate); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_lockup_tx_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgUndelegate); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_lockup_tx_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgSend); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_lockup_tx_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgExecuteMessagesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_lockup_tx_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgWithdraw); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_lockup_tx_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgWithdrawResponse); 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: file_cosmos_lockup_tx_proto_rawDesc, + NumEnums: 0, + NumMessages: 10, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_cosmos_lockup_tx_proto_goTypes, + DependencyIndexes: file_cosmos_lockup_tx_proto_depIdxs, + MessageInfos: file_cosmos_lockup_tx_proto_msgTypes, + }.Build() + File_cosmos_lockup_tx_proto = out.File + file_cosmos_lockup_tx_proto_rawDesc = nil + file_cosmos_lockup_tx_proto_goTypes = nil + file_cosmos_lockup_tx_proto_depIdxs = nil +} diff --git a/go.work.example b/go.work.example index 11cf4a9864dd..ab3bf2096a3f 100644 --- a/go.work.example +++ b/go.work.example @@ -38,4 +38,5 @@ use ( ./x/staking ./x/tx ./x/upgrade + ./x/accounts/defaults/lockup ) diff --git a/simapp/app.go b/simapp/app.go index 6c265cc1148f..471c901f2d16 100644 --- a/simapp/app.go +++ b/simapp/app.go @@ -22,6 +22,7 @@ import ( "cosmossdk.io/x/accounts" "cosmossdk.io/x/accounts/accountstd" baseaccount "cosmossdk.io/x/accounts/defaults/base" + lockup "cosmossdk.io/x/accounts/lockup" "cosmossdk.io/x/accounts/testing/account_abstraction" "cosmossdk.io/x/accounts/testing/counter" "cosmossdk.io/x/auth" @@ -290,6 +291,11 @@ func NewSimApp( // TESTING: do not add accountstd.AddAccount("counter", counter.NewAccount), accountstd.AddAccount("aa_minimal", account_abstraction.NewMinimalAbstractedAccount), + // Lockup account + accountstd.AddAccount(lockup.CONTINUOUS_LOCKING_ACCOUNT, lockup.NewContinuousLockingAccount), + accountstd.AddAccount(lockup.PERIODIC_LOCKING_ACCOUNT, lockup.NewPeriodicLockingAccount), + accountstd.AddAccount(lockup.DELAYED_LOCKING_ACCOUNT, lockup.NewDelayedLockingAccount), + accountstd.AddAccount(lockup.PERMANENT_LOCKING_ACCOUNT, lockup.NewPermanentLockingAccount), // PRODUCTION: add baseaccount.NewAccount("base", txConfig.SignModeHandler()), ) diff --git a/simapp/go.mod b/simapp/go.mod index 78624ae8973f..a4dd7ec368b5 100644 --- a/simapp/go.mod +++ b/simapp/go.mod @@ -33,22 +33,23 @@ require ( google.golang.org/protobuf v1.33.0 ) -require cosmossdk.io/x/accounts v0.0.0-20240104091155-b729e981f130 +require cosmossdk.io/x/accounts v0.0.0-20240226161501-23359a0b6d91 require ( - cosmossdk.io/x/auth v0.0.0-00010101000000-000000000000 + cosmossdk.io/x/accounts/lockup v0.0.0-00010101000000-000000000000 + cosmossdk.io/x/auth v0.0.0-20240226161501-23359a0b6d91 cosmossdk.io/x/authz v0.0.0-00010101000000-000000000000 - cosmossdk.io/x/bank v0.0.0-00010101000000-000000000000 + cosmossdk.io/x/bank v0.0.0-20240226161501-23359a0b6d91 cosmossdk.io/x/distribution v0.0.0-20240227221813-a248d05f70f4 cosmossdk.io/x/gov v0.0.0-20231113122742-912390d5fc4a cosmossdk.io/x/group v0.0.0-00010101000000-000000000000 cosmossdk.io/x/mint v0.0.0-00010101000000-000000000000 cosmossdk.io/x/slashing v0.0.0-00010101000000-000000000000 - cosmossdk.io/x/staking v0.0.0-00010101000000-000000000000 + cosmossdk.io/x/staking v0.0.0-20240226161501-23359a0b6d91 ) require ( - buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.32.0-20230509103710-5e5b9fdd0180.1 // indirect + buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.32.0-20240130113600-88ef6483f90f.1 // indirect buf.build/gen/go/tendermint/tendermint/protocolbuffers/go v1.32.0-20231117195010-33ed361a9051.1 // indirect cloud.google.com/go v0.112.0 // indirect cloud.google.com/go/compute v1.24.0 // indirect @@ -69,7 +70,7 @@ require ( 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/cenkalti/backoff/v4 v4.1.3 // 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 github.com/chzyer/readline v1.5.1 // indirect @@ -79,7 +80,7 @@ require ( github.com/cockroachdb/pebble v1.1.0 // indirect github.com/cockroachdb/redact v1.1.5 // indirect github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect - github.com/cometbft/cometbft-db v0.9.1 // indirect + github.com/cometbft/cometbft-db v0.11.0 // indirect github.com/cosmos/btcutil v1.0.5 // indirect github.com/cosmos/cosmos-proto v1.0.0-beta.4 // indirect github.com/cosmos/go-bip39 v1.0.0 // indirect @@ -89,7 +90,7 @@ require ( github.com/cosmos/ledger-cosmos-go v0.13.3 // indirect github.com/creachadair/atomicfile v0.3.3 // indirect github.com/creachadair/tomledit v0.0.25 // indirect - github.com/danieljoos/wincred v1.2.0 // indirect + github.com/danieljoos/wincred v1.2.1 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f // indirect @@ -99,7 +100,7 @@ require ( github.com/dustin/go-humanize v1.0.1 // indirect github.com/dvsekhvalnov/jose2go v1.6.0 // indirect github.com/emicklei/dot v1.6.1 // indirect - github.com/fatih/color v1.15.0 // indirect + github.com/fatih/color v1.16.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/getsentry/sentry-go v0.27.0 // indirect @@ -124,16 +125,16 @@ require ( github.com/googleapis/gax-go/v2 v2.12.0 // indirect github.com/gorilla/handlers v1.5.2 // indirect github.com/gorilla/mux v1.8.1 // indirect - github.com/gorilla/websocket v1.5.0 // indirect + github.com/gorilla/websocket v1.5.1 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect github.com/hashicorp/go-getter v1.7.3 // indirect - github.com/hashicorp/go-hclog v1.5.0 // indirect + github.com/hashicorp/go-hclog v1.6.2 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect github.com/hashicorp/go-metrics v0.5.3 // indirect - github.com/hashicorp/go-plugin v1.5.2 // indirect + github.com/hashicorp/go-plugin v1.6.0 // indirect github.com/hashicorp/go-safetemp v1.0.0 // indirect github.com/hashicorp/go-version v1.6.0 // indirect github.com/hashicorp/golang-lru v1.0.2 // indirect @@ -178,7 +179,7 @@ require ( github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/rivo/uniseg v0.2.0 // indirect github.com/rogpeppe/go-internal v1.12.0 // indirect - github.com/rs/cors v1.8.3 // indirect + github.com/rs/cors v1.10.1 // indirect github.com/rs/zerolog v1.32.0 // indirect github.com/sagikazarmark/locafero v0.4.0 // indirect github.com/sagikazarmark/slog-shim v0.1.0 // indirect @@ -194,7 +195,7 @@ require ( github.com/zondax/ledger-go v0.14.3 // indirect gitlab.com/yawning/secp256k1-voi v0.0.0-20230925100816-f2616030848b // indirect gitlab.com/yawning/tuplehash v0.0.0-20230713102510-df83abbf9a02 // indirect - go.etcd.io/bbolt v1.3.8 // indirect + go.etcd.io/bbolt v1.3.9 // indirect go.opencensus.io v0.24.0 // indirect go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.47.0 // indirect @@ -215,14 +216,14 @@ require ( golang.org/x/tools v0.18.0 // indirect google.golang.org/api v0.162.0 // indirect google.golang.org/appengine v1.6.8 // indirect - google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240205150955-31a09d347014 // indirect + google.golang.org/genproto v0.0.0-20240221002015-b0ce06bbee7c // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240221002015-b0ce06bbee7c // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240221002015-b0ce06bbee7c // indirect google.golang.org/grpc v1.62.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect gotest.tools/v3 v3.5.1 // indirect - nhooyr.io/websocket v1.8.6 // indirect + nhooyr.io/websocket v1.8.10 // indirect pgregory.net/rapid v1.1.0 // indirect rsc.io/qr v0.2.0 // indirect sigs.k8s.io/yaml v1.4.0 // indirect @@ -238,10 +239,12 @@ require ( replace ( cosmossdk.io/api => ../api cosmossdk.io/client/v2 => ../client/v2 + cosmossdk.io/collections => ../collections cosmossdk.io/core => ../core cosmossdk.io/depinject => ../depinject cosmossdk.io/tools/confix => ../tools/confix cosmossdk.io/x/accounts => ../x/accounts + cosmossdk.io/x/accounts/lockup => ../x/accounts/defaults/lockup cosmossdk.io/x/auth => ../x/auth cosmossdk.io/x/authz => ../x/authz cosmossdk.io/x/bank => ../x/bank diff --git a/simapp/go.sum b/simapp/go.sum index 8bfe6c03adeb..8e206369783d 100644 --- a/simapp/go.sum +++ b/simapp/go.sum @@ -1,5 +1,6 @@ -buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.32.0-20230509103710-5e5b9fdd0180.1 h1:7LKjxs607BNfGhtKLf+bi3SDJgpiGuTgOvemojsH8Hc= buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.32.0-20230509103710-5e5b9fdd0180.1/go.mod h1:5GqIYthcy/ASmnKcaT26APpxMhZirnIHXHKki69zjWI= +buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.32.0-20240130113600-88ef6483f90f.1 h1:68Z59OMFg4fY0XXsJWPZJQxB92R4pw6b5qphrWfHtro= +buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.32.0-20240130113600-88ef6483f90f.1/go.mod h1:5GqIYthcy/ASmnKcaT26APpxMhZirnIHXHKki69zjWI= buf.build/gen/go/tendermint/tendermint/protocolbuffers/go v1.32.0-20231117195010-33ed361a9051.1 h1:VooqQ3rklp3PwMTAE890M76w/8Z01OPa7RdgU9posFE= buf.build/gen/go/tendermint/tendermint/protocolbuffers/go v1.32.0-20231117195010-33ed361a9051.1/go.mod h1:9KmeMJUsSG3IiIwK63Lh1ipZJrwd7KHrWZseJeHukcs= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= @@ -188,8 +189,6 @@ cloud.google.com/go/webrisk v1.4.0/go.mod h1:Hn8X6Zr+ziE2aNd8SliSDWpEnSS1u4R9+xX cloud.google.com/go/webrisk v1.5.0/go.mod h1:iPG6fr52Tv7sGk0H6qUFzmL3HHZev1htXuWDEEsqMTg= cloud.google.com/go/workflows v1.6.0/go.mod h1:6t9F5h/unJz41YqfBmqSASJSXccBLtD1Vwf+KmJENM0= cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoISEXH2bcHC3M= -cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= -cosmossdk.io/collections v0.4.0/go.mod h1:oa5lUING2dP+gdDquow+QjlF45eL1t4TJDypgGd+tv0= cosmossdk.io/errors v1.0.1 h1:bzu+Kcr0kS/1DuPBtUFdWjzLqyUuCiyHjyJB6srBV/0= cosmossdk.io/errors v1.0.1/go.mod h1:MeelVSZThMi4bEakzhhhE/CKqVv3nOJDA25bIqRDu/U= cosmossdk.io/log v1.3.1 h1:UZx8nWIkfbbNEWusZqzAx3ZGvu54TZacWib3EzUYmGI= @@ -270,14 +269,13 @@ github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtyd github.com/bufbuild/protocompile v0.5.1 h1:mixz5lJX4Hiz4FpqFREJHIXLfaLBntfaJv1h+/jS+Qg= github.com/bufbuild/protocompile v0.5.1/go.mod h1:G5iLmavmF4NsYtpZFvE3B/zFch2GIY8+wjsYLR/lc40= github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM= -github.com/bytedance/sonic v1.9.1 h1:6iJ6NqdoxCDr6mbY8h18oSO+cShGSMRGCEo7F2h0x8s= github.com/bytedance/sonic v1.9.1/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U= github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= -github.com/cenkalti/backoff/v4 v4.1.3 h1:cFAlzYUlVYDysBEH2T5hyJZMh3+5+WCBvSnK6Q8UtC4= -github.com/cenkalti/backoff/v4 v4.1.3/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= +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= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= @@ -286,7 +284,6 @@ github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cheggaaa/pb v1.0.27/go.mod h1:pQciLPpbU0oxA0h+VJYYLxO+XeDQb5pZijXscXHm81s= github.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F32mSOjUmXrMHnKwZdA8wcEefY7UVqBKYGjpdQY= -github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 h1:qSGYFH7+jGhDF8vLC+iwCD4WpbV1EBDSzWkJODFLams= github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311/go.mod h1:b583jCggY9gE99b6G5LEC39OIiVsWj+R97kbl5odCEk= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/logex v1.2.1 h1:XHDu3E6q+gdHgsdTPH6ImJMIp436vR6MPtH8gP05QzM= @@ -330,8 +327,8 @@ github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1: github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= github.com/cometbft/cometbft v0.38.5 h1:4lOcK5VTPrfbLOhNHmPYe6c7eDXHtBdMCQuKbAfFJdU= github.com/cometbft/cometbft v0.38.5/go.mod h1:0tqKin+KQs8zDwzYD8rPHzSBIDNPuB4NrwwGDNb/hUg= -github.com/cometbft/cometbft-db v0.9.1 h1:MIhVX5ja5bXNHF8EYrThkG9F7r9kSfv8BX4LWaxWJ4M= -github.com/cometbft/cometbft-db v0.9.1/go.mod h1:iliyWaoV0mRwBJoizElCwwRA9Tf7jZJOURcRZF9m60U= +github.com/cometbft/cometbft-db v0.11.0 h1:M3Lscmpogx5NTbb1EGyGDaFRdsoLWrUWimFEyf7jej8= +github.com/cometbft/cometbft-db v0.11.0/go.mod h1:GDPJAC/iFHNjmZZPN8V8C1yr/eyityhi2W1hz2MGKSc= github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= github.com/containerd/continuity v0.3.0/go.mod h1:wJEAIwKOm/pBZuBd0JmeTvnLquTB1Ag8espWhkykbPM= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= @@ -372,8 +369,8 @@ github.com/creachadair/tomledit v0.0.25 h1:QBzoVTd4hVsKF4tTrrHFbrtAbxT41WvW348aE github.com/creachadair/tomledit v0.0.25/go.mod h1:m4Z0a8730G9sNfBkfbFAM+iw2cBBr/YmNeSjTnBCkfw= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/danieljoos/wincred v1.2.0 h1:ozqKHaLK0W/ii4KVbbvluM91W2H3Sh0BncbUNPS7jLE= -github.com/danieljoos/wincred v1.2.0/go.mod h1:FzQLLMKBFdvu+osBrnFODiv32YGwCfx0SkRa/eYHgec= +github.com/danieljoos/wincred v1.2.1 h1:dl9cBrupW8+r5250DYkYxocLeZ1Y4vB1kxgtjxw8GQs= +github.com/danieljoos/wincred v1.2.1/go.mod h1:uGaFL9fDn3OLTvzCGulzE+SzjEe5NGlh5FdCcyfPwps= 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= @@ -424,8 +421,8 @@ github.com/envoyproxy/protoc-gen-validate v1.0.4 h1:gVPz/FMfvh57HdSJQyvBtF00j8JU github.com/envoyproxy/protoc-gen-validate v1.0.4/go.mod h1:qys6tmnRsYrQqIhm2bvKZH4Blx/1gTIZ2UKVY1M+Yew= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= -github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= -github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= +github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= +github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= @@ -438,14 +435,11 @@ github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMo github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= -github.com/gabriel-vasile/mimetype v1.4.2 h1:w5qFW6JKBz9Y393Y4q372O9A7cUSequkh1Q7OhCmWKU= github.com/gabriel-vasile/mimetype v1.4.2/go.mod h1:zApsH/mKG4w07erKIaJPFiX0Tsq9BFQgN3qGY5GnNgA= 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/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= -github.com/gin-gonic/gin v1.9.1 h1:4idEAncQnU5cB7BeOkPtxjfCSye0AAm1R0RVIqJ+Jmg= github.com/gin-gonic/gin v1.9.1/go.mod h1:hPrL7YrpYKXt5YId3A/Tnip5kqbEAP+KLuI3SUcPTeU= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= @@ -471,21 +465,14 @@ github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ4 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-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= -github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= -github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= -github.com/go-playground/validator/v10 v10.14.0 h1:vgvQWe3XCz3gIeFDm/HnTIbj6UGmg/+t63MyGU2n5js= github.com/go-playground/validator/v10 v10.14.0/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee h1:s+21KNqlpePfkah2I+gwHF8xmJWRjooY+5248k6m4A0= github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= -github.com/gobwas/pool v0.2.0 h1:QEmUOlnSjWtnpRGHF3SauEiOsy82Cup83Vf2LcMlnc8= github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= -github.com/gobwas/ws v1.0.2 h1:CoAavW/wd/kulfZmSIBt6p24n4j7tHgNVCjsfHVNUbo= github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= -github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= @@ -626,8 +613,8 @@ github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY= github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= -github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gorilla/websocket v1.5.1 h1:gmztn0JnHVt9JZquRuzLw3g4wouNVzKL15iLr/zn/QY= +github.com/gorilla/websocket v1.5.1/go.mod h1:x3kM2JMyaluk02fnUJpQuwD2dCS5NDG2ZHL0uE0tcaY= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI= github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI= @@ -647,8 +634,8 @@ github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9n github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= github.com/hashicorp/go-getter v1.7.3 h1:bN2+Fw9XPFvOCjB0UOevFIMICZ7G2XSQHzfvLUyOM5E= github.com/hashicorp/go-getter v1.7.3/go.mod h1:W7TalhMmbPmsSMdNjD0ZskARur/9GJ17cfHTRtXV744= -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-hclog v1.6.2 h1:NOtoftovWkDheyUM/8JW3QMiXyxJK3uHRK7wV04nD2I= +github.com/hashicorp/go-hclog v1.6.2/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= @@ -656,8 +643,8 @@ github.com/hashicorp/go-metrics v0.5.3 h1:M5uADWMOGCTUNU1YuC4hfknOeHNaX54LDm4oYS github.com/hashicorp/go-metrics v0.5.3/go.mod h1:KEjodfebIOuBYSAe/bHTm+HChmKSxAOXPBieMLYozDE= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-plugin v1.5.2 h1:aWv8eimFqWlsEiMrYZdPYl+FdHaBJSN4AWwGWfT1G2Y= -github.com/hashicorp/go-plugin v1.5.2/go.mod h1:w1sAEES3g3PuV/RzUrgow20W2uErMly84hhD3um1WL4= +github.com/hashicorp/go-plugin v1.6.0 h1:wgd4KxHJTVGGqWBq4QPB1i5BZNEx9BR8+OFmHDmTk8A= +github.com/hashicorp/go-plugin v1.6.0/go.mod h1:lBS5MtSSBZk0SHc66KACcjjlU6WzEVP/8pwz68aMkCI= github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= github.com/hashicorp/go-safetemp v1.0.0 h1:2HR189eFNrjHQyENnQMMpCiBAsRxzbTMIgBhEyExpmo= @@ -717,7 +704,6 @@ github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/u github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= @@ -735,7 +721,6 @@ github.com/klauspost/compress v1.15.11/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrD github.com/klauspost/compress v1.17.7 h1:ehO88t2UGzQK66LMdE8tibEd1ErmzZjNEqWkjLAKQQg= github.com/klauspost/compress v1.17.7/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= -github.com/klauspost/cpuid/v2 v2.2.4 h1:acbojRNwl3o09bUq+yDCtZFc1aiwaAAxtcn8YkZXnvk= github.com/klauspost/cpuid/v2 v2.2.4/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= @@ -747,7 +732,6 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/leodido/go-urn v1.2.4 h1:XlAE/cm/ms7TE/VMVoduSpNBoyc2dOxHs5MZSwAN63Q= github.com/leodido/go-urn v1.2.4/go.mod h1:7ZrI8mTSeBSHl/UaRyKQW1qZeMgak41ANeCNaVckg+4= github.com/lib/pq v1.10.7 h1:p7ZhMD+KsSRozJr34udlUrhboJwWAgCg34+/ZZNvZZw= github.com/lib/pq v1.10.7/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= @@ -802,11 +786,9 @@ github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh 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/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/mtibben/percent v0.2.1 h1:5gssi8Nqo8QU/r2pynCm+hBQHpkB/uNK7BJCFogWdzs= github.com/mtibben/percent v0.2.1/go.mod h1:KG9uO+SZkUp+VkRHsCdYQV3XSZrrSpR3O9ibNBTZrns= @@ -932,8 +914,8 @@ github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/f github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= -github.com/rs/cors v1.8.3 h1:O+qNyWn7Z+F9M0ILBHgMVPuB1xTOucVd5gtaYyXBpRo= -github.com/rs/cors v1.8.3/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= +github.com/rs/cors v1.10.1 h1:L0uuZVXIKlI1SShY2nhFfo44TYvDPQ1w4oFkUJNfhyo= +github.com/rs/cors v1.10.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/zerolog v1.32.0 h1:keLypqrlIjaFsbmJOBdB/qvyF8KEtCWHwobLp5l/mQ0= github.com/rs/zerolog v1.32.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= @@ -1017,10 +999,8 @@ github.com/tidwall/btree v1.7.0 h1:L1fkJH/AuEh5zBnnBbmTwQ5Lt+bRJ5A8EWecslvo9iI= github.com/tidwall/btree v1.7.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= -github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= -github.com/ugorji/go/codec v1.2.11 h1:BMaWp1Bb6fHwEtbplGBGJ498wD+LKlNSl25MjdZY4dU= github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= github.com/ulikunitz/xz v0.5.10/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/ulikunitz/xz v0.5.11 h1:kpFauv27b6ynzBNT/Xy+1k+fK4WswhN/6PN5WhFAGw8= @@ -1044,8 +1024,8 @@ gitlab.com/yawning/secp256k1-voi v0.0.0-20230925100816-f2616030848b/go.mod h1:/y gitlab.com/yawning/tuplehash v0.0.0-20230713102510-df83abbf9a02 h1:qwDnMxjkyLmAFgcfgTnfJrmYKWhHnci3GjDqcZp1M3Q= gitlab.com/yawning/tuplehash v0.0.0-20230713102510-df83abbf9a02/go.mod h1:JTnUj0mpYiAsuZLmKjTx/ex3AtMowcCgnE7YNyCEP0I= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.8 h1:xs88BrvEv273UsB79e0hcVrlUWmS0a8upikMFhSyAtA= -go.etcd.io/bbolt v1.3.8/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= +go.etcd.io/bbolt v1.3.9 h1:8x7aARPEXiXbHmtUwAIv7eV2fQFHrLLavdiJ3uzJXoI= +go.etcd.io/bbolt v1.3.9/go.mod h1:zaO32+Ti0PK1ivdPtgMESzuzL2VPoIG1PCQNvOdo/dE= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= @@ -1086,7 +1066,6 @@ go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= -golang.org/x/arch v0.3.0 h1:02VY4/ZcO/gBOH6PUaoiptASxtXU10jazRCP865E97k= golang.org/x/arch v0.3.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -1626,10 +1605,10 @@ google.golang.org/genproto v0.0.0-20221010155953-15ba04fc1c0e/go.mod h1:3526vdqw google.golang.org/genproto v0.0.0-20221014173430-6e2ab493f96b/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= google.golang.org/genproto v0.0.0-20221025140454-527a21cfbd71/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= -google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 h1:9+tzLLstTlPTRyJTh+ah5wIMsBW5c4tQwGTN3thOW9Y= -google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9/go.mod h1:mqHbVIp48Muh7Ywss/AD6I5kNVKZMmAa/QEW58Gxp2s= -google.golang.org/genproto/googleapis/api v0.0.0-20240205150955-31a09d347014 h1:x9PwdEgd11LgK+orcck69WVRo7DezSO4VUMPI4xpc8A= -google.golang.org/genproto/googleapis/api v0.0.0-20240205150955-31a09d347014/go.mod h1:rbHMSEDyoYX62nRVLOCc4Qt1HbsdytAYoVwgjiOhF3I= +google.golang.org/genproto v0.0.0-20240221002015-b0ce06bbee7c h1:Zmyn5CV/jxzKnF+3d+xzbomACPwLQqVpLTpyXN5uTaQ= +google.golang.org/genproto v0.0.0-20240221002015-b0ce06bbee7c/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo= +google.golang.org/genproto/googleapis/api v0.0.0-20240221002015-b0ce06bbee7c h1:9g7erC9qu44ks7UK4gDNlnk4kOxZG707xKm4jVniy6o= +google.golang.org/genproto/googleapis/api v0.0.0-20240221002015-b0ce06bbee7c/go.mod h1:5iCWqnniDlqZHrd3neWVTOwvh/v6s3232omMecelax8= google.golang.org/genproto/googleapis/rpc v0.0.0-20240221002015-b0ce06bbee7c h1:NUsgEN92SQQqzfA+YtqYNqYmB3DMMYLlIwUZAQFVFbo= google.golang.org/genproto/googleapis/rpc v0.0.0-20240221002015-b0ce06bbee7c/go.mod h1:H4O17MA/PE9BsGx3w+a+W2VOLLD1Qf7oJneAoU6WktY= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= @@ -1737,8 +1716,9 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -nhooyr.io/websocket v1.8.6 h1:s+C3xAMLwGmlI31Nyn/eAehUlZPwfYZu2JXM621Q5/k= nhooyr.io/websocket v1.8.6/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= +nhooyr.io/websocket v1.8.10 h1:mv4p+MnGrLDcPlBoWsvPP7XCzTYMXP9F9eIGoKbgx7Q= +nhooyr.io/websocket v1.8.10/go.mod h1:rN9OFWIUwuxg4fR5tELlYC04bXYowCP9GX47ivo2l+c= pgregory.net/rapid v1.1.0 h1:CMa0sjHSru3puNx+J0MIAuiiEV4N0qj8/cMWGBBCsjw= pgregory.net/rapid v1.1.0/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= diff --git a/tests/go.mod b/tests/go.mod index d90beda7a4c1..4c93e11dffab 100644 --- a/tests/go.mod +++ b/tests/go.mod @@ -36,22 +36,22 @@ require ( ) require ( - cosmossdk.io/x/accounts v0.0.0-20240104091155-b729e981f130 - cosmossdk.io/x/auth v0.0.0-00010101000000-000000000000 + cosmossdk.io/x/accounts v0.0.0-20240226161501-23359a0b6d91 + cosmossdk.io/x/auth v0.0.0-20240226161501-23359a0b6d91 cosmossdk.io/x/authz v0.0.0-00010101000000-000000000000 - cosmossdk.io/x/bank v0.0.0-00010101000000-000000000000 + cosmossdk.io/x/bank v0.0.0-20240226161501-23359a0b6d91 cosmossdk.io/x/distribution v0.0.0-20240227221813-a248d05f70f4 cosmossdk.io/x/gov v0.0.0-20231113122742-912390d5fc4a cosmossdk.io/x/group v0.0.0-00010101000000-000000000000 cosmossdk.io/x/mint v0.0.0-00010101000000-000000000000 cosmossdk.io/x/slashing v0.0.0-00010101000000-000000000000 - cosmossdk.io/x/staking v0.0.0-00010101000000-000000000000 + cosmossdk.io/x/staking v0.0.0-20240226161501-23359a0b6d91 github.com/google/go-cmp v0.6.0 github.com/jhump/protoreflect v1.15.6 ) require ( - buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.32.0-20230509103710-5e5b9fdd0180.1 // indirect + buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.32.0-20240130113600-88ef6483f90f.1 // indirect buf.build/gen/go/tendermint/tendermint/protocolbuffers/go v1.32.0-20231117195010-33ed361a9051.1 // indirect cloud.google.com/go v0.112.0 // indirect cloud.google.com/go/compute v1.24.0 // indirect @@ -59,6 +59,7 @@ require ( cloud.google.com/go/iam v1.1.6 // indirect cloud.google.com/go/storage v1.36.0 // indirect cosmossdk.io/client/v2 v2.0.0-20230630094428-02b760776860 // indirect + cosmossdk.io/x/accounts/lockup v0.0.0-00010101000000-000000000000 // indirect cosmossdk.io/x/circuit v0.0.0-20230613133644-0a778132a60f // indirect filippo.io/edwards25519 v1.1.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect @@ -73,7 +74,7 @@ require ( github.com/bits-and-blooms/bitset v1.10.0 // indirect github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect github.com/bufbuild/protocompile v0.8.0 // indirect - github.com/cenkalti/backoff/v4 v4.1.3 // 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 github.com/chzyer/readline v1.5.1 // indirect @@ -83,14 +84,14 @@ require ( github.com/cockroachdb/pebble v1.1.0 // indirect github.com/cockroachdb/redact v1.1.5 // indirect github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect - github.com/cometbft/cometbft-db v0.9.1 // indirect + github.com/cometbft/cometbft-db v0.11.0 // indirect github.com/cosmos/btcutil v1.0.5 // indirect github.com/cosmos/go-bip39 v1.0.0 // indirect github.com/cosmos/gogogateway v1.2.0 // indirect github.com/cosmos/iavl v1.0.1 // indirect github.com/cosmos/ics23/go v0.10.0 // indirect github.com/cosmos/ledger-cosmos-go v0.13.3 // indirect - github.com/danieljoos/wincred v1.2.0 // indirect + github.com/danieljoos/wincred v1.2.1 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f // indirect @@ -100,7 +101,7 @@ require ( github.com/dustin/go-humanize v1.0.1 // indirect github.com/dvsekhvalnov/jose2go v1.6.0 // indirect github.com/emicklei/dot v1.6.1 // indirect - github.com/fatih/color v1.15.0 // indirect + github.com/fatih/color v1.16.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/getsentry/sentry-go v0.27.0 // indirect @@ -124,16 +125,16 @@ require ( github.com/googleapis/gax-go/v2 v2.12.0 // indirect github.com/gorilla/handlers v1.5.2 // indirect github.com/gorilla/mux v1.8.1 // indirect - github.com/gorilla/websocket v1.5.0 // indirect + github.com/gorilla/websocket v1.5.1 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect github.com/hashicorp/go-getter v1.7.3 // indirect - github.com/hashicorp/go-hclog v1.5.0 // indirect + github.com/hashicorp/go-hclog v1.6.2 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect github.com/hashicorp/go-metrics v0.5.3 // indirect - github.com/hashicorp/go-plugin v1.5.2 // indirect + github.com/hashicorp/go-plugin v1.6.0 // indirect github.com/hashicorp/go-safetemp v1.0.0 // indirect github.com/hashicorp/go-version v1.6.0 // indirect github.com/hashicorp/golang-lru v1.0.2 // indirect @@ -173,7 +174,7 @@ require ( github.com/prometheus/procfs v0.12.0 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/rogpeppe/go-internal v1.12.0 // indirect - github.com/rs/cors v1.8.3 // indirect + github.com/rs/cors v1.10.1 // indirect github.com/rs/zerolog v1.32.0 // indirect github.com/sagikazarmark/locafero v0.4.0 // indirect github.com/sagikazarmark/slog-shim v0.1.0 // indirect @@ -192,7 +193,7 @@ require ( github.com/zondax/ledger-go v0.14.3 // indirect gitlab.com/yawning/secp256k1-voi v0.0.0-20230925100816-f2616030848b // indirect gitlab.com/yawning/tuplehash v0.0.0-20230713102510-df83abbf9a02 // indirect - go.etcd.io/bbolt v1.3.8 // indirect + go.etcd.io/bbolt v1.3.9 // indirect go.opencensus.io v0.24.0 // indirect go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.47.0 // indirect @@ -213,12 +214,12 @@ require ( golang.org/x/tools v0.18.0 // indirect google.golang.org/api v0.162.0 // indirect google.golang.org/appengine v1.6.8 // indirect - google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240205150955-31a09d347014 // indirect + google.golang.org/genproto v0.0.0-20240221002015-b0ce06bbee7c // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240221002015-b0ce06bbee7c // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240221002015-b0ce06bbee7c // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - nhooyr.io/websocket v1.8.6 // indirect + nhooyr.io/websocket v1.8.10 // indirect sigs.k8s.io/yaml v1.4.0 // indirect ) @@ -235,6 +236,7 @@ replace ( cosmossdk.io/core => ../core cosmossdk.io/depinject => ../depinject cosmossdk.io/x/accounts => ../x/accounts + cosmossdk.io/x/accounts/lockup => ../x/accounts/defaults/lockup cosmossdk.io/x/auth => ../x/auth cosmossdk.io/x/authz => ../x/authz cosmossdk.io/x/bank => ../x/bank diff --git a/tests/go.sum b/tests/go.sum index 6c8c39fe2d6f..4dc30e249bba 100644 --- a/tests/go.sum +++ b/tests/go.sum @@ -1,5 +1,6 @@ -buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.32.0-20230509103710-5e5b9fdd0180.1 h1:7LKjxs607BNfGhtKLf+bi3SDJgpiGuTgOvemojsH8Hc= buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.32.0-20230509103710-5e5b9fdd0180.1/go.mod h1:5GqIYthcy/ASmnKcaT26APpxMhZirnIHXHKki69zjWI= +buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.32.0-20240130113600-88ef6483f90f.1 h1:68Z59OMFg4fY0XXsJWPZJQxB92R4pw6b5qphrWfHtro= +buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.32.0-20240130113600-88ef6483f90f.1/go.mod h1:5GqIYthcy/ASmnKcaT26APpxMhZirnIHXHKki69zjWI= buf.build/gen/go/tendermint/tendermint/protocolbuffers/go v1.32.0-20231117195010-33ed361a9051.1 h1:VooqQ3rklp3PwMTAE890M76w/8Z01OPa7RdgU9posFE= buf.build/gen/go/tendermint/tendermint/protocolbuffers/go v1.32.0-20231117195010-33ed361a9051.1/go.mod h1:9KmeMJUsSG3IiIwK63Lh1ipZJrwd7KHrWZseJeHukcs= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= @@ -271,8 +272,8 @@ github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= -github.com/cenkalti/backoff/v4 v4.1.3 h1:cFAlzYUlVYDysBEH2T5hyJZMh3+5+WCBvSnK6Q8UtC4= -github.com/cenkalti/backoff/v4 v4.1.3/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= +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= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= @@ -322,8 +323,8 @@ github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1: github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= github.com/cometbft/cometbft v0.38.5 h1:4lOcK5VTPrfbLOhNHmPYe6c7eDXHtBdMCQuKbAfFJdU= github.com/cometbft/cometbft v0.38.5/go.mod h1:0tqKin+KQs8zDwzYD8rPHzSBIDNPuB4NrwwGDNb/hUg= -github.com/cometbft/cometbft-db v0.9.1 h1:MIhVX5ja5bXNHF8EYrThkG9F7r9kSfv8BX4LWaxWJ4M= -github.com/cometbft/cometbft-db v0.9.1/go.mod h1:iliyWaoV0mRwBJoizElCwwRA9Tf7jZJOURcRZF9m60U= +github.com/cometbft/cometbft-db v0.11.0 h1:M3Lscmpogx5NTbb1EGyGDaFRdsoLWrUWimFEyf7jej8= +github.com/cometbft/cometbft-db v0.11.0/go.mod h1:GDPJAC/iFHNjmZZPN8V8C1yr/eyityhi2W1hz2MGKSc= github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= github.com/containerd/continuity v0.3.0/go.mod h1:wJEAIwKOm/pBZuBd0JmeTvnLquTB1Ag8espWhkykbPM= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= @@ -358,8 +359,8 @@ github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:ma github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/danieljoos/wincred v1.2.0 h1:ozqKHaLK0W/ii4KVbbvluM91W2H3Sh0BncbUNPS7jLE= -github.com/danieljoos/wincred v1.2.0/go.mod h1:FzQLLMKBFdvu+osBrnFODiv32YGwCfx0SkRa/eYHgec= +github.com/danieljoos/wincred v1.2.1 h1:dl9cBrupW8+r5250DYkYxocLeZ1Y4vB1kxgtjxw8GQs= +github.com/danieljoos/wincred v1.2.1/go.mod h1:uGaFL9fDn3OLTvzCGulzE+SzjEe5NGlh5FdCcyfPwps= 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= @@ -410,8 +411,8 @@ github.com/envoyproxy/protoc-gen-validate v1.0.4 h1:gVPz/FMfvh57HdSJQyvBtF00j8JU github.com/envoyproxy/protoc-gen-validate v1.0.4/go.mod h1:qys6tmnRsYrQqIhm2bvKZH4Blx/1gTIZ2UKVY1M+Yew= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= -github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= -github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= +github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= +github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= @@ -428,11 +429,8 @@ github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyT 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/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= -github.com/gin-gonic/gin v1.8.1 h1:4+fr/el88TOO3ewCmQr8cx/CtZ/umlIRIs5M4NTNjf8= -github.com/gin-gonic/gin v1.8.1/go.mod h1:ji8BvRH1azfM+SYow9zQ6SZMvR8qOMZHmsCuWR9tTTk= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= @@ -458,25 +456,14 @@ 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-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= -github.com/go-playground/locales v0.14.0 h1:u50s323jtVGugKlcYeyzC0etD1HifMjqmJqb8WugfUU= -github.com/go-playground/locales v0.14.0/go.mod h1:sawfccIbzZTqEDETgFXqTho0QybSa7l++s0DH+LDiLs= github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= -github.com/go-playground/universal-translator v0.18.0 h1:82dyy6p4OuJq4/CByFNOn/jYrnRPArHwAcmLoJZxyho= -github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl+lu/H90nyDXpg0fqeB/AQUGNTVA= github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= -github.com/go-playground/validator/v10 v10.11.1 h1:prmOlTVv+YjZjmRmNSF3VmspqJIxJWXmqUsHwfTRRkQ= -github.com/go-playground/validator/v10 v10.11.1/go.mod h1:i+3WkQ1FvaUjjxh1kSvIA4dMGDBiPU55YFDl0WbKdWU= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= -github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee h1:s+21KNqlpePfkah2I+gwHF8xmJWRjooY+5248k6m4A0= github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= -github.com/gobwas/pool v0.2.0 h1:QEmUOlnSjWtnpRGHF3SauEiOsy82Cup83Vf2LcMlnc8= github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= -github.com/gobwas/ws v1.0.2 h1:CoAavW/wd/kulfZmSIBt6p24n4j7tHgNVCjsfHVNUbo= github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= -github.com/goccy/go-json v0.9.11 h1:/pAaQDLHEoCq/5FFmSKBswWmK6H0e8g4159Kc/X/nqk= -github.com/goccy/go-json v0.9.11/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= @@ -617,8 +604,8 @@ github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY= github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= -github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gorilla/websocket v1.5.1 h1:gmztn0JnHVt9JZquRuzLw3g4wouNVzKL15iLr/zn/QY= +github.com/gorilla/websocket v1.5.1/go.mod h1:x3kM2JMyaluk02fnUJpQuwD2dCS5NDG2ZHL0uE0tcaY= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI= github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI= @@ -638,8 +625,8 @@ github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9n github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= github.com/hashicorp/go-getter v1.7.3 h1:bN2+Fw9XPFvOCjB0UOevFIMICZ7G2XSQHzfvLUyOM5E= github.com/hashicorp/go-getter v1.7.3/go.mod h1:W7TalhMmbPmsSMdNjD0ZskARur/9GJ17cfHTRtXV744= -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-hclog v1.6.2 h1:NOtoftovWkDheyUM/8JW3QMiXyxJK3uHRK7wV04nD2I= +github.com/hashicorp/go-hclog v1.6.2/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= @@ -647,8 +634,8 @@ github.com/hashicorp/go-metrics v0.5.3 h1:M5uADWMOGCTUNU1YuC4hfknOeHNaX54LDm4oYS github.com/hashicorp/go-metrics v0.5.3/go.mod h1:KEjodfebIOuBYSAe/bHTm+HChmKSxAOXPBieMLYozDE= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-plugin v1.5.2 h1:aWv8eimFqWlsEiMrYZdPYl+FdHaBJSN4AWwGWfT1G2Y= -github.com/hashicorp/go-plugin v1.5.2/go.mod h1:w1sAEES3g3PuV/RzUrgow20W2uErMly84hhD3um1WL4= +github.com/hashicorp/go-plugin v1.6.0 h1:wgd4KxHJTVGGqWBq4QPB1i5BZNEx9BR8+OFmHDmTk8A= +github.com/hashicorp/go-plugin v1.6.0/go.mod h1:lBS5MtSSBZk0SHc66KACcjjlU6WzEVP/8pwz68aMkCI= github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= github.com/hashicorp/go-safetemp v1.0.0 h1:2HR189eFNrjHQyENnQMMpCiBAsRxzbTMIgBhEyExpmo= @@ -708,8 +695,6 @@ github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/u github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= -github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= @@ -736,8 +721,6 @@ github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= -github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w= -github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= github.com/lib/pq v1.10.7 h1:p7ZhMD+KsSRozJr34udlUrhboJwWAgCg34+/ZZNvZZw= github.com/lib/pq v1.10.7/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6cdF0Y8= @@ -785,12 +768,9 @@ github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh 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/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= -github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/mtibben/percent v0.2.1 h1:5gssi8Nqo8QU/r2pynCm+hBQHpkB/uNK7BJCFogWdzs= github.com/mtibben/percent v0.2.1/go.mod h1:KG9uO+SZkUp+VkRHsCdYQV3XSZrrSpR3O9ibNBTZrns= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= @@ -914,8 +894,8 @@ github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/f github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= -github.com/rs/cors v1.8.3 h1:O+qNyWn7Z+F9M0ILBHgMVPuB1xTOucVd5gtaYyXBpRo= -github.com/rs/cors v1.8.3/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= +github.com/rs/cors v1.10.1 h1:L0uuZVXIKlI1SShY2nhFfo44TYvDPQ1w4oFkUJNfhyo= +github.com/rs/cors v1.10.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/zerolog v1.32.0 h1:keLypqrlIjaFsbmJOBdB/qvyF8KEtCWHwobLp5l/mQ0= github.com/rs/zerolog v1.32.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= @@ -997,12 +977,9 @@ github.com/tidwall/btree v1.7.0 h1:L1fkJH/AuEh5zBnnBbmTwQ5Lt+bRJ5A8EWecslvo9iI= github.com/tidwall/btree v1.7.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= -github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= -github.com/ugorji/go/codec v1.2.7 h1:YPXUKf7fYbp/y8xloBqZOw2qaVggbfwMlI8WM3wZUJ0= -github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY= github.com/ulikunitz/xz v0.5.10/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= 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= @@ -1025,8 +1002,8 @@ gitlab.com/yawning/secp256k1-voi v0.0.0-20230925100816-f2616030848b/go.mod h1:/y gitlab.com/yawning/tuplehash v0.0.0-20230713102510-df83abbf9a02 h1:qwDnMxjkyLmAFgcfgTnfJrmYKWhHnci3GjDqcZp1M3Q= gitlab.com/yawning/tuplehash v0.0.0-20230713102510-df83abbf9a02/go.mod h1:JTnUj0mpYiAsuZLmKjTx/ex3AtMowcCgnE7YNyCEP0I= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.8 h1:xs88BrvEv273UsB79e0hcVrlUWmS0a8upikMFhSyAtA= -go.etcd.io/bbolt v1.3.8/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= +go.etcd.io/bbolt v1.3.9 h1:8x7aARPEXiXbHmtUwAIv7eV2fQFHrLLavdiJ3uzJXoI= +go.etcd.io/bbolt v1.3.9/go.mod h1:zaO32+Ti0PK1ivdPtgMESzuzL2VPoIG1PCQNvOdo/dE= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= @@ -1587,10 +1564,10 @@ google.golang.org/genproto v0.0.0-20221010155953-15ba04fc1c0e/go.mod h1:3526vdqw google.golang.org/genproto v0.0.0-20221014173430-6e2ab493f96b/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= google.golang.org/genproto v0.0.0-20221025140454-527a21cfbd71/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= -google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 h1:9+tzLLstTlPTRyJTh+ah5wIMsBW5c4tQwGTN3thOW9Y= -google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9/go.mod h1:mqHbVIp48Muh7Ywss/AD6I5kNVKZMmAa/QEW58Gxp2s= -google.golang.org/genproto/googleapis/api v0.0.0-20240205150955-31a09d347014 h1:x9PwdEgd11LgK+orcck69WVRo7DezSO4VUMPI4xpc8A= -google.golang.org/genproto/googleapis/api v0.0.0-20240205150955-31a09d347014/go.mod h1:rbHMSEDyoYX62nRVLOCc4Qt1HbsdytAYoVwgjiOhF3I= +google.golang.org/genproto v0.0.0-20240221002015-b0ce06bbee7c h1:Zmyn5CV/jxzKnF+3d+xzbomACPwLQqVpLTpyXN5uTaQ= +google.golang.org/genproto v0.0.0-20240221002015-b0ce06bbee7c/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo= +google.golang.org/genproto/googleapis/api v0.0.0-20240221002015-b0ce06bbee7c h1:9g7erC9qu44ks7UK4gDNlnk4kOxZG707xKm4jVniy6o= +google.golang.org/genproto/googleapis/api v0.0.0-20240221002015-b0ce06bbee7c/go.mod h1:5iCWqnniDlqZHrd3neWVTOwvh/v6s3232omMecelax8= google.golang.org/genproto/googleapis/rpc v0.0.0-20240221002015-b0ce06bbee7c h1:NUsgEN92SQQqzfA+YtqYNqYmB3DMMYLlIwUZAQFVFbo= google.golang.org/genproto/googleapis/rpc v0.0.0-20240221002015-b0ce06bbee7c/go.mod h1:H4O17MA/PE9BsGx3w+a+W2VOLLD1Qf7oJneAoU6WktY= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= @@ -1697,8 +1674,9 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -nhooyr.io/websocket v1.8.6 h1:s+C3xAMLwGmlI31Nyn/eAehUlZPwfYZu2JXM621Q5/k= nhooyr.io/websocket v1.8.6/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= +nhooyr.io/websocket v1.8.10 h1:mv4p+MnGrLDcPlBoWsvPP7XCzTYMXP9F9eIGoKbgx7Q= +nhooyr.io/websocket v1.8.10/go.mod h1:rN9OFWIUwuxg4fR5tELlYC04bXYowCP9GX47ivo2l+c= pgregory.net/rapid v1.1.0 h1:CMa0sjHSru3puNx+J0MIAuiiEV4N0qj8/cMWGBBCsjw= pgregory.net/rapid v1.1.0/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= diff --git a/x/accounts/defaults/lockup/README.md b/x/accounts/defaults/lockup/README.md new file mode 100644 index 000000000000..c81c2eedbae7 --- /dev/null +++ b/x/accounts/defaults/lockup/README.md @@ -0,0 +1,5 @@ +# x/accounts/lockup + + + +The x/accounts/lockup module provides the implementation for lockup accounts within the x/accounts module. diff --git a/x/accounts/defaults/lockup/continuous_locking_account.go b/x/accounts/defaults/lockup/continuous_locking_account.go new file mode 100644 index 000000000000..4380388caa55 --- /dev/null +++ b/x/accounts/defaults/lockup/continuous_locking_account.go @@ -0,0 +1,225 @@ +package lockup + +import ( + "context" + "time" + + "cosmossdk.io/collections" + collcodec "cosmossdk.io/collections/codec" + "cosmossdk.io/math" + "cosmossdk.io/x/accounts/accountstd" + lockuptypes "cosmossdk.io/x/accounts/lockup/types" + + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) + +// Compile-time type assertions +var ( + _ accountstd.Interface = (*ContinuousLockingAccount)(nil) +) + +// NewContinuousLockingAccount creates a new ContinuousLockingAccount object. +func NewContinuousLockingAccount(d accountstd.Dependencies) (*ContinuousLockingAccount, error) { + baseLockup := newBaseLockup(d) + + ContinuousLockingAccount := ContinuousLockingAccount{ + BaseLockup: baseLockup, + StartTime: collections.NewItem(d.SchemaBuilder, StartTimePrefix, "start_time", collcodec.KeyToValueCodec[time.Time](sdk.TimeKey)), + } + + return &ContinuousLockingAccount, nil +} + +type ContinuousLockingAccount struct { + *BaseLockup + StartTime collections.Item[time.Time] +} + +func (cva ContinuousLockingAccount) Init(ctx context.Context, msg *lockuptypes.MsgInitLockupAccount) (*lockuptypes.MsgInitLockupAccountResponse, error) { + if msg.EndTime.IsZero() { + return nil, sdkerrors.ErrInvalidRequest.Wrapf("invalid end time %s", msg.EndTime.String()) + } + + if msg.EndTime.Before(msg.StartTime) { + return nil, sdkerrors.ErrInvalidRequest.Wrap("invalid start and end time (must be start before end)") + } + + hs := cva.headerService.GetHeaderInfo(ctx) + + start := msg.StartTime + if msg.StartTime.IsZero() { + start = hs.Time + } + + err := cva.StartTime.Set(ctx, start) + if err != nil { + return nil, err + } + + return cva.BaseLockup.Init(ctx, msg) +} + +func (cva *ContinuousLockingAccount) Delegate(ctx context.Context, msg *lockuptypes.MsgDelegate) ( + *lockuptypes.MsgExecuteMessagesResponse, error, +) { + return cva.BaseLockup.Delegate(ctx, msg, cva.GetLockedCoinsWithDenoms) +} + +func (cva *ContinuousLockingAccount) Undelegate(ctx context.Context, msg *lockuptypes.MsgUndelegate) ( + *lockuptypes.MsgExecuteMessagesResponse, error, +) { + return cva.BaseLockup.Undelegate(ctx, msg) +} + +func (cva *ContinuousLockingAccount) SendCoins(ctx context.Context, msg *lockuptypes.MsgSend) ( + *lockuptypes.MsgExecuteMessagesResponse, error, +) { + return cva.BaseLockup.SendCoins(ctx, msg, cva.GetLockedCoinsWithDenoms) +} + +func (cva *ContinuousLockingAccount) WithdrawUnlockedCoins(ctx context.Context, msg *lockuptypes.MsgWithdraw) ( + *lockuptypes.MsgWithdrawResponse, error, +) { + return cva.BaseLockup.WithdrawUnlockedCoins(ctx, msg, cva.GetLockedCoinsWithDenoms) +} + +// GetLockCoinsInfo returns the total number of unlocked and locked coins. +func (cva ContinuousLockingAccount) GetLockCoinsInfo(ctx context.Context, blockTime time.Time) (unlockedCoins, lockedCoins sdk.Coins, err error) { + unlockedCoins = sdk.Coins{} + lockedCoins = sdk.Coins{} + + // We must handle the case where the start time for a lockup account has + // been set into the future or when the start of the chain is not exactly + // known. + startTime, err := cva.StartTime.Get(ctx) + if err != nil { + return nil, nil, err + } + endTime, err := cva.EndTime.Get(ctx) + if err != nil { + return nil, nil, err + } + var originalVesting sdk.Coins + err = cva.IterateCoinEntries(ctx, cva.OriginalLocking, func(key string, value math.Int) (stop bool, err error) { + originalVesting = append(originalVesting, sdk.NewCoin(key, value)) + vestedCoin, vestingCoin, err := cva.GetLockCoinInfoWithDenom(ctx, blockTime, key) + if err != nil { + return true, err + } + unlockedCoins = append(unlockedCoins, *vestedCoin) + lockedCoins = append(lockedCoins, *vestingCoin) + return false, nil + }) + if err != nil { + return nil, nil, err + } + if startTime.After(blockTime) { + return unlockedCoins, originalVesting, nil + } else if endTime.Before(blockTime) { + return originalVesting, lockedCoins, nil + } + + return unlockedCoins, lockedCoins, nil +} + +// GetLockCoinInfoWithDenom returns the number of locked coin for a specific denom. If no coins are locked, +// nil is returned. +func (cva ContinuousLockingAccount) GetLockCoinInfoWithDenom(ctx context.Context, blockTime time.Time, denom string) (unlockedCoin, lockedCoin *sdk.Coin, err error) { + // We must handle the case where the start time for a lockup account has + // been set into the future or when the start of the chain is not exactly + // known. + startTime, err := cva.StartTime.Get(ctx) + if err != nil { + return nil, nil, err + } + endTime, err := cva.EndTime.Get(ctx) + if err != nil { + return nil, nil, err + } + + originalLockingAmt, err := cva.OriginalLocking.Get(ctx, denom) + if err != nil { + return nil, nil, err + } + + originalLocking := sdk.NewCoin(denom, originalLockingAmt) + if startTime.After(blockTime) { + return &sdk.Coin{}, &originalLocking, nil + } else if endTime.Before(blockTime) { + return &originalLocking, &sdk.Coin{}, nil + } + + // calculate the locking scalar + x := blockTime.Unix() - startTime.Unix() + y := endTime.Unix() - startTime.Unix() + s := math.LegacyNewDec(x).Quo(math.LegacyNewDec(y)) + + unlockedAmt := math.LegacyNewDecFromInt(originalLocking.Amount).Mul(s).RoundInt() + unlocked := sdk.NewCoin(originalLocking.Denom, unlockedAmt) + + locked := originalLocking.Sub(unlocked) + + return &unlocked, &locked, nil +} + +// GetLockedCoins returns the total number of locked coins. +func (cva ContinuousLockingAccount) GetLockedCoins(ctx context.Context, blockTime time.Time) (sdk.Coins, error) { + _, lockedCoins, err := cva.GetLockCoinsInfo(ctx, blockTime) + if err != nil { + return nil, err + } + return lockedCoins, nil +} + +// GetLockedCoinsWithDenoms returns the number of locked coin for a specific denom. +func (cva ContinuousLockingAccount) GetLockedCoinsWithDenoms(ctx context.Context, blockTime time.Time, denoms ...string) (sdk.Coins, error) { + lockedCoins := sdk.Coins{} + for _, denom := range denoms { + _, lockedCoin, err := cva.GetLockCoinInfoWithDenom(ctx, blockTime, denom) + if err != nil { + return nil, err + } + lockedCoins = append(lockedCoins, *lockedCoin) + } + + return lockedCoins, nil +} + +func (cva ContinuousLockingAccount) QueryLockupAccountInfo(ctx context.Context, req *lockuptypes.QueryLockupAccountInfoRequest) ( + *lockuptypes.QueryLockupAccountInfoResponse, error, +) { + resp, err := cva.BaseLockup.QueryLockupAccountBaseInfo(ctx, req) + if err != nil { + return nil, err + } + startTime, err := cva.StartTime.Get(ctx) + if err != nil { + return nil, err + } + hs := cva.headerService.GetHeaderInfo(ctx) + unlockedCoins, lockedCoins, err := cva.GetLockCoinsInfo(ctx, hs.Time) + if err != nil { + return nil, err + } + resp.StartTime = &startTime + resp.LockedCoins = lockedCoins + resp.UnlockedCoins = unlockedCoins + return resp, nil +} + +// Implement smart account interface +func (cva ContinuousLockingAccount) RegisterInitHandler(builder *accountstd.InitBuilder) { + accountstd.RegisterInitHandler(builder, cva.Init) +} + +func (cva ContinuousLockingAccount) RegisterExecuteHandlers(builder *accountstd.ExecuteBuilder) { + accountstd.RegisterExecuteHandler(builder, cva.Delegate) + accountstd.RegisterExecuteHandler(builder, cva.Undelegate) + accountstd.RegisterExecuteHandler(builder, cva.SendCoins) + accountstd.RegisterExecuteHandler(builder, cva.WithdrawUnlockedCoins) +} + +func (cva ContinuousLockingAccount) RegisterQueryHandlers(builder *accountstd.QueryBuilder) { + accountstd.RegisterQueryHandler(builder, cva.QueryLockupAccountInfo) +} diff --git a/x/accounts/defaults/lockup/delayed_locking_account.go b/x/accounts/defaults/lockup/delayed_locking_account.go new file mode 100644 index 000000000000..8de0c9f024ef --- /dev/null +++ b/x/accounts/defaults/lockup/delayed_locking_account.go @@ -0,0 +1,158 @@ +package lockup + +import ( + "context" + "time" + + "cosmossdk.io/math" + "cosmossdk.io/x/accounts/accountstd" + lockuptypes "cosmossdk.io/x/accounts/lockup/types" + + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) + +// Compile-time type assertions +var ( + _ accountstd.Interface = (*DelayedLockingAccount)(nil) +) + +// NewDelayedLockingAccount creates a new DelayedLockingAccount object. +func NewDelayedLockingAccount(d accountstd.Dependencies) (*DelayedLockingAccount, error) { + baseLockup := newBaseLockup(d) + return &DelayedLockingAccount{ + baseLockup, + }, nil +} + +type DelayedLockingAccount struct { + *BaseLockup +} + +func (dva DelayedLockingAccount) Init(ctx context.Context, msg *lockuptypes.MsgInitLockupAccount) (*lockuptypes.MsgInitLockupAccountResponse, error) { + if msg.EndTime.IsZero() { + return nil, sdkerrors.ErrInvalidRequest.Wrapf("invalid end time %s", msg.EndTime.String()) + } + + return dva.BaseLockup.Init(ctx, msg) +} + +func (dva *DelayedLockingAccount) Delegate(ctx context.Context, msg *lockuptypes.MsgDelegate) ( + *lockuptypes.MsgExecuteMessagesResponse, error, +) { + return dva.BaseLockup.Delegate(ctx, msg, dva.GetLockedCoinsWithDenoms) +} + +func (dva *DelayedLockingAccount) Undelegate(ctx context.Context, msg *lockuptypes.MsgUndelegate) ( + *lockuptypes.MsgExecuteMessagesResponse, error, +) { + return dva.BaseLockup.Undelegate(ctx, msg) +} + +func (dva *DelayedLockingAccount) SendCoins(ctx context.Context, msg *lockuptypes.MsgSend) ( + *lockuptypes.MsgExecuteMessagesResponse, error, +) { + return dva.BaseLockup.SendCoins(ctx, msg, dva.GetLockedCoinsWithDenoms) +} + +func (dva *DelayedLockingAccount) WithdrawUnlockedCoins(ctx context.Context, msg *lockuptypes.MsgWithdraw) ( + *lockuptypes.MsgWithdrawResponse, error, +) { + return dva.BaseLockup.WithdrawUnlockedCoins(ctx, msg, dva.GetLockedCoinsWithDenoms) +} + +// GetLockCoinsInfo returns the total number of unlocked and locked coins. +func (dva DelayedLockingAccount) GetLockCoinsInfo(ctx context.Context, blockTime time.Time) (sdk.Coins, sdk.Coins, error) { + endTime, err := dva.EndTime.Get(ctx) + if err != nil { + return nil, nil, err + } + originalLocking := sdk.Coins{} + err = dva.IterateCoinEntries(ctx, dva.OriginalLocking, func(key string, value math.Int) (stop bool, err error) { + originalLocking = append(originalLocking, sdk.NewCoin(key, value)) + return false, nil + }) + if err != nil { + return nil, nil, err + } + if blockTime.After(endTime) { + return originalLocking, sdk.Coins{}, nil + } + + return sdk.Coins{}, originalLocking, nil +} + +// GetLockedCoins returns the total number of locked coins. If no coins are +// locked, nil is returned. +func (dva DelayedLockingAccount) GetLockedCoins(ctx context.Context, blockTime time.Time) (sdk.Coins, error) { + _, lockedCoins, err := dva.GetLockCoinsInfo(ctx, blockTime) + if err != nil { + return nil, err + } + return lockedCoins, nil +} + +// GetLockCoinInfoWithDenom returns the number of unlocked and locked coin for a specific denom. +func (dva DelayedLockingAccount) GetLockCoinInfoWithDenom(ctx context.Context, blockTime time.Time, denom string) (*sdk.Coin, *sdk.Coin, error) { + endTime, err := dva.EndTime.Get(ctx) + if err != nil { + return nil, nil, err + } + originalLockingAmt, err := dva.OriginalLocking.Get(ctx, denom) + if err != nil { + return nil, nil, err + } + originalLockingCoin := sdk.NewCoin(denom, originalLockingAmt) + + if blockTime.After(endTime) { + return &originalLockingCoin, &sdk.Coin{}, nil + } + + return &sdk.Coin{}, &originalLockingCoin, nil +} + +// GetLockedCoinsWithDenoms returns the number of locked coin for a specific denom. +func (dva DelayedLockingAccount) GetLockedCoinsWithDenoms(ctx context.Context, blockTime time.Time, denoms ...string) (sdk.Coins, error) { + vestingCoins := sdk.Coins{} + for _, denom := range denoms { + _, vestingCoin, err := dva.GetLockCoinInfoWithDenom(ctx, blockTime, denom) + if err != nil { + return nil, err + } + vestingCoins = append(vestingCoins, *vestingCoin) + } + return vestingCoins, nil +} + +func (dva DelayedLockingAccount) QueryVestingAccountInfo(ctx context.Context, req *lockuptypes.QueryLockupAccountInfoRequest) ( + *lockuptypes.QueryLockupAccountInfoResponse, error, +) { + resp, err := dva.BaseLockup.QueryLockupAccountBaseInfo(ctx, req) + if err != nil { + return nil, err + } + hs := dva.headerService.GetHeaderInfo(ctx) + unlockedCoins, lockedCoins, err := dva.GetLockCoinsInfo(ctx, hs.Time) + if err != nil { + return nil, err + } + resp.LockedCoins = lockedCoins + resp.UnlockedCoins = unlockedCoins + return resp, nil +} + +// Implement smart account interface +func (dva DelayedLockingAccount) RegisterInitHandler(builder *accountstd.InitBuilder) { + accountstd.RegisterInitHandler(builder, dva.Init) +} + +func (dva DelayedLockingAccount) RegisterExecuteHandlers(builder *accountstd.ExecuteBuilder) { + accountstd.RegisterExecuteHandler(builder, dva.Delegate) + accountstd.RegisterExecuteHandler(builder, dva.Undelegate) + accountstd.RegisterExecuteHandler(builder, dva.SendCoins) + accountstd.RegisterExecuteHandler(builder, dva.WithdrawUnlockedCoins) +} + +func (dva DelayedLockingAccount) RegisterQueryHandlers(builder *accountstd.QueryBuilder) { + accountstd.RegisterQueryHandler(builder, dva.QueryVestingAccountInfo) +} diff --git a/x/accounts/defaults/lockup/go.mod b/x/accounts/defaults/lockup/go.mod new file mode 100644 index 000000000000..e8773cc4d85d --- /dev/null +++ b/x/accounts/defaults/lockup/go.mod @@ -0,0 +1,184 @@ +module cosmossdk.io/x/accounts/lockup + +go 1.21 + +require ( + cosmossdk.io/collections v0.4.0 + cosmossdk.io/core v0.12.1-0.20231114100755-569e3ff6a0d7 + cosmossdk.io/x/accounts v0.0.0-20240226161501-23359a0b6d91 + cosmossdk.io/x/bank v0.0.0-20240226161501-23359a0b6d91 + github.com/cosmos/cosmos-sdk v0.51.0 + github.com/cosmos/gogoproto v1.4.11 +) + +require ( + cosmossdk.io/api v0.7.3 + github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect + github.com/spf13/cobra v1.8.0 // indirect + github.com/stretchr/testify v1.9.0 // indirect + golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 +) + +require ( + cosmossdk.io/errors v1.0.1 + cosmossdk.io/log v1.3.1 // indirect + cosmossdk.io/math v1.3.0 + cosmossdk.io/store v1.0.2 // indirect + cosmossdk.io/x/tx v0.13.1 // indirect + filippo.io/edwards25519 v1.1.0 // indirect + github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect + github.com/99designs/keyring v1.2.2 // indirect + github.com/DataDog/datadog-go v4.8.3+incompatible // indirect + github.com/DataDog/zstd v1.5.5 // indirect + github.com/Microsoft/go-winio v0.6.1 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 // indirect + github.com/btcsuite/btcd/btcec/v2 v2.3.2 // 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 + github.com/cockroachdb/errors v1.11.1 // indirect + github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect + github.com/cockroachdb/pebble v1.1.0 // indirect + github.com/cockroachdb/redact v1.1.5 // indirect + github.com/cometbft/cometbft v0.38.5 // indirect + github.com/cometbft/cometbft-db v0.11.0 // indirect + github.com/cosmos/btcutil v1.0.5 // indirect + github.com/cosmos/cosmos-db v1.0.2 // indirect + github.com/cosmos/cosmos-proto v1.0.0-beta.4 + github.com/cosmos/go-bip39 v1.0.0 // indirect + github.com/cosmos/gogogateway v1.2.0 // indirect + github.com/cosmos/iavl v1.0.1 // indirect + github.com/cosmos/ics23/go v0.10.0 // indirect + github.com/cosmos/ledger-cosmos-go v0.13.3 // indirect + github.com/danieljoos/wincred v1.2.1 // indirect + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect + github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect + github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f // indirect + github.com/dgraph-io/badger/v2 v2.2007.4 // indirect + github.com/dgraph-io/ristretto v0.1.1 // indirect + github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect + github.com/dustin/go-humanize v1.0.1 // indirect + github.com/dvsekhvalnov/jose2go v1.6.0 // indirect + github.com/emicklei/dot v1.6.1 // indirect + github.com/fatih/color v1.16.0 // indirect + github.com/felixge/httpsnoop v1.0.4 // indirect + github.com/fsnotify/fsnotify v1.7.0 // indirect + github.com/getsentry/sentry-go v0.27.0 // indirect + github.com/go-kit/kit v0.13.0 // indirect + github.com/go-kit/log v0.2.1 // indirect + github.com/go-logfmt/logfmt v0.6.0 // indirect + github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect + github.com/gogo/googleapis v1.4.1 // indirect + github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang/glog v1.2.0 // indirect + github.com/golang/protobuf v1.5.4 // indirect + github.com/golang/snappy v0.0.4 // indirect + github.com/google/btree v1.1.2 // indirect + github.com/google/go-cmp v0.6.0 // indirect + github.com/gorilla/handlers v1.5.2 // indirect + github.com/gorilla/mux v1.8.1 // indirect + github.com/gorilla/websocket v1.5.1 // indirect + github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect + github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect + github.com/hashicorp/go-hclog v1.6.2 // indirect + github.com/hashicorp/go-immutable-radix v1.3.1 // indirect + github.com/hashicorp/go-metrics v0.5.3 // indirect + github.com/hashicorp/go-plugin v1.6.0 // indirect + github.com/hashicorp/golang-lru v1.0.2 // indirect + github.com/hashicorp/hcl v1.0.0 // indirect + github.com/hashicorp/yamux v0.1.1 // indirect + github.com/hdevalence/ed25519consensus v0.2.0 // indirect + github.com/huandu/skiplist v1.2.0 // indirect + github.com/iancoleman/strcase v0.3.0 // indirect + github.com/improbable-eng/grpc-web v0.15.0 // indirect + github.com/inconshreveable/mousetrap v1.1.0 // indirect + github.com/jmhodges/levigo v1.0.0 // indirect + github.com/klauspost/compress v1.17.7 // indirect + github.com/kr/pretty v0.3.1 // indirect + github.com/kr/text v0.2.0 // indirect + github.com/libp2p/go-buffer-pool v0.1.0 // indirect + github.com/linxGnu/grocksdb v1.8.12 // indirect + github.com/magiconair/properties v1.8.7 // indirect + github.com/mattn/go-colorable v0.1.13 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect + github.com/mitchellh/go-testing-interface v1.14.1 // indirect + github.com/mitchellh/mapstructure v1.5.0 // indirect + github.com/mtibben/percent v0.2.1 // indirect + github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a // indirect + github.com/oklog/run v1.1.0 // indirect + github.com/pelletier/go-toml/v2 v2.1.1 // indirect + github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 // indirect + github.com/pkg/errors v0.9.1 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.0 // indirect + github.com/prometheus/common v0.50.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect + github.com/rogpeppe/go-internal v1.12.0 // indirect + github.com/rs/cors v1.10.1 // indirect + github.com/rs/zerolog v1.32.0 // indirect + github.com/sagikazarmark/locafero v0.4.0 // indirect + github.com/sagikazarmark/slog-shim v0.1.0 // indirect + github.com/sasha-s/go-deadlock v0.3.1 // indirect + github.com/sourcegraph/conc v0.3.0 // indirect + github.com/spf13/afero v1.11.0 // indirect + github.com/spf13/cast v1.6.0 // indirect + github.com/spf13/pflag v1.0.5 // indirect + github.com/spf13/viper v1.18.2 // indirect + github.com/subosito/gotenv v1.6.0 // indirect + github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect + github.com/tendermint/go-amino v0.16.0 // indirect + github.com/tidwall/btree v1.7.0 // indirect + github.com/zondax/hid v0.9.2 // indirect + github.com/zondax/ledger-go v0.14.3 // indirect + gitlab.com/yawning/secp256k1-voi v0.0.0-20230925100816-f2616030848b // indirect + gitlab.com/yawning/tuplehash v0.0.0-20230713102510-df83abbf9a02 // indirect + go.etcd.io/bbolt v1.3.9 // indirect + go.uber.org/multierr v1.11.0 // indirect + golang.org/x/crypto v0.21.0 // indirect + golang.org/x/mod v0.15.0 // indirect + golang.org/x/net v0.22.0 // indirect + golang.org/x/sync v0.6.0 // indirect + golang.org/x/sys v0.18.0 // indirect + golang.org/x/term v0.18.0 // indirect + golang.org/x/text v0.14.0 // indirect + golang.org/x/tools v0.18.0 // indirect + google.golang.org/genproto v0.0.0-20240221002015-b0ce06bbee7c // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240221002015-b0ce06bbee7c // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240221002015-b0ce06bbee7c // indirect + gopkg.in/ini.v1 v1.67.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect + gotest.tools/v3 v3.5.1 // indirect + nhooyr.io/websocket v1.8.10 // indirect + pgregory.net/rapid v1.1.0 // indirect + sigs.k8s.io/yaml v1.4.0 // indirect +) + +require ( + buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.32.0-20240130113600-88ef6483f90f.1 // indirect + buf.build/gen/go/tendermint/tendermint/protocolbuffers/go v1.32.0-20231117195010-33ed361a9051.1 // indirect + cosmossdk.io/x/auth v0.0.0-00010101000000-000000000000 // indirect + github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect +) + +replace github.com/cosmos/cosmos-sdk => ../../../../. + +replace ( + cosmossdk.io/api => ../../../../api + cosmossdk.io/core => ../../../../core + cosmossdk.io/depinject => ../../../../depinject + cosmossdk.io/x/accounts => ../../. + cosmossdk.io/x/auth => ../../../auth + cosmossdk.io/x/bank => ../../../bank + cosmossdk.io/x/distribution => ../../../distribution + cosmossdk.io/x/gov => ../../../gov + cosmossdk.io/x/mint => ../../../mint + cosmossdk.io/x/protocolpool => ../../../protocolpool + cosmossdk.io/x/slashing => ../../../slashing + cosmossdk.io/x/staking => ../../../staking + github.com/gin-gonic/gin => github.com/gin-gonic/gin v1.9.1 +) diff --git a/x/accounts/defaults/lockup/go.sum b/x/accounts/defaults/lockup/go.sum new file mode 100644 index 000000000000..c1b0d6431b68 --- /dev/null +++ b/x/accounts/defaults/lockup/go.sum @@ -0,0 +1,1009 @@ +buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.32.0-20230509103710-5e5b9fdd0180.1/go.mod h1:5GqIYthcy/ASmnKcaT26APpxMhZirnIHXHKki69zjWI= +buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.32.0-20240130113600-88ef6483f90f.1 h1:68Z59OMFg4fY0XXsJWPZJQxB92R4pw6b5qphrWfHtro= +buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.32.0-20240130113600-88ef6483f90f.1/go.mod h1:5GqIYthcy/ASmnKcaT26APpxMhZirnIHXHKki69zjWI= +buf.build/gen/go/tendermint/tendermint/protocolbuffers/go v1.32.0-20231117195010-33ed361a9051.1 h1:VooqQ3rklp3PwMTAE890M76w/8Z01OPa7RdgU9posFE= +buf.build/gen/go/tendermint/tendermint/protocolbuffers/go v1.32.0-20231117195010-33ed361a9051.1/go.mod h1:9KmeMJUsSG3IiIwK63Lh1ipZJrwd7KHrWZseJeHukcs= +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= +cosmossdk.io/collections v0.4.0/go.mod h1:oa5lUING2dP+gdDquow+QjlF45eL1t4TJDypgGd+tv0= +cosmossdk.io/errors v1.0.1 h1:bzu+Kcr0kS/1DuPBtUFdWjzLqyUuCiyHjyJB6srBV/0= +cosmossdk.io/errors v1.0.1/go.mod h1:MeelVSZThMi4bEakzhhhE/CKqVv3nOJDA25bIqRDu/U= +cosmossdk.io/log v1.3.1 h1:UZx8nWIkfbbNEWusZqzAx3ZGvu54TZacWib3EzUYmGI= +cosmossdk.io/log v1.3.1/go.mod h1:2/dIomt8mKdk6vl3OWJcPk2be3pGOS8OQaLUM/3/tCM= +cosmossdk.io/math v1.3.0 h1:RC+jryuKeytIiictDslBP9i1fhkVm6ZDmZEoNP316zE= +cosmossdk.io/math v1.3.0/go.mod h1:vnRTxewy+M7BtXBNFybkuhSH4WfedVAAnERHgVFhp3k= +cosmossdk.io/store v1.0.2 h1:lSg5BTvJBHUDwswNNyeh4K/CbqiHER73VU4nDNb8uk0= +cosmossdk.io/store v1.0.2/go.mod h1:EFtENTqVTuWwitGW1VwaBct+yDagk7oG/axBMPH+FXs= +cosmossdk.io/x/tx v0.13.1 h1:Mg+EMp67Pz+NukbJqYxuo8uRp7N/a9uR+oVS9pONtj8= +cosmossdk.io/x/tx v0.13.1/go.mod h1:CBCU6fsRVz23QGFIQBb1DNX2DztJCf3jWyEkHY2nJQ0= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= +filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= +github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 h1:/vQbFIOMbk2FiG/kXiLl8BRyzTWDw7gX/Hz7Dd5eDMs= +github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4/go.mod h1:hN7oaIRCjzsZ2dE+yG5k+rsdt3qcwykqK6HVGcKwsw4= +github.com/99designs/keyring v1.2.2 h1:pZd3neh/EmUzWONb35LxQfvuY7kiSXAq3HQd97+XBn0= +github.com/99designs/keyring v1.2.2/go.mod h1:wes/FrByc8j7lFOAGLGSNEg8f/PaI3cgTBqhFkHUrPk= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= +github.com/DataDog/datadog-go v4.8.3+incompatible h1:fNGaYSuObuQb5nzeTQqowRAd9bpDIRRV4/gUtIBjh8Q= +github.com/DataDog/datadog-go v4.8.3+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= +github.com/DataDog/zstd v1.5.5 h1:oWf5W7GtOLgp6bciQYDmhHHjdhYkALu6S/5Ni9ZgSvQ= +github.com/DataDog/zstd v1.5.5/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= +github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= +github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= +github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= +github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= +github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= +github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= +github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= +github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= +github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= +github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= +github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= +github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= +github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= +github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= +github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= +github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= +github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= +github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= +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= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 h1:41iFGWnSlI2gVpmOtVTJZNodLdLQLn/KsJqFvXwnd/s= +github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/btcsuite/btcd/btcec/v2 v2.3.2 h1:5n0X6hX0Zk+6omWcihdYvdAlGf2DfasC0GMf7DClJ3U= +github.com/btcsuite/btcd/btcec/v2 v2.3.2/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= +github.com/btcsuite/btcd/btcutil v1.1.3 h1:xfbtw8lwpp0G6NwSHb+UE67ryTFHJAiNuipusjXSohQ= +github.com/btcsuite/btcd/btcutil v1.1.3/go.mod h1:UR7dsSJzJUfMmFiiLlIrMq1lS9jh9EdCV7FStZSnpi0= +github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 h1:q0rUy8C/TYNBQS1+CGKw68tLOFYSNEs0TFnxxnS9+4U= +github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= +github.com/bufbuild/protocompile v0.5.1 h1:mixz5lJX4Hiz4FpqFREJHIXLfaLBntfaJv1h+/jS+Qg= +github.com/bufbuild/protocompile v0.5.1/go.mod h1:G5iLmavmF4NsYtpZFvE3B/zFch2GIY8+wjsYLR/lc40= +github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM= +github.com/bytedance/sonic v1.9.1/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U= +github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= +github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= +github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= +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= +github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= +github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= +github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F32mSOjUmXrMHnKwZdA8wcEefY7UVqBKYGjpdQY= +github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311/go.mod h1:b583jCggY9gE99b6G5LEC39OIiVsWj+R97kbl5odCEk= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= +github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= +github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= +github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= +github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f h1:otljaYPt5hWxV3MUfO5dFPFiOXg9CyG5/kCfayTqsJ4= +github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= +github.com/cockroachdb/errors v1.11.1 h1:xSEW75zKaKCWzR3OfxXUxgrk/NtT4G1MiOv5lWZazG8= +github.com/cockroachdb/errors v1.11.1/go.mod h1:8MUxA3Gi6b25tYlFEBGLf+D8aISL+M4MIpiWMSNRfxw= +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.0 h1:pcFh8CdCIt2kmEpK0OIatq67Ln9uGDYY3d5XnE0LJG4= +github.com/cockroachdb/pebble v1.1.0/go.mod h1:sEHm5NOXxyiAoKWhoFxT8xMgd/f3RA6qUqQ1BXKrh2E= +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/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= +github.com/cometbft/cometbft v0.38.5 h1:4lOcK5VTPrfbLOhNHmPYe6c7eDXHtBdMCQuKbAfFJdU= +github.com/cometbft/cometbft v0.38.5/go.mod h1:0tqKin+KQs8zDwzYD8rPHzSBIDNPuB4NrwwGDNb/hUg= +github.com/cometbft/cometbft-db v0.11.0 h1:M3Lscmpogx5NTbb1EGyGDaFRdsoLWrUWimFEyf7jej8= +github.com/cometbft/cometbft-db v0.11.0/go.mod h1:GDPJAC/iFHNjmZZPN8V8C1yr/eyityhi2W1hz2MGKSc= +github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= +github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/cosmos/btcutil v1.0.5 h1:t+ZFcX77LpKtDBhjucvnOH8C2l2ioGsBNEQ3jef8xFk= +github.com/cosmos/btcutil v1.0.5/go.mod h1:IyB7iuqZMJlthe2tkIFL33xPyzbFYP0XVdS8P5lUPis= +github.com/cosmos/cosmos-db v1.0.2 h1:hwMjozuY1OlJs/uh6vddqnk9j7VamLv+0DBlbEXbAKs= +github.com/cosmos/cosmos-db v1.0.2/go.mod h1:Z8IXcFJ9PqKK6BIsVOB3QXtkKoqUOp1vRvPT39kOXEA= +github.com/cosmos/cosmos-proto v1.0.0-beta.4 h1:aEL7tU/rLOmxZQ9z4i7mzxcLbSCY48OdY7lIWTLG7oU= +github.com/cosmos/cosmos-proto v1.0.0-beta.4/go.mod h1:oeB+FyVzG3XrQJbJng0EnV8Vljfk9XvTIpGILNU/9Co= +github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= +github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= +github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= +github.com/cosmos/gogogateway v1.2.0/go.mod h1:iQpLkGWxYcnCdz5iAdLcRBSw3h7NXeOkZ4GUkT+tbFI= +github.com/cosmos/gogoproto v1.4.2/go.mod h1:cLxOsn1ljAHSV527CHOtaIP91kK6cCrZETRBrkzItWU= +github.com/cosmos/gogoproto v1.4.11 h1:LZcMHrx4FjUgrqQSWeaGC1v/TeuVFqSLa43CC6aWR2g= +github.com/cosmos/gogoproto v1.4.11/go.mod h1:/g39Mh8m17X8Q/GDEs5zYTSNaNnInBSohtaxzQnYq1Y= +github.com/cosmos/iavl v1.0.1 h1:D+mYbcRO2wptYzOM1Hxl9cpmmHU1ZEt9T2Wv5nZTeUw= +github.com/cosmos/iavl v1.0.1/go.mod h1:8xIUkgVvwvVrBu81scdPty+/Dx9GqwHnAvXz4cwF7RY= +github.com/cosmos/ics23/go v0.10.0 h1:iXqLLgp2Lp+EdpIuwXTYIQU+AiHj9mOC2X9ab++bZDM= +github.com/cosmos/ics23/go v0.10.0/go.mod h1:ZfJSmng/TBNTBkFemHHHj5YY7VAU/MBU980F4VU1NG0= +github.com/cosmos/ledger-cosmos-go v0.13.3 h1:7ehuBGuyIytsXbd4MP43mLeoN2LTOEnk5nvue4rK+yM= +github.com/cosmos/ledger-cosmos-go v0.13.3/go.mod h1:HENcEP+VtahZFw38HZ3+LS3Iv5XV6svsnkk9vdJtLr8= +github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= +github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/danieljoos/wincred v1.2.1 h1:dl9cBrupW8+r5250DYkYxocLeZ1Y4vB1kxgtjxw8GQs= +github.com/danieljoos/wincred v1.2.1/go.mod h1:uGaFL9fDn3OLTvzCGulzE+SzjEe5NGlh5FdCcyfPwps= +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/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.2.0 h1:8UrgZ3GkP4i/CLijOJx79Yu+etlyjdBU4sfcs2WYQMs= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0= +github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f h1:U5y3Y5UE0w7amNe7Z5G/twsBW0KEalRQXZzf8ufSh9I= +github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f/go.mod h1:xH/i4TFMt8koVQZ6WFms69WAsDWr2XsYL3Hkl7jkoLE= +github.com/dgraph-io/badger/v2 v2.2007.4 h1:TRWBQg8UrlUhaFdco01nO2uXwzKS7zd+HVdwV/GHc4o= +github.com/dgraph-io/badger/v2 v2.2007.4/go.mod h1:vSw/ax2qojzbN6eXHIx6KPKtCSHJN/Uz0X0VPruTIhk= +github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E= +github.com/dgraph-io/ristretto v0.1.1 h1:6CWw5tJNgpegArSHpNHJKldNeq03FQCwYvfMVWajOK8= +github.com/dgraph-io/ristretto v0.1.1/go.mod h1:S1GPSBCYCIhmVNfcth17y2zZtQT6wzkzgwUve0VDWWA= +github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= +github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 h1:fAjc9m62+UWV/WAFKLNi6ZS0675eEUC9y3AlwSbQu1Y= +github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= +github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= +github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= +github.com/dvsekhvalnov/jose2go v1.6.0 h1:Y9gnSnP4qEI0+/uQkHvFXeD2PLPJeXEL+ySMEA2EjTY= +github.com/dvsekhvalnov/jose2go v1.6.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= +github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= +github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= +github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= +github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= +github.com/emicklei/dot v1.6.1 h1:ujpDlBkkwgWUY+qPId5IwapRW/xEoligRSYjioR6DFI= +github.com/emicklei/dot v1.6.1/go.mod h1:DeV7GvQtIw4h2u73RKBkkFdvVAz0D9fzeJrgPW6gy/s= +github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= +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.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= +github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= +github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= +github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= +github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= +github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= +github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= +github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= +github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= +github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= +github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= +github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= +github.com/gabriel-vasile/mimetype v1.4.2/go.mod h1:zApsH/mKG4w07erKIaJPFiX0Tsq9BFQgN3qGY5GnNgA= +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/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= +github.com/gin-gonic/gin v1.9.1/go.mod h1:hPrL7YrpYKXt5YId3A/Tnip5kqbEAP+KLuI3SUcPTeU= +github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= +github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= +github.com/go-kit/kit v0.13.0 h1:OoneCcHKHQ03LfBpoQCUfCluwd2Vt3ohz+kvbJneZAU= +github.com/go-kit/kit v0.13.0/go.mod h1:phqEHMMUbyrCFCTgH48JueqrM3md2HcAZ8N3XE4FKDg= +github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= +github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= +github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= +github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4= +github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= +github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= +github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= +github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= +github.com/go-playground/validator/v10 v10.14.0/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= +github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= +github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= +github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= +github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= +github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= +github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0= +github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= +github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= +github.com/gogo/googleapis v1.4.1-0.20201022092350-68b0159b7869/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= +github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0= +github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= +github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/glog v1.2.0 h1:uCdmnmatrKCgMBlM4rMuJZWOkPDqdbZPnrMXDY4gI68= +github.com/golang/glog v1.2.0/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= +github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= +github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a1/R87v0= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= +github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= +github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= +github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= +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/orderedcode v0.0.1 h1:UzfcAexk9Vhv8+9pNOgRu41f16lHq725vPwnSeiG/Us= +github.com/google/orderedcode v0.0.1/go.mod h1:iVyU4/qPKHY5h/wSd6rZZCDcLJNxiWO6dvsYES2Sb20= +github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= +github.com/gorilla/handlers v1.5.2 h1:cLTUSsNkgcwhgRqvCNmdbRWG0A3N4F+M2nWKdScwyEE= +github.com/gorilla/handlers v1.5.2/go.mod h1:dX+xVpaxdSw+q0Qek8SSsl3dfMk3jNddUkMzo0GtH0w= +github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY= +github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ= +github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gorilla/websocket v1.5.1 h1:gmztn0JnHVt9JZquRuzLw3g4wouNVzKL15iLr/zn/QY= +github.com/gorilla/websocket v1.5.1/go.mod h1:x3kM2JMyaluk02fnUJpQuwD2dCS5NDG2ZHL0uE0tcaY= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI= +github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI= +github.com/grpc-ecosystem/go-grpc-middleware v1.4.0/go.mod h1:g5qyo/la0ALbONm6Vbp88Yd8NsDy6rZz+RcrMPxvld8= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= +github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= +github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= +github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c h1:6rhixN/i8ZofjG1Y75iExal34USq5p+wiN1tpie8IrU= +github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NMPJylDgVpX0MLRlPy15sqSwOFv/U1GZ2m21JhFfek0= +github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= +github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-hclog v1.6.2 h1:NOtoftovWkDheyUM/8JW3QMiXyxJK3uHRK7wV04nD2I= +github.com/hashicorp/go-hclog v1.6.2/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= +github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= +github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-metrics v0.5.3 h1:M5uADWMOGCTUNU1YuC4hfknOeHNaX54LDm4oYSucoNE= +github.com/hashicorp/go-metrics v0.5.3/go.mod h1:KEjodfebIOuBYSAe/bHTm+HChmKSxAOXPBieMLYozDE= +github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= +github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-plugin v1.6.0 h1:wgd4KxHJTVGGqWBq4QPB1i5BZNEx9BR8+OFmHDmTk8A= +github.com/hashicorp/go-plugin v1.6.0/go.mod h1:lBS5MtSSBZk0SHc66KACcjjlU6WzEVP/8pwz68aMkCI= +github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= +github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= +github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= +github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= +github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.1 h1:fv1ep09latC32wFoVwnqcnKJGnMSdBanPczbHAYm1BE= +github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v1.0.2 h1:dV3g9Z/unq5DpblPpw+Oqcv4dU/1omnb4Ok8iPY6p1c= +github.com/hashicorp/golang-lru v1.0.2/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= +github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= +github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= +github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= +github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= +github.com/hashicorp/yamux v0.1.1 h1:yrQxtgseBDrq9Y652vSRDvsKCJKOUD+GzTS4Y0Y8pvE= +github.com/hashicorp/yamux v0.1.1/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ= +github.com/hdevalence/ed25519consensus v0.2.0 h1:37ICyZqdyj0lAZ8P4D1d1id3HqbbG1N3iBb1Tb4rdcU= +github.com/hdevalence/ed25519consensus v0.2.0/go.mod h1:w3BHWjwJbFU29IRHL1Iqkw3sus+7FctEyM4RqDxYNzo= +github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/huandu/go-assert v1.1.5 h1:fjemmA7sSfYHJD7CUqs9qTwwfdNAx7/j2/ZlHXzNB3c= +github.com/huandu/go-assert v1.1.5/go.mod h1:yOLvuqZwmcHIC5rIzrBhT7D3Q9c3GFnd0JrPVhn/06U= +github.com/huandu/skiplist v1.2.0 h1:gox56QD77HzSC0w+Ws3MH3iie755GBJU1OER3h5VsYw= +github.com/huandu/skiplist v1.2.0/go.mod h1:7v3iFjLcSAzO4fN5B8dvebvo/qsfumiLiDXMrPiHF9w= +github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= +github.com/iancoleman/strcase v0.3.0 h1:nTXanmYxhfFAMjZL34Ov6gkzEsSJZ5DbhxWjvSASxEI= +github.com/iancoleman/strcase v0.3.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= +github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/improbable-eng/grpc-web v0.15.0 h1:BN+7z6uNXZ1tQGcNAuaU1YjsLTApzkjt2tzCixLaUPQ= +github.com/improbable-eng/grpc-web v0.15.0/go.mod h1:1sy9HKV4Jt9aEs9JSnkWlRJPuPtwNr0l57L4f878wP8= +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= +github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= +github.com/jhump/protoreflect v1.15.3 h1:6SFRuqU45u9hIZPJAoZ8c28T3nK64BNdp9w6jFonzls= +github.com/jhump/protoreflect v1.15.3/go.mod h1:4ORHmSBmlCW8fh3xHmJMGyul1zNqZK4Elxc8qKP+p1k= +github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= +github.com/jmhodges/levigo v1.0.0 h1:q5EC36kV79HWeTBWsod3mG11EgStG3qArTKcvlksN1U= +github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= +github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +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= +github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= +github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= +github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= +github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= +github.com/klauspost/compress v1.11.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= +github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= +github.com/klauspost/compress v1.17.7 h1:ehO88t2UGzQK66LMdE8tibEd1ErmzZjNEqWkjLAKQQg= +github.com/klauspost/compress v1.17.7/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= +github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= +github.com/klauspost/cpuid/v2 v2.2.4/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/leodido/go-urn v1.2.4/go.mod h1:7ZrI8mTSeBSHl/UaRyKQW1qZeMgak41ANeCNaVckg+4= +github.com/lib/pq v1.10.7 h1:p7ZhMD+KsSRozJr34udlUrhboJwWAgCg34+/ZZNvZZw= +github.com/lib/pq v1.10.7/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= +github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6cdF0Y8= +github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= +github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= +github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= +github.com/linxGnu/grocksdb v1.8.12 h1:1/pCztQUOa3BX/1gR3jSZDoaKFpeHFvQ1XrqZpSvZVo= +github.com/linxGnu/grocksdb v1.8.12/go.mod h1:xZCIb5Muw+nhbDK4Y5UJuOrin5MceOuiXkVUR7vp4WY= +github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= +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/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= +github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= +github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= +github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= +github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= +github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +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.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= +github.com/minio/highwayhash v1.0.2 h1:Aak5U0nElisjDCfPSG79Tgzkn2gl66NxOMspRrKnA/g= +github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= +github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= +github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= +github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJJ2JqpQmpLJOu07cU= +github.com/mitchellh/go-testing-interface v1.14.1/go.mod h1:gfgS7OtZj6MA4U1UrDRp04twqAjfvlZyCfX3sDjEym8= +github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= +github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= +github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +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/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/mtibben/percent v0.2.1 h1:5gssi8Nqo8QU/r2pynCm+hBQHpkB/uNK7BJCFogWdzs= +github.com/mtibben/percent v0.2.1/go.mod h1:KG9uO+SZkUp+VkRHsCdYQV3XSZrrSpR3O9ibNBTZrns= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mwitkow/grpc-proxy v0.0.0-20181017164139-0f1106ef9c76/go.mod h1:x5OoJHDHqxHS801UIuhqGl6QdSAEJvtausosHSdazIo= +github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= +github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU= +github.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k= +github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= +github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= +github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= +github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= +github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= +github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= +github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= +github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a h1:dlRvE5fWabOchtH7znfiFCcOvmIYgOeAS5ifBXBlh9Q= +github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a/go.mod h1:hVoHR2EVESiICEMbg137etN/Lx+lSrHPTD39Z/uE+2s= +github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= +github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= +github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= +github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU= +github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= +github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= +github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= +github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= +github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= +github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= +github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= +github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= +github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= +github.com/onsi/gomega v1.26.0 h1:03cDLK28U6hWvCAns6NeydX3zIm4SF3ci69ulidS32Q= +github.com/onsi/gomega v1.26.0/go.mod h1:r+zV744Re+DiYCIPRlYOTxn0YkOLcAnW8k1xXdMPGhM= +github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= +github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= +github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= +github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxSfWAKL3wpBW7V8scJMt8N8gnaMCS9E/cA= +github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= +github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= +github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= +github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= +github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= +github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= +github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4= +github.com/pelletier/go-toml/v2 v2.1.1 h1:LWAJwfNvjQZCFIDKWYQaM62NcYeYViCmWIwmOStowAI= +github.com/pelletier/go-toml/v2 v2.1.1/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= +github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= +github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= +github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 h1:jik8PHtAIsPlCRJjJzl4udgEf7hawInF9texMeO2jrU= +github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= +github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= +github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= +github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= +github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= +github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +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= +github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= +github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= +github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= +github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= +github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= +github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= +github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= +github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= +github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= +github.com/prometheus/common v0.50.0 h1:YSZE6aa9+luNa2da6/Tik0q0A5AbR+U003TItK57CPQ= +github.com/prometheus/common v0.50.0/go.mod h1:wHFBCEVWVmHMUpg7pYcOm2QUR/ocQdYSJVQJKnHc3xQ= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= +github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.3.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= +github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= +github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= +github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= +github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= +github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= +github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= +github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= +github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= +github.com/rs/cors v1.10.1 h1:L0uuZVXIKlI1SShY2nhFfo44TYvDPQ1w4oFkUJNfhyo= +github.com/rs/cors v1.10.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= +github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= +github.com/rs/zerolog v1.32.0 h1:keLypqrlIjaFsbmJOBdB/qvyF8KEtCWHwobLp5l/mQ0= +github.com/rs/zerolog v1.32.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= +github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= +github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +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/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ= +github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= +github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE= +github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ= +github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= +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/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= +github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= +github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= +github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= +github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo= +github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0= +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= +github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= +github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8= +github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY= +github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0= +github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= +github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= +github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= +github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= +github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= +github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= +github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= +github.com/spf13/viper v1.18.2 h1:LUXCnvUvSM6FXAsj6nnfc8Q2tp1dIgUfY9Kc8GsSOiQ= +github.com/spf13/viper v1.18.2/go.mod h1:EKmWIqdnk5lOcmR72yw6hS+8OPYcwD0jteitLMVB+yk= +github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= +github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= +github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= +github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= +github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d h1:vfofYNRScrDdvS342BElfbETmL1Aiz3i2t0zfRj16Hs= +github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d/go.mod h1:RRCYJbIwD5jmqPI9XoAFR0OcDxqUctll6zUj/+B4S48= +github.com/tendermint/go-amino v0.16.0 h1:GyhmgQKvqF82e2oZeuMSp9JTN0N09emoSZlb2lyGa2E= +github.com/tendermint/go-amino v0.16.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= +github.com/tidwall/btree v1.7.0 h1:L1fkJH/AuEh5zBnnBbmTwQ5Lt+bRJ5A8EWecslvo9iI= +github.com/tidwall/btree v1.7.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY= +github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= +github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= +github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= +github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= +github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= +github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +github.com/zondax/hid v0.9.2 h1:WCJFnEDMiqGF64nlZz28E9qLVZ0KSJ7xpc5DLEyma2U= +github.com/zondax/hid v0.9.2/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= +github.com/zondax/ledger-go v0.14.3 h1:wEpJt2CEcBJ428md/5MgSLsXLBos98sBOyxNmCjfUCw= +github.com/zondax/ledger-go v0.14.3/go.mod h1:IKKaoxupuB43g4NxeQmbLXv7T9AlQyie1UpHb342ycI= +gitlab.com/yawning/secp256k1-voi v0.0.0-20230925100816-f2616030848b h1:CzigHMRySiX3drau9C6Q5CAbNIApmLdat5jPMqChvDA= +gitlab.com/yawning/secp256k1-voi v0.0.0-20230925100816-f2616030848b/go.mod h1:/y/V339mxv2sZmYYR64O07VuCpdNZqCTwO8ZcouTMI8= +gitlab.com/yawning/tuplehash v0.0.0-20230713102510-df83abbf9a02 h1:qwDnMxjkyLmAFgcfgTnfJrmYKWhHnci3GjDqcZp1M3Q= +gitlab.com/yawning/tuplehash v0.0.0-20230713102510-df83abbf9a02/go.mod h1:JTnUj0mpYiAsuZLmKjTx/ex3AtMowcCgnE7YNyCEP0I= +go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/bbolt v1.3.9 h1:8x7aARPEXiXbHmtUwAIv7eV2fQFHrLLavdiJ3uzJXoI= +go.etcd.io/bbolt v1.3.9/go.mod h1:zaO32+Ti0PK1ivdPtgMESzuzL2VPoIG1PCQNvOdo/dE= +go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= +go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= +go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= +go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= +go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= +go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= +go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= +go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= +go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= +go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= +go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= +golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= +golang.org/x/arch v0.3.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= +golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= +golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA= +golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= +golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 h1:LfspQV/FYTatPTr/3HzIcmiUFH7PGP+OQ6mgDYo3yuQ= +golang.org/x/exp v0.0.0-20240222234643-814bf88cf225/go.mod h1:CxmFvTBINI24O/j8iY7H1xHzx2i4OsyguNBmN/uPtqc= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.15.0 h1:SernR4v+D55NyBH2QiEQrlBAnj1ECL6AGrA5+dPaMY8= +golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200421231249-e086a090c8fd/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= +golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= +golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= +golang.org/x/net v0.22.0 h1:9sGLhx7iRIHEiX0oAJ3MRZMUCElJgy7Br1nO+AMN3Tc= +golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= +golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +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-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220315194320-039c03cc5b86/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/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-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/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-20221010170243-090e33056c14/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.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= +golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= +golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= +golang.org/x/term v0.18.0 h1:FcHjZXDMxI8mM3nwhX9HlKop4C0YQvCVCdwYl2wOtE8= +golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +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.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/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= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= +golang.org/x/tools v0.18.0 h1:k8NLag8AGHnn+PHbl7g43CtqZAwG60vZkLqgyZgIHgQ= +golang.org/x/tools v0.18.0/go.mod h1:GL7B4CwcLLeo59yx/9UWWuNOW1n3VZ4f5axWfML7Lcg= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= +google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20210126160654-44e461bb6506/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20220314164441-57ef72a4c106/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= +google.golang.org/genproto v0.0.0-20240221002015-b0ce06bbee7c h1:Zmyn5CV/jxzKnF+3d+xzbomACPwLQqVpLTpyXN5uTaQ= +google.golang.org/genproto v0.0.0-20240221002015-b0ce06bbee7c/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo= +google.golang.org/genproto/googleapis/api v0.0.0-20240221002015-b0ce06bbee7c h1:9g7erC9qu44ks7UK4gDNlnk4kOxZG707xKm4jVniy6o= +google.golang.org/genproto/googleapis/api v0.0.0-20240221002015-b0ce06bbee7c/go.mod h1:5iCWqnniDlqZHrd3neWVTOwvh/v6s3232omMecelax8= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240221002015-b0ce06bbee7c h1:NUsgEN92SQQqzfA+YtqYNqYmB3DMMYLlIwUZAQFVFbo= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240221002015-b0ce06bbee7c/go.mod h1:H4O17MA/PE9BsGx3w+a+W2VOLLD1Qf7oJneAoU6WktY= +google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.32.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= +google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= +google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= +gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= +gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= +gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/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= +gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= +gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= +honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +nhooyr.io/websocket v1.8.6/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= +nhooyr.io/websocket v1.8.10 h1:mv4p+MnGrLDcPlBoWsvPP7XCzTYMXP9F9eIGoKbgx7Q= +nhooyr.io/websocket v1.8.10/go.mod h1:rN9OFWIUwuxg4fR5tELlYC04bXYowCP9GX47ivo2l+c= +pgregory.net/rapid v1.1.0 h1:CMa0sjHSru3puNx+J0MIAuiiEV4N0qj8/cMWGBBCsjw= +pgregory.net/rapid v1.1.0/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= +rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= +sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= +sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= +sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= +sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= diff --git a/x/accounts/defaults/lockup/lockup.go b/x/accounts/defaults/lockup/lockup.go new file mode 100644 index 000000000000..04b2ba28b792 --- /dev/null +++ b/x/accounts/defaults/lockup/lockup.go @@ -0,0 +1,587 @@ +package lockup + +import ( + "bytes" + "context" + "fmt" + "time" + + "cosmossdk.io/collections" + collcodec "cosmossdk.io/collections/codec" + "cosmossdk.io/core/address" + "cosmossdk.io/core/header" + errorsmod "cosmossdk.io/errors" + "cosmossdk.io/math" + "cosmossdk.io/x/accounts/accountstd" + lockuptypes "cosmossdk.io/x/accounts/lockup/types" + banktypes "cosmossdk.io/x/bank/types" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + "github.com/cosmos/gogoproto/proto" + + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) + +var ( + OriginalLockingPrefix = collections.NewPrefix(0) + DelegatedFreePrefix = collections.NewPrefix(1) + DelegatedLockingPrefix = collections.NewPrefix(2) + EndTimePrefix = collections.NewPrefix(3) + StartTimePrefix = collections.NewPrefix(4) + LockingPeriodsPrefix = collections.NewPrefix(5) + OwnerPrefix = collections.NewPrefix(6) + WithdrawedCoinsPrefix = collections.NewPrefix(7) +) + +var ( + CONTINUOUS_LOCKING_ACCOUNT = "continuous-locking-account" + DELAYED_LOCKING_ACCOUNT = "delayed-locking-account" + PERIODIC_LOCKING_ACCOUNT = "periodic-locking-account" + PERMANENT_LOCKING_ACCOUNT = "permanent-locking-account" +) + +type getLockedCoinsFunc = func(ctx context.Context, time time.Time, denoms ...string) (sdk.Coins, error) + +// newBaseLockup creates a new BaseLockup object. +func newBaseLockup(d accountstd.Dependencies) *BaseLockup { + BaseLockup := &BaseLockup{ + Owner: collections.NewItem(d.SchemaBuilder, OwnerPrefix, "owner", collections.BytesValue), + OriginalLocking: collections.NewMap(d.SchemaBuilder, OriginalLockingPrefix, "original_locking", collections.StringKey, sdk.IntValue), + DelegatedFree: collections.NewMap(d.SchemaBuilder, DelegatedFreePrefix, "delegated_free", collections.StringKey, sdk.IntValue), + DelegatedLocking: collections.NewMap(d.SchemaBuilder, DelegatedLockingPrefix, "delegated_locking", collections.StringKey, sdk.IntValue), + WithdrawedCoins: collections.NewMap(d.SchemaBuilder, WithdrawedCoinsPrefix, "withdrawed_coins", collections.StringKey, sdk.IntValue), + addressCodec: d.AddressCodec, + headerService: d.Environment.HeaderService, + EndTime: collections.NewItem(d.SchemaBuilder, EndTimePrefix, "end_time", collcodec.KeyToValueCodec[time.Time](sdk.TimeKey)), + } + + return BaseLockup +} + +type BaseLockup struct { + // Owner is the address of the account owner. + Owner collections.Item[[]byte] + OriginalLocking collections.Map[string, math.Int] + DelegatedFree collections.Map[string, math.Int] + DelegatedLocking collections.Map[string, math.Int] + WithdrawedCoins collections.Map[string, math.Int] + addressCodec address.Codec + headerService header.Service + // lockup end time. + EndTime collections.Item[time.Time] +} + +func (bva *BaseLockup) Init(ctx context.Context, msg *lockuptypes.MsgInitLockupAccount) ( + *lockuptypes.MsgInitLockupAccountResponse, error, +) { + owner, err := bva.addressCodec.StringToBytes(msg.Owner) + if err != nil { + return nil, sdkerrors.ErrInvalidAddress.Wrapf("invalid 'owner' address: %s", err) + } + err = bva.Owner.Set(ctx, owner) + if err != nil { + return nil, err + } + + funds := accountstd.Funds(ctx) + + sortedAmt := funds.Sort() + for _, coin := range sortedAmt { + err = bva.OriginalLocking.Set(ctx, coin.Denom, coin.Amount) + if err != nil { + return nil, err + } + + // Set initial value for all locked token + err = bva.WithdrawedCoins.Set(ctx, coin.Denom, math.ZeroInt()) + if err != nil { + return nil, err + } + + // Set initial value for all locked token + err = bva.DelegatedFree.Set(ctx, coin.Denom, math.ZeroInt()) + if err != nil { + return nil, err + } + + // Set initial value for all locked token + err = bva.DelegatedLocking.Set(ctx, coin.Denom, math.ZeroInt()) + if err != nil { + return nil, err + } + } + + err = bva.EndTime.Set(ctx, msg.EndTime) + if err != nil { + return nil, err + } + + return &lockuptypes.MsgInitLockupAccountResponse{}, nil +} + +func (bva *BaseLockup) Delegate( + ctx context.Context, msg *lockuptypes.MsgDelegate, getLockedCoinsFunc getLockedCoinsFunc, +) ( + *lockuptypes.MsgExecuteMessagesResponse, error, +) { + err := bva.checkSender(ctx, msg.Sender) + if err != nil { + return nil, err + } + whoami := accountstd.Whoami(ctx) + delegatorAddress, err := bva.addressCodec.BytesToString(whoami) + if err != nil { + return nil, err + } + + hs := bva.headerService.GetHeaderInfo(ctx) + + balance, err := bva.getBalance(ctx, delegatorAddress, msg.Amount.Denom) + if err != nil { + return nil, err + } + lockedCoins, err := getLockedCoinsFunc(ctx, hs.Time, msg.Amount.Denom) + if err != nil { + return nil, err + } + + err = bva.TrackDelegation( + ctx, + sdk.Coins{*balance}, + lockedCoins, + sdk.Coins{msg.Amount}, + ) + if err != nil { + return nil, err + } + + msgDelegate := makeMsgDelegate(delegatorAddress, msg.ValidatorAddress, msg.Amount) + responses, err := sendMessage(ctx, msgDelegate) + if err != nil { + return nil, err + } + + return &lockuptypes.MsgExecuteMessagesResponse{Responses: responses}, nil +} + +func (bva *BaseLockup) Undelegate( + ctx context.Context, msg *lockuptypes.MsgUndelegate, +) ( + *lockuptypes.MsgExecuteMessagesResponse, error, +) { + err := bva.checkSender(ctx, msg.Sender) + if err != nil { + return nil, err + } + whoami := accountstd.Whoami(ctx) + delegatorAddress, err := bva.addressCodec.BytesToString(whoami) + if err != nil { + return nil, err + } + + err = bva.TrackUndelegation(ctx, sdk.Coins{msg.Amount}) + if err != nil { + return nil, err + } + + msgUndelegate := makeMsgUndelegate(delegatorAddress, msg.ValidatorAddress, msg.Amount) + responses, err := sendMessage(ctx, msgUndelegate) + if err != nil { + return nil, err + } + + return &lockuptypes.MsgExecuteMessagesResponse{Responses: responses}, nil +} + +func (bva *BaseLockup) SendCoins( + ctx context.Context, msg *lockuptypes.MsgSend, getLockedCoinsFunc getLockedCoinsFunc, +) ( + *lockuptypes.MsgExecuteMessagesResponse, error, +) { + err := bva.checkSender(ctx, msg.Sender) + if err != nil { + return nil, err + } + whoami := accountstd.Whoami(ctx) + fromAddress, err := bva.addressCodec.BytesToString(whoami) + if err != nil { + return nil, err + } + + hs := bva.headerService.GetHeaderInfo(ctx) + + lockedCoins, err := getLockedCoinsFunc(ctx, hs.Time, msg.Amount.Denoms()...) + if err != nil { + return nil, err + } + + err = bva.checkTokensSendable(ctx, fromAddress, msg.Amount, lockedCoins) + if err != nil { + return nil, err + } + + msgSend := makeMsgSend(fromAddress, msg.ToAddress, msg.Amount) + responses, err := sendMessage(ctx, msgSend) + if err != nil { + return nil, err + } + + return &lockuptypes.MsgExecuteMessagesResponse{Responses: responses}, nil +} + +// WithdrawUnlockedCoins allow owner to withdraw the unlocked token for a specific denoms to an +// account of choice. Update the withdrawed token tracking for lockup account +func (bva *BaseLockup) WithdrawUnlockedCoins( + ctx context.Context, msg *lockuptypes.MsgWithdraw, getLockedCoinsFunc getLockedCoinsFunc, +) ( + *lockuptypes.MsgWithdrawResponse, error, +) { + err := bva.checkSender(ctx, msg.Withdrawer) + if err != nil { + return nil, err + } + whoami := accountstd.Whoami(ctx) + fromAddress, err := bva.addressCodec.BytesToString(whoami) + if err != nil { + return nil, err + } + + hs := bva.headerService.GetHeaderInfo(ctx) + lockedCoins, err := getLockedCoinsFunc(ctx, hs.Time, msg.Denoms...) + if err != nil { + return nil, err + } + + amount := sdk.Coins{} + for _, denom := range msg.Denoms { + balance, err := bva.getBalance(ctx, fromAddress, denom) + if err != nil { + return nil, err + } + lockedAmt := lockedCoins.AmountOf(denom) + + // get lockedCoin from that are not bonded for the sent denom + notBondedLockedCoin, err := bva.GetNotBondedLockedCoin(ctx, sdk.NewCoin(denom, lockedAmt), denom) + if err != nil { + return nil, err + } + + spendable, err := balance.SafeSub(notBondedLockedCoin) + if err != nil { + return nil, errorsmod.Wrapf(sdkerrors.ErrInsufficientFunds, + "locked amount exceeds account balance funds: %s > %s", notBondedLockedCoin, balance) + } + + withdrawedAmt, err := bva.WithdrawedCoins.Get(ctx, denom) + if err != nil { + return nil, err + } + originalLockingAmt, err := bva.OriginalLocking.Get(ctx, denom) + if err != nil { + return nil, err + } + + // withdrawable amount is equal to original locking amount subtract already withdrawed amount + withdrawableAmt, err := originalLockingAmt.SafeSub(withdrawedAmt) + if err != nil { + return nil, err + } + + withdrawAmt := math.MinInt(withdrawableAmt, spendable.Amount) + // if zero amount go to the next iteration + if withdrawAmt.IsZero() { + continue + } + amount = append(amount, sdk.NewCoin(denom, withdrawAmt)) + + // update the withdrawed amount + err = bva.WithdrawedCoins.Set(ctx, denom, withdrawedAmt.Add(withdrawAmt)) + if err != nil { + return nil, err + } + } + if len(amount) == 0 { + return nil, fmt.Errorf("no tokens available for withdrawing") + } + + msgSend := makeMsgSend(fromAddress, msg.ToAddress, amount) + _, err = sendMessage(ctx, msgSend) + if err != nil { + return nil, err + } + + return &lockuptypes.MsgWithdrawResponse{ + Reciever: msg.ToAddress, + AmountReceived: amount, + }, nil +} + +func (bva *BaseLockup) checkSender(ctx context.Context, sender string) error { + owner, err := bva.Owner.Get(ctx) + if err != nil { + return sdkerrors.ErrInvalidAddress.Wrapf("invalid owner address: %s", err.Error()) + } + senderBytes, err := bva.addressCodec.StringToBytes(sender) + if err != nil { + return sdkerrors.ErrInvalidAddress.Wrapf("invalid sender address: %s", err.Error()) + } + if !bytes.Equal(owner, senderBytes) { + return fmt.Errorf("sender is not the owner of this vesting account") + } + + return nil +} + +func sendMessage(ctx context.Context, msg proto.Message) ([]*codectypes.Any, error) { + response, err := accountstd.ExecModuleUntyped(ctx, msg) + if err != nil { + return nil, err + } + + respAny, err := accountstd.PackAny(response) + if err != nil { + return nil, err + } + + return []*codectypes.Any{respAny}, nil +} + +// TrackDelegation tracks a delegation amount for any given lockup account type +// given the amount of coins currently being locked and the current account balance +// of the delegation denominations. +// +// CONTRACT: The account's coins, delegation coins, locked coins, and delegated +// locking coins must be sorted. +func (bva *BaseLockup) TrackDelegation( + ctx context.Context, balance, lockedCoins, amount sdk.Coins, +) error { + for _, coin := range amount { + baseAmt := balance.AmountOf(coin.Denom) + lockedAmt := lockedCoins.AmountOf(coin.Denom) + delLockingAmt, err := bva.DelegatedLocking.Get(ctx, coin.Denom) + if err != nil { + return err + } + delFreeAmt, err := bva.DelegatedFree.Get(ctx, coin.Denom) + if err != nil { + return err + } + + // return error if the delegation amount is zero or if the base coins does not + // exceed the desired delegation amount. + if coin.Amount.IsZero() || baseAmt.LT(coin.Amount) { + return sdkerrors.ErrInvalidCoins.Wrap("delegation attempt with zero coins or insufficient funds") + } + + // compute x and y per the specification, where: + // X := min(max(V - DV, 0), D) + // Y := D - X + x := math.MinInt(math.MaxInt(lockedAmt.Sub(delLockingAmt), math.ZeroInt()), coin.Amount) + y := coin.Amount.Sub(x) + + delLockingCoin := sdk.NewCoin(coin.Denom, delLockingAmt) + delFreeCoin := sdk.NewCoin(coin.Denom, delFreeAmt) + if !x.IsZero() { + xCoin := sdk.NewCoin(coin.Denom, x) + newDelLocking := delLockingCoin.Add(xCoin) + err = bva.DelegatedLocking.Set(ctx, newDelLocking.Denom, newDelLocking.Amount) + if err != nil { + return err + } + } + + if !y.IsZero() { + yCoin := sdk.NewCoin(coin.Denom, y) + newDelFree := delFreeCoin.Add(yCoin) + err = bva.DelegatedFree.Set(ctx, newDelFree.Denom, newDelFree.Amount) + if err != nil { + return err + } + } + } + + return nil +} + +// TrackUndelegation tracks an undelegation amount by setting the necessary +// values by which delegated locking and delegated free need to decrease and +// by which amount the base coins need to increase. +// +// NOTE: The undelegation (bond refund) amount may exceed the delegated +// locking (bond) amount due to the way undelegation truncates the bond refund, +// which can increase the validator's exchange rate (tokens/shares) slightly if +// the undelegated tokens are non-integral. +// +// CONTRACT: The account's coins and undelegation coins must be sorted. +func (bva *BaseLockup) TrackUndelegation(ctx context.Context, amount sdk.Coins) error { + for _, coin := range amount { + // return error if the undelegation amount is zero + if coin.Amount.IsZero() { + return sdkerrors.ErrInvalidCoins.Wrap("undelegation attempt with zero coins") + } + delFreeAmt, err := bva.DelegatedFree.Get(ctx, coin.Denom) + if err != nil { + return err + } + delLockingAmt, err := bva.DelegatedLocking.Get(ctx, coin.Denom) + if err != nil { + return err + } + + // compute x and y per the specification, where: + // X := min(DF, D) + // Y := min(DV, D - X) + x := math.MinInt(delFreeAmt, coin.Amount) + y := math.MinInt(delLockingAmt, coin.Amount.Sub(x)) + + delLockingCoin := sdk.NewCoin(coin.Denom, delLockingAmt) + delFreeCoin := sdk.NewCoin(coin.Denom, delFreeAmt) + if !x.IsZero() { + xCoin := sdk.NewCoin(coin.Denom, x) + newDelFree := delFreeCoin.Sub(xCoin) + err = bva.DelegatedFree.Set(ctx, newDelFree.Denom, newDelFree.Amount) + if err != nil { + return err + } + } + + if !y.IsZero() { + yCoin := sdk.NewCoin(coin.Denom, y) + newDelLocking := delLockingCoin.Sub(yCoin) + err = bva.DelegatedLocking.Set(ctx, newDelLocking.Denom, newDelLocking.Amount) + if err != nil { + return err + } + } + } + + return nil +} + +func (bva BaseLockup) getBalance(ctx context.Context, sender, denom string) (*sdk.Coin, error) { + // Query account balance for the sent denom + balanceQueryReq := banktypes.NewQueryBalanceRequest(sdk.AccAddress(sender), denom) + resp, err := accountstd.QueryModule[banktypes.QueryBalanceResponse](ctx, balanceQueryReq) + if err != nil { + return nil, err + } + + return resp.Balance, nil +} + +func (bva BaseLockup) checkTokensSendable(ctx context.Context, sender string, amount, lockedCoins sdk.Coins) error { + // Check if any sent tokens is exceeds lockup account balances + for _, coin := range amount { + balance, err := bva.getBalance(ctx, sender, coin.Denom) + if err != nil { + return err + } + lockedAmt := lockedCoins.AmountOf(coin.Denom) + + // get lockedCoin from that are not bonded for the sent denom + notBondedLockedCoin, err := bva.GetNotBondedLockedCoin(ctx, sdk.NewCoin(coin.Denom, lockedAmt), coin.Denom) + if err != nil { + return err + } + + spendable, hasNeg := sdk.Coins{*balance}.SafeSub(notBondedLockedCoin) + if hasNeg { + return errorsmod.Wrapf(sdkerrors.ErrInsufficientFunds, + "locked amount exceeds account balance funds: %s > %s", notBondedLockedCoin, balance) + } + + if _, hasNeg := spendable.SafeSub(coin); hasNeg { + if len(spendable) == 0 { + spendable = sdk.Coins{sdk.NewCoin(coin.Denom, math.ZeroInt())} + } + return errorsmod.Wrapf( + sdkerrors.ErrInsufficientFunds, + "spendable balance %s is smaller than %s", + spendable, coin, + ) + } + } + + return nil +} + +// IterateSendEnabledEntries iterates over all the SendEnabled entries. +func (bva BaseLockup) IterateCoinEntries( + ctx context.Context, + entries collections.Map[string, math.Int], + cb func(denom string, value math.Int) (bool, error), +) error { + err := entries.Walk(ctx, nil, func(key string, value math.Int) (stop bool, err error) { + return cb(key, value) + }) + return err +} + +// GetNotBondedLockedCoin returns the coin that are not spendable that are not bonded by denom +// for a lockup account. If the coin by the provided denom are not locked, an coin with zero amount is returned. +func (bva BaseLockup) GetNotBondedLockedCoin(ctx context.Context, lockedCoin sdk.Coin, denom string) (sdk.Coin, error) { + delegatedLockingAmt, err := bva.DelegatedLocking.Get(ctx, denom) + if err != nil { + return sdk.Coin{}, err + } + + x := math.MinInt(lockedCoin.Amount, delegatedLockingAmt) + lockedAmt := lockedCoin.Amount.Sub(x) + + return sdk.NewCoin(denom, lockedAmt), nil +} + +// QueryLockupAccountBaseInfo returns a lockup account's info +func (bva BaseLockup) QueryLockupAccountBaseInfo(ctx context.Context, _ *lockuptypes.QueryLockupAccountInfoRequest) ( + *lockuptypes.QueryLockupAccountInfoResponse, error, +) { + owner, err := bva.Owner.Get(ctx) + if err != nil { + return nil, err + } + + ownerAddress, err := bva.addressCodec.BytesToString(owner) + if err != nil { + return nil, err + } + + endTime, err := bva.EndTime.Get(ctx) + if err != nil { + return nil, err + } + + originalLocking := sdk.Coins{} + err = bva.IterateCoinEntries(ctx, bva.OriginalLocking, func(key string, value math.Int) (stop bool, err error) { + originalLocking = append(originalLocking, sdk.NewCoin(key, value)) + return false, nil + }) + if err != nil { + return nil, err + } + + delegatedLocking := sdk.Coins{} + err = bva.IterateCoinEntries(ctx, bva.DelegatedLocking, func(key string, value math.Int) (stop bool, err error) { + delegatedLocking = append(delegatedLocking, sdk.NewCoin(key, value)) + return false, nil + }) + if err != nil { + return nil, err + } + + delegatedFree := sdk.Coins{} + err = bva.IterateCoinEntries(ctx, bva.DelegatedFree, func(key string, value math.Int) (stop bool, err error) { + delegatedFree = append(delegatedFree, sdk.NewCoin(key, value)) + return false, nil + }) + if err != nil { + return nil, err + } + + return &lockuptypes.QueryLockupAccountInfoResponse{ + Owner: ownerAddress, + OriginalLocking: originalLocking, + DelegatedLocking: delegatedLocking, + DelegatedFree: delegatedFree, + EndTime: &endTime, + }, nil +} diff --git a/x/accounts/defaults/lockup/periodic_locking_account.go b/x/accounts/defaults/lockup/periodic_locking_account.go new file mode 100644 index 000000000000..ae306e3b51b8 --- /dev/null +++ b/x/accounts/defaults/lockup/periodic_locking_account.go @@ -0,0 +1,337 @@ +package lockup + +import ( + "context" + "time" + + "cosmossdk.io/collections" + collcodec "cosmossdk.io/collections/codec" + errorsmod "cosmossdk.io/errors" + "cosmossdk.io/math" + "cosmossdk.io/x/accounts/accountstd" + lockuptypes "cosmossdk.io/x/accounts/lockup/types" + + "github.com/cosmos/cosmos-sdk/codec" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) + +// Compile-time type assertions +var ( + _ accountstd.Interface = (*PeriodicLockingAccount)(nil) +) + +// NewPeriodicLockingAccount creates a new PeriodicLockingAccount object. +func NewPeriodicLockingAccount(d accountstd.Dependencies) (*PeriodicLockingAccount, error) { + baseLockup := newBaseLockup(d) + + periodicsVestingAccount := PeriodicLockingAccount{ + BaseLockup: baseLockup, + StartTime: collections.NewItem(d.SchemaBuilder, StartTimePrefix, "start_time", collcodec.KeyToValueCodec[time.Time](sdk.TimeKey)), + LockingPeriods: collections.NewVec(d.SchemaBuilder, LockingPeriodsPrefix, "locking_periods", codec.CollValue[lockuptypes.Period](d.LegacyStateCodec)), + } + + return &periodicsVestingAccount, nil +} + +type PeriodicLockingAccount struct { + *BaseLockup + StartTime collections.Item[time.Time] + LockingPeriods collections.Vec[lockuptypes.Period] +} + +func (pva PeriodicLockingAccount) Init(ctx context.Context, msg *lockuptypes.MsgInitPeriodicLockingAccount) (*lockuptypes.MsgInitPeriodicLockingAccountResponse, error) { + owner, err := pva.addressCodec.StringToBytes(msg.Owner) + if err != nil { + return nil, sdkerrors.ErrInvalidAddress.Wrapf("invalid 'owner' address: %s", err) + } + + hs := pva.headerService.GetHeaderInfo(ctx) + + if msg.StartTime.Before(hs.Time) { + return nil, sdkerrors.ErrInvalidRequest.Wrap("start time %s should be after block time") + } + + totalCoins := sdk.Coins{} + endTime := msg.StartTime + for _, period := range msg.LockingPeriods { + if period.Length.Seconds() <= 0 { + return nil, errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "invalid period duration length %d", period.Length) + } + + if err := validateAmount(period.Amount); err != nil { + return nil, err + } + + totalCoins = totalCoins.Add(period.Amount...) + // Calculate end time + endTime = endTime.Add(period.Length) + err = pva.LockingPeriods.Push(ctx, period) + if err != nil { + return nil, err + } + } + + funds := accountstd.Funds(ctx) + if !funds.Equal(totalCoins) { + return nil, sdkerrors.ErrInvalidRequest.Wrap("invalid funding amount, should be equal to total coins lockup") + } + + sortedAmt := totalCoins.Sort() + for _, coin := range sortedAmt { + err := pva.OriginalLocking.Set(ctx, coin.Denom, coin.Amount) + if err != nil { + return nil, err + } + } + + err = pva.StartTime.Set(ctx, msg.StartTime) + if err != nil { + return nil, err + } + err = pva.EndTime.Set(ctx, endTime) + if err != nil { + return nil, err + } + err = pva.Owner.Set(ctx, owner) + if err != nil { + return nil, err + } + + return &lockuptypes.MsgInitPeriodicLockingAccountResponse{}, nil +} + +func (pva *PeriodicLockingAccount) Delegate(ctx context.Context, msg *lockuptypes.MsgDelegate) ( + *lockuptypes.MsgExecuteMessagesResponse, error, +) { + return pva.BaseLockup.Delegate(ctx, msg, pva.GetLockedCoinsWithDenoms) +} + +func (pva *PeriodicLockingAccount) Undelegate(ctx context.Context, msg *lockuptypes.MsgUndelegate) ( + *lockuptypes.MsgExecuteMessagesResponse, error, +) { + return pva.BaseLockup.Undelegate(ctx, msg) +} + +func (pva *PeriodicLockingAccount) SendCoins(ctx context.Context, msg *lockuptypes.MsgSend) ( + *lockuptypes.MsgExecuteMessagesResponse, error, +) { + return pva.BaseLockup.SendCoins(ctx, msg, pva.GetLockedCoinsWithDenoms) +} + +func (pva *PeriodicLockingAccount) WithdrawUnlockedCoins(ctx context.Context, msg *lockuptypes.MsgWithdraw) ( + *lockuptypes.MsgWithdrawResponse, error, +) { + return pva.BaseLockup.WithdrawUnlockedCoins(ctx, msg, pva.GetLockedCoinsWithDenoms) +} + +// IterateSendEnabledEntries iterates over all the SendEnabled entries. +func (pva PeriodicLockingAccount) IteratePeriods( + ctx context.Context, + cb func(value lockuptypes.Period) (bool, error), +) error { + err := pva.LockingPeriods.Walk(ctx, nil, func(_ uint64, value lockuptypes.Period) (stop bool, err error) { + return cb(value) + }) + if err != nil { + return err + } + + return nil +} + +// GetLockCoinsInfo returns the total number of locked and unlocked coins. +func (pva PeriodicLockingAccount) GetLockCoinsInfo(ctx context.Context, blockTime time.Time) (unlockedCoins, lockedCoins sdk.Coins, err error) { + unlockedCoins = sdk.Coins{} + lockedCoins = sdk.Coins{} + + // We must handle the case where the start time for a lockup account has + // been set into the future or when the start of the chain is not exactly + // known. + startTime, err := pva.StartTime.Get(ctx) + if err != nil { + return nil, nil, err + } + endTime, err := pva.EndTime.Get(ctx) + if err != nil { + return nil, nil, err + } + originalLocking := sdk.Coins{} + err = pva.IterateCoinEntries(ctx, pva.OriginalLocking, func(key string, value math.Int) (stop bool, err error) { + originalLocking = append(originalLocking, sdk.NewCoin(key, value)) + return false, nil + }) + if err != nil { + return nil, nil, err + } + if blockTime.Before(startTime) { + return unlockedCoins, originalLocking, nil + } else if blockTime.After(endTime) { + return originalLocking, lockedCoins, nil + } + + // track the start time of the next period + currentPeriodStartTime, err := pva.StartTime.Get(ctx) + if err != nil { + return nil, nil, err + } + + err = pva.IteratePeriods(ctx, func(period lockuptypes.Period) (stop bool, err error) { + x := blockTime.Sub(currentPeriodStartTime) + if x.Seconds() < period.Length.Seconds() { + return true, nil + } + + unlockedCoins = unlockedCoins.Add(period.Amount...) + + // update the start time of the next period + err = pva.StartTime.Set(ctx, currentPeriodStartTime.Add(period.Length)) + if err != nil { + return true, err + } + return false, nil + }) + if err != nil { + return nil, nil, err + } + + lockedCoins = originalLocking.Sub(unlockedCoins...) + + return unlockedCoins, lockedCoins, err +} + +// GetLockedCoins returns the total number of locked coins. If no coins are +// locked, nil is returned. +func (pva PeriodicLockingAccount) GetLockedCoins(ctx context.Context, blockTime time.Time) (sdk.Coins, error) { + _, vestingCoins, err := pva.GetLockCoinsInfo(ctx, blockTime) + if err != nil { + return nil, err + } + return vestingCoins, nil +} + +// GetLockCoinInfoWithDenom returns the total number of locked and unlocked coin for a specific denom. +func (pva PeriodicLockingAccount) GetLockCoinInfoWithDenom(ctx context.Context, blockTime time.Time, denom string) (unlockedCoin, lockedCoin *sdk.Coin, err error) { + // We must handle the case where the start time for a lockup account has + // been set into the future or when the start of the chain is not exactly + // known. + startTime, err := pva.StartTime.Get(ctx) + if err != nil { + return nil, nil, err + } + endTime, err := pva.EndTime.Get(ctx) + if err != nil { + return nil, nil, err + } + originalLockingAmt, err := pva.OriginalLocking.Get(ctx, denom) + if err != nil { + return nil, nil, err + } + + originalLockingCoin := sdk.NewCoin(denom, originalLockingAmt) + + if blockTime.Before(startTime) { + return &sdk.Coin{}, &originalLockingCoin, nil + } else if blockTime.After(endTime) { + return &originalLockingCoin, &sdk.Coin{}, nil + } + + // track the start time of the next period + currentPeriodStartTime, err := pva.StartTime.Get(ctx) + if err != nil { + return nil, nil, err + } + + unlocked := sdk.NewCoin(denom, math.ZeroInt()) + err = pva.IteratePeriods(ctx, func(period lockuptypes.Period) (stop bool, err error) { + x := blockTime.Sub(currentPeriodStartTime) + if x.Seconds() < period.Length.Seconds() { + return true, nil + } + + unlocked = unlocked.Add(sdk.NewCoin(denom, period.Amount.AmountOf(denom))) + + // update the start time of the next period + err = pva.StartTime.Set(ctx, currentPeriodStartTime.Add(period.Length)) + if err != nil { + return true, err + } + return false, nil + }) + if err != nil { + return nil, nil, err + } + + locked := originalLockingCoin.Sub(unlocked) + + return &unlocked, &locked, err +} + +// GetLockedCoinsWithDenoms returns the total number of locked coins. If no coins are +// locked, nil is returned. +func (pva PeriodicLockingAccount) GetLockedCoinsWithDenoms(ctx context.Context, blockTime time.Time, denoms ...string) (sdk.Coins, error) { + lockedCoins := sdk.Coins{} + for _, denom := range denoms { + _, lockedCoin, err := pva.GetLockCoinInfoWithDenom(ctx, blockTime, denom) + if err != nil { + return nil, err + } + lockedCoins = append(lockedCoins, *lockedCoin) + } + return lockedCoins, nil +} + +func (pva PeriodicLockingAccount) QueryLockupAccountInfo(ctx context.Context, req *lockuptypes.QueryLockupAccountInfoRequest) ( + *lockuptypes.QueryLockupAccountInfoResponse, error, +) { + resp, err := pva.BaseLockup.QueryLockupAccountBaseInfo(ctx, req) + if err != nil { + return nil, err + } + startTime, err := pva.StartTime.Get(ctx) + if err != nil { + return nil, err + } + hs := pva.headerService.GetHeaderInfo(ctx) + unlockedCoins, lockedCoins, err := pva.GetLockCoinsInfo(ctx, hs.Time) + if err != nil { + return nil, err + } + resp.StartTime = &startTime + resp.LockedCoins = lockedCoins + resp.UnlockedCoins = unlockedCoins + return resp, nil +} + +func (pva PeriodicLockingAccount) QueryLockingPeriods(ctx context.Context, msg *lockuptypes.QueryLockingPeriodsRequest) ( + *lockuptypes.QueryLockingPeriodsResponse, error, +) { + lockingPeriods := []*lockuptypes.Period{} + err := pva.IteratePeriods(ctx, func(period lockuptypes.Period) (stop bool, err error) { + lockingPeriods = append(lockingPeriods, &period) + return false, nil + }) + if err != nil { + return nil, err + } + return &lockuptypes.QueryLockingPeriodsResponse{ + LockingPeriods: lockingPeriods, + }, nil +} + +// Implement smart account interface +func (pva PeriodicLockingAccount) RegisterInitHandler(builder *accountstd.InitBuilder) { + accountstd.RegisterInitHandler(builder, pva.Init) +} + +func (pva PeriodicLockingAccount) RegisterExecuteHandlers(builder *accountstd.ExecuteBuilder) { + accountstd.RegisterExecuteHandler(builder, pva.Delegate) + accountstd.RegisterExecuteHandler(builder, pva.Undelegate) + accountstd.RegisterExecuteHandler(builder, pva.SendCoins) + accountstd.RegisterExecuteHandler(builder, pva.WithdrawUnlockedCoins) +} + +func (pva PeriodicLockingAccount) RegisterQueryHandlers(builder *accountstd.QueryBuilder) { + accountstd.RegisterQueryHandler(builder, pva.QueryLockupAccountInfo) + accountstd.RegisterQueryHandler(builder, pva.QueryLockingPeriods) +} diff --git a/x/accounts/defaults/lockup/permanent_locking_account.go b/x/accounts/defaults/lockup/permanent_locking_account.go new file mode 100644 index 000000000000..954139d93819 --- /dev/null +++ b/x/accounts/defaults/lockup/permanent_locking_account.go @@ -0,0 +1,109 @@ +package lockup + +import ( + "context" + "time" + + "cosmossdk.io/math" + "cosmossdk.io/x/accounts/accountstd" + lockuptypes "cosmossdk.io/x/accounts/lockup/types" + + sdk "github.com/cosmos/cosmos-sdk/types" +) + +// Compile-time type assertions +var ( + _ accountstd.Interface = (*PermanentLockingAccount)(nil) +) + +// NewPermanentLockingAccount creates a new PermanentLockingAccount object. +func NewPermanentLockingAccount(d accountstd.Dependencies) (*PermanentLockingAccount, error) { + baseLockup := newBaseLockup(d) + + return &PermanentLockingAccount{baseLockup}, nil +} + +type PermanentLockingAccount struct { + *BaseLockup +} + +func (plva PermanentLockingAccount) Init(ctx context.Context, msg *lockuptypes.MsgInitLockupAccount) (*lockuptypes.MsgInitLockupAccountResponse, error) { + resp, err := plva.BaseLockup.Init(ctx, msg) + if err != nil { + return nil, err + } + err = plva.EndTime.Set(ctx, time.Time{}) + if err != nil { + return nil, err + } + + return resp, err +} + +// GetlockedCoinsWithDenoms returns the total number of locked coins. If no coins are +// locked, nil is returned. +func (plva PermanentLockingAccount) GetlockedCoinsWithDenoms(ctx context.Context, blockTime time.Time, denoms ...string) (sdk.Coins, error) { + vestingCoins := sdk.Coins{} + for _, denom := range denoms { + originalVestingAmt, err := plva.OriginalLocking.Get(ctx, denom) + if err != nil { + return nil, err + } + vestingCoins = append(vestingCoins, sdk.NewCoin(denom, originalVestingAmt)) + } + return vestingCoins, nil +} + +func (plva *PermanentLockingAccount) Delegate(ctx context.Context, msg *lockuptypes.MsgDelegate) ( + *lockuptypes.MsgExecuteMessagesResponse, error, +) { + return plva.BaseLockup.Delegate(ctx, msg, plva.GetlockedCoinsWithDenoms) +} + +func (plva *PermanentLockingAccount) Undelegate(ctx context.Context, msg *lockuptypes.MsgUndelegate) ( + *lockuptypes.MsgExecuteMessagesResponse, error, +) { + return plva.BaseLockup.Undelegate(ctx, msg) +} + +func (plva *PermanentLockingAccount) SendCoins(ctx context.Context, msg *lockuptypes.MsgSend) ( + *lockuptypes.MsgExecuteMessagesResponse, error, +) { + return plva.BaseLockup.SendCoins(ctx, msg, plva.GetlockedCoinsWithDenoms) +} + +func (plva PermanentLockingAccount) QueryLockupAccountInfo(ctx context.Context, req *lockuptypes.QueryLockupAccountInfoRequest) ( + *lockuptypes.QueryLockupAccountInfoResponse, error, +) { + resp, err := plva.BaseLockup.QueryLockupAccountBaseInfo(ctx, req) + if err != nil { + return nil, err + } + originalLocking := sdk.Coins{} + err = plva.IterateCoinEntries(ctx, plva.OriginalLocking, func(key string, value math.Int) (stop bool, err error) { + originalLocking = append(originalLocking, sdk.NewCoin(key, value)) + return false, nil + }) + if err != nil { + return nil, err + } + + resp.LockedCoins = originalLocking + resp.UnlockedCoins = sdk.Coins{} + return resp, nil +} + +// Implement smart account interface +func (plva PermanentLockingAccount) RegisterInitHandler(builder *accountstd.InitBuilder) { + accountstd.RegisterInitHandler(builder, plva.Init) +} + +func (plva PermanentLockingAccount) RegisterExecuteHandlers(builder *accountstd.ExecuteBuilder) { + accountstd.RegisterExecuteHandler(builder, plva.Delegate) + accountstd.RegisterExecuteHandler(builder, plva.Undelegate) + accountstd.RegisterExecuteHandler(builder, plva.SendCoins) +} + +func (plva PermanentLockingAccount) RegisterQueryHandlers(builder *accountstd.QueryBuilder) { + accountstd.RegisterQueryHandler(builder, plva.QueryLockupAccountInfo) +} diff --git a/x/accounts/defaults/lockup/protov2_wrapper.go b/x/accounts/defaults/lockup/protov2_wrapper.go new file mode 100644 index 000000000000..782f9e301594 --- /dev/null +++ b/x/accounts/defaults/lockup/protov2_wrapper.go @@ -0,0 +1,70 @@ +package lockup + +import ( + bankv1beta1 "cosmossdk.io/api/cosmos/bank/v1beta1" + v1beta1 "cosmossdk.io/api/cosmos/base/v1beta1" + stakingv1beta1 "cosmossdk.io/api/cosmos/staking/v1beta1" + sdk "github.com/cosmos/cosmos-sdk/types" + "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/runtime/protoiface" +) + +type ProtoMsg = protoiface.MessageV1 + +type gogoProtoPlusV2 interface { + proto.Message + ProtoMsg +} + +// protoV2GogoWrapper is a wrapper of a protov2 message into a gogo message. +// this is exceptionally allowed to enable accounts to be decoupled from +// the SDK, since x/accounts can support only protov1 in its APIs. +// But in order to keep it decoupled from the SDK we need to use the API module. +// This is a temporary solution that is being used here: +// https://github.com/cosmos/cosmos-sdk/blob/main/x/accounts/coin_transfer.go +type protoV2GogoWrapper struct { + gogoProtoPlusV2 +} + +func (h protoV2GogoWrapper) XXX_MessageName() string { + return string(proto.MessageName(h.gogoProtoPlusV2)) +} + +func makeMsgSend(fromAddr, toAddr string, coins sdk.Coins) ProtoMsg { + v2Coins := make([]*v1beta1.Coin, len(coins)) + for i, coin := range coins { + v2Coins[i] = &v1beta1.Coin{ + Denom: coin.Denom, + Amount: coin.Amount.String(), + } + } + return protoV2GogoWrapper{&bankv1beta1.MsgSend{ + FromAddress: fromAddr, + ToAddress: toAddr, + Amount: v2Coins, + }} +} + +func makeMsgDelegate(delegatorAddr, validatorAddr string, amount sdk.Coin) ProtoMsg { + v2Coin := &v1beta1.Coin{ + Denom: amount.Denom, + Amount: amount.Amount.String(), + } + return protoV2GogoWrapper{&stakingv1beta1.MsgDelegate{ + DelegatorAddress: delegatorAddr, + ValidatorAddress: validatorAddr, + Amount: v2Coin, + }} +} + +func makeMsgUndelegate(delegatorAddr, validatorAddr string, amount sdk.Coin) ProtoMsg { + v2Coin := &v1beta1.Coin{ + Denom: amount.Denom, + Amount: amount.Amount.String(), + } + return protoV2GogoWrapper{&stakingv1beta1.MsgUndelegate{ + DelegatorAddress: delegatorAddr, + ValidatorAddress: validatorAddr, + Amount: v2Coin, + }} +} diff --git a/x/accounts/defaults/lockup/types/encoding.go b/x/accounts/defaults/lockup/types/encoding.go new file mode 100644 index 000000000000..e4aff1f1dadd --- /dev/null +++ b/x/accounts/defaults/lockup/types/encoding.go @@ -0,0 +1,26 @@ +package types + +import ( + fmt "fmt" + "reflect" + "strings" + + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + proto "github.com/cosmos/gogoproto/proto" +) + +func UnpackAnyRaw(m *codectypes.Any) (proto.Message, error) { + split := strings.Split(m.TypeUrl, "/") + name := split[len(split)-1] + typ := proto.MessageType(name) + if typ == nil { + return nil, fmt.Errorf("no message type found for %s", name) + } + concreteMsg := reflect.New(typ.Elem()).Interface().(proto.Message) + err := proto.Unmarshal(m.Value, concreteMsg) + if err != nil { + return nil, err + } + + return concreteMsg, nil +} diff --git a/x/accounts/defaults/lockup/types/lockup.pb.go b/x/accounts/defaults/lockup/types/lockup.pb.go new file mode 100644 index 000000000000..c88e65501d34 --- /dev/null +++ b/x/accounts/defaults/lockup/types/lockup.pb.go @@ -0,0 +1,399 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: cosmos/accounts/defaults/lockup/lockup.proto + +package types + +import ( + fmt "fmt" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" + _ "google.golang.org/protobuf/types/known/durationpb" + io "io" + math "math" + math_bits "math/bits" + time "time" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf +var _ = time.Kitchen + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// Period defines a length of time and amount of coins that will be lock. +type Period struct { + // Period duration + Length time.Duration `protobuf:"bytes,1,opt,name=length,proto3,stdduration" json:"length"` + Amount github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount"` +} + +func (m *Period) Reset() { *m = Period{} } +func (m *Period) String() string { return proto.CompactTextString(m) } +func (*Period) ProtoMessage() {} +func (*Period) Descriptor() ([]byte, []int) { + return fileDescriptor_79b466256e1a079c, []int{0} +} +func (m *Period) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Period) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Period.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Period) XXX_Merge(src proto.Message) { + xxx_messageInfo_Period.Merge(m, src) +} +func (m *Period) XXX_Size() int { + return m.Size() +} +func (m *Period) XXX_DiscardUnknown() { + xxx_messageInfo_Period.DiscardUnknown(m) +} + +var xxx_messageInfo_Period proto.InternalMessageInfo + +func (m *Period) GetLength() time.Duration { + if m != nil { + return m.Length + } + return 0 +} + +func (m *Period) GetAmount() github_com_cosmos_cosmos_sdk_types.Coins { + if m != nil { + return m.Amount + } + return nil +} + +func init() { + proto.RegisterType((*Period)(nil), "cosmos.accounts.defaults.lockup.Period") +} + +func init() { + proto.RegisterFile("cosmos/accounts/defaults/lockup/lockup.proto", fileDescriptor_79b466256e1a079c) +} + +var fileDescriptor_79b466256e1a079c = []byte{ + // 326 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x91, 0x31, 0x4e, 0xc3, 0x30, + 0x14, 0x86, 0x63, 0x90, 0x32, 0x04, 0x18, 0xa8, 0x18, 0x4a, 0x07, 0xa7, 0x62, 0xaa, 0x2a, 0x6a, + 0xab, 0x70, 0x01, 0x54, 0x10, 0xac, 0x88, 0x91, 0x05, 0x39, 0x8e, 0xeb, 0x5a, 0x4d, 0xf2, 0xaa, + 0xda, 0x41, 0xf4, 0x16, 0x8c, 0x88, 0x13, 0x20, 0xa6, 0x5e, 0x02, 0xa9, 0x63, 0x47, 0x26, 0x8a, + 0x9a, 0xa1, 0xd7, 0x40, 0xb1, 0x9d, 0x91, 0xc5, 0xef, 0x59, 0xfe, 0xbf, 0xf7, 0xbf, 0x5f, 0x8e, + 0xce, 0x39, 0xe8, 0x1c, 0x34, 0x65, 0x9c, 0x43, 0x59, 0x18, 0x4d, 0x53, 0x31, 0x66, 0x65, 0x66, + 0x34, 0xcd, 0x80, 0x4f, 0xcb, 0x99, 0x2f, 0x64, 0x36, 0x07, 0x03, 0xad, 0xd8, 0xa9, 0x49, 0xa3, + 0x26, 0x8d, 0x9a, 0x38, 0x59, 0xe7, 0x98, 0xe5, 0xaa, 0x00, 0x6a, 0x4f, 0xc7, 0x74, 0xb0, 0x77, + 0x48, 0x98, 0x16, 0xf4, 0x79, 0x98, 0x08, 0xc3, 0x86, 0x94, 0x83, 0x2a, 0xfc, 0xfb, 0x89, 0x04, + 0x09, 0xb6, 0xa5, 0x75, 0xd7, 0x50, 0x12, 0x40, 0x66, 0x82, 0xda, 0x5b, 0x52, 0x8e, 0x69, 0x5a, + 0xce, 0x99, 0x51, 0xe0, 0xa9, 0xb3, 0x2f, 0x14, 0x85, 0xf7, 0x62, 0xae, 0x20, 0x6d, 0x5d, 0x45, + 0x61, 0x26, 0x0a, 0x69, 0x26, 0x6d, 0xd4, 0x45, 0xbd, 0x83, 0x8b, 0x53, 0xe2, 0x58, 0xd2, 0xb0, + 0xe4, 0xc6, 0xb3, 0xa3, 0xa3, 0xd5, 0x4f, 0x1c, 0xbc, 0x6d, 0x62, 0xf4, 0xb1, 0x5b, 0xf6, 0xd1, + 0x83, 0xe7, 0x5a, 0x8b, 0x28, 0x64, 0x79, 0x1d, 0xa8, 0xbd, 0xd7, 0xdd, 0xb7, 0x13, 0x7c, 0xce, + 0x7a, 0x67, 0xe2, 0x77, 0x26, 0xd7, 0xa0, 0x8a, 0xd1, 0x6d, 0x3d, 0xe1, 0x73, 0x13, 0xf7, 0xa4, + 0x32, 0x93, 0x32, 0x21, 0x1c, 0x72, 0xea, 0x03, 0xba, 0x32, 0xd0, 0xe9, 0x94, 0x9a, 0xc5, 0x4c, + 0x68, 0x0b, 0xe8, 0xf7, 0xdd, 0xb2, 0x7f, 0x98, 0x09, 0xc9, 0xf8, 0xe2, 0xa9, 0x4e, 0xad, 0xbd, + 0xb5, 0x33, 0x1c, 0xdd, 0xad, 0xb6, 0x18, 0xad, 0xb7, 0x18, 0xfd, 0x6e, 0x31, 0x7a, 0xad, 0x70, + 0xb0, 0xae, 0x70, 0xf0, 0x5d, 0xe1, 0xe0, 0x71, 0xe0, 0xe6, 0xe9, 0x74, 0x4a, 0x14, 0xd0, 0x97, + 0xff, 0x7f, 0xc8, 0x9a, 0x25, 0xa1, 0x4d, 0x7b, 0xf9, 0x17, 0x00, 0x00, 0xff, 0xff, 0xfe, 0xa5, + 0x33, 0xd0, 0xd1, 0x01, 0x00, 0x00, +} + +func (m *Period) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Period) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Period) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Amount) > 0 { + for iNdEx := len(m.Amount) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Amount[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintLockup(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + n1, err1 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(m.Length, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.Length):]) + if err1 != nil { + return 0, err1 + } + i -= n1 + i = encodeVarintLockup(dAtA, i, uint64(n1)) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintLockup(dAtA []byte, offset int, v uint64) int { + offset -= sovLockup(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Period) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.Length) + n += 1 + l + sovLockup(uint64(l)) + if len(m.Amount) > 0 { + for _, e := range m.Amount { + l = e.Size() + n += 1 + l + sovLockup(uint64(l)) + } + } + return n +} + +func sovLockup(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozLockup(x uint64) (n int) { + return sovLockup(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Period) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLockup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Period: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Period: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Length", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLockup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthLockup + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthLockup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_cosmos_gogoproto_types.StdDurationUnmarshal(&m.Length, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLockup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthLockup + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthLockup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Amount = append(m.Amount, types.Coin{}) + if err := m.Amount[len(m.Amount)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipLockup(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthLockup + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipLockup(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowLockup + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowLockup + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowLockup + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthLockup + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupLockup + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthLockup + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthLockup = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowLockup = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupLockup = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/accounts/defaults/lockup/types/query.pb.go b/x/accounts/defaults/lockup/types/query.pb.go new file mode 100644 index 000000000000..ecd984b438f5 --- /dev/null +++ b/x/accounts/defaults/lockup/types/query.pb.go @@ -0,0 +1,1203 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: cosmos/accounts/defaults/lockup/query.proto + +package types + +import ( + fmt "fmt" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" + _ "google.golang.org/protobuf/types/known/timestamppb" + io "io" + math "math" + math_bits "math/bits" + time "time" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf +var _ = time.Kitchen + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// QueryLockupAccountInfoRequest get lockup account info +type QueryLockupAccountInfoRequest struct { +} + +func (m *QueryLockupAccountInfoRequest) Reset() { *m = QueryLockupAccountInfoRequest{} } +func (m *QueryLockupAccountInfoRequest) String() string { return proto.CompactTextString(m) } +func (*QueryLockupAccountInfoRequest) ProtoMessage() {} +func (*QueryLockupAccountInfoRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_f06fad50e16c8e9b, []int{0} +} +func (m *QueryLockupAccountInfoRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryLockupAccountInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryLockupAccountInfoRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryLockupAccountInfoRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryLockupAccountInfoRequest.Merge(m, src) +} +func (m *QueryLockupAccountInfoRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryLockupAccountInfoRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryLockupAccountInfoRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryLockupAccountInfoRequest proto.InternalMessageInfo + +// QueryLockupAccountInfoResponse return lockup account info +type QueryLockupAccountInfoResponse struct { + // original_locking defines the value of the account original locking coins. + OriginalLocking github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=original_locking,json=originalLocking,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"original_locking"` + // delegated_free defines the value of the account free delegated amount. + DelegatedFree github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=delegated_free,json=delegatedFree,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"delegated_free"` + // delegated_locking defines the value of the account locking delegated amount. + DelegatedLocking github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=delegated_locking,json=delegatedLocking,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"delegated_locking"` + // end_time defines the value of the account lockup start time. + StartTime *time.Time `protobuf:"bytes,4,opt,name=start_time,json=startTime,proto3,stdtime" json:"start_time,omitempty"` + // end_time defines the value of the account lockup end time. + EndTime *time.Time `protobuf:"bytes,5,opt,name=end_time,json=endTime,proto3,stdtime" json:"end_time,omitempty"` + // locked_coins defines the value of the account locking coins. + LockedCoins github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,6,rep,name=locked_coins,json=lockedCoins,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"locked_coins"` + // unlocked_coins defines the value of the account released coins from lockup. + UnlockedCoins github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,7,rep,name=unlocked_coins,json=unlockedCoins,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"unlocked_coins"` + // owner defines the value of the owner of the lockup account. + Owner string `protobuf:"bytes,8,opt,name=owner,proto3" json:"owner,omitempty"` +} + +func (m *QueryLockupAccountInfoResponse) Reset() { *m = QueryLockupAccountInfoResponse{} } +func (m *QueryLockupAccountInfoResponse) String() string { return proto.CompactTextString(m) } +func (*QueryLockupAccountInfoResponse) ProtoMessage() {} +func (*QueryLockupAccountInfoResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_f06fad50e16c8e9b, []int{1} +} +func (m *QueryLockupAccountInfoResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryLockupAccountInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryLockupAccountInfoResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryLockupAccountInfoResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryLockupAccountInfoResponse.Merge(m, src) +} +func (m *QueryLockupAccountInfoResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryLockupAccountInfoResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryLockupAccountInfoResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryLockupAccountInfoResponse proto.InternalMessageInfo + +func (m *QueryLockupAccountInfoResponse) GetOriginalLocking() github_com_cosmos_cosmos_sdk_types.Coins { + if m != nil { + return m.OriginalLocking + } + return nil +} + +func (m *QueryLockupAccountInfoResponse) GetDelegatedFree() github_com_cosmos_cosmos_sdk_types.Coins { + if m != nil { + return m.DelegatedFree + } + return nil +} + +func (m *QueryLockupAccountInfoResponse) GetDelegatedLocking() github_com_cosmos_cosmos_sdk_types.Coins { + if m != nil { + return m.DelegatedLocking + } + return nil +} + +func (m *QueryLockupAccountInfoResponse) GetStartTime() *time.Time { + if m != nil { + return m.StartTime + } + return nil +} + +func (m *QueryLockupAccountInfoResponse) GetEndTime() *time.Time { + if m != nil { + return m.EndTime + } + return nil +} + +func (m *QueryLockupAccountInfoResponse) GetLockedCoins() github_com_cosmos_cosmos_sdk_types.Coins { + if m != nil { + return m.LockedCoins + } + return nil +} + +func (m *QueryLockupAccountInfoResponse) GetUnlockedCoins() github_com_cosmos_cosmos_sdk_types.Coins { + if m != nil { + return m.UnlockedCoins + } + return nil +} + +func (m *QueryLockupAccountInfoResponse) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + +// QueryLockingPeriodsRequest is used to query the periodic lockup account locking periods. +type QueryLockingPeriodsRequest struct { +} + +func (m *QueryLockingPeriodsRequest) Reset() { *m = QueryLockingPeriodsRequest{} } +func (m *QueryLockingPeriodsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryLockingPeriodsRequest) ProtoMessage() {} +func (*QueryLockingPeriodsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_f06fad50e16c8e9b, []int{2} +} +func (m *QueryLockingPeriodsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryLockingPeriodsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryLockingPeriodsRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryLockingPeriodsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryLockingPeriodsRequest.Merge(m, src) +} +func (m *QueryLockingPeriodsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryLockingPeriodsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryLockingPeriodsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryLockingPeriodsRequest proto.InternalMessageInfo + +// QueryLockingPeriodsResponse returns the periodic lockup account locking periods. +type QueryLockingPeriodsResponse struct { + // lockup_periods defines the value of the periodic lockup account locking periods. + LockingPeriods []*Period `protobuf:"bytes,1,rep,name=locking_periods,json=lockingPeriods,proto3" json:"locking_periods,omitempty"` +} + +func (m *QueryLockingPeriodsResponse) Reset() { *m = QueryLockingPeriodsResponse{} } +func (m *QueryLockingPeriodsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryLockingPeriodsResponse) ProtoMessage() {} +func (*QueryLockingPeriodsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_f06fad50e16c8e9b, []int{3} +} +func (m *QueryLockingPeriodsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryLockingPeriodsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryLockingPeriodsResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryLockingPeriodsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryLockingPeriodsResponse.Merge(m, src) +} +func (m *QueryLockingPeriodsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryLockingPeriodsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryLockingPeriodsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryLockingPeriodsResponse proto.InternalMessageInfo + +func (m *QueryLockingPeriodsResponse) GetLockingPeriods() []*Period { + if m != nil { + return m.LockingPeriods + } + return nil +} + +func init() { + proto.RegisterType((*QueryLockupAccountInfoRequest)(nil), "cosmos.accounts.defaults.lockup.QueryLockupAccountInfoRequest") + proto.RegisterType((*QueryLockupAccountInfoResponse)(nil), "cosmos.accounts.defaults.lockup.QueryLockupAccountInfoResponse") + proto.RegisterType((*QueryLockingPeriodsRequest)(nil), "cosmos.accounts.defaults.lockup.QueryLockingPeriodsRequest") + proto.RegisterType((*QueryLockingPeriodsResponse)(nil), "cosmos.accounts.defaults.lockup.QueryLockingPeriodsResponse") +} + +func init() { + proto.RegisterFile("cosmos/accounts/defaults/lockup/query.proto", fileDescriptor_f06fad50e16c8e9b) +} + +var fileDescriptor_f06fad50e16c8e9b = []byte{ + // 507 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x94, 0xcd, 0x6e, 0xd3, 0x40, + 0x10, 0xc7, 0x63, 0xda, 0xf4, 0x63, 0x03, 0x6d, 0x89, 0x7a, 0x30, 0x01, 0xec, 0x28, 0x17, 0x22, + 0x41, 0x77, 0x69, 0x39, 0x72, 0x40, 0x04, 0x09, 0x84, 0xd4, 0x43, 0xb1, 0x38, 0x71, 0xb1, 0xfc, + 0x31, 0x31, 0xab, 0x38, 0x3b, 0xae, 0x77, 0x5d, 0xda, 0xb7, 0xe8, 0x73, 0xf0, 0x24, 0x3d, 0xf6, + 0xc8, 0x89, 0xa2, 0xe4, 0x3d, 0x10, 0xb2, 0x77, 0x37, 0xa8, 0x12, 0x55, 0x39, 0xa4, 0xa7, 0xfd, + 0x9a, 0x99, 0xdf, 0xcc, 0xfe, 0x77, 0x96, 0x3c, 0x4f, 0x50, 0x4e, 0x51, 0xb2, 0x28, 0x49, 0xb0, + 0x12, 0x4a, 0xb2, 0x14, 0xc6, 0x51, 0x95, 0x2b, 0xc9, 0x72, 0x4c, 0x26, 0x55, 0xc1, 0x8e, 0x2b, + 0x28, 0xcf, 0x68, 0x51, 0xa2, 0xc2, 0xae, 0xaf, 0x8d, 0xa9, 0x35, 0xa6, 0xd6, 0x98, 0x6a, 0xe3, + 0xde, 0x8b, 0xdb, 0xa2, 0xe9, 0x41, 0x87, 0xeb, 0x79, 0xc6, 0x3a, 0x8e, 0x24, 0xb0, 0x93, 0xfd, + 0x18, 0x54, 0xb4, 0xcf, 0x12, 0xe4, 0xc2, 0x9c, 0xef, 0x66, 0x98, 0x61, 0x33, 0x65, 0xf5, 0xcc, + 0xec, 0xfa, 0x19, 0x62, 0x96, 0x03, 0x6b, 0x56, 0x71, 0x35, 0x66, 0x8a, 0x4f, 0x41, 0xaa, 0x68, + 0x6a, 0xc2, 0x0e, 0x7c, 0xf2, 0xf4, 0x53, 0x9d, 0xf4, 0x61, 0xc3, 0x7a, 0xab, 0x53, 0xf9, 0x28, + 0xc6, 0x18, 0xc0, 0x71, 0x05, 0x52, 0x0d, 0x7e, 0xb7, 0x89, 0x77, 0x93, 0x85, 0x2c, 0x50, 0x48, + 0xe8, 0x9e, 0x90, 0x1d, 0x2c, 0x79, 0xc6, 0x45, 0x94, 0x87, 0x75, 0xce, 0x5c, 0x64, 0xae, 0xd3, + 0x5f, 0x19, 0x76, 0x0e, 0x1e, 0x51, 0x73, 0x09, 0x75, 0xd6, 0xd4, 0x64, 0x4d, 0xdf, 0x21, 0x17, + 0xa3, 0x97, 0x17, 0x3f, 0xfd, 0xd6, 0xf7, 0x2b, 0x7f, 0x98, 0x71, 0xf5, 0xb5, 0x8a, 0x69, 0x82, + 0x53, 0x66, 0x4a, 0xd4, 0xc3, 0x9e, 0x4c, 0x27, 0x4c, 0x9d, 0x15, 0x20, 0x1b, 0x07, 0x19, 0x6c, + 0x5b, 0xc8, 0xa1, 0x66, 0x74, 0x4b, 0xb2, 0x95, 0x42, 0x0e, 0x59, 0xa4, 0x20, 0x0d, 0xc7, 0x25, + 0x80, 0x7b, 0x6f, 0xf9, 0xd4, 0x07, 0x0b, 0xc4, 0xfb, 0x12, 0xa0, 0x7b, 0x4a, 0x1e, 0xfe, 0x65, + 0xda, 0x62, 0x57, 0x96, 0x8f, 0xdd, 0x59, 0x50, 0x6c, 0xb5, 0x6f, 0x08, 0x91, 0x2a, 0x2a, 0x55, + 0x58, 0x4b, 0xe8, 0xae, 0xf6, 0x9d, 0x61, 0xe7, 0xa0, 0x47, 0xb5, 0xbe, 0xd4, 0xea, 0x4b, 0x3f, + 0x5b, 0x7d, 0x47, 0xab, 0xe7, 0x57, 0xbe, 0x13, 0x6c, 0x36, 0x3e, 0xf5, 0x6e, 0xf7, 0x35, 0xd9, + 0x00, 0x91, 0x6a, 0xf7, 0xf6, 0x7f, 0xba, 0xaf, 0x83, 0x48, 0x1b, 0x67, 0x41, 0xee, 0xd7, 0xd5, + 0x42, 0x1a, 0xd6, 0x6f, 0x4e, 0xba, 0x6b, 0xcb, 0x2f, 0xb9, 0xa3, 0x01, 0xcd, 0xa2, 0xd6, 0xb6, + 0x12, 0xd7, 0x88, 0xeb, 0x77, 0xa0, 0xad, 0x45, 0x68, 0xe6, 0x2e, 0x69, 0xe3, 0x37, 0x01, 0xa5, + 0xbb, 0xd1, 0x77, 0x86, 0x9b, 0x81, 0x5e, 0x0c, 0x9e, 0x90, 0xde, 0xe2, 0xfd, 0x73, 0x91, 0x1d, + 0x41, 0xc9, 0x31, 0x95, 0xb6, 0x3d, 0x90, 0x3c, 0xfe, 0xe7, 0xa9, 0x69, 0x8d, 0x23, 0xb2, 0x6d, + 0x1e, 0x49, 0x58, 0xe8, 0x23, 0xd3, 0x19, 0xcf, 0xe8, 0x2d, 0xdf, 0x03, 0xd5, 0xa1, 0x82, 0xad, + 0xfc, 0x5a, 0xe4, 0xd1, 0x87, 0x8b, 0x99, 0xe7, 0x5c, 0xce, 0x3c, 0xe7, 0xd7, 0xcc, 0x73, 0xce, + 0xe7, 0x5e, 0xeb, 0x72, 0xee, 0xb5, 0x7e, 0xcc, 0xbd, 0xd6, 0x97, 0x3d, 0x1d, 0x51, 0xa6, 0x13, + 0xca, 0x91, 0x9d, 0xde, 0xfc, 0xaf, 0x34, 0x57, 0x10, 0xaf, 0x35, 0xa2, 0xbf, 0xfa, 0x13, 0x00, + 0x00, 0xff, 0xff, 0x8d, 0xa3, 0x8b, 0xf7, 0xd5, 0x04, 0x00, 0x00, +} + +func (m *QueryLockupAccountInfoRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryLockupAccountInfoRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryLockupAccountInfoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryLockupAccountInfoResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryLockupAccountInfoResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryLockupAccountInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0x42 + } + if len(m.UnlockedCoins) > 0 { + for iNdEx := len(m.UnlockedCoins) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.UnlockedCoins[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + } + } + if len(m.LockedCoins) > 0 { + for iNdEx := len(m.LockedCoins) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.LockedCoins[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + } + if m.EndTime != nil { + n1, err1 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(*m.EndTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(*m.EndTime):]) + if err1 != nil { + return 0, err1 + } + i -= n1 + i = encodeVarintQuery(dAtA, i, uint64(n1)) + i-- + dAtA[i] = 0x2a + } + if m.StartTime != nil { + n2, err2 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(*m.StartTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(*m.StartTime):]) + if err2 != nil { + return 0, err2 + } + i -= n2 + i = encodeVarintQuery(dAtA, i, uint64(n2)) + i-- + dAtA[i] = 0x22 + } + if len(m.DelegatedLocking) > 0 { + for iNdEx := len(m.DelegatedLocking) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.DelegatedLocking[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.DelegatedFree) > 0 { + for iNdEx := len(m.DelegatedFree) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.DelegatedFree[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.OriginalLocking) > 0 { + for iNdEx := len(m.OriginalLocking) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.OriginalLocking[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryLockingPeriodsRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryLockingPeriodsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryLockingPeriodsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryLockingPeriodsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryLockingPeriodsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryLockingPeriodsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.LockingPeriods) > 0 { + for iNdEx := len(m.LockingPeriods) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.LockingPeriods[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { + offset -= sovQuery(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *QueryLockupAccountInfoRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryLockupAccountInfoResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.OriginalLocking) > 0 { + for _, e := range m.OriginalLocking { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if len(m.DelegatedFree) > 0 { + for _, e := range m.DelegatedFree { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if len(m.DelegatedLocking) > 0 { + for _, e := range m.DelegatedLocking { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.StartTime != nil { + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(*m.StartTime) + n += 1 + l + sovQuery(uint64(l)) + } + if m.EndTime != nil { + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(*m.EndTime) + n += 1 + l + sovQuery(uint64(l)) + } + if len(m.LockedCoins) > 0 { + for _, e := range m.LockedCoins { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if len(m.UnlockedCoins) > 0 { + for _, e := range m.UnlockedCoins { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryLockingPeriodsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryLockingPeriodsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.LockingPeriods) > 0 { + for _, e := range m.LockingPeriods { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func sovQuery(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozQuery(x uint64) (n int) { + return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *QueryLockupAccountInfoRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryLockupAccountInfoRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryLockupAccountInfoRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryLockupAccountInfoResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryLockupAccountInfoResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryLockupAccountInfoResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OriginalLocking", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OriginalLocking = append(m.OriginalLocking, types.Coin{}) + if err := m.OriginalLocking[len(m.OriginalLocking)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DelegatedFree", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DelegatedFree = append(m.DelegatedFree, types.Coin{}) + if err := m.DelegatedFree[len(m.DelegatedFree)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DelegatedLocking", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DelegatedLocking = append(m.DelegatedLocking, types.Coin{}) + if err := m.DelegatedLocking[len(m.DelegatedLocking)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StartTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StartTime == nil { + m.StartTime = new(time.Time) + } + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(m.StartTime, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EndTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.EndTime == nil { + m.EndTime = new(time.Time) + } + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(m.EndTime, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LockedCoins", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.LockedCoins = append(m.LockedCoins, types.Coin{}) + if err := m.LockedCoins[len(m.LockedCoins)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UnlockedCoins", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.UnlockedCoins = append(m.UnlockedCoins, types.Coin{}) + if err := m.UnlockedCoins[len(m.UnlockedCoins)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Owner", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryLockingPeriodsRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryLockingPeriodsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryLockingPeriodsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryLockingPeriodsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryLockingPeriodsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryLockingPeriodsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LockingPeriods", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.LockingPeriods = append(m.LockingPeriods, &Period{}) + if err := m.LockingPeriods[len(m.LockingPeriods)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipQuery(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthQuery + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupQuery + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthQuery + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/accounts/defaults/lockup/types/tx.pb.go b/x/accounts/defaults/lockup/types/tx.pb.go new file mode 100644 index 000000000000..d59ce718ea31 --- /dev/null +++ b/x/accounts/defaults/lockup/types/tx.pb.go @@ -0,0 +1,2476 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: cosmos/accounts/defaults/lockup/tx.proto + +package types + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + types1 "github.com/cosmos/cosmos-sdk/codec/types" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/cosmos-sdk/types/msgservice" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" + _ "google.golang.org/protobuf/types/known/timestamppb" + io "io" + math "math" + math_bits "math/bits" + time "time" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf +var _ = time.Kitchen + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// MsgInitLockupAccount defines a message that enables creating a lockup +// account. +type MsgInitLockupAccount struct { + // owner of the vesting account + Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"` + // end of lockup + EndTime time.Time `protobuf:"bytes,2,opt,name=end_time,json=endTime,proto3,stdtime" json:"end_time"` + // start of lockup + StartTime time.Time `protobuf:"bytes,3,opt,name=start_time,json=startTime,proto3,stdtime" json:"start_time"` +} + +func (m *MsgInitLockupAccount) Reset() { *m = MsgInitLockupAccount{} } +func (m *MsgInitLockupAccount) String() string { return proto.CompactTextString(m) } +func (*MsgInitLockupAccount) ProtoMessage() {} +func (*MsgInitLockupAccount) Descriptor() ([]byte, []int) { + return fileDescriptor_e5f39108a4d67f92, []int{0} +} +func (m *MsgInitLockupAccount) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgInitLockupAccount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgInitLockupAccount.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgInitLockupAccount) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgInitLockupAccount.Merge(m, src) +} +func (m *MsgInitLockupAccount) XXX_Size() int { + return m.Size() +} +func (m *MsgInitLockupAccount) XXX_DiscardUnknown() { + xxx_messageInfo_MsgInitLockupAccount.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgInitLockupAccount proto.InternalMessageInfo + +func (m *MsgInitLockupAccount) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + +func (m *MsgInitLockupAccount) GetEndTime() time.Time { + if m != nil { + return m.EndTime + } + return time.Time{} +} + +func (m *MsgInitLockupAccount) GetStartTime() time.Time { + if m != nil { + return m.StartTime + } + return time.Time{} +} + +// MsgInitLockupAccountResponse defines the Msg/InitLockupAccount response type. +type MsgInitLockupAccountResponse struct { +} + +func (m *MsgInitLockupAccountResponse) Reset() { *m = MsgInitLockupAccountResponse{} } +func (m *MsgInitLockupAccountResponse) String() string { return proto.CompactTextString(m) } +func (*MsgInitLockupAccountResponse) ProtoMessage() {} +func (*MsgInitLockupAccountResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_e5f39108a4d67f92, []int{1} +} +func (m *MsgInitLockupAccountResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgInitLockupAccountResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgInitLockupAccountResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgInitLockupAccountResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgInitLockupAccountResponse.Merge(m, src) +} +func (m *MsgInitLockupAccountResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgInitLockupAccountResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgInitLockupAccountResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgInitLockupAccountResponse proto.InternalMessageInfo + +// MsgInitPeriodicLockingAccount defines a message that enables creating a periodic locking +// account. +type MsgInitPeriodicLockingAccount struct { + // owner of the lockup account + Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"` + // start of lockup + StartTime time.Time `protobuf:"bytes,2,opt,name=start_time,json=startTime,proto3,stdtime" json:"start_time"` + LockingPeriods []Period `protobuf:"bytes,3,rep,name=locking_periods,json=lockingPeriods,proto3" json:"locking_periods"` +} + +func (m *MsgInitPeriodicLockingAccount) Reset() { *m = MsgInitPeriodicLockingAccount{} } +func (m *MsgInitPeriodicLockingAccount) String() string { return proto.CompactTextString(m) } +func (*MsgInitPeriodicLockingAccount) ProtoMessage() {} +func (*MsgInitPeriodicLockingAccount) Descriptor() ([]byte, []int) { + return fileDescriptor_e5f39108a4d67f92, []int{2} +} +func (m *MsgInitPeriodicLockingAccount) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgInitPeriodicLockingAccount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgInitPeriodicLockingAccount.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgInitPeriodicLockingAccount) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgInitPeriodicLockingAccount.Merge(m, src) +} +func (m *MsgInitPeriodicLockingAccount) XXX_Size() int { + return m.Size() +} +func (m *MsgInitPeriodicLockingAccount) XXX_DiscardUnknown() { + xxx_messageInfo_MsgInitPeriodicLockingAccount.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgInitPeriodicLockingAccount proto.InternalMessageInfo + +func (m *MsgInitPeriodicLockingAccount) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + +func (m *MsgInitPeriodicLockingAccount) GetStartTime() time.Time { + if m != nil { + return m.StartTime + } + return time.Time{} +} + +func (m *MsgInitPeriodicLockingAccount) GetLockingPeriods() []Period { + if m != nil { + return m.LockingPeriods + } + return nil +} + +// MsgInitPeriodicLockingAccountResponse defines the Msg/InitPeriodicLockingAccount +// response type. +type MsgInitPeriodicLockingAccountResponse struct { +} + +func (m *MsgInitPeriodicLockingAccountResponse) Reset() { *m = MsgInitPeriodicLockingAccountResponse{} } +func (m *MsgInitPeriodicLockingAccountResponse) String() string { return proto.CompactTextString(m) } +func (*MsgInitPeriodicLockingAccountResponse) ProtoMessage() {} +func (*MsgInitPeriodicLockingAccountResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_e5f39108a4d67f92, []int{3} +} +func (m *MsgInitPeriodicLockingAccountResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgInitPeriodicLockingAccountResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgInitPeriodicLockingAccountResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgInitPeriodicLockingAccountResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgInitPeriodicLockingAccountResponse.Merge(m, src) +} +func (m *MsgInitPeriodicLockingAccountResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgInitPeriodicLockingAccountResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgInitPeriodicLockingAccountResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgInitPeriodicLockingAccountResponse proto.InternalMessageInfo + +// MsgDelegate defines a message that enable lockup account to execute delegate message +type MsgDelegate struct { + // sender is the owner of the lockup account + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` + Amount types.Coin `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount"` +} + +func (m *MsgDelegate) Reset() { *m = MsgDelegate{} } +func (m *MsgDelegate) String() string { return proto.CompactTextString(m) } +func (*MsgDelegate) ProtoMessage() {} +func (*MsgDelegate) Descriptor() ([]byte, []int) { + return fileDescriptor_e5f39108a4d67f92, []int{4} +} +func (m *MsgDelegate) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgDelegate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgDelegate.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgDelegate) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgDelegate.Merge(m, src) +} +func (m *MsgDelegate) XXX_Size() int { + return m.Size() +} +func (m *MsgDelegate) XXX_DiscardUnknown() { + xxx_messageInfo_MsgDelegate.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgDelegate proto.InternalMessageInfo + +// MsgUndelegate defines a message that enable lockup account to execute undelegate message +type MsgUndelegate struct { + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` + Amount types.Coin `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount"` +} + +func (m *MsgUndelegate) Reset() { *m = MsgUndelegate{} } +func (m *MsgUndelegate) String() string { return proto.CompactTextString(m) } +func (*MsgUndelegate) ProtoMessage() {} +func (*MsgUndelegate) Descriptor() ([]byte, []int) { + return fileDescriptor_e5f39108a4d67f92, []int{5} +} +func (m *MsgUndelegate) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUndelegate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUndelegate.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgUndelegate) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUndelegate.Merge(m, src) +} +func (m *MsgUndelegate) XXX_Size() int { + return m.Size() +} +func (m *MsgUndelegate) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUndelegate.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUndelegate proto.InternalMessageInfo + +// MsgSend defines a message that enable lockup account to execute send message +type MsgSend struct { + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + ToAddress string `protobuf:"bytes,2,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"` + Amount github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount"` +} + +func (m *MsgSend) Reset() { *m = MsgSend{} } +func (m *MsgSend) String() string { return proto.CompactTextString(m) } +func (*MsgSend) ProtoMessage() {} +func (*MsgSend) Descriptor() ([]byte, []int) { + return fileDescriptor_e5f39108a4d67f92, []int{6} +} +func (m *MsgSend) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgSend) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgSend.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgSend) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgSend.Merge(m, src) +} +func (m *MsgSend) XXX_Size() int { + return m.Size() +} +func (m *MsgSend) XXX_DiscardUnknown() { + xxx_messageInfo_MsgSend.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgSend proto.InternalMessageInfo + +// MsgExecuteMessagesResponse defines the response for lockup execute operations +type MsgExecuteMessagesResponse struct { + Responses []*types1.Any `protobuf:"bytes,1,rep,name=responses,proto3" json:"responses,omitempty"` +} + +func (m *MsgExecuteMessagesResponse) Reset() { *m = MsgExecuteMessagesResponse{} } +func (m *MsgExecuteMessagesResponse) String() string { return proto.CompactTextString(m) } +func (*MsgExecuteMessagesResponse) ProtoMessage() {} +func (*MsgExecuteMessagesResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_e5f39108a4d67f92, []int{7} +} +func (m *MsgExecuteMessagesResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgExecuteMessagesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgExecuteMessagesResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgExecuteMessagesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgExecuteMessagesResponse.Merge(m, src) +} +func (m *MsgExecuteMessagesResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgExecuteMessagesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgExecuteMessagesResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgExecuteMessagesResponse proto.InternalMessageInfo + +func (m *MsgExecuteMessagesResponse) GetResponses() []*types1.Any { + if m != nil { + return m.Responses + } + return nil +} + +// MsgWithdraw defines a message that the owner of the lockup can perform to withdraw unlocked token to an account of +// choice +type MsgWithdraw struct { + Withdrawer string `protobuf:"bytes,1,opt,name=withdrawer,proto3" json:"withdrawer,omitempty"` + ToAddress string `protobuf:"bytes,2,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"` + Denoms []string `protobuf:"bytes,3,rep,name=denoms,proto3" json:"denoms,omitempty"` +} + +func (m *MsgWithdraw) Reset() { *m = MsgWithdraw{} } +func (m *MsgWithdraw) String() string { return proto.CompactTextString(m) } +func (*MsgWithdraw) ProtoMessage() {} +func (*MsgWithdraw) Descriptor() ([]byte, []int) { + return fileDescriptor_e5f39108a4d67f92, []int{8} +} +func (m *MsgWithdraw) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgWithdraw) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgWithdraw.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgWithdraw) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgWithdraw.Merge(m, src) +} +func (m *MsgWithdraw) XXX_Size() int { + return m.Size() +} +func (m *MsgWithdraw) XXX_DiscardUnknown() { + xxx_messageInfo_MsgWithdraw.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgWithdraw proto.InternalMessageInfo + +// MsgWithdrawResponse defines the response for MsgWithdraw +type MsgWithdrawResponse struct { + Reciever string `protobuf:"bytes,1,opt,name=reciever,proto3" json:"reciever,omitempty"` + AmountReceived github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=amount_received,json=amountReceived,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount_received"` +} + +func (m *MsgWithdrawResponse) Reset() { *m = MsgWithdrawResponse{} } +func (m *MsgWithdrawResponse) String() string { return proto.CompactTextString(m) } +func (*MsgWithdrawResponse) ProtoMessage() {} +func (*MsgWithdrawResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_e5f39108a4d67f92, []int{9} +} +func (m *MsgWithdrawResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgWithdrawResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgWithdrawResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgWithdrawResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgWithdrawResponse.Merge(m, src) +} +func (m *MsgWithdrawResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgWithdrawResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgWithdrawResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgWithdrawResponse proto.InternalMessageInfo + +func (m *MsgWithdrawResponse) GetReciever() string { + if m != nil { + return m.Reciever + } + return "" +} + +func (m *MsgWithdrawResponse) GetAmountReceived() github_com_cosmos_cosmos_sdk_types.Coins { + if m != nil { + return m.AmountReceived + } + return nil +} + +func init() { + proto.RegisterType((*MsgInitLockupAccount)(nil), "cosmos.accounts.defaults.lockup.MsgInitLockupAccount") + proto.RegisterType((*MsgInitLockupAccountResponse)(nil), "cosmos.accounts.defaults.lockup.MsgInitLockupAccountResponse") + proto.RegisterType((*MsgInitPeriodicLockingAccount)(nil), "cosmos.accounts.defaults.lockup.MsgInitPeriodicLockingAccount") + proto.RegisterType((*MsgInitPeriodicLockingAccountResponse)(nil), "cosmos.accounts.defaults.lockup.MsgInitPeriodicLockingAccountResponse") + proto.RegisterType((*MsgDelegate)(nil), "cosmos.accounts.defaults.lockup.MsgDelegate") + proto.RegisterType((*MsgUndelegate)(nil), "cosmos.accounts.defaults.lockup.MsgUndelegate") + proto.RegisterType((*MsgSend)(nil), "cosmos.accounts.defaults.lockup.MsgSend") + proto.RegisterType((*MsgExecuteMessagesResponse)(nil), "cosmos.accounts.defaults.lockup.MsgExecuteMessagesResponse") + proto.RegisterType((*MsgWithdraw)(nil), "cosmos.accounts.defaults.lockup.MsgWithdraw") + proto.RegisterType((*MsgWithdrawResponse)(nil), "cosmos.accounts.defaults.lockup.MsgWithdrawResponse") +} + +func init() { + proto.RegisterFile("cosmos/accounts/defaults/lockup/tx.proto", fileDescriptor_e5f39108a4d67f92) +} + +var fileDescriptor_e5f39108a4d67f92 = []byte{ + // 800 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x56, 0x3d, 0x4f, 0x1b, 0x49, + 0x18, 0xf6, 0xda, 0x3a, 0x83, 0x87, 0x03, 0x8e, 0xc5, 0x3a, 0x8c, 0x75, 0xec, 0x72, 0x96, 0x10, + 0x96, 0x75, 0xde, 0x3d, 0xb8, 0x93, 0xee, 0x64, 0x5d, 0x83, 0x8f, 0x7c, 0x49, 0x71, 0x84, 0x4c, + 0x3e, 0xa4, 0xa4, 0xb0, 0xd6, 0xbb, 0xc3, 0x32, 0xc2, 0x3b, 0x63, 0xed, 0x8c, 0x0d, 0xee, 0xa2, + 0x28, 0x45, 0x44, 0x45, 0x9d, 0x8a, 0x2a, 0x8a, 0x52, 0x39, 0x12, 0x3f, 0x82, 0x12, 0x51, 0x51, + 0x85, 0xc8, 0x44, 0x32, 0x3f, 0x23, 0x9a, 0x9d, 0x59, 0x62, 0x3e, 0x02, 0x8e, 0x8b, 0x14, 0x69, + 0xbc, 0x33, 0xf3, 0x3e, 0xef, 0xfb, 0x3e, 0xcf, 0x33, 0x1f, 0x32, 0xc8, 0xda, 0x84, 0x7a, 0x84, + 0x9a, 0x96, 0x6d, 0x93, 0x06, 0x66, 0xd4, 0x74, 0xe0, 0x9a, 0xd5, 0xa8, 0x31, 0x6a, 0xd6, 0x88, + 0xbd, 0xd1, 0xa8, 0x9b, 0x6c, 0xcb, 0xa8, 0xfb, 0x84, 0x11, 0x55, 0x17, 0x48, 0x23, 0x44, 0x1a, + 0x21, 0xd2, 0x10, 0xc8, 0xf4, 0x84, 0xe5, 0x21, 0x4c, 0xcc, 0xe0, 0x57, 0xe4, 0xa4, 0x35, 0x59, + 0xbd, 0x6a, 0x51, 0x68, 0x36, 0x17, 0xaa, 0x90, 0x59, 0x0b, 0xa6, 0x4d, 0x10, 0x96, 0xf1, 0x3f, + 0x6e, 0xea, 0x2e, 0x3e, 0x12, 0x3d, 0x25, 0xd1, 0x1e, 0x75, 0xcd, 0xe6, 0x02, 0xff, 0xc8, 0xc0, + 0xb4, 0x08, 0x54, 0x82, 0x99, 0x29, 0x79, 0x8a, 0x50, 0xd2, 0x25, 0x2e, 0x11, 0xeb, 0x7c, 0x14, + 0x26, 0xb8, 0x84, 0xb8, 0x35, 0x68, 0x06, 0xb3, 0x6a, 0x63, 0xcd, 0xb4, 0x70, 0x4b, 0x86, 0xf4, + 0x8b, 0x21, 0x86, 0x3c, 0x48, 0x99, 0xe5, 0x49, 0x16, 0x99, 0xe7, 0x51, 0x90, 0x2c, 0x51, 0xf7, + 0x1e, 0x46, 0xec, 0x7e, 0xc0, 0x6e, 0x49, 0x90, 0x57, 0x0d, 0xf0, 0x13, 0xd9, 0xc4, 0xd0, 0x4f, + 0x29, 0xb3, 0x4a, 0x36, 0x51, 0x4c, 0x1d, 0xee, 0xe5, 0x93, 0x92, 0xcb, 0x92, 0xe3, 0xf8, 0x90, + 0xd2, 0x55, 0xe6, 0x23, 0xec, 0x96, 0x05, 0x4c, 0x5d, 0x06, 0xc3, 0x10, 0x3b, 0x15, 0x5e, 0x3f, + 0x15, 0x9d, 0x55, 0xb2, 0x23, 0x8b, 0x69, 0x43, 0x34, 0x37, 0xc2, 0xe6, 0xc6, 0xc3, 0xb0, 0x79, + 0x71, 0x74, 0xff, 0x83, 0x1e, 0xd9, 0x39, 0xd6, 0x95, 0xb7, 0xdd, 0x76, 0x4e, 0x29, 0x0f, 0x41, + 0xec, 0xf0, 0xa0, 0x7a, 0x17, 0x00, 0xca, 0x2c, 0x9f, 0x89, 0x3a, 0xb1, 0x6f, 0xad, 0x93, 0x08, + 0x92, 0x79, 0xb8, 0x90, 0x3d, 0xdd, 0xd5, 0x95, 0xed, 0x6e, 0x3b, 0x27, 0x77, 0x3a, 0x4f, 0x9d, + 0x0d, 0xf3, 0x2a, 0xa5, 0x19, 0x0d, 0xfc, 0x76, 0xd5, 0x7a, 0x19, 0xd2, 0x3a, 0xc1, 0x14, 0x66, + 0xde, 0x44, 0xc1, 0x8c, 0x04, 0xac, 0x40, 0x1f, 0x11, 0x07, 0xd9, 0x1c, 0x88, 0xb0, 0x3b, 0xa8, + 0x57, 0xe7, 0x55, 0x46, 0x07, 0x57, 0xa9, 0x3e, 0x03, 0xe3, 0x35, 0xc1, 0xa5, 0x52, 0x0f, 0xb8, + 0xd1, 0x54, 0x6c, 0x36, 0x96, 0x1d, 0x59, 0x9c, 0x37, 0x6e, 0x38, 0xe0, 0x86, 0xd0, 0x52, 0x4c, + 0xf0, 0xda, 0xa2, 0xee, 0x98, 0x2c, 0x25, 0x22, 0xb4, 0x60, 0x9c, 0xee, 0xea, 0x11, 0x6e, 0xe1, + 0xdc, 0x65, 0x0b, 0x05, 0xe6, 0xbc, 0x91, 0xf3, 0x60, 0xee, 0x5a, 0x9f, 0xce, 0x1c, 0xed, 0x28, + 0x60, 0xa4, 0x44, 0xdd, 0x65, 0x58, 0x83, 0xae, 0xc5, 0xa0, 0xfa, 0x27, 0x88, 0x53, 0x88, 0x9d, + 0x3e, 0x0c, 0x94, 0x38, 0xf5, 0x01, 0x98, 0x68, 0x5a, 0x35, 0xe4, 0x58, 0x8c, 0xf8, 0x15, 0x4b, + 0x40, 0x02, 0x23, 0x13, 0xc5, 0xdf, 0x0f, 0xf7, 0xf2, 0x33, 0x32, 0xf9, 0x71, 0x88, 0x39, 0x5f, + 0xe5, 0x97, 0xe6, 0x85, 0x75, 0xf5, 0x3f, 0x10, 0xb7, 0x3c, 0xce, 0x51, 0x9e, 0xb9, 0xe9, 0xd0, + 0x3e, 0x7e, 0xd7, 0x0d, 0x79, 0xd7, 0x8d, 0xff, 0x09, 0xc2, 0xbd, 0x86, 0xc9, 0x9c, 0xc2, 0xe4, + 0xab, 0x5d, 0x3d, 0xc2, 0xcd, 0x7a, 0xd1, 0x6d, 0xe7, 0x24, 0xc5, 0xcc, 0x27, 0x05, 0x8c, 0x96, + 0xa8, 0xfb, 0x08, 0x3b, 0x3f, 0xb4, 0xcc, 0x97, 0x51, 0x30, 0x54, 0xa2, 0xee, 0x2a, 0xc4, 0xce, + 0x00, 0x02, 0xff, 0x01, 0x80, 0x91, 0x0b, 0xca, 0xbe, 0x9e, 0x95, 0x60, 0x24, 0x54, 0xd2, 0xea, + 0x51, 0x12, 0xbb, 0x5e, 0xc9, 0x6d, 0xae, 0xe4, 0xdd, 0xb1, 0x9e, 0x75, 0x11, 0x5b, 0x6f, 0x54, + 0x0d, 0x9b, 0x78, 0xf2, 0x55, 0x35, 0x7b, 0xce, 0x35, 0x6b, 0xd5, 0x21, 0x0d, 0x12, 0xe8, 0xeb, + 0x6e, 0x3b, 0xf7, 0x33, 0xdf, 0x33, 0xbb, 0x55, 0xe1, 0xcf, 0x3b, 0xed, 0xc3, 0x86, 0x15, 0x90, + 0x2e, 0x51, 0xf7, 0xd6, 0x16, 0xb4, 0x1b, 0x0c, 0x96, 0x20, 0xa5, 0x96, 0x0b, 0x69, 0x78, 0xe0, + 0xd5, 0x45, 0x90, 0xf0, 0xe5, 0x98, 0xa6, 0x94, 0x80, 0x70, 0xf2, 0xd2, 0x7d, 0x5f, 0xc2, 0xad, + 0xf2, 0x17, 0x58, 0xe6, 0xbd, 0xb8, 0x24, 0x4f, 0x10, 0x5b, 0x77, 0x7c, 0x6b, 0x53, 0xfd, 0x17, + 0x80, 0x4d, 0x39, 0xee, 0xc3, 0xe0, 0x1e, 0xec, 0xe0, 0x26, 0xff, 0x0a, 0xe2, 0x0e, 0xc4, 0xc4, + 0x13, 0x8f, 0x4a, 0xa2, 0x2c, 0x67, 0x85, 0xa9, 0x5e, 0x07, 0x7a, 0x3a, 0x65, 0x8e, 0x14, 0x30, + 0xd9, 0xc3, 0xf9, 0x4c, 0xff, 0xdf, 0x60, 0xd8, 0x87, 0x36, 0x82, 0xcd, 0x3e, 0x98, 0x9f, 0x21, + 0xd5, 0x6d, 0x05, 0x8c, 0x0b, 0xcf, 0x2b, 0x3e, 0xb4, 0x21, 0x6a, 0x42, 0x27, 0x15, 0xfd, 0x5e, + 0xbb, 0x3d, 0x26, 0x3a, 0x97, 0x65, 0xe3, 0xe2, 0x9d, 0xfd, 0x8e, 0xa6, 0x1c, 0x74, 0x34, 0xe5, + 0x63, 0x47, 0x53, 0x76, 0x4e, 0xb4, 0xc8, 0xc1, 0x89, 0x16, 0x39, 0x3a, 0xd1, 0x22, 0x4f, 0xf3, + 0xa2, 0x2e, 0x75, 0x36, 0x0c, 0x44, 0xcc, 0xad, 0x6b, 0xfe, 0x7c, 0xf0, 0xa6, 0xd5, 0x78, 0xb0, + 0xe1, 0x7f, 0x7d, 0x0e, 0x00, 0x00, 0xff, 0xff, 0xc7, 0x30, 0x85, 0x02, 0xac, 0x08, 0x00, 0x00, +} + +func (this *MsgInitLockupAccount) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MsgInitLockupAccount) + if !ok { + that2, ok := that.(MsgInitLockupAccount) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Owner != that1.Owner { + return false + } + if !this.EndTime.Equal(that1.EndTime) { + return false + } + if !this.StartTime.Equal(that1.StartTime) { + return false + } + return true +} +func (m *MsgInitLockupAccount) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgInitLockupAccount) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgInitLockupAccount) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + n1, err1 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.StartTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.StartTime):]) + if err1 != nil { + return 0, err1 + } + i -= n1 + i = encodeVarintTx(dAtA, i, uint64(n1)) + i-- + dAtA[i] = 0x1a + n2, err2 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.EndTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.EndTime):]) + if err2 != nil { + return 0, err2 + } + i -= n2 + i = encodeVarintTx(dAtA, i, uint64(n2)) + i-- + dAtA[i] = 0x12 + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintTx(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgInitLockupAccountResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgInitLockupAccountResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgInitLockupAccountResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgInitPeriodicLockingAccount) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgInitPeriodicLockingAccount) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgInitPeriodicLockingAccount) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.LockingPeriods) > 0 { + for iNdEx := len(m.LockingPeriods) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.LockingPeriods[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + n3, err3 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.StartTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.StartTime):]) + if err3 != nil { + return 0, err3 + } + i -= n3 + i = encodeVarintTx(dAtA, i, uint64(n3)) + i-- + dAtA[i] = 0x12 + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintTx(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgInitPeriodicLockingAccountResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgInitPeriodicLockingAccountResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgInitPeriodicLockingAccountResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgDelegate) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgDelegate) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgDelegate) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Amount.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if len(m.ValidatorAddress) > 0 { + i -= len(m.ValidatorAddress) + copy(dAtA[i:], m.ValidatorAddress) + i = encodeVarintTx(dAtA, i, uint64(len(m.ValidatorAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUndelegate) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUndelegate) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUndelegate) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Amount.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if len(m.ValidatorAddress) > 0 { + i -= len(m.ValidatorAddress) + copy(dAtA[i:], m.ValidatorAddress) + i = encodeVarintTx(dAtA, i, uint64(len(m.ValidatorAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgSend) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgSend) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgSend) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Amount) > 0 { + for iNdEx := len(m.Amount) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Amount[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.ToAddress) > 0 { + i -= len(m.ToAddress) + copy(dAtA[i:], m.ToAddress) + i = encodeVarintTx(dAtA, i, uint64(len(m.ToAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgExecuteMessagesResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgExecuteMessagesResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgExecuteMessagesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Responses) > 0 { + for iNdEx := len(m.Responses) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Responses[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *MsgWithdraw) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgWithdraw) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgWithdraw) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Denoms) > 0 { + for iNdEx := len(m.Denoms) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Denoms[iNdEx]) + copy(dAtA[i:], m.Denoms[iNdEx]) + i = encodeVarintTx(dAtA, i, uint64(len(m.Denoms[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } + if len(m.ToAddress) > 0 { + i -= len(m.ToAddress) + copy(dAtA[i:], m.ToAddress) + i = encodeVarintTx(dAtA, i, uint64(len(m.ToAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.Withdrawer) > 0 { + i -= len(m.Withdrawer) + copy(dAtA[i:], m.Withdrawer) + i = encodeVarintTx(dAtA, i, uint64(len(m.Withdrawer))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgWithdrawResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgWithdrawResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgWithdrawResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.AmountReceived) > 0 { + for iNdEx := len(m.AmountReceived) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.AmountReceived[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.Reciever) > 0 { + i -= len(m.Reciever) + copy(dAtA[i:], m.Reciever) + i = encodeVarintTx(dAtA, i, uint64(len(m.Reciever))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintTx(dAtA []byte, offset int, v uint64) int { + offset -= sovTx(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *MsgInitLockupAccount) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.EndTime) + n += 1 + l + sovTx(uint64(l)) + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.StartTime) + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgInitLockupAccountResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgInitPeriodicLockingAccount) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.StartTime) + n += 1 + l + sovTx(uint64(l)) + if len(m.LockingPeriods) > 0 { + for _, e := range m.LockingPeriods { + l = e.Size() + n += 1 + l + sovTx(uint64(l)) + } + } + return n +} + +func (m *MsgInitPeriodicLockingAccountResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgDelegate) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.ValidatorAddress) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.Amount.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgUndelegate) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.ValidatorAddress) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.Amount.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgSend) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.ToAddress) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if len(m.Amount) > 0 { + for _, e := range m.Amount { + l = e.Size() + n += 1 + l + sovTx(uint64(l)) + } + } + return n +} + +func (m *MsgExecuteMessagesResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Responses) > 0 { + for _, e := range m.Responses { + l = e.Size() + n += 1 + l + sovTx(uint64(l)) + } + } + return n +} + +func (m *MsgWithdraw) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Withdrawer) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.ToAddress) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if len(m.Denoms) > 0 { + for _, s := range m.Denoms { + l = len(s) + n += 1 + l + sovTx(uint64(l)) + } + } + return n +} + +func (m *MsgWithdrawResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Reciever) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if len(m.AmountReceived) > 0 { + for _, e := range m.AmountReceived { + l = e.Size() + n += 1 + l + sovTx(uint64(l)) + } + } + return n +} + +func sovTx(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTx(x uint64) (n int) { + return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *MsgInitLockupAccount) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgInitLockupAccount: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgInitLockupAccount: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Owner", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EndTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.EndTime, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StartTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.StartTime, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgInitLockupAccountResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgInitLockupAccountResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgInitLockupAccountResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgInitPeriodicLockingAccount) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgInitPeriodicLockingAccount: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgInitPeriodicLockingAccount: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Owner", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StartTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.StartTime, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LockingPeriods", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.LockingPeriods = append(m.LockingPeriods, Period{}) + if err := m.LockingPeriods[len(m.LockingPeriods)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgInitPeriodicLockingAccountResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgInitPeriodicLockingAccountResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgInitPeriodicLockingAccountResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgDelegate) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgDelegate: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgDelegate: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUndelegate) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUndelegate: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUndelegate: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgSend) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgSend: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgSend: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ToAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ToAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Amount = append(m.Amount, types.Coin{}) + if err := m.Amount[len(m.Amount)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgExecuteMessagesResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgExecuteMessagesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgExecuteMessagesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Responses", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Responses = append(m.Responses, &types1.Any{}) + if err := m.Responses[len(m.Responses)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgWithdraw) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgWithdraw: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgWithdraw: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Withdrawer", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Withdrawer = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ToAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ToAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Denoms", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Denoms = append(m.Denoms, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgWithdrawResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgWithdrawResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgWithdrawResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Reciever", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Reciever = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AmountReceived", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AmountReceived = append(m.AmountReceived, types.Coin{}) + if err := m.AmountReceived[len(m.AmountReceived)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTx(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthTx + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTx + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthTx + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/accounts/defaults/lockup/validate.go b/x/accounts/defaults/lockup/validate.go new file mode 100644 index 000000000000..4d98c994168d --- /dev/null +++ b/x/accounts/defaults/lockup/validate.go @@ -0,0 +1,18 @@ +package lockup + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) + +func validateAmount(amount sdk.Coins) error { + if !amount.IsValid() { + return sdkerrors.ErrInvalidCoins.Wrap(amount.String()) + } + + if amount.IsZero() { + return sdkerrors.ErrInvalidCoins.Wrap(amount.String()) + } + + return nil +} diff --git a/x/accounts/proto/cosmos/accounts/defaults/lockup/lockup.proto b/x/accounts/proto/cosmos/accounts/defaults/lockup/lockup.proto new file mode 100644 index 000000000000..86d9efb8efae --- /dev/null +++ b/x/accounts/proto/cosmos/accounts/defaults/lockup/lockup.proto @@ -0,0 +1,22 @@ +syntax = "proto3"; +package cosmos.accounts.defaults.lockup; + +import "amino/amino.proto"; +import "cosmos/base/v1beta1/coin.proto"; +import "gogoproto/gogo.proto"; +import "google/protobuf/duration.proto"; + +option go_package = "cosmossdk.io/x/accounts/defaults/lockup/types"; + +// Period defines a length of time and amount of coins that will be lock. +message Period { + // Period duration + google.protobuf.Duration length = 1 + [(gogoproto.nullable) = false, (amino.dont_omitempty) = true, (gogoproto.stdduration) = true]; + repeated cosmos.base.v1beta1.Coin amount = 2 [ + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, + (amino.encoding) = "legacy_coins", + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; +} diff --git a/x/accounts/proto/cosmos/accounts/defaults/lockup/query.proto b/x/accounts/proto/cosmos/accounts/defaults/lockup/query.proto new file mode 100644 index 000000000000..625163a22bca --- /dev/null +++ b/x/accounts/proto/cosmos/accounts/defaults/lockup/query.proto @@ -0,0 +1,53 @@ +syntax = "proto3"; +package cosmos.accounts.defaults.lockup; + +import "cosmos/accounts/defaults/lockup/lockup.proto"; +import "cosmos/base/v1beta1/coin.proto"; +import "gogoproto/gogo.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "cosmossdk.io/x/accounts/defaults/lockup/types"; + +// QueryLockupAccountInfoRequest get lockup account info +message QueryLockupAccountInfoRequest {} + +// QueryLockupAccountInfoResponse return lockup account info +message QueryLockupAccountInfoResponse { + // original_locking defines the value of the account original locking coins. + repeated cosmos.base.v1beta1.Coin original_locking = 1 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; + + // delegated_free defines the value of the account free delegated amount. + repeated cosmos.base.v1beta1.Coin delegated_free = 2 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; + + // delegated_locking defines the value of the account locking delegated amount. + repeated cosmos.base.v1beta1.Coin delegated_locking = 3 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; + + // end_time defines the value of the account lockup start time. + google.protobuf.Timestamp start_time = 4 [(gogoproto.stdtime) = true]; + + // end_time defines the value of the account lockup end time. + google.protobuf.Timestamp end_time = 5 [(gogoproto.stdtime) = true]; + + // locked_coins defines the value of the account locking coins. + repeated cosmos.base.v1beta1.Coin locked_coins = 6 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; + + // unlocked_coins defines the value of the account released coins from lockup. + repeated cosmos.base.v1beta1.Coin unlocked_coins = 7 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; + + // owner defines the value of the owner of the lockup account. + string owner = 8; +} + +// QueryLockingPeriodsRequest is used to query the periodic lockup account locking periods. +message QueryLockingPeriodsRequest {} + +// QueryLockingPeriodsResponse returns the periodic lockup account locking periods. +message QueryLockingPeriodsResponse { + // lockup_periods defines the value of the periodic lockup account locking periods. + repeated Period locking_periods = 1; +} diff --git a/x/accounts/proto/cosmos/accounts/defaults/lockup/tx.proto b/x/accounts/proto/cosmos/accounts/defaults/lockup/tx.proto new file mode 100644 index 000000000000..3b105c3575ab --- /dev/null +++ b/x/accounts/proto/cosmos/accounts/defaults/lockup/tx.proto @@ -0,0 +1,126 @@ +syntax = "proto3"; +package cosmos.accounts.defaults.lockup; + +import "amino/amino.proto"; +import "cosmos/base/v1beta1/coin.proto"; +import "cosmos/accounts/defaults/lockup/lockup.proto"; +import "cosmos/msg/v1/msg.proto"; +import "cosmos_proto/cosmos.proto"; +import "gogoproto/gogo.proto"; +import "google/protobuf/any.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "cosmossdk.io/x/accounts/defaults/lockup/types"; + +//-------------------------------------- INIT -------------------------------------- + +// MsgInitLockupAccount defines a message that enables creating a lockup +// account. +message MsgInitLockupAccount { + option (amino.name) = "cosmos-sdk/MsgInitLockupAccount"; + + option (gogoproto.equal) = true; + + // owner of the vesting account + string owner = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + + // end of lockup + google.protobuf.Timestamp end_time = 2 + [(gogoproto.nullable) = false, (amino.dont_omitempty) = true, (gogoproto.stdtime) = true]; + // start of lockup + google.protobuf.Timestamp start_time = 3 + [(gogoproto.nullable) = false, (amino.dont_omitempty) = true, (gogoproto.stdtime) = true]; +} + +// MsgInitLockupAccountResponse defines the Msg/InitLockupAccount response type. +message MsgInitLockupAccountResponse {} + +// MsgInitPeriodicLockingAccount defines a message that enables creating a periodic locking +// account. +message MsgInitPeriodicLockingAccount { + option (amino.name) = "cosmos-sdk/MsgInitPeriodLockupAccount"; + + option (gogoproto.equal) = false; + + // owner of the lockup account + string owner = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // start of lockup + google.protobuf.Timestamp start_time = 2 + [(gogoproto.nullable) = false, (amino.dont_omitempty) = true, (gogoproto.stdtime) = true]; + repeated Period locking_periods = 3 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; +} + +// MsgInitPeriodicLockingAccountResponse defines the Msg/InitPeriodicLockingAccount +// response type. +message MsgInitPeriodicLockingAccountResponse {} + +// MsgDelegate defines a message that enable lockup account to execute delegate message +message MsgDelegate { + option (cosmos.msg.v1.signer) = "sender"; + + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // sender is the owner of the lockup account + string sender = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string validator_address = 2 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; + cosmos.base.v1beta1.Coin amount = 3 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; +} + +// MsgUndelegate defines a message that enable lockup account to execute undelegate message +message MsgUndelegate { + option (cosmos.msg.v1.signer) = "sender"; + + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + string sender = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string validator_address = 2 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; + cosmos.base.v1beta1.Coin amount = 3 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; +} + +// MsgSend defines a message that enable lockup account to execute send message +message MsgSend { + option (cosmos.msg.v1.signer) = "sender"; + + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + string sender = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string to_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + repeated cosmos.base.v1beta1.Coin amount = 3 [ + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, + (amino.encoding) = "legacy_coins", + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; +} + +// MsgExecuteMessagesResponse defines the response for lockup execute operations +message MsgExecuteMessagesResponse { + repeated google.protobuf.Any responses = 1; +} + +// MsgWithdraw defines a message that the owner of the lockup can perform to withdraw unlocked token to an account of +// choice +message MsgWithdraw { + option (cosmos.msg.v1.signer) = "withdrawer"; + + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + string withdrawer = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string to_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + repeated string denoms = 3; +} + +// MsgWithdrawResponse defines the response for MsgWithdraw +message MsgWithdrawResponse { + string reciever = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + repeated cosmos.base.v1beta1.Coin amount_received = 2 [ + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, + (amino.encoding) = "legacy_coins", + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; +} From 36981e640fbd87e4f9e8d57d4f42643abab36031 Mon Sep 17 00:00:00 2001 From: Likhita Polavarapu <78951027+likhita-809@users.noreply.github.com> Date: Thu, 14 Mar 2024 16:06:53 +0530 Subject: [PATCH 24/30] test(client/v2): Fix `TestMsg` flakiness (#19753) --- client/v2/autocli/msg_test.go | 36 ++++++++++++++++++++++++++++++++--- 1 file changed, 33 insertions(+), 3 deletions(-) diff --git a/client/v2/autocli/msg_test.go b/client/v2/autocli/msg_test.go index 5937ba24dbc7..1d7b039c504e 100644 --- a/client/v2/autocli/msg_test.go +++ b/client/v2/autocli/msg_test.go @@ -1,8 +1,12 @@ package autocli import ( + "bytes" "context" + "encoding/json" "fmt" + "os" + "path/filepath" "testing" "github.com/spf13/cobra" @@ -53,7 +57,7 @@ func TestMsg(t *testing.T) { "--output", "json", ) assert.NilError(t, err) - golden.Assert(t, out.String(), "msg-output.golden") + assertNormalizedJSONEqual(t, out.Bytes(), goldenLoad(t, "msg-output.golden")) out, err = runCmd(fixture, buildCustomModuleMsgCommand(&autocliv1.ServiceCommandDescriptor{ Service: bankv1beta1.Msg_ServiceDesc.ServiceName, @@ -74,7 +78,7 @@ func TestMsg(t *testing.T) { "--output", "json", ) assert.NilError(t, err) - golden.Assert(t, out.String(), "msg-output.golden") + assertNormalizedJSONEqual(t, out.Bytes(), goldenLoad(t, "msg-output.golden")) out, err = runCmd(fixture, buildCustomModuleMsgCommand(&autocliv1.ServiceCommandDescriptor{ Service: bankv1beta1.Msg_ServiceDesc.ServiceName, @@ -97,7 +101,33 @@ func TestMsg(t *testing.T) { "--output", "json", ) assert.NilError(t, err) - golden.Assert(t, out.String(), "msg-output.golden") + assertNormalizedJSONEqual(t, out.Bytes(), goldenLoad(t, "msg-output.golden")) +} + +func goldenLoad(t *testing.T, filename string) []byte { + t.Helper() + content, err := os.ReadFile(filepath.Join("testdata", filename)) + assert.NilError(t, err) + return content +} + +func assertNormalizedJSONEqual(t *testing.T, expected, actual []byte) { + t.Helper() + normalizedExpected, err := normalizeJSON(expected) + assert.NilError(t, err) + normalizedActual, err := normalizeJSON(actual) + assert.NilError(t, err) + assert.Equal(t, string(normalizedExpected), string(normalizedActual)) +} + +// normalizeJSON normalizes the JSON content by removing unnecessary white spaces and newlines. +func normalizeJSON(content []byte) ([]byte, error) { + var buf bytes.Buffer + err := json.Compact(&buf, content) + if err != nil { + return nil, err + } + return buf.Bytes(), nil } func TestMsgOptionsError(t *testing.T) { From c807aaede8b1cffb4ac26a8ea514ea88ee25d268 Mon Sep 17 00:00:00 2001 From: Matt Kocubinski Date: Thu, 14 Mar 2024 09:19:15 -0500 Subject: [PATCH 25/30] refactor!: mv AddressCodecs aliases from runtime -> core (#19747) Co-authored-by: Marko --- CHANGELOG.md | 1 + baseapp/utils_test.go | 5 ++--- client/v2/autocli/flag/builder.go | 6 ++---- core/address/codec.go | 8 ++++++++ crypto/armor_test.go | 6 +++--- crypto/keys/multisig/multisig_test.go | 6 +++--- runtime/module.go | 18 +++++------------- simapp/app_test.go | 9 ++++----- simapp/simd/cmd/root_di.go | 5 ++--- simapp/simd/cmd/testnet.go | 6 +++--- testutil/network/network.go | 8 ++++---- x/auth/tx/config/depinject.go | 2 +- x/genutil/client/cli/collect.go | 4 ++-- x/genutil/collect.go | 6 +++--- x/staking/depinject.go | 6 +++--- 15 files changed, 46 insertions(+), 50 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 32447138ffd1..38c0cb0611d4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -150,6 +150,7 @@ Every module contains its own CHANGELOG.md. Please refer to the module you are i * (types) [#19627](https://github.com/cosmos/cosmos-sdk/pull/19627) and [#19735](https://github.com/cosmos/cosmos-sdk/pull/19735) All genesis interfaces now don't take `codec.JsonCodec`. * Every module has the codec already, passing it created an unneeded dependency. * Additionally, to reflect this change, the module manager does not take a codec either. +* (runtime) [#19747](https://github.com/cosmos/cosmos-sdk/pull/19747) `runtime.ValidatorAddressCodec` and `runtime.ConsensusAddressCodec` have been moved to `core`. ### Client Breaking Changes diff --git a/baseapp/utils_test.go b/baseapp/utils_test.go index acf9d84b1047..8369a42975c7 100644 --- a/baseapp/utils_test.go +++ b/baseapp/utils_test.go @@ -33,7 +33,6 @@ import ( "github.com/cosmos/cosmos-sdk/client" addresscodec "github.com/cosmos/cosmos-sdk/codec/address" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" - "github.com/cosmos/cosmos-sdk/runtime" "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" @@ -47,8 +46,8 @@ func makeMinimalConfig() depinject.Config { var ( mempoolOpt = baseapp.SetMempool(mempool.NewSenderNonceMempool()) addressCodec = func() address.Codec { return addresscodec.NewBech32Codec("cosmos") } - validatorAddressCodec = func() runtime.ValidatorAddressCodec { return addresscodec.NewBech32Codec("cosmosvaloper") } - consensusAddressCodec = func() runtime.ConsensusAddressCodec { return addresscodec.NewBech32Codec("cosmosvalcons") } + validatorAddressCodec = func() address.ValidatorAddressCodec { return addresscodec.NewBech32Codec("cosmosvaloper") } + consensusAddressCodec = func() address.ConsensusAddressCodec { return addresscodec.NewBech32Codec("cosmosvalcons") } ) return depinject.Configs( diff --git a/client/v2/autocli/flag/builder.go b/client/v2/autocli/flag/builder.go index 2fe5eb72424f..a48978b3b7dd 100644 --- a/client/v2/autocli/flag/builder.go +++ b/client/v2/autocli/flag/builder.go @@ -20,8 +20,6 @@ import ( "cosmossdk.io/client/v2/internal/flags" "cosmossdk.io/client/v2/internal/util" "cosmossdk.io/core/address" - - "github.com/cosmos/cosmos-sdk/runtime" ) const ( @@ -55,8 +53,8 @@ type Builder struct { // Address Codecs are the address codecs to use for client/v2. AddressCodec address.Codec - ValidatorAddressCodec runtime.ValidatorAddressCodec - ConsensusAddressCodec runtime.ConsensusAddressCodec + ValidatorAddressCodec address.ValidatorAddressCodec + ConsensusAddressCodec address.ConsensusAddressCodec } func (b *Builder) init() { diff --git a/core/address/codec.go b/core/address/codec.go index 5f20690cbcc7..c1b62f596bee 100644 --- a/core/address/codec.go +++ b/core/address/codec.go @@ -7,3 +7,11 @@ type Codec interface { // BytesToString encodes bytes to text BytesToString(bz []byte) (string, error) } + +type ( + // ValidatorAddressCodec is an alias for address.Codec for validator addresses. + ValidatorAddressCodec Codec + + // ConsensusAddressCodec is an alias for address.Codec for validator consensus addresses. + ConsensusAddressCodec Codec +) diff --git a/crypto/armor_test.go b/crypto/armor_test.go index f774165ae4d8..45c16bfcc5e1 100644 --- a/crypto/armor_test.go +++ b/crypto/armor_test.go @@ -25,7 +25,7 @@ import ( "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/cosmos/cosmos-sdk/crypto/xsalsa20symmetric" - "github.com/cosmos/cosmos-sdk/runtime" + _ "github.com/cosmos/cosmos-sdk/runtime" "github.com/cosmos/cosmos-sdk/testutil/configurator" "github.com/cosmos/cosmos-sdk/types" ) @@ -84,8 +84,8 @@ func TestArmorUnarmorPubKey(t *testing.T) { configurator.NewAppConfig(), depinject.Supply(log.NewNopLogger(), func() address.Codec { return addresscodec.NewBech32Codec("cosmos") }, - func() runtime.ValidatorAddressCodec { return addresscodec.NewBech32Codec("cosmosvaloper") }, - func() runtime.ConsensusAddressCodec { return addresscodec.NewBech32Codec("cosmosvalcons") }, + func() address.ValidatorAddressCodec { return addresscodec.NewBech32Codec("cosmosvaloper") }, + func() address.ConsensusAddressCodec { return addresscodec.NewBech32Codec("cosmosvalcons") }, ), ), &cdc) require.NoError(t, err) diff --git a/crypto/keys/multisig/multisig_test.go b/crypto/keys/multisig/multisig_test.go index e85a83b350ba..e8e75a61ab02 100644 --- a/crypto/keys/multisig/multisig_test.go +++ b/crypto/keys/multisig/multisig_test.go @@ -20,7 +20,7 @@ import ( "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/cosmos/cosmos-sdk/crypto/types/multisig" - "github.com/cosmos/cosmos-sdk/runtime" + _ "github.com/cosmos/cosmos-sdk/runtime" "github.com/cosmos/cosmos-sdk/testutil/configurator" "github.com/cosmos/cosmos-sdk/types/tx/signing" ) @@ -363,8 +363,8 @@ func TestDisplay(t *testing.T) { configurator.NewAppConfig(), depinject.Supply(log.NewNopLogger(), func() address.Codec { return addresscodec.NewBech32Codec("cosmos") }, - func() runtime.ValidatorAddressCodec { return addresscodec.NewBech32Codec("cosmosvaloper") }, - func() runtime.ConsensusAddressCodec { return addresscodec.NewBech32Codec("cosmosvalcons") }, + func() address.ValidatorAddressCodec { return addresscodec.NewBech32Codec("cosmosvaloper") }, + func() address.ConsensusAddressCodec { return addresscodec.NewBech32Codec("cosmosvalcons") }, ), ), &cdc) require.NoError(err) diff --git a/runtime/module.go b/runtime/module.go index 2c0dd6e58671..41b6b55318d0 100644 --- a/runtime/module.go +++ b/runtime/module.go @@ -142,7 +142,7 @@ func SetupAppBuilder(inputs AppInputs) { app.ModuleManager.RegisterLegacyAminoCodec(inputs.LegacyAmino) } -func ProvideInterfaceRegistry(addressCodec address.Codec, validatorAddressCodec ValidatorAddressCodec, customGetSigners []signing.CustomGetSigner) (codectypes.InterfaceRegistry, error) { +func ProvideInterfaceRegistry(addressCodec address.Codec, validatorAddressCodec address.ValidatorAddressCodec, customGetSigners []signing.CustomGetSigner) (codectypes.InterfaceRegistry, error) { signingOptions := signing.Options{ AddressCodec: addressCodec, ValidatorAddressCodec: validatorAddressCodec, @@ -245,28 +245,20 @@ func ProvideAppVersionModifier(app *AppBuilder) baseapp.AppVersionModifier { return app.app } -type ( - // ValidatorAddressCodec is an alias for address.Codec for validator addresses. - ValidatorAddressCodec address.Codec - - // ConsensusAddressCodec is an alias for address.Codec for validator consensus addresses. - ConsensusAddressCodec address.Codec -) - type AddressCodecInputs struct { depinject.In AuthConfig *authmodulev1.Module `optional:"true"` StakingConfig *stakingmodulev1.Module `optional:"true"` - AddressCodecFactory func() address.Codec `optional:"true"` - ValidatorAddressCodecFactory func() ValidatorAddressCodec `optional:"true"` - ConsensusAddressCodecFactory func() ConsensusAddressCodec `optional:"true"` + AddressCodecFactory func() address.Codec `optional:"true"` + ValidatorAddressCodecFactory func() address.ValidatorAddressCodec `optional:"true"` + ConsensusAddressCodecFactory func() address.ConsensusAddressCodec `optional:"true"` } // ProvideAddressCodec provides an address.Codec to the container for any // modules that want to do address string <> bytes conversion. -func ProvideAddressCodec(in AddressCodecInputs) (address.Codec, ValidatorAddressCodec, ConsensusAddressCodec) { +func ProvideAddressCodec(in AddressCodecInputs) (address.Codec, address.ValidatorAddressCodec, address.ConsensusAddressCodec) { if in.AddressCodecFactory != nil && in.ValidatorAddressCodecFactory != nil && in.ConsensusAddressCodecFactory != nil { return in.AddressCodecFactory(), in.ValidatorAddressCodecFactory(), in.ConsensusAddressCodecFactory() } diff --git a/simapp/app_test.go b/simapp/app_test.go index 406017291cd3..b378c2c5e48e 100644 --- a/simapp/app_test.go +++ b/simapp/app_test.go @@ -34,7 +34,6 @@ import ( "cosmossdk.io/x/upgrade" "github.com/cosmos/cosmos-sdk/baseapp" - "github.com/cosmos/cosmos-sdk/runtime" "github.com/cosmos/cosmos-sdk/testutil/mock" "github.com/cosmos/cosmos-sdk/testutil/network" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" @@ -313,8 +312,8 @@ func (c customAddressCodec) BytesToString(bz []byte) (string, error) { func TestAddressCodecFactory(t *testing.T) { var addrCodec address.Codec - var valAddressCodec runtime.ValidatorAddressCodec - var consAddressCodec runtime.ConsensusAddressCodec + var valAddressCodec address.ValidatorAddressCodec + var consAddressCodec address.ConsensusAddressCodec err := depinject.Inject( depinject.Configs( @@ -340,8 +339,8 @@ func TestAddressCodecFactory(t *testing.T) { depinject.Supply( log.NewNopLogger(), func() address.Codec { return customAddressCodec{} }, - func() runtime.ValidatorAddressCodec { return customAddressCodec{} }, - func() runtime.ConsensusAddressCodec { return customAddressCodec{} }, + func() address.ValidatorAddressCodec { return customAddressCodec{} }, + func() address.ConsensusAddressCodec { return customAddressCodec{} }, ), ), &addrCodec, &valAddressCodec, &consAddressCodec) diff --git a/simapp/simd/cmd/root_di.go b/simapp/simd/cmd/root_di.go index 796a4ce85ff2..8f5a535a62cf 100644 --- a/simapp/simd/cmd/root_di.go +++ b/simapp/simd/cmd/root_di.go @@ -24,7 +24,6 @@ import ( "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/crypto/keyring" - "github.com/cosmos/cosmos-sdk/runtime" "github.com/cosmos/cosmos-sdk/server" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" "github.com/cosmos/cosmos-sdk/types/module" @@ -103,8 +102,8 @@ func ProvideClientContext( txConfigOpts tx.ConfigOptions, legacyAmino *codec.LegacyAmino, addressCodec address.Codec, - validatorAddressCodec runtime.ValidatorAddressCodec, - consensusAddressCodec runtime.ConsensusAddressCodec, + validatorAddressCodec address.ValidatorAddressCodec, + consensusAddressCodec address.ConsensusAddressCodec, authConfig *authv1.Module, stakingConfig *stakingv1.Module, ) client.Context { diff --git a/simapp/simd/cmd/testnet.go b/simapp/simd/cmd/testnet.go index b0c95a43a7e5..f481372f1eb3 100644 --- a/simapp/simd/cmd/testnet.go +++ b/simapp/simd/cmd/testnet.go @@ -13,6 +13,7 @@ import ( "github.com/spf13/cobra" "github.com/spf13/pflag" + "cosmossdk.io/core/address" "cosmossdk.io/math" "cosmossdk.io/math/unsafe" "cosmossdk.io/simapp" @@ -26,7 +27,6 @@ import ( "github.com/cosmos/cosmos-sdk/crypto/hd" "github.com/cosmos/cosmos-sdk/crypto/keyring" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" - "github.com/cosmos/cosmos-sdk/runtime" "github.com/cosmos/cosmos-sdk/server" srvconfig "github.com/cosmos/cosmos-sdk/server/config" "github.com/cosmos/cosmos-sdk/testutil" @@ -209,7 +209,7 @@ func initTestnetFiles( nodeConfig *cmtconfig.Config, mm *module.Manager, genBalIterator banktypes.GenesisBalancesIterator, - valAddrCodec runtime.ValidatorAddressCodec, + valAddrCodec address.ValidatorAddressCodec, args initArgs, ) error { if args.chainID == "" { @@ -417,7 +417,7 @@ func initGenFiles( func collectGenFiles( clientCtx client.Context, nodeConfig *cmtconfig.Config, chainID string, nodeIDs []string, valPubKeys []cryptotypes.PubKey, numValidators int, - outputDir, nodeDirPrefix, nodeDaemonHome string, genBalIterator banktypes.GenesisBalancesIterator, valAddrCodec runtime.ValidatorAddressCodec, + outputDir, nodeDirPrefix, nodeDaemonHome string, genBalIterator banktypes.GenesisBalancesIterator, valAddrCodec address.ValidatorAddressCodec, ) error { var appState json.RawMessage genTime := cmttime.Now() diff --git a/testutil/network/network.go b/testutil/network/network.go index eed00af89868..8dca40ae5473 100644 --- a/testutil/network/network.go +++ b/testutil/network/network.go @@ -129,8 +129,8 @@ type Config struct { // Address codecs AddressCodec address.Codec // address codec - ValidatorAddressCodec runtime.ValidatorAddressCodec // validator address codec - ConsensusAddressCodec runtime.ConsensusAddressCodec // consensus address codec + ValidatorAddressCodec address.ValidatorAddressCodec // validator address codec + ConsensusAddressCodec address.ConsensusAddressCodec // consensus address codec } // DefaultConfig returns a sane default configuration suitable for nearly all @@ -185,8 +185,8 @@ func DefaultConfigWithAppConfig(appConfig depinject.Config) (Config, error) { cdc codec.Codec interfaceRegistry codectypes.InterfaceRegistry addressCodec address.Codec - validatorAddressCodec runtime.ValidatorAddressCodec - consensusAddressCodec runtime.ConsensusAddressCodec + validatorAddressCodec address.ValidatorAddressCodec + consensusAddressCodec address.ConsensusAddressCodec ) if err := depinject.Inject( diff --git a/x/auth/tx/config/depinject.go b/x/auth/tx/config/depinject.go index 8b553520e929..47009c706e1e 100644 --- a/x/auth/tx/config/depinject.go +++ b/x/auth/tx/config/depinject.go @@ -42,7 +42,7 @@ type ModuleInputs struct { Config *txconfigv1.Config AddressCodec address.Codec - ValidatorAddressCodec runtime.ValidatorAddressCodec + ValidatorAddressCodec address.ValidatorAddressCodec Codec codec.Codec ProtoFileResolver txsigning.ProtoFileResolver // BankKeeper is the expected bank keeper to be passed to AnteHandlers diff --git a/x/genutil/client/cli/collect.go b/x/genutil/client/cli/collect.go index f164c1ccd922..7a029f10b2e2 100644 --- a/x/genutil/client/cli/collect.go +++ b/x/genutil/client/cli/collect.go @@ -6,10 +6,10 @@ import ( "github.com/spf13/cobra" + "cosmossdk.io/core/address" "cosmossdk.io/errors" "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/runtime" "github.com/cosmos/cosmos-sdk/server" "github.com/cosmos/cosmos-sdk/x/genutil" "github.com/cosmos/cosmos-sdk/x/genutil/types" @@ -18,7 +18,7 @@ import ( const flagGenTxDir = "gentx-dir" // CollectGenTxsCmd - return the cobra command to collect genesis transactions -func CollectGenTxsCmd(genBalIterator types.GenesisBalancesIterator, validator types.MessageValidator, valAddrCodec runtime.ValidatorAddressCodec) *cobra.Command { +func CollectGenTxsCmd(genBalIterator types.GenesisBalancesIterator, validator types.MessageValidator, valAddrCodec address.ValidatorAddressCodec) *cobra.Command { cmd := &cobra.Command{ Use: "collect-gentxs", Short: "Collect genesis txs and output a genesis.json file", diff --git a/x/genutil/collect.go b/x/genutil/collect.go index efc82d2e2d76..f57c0202d19f 100644 --- a/x/genutil/collect.go +++ b/x/genutil/collect.go @@ -12,12 +12,12 @@ import ( cfg "github.com/cometbft/cometbft/config" + "cosmossdk.io/core/address" bankexported "cosmossdk.io/x/bank/exported" stakingtypes "cosmossdk.io/x/staking/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" - sdkruntime "github.com/cosmos/cosmos-sdk/runtime" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/genutil/types" ) @@ -25,7 +25,7 @@ import ( // GenAppStateFromConfig gets the genesis app state from the config func GenAppStateFromConfig(cdc codec.JSONCodec, txEncodingConfig client.TxEncodingConfig, config *cfg.Config, initCfg types.InitConfig, genesis *types.AppGenesis, genBalIterator types.GenesisBalancesIterator, - validator types.MessageValidator, valAddrCodec sdkruntime.ValidatorAddressCodec, + validator types.MessageValidator, valAddrCodec address.ValidatorAddressCodec, ) (appState json.RawMessage, err error) { // process genesis transactions, else create default genesis.json appGenTxs, persistentPeers, err := CollectTxs( @@ -68,7 +68,7 @@ func GenAppStateFromConfig(cdc codec.JSONCodec, txEncodingConfig client.TxEncodi // the list of appGenTxs, and persistent peers required to generate genesis.json. func CollectTxs(cdc codec.JSONCodec, txJSONDecoder sdk.TxDecoder, moniker, genTxsDir string, genesis *types.AppGenesis, genBalIterator types.GenesisBalancesIterator, - validator types.MessageValidator, valAddrCodec sdkruntime.ValidatorAddressCodec, + validator types.MessageValidator, valAddrCodec address.ValidatorAddressCodec, ) (appGenTxs []sdk.Tx, persistentPeers string, err error) { // prepare a map of all balances in genesis state to then validate // against the validators addresses diff --git a/x/staking/depinject.go b/x/staking/depinject.go index 93a4567e9ee3..1eaf44baa87e 100644 --- a/x/staking/depinject.go +++ b/x/staking/depinject.go @@ -7,6 +7,7 @@ import ( "golang.org/x/exp/maps" modulev1 "cosmossdk.io/api/cosmos/staking/module/v1" + "cosmossdk.io/core/address" "cosmossdk.io/core/appmodule" "cosmossdk.io/depinject" "cosmossdk.io/depinject/appconfig" @@ -16,7 +17,6 @@ import ( "cosmossdk.io/x/staking/types" "github.com/cosmos/cosmos-sdk/codec" - "github.com/cosmos/cosmos-sdk/runtime" "github.com/cosmos/cosmos-sdk/types/module" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" ) @@ -38,8 +38,8 @@ type ModuleInputs struct { depinject.In Config *modulev1.Module - ValidatorAddressCodec runtime.ValidatorAddressCodec - ConsensusAddressCodec runtime.ConsensusAddressCodec + ValidatorAddressCodec address.ValidatorAddressCodec + ConsensusAddressCodec address.ConsensusAddressCodec AccountKeeper types.AccountKeeper BankKeeper types.BankKeeper Cdc codec.Codec From 1b545a571f379a472a7d53d768cd856b82b2ee9b Mon Sep 17 00:00:00 2001 From: Cosmos SDK <113218068+github-prbot@users.noreply.github.com> Date: Thu, 14 Mar 2024 15:27:11 +0100 Subject: [PATCH 26/30] chore: fix spelling errors (#19756) Co-authored-by: github-merge-queue <118344674+github-merge-queue@users.noreply.github.com> Co-authored-by: Julien Robert --- .../accounts/defaults/lockup/tx.pulsar.go | 58 +++++------ x/accounts/defaults/lockup/lockup.go | 2 +- x/accounts/defaults/lockup/types/tx.pb.go | 96 +++++++++---------- .../cosmos/accounts/defaults/lockup/tx.proto | 2 +- 4 files changed, 79 insertions(+), 79 deletions(-) diff --git a/api/cosmos/accounts/defaults/lockup/tx.pulsar.go b/api/cosmos/accounts/defaults/lockup/tx.pulsar.go index 816b0b7ace7f..082db8883c5a 100644 --- a/api/cosmos/accounts/defaults/lockup/tx.pulsar.go +++ b/api/cosmos/accounts/defaults/lockup/tx.pulsar.go @@ -4849,14 +4849,14 @@ func (x *_MsgWithdrawResponse_2_list) IsValid() bool { var ( md_MsgWithdrawResponse protoreflect.MessageDescriptor - fd_MsgWithdrawResponse_reciever protoreflect.FieldDescriptor + fd_MsgWithdrawResponse_receiver protoreflect.FieldDescriptor fd_MsgWithdrawResponse_amount_received protoreflect.FieldDescriptor ) func init() { file_cosmos_accounts_defaults_lockup_tx_proto_init() md_MsgWithdrawResponse = File_cosmos_accounts_defaults_lockup_tx_proto.Messages().ByName("MsgWithdrawResponse") - fd_MsgWithdrawResponse_reciever = md_MsgWithdrawResponse.Fields().ByName("reciever") + fd_MsgWithdrawResponse_receiver = md_MsgWithdrawResponse.Fields().ByName("receiver") fd_MsgWithdrawResponse_amount_received = md_MsgWithdrawResponse.Fields().ByName("amount_received") } @@ -4925,9 +4925,9 @@ func (x *fastReflection_MsgWithdrawResponse) Interface() protoreflect.ProtoMessa // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_MsgWithdrawResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Reciever != "" { - value := protoreflect.ValueOfString(x.Reciever) - if !f(fd_MsgWithdrawResponse_reciever, value) { + if x.Receiver != "" { + value := protoreflect.ValueOfString(x.Receiver) + if !f(fd_MsgWithdrawResponse_receiver, value) { return } } @@ -4952,8 +4952,8 @@ func (x *fastReflection_MsgWithdrawResponse) Range(f func(protoreflect.FieldDesc // a repeated field is populated if it is non-empty. func (x *fastReflection_MsgWithdrawResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "cosmos.accounts.defaults.lockup.MsgWithdrawResponse.reciever": - return x.Reciever != "" + case "cosmos.accounts.defaults.lockup.MsgWithdrawResponse.receiver": + return x.Receiver != "" case "cosmos.accounts.defaults.lockup.MsgWithdrawResponse.amount_received": return len(x.AmountReceived) != 0 default: @@ -4972,8 +4972,8 @@ func (x *fastReflection_MsgWithdrawResponse) Has(fd protoreflect.FieldDescriptor // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgWithdrawResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "cosmos.accounts.defaults.lockup.MsgWithdrawResponse.reciever": - x.Reciever = "" + case "cosmos.accounts.defaults.lockup.MsgWithdrawResponse.receiver": + x.Receiver = "" case "cosmos.accounts.defaults.lockup.MsgWithdrawResponse.amount_received": x.AmountReceived = nil default: @@ -4992,8 +4992,8 @@ func (x *fastReflection_MsgWithdrawResponse) Clear(fd protoreflect.FieldDescript // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_MsgWithdrawResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "cosmos.accounts.defaults.lockup.MsgWithdrawResponse.reciever": - value := x.Reciever + case "cosmos.accounts.defaults.lockup.MsgWithdrawResponse.receiver": + value := x.Receiver return protoreflect.ValueOfString(value) case "cosmos.accounts.defaults.lockup.MsgWithdrawResponse.amount_received": if len(x.AmountReceived) == 0 { @@ -5021,8 +5021,8 @@ func (x *fastReflection_MsgWithdrawResponse) Get(descriptor protoreflect.FieldDe // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgWithdrawResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "cosmos.accounts.defaults.lockup.MsgWithdrawResponse.reciever": - x.Reciever = value.Interface().(string) + case "cosmos.accounts.defaults.lockup.MsgWithdrawResponse.receiver": + x.Receiver = value.Interface().(string) case "cosmos.accounts.defaults.lockup.MsgWithdrawResponse.amount_received": lv := value.List() clv := lv.(*_MsgWithdrawResponse_2_list) @@ -5053,8 +5053,8 @@ func (x *fastReflection_MsgWithdrawResponse) Mutable(fd protoreflect.FieldDescri } value := &_MsgWithdrawResponse_2_list{list: &x.AmountReceived} return protoreflect.ValueOfList(value) - case "cosmos.accounts.defaults.lockup.MsgWithdrawResponse.reciever": - panic(fmt.Errorf("field reciever of message cosmos.accounts.defaults.lockup.MsgWithdrawResponse is not mutable")) + case "cosmos.accounts.defaults.lockup.MsgWithdrawResponse.receiver": + panic(fmt.Errorf("field receiver of message cosmos.accounts.defaults.lockup.MsgWithdrawResponse is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.MsgWithdrawResponse")) @@ -5068,7 +5068,7 @@ func (x *fastReflection_MsgWithdrawResponse) Mutable(fd protoreflect.FieldDescri // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_MsgWithdrawResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "cosmos.accounts.defaults.lockup.MsgWithdrawResponse.reciever": + case "cosmos.accounts.defaults.lockup.MsgWithdrawResponse.receiver": return protoreflect.ValueOfString("") case "cosmos.accounts.defaults.lockup.MsgWithdrawResponse.amount_received": list := []*v1beta1.Coin{} @@ -5142,7 +5142,7 @@ func (x *fastReflection_MsgWithdrawResponse) ProtoMethods() *protoiface.Methods var n int var l int _ = l - l = len(x.Reciever) + l = len(x.Receiver) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } @@ -5197,10 +5197,10 @@ func (x *fastReflection_MsgWithdrawResponse) ProtoMethods() *protoiface.Methods dAtA[i] = 0x12 } } - if len(x.Reciever) > 0 { - i -= len(x.Reciever) - copy(dAtA[i:], x.Reciever) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Reciever))) + if len(x.Receiver) > 0 { + i -= len(x.Receiver) + copy(dAtA[i:], x.Receiver) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Receiver))) i-- dAtA[i] = 0xa } @@ -5255,7 +5255,7 @@ func (x *fastReflection_MsgWithdrawResponse) ProtoMethods() *protoiface.Methods switch fieldNum { case 1: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Reciever", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Receiver", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -5283,7 +5283,7 @@ func (x *fastReflection_MsgWithdrawResponse) ProtoMethods() *protoiface.Methods if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.Reciever = string(dAtA[iNdEx:postIndex]) + x.Receiver = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { @@ -5785,7 +5785,7 @@ type MsgWithdrawResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Reciever string `protobuf:"bytes,1,opt,name=reciever,proto3" json:"reciever,omitempty"` + Receiver string `protobuf:"bytes,1,opt,name=receiver,proto3" json:"receiver,omitempty"` AmountReceived []*v1beta1.Coin `protobuf:"bytes,2,rep,name=amount_received,json=amountReceived,proto3" json:"amount_received,omitempty"` } @@ -5809,9 +5809,9 @@ func (*MsgWithdrawResponse) Descriptor() ([]byte, []int) { return file_cosmos_accounts_defaults_lockup_tx_proto_rawDescGZIP(), []int{9} } -func (x *MsgWithdrawResponse) GetReciever() string { +func (x *MsgWithdrawResponse) GetReceiver() string { if x != nil { - return x.Reciever + return x.Receiver } return "" } @@ -5947,10 +5947,10 @@ var file_cosmos_accounts_defaults_lockup_tx_proto_rawDesc = []byte{ 0x06, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x73, 0x3a, 0x17, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x0a, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x65, 0x72, 0x22, 0xd8, 0x01, 0x0a, 0x13, 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x08, 0x72, 0x65, 0x63, 0x69, - 0x65, 0x76, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x08, 0x72, 0x65, 0x63, 0x65, + 0x69, 0x76, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, - 0x72, 0x69, 0x6e, 0x67, 0x52, 0x08, 0x72, 0x65, 0x63, 0x69, 0x65, 0x76, 0x65, 0x72, 0x12, 0x8a, + 0x72, 0x69, 0x6e, 0x67, 0x52, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x12, 0x8a, 0x01, 0x0a, 0x0f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, diff --git a/x/accounts/defaults/lockup/lockup.go b/x/accounts/defaults/lockup/lockup.go index 04b2ba28b792..d24f3ff46d80 100644 --- a/x/accounts/defaults/lockup/lockup.go +++ b/x/accounts/defaults/lockup/lockup.go @@ -311,7 +311,7 @@ func (bva *BaseLockup) WithdrawUnlockedCoins( } return &lockuptypes.MsgWithdrawResponse{ - Reciever: msg.ToAddress, + Receiver: msg.ToAddress, AmountReceived: amount, }, nil } diff --git a/x/accounts/defaults/lockup/types/tx.pb.go b/x/accounts/defaults/lockup/types/tx.pb.go index d59ce718ea31..6d394bd0631c 100644 --- a/x/accounts/defaults/lockup/types/tx.pb.go +++ b/x/accounts/defaults/lockup/types/tx.pb.go @@ -446,7 +446,7 @@ var xxx_messageInfo_MsgWithdraw proto.InternalMessageInfo // MsgWithdrawResponse defines the response for MsgWithdraw type MsgWithdrawResponse struct { - Reciever string `protobuf:"bytes,1,opt,name=reciever,proto3" json:"reciever,omitempty"` + Receiver string `protobuf:"bytes,1,opt,name=receiver,proto3" json:"receiver,omitempty"` AmountReceived github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=amount_received,json=amountReceived,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount_received"` } @@ -483,9 +483,9 @@ func (m *MsgWithdrawResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgWithdrawResponse proto.InternalMessageInfo -func (m *MsgWithdrawResponse) GetReciever() string { +func (m *MsgWithdrawResponse) GetReceiver() string { if m != nil { - return m.Reciever + return m.Receiver } return "" } @@ -515,57 +515,57 @@ func init() { } var fileDescriptor_e5f39108a4d67f92 = []byte{ - // 800 bytes of a gzipped FileDescriptorProto + // 797 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x56, 0x3d, 0x4f, 0x1b, 0x49, 0x18, 0xf6, 0xda, 0x3a, 0x83, 0x87, 0x03, 0x8e, 0xc5, 0x3a, 0x8c, 0x75, 0xec, 0x72, 0x96, 0x10, 0x96, 0x75, 0xde, 0x3d, 0xb8, 0x93, 0xee, 0x64, 0x5d, 0x83, 0x8f, 0x7c, 0x49, 0x71, 0x84, 0x4c, - 0x3e, 0xa4, 0xa4, 0xb0, 0xd6, 0xbb, 0xc3, 0x32, 0xc2, 0x3b, 0x63, 0xed, 0x8c, 0x0d, 0xee, 0xa2, + 0x3e, 0xa4, 0xa4, 0xb0, 0xd6, 0xbb, 0xc3, 0xb0, 0xc2, 0x3b, 0x63, 0xed, 0x8c, 0x0d, 0xee, 0xa2, 0x28, 0x45, 0x44, 0x45, 0x9d, 0x8a, 0x2a, 0x8a, 0x52, 0x39, 0x12, 0x3f, 0x82, 0x12, 0x51, 0x51, 0x85, 0xc8, 0x44, 0x32, 0x3f, 0x23, 0x9a, 0x9d, 0x59, 0x62, 0x3e, 0x02, 0x8e, 0x8b, 0x14, 0x69, 0xbc, 0x33, 0xf3, 0x3e, 0xef, 0xfb, 0x3e, 0xcf, 0x33, 0x1f, 0x32, 0xc8, 0xda, 0x84, 0x7a, 0x84, 0x9a, 0x96, 0x6d, 0x93, 0x06, 0x66, 0xd4, 0x74, 0xe0, 0x9a, 0xd5, 0xa8, 0x31, 0x6a, 0xd6, 0x88, 0xbd, 0xd1, 0xa8, 0x9b, 0x6c, 0xcb, 0xa8, 0xfb, 0x84, 0x11, 0x55, 0x17, 0x48, 0x23, 0x44, 0x1a, - 0x21, 0xd2, 0x10, 0xc8, 0xf4, 0x84, 0xe5, 0x21, 0x4c, 0xcc, 0xe0, 0x57, 0xe4, 0xa4, 0x35, 0x59, - 0xbd, 0x6a, 0x51, 0x68, 0x36, 0x17, 0xaa, 0x90, 0x59, 0x0b, 0xa6, 0x4d, 0x10, 0x96, 0xf1, 0x3f, - 0x6e, 0xea, 0x2e, 0x3e, 0x12, 0x3d, 0x25, 0xd1, 0x1e, 0x75, 0xcd, 0xe6, 0x02, 0xff, 0xc8, 0xc0, - 0xb4, 0x08, 0x54, 0x82, 0x99, 0x29, 0x79, 0x8a, 0x50, 0xd2, 0x25, 0x2e, 0x11, 0xeb, 0x7c, 0x14, - 0x26, 0xb8, 0x84, 0xb8, 0x35, 0x68, 0x06, 0xb3, 0x6a, 0x63, 0xcd, 0xb4, 0x70, 0x4b, 0x86, 0xf4, - 0x8b, 0x21, 0x86, 0x3c, 0x48, 0x99, 0xe5, 0x49, 0x16, 0x99, 0xe7, 0x51, 0x90, 0x2c, 0x51, 0xf7, - 0x1e, 0x46, 0xec, 0x7e, 0xc0, 0x6e, 0x49, 0x90, 0x57, 0x0d, 0xf0, 0x13, 0xd9, 0xc4, 0xd0, 0x4f, - 0x29, 0xb3, 0x4a, 0x36, 0x51, 0x4c, 0x1d, 0xee, 0xe5, 0x93, 0x92, 0xcb, 0x92, 0xe3, 0xf8, 0x90, - 0xd2, 0x55, 0xe6, 0x23, 0xec, 0x96, 0x05, 0x4c, 0x5d, 0x06, 0xc3, 0x10, 0x3b, 0x15, 0x5e, 0x3f, - 0x15, 0x9d, 0x55, 0xb2, 0x23, 0x8b, 0x69, 0x43, 0x34, 0x37, 0xc2, 0xe6, 0xc6, 0xc3, 0xb0, 0x79, - 0x71, 0x74, 0xff, 0x83, 0x1e, 0xd9, 0x39, 0xd6, 0x95, 0xb7, 0xdd, 0x76, 0x4e, 0x29, 0x0f, 0x41, - 0xec, 0xf0, 0xa0, 0x7a, 0x17, 0x00, 0xca, 0x2c, 0x9f, 0x89, 0x3a, 0xb1, 0x6f, 0xad, 0x93, 0x08, - 0x92, 0x79, 0xb8, 0x90, 0x3d, 0xdd, 0xd5, 0x95, 0xed, 0x6e, 0x3b, 0x27, 0x77, 0x3a, 0x4f, 0x9d, - 0x0d, 0xf3, 0x2a, 0xa5, 0x19, 0x0d, 0xfc, 0x76, 0xd5, 0x7a, 0x19, 0xd2, 0x3a, 0xc1, 0x14, 0x66, - 0xde, 0x44, 0xc1, 0x8c, 0x04, 0xac, 0x40, 0x1f, 0x11, 0x07, 0xd9, 0x1c, 0x88, 0xb0, 0x3b, 0xa8, + 0x21, 0xd2, 0x10, 0xc8, 0xf4, 0x84, 0xe5, 0xb9, 0x98, 0x98, 0xc1, 0xaf, 0xc8, 0x49, 0x6b, 0xb2, + 0x7a, 0xd5, 0xa2, 0xd0, 0x6c, 0x2e, 0x54, 0x21, 0xb3, 0x16, 0x4c, 0x9b, 0xb8, 0x58, 0xc6, 0xff, + 0xb8, 0xa9, 0xbb, 0xf8, 0x48, 0xf4, 0x94, 0x44, 0x7b, 0x14, 0x99, 0xcd, 0x05, 0xfe, 0x91, 0x81, + 0x69, 0x11, 0xa8, 0x04, 0x33, 0x53, 0xf2, 0x14, 0xa1, 0x24, 0x22, 0x88, 0x88, 0x75, 0x3e, 0x0a, + 0x13, 0x10, 0x21, 0xa8, 0x06, 0xcd, 0x60, 0x56, 0x6d, 0xac, 0x99, 0x16, 0x6e, 0xc9, 0x90, 0x7e, + 0x31, 0xc4, 0x5c, 0x0f, 0x52, 0x66, 0x79, 0x92, 0x45, 0xe6, 0x79, 0x14, 0x24, 0x4b, 0x14, 0xdd, + 0xc3, 0x2e, 0xbb, 0x1f, 0xb0, 0x5b, 0x12, 0xe4, 0x55, 0x03, 0xfc, 0x44, 0x36, 0x31, 0xf4, 0x53, + 0xca, 0xac, 0x92, 0x4d, 0x14, 0x53, 0x87, 0x7b, 0xf9, 0xa4, 0xe4, 0xb2, 0xe4, 0x38, 0x3e, 0xa4, + 0x74, 0x95, 0xf9, 0x2e, 0x46, 0x65, 0x01, 0x53, 0x97, 0xc1, 0x30, 0xc4, 0x4e, 0x85, 0xd7, 0x4f, + 0x45, 0x67, 0x95, 0xec, 0xc8, 0x62, 0xda, 0x10, 0xcd, 0x8d, 0xb0, 0xb9, 0xf1, 0x30, 0x6c, 0x5e, + 0x1c, 0xdd, 0xff, 0xa0, 0x47, 0x76, 0x8e, 0x75, 0xe5, 0x6d, 0xb7, 0x9d, 0x53, 0xca, 0x43, 0x10, + 0x3b, 0x3c, 0xa8, 0xde, 0x05, 0x80, 0x32, 0xcb, 0x67, 0xa2, 0x4e, 0xec, 0x5b, 0xeb, 0x24, 0x82, + 0x64, 0x1e, 0x2e, 0x64, 0x4f, 0x77, 0x75, 0x65, 0xbb, 0xdb, 0xce, 0xc9, 0x9d, 0xce, 0x53, 0x67, + 0xc3, 0xbc, 0x4a, 0x69, 0x46, 0x03, 0xbf, 0x5d, 0xb5, 0x5e, 0x86, 0xb4, 0x4e, 0x30, 0x85, 0x99, + 0x37, 0x51, 0x30, 0x23, 0x01, 0x2b, 0xd0, 0x77, 0x89, 0xe3, 0xda, 0x1c, 0xe8, 0x62, 0x34, 0xa8, 0x57, 0xe7, 0x55, 0x46, 0x07, 0x57, 0xa9, 0x3e, 0x03, 0xe3, 0x35, 0xc1, 0xa5, 0x52, 0x0f, 0xb8, 0xd1, 0x54, 0x6c, 0x36, 0x96, 0x1d, 0x59, 0x9c, 0x37, 0x6e, 0x38, 0xe0, 0x86, 0xd0, 0x52, 0x4c, 0xf0, 0xda, 0xa2, 0xee, 0x98, 0x2c, 0x25, 0x22, 0xb4, 0x60, 0x9c, 0xee, 0xea, 0x11, 0x6e, 0xe1, 0xdc, 0x65, 0x0b, 0x05, 0xe6, 0xbc, 0x91, 0xf3, 0x60, 0xee, 0x5a, 0x9f, 0xce, 0x1c, 0xed, 0x28, - 0x60, 0xa4, 0x44, 0xdd, 0x65, 0x58, 0x83, 0xae, 0xc5, 0xa0, 0xfa, 0x27, 0x88, 0x53, 0x88, 0x9d, - 0x3e, 0x0c, 0x94, 0x38, 0xf5, 0x01, 0x98, 0x68, 0x5a, 0x35, 0xe4, 0x58, 0x8c, 0xf8, 0x15, 0x4b, - 0x40, 0x02, 0x23, 0x13, 0xc5, 0xdf, 0x0f, 0xf7, 0xf2, 0x33, 0x32, 0xf9, 0x71, 0x88, 0x39, 0x5f, - 0xe5, 0x97, 0xe6, 0x85, 0x75, 0xf5, 0x3f, 0x10, 0xb7, 0x3c, 0xce, 0x51, 0x9e, 0xb9, 0xe9, 0xd0, - 0x3e, 0x7e, 0xd7, 0x0d, 0x79, 0xd7, 0x8d, 0xff, 0x09, 0xc2, 0xbd, 0x86, 0xc9, 0x9c, 0xc2, 0xe4, + 0x60, 0xa4, 0x44, 0xd1, 0x32, 0xac, 0x41, 0x64, 0x31, 0xa8, 0xfe, 0x09, 0xe2, 0x14, 0x62, 0xa7, + 0x0f, 0x03, 0x25, 0x4e, 0x7d, 0x00, 0x26, 0x9a, 0x56, 0xcd, 0x75, 0x2c, 0x46, 0xfc, 0x8a, 0x25, + 0x20, 0x81, 0x91, 0x89, 0xe2, 0xef, 0x87, 0x7b, 0xf9, 0x19, 0x99, 0xfc, 0x38, 0xc4, 0x9c, 0xaf, + 0xf2, 0x4b, 0xf3, 0xc2, 0xba, 0xfa, 0x1f, 0x88, 0x5b, 0x1e, 0xe7, 0x28, 0xcf, 0xdc, 0x74, 0x68, + 0x1f, 0xbf, 0xeb, 0x86, 0xbc, 0xeb, 0xc6, 0xff, 0xc4, 0xc5, 0xbd, 0x86, 0xc9, 0x9c, 0xc2, 0xe4, 0xab, 0x5d, 0x3d, 0xc2, 0xcd, 0x7a, 0xd1, 0x6d, 0xe7, 0x24, 0xc5, 0xcc, 0x27, 0x05, 0x8c, 0x96, - 0xa8, 0xfb, 0x08, 0x3b, 0x3f, 0xb4, 0xcc, 0x97, 0x51, 0x30, 0x54, 0xa2, 0xee, 0x2a, 0xc4, 0xce, - 0x00, 0x02, 0xff, 0x01, 0x80, 0x91, 0x0b, 0xca, 0xbe, 0x9e, 0x95, 0x60, 0x24, 0x54, 0xd2, 0xea, - 0x51, 0x12, 0xbb, 0x5e, 0xc9, 0x6d, 0xae, 0xe4, 0xdd, 0xb1, 0x9e, 0x75, 0x11, 0x5b, 0x6f, 0x54, - 0x0d, 0x9b, 0x78, 0xf2, 0x55, 0x35, 0x7b, 0xce, 0x35, 0x6b, 0xd5, 0x21, 0x0d, 0x12, 0xe8, 0xeb, - 0x6e, 0x3b, 0xf7, 0x33, 0xdf, 0x33, 0xbb, 0x55, 0xe1, 0xcf, 0x3b, 0xed, 0xc3, 0x86, 0x15, 0x90, - 0x2e, 0x51, 0xf7, 0xd6, 0x16, 0xb4, 0x1b, 0x0c, 0x96, 0x20, 0xa5, 0x96, 0x0b, 0x69, 0x78, 0xe0, - 0xd5, 0x45, 0x90, 0xf0, 0xe5, 0x98, 0xa6, 0x94, 0x80, 0x70, 0xf2, 0xd2, 0x7d, 0x5f, 0xc2, 0xad, - 0xf2, 0x17, 0x58, 0xe6, 0xbd, 0xb8, 0x24, 0x4f, 0x10, 0x5b, 0x77, 0x7c, 0x6b, 0x53, 0xfd, 0x17, - 0x80, 0x4d, 0x39, 0xee, 0xc3, 0xe0, 0x1e, 0xec, 0xe0, 0x26, 0xff, 0x0a, 0xe2, 0x0e, 0xc4, 0xc4, - 0x13, 0x8f, 0x4a, 0xa2, 0x2c, 0x67, 0x85, 0xa9, 0x5e, 0x07, 0x7a, 0x3a, 0x65, 0x8e, 0x14, 0x30, - 0xd9, 0xc3, 0xf9, 0x4c, 0xff, 0xdf, 0x60, 0xd8, 0x87, 0x36, 0x82, 0xcd, 0x3e, 0x98, 0x9f, 0x21, - 0xd5, 0x6d, 0x05, 0x8c, 0x0b, 0xcf, 0x2b, 0x3e, 0xb4, 0x21, 0x6a, 0x42, 0x27, 0x15, 0xfd, 0x5e, - 0xbb, 0x3d, 0x26, 0x3a, 0x97, 0x65, 0xe3, 0xe2, 0x9d, 0xfd, 0x8e, 0xa6, 0x1c, 0x74, 0x34, 0xe5, - 0x63, 0x47, 0x53, 0x76, 0x4e, 0xb4, 0xc8, 0xc1, 0x89, 0x16, 0x39, 0x3a, 0xd1, 0x22, 0x4f, 0xf3, - 0xa2, 0x2e, 0x75, 0x36, 0x0c, 0x44, 0xcc, 0xad, 0x6b, 0xfe, 0x7c, 0xf0, 0xa6, 0xd5, 0x78, 0xb0, - 0xe1, 0x7f, 0x7d, 0x0e, 0x00, 0x00, 0xff, 0xff, 0xc7, 0x30, 0x85, 0x02, 0xac, 0x08, 0x00, 0x00, + 0x28, 0x7a, 0x84, 0x9d, 0x1f, 0x5a, 0xe6, 0xcb, 0x28, 0x18, 0x2a, 0x51, 0xb4, 0x0a, 0xb1, 0x33, + 0x80, 0xc0, 0x7f, 0x00, 0x60, 0xe4, 0x82, 0xb2, 0xaf, 0x67, 0x25, 0x18, 0x09, 0x95, 0xb4, 0x7a, + 0x94, 0xc4, 0xae, 0x57, 0x72, 0x9b, 0x2b, 0x79, 0x77, 0xac, 0x67, 0x91, 0xcb, 0xd6, 0x1b, 0x55, + 0xc3, 0x26, 0x9e, 0x7c, 0x55, 0xcd, 0x9e, 0x73, 0xcd, 0x5a, 0x75, 0x48, 0x83, 0x04, 0xfa, 0xba, + 0xdb, 0xce, 0xfd, 0xcc, 0xf7, 0xcc, 0x6e, 0x55, 0xf8, 0xf3, 0x4e, 0xfb, 0xb0, 0x61, 0x05, 0xa4, + 0x4b, 0x14, 0xdd, 0xda, 0x82, 0x76, 0x83, 0xc1, 0x12, 0xa4, 0xd4, 0x42, 0x90, 0x86, 0x07, 0x5e, + 0x5d, 0x04, 0x09, 0x5f, 0x8e, 0x69, 0x4a, 0x09, 0x08, 0x27, 0x2f, 0xdd, 0xf7, 0x25, 0xdc, 0x2a, + 0x7f, 0x81, 0x65, 0xde, 0x8b, 0x4b, 0xf2, 0xc4, 0x65, 0xeb, 0x8e, 0x6f, 0x6d, 0xaa, 0xff, 0x02, + 0xb0, 0x29, 0xc7, 0x7d, 0x18, 0xdc, 0x83, 0x1d, 0xdc, 0xe4, 0x5f, 0x41, 0xdc, 0x81, 0x98, 0x78, + 0xe2, 0x51, 0x49, 0x94, 0xe5, 0xac, 0x30, 0xd5, 0xeb, 0x40, 0x4f, 0xa7, 0xcc, 0x91, 0x02, 0x26, + 0x7b, 0x38, 0x9f, 0xe9, 0xff, 0x1b, 0x0c, 0xfb, 0xd0, 0x86, 0x6e, 0xb3, 0x0f, 0xe6, 0x67, 0x48, + 0x75, 0x5b, 0x01, 0xe3, 0xc2, 0xf3, 0x8a, 0x5c, 0x73, 0x52, 0xd1, 0xef, 0xb5, 0xdb, 0x63, 0xa2, + 0x73, 0x59, 0x36, 0x2e, 0xde, 0xd9, 0xef, 0x68, 0xca, 0x41, 0x47, 0x53, 0x3e, 0x76, 0x34, 0x65, + 0xe7, 0x44, 0x8b, 0x1c, 0x9c, 0x68, 0x91, 0xa3, 0x13, 0x2d, 0xf2, 0x34, 0x2f, 0xea, 0x52, 0x67, + 0xc3, 0x70, 0x89, 0xb9, 0x75, 0xcd, 0x9f, 0x0f, 0xde, 0xb4, 0x1a, 0x0f, 0x36, 0xfc, 0xaf, 0xcf, + 0x01, 0x00, 0x00, 0xff, 0xff, 0xf7, 0xd7, 0x1d, 0x22, 0xac, 0x08, 0x00, 0x00, } func (this *MsgInitLockupAccount) Equal(that interface{}) bool { @@ -1004,10 +1004,10 @@ func (m *MsgWithdrawResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0x12 } } - if len(m.Reciever) > 0 { - i -= len(m.Reciever) - copy(dAtA[i:], m.Reciever) - i = encodeVarintTx(dAtA, i, uint64(len(m.Reciever))) + if len(m.Receiver) > 0 { + i -= len(m.Receiver) + copy(dAtA[i:], m.Receiver) + i = encodeVarintTx(dAtA, i, uint64(len(m.Receiver))) i-- dAtA[i] = 0xa } @@ -1186,7 +1186,7 @@ func (m *MsgWithdrawResponse) Size() (n int) { } var l int _ = l - l = len(m.Reciever) + l = len(m.Receiver) if l > 0 { n += 1 + l + sovTx(uint64(l)) } @@ -2305,7 +2305,7 @@ func (m *MsgWithdrawResponse) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Reciever", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Receiver", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2333,7 +2333,7 @@ func (m *MsgWithdrawResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Reciever = string(dAtA[iNdEx:postIndex]) + m.Receiver = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { diff --git a/x/accounts/proto/cosmos/accounts/defaults/lockup/tx.proto b/x/accounts/proto/cosmos/accounts/defaults/lockup/tx.proto index 3b105c3575ab..a0a6e1a07aea 100644 --- a/x/accounts/proto/cosmos/accounts/defaults/lockup/tx.proto +++ b/x/accounts/proto/cosmos/accounts/defaults/lockup/tx.proto @@ -116,7 +116,7 @@ message MsgWithdraw { // MsgWithdrawResponse defines the response for MsgWithdraw message MsgWithdrawResponse { - string reciever = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string receiver = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; repeated cosmos.base.v1beta1.Coin amount_received = 2 [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true, From d54335e1f98b224815f07b3aa8ae1e0e7ee3456d Mon Sep 17 00:00:00 2001 From: Matt Kocubinski Date: Thu, 14 Mar 2024 12:53:31 -0500 Subject: [PATCH 27/30] refactor: rename core.registry.LegacyRegistry -> core.registry.InterfaceRegistrar (#19758) --- CHANGELOG.md | 4 ++-- UPGRADING.md | 4 ++-- codec/types/interface_registry.go | 2 +- core/appmodule/v2/module.go | 2 +- core/registry/legacy.go | 2 +- testutil/mock/types_mock_appmodule.go | 4 ++-- testutil/mock/types_module_module.go | 6 +++--- types/module/core_module.go | 4 ++-- types/module/module.go | 4 ++-- types/msgservice/msg_service.go | 6 +++--- x/accounts/module.go | 4 ++-- x/auth/module.go | 4 ++-- x/auth/types/codec.go | 12 ++++++------ x/auth/vesting/module.go | 4 ++-- x/auth/vesting/types/codec.go | 12 ++++++------ x/authz/codec.go | 8 ++++---- x/authz/module/module.go | 4 ++-- x/bank/module.go | 4 ++-- x/bank/types/codec.go | 6 +++--- x/circuit/module.go | 4 ++-- x/circuit/types/codec.go | 6 +++--- x/consensus/module.go | 4 ++-- x/consensus/types/codec.go | 6 +++--- x/counter/module.go | 4 ++-- x/counter/types/codec.go | 6 +++--- x/crisis/module.go | 4 ++-- x/crisis/types/codec.go | 6 +++--- x/distribution/module.go | 4 ++-- x/distribution/types/codec.go | 6 +++--- x/evidence/module.go | 4 ++-- x/evidence/types/codec.go | 8 ++++---- x/feegrant/codec.go | 8 ++++---- x/feegrant/module/module.go | 4 ++-- x/genutil/module.go | 2 +- x/gov/module.go | 6 +++--- x/gov/types/v1/codec.go | 6 +++--- x/gov/types/v1beta1/codec.go | 8 ++++---- x/group/codec.go | 8 ++++---- x/group/module/module.go | 4 ++-- x/mint/module.go | 4 ++-- x/mint/types/codec.go | 6 +++--- x/nft/codec.go | 6 +++--- x/nft/module/module.go | 4 ++-- x/params/module.go | 4 ++-- x/params/types/proposal/codec.go | 4 ++-- x/protocolpool/module.go | 4 ++-- x/protocolpool/types/codec.go | 6 +++--- x/slashing/module.go | 4 ++-- x/slashing/types/codec.go | 6 +++--- x/staking/module.go | 4 ++-- x/staking/types/codec.go | 6 +++--- x/upgrade/module.go | 4 ++-- x/upgrade/types/codec.go | 6 +++--- 53 files changed, 136 insertions(+), 136 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 38c0cb0611d4..dc5cd5d519e3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -144,9 +144,9 @@ Every module contains its own CHANGELOG.md. Please refer to the module you are i * (types) [#18607](https://github.com/cosmos/cosmos-sdk/pull/18607) Removed address verifier from global config, moved verifier function to bech32 codec. * (server) [#18909](https://github.com/cosmos/cosmos-sdk/pull/18909) Remove configuration endpoint on grpc reflection endpoint in favour of auth module bech32prefix endpoint already exposed. * (crypto) [#19541](https://github.com/cosmos/cosmos-sdk/pull/19541) The deprecated `FromTmProtoPublicKey`, `ToTmProtoPublicKey`, `FromTmPubKeyInterface` and `ToTmPubKeyInterface` functions have been removed. Use their replacements (`Cmt` instead of `Tm`) instead. -* (types) [#19652](https://github.com/cosmos/cosmos-sdk/pull/19652) +* (types) [#19652](https://github.com/cosmos/cosmos-sdk/pull/19652) and [#19758](https://github.com/cosmos/cosmos-sdk/pull/19758) * Moved`types/module.HasRegisterInterfaces` to `cosmossdk.io/core`. - * Moved `RegisterInterfaces` and `RegisterImplementations` from `InterfaceRegistry` to `cosmossdk.io/core/registry.LegacyRegistry` interface. + * Moved `RegisterInterfaces` and `RegisterImplementations` from `InterfaceRegistry` to `cosmossdk.io/core/registry.InterfaceRegistrar` interface. * (types) [#19627](https://github.com/cosmos/cosmos-sdk/pull/19627) and [#19735](https://github.com/cosmos/cosmos-sdk/pull/19735) All genesis interfaces now don't take `codec.JsonCodec`. * Every module has the codec already, passing it created an unneeded dependency. * Additionally, to reflect this change, the module manager does not take a codec either. diff --git a/UPGRADING.md b/UPGRADING.md index 3a21dee49158..cdc28d55457f 100644 --- a/UPGRADING.md +++ b/UPGRADING.md @@ -166,11 +166,11 @@ If your module requires a message server or query server, it should be passed in +govKeeper := govkeeper.NewKeeper(appCodec, runtime.NewEnvironment(runtime.NewKVStoreService(keys[govtypes.StoreKey]), logger, runtime.EnvWithRouterService(app.GRPCQueryRouter(), app.MsgServiceRouter())), app.AuthKeeper, app.BankKeeper, app.StakingKeeper, app.PoolKeeper, govConfig, authtypes.NewModuleAddress(govtypes.ModuleName).String()) ``` -The signature of the extension interface `HasRegisterInterfaces` has been changed to accept a `cosmossdk.io/core/registry.LegacyRegistry` instead of a `codec.InterfaceRegistry`. `HasRegisterInterfaces` is now a part of `cosmossdk.io/core/appmodule`. Modules should update their `HasRegisterInterfaces` implementation to accept a `cosmossdk.io/core/registry.LegacyRegistry` interface. +The signature of the extension interface `HasRegisterInterfaces` has been changed to accept a `cosmossdk.io/core/registry.InterfaceRegistrar` instead of a `codec.InterfaceRegistry`. `HasRegisterInterfaces` is now a part of `cosmossdk.io/core/appmodule`. Modules should update their `HasRegisterInterfaces` implementation to accept a `cosmossdk.io/core/registry.InterfaceRegistrar` interface. ```diff -func (AppModule) RegisterInterfaces(registry codectypes.InterfaceRegistry) { -+func (AppModule) RegisterInterfaces(registry registry.LegacyRegistry) { ++func (AppModule) RegisterInterfaces(registry registry.InterfaceRegistrar) { ``` ##### Dependency Injection diff --git a/codec/types/interface_registry.go b/codec/types/interface_registry.go index cbeb1913ace0..b621d7a19856 100644 --- a/codec/types/interface_registry.go +++ b/codec/types/interface_registry.go @@ -35,7 +35,7 @@ type AnyUnpacker interface { type InterfaceRegistry interface { AnyUnpacker jsonpb.AnyResolver - registry.LegacyRegistry + registry.InterfaceRegistrar // ListAllInterfaces list the type URLs of all registered interfaces. ListAllInterfaces() []string diff --git a/core/appmodule/v2/module.go b/core/appmodule/v2/module.go index 2fe0cc99f07b..47d581257753 100644 --- a/core/appmodule/v2/module.go +++ b/core/appmodule/v2/module.go @@ -102,5 +102,5 @@ type ValidatorUpdate struct { // HasRegisterInterfaces is the interface for modules to register their msg types. type HasRegisterInterfaces interface { - RegisterInterfaces(registry.LegacyRegistry) + RegisterInterfaces(registry.InterfaceRegistrar) } diff --git a/core/registry/legacy.go b/core/registry/legacy.go index 0f921132c1c1..eeb85afdecb4 100644 --- a/core/registry/legacy.go +++ b/core/registry/legacy.go @@ -4,7 +4,7 @@ import ( "google.golang.org/protobuf/runtime/protoiface" ) -type LegacyRegistry interface { +type InterfaceRegistrar interface { // RegisterInterface associates protoName as the public name for the // interface passed in as iface. This is to be used primarily to create // a public facing registry of interface implementations for clients. diff --git a/testutil/mock/types_mock_appmodule.go b/testutil/mock/types_mock_appmodule.go index 0d668299abfa..dacba1facdb1 100644 --- a/testutil/mock/types_mock_appmodule.go +++ b/testutil/mock/types_mock_appmodule.go @@ -150,7 +150,7 @@ func (mr *MockAppModuleWithAllExtensionsMockRecorder) Name() *gomock.Call { } // RegisterInterfaces mocks base method. -func (m *MockAppModuleWithAllExtensions) RegisterInterfaces(arg0 registry.LegacyRegistry) { +func (m *MockAppModuleWithAllExtensions) RegisterInterfaces(arg0 registry.InterfaceRegistrar) { m.ctrl.T.Helper() m.ctrl.Call(m, "RegisterInterfaces", arg0) } @@ -334,7 +334,7 @@ func (mr *MockAppModuleWithAllExtensionsABCIMockRecorder) Name() *gomock.Call { } // RegisterInterfaces mocks base method. -func (m *MockAppModuleWithAllExtensionsABCI) RegisterInterfaces(arg0 registry.LegacyRegistry) { +func (m *MockAppModuleWithAllExtensionsABCI) RegisterInterfaces(arg0 registry.InterfaceRegistrar) { m.ctrl.T.Helper() m.ctrl.Call(m, "RegisterInterfaces", arg0) } diff --git a/testutil/mock/types_module_module.go b/testutil/mock/types_module_module.go index 01a7e3219496..2fe80207569f 100644 --- a/testutil/mock/types_module_module.go +++ b/testutil/mock/types_module_module.go @@ -68,7 +68,7 @@ func (mr *MockAppModuleBasicMockRecorder) RegisterGRPCGatewayRoutes(arg0, arg1 i } // RegisterInterfaces mocks base method. -func (m *MockAppModuleBasic) RegisterInterfaces(arg0 registry.LegacyRegistry) { +func (m *MockAppModuleBasic) RegisterInterfaces(arg0 registry.InterfaceRegistrar) { m.ctrl.T.Helper() m.ctrl.Call(m, "RegisterInterfaces", arg0) } @@ -153,7 +153,7 @@ func (mr *MockAppModuleMockRecorder) Name() *gomock.Call { } // RegisterInterfaces mocks base method. -func (m *MockAppModule) RegisterInterfaces(arg0 registry.LegacyRegistry) { +func (m *MockAppModule) RegisterInterfaces(arg0 registry.InterfaceRegistrar) { m.ctrl.T.Helper() m.ctrl.Call(m, "RegisterInterfaces", arg0) } @@ -578,7 +578,7 @@ func (mr *MockHasABCIEndBlockMockRecorder) Name() *gomock.Call { } // RegisterInterfaces mocks base method. -func (m *MockHasABCIEndBlock) RegisterInterfaces(arg0 registry.LegacyRegistry) { +func (m *MockHasABCIEndBlock) RegisterInterfaces(arg0 registry.InterfaceRegistrar) { m.ctrl.T.Helper() m.ctrl.Call(m, "RegisterInterfaces", arg0) } diff --git a/types/module/core_module.go b/types/module/core_module.go index 398800f0fcb0..26acf836bd68 100644 --- a/types/module/core_module.go +++ b/types/module/core_module.go @@ -189,9 +189,9 @@ func (c coreAppModuleAdaptor) RegisterGRPCGatewayRoutes(ctx client.Context, mux } // RegisterInterfaces implements HasRegisterInterfaces -func (c coreAppModuleAdaptor) RegisterInterfaces(reg registry.LegacyRegistry) { +func (c coreAppModuleAdaptor) RegisterInterfaces(reg registry.InterfaceRegistrar) { if mod, ok := c.module.(interface { - RegisterInterfaces(registry.LegacyRegistry) + RegisterInterfaces(registry.InterfaceRegistrar) }); ok { mod.RegisterInterfaces(reg) } diff --git a/types/module/module.go b/types/module/module.go index fba59b89ea05..d64ca83e835e 100644 --- a/types/module/module.go +++ b/types/module/module.go @@ -312,10 +312,10 @@ func (m *Manager) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { } // RegisterInterfaces registers all module interface types -func (m *Manager) RegisterInterfaces(registry registry.LegacyRegistry) { +func (m *Manager) RegisterInterfaces(registrar registry.InterfaceRegistrar) { for _, b := range m.Modules { if mod, ok := b.(appmodule.HasRegisterInterfaces); ok { - mod.RegisterInterfaces(registry) + mod.RegisterInterfaces(registrar) } } } diff --git a/types/msgservice/msg_service.go b/types/msgservice/msg_service.go index e8c08f98a617..4c39753022fa 100644 --- a/types/msgservice/msg_service.go +++ b/types/msgservice/msg_service.go @@ -22,7 +22,7 @@ import ( // RegisterMsgServiceDesc registers all type_urls from Msg services described // in `sd` into the registry. -func RegisterMsgServiceDesc(registry registry.LegacyRegistry, sd *grpc.ServiceDesc) { +func RegisterMsgServiceDesc(registrar registry.InterfaceRegistrar, sd *grpc.ServiceDesc) { fdBytesUnzipped := unzip(proto.FileDescriptor(sd.Metadata.(string))) if fdBytesUnzipped == nil { panic(fmt.Errorf("error unzipping file description for MsgService %s", sd.ServiceName)) @@ -51,8 +51,8 @@ func RegisterMsgServiceDesc(registry registry.LegacyRegistry, sd *grpc.ServiceDe respTyp := proto.MessageType(string(responseDesc.FullName())) // Register sdk.Msg and sdk.MsgResponse to the registry. - registry.RegisterImplementations((*sdk.Msg)(nil), reflect.New(reqTyp).Elem().Interface().(proto.Message)) - registry.RegisterImplementations((*tx.MsgResponse)(nil), reflect.New(respTyp).Elem().Interface().(proto.Message)) + registrar.RegisterImplementations((*sdk.Msg)(nil), reflect.New(reqTyp).Elem().Interface().(proto.Message)) + registrar.RegisterImplementations((*tx.MsgResponse)(nil), reflect.New(respTyp).Elem().Interface().(proto.Message)) } } diff --git a/x/accounts/module.go b/x/accounts/module.go index 6d19dde0a5ca..2a85cf47180a 100644 --- a/x/accounts/module.go +++ b/x/accounts/module.go @@ -50,8 +50,8 @@ func (m AppModule) IsAppModule() {} func (AppModule) Name() string { return ModuleName } -func (m AppModule) RegisterInterfaces(registry registry.LegacyRegistry) { - msgservice.RegisterMsgServiceDesc(registry, v1.MsgServiceDesc()) +func (m AppModule) RegisterInterfaces(registrar registry.InterfaceRegistrar) { + msgservice.RegisterMsgServiceDesc(registrar, v1.MsgServiceDesc()) } // App module services diff --git a/x/auth/module.go b/x/auth/module.go index e46711451a7b..9adf511a096e 100644 --- a/x/auth/module.go +++ b/x/auth/module.go @@ -73,8 +73,8 @@ func (AppModule) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *gwrunt } // RegisterInterfaces registers interfaces and implementations of the auth module. -func (AppModule) RegisterInterfaces(registry registry.LegacyRegistry) { - types.RegisterInterfaces(registry) +func (AppModule) RegisterInterfaces(registrar registry.InterfaceRegistrar) { + types.RegisterInterfaces(registrar) } // RegisterServices registers module services. diff --git a/x/auth/types/codec.go b/x/auth/types/codec.go index 5e6a29986a97..685d9eb85dc5 100644 --- a/x/auth/types/codec.go +++ b/x/auth/types/codec.go @@ -28,35 +28,35 @@ func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { // RegisterInterfaces associates protoName with AccountI interface // and creates a registry of it's concrete implementations -func RegisterInterfaces(registry registry.LegacyRegistry) { - registry.RegisterInterface( +func RegisterInterfaces(registrar registry.InterfaceRegistrar) { + registrar.RegisterInterface( "cosmos.auth.v1beta1.AccountI", (*AccountI)(nil), &BaseAccount{}, &ModuleAccount{}, ) - registry.RegisterInterface( + registrar.RegisterInterface( "cosmos.auth.v1beta1.AccountI", (*sdk.AccountI)(nil), &BaseAccount{}, &ModuleAccount{}, ) - registry.RegisterInterface( + registrar.RegisterInterface( "cosmos.auth.v1beta1.GenesisAccount", (*GenesisAccount)(nil), &BaseAccount{}, &ModuleAccount{}, ) - registry.RegisterInterface( + registrar.RegisterInterface( "cosmos.auth.v1.ModuleCredential", (*cryptotypes.PubKey)(nil), &ModuleCredential{}, ) - registry.RegisterImplementations((*sdk.Msg)(nil), + registrar.RegisterImplementations((*sdk.Msg)(nil), &MsgUpdateParams{}, ) } diff --git a/x/auth/vesting/module.go b/x/auth/vesting/module.go index 128f1a36ae81..8835309db9ed 100644 --- a/x/auth/vesting/module.go +++ b/x/auth/vesting/module.go @@ -45,8 +45,8 @@ func (AppModule) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { // RegisterInterfaces registers the module's interfaces and implementations with // the given interface registry. -func (AppModule) RegisterInterfaces(registry registry.LegacyRegistry) { - types.RegisterInterfaces(registry) +func (AppModule) RegisterInterfaces(registrar registry.InterfaceRegistrar) { + types.RegisterInterfaces(registrar) } // ConsensusVersion implements HasConsensusVersion. diff --git a/x/auth/vesting/types/codec.go b/x/auth/vesting/types/codec.go index 431b511931c9..118d075d9238 100644 --- a/x/auth/vesting/types/codec.go +++ b/x/auth/vesting/types/codec.go @@ -27,8 +27,8 @@ func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { // RegisterInterface associates protoName with AccountI and VestingAccount // Interfaces and creates a registry of it's concrete implementations -func RegisterInterfaces(registry registry.LegacyRegistry) { - registry.RegisterInterface( +func RegisterInterfaces(registrar registry.InterfaceRegistrar) { + registrar.RegisterInterface( "cosmos.vesting.v1beta1.VestingAccount", (*exported.VestingAccount)(nil), &ContinuousVestingAccount{}, @@ -37,7 +37,7 @@ func RegisterInterfaces(registry registry.LegacyRegistry) { &PermanentLockedAccount{}, ) - registry.RegisterImplementations( + registrar.RegisterImplementations( (*sdk.AccountI)(nil), &BaseVestingAccount{}, &DelayedVestingAccount{}, @@ -46,7 +46,7 @@ func RegisterInterfaces(registry registry.LegacyRegistry) { &PermanentLockedAccount{}, ) - registry.RegisterImplementations( + registrar.RegisterImplementations( (*authtypes.GenesisAccount)(nil), &BaseVestingAccount{}, &DelayedVestingAccount{}, @@ -55,11 +55,11 @@ func RegisterInterfaces(registry registry.LegacyRegistry) { &PermanentLockedAccount{}, ) - registry.RegisterImplementations( + registrar.RegisterImplementations( (*sdk.Msg)(nil), &MsgCreateVestingAccount{}, &MsgCreatePermanentLockedAccount{}, ) - msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) + msgservice.RegisterMsgServiceDesc(registrar, &_Msg_serviceDesc) } diff --git a/x/authz/codec.go b/x/authz/codec.go index 2d1d095f4e7e..a82c67ce43e8 100644 --- a/x/authz/codec.go +++ b/x/authz/codec.go @@ -23,8 +23,8 @@ func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { } // RegisterInterfaces registers the interfaces types with the interface registry -func RegisterInterfaces(registry registry.LegacyRegistry) { - registry.RegisterImplementations((*sdk.Msg)(nil), +func RegisterInterfaces(registrar registry.InterfaceRegistrar) { + registrar.RegisterImplementations((*sdk.Msg)(nil), &MsgGrant{}, &MsgRevoke{}, &MsgExec{}, @@ -34,12 +34,12 @@ func RegisterInterfaces(registry registry.LegacyRegistry) { // and authz depends on x/bank and x/staking in other places, these registrations are placed here // to prevent a cyclic dependency. // see: https://github.com/cosmos/cosmos-sdk/pull/16509 - registry.RegisterInterface( + registrar.RegisterInterface( "cosmos.authz.v1beta1.Authorization", (*Authorization)(nil), &GenericAuthorization{}, &bank.SendAuthorization{}, &staking.StakeAuthorization{}, ) - msgservice.RegisterMsgServiceDesc(registry, MsgServiceDesc()) + msgservice.RegisterMsgServiceDesc(registrar, MsgServiceDesc()) } diff --git a/x/authz/module/module.go b/x/authz/module/module.go index 9eb34ac5fd06..a19447ba36c2 100644 --- a/x/authz/module/module.go +++ b/x/authz/module/module.go @@ -92,8 +92,8 @@ func (AppModule) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { } // RegisterInterfaces registers the authz module's interface types -func (AppModule) RegisterInterfaces(registry registry.LegacyRegistry) { - authz.RegisterInterfaces(registry) +func (AppModule) RegisterInterfaces(registrar registry.InterfaceRegistrar) { + authz.RegisterInterfaces(registrar) } // RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the authz module. diff --git a/x/bank/module.go b/x/bank/module.go index 6390360f4b0f..d9db2b6abe96 100644 --- a/x/bank/module.go +++ b/x/bank/module.go @@ -80,8 +80,8 @@ func (AppModule) GetTxCmd() *cobra.Command { } // RegisterInterfaces registers interfaces and implementations of the bank module. -func (AppModule) RegisterInterfaces(registry registry.LegacyRegistry) { - types.RegisterInterfaces(registry) +func (AppModule) RegisterInterfaces(registrar registry.InterfaceRegistrar) { + types.RegisterInterfaces(registrar) } // RegisterServices registers module services. diff --git a/x/bank/types/codec.go b/x/bank/types/codec.go index 978d7d1baae7..eea6b27dbdcf 100644 --- a/x/bank/types/codec.go +++ b/x/bank/types/codec.go @@ -21,12 +21,12 @@ func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { cdc.RegisterConcrete(&Params{}, "cosmos-sdk/x/bank/Params", nil) } -func RegisterInterfaces(registry registry.LegacyRegistry) { - registry.RegisterImplementations((*sdk.Msg)(nil), +func RegisterInterfaces(registrar registry.InterfaceRegistrar) { + registrar.RegisterImplementations((*sdk.Msg)(nil), &MsgSend{}, &MsgMultiSend{}, &MsgUpdateParams{}, ) - msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) + msgservice.RegisterMsgServiceDesc(registrar, &_Msg_serviceDesc) } diff --git a/x/circuit/module.go b/x/circuit/module.go index c33d1c69e8c8..5f14b29e4c8c 100644 --- a/x/circuit/module.go +++ b/x/circuit/module.go @@ -53,8 +53,8 @@ func (AppModule) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *gwrunt } // RegisterInterfaces registers interfaces and implementations of the circuit module. -func (AppModule) RegisterInterfaces(registry registry.LegacyRegistry) { - types.RegisterInterfaces(registry) +func (AppModule) RegisterInterfaces(registrar registry.InterfaceRegistrar) { + types.RegisterInterfaces(registrar) } // RegisterServices registers module services. diff --git a/x/circuit/types/codec.go b/x/circuit/types/codec.go index 41bab1a4d89d..0a7c6f415d89 100644 --- a/x/circuit/types/codec.go +++ b/x/circuit/types/codec.go @@ -8,11 +8,11 @@ import ( ) // RegisterInterfaces registers the interfaces types with the interface registry. -func RegisterInterfaces(registry registry.LegacyRegistry) { - registry.RegisterImplementations((*sdk.Msg)(nil), +func RegisterInterfaces(registrar registry.InterfaceRegistrar) { + registrar.RegisterImplementations((*sdk.Msg)(nil), &MsgAuthorizeCircuitBreaker{}, &MsgResetCircuitBreaker{}, &MsgTripCircuitBreaker{}, ) - msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) + msgservice.RegisterMsgServiceDesc(registrar, &_Msg_serviceDesc) } diff --git a/x/consensus/module.go b/x/consensus/module.go index c77502cc5ee3..adb87d404cd8 100644 --- a/x/consensus/module.go +++ b/x/consensus/module.go @@ -61,8 +61,8 @@ func (AppModule) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *gwrunt } // RegisterInterfaces registers interfaces and implementations of the bank module. -func (AppModule) RegisterInterfaces(registry registry.LegacyRegistry) { - types.RegisterInterfaces(registry) +func (AppModule) RegisterInterfaces(registrar registry.InterfaceRegistrar) { + types.RegisterInterfaces(registrar) } // RegisterServices registers module services. diff --git a/x/consensus/types/codec.go b/x/consensus/types/codec.go index f9fa0a8f2a31..756ea4319f60 100644 --- a/x/consensus/types/codec.go +++ b/x/consensus/types/codec.go @@ -9,13 +9,13 @@ import ( "github.com/cosmos/cosmos-sdk/types/msgservice" ) -func RegisterInterfaces(registry registry.LegacyRegistry) { - registry.RegisterImplementations( +func RegisterInterfaces(registrar registry.InterfaceRegistrar) { + registrar.RegisterImplementations( (*sdk.Msg)(nil), &MsgUpdateParams{}, ) - msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) + msgservice.RegisterMsgServiceDesc(registrar, &_Msg_serviceDesc) } // RegisterLegacyAminoCodec registers the necessary x/consensus interfaces and concrete types diff --git a/x/counter/module.go b/x/counter/module.go index 314db6ebefed..57340e44556b 100644 --- a/x/counter/module.go +++ b/x/counter/module.go @@ -47,6 +47,6 @@ func (AppModule) ConsensusVersion() uint64 { return 1 } func (AppModule) Name() string { return types.ModuleName } // RegisterInterfaces registers interfaces and implementations of the bank module. -func (AppModule) RegisterInterfaces(registry registry.LegacyRegistry) { - types.RegisterInterfaces(registry) +func (AppModule) RegisterInterfaces(registrar registry.InterfaceRegistrar) { + types.RegisterInterfaces(registrar) } diff --git a/x/counter/types/codec.go b/x/counter/types/codec.go index 8776f0ff0dc3..d7b68a29feb9 100644 --- a/x/counter/types/codec.go +++ b/x/counter/types/codec.go @@ -7,11 +7,11 @@ import ( "github.com/cosmos/cosmos-sdk/types/msgservice" ) -func RegisterInterfaces(registry registry.LegacyRegistry) { - registry.RegisterImplementations( +func RegisterInterfaces(registrar registry.InterfaceRegistrar) { + registrar.RegisterImplementations( (*sdk.Msg)(nil), &MsgIncreaseCounter{}, ) - msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) + msgservice.RegisterMsgServiceDesc(registrar, &_Msg_serviceDesc) } diff --git a/x/crisis/module.go b/x/crisis/module.go index ad7c10e6e894..807a276aca93 100644 --- a/x/crisis/module.go +++ b/x/crisis/module.go @@ -74,8 +74,8 @@ func (AppModule) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { // RegisterInterfaces registers interfaces and implementations of the crisis // module. -func (AppModule) RegisterInterfaces(registry registry.LegacyRegistry) { - types.RegisterInterfaces(registry) +func (AppModule) RegisterInterfaces(registrar registry.InterfaceRegistrar) { + types.RegisterInterfaces(registrar) } // AddModuleInitFlags implements servertypes.ModuleInitFlags interface. diff --git a/x/crisis/types/codec.go b/x/crisis/types/codec.go index 10f9fa317995..039a0cb21d8e 100644 --- a/x/crisis/types/codec.go +++ b/x/crisis/types/codec.go @@ -17,11 +17,11 @@ func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { } // RegisterInterfaces registers the interfaces types with the Interface Registry. -func RegisterInterfaces(registry registry.LegacyRegistry) { - registry.RegisterImplementations((*sdk.Msg)(nil), +func RegisterInterfaces(registrar registry.InterfaceRegistrar) { + registrar.RegisterImplementations((*sdk.Msg)(nil), &MsgVerifyInvariant{}, &MsgUpdateParams{}, ) - msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) + msgservice.RegisterMsgServiceDesc(registrar, &_Msg_serviceDesc) } diff --git a/x/distribution/module.go b/x/distribution/module.go index 0d61ce1c47a1..eebf6ac2517d 100644 --- a/x/distribution/module.go +++ b/x/distribution/module.go @@ -92,8 +92,8 @@ func (AppModule) GetTxCmd() *cobra.Command { } // RegisterInterfaces implements InterfaceModule -func (AppModule) RegisterInterfaces(registry registry.LegacyRegistry) { - types.RegisterInterfaces(registry) +func (AppModule) RegisterInterfaces(registrar registry.InterfaceRegistrar) { + types.RegisterInterfaces(registrar) } // RegisterInvariants registers the distribution module invariants. diff --git a/x/distribution/types/codec.go b/x/distribution/types/codec.go index 3d05793aad8e..0f47ec68a3e1 100644 --- a/x/distribution/types/codec.go +++ b/x/distribution/types/codec.go @@ -22,8 +22,8 @@ func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { cdc.RegisterConcrete(Params{}, "cosmos-sdk/x/distribution/Params", nil) } -func RegisterInterfaces(registry registry.LegacyRegistry) { - registry.RegisterImplementations( +func RegisterInterfaces(registrar registry.InterfaceRegistrar) { + registrar.RegisterImplementations( (*sdk.Msg)(nil), &MsgWithdrawDelegatorReward{}, &MsgWithdrawValidatorCommission{}, @@ -32,5 +32,5 @@ func RegisterInterfaces(registry registry.LegacyRegistry) { &MsgDepositValidatorRewardsPool{}, ) - msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) + msgservice.RegisterMsgServiceDesc(registrar, &_Msg_serviceDesc) } diff --git a/x/evidence/module.go b/x/evidence/module.go index 54d0ded5353b..b78e0060a013 100644 --- a/x/evidence/module.go +++ b/x/evidence/module.go @@ -84,8 +84,8 @@ func (am AppModule) GetTxCmd() *cobra.Command { } // RegisterInterfaces registers the evidence module's interface types -func (AppModule) RegisterInterfaces(registry registry.LegacyRegistry) { - types.RegisterInterfaces(registry) +func (AppModule) RegisterInterfaces(registrar registry.InterfaceRegistrar) { + types.RegisterInterfaces(registrar) } // RegisterServices registers module services. diff --git a/x/evidence/types/codec.go b/x/evidence/types/codec.go index 15bb55568b3e..cb827d907419 100644 --- a/x/evidence/types/codec.go +++ b/x/evidence/types/codec.go @@ -19,13 +19,13 @@ func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { } // RegisterInterfaces registers the interfaces types with the interface registry. -func RegisterInterfaces(registry registry.LegacyRegistry) { - registry.RegisterImplementations((*sdk.Msg)(nil), &MsgSubmitEvidence{}) - registry.RegisterInterface( +func RegisterInterfaces(registrar registry.InterfaceRegistrar) { + registrar.RegisterImplementations((*sdk.Msg)(nil), &MsgSubmitEvidence{}) + registrar.RegisterInterface( "cosmos.evidence.v1beta1.Evidence", (*exported.Evidence)(nil), &Equivocation{}, ) - msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) + msgservice.RegisterMsgServiceDesc(registrar, &_Msg_serviceDesc) } diff --git a/x/feegrant/codec.go b/x/feegrant/codec.go index a840e9eaf738..09083ba23ed2 100644 --- a/x/feegrant/codec.go +++ b/x/feegrant/codec.go @@ -22,13 +22,13 @@ func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { } // RegisterInterfaces registers the interfaces types with the interface registry -func RegisterInterfaces(registry registry.LegacyRegistry) { - registry.RegisterImplementations((*sdk.Msg)(nil), +func RegisterInterfaces(registrar registry.InterfaceRegistrar) { + registrar.RegisterImplementations((*sdk.Msg)(nil), &MsgGrantAllowance{}, &MsgRevokeAllowance{}, ) - registry.RegisterInterface( + registrar.RegisterInterface( "cosmos.feegrant.v1beta1.FeeAllowanceI", (*FeeAllowanceI)(nil), &BasicAllowance{}, @@ -36,5 +36,5 @@ func RegisterInterfaces(registry registry.LegacyRegistry) { &AllowedMsgAllowance{}, ) - msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) + msgservice.RegisterMsgServiceDesc(registrar, &_Msg_serviceDesc) } diff --git a/x/feegrant/module/module.go b/x/feegrant/module/module.go index 4f4ce2f29da3..b02978dbd906 100644 --- a/x/feegrant/module/module.go +++ b/x/feegrant/module/module.go @@ -71,8 +71,8 @@ func (AppModule) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { } // RegisterInterfaces registers the feegrant module's interface types -func (AppModule) RegisterInterfaces(registry registry.LegacyRegistry) { - feegrant.RegisterInterfaces(registry) +func (AppModule) RegisterInterfaces(registrar registry.InterfaceRegistrar) { + feegrant.RegisterInterfaces(registrar) } // RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the feegrant module. diff --git a/x/genutil/module.go b/x/genutil/module.go index a37b7f021d3e..069f2f67a45b 100644 --- a/x/genutil/module.go +++ b/x/genutil/module.go @@ -119,4 +119,4 @@ func (am AppModule) GenTxValidator() types.MessageValidator { func (AppModule) ConsensusVersion() uint64 { return 1 } // RegisterInterfaces implements module.AppModule. -func (AppModule) RegisterInterfaces(registry.LegacyRegistry) {} +func (AppModule) RegisterInterfaces(registry.InterfaceRegistrar) {} diff --git a/x/gov/module.go b/x/gov/module.go index d36627293a2c..6effa507b528 100644 --- a/x/gov/module.go +++ b/x/gov/module.go @@ -110,9 +110,9 @@ func getProposalCLIHandlers(handlers []govclient.ProposalHandler) []*cobra.Comma } // RegisterInterfaces implements InterfaceModule.RegisterInterfaces -func (AppModule) RegisterInterfaces(registry registry.LegacyRegistry) { - v1.RegisterInterfaces(registry) - v1beta1.RegisterInterfaces(registry) +func (AppModule) RegisterInterfaces(registrar registry.InterfaceRegistrar) { + v1.RegisterInterfaces(registrar) + v1beta1.RegisterInterfaces(registrar) } // RegisterInvariants registers module invariants diff --git a/x/gov/types/v1/codec.go b/x/gov/types/v1/codec.go index 6a3b96cc97a7..33ea00178e1f 100644 --- a/x/gov/types/v1/codec.go +++ b/x/gov/types/v1/codec.go @@ -24,8 +24,8 @@ func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { } // RegisterInterfaces registers the interfaces types with the Interface Registry. -func RegisterInterfaces(registry registry.LegacyRegistry) { - registry.RegisterImplementations((*sdk.Msg)(nil), +func RegisterInterfaces(registrar registry.InterfaceRegistrar) { + registrar.RegisterImplementations((*sdk.Msg)(nil), &MsgSubmitProposal{}, &MsgSubmitMultipleChoiceProposal{}, &MsgVote{}, @@ -37,5 +37,5 @@ func RegisterInterfaces(registry registry.LegacyRegistry) { &MsgSudoExec{}, ) - msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) + msgservice.RegisterMsgServiceDesc(registrar, &_Msg_serviceDesc) } diff --git a/x/gov/types/v1beta1/codec.go b/x/gov/types/v1beta1/codec.go index 9c6c4064c68f..37197b80aac3 100644 --- a/x/gov/types/v1beta1/codec.go +++ b/x/gov/types/v1beta1/codec.go @@ -21,18 +21,18 @@ func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { } // RegisterInterfaces registers the interfaces types with the Interface Registry. -func RegisterInterfaces(registry registry.LegacyRegistry) { - registry.RegisterImplementations((*sdk.Msg)(nil), +func RegisterInterfaces(registrar registry.InterfaceRegistrar) { + registrar.RegisterImplementations((*sdk.Msg)(nil), &MsgSubmitProposal{}, &MsgVote{}, &MsgVoteWeighted{}, &MsgDeposit{}, ) - registry.RegisterInterface( + registrar.RegisterInterface( "cosmos.gov.v1beta1.Content", (*Content)(nil), &TextProposal{}, ) - msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) + msgservice.RegisterMsgServiceDesc(registrar, &_Msg_serviceDesc) } diff --git a/x/group/codec.go b/x/group/codec.go index 5c816ebebcc9..3cce8f4ed62c 100644 --- a/x/group/codec.go +++ b/x/group/codec.go @@ -34,8 +34,8 @@ func RegisterLegacyAminoCodec(cdc *codectypes.LegacyAmino) { } // RegisterInterfaces registers the interfaces types with the interface registry. -func RegisterInterfaces(registry registry.LegacyRegistry) { - registry.RegisterImplementations((*sdk.Msg)(nil), +func RegisterInterfaces(registrar registry.InterfaceRegistrar) { + registrar.RegisterImplementations((*sdk.Msg)(nil), &MsgCreateGroup{}, &MsgUpdateGroupMembers{}, &MsgUpdateGroupAdmin{}, @@ -52,9 +52,9 @@ func RegisterInterfaces(registry registry.LegacyRegistry) { &MsgLeaveGroup{}, ) - msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) + msgservice.RegisterMsgServiceDesc(registrar, &_Msg_serviceDesc) - registry.RegisterInterface( + registrar.RegisterInterface( "cosmos.group.v1.DecisionPolicy", (*DecisionPolicy)(nil), &ThresholdDecisionPolicy{}, diff --git a/x/group/module/module.go b/x/group/module/module.go index 9a044274ec7c..92c7319b0fc0 100644 --- a/x/group/module/module.go +++ b/x/group/module/module.go @@ -83,8 +83,8 @@ func (am AppModule) RegisterGRPCGatewayRoutes(clientCtx sdkclient.Context, mux * } // RegisterInterfaces registers the group module's interface types -func (AppModule) RegisterInterfaces(registry registry.LegacyRegistry) { - group.RegisterInterfaces(registry) +func (AppModule) RegisterInterfaces(registrar registry.InterfaceRegistrar) { + group.RegisterInterfaces(registrar) } // RegisterLegacyAminoCodec registers the group module's types for the given codec. diff --git a/x/mint/module.go b/x/mint/module.go index 49192c2230a8..ce3befee347f 100644 --- a/x/mint/module.go +++ b/x/mint/module.go @@ -82,8 +82,8 @@ func (AppModule) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { } // RegisterInterfaces registers the module's interface types -func (AppModule) RegisterInterfaces(registry registry.LegacyRegistry) { - types.RegisterInterfaces(registry) +func (AppModule) RegisterInterfaces(registrar registry.InterfaceRegistrar) { + types.RegisterInterfaces(registrar) } // RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the mint module. diff --git a/x/mint/types/codec.go b/x/mint/types/codec.go index 0f35aead639b..245733f2b053 100644 --- a/x/mint/types/codec.go +++ b/x/mint/types/codec.go @@ -16,11 +16,11 @@ func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { } // RegisterInterfaces registers the interfaces types with the interface registry. -func RegisterInterfaces(registry registry.LegacyRegistry) { - registry.RegisterImplementations( +func RegisterInterfaces(registrar registry.InterfaceRegistrar) { + registrar.RegisterImplementations( (*sdk.Msg)(nil), &MsgUpdateParams{}, ) - msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) + msgservice.RegisterMsgServiceDesc(registrar, &_Msg_serviceDesc) } diff --git a/x/nft/codec.go b/x/nft/codec.go index c02cf391372c..e7c13ad7c90c 100644 --- a/x/nft/codec.go +++ b/x/nft/codec.go @@ -8,9 +8,9 @@ import ( ) // RegisterInterfaces registers the interfaces types with the interface registry. -func RegisterInterfaces(registry registry.LegacyRegistry) { - registry.RegisterImplementations((*sdk.Msg)(nil), +func RegisterInterfaces(registrar registry.InterfaceRegistrar) { + registrar.RegisterImplementations((*sdk.Msg)(nil), &MsgSend{}, ) - msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) + msgservice.RegisterMsgServiceDesc(registrar, &_Msg_serviceDesc) } diff --git a/x/nft/module/module.go b/x/nft/module/module.go index 1c61a048f53d..7c662cec1229 100644 --- a/x/nft/module/module.go +++ b/x/nft/module/module.go @@ -71,8 +71,8 @@ func (am AppModule) RegisterServices(registrar grpc.ServiceRegistrar) error { } // RegisterInterfaces registers the nft module's interface types -func (AppModule) RegisterInterfaces(registry registry.LegacyRegistry) { - nft.RegisterInterfaces(registry) +func (AppModule) RegisterInterfaces(registrar registry.InterfaceRegistrar) { + nft.RegisterInterfaces(registrar) } // RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the nft module. diff --git a/x/params/module.go b/x/params/module.go index 6622e045a2e8..0ed3a514fb3c 100644 --- a/x/params/module.go +++ b/x/params/module.go @@ -64,8 +64,8 @@ func (AppModule) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *gwrunt } // RegisterInterfaces registers the module's interface types -func (AppModule) RegisterInterfaces(registry registry.LegacyRegistry) { - proposal.RegisterInterfaces(registry) +func (AppModule) RegisterInterfaces(registrar registry.InterfaceRegistrar) { + proposal.RegisterInterfaces(registrar) } // GenerateGenesisState performs a no-op. diff --git a/x/params/types/proposal/codec.go b/x/params/types/proposal/codec.go index 9b6c448349ec..78cbcb5c371d 100644 --- a/x/params/types/proposal/codec.go +++ b/x/params/types/proposal/codec.go @@ -12,8 +12,8 @@ func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { cdc.RegisterConcrete(&ParameterChangeProposal{}, "cosmos-sdk/ParameterChangeProposal", nil) } -func RegisterInterfaces(registry registry.LegacyRegistry) { - registry.RegisterImplementations( +func RegisterInterfaces(registrar registry.InterfaceRegistrar) { + registrar.RegisterImplementations( (*govtypes.Content)(nil), &ParameterChangeProposal{}, ) diff --git a/x/protocolpool/module.go b/x/protocolpool/module.go index c9683d2fa570..78b53339a215 100644 --- a/x/protocolpool/module.go +++ b/x/protocolpool/module.go @@ -70,8 +70,8 @@ func (AppModule) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *gwrunt } // RegisterInterfaces registers interfaces and implementations of the bank module. -func (AppModule) RegisterInterfaces(registry registry.LegacyRegistry) { - types.RegisterInterfaces(registry) +func (AppModule) RegisterInterfaces(registrar registry.InterfaceRegistrar) { + types.RegisterInterfaces(registrar) } // RegisterServices registers module services. diff --git a/x/protocolpool/types/codec.go b/x/protocolpool/types/codec.go index 71baad73ec06..7249c8a7193f 100644 --- a/x/protocolpool/types/codec.go +++ b/x/protocolpool/types/codec.go @@ -7,8 +7,8 @@ import ( "github.com/cosmos/cosmos-sdk/types/msgservice" ) -func RegisterInterfaces(registry registry.LegacyRegistry) { - registry.RegisterImplementations( +func RegisterInterfaces(registrar registry.InterfaceRegistrar) { + registrar.RegisterImplementations( (*sdk.Msg)(nil), &MsgFundCommunityPool{}, &MsgCommunityPoolSpend{}, @@ -19,5 +19,5 @@ func RegisterInterfaces(registry registry.LegacyRegistry) { &MsgWithdrawContinuousFund{}, ) - msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) + msgservice.RegisterMsgServiceDesc(registrar, &_Msg_serviceDesc) } diff --git a/x/slashing/module.go b/x/slashing/module.go index 1371ecdcee8e..dab442d3860d 100644 --- a/x/slashing/module.go +++ b/x/slashing/module.go @@ -82,8 +82,8 @@ func (AppModule) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { } // RegisterInterfaces registers the module's interface types -func (AppModule) RegisterInterfaces(registry registry.LegacyRegistry) { - types.RegisterInterfaces(registry) +func (AppModule) RegisterInterfaces(registrar registry.InterfaceRegistrar) { + types.RegisterInterfaces(registrar) } // RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the slashig module. diff --git a/x/slashing/types/codec.go b/x/slashing/types/codec.go index ed8838609b09..c852734a299a 100644 --- a/x/slashing/types/codec.go +++ b/x/slashing/types/codec.go @@ -17,11 +17,11 @@ func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { } // RegisterInterfaces registers the interfaces types with the Interface Registry. -func RegisterInterfaces(registry registry.LegacyRegistry) { - registry.RegisterImplementations((*sdk.Msg)(nil), +func RegisterInterfaces(registrar registry.InterfaceRegistrar) { + registrar.RegisterImplementations((*sdk.Msg)(nil), &MsgUnjail{}, &MsgUpdateParams{}, ) - msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) + msgservice.RegisterMsgServiceDesc(registrar, &_Msg_serviceDesc) } diff --git a/x/staking/module.go b/x/staking/module.go index 359b0beb83ac..0aead1899d38 100644 --- a/x/staking/module.go +++ b/x/staking/module.go @@ -81,8 +81,8 @@ func (AppModule) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { } // RegisterInterfaces registers the module's interface types -func (AppModule) RegisterInterfaces(registry registry.LegacyRegistry) { - types.RegisterInterfaces(registry) +func (AppModule) RegisterInterfaces(registrar registry.InterfaceRegistrar) { + types.RegisterInterfaces(registrar) } // RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the staking module. diff --git a/x/staking/types/codec.go b/x/staking/types/codec.go index 7c019f3b5c3e..cbb527b980bd 100644 --- a/x/staking/types/codec.go +++ b/x/staking/types/codec.go @@ -29,8 +29,8 @@ func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { } // RegisterInterfaces registers the x/staking interfaces types with the interface registry -func RegisterInterfaces(registry registry.LegacyRegistry) { - registry.RegisterImplementations((*sdk.Msg)(nil), +func RegisterInterfaces(registrar registry.InterfaceRegistrar) { + registrar.RegisterImplementations((*sdk.Msg)(nil), &MsgCreateValidator{}, &MsgEditValidator{}, &MsgDelegate{}, @@ -40,5 +40,5 @@ func RegisterInterfaces(registry registry.LegacyRegistry) { &MsgUpdateParams{}, ) - msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) + msgservice.RegisterMsgServiceDesc(registrar, &_Msg_serviceDesc) } diff --git a/x/upgrade/module.go b/x/upgrade/module.go index 8f011f79449a..70e8bc0d3ee2 100644 --- a/x/upgrade/module.go +++ b/x/upgrade/module.go @@ -78,8 +78,8 @@ func (AppModule) GetTxCmd() *cobra.Command { } // RegisterInterfaces registers interfaces and implementations of the upgrade module. -func (AppModule) RegisterInterfaces(registry registry.LegacyRegistry) { - types.RegisterInterfaces(registry) +func (AppModule) RegisterInterfaces(registrar registry.InterfaceRegistrar) { + types.RegisterInterfaces(registrar) } // RegisterServices registers module services. diff --git a/x/upgrade/types/codec.go b/x/upgrade/types/codec.go index 366bb3105b24..c29e42c6c5b1 100644 --- a/x/upgrade/types/codec.go +++ b/x/upgrade/types/codec.go @@ -19,11 +19,11 @@ func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { } // RegisterInterfaces registers the interfaces types with the Interface Registry. -func RegisterInterfaces(registry registry.LegacyRegistry) { - registry.RegisterImplementations((*sdk.Msg)(nil), +func RegisterInterfaces(registrar registry.InterfaceRegistrar) { + registrar.RegisterImplementations((*sdk.Msg)(nil), &MsgSoftwareUpgrade{}, &MsgCancelUpgrade{}, ) - msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) + msgservice.RegisterMsgServiceDesc(registrar, &_Msg_serviceDesc) } From 0cdf3cf97c726609c384b9ddb8195f69fd01e1b4 Mon Sep 17 00:00:00 2001 From: Marko Date: Fri, 15 Mar 2024 10:40:23 +0100 Subject: [PATCH 28/30] refactor(core): remove consensus events (#19757) --- core/event/service.go | 11 +---------- runtime/events.go | 6 ------ x/accounts/utils_test.go | 4 ---- 3 files changed, 1 insertion(+), 20 deletions(-) diff --git a/core/event/service.go b/core/event/service.go index 6668c1d5bfa8..4c6f625ba262 100644 --- a/core/event/service.go +++ b/core/event/service.go @@ -18,9 +18,7 @@ type Service interface { type Manager interface { // Emit emits events represented as a protobuf message (as described in ADR 032). // - // Callers SHOULD assume that these events may be included in consensus. These events - // MUST be emitted deterministically and adding, removing or changing these events SHOULD - // be considered state-machine breaking. + // Callers SHOULD assume that these events will not be included in consensus. Emit(event protoiface.MessageV1) error // EmitKV emits an event based on an event and kv-pair attributes. @@ -28,11 +26,4 @@ type Manager interface { // These events will not be part of consensus and adding, removing or changing these events is // not a state-machine breaking change. EmitKV(eventType string, attrs ...Attribute) error - - // EmitNonConsensus emits events represented as a protobuf message (as described in ADR 032), without - // including it in blockchain consensus. - // - // These events will not be part of consensus and adding, removing or changing events is - // not a state-machine breaking change. - EmitNonConsensus(event protoiface.MessageV1) error } diff --git a/runtime/events.go b/runtime/events.go index 956e445b42a1..1ac2e19e1403 100644 --- a/runtime/events.go +++ b/runtime/events.go @@ -49,9 +49,3 @@ func (e Events) EmitKV(eventType string, attrs ...event.Attribute) error { e.EventManagerI.EmitEvents(sdk.Events{sdk.NewEvent(eventType, attributes...)}) return nil } - -// EmitNonConsensus emits an typed event that is defined in the protobuf file. -// In the future these events will be added to consensus. -func (e Events) EmitNonConsensus(event protoiface.MessageV1) error { - return e.EventManagerI.EmitTypedEvent(event) -} diff --git a/x/accounts/utils_test.go b/x/accounts/utils_test.go index 97ee8828614f..0fec9839686d 100644 --- a/x/accounts/utils_test.go +++ b/x/accounts/utils_test.go @@ -33,10 +33,6 @@ func (e eventService) EmitKV(eventType string, attrs ...event.Attribute) error { return nil } -func (e eventService) EmitNonConsensus(event protoiface.MessageV1) error { - return nil -} - func (e eventService) EventManager(ctx context.Context) event.Manager { return e } var _ InterfaceRegistry = (*interfaceRegistry)(nil) From b239590cb4e069381514ed192c5eced8256b2e2c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 15 Mar 2024 11:45:07 +0100 Subject: [PATCH 29/30] build(deps): Bump github.com/cometbft/cometbft from 0.38.5 to 0.38.6 (#19748) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Julien Robert --- client/v2/go.mod | 2 +- client/v2/go.sum | 4 +- go.mod | 2 +- go.sum | 4 +- simapp/go.mod | 28 +++++------ simapp/go.sum | 4 +- simapp/gomod2nix.toml | 57 +++++++++++----------- tests/go.mod | 2 +- tests/go.sum | 4 +- tests/starship/tests/go.mod | 38 ++++++++------- tests/starship/tests/go.sum | 78 +++++++++++-------------------- x/accounts/defaults/lockup/go.mod | 2 +- x/accounts/defaults/lockup/go.sum | 4 +- x/accounts/go.mod | 2 +- x/accounts/go.sum | 4 +- x/auth/go.mod | 2 +- x/auth/go.sum | 4 +- x/authz/go.mod | 2 +- x/authz/go.sum | 4 +- x/bank/go.mod | 2 +- x/bank/go.sum | 4 +- x/circuit/go.mod | 2 +- x/circuit/go.sum | 4 +- x/distribution/go.mod | 2 +- x/distribution/go.sum | 4 +- x/evidence/go.mod | 2 +- x/evidence/go.sum | 4 +- x/feegrant/go.mod | 2 +- x/feegrant/go.sum | 4 +- x/gov/go.mod | 2 +- x/gov/go.sum | 4 +- x/group/go.mod | 2 +- x/group/go.sum | 4 +- x/mint/go.mod | 2 +- x/mint/go.sum | 4 +- x/nft/go.mod | 2 +- x/nft/go.sum | 4 +- x/params/go.mod | 2 +- x/params/go.sum | 4 +- x/protocolpool/go.mod | 2 +- x/protocolpool/go.sum | 4 +- x/slashing/go.mod | 2 +- x/slashing/go.sum | 4 +- x/staking/go.mod | 2 +- x/staking/go.sum | 4 +- x/upgrade/go.mod | 2 +- x/upgrade/go.sum | 4 +- 47 files changed, 152 insertions(+), 179 deletions(-) diff --git a/client/v2/go.mod b/client/v2/go.mod index 4d843e5a66dd..b24d41b428d7 100644 --- a/client/v2/go.mod +++ b/client/v2/go.mod @@ -47,7 +47,7 @@ require ( github.com/cockroachdb/pebble v1.1.0 // indirect github.com/cockroachdb/redact v1.1.5 // indirect github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect - github.com/cometbft/cometbft v0.38.5 // indirect + github.com/cometbft/cometbft v0.38.6 // indirect github.com/cometbft/cometbft-db v0.8.0 // indirect github.com/cosmos/btcutil v1.0.5 // indirect github.com/cosmos/cosmos-db v1.0.2 // indirect diff --git a/client/v2/go.sum b/client/v2/go.sum index e473b86c060c..dffbcc92afda 100644 --- a/client/v2/go.sum +++ b/client/v2/go.sum @@ -124,8 +124,8 @@ github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZ 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/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= -github.com/cometbft/cometbft v0.38.5 h1:4lOcK5VTPrfbLOhNHmPYe6c7eDXHtBdMCQuKbAfFJdU= -github.com/cometbft/cometbft v0.38.5/go.mod h1:0tqKin+KQs8zDwzYD8rPHzSBIDNPuB4NrwwGDNb/hUg= +github.com/cometbft/cometbft v0.38.6 h1:QSgpCzrGWJ2KUq1qpw+FCfASRpE27T6LQbfEHscdyOk= +github.com/cometbft/cometbft v0.38.6/go.mod h1:8rSPxzUJYquCN8uuBgbUHOMg2KAwvr7CyUw+6ukO4nw= github.com/cometbft/cometbft-db v0.8.0 h1:vUMDaH3ApkX8m0KZvOFFy9b5DZHBAjsnEuo9AKVZpjo= github.com/cometbft/cometbft-db v0.8.0/go.mod h1:6ASCP4pfhmrCBpfk01/9E1SI29nD3HfVHrY4PG8x5c0= github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= diff --git a/go.mod b/go.mod index 55e1683242a2..895c17bbd0ae 100644 --- a/go.mod +++ b/go.mod @@ -18,7 +18,7 @@ require ( github.com/99designs/keyring v1.2.2 github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 github.com/cockroachdb/errors v1.11.1 - github.com/cometbft/cometbft v0.38.5 + github.com/cometbft/cometbft v0.38.6 github.com/cosmos/btcutil v1.0.5 github.com/cosmos/cosmos-db v1.0.2 github.com/cosmos/cosmos-proto v1.0.0-beta.4 diff --git a/go.sum b/go.sum index fb685aaddda5..57522eaf4005 100644 --- a/go.sum +++ b/go.sum @@ -121,8 +121,8 @@ github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZ 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/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= -github.com/cometbft/cometbft v0.38.5 h1:4lOcK5VTPrfbLOhNHmPYe6c7eDXHtBdMCQuKbAfFJdU= -github.com/cometbft/cometbft v0.38.5/go.mod h1:0tqKin+KQs8zDwzYD8rPHzSBIDNPuB4NrwwGDNb/hUg= +github.com/cometbft/cometbft v0.38.6 h1:QSgpCzrGWJ2KUq1qpw+FCfASRpE27T6LQbfEHscdyOk= +github.com/cometbft/cometbft v0.38.6/go.mod h1:8rSPxzUJYquCN8uuBgbUHOMg2KAwvr7CyUw+6ukO4nw= github.com/cometbft/cometbft-db v0.8.0 h1:vUMDaH3ApkX8m0KZvOFFy9b5DZHBAjsnEuo9AKVZpjo= github.com/cometbft/cometbft-db v0.8.0/go.mod h1:6ASCP4pfhmrCBpfk01/9E1SI29nD3HfVHrY4PG8x5c0= github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= diff --git a/simapp/go.mod b/simapp/go.mod index a4dd7ec368b5..9aa60ff78e1a 100644 --- a/simapp/go.mod +++ b/simapp/go.mod @@ -12,14 +12,25 @@ require ( cosmossdk.io/math v1.3.0 cosmossdk.io/store v1.0.2 cosmossdk.io/tools/confix v0.0.0-20230613133644-0a778132a60f + cosmossdk.io/x/accounts v0.0.0-20240226161501-23359a0b6d91 + cosmossdk.io/x/accounts/lockup v0.0.0-00010101000000-000000000000 + cosmossdk.io/x/auth v0.0.0-20240226161501-23359a0b6d91 + cosmossdk.io/x/authz v0.0.0-00010101000000-000000000000 + cosmossdk.io/x/bank v0.0.0-20240226161501-23359a0b6d91 cosmossdk.io/x/circuit v0.0.0-20230613133644-0a778132a60f + cosmossdk.io/x/distribution v0.0.0-20240227221813-a248d05f70f4 cosmossdk.io/x/evidence v0.0.0-20230613133644-0a778132a60f cosmossdk.io/x/feegrant v0.0.0-20230613133644-0a778132a60f + cosmossdk.io/x/gov v0.0.0-20231113122742-912390d5fc4a + cosmossdk.io/x/group v0.0.0-00010101000000-000000000000 + cosmossdk.io/x/mint v0.0.0-00010101000000-000000000000 cosmossdk.io/x/nft v0.0.0-20230613133644-0a778132a60f cosmossdk.io/x/protocolpool v0.0.0-20230925135524-a1bc045b3190 + cosmossdk.io/x/slashing v0.0.0-00010101000000-000000000000 + cosmossdk.io/x/staking v0.0.0-20240226161501-23359a0b6d91 cosmossdk.io/x/tx v0.13.1 cosmossdk.io/x/upgrade v0.0.0-20230613133644-0a778132a60f - github.com/cometbft/cometbft v0.38.5 + github.com/cometbft/cometbft v0.38.6 github.com/cosmos/cosmos-db v1.0.2 // this version is not used as it is always replaced by the latest Cosmos SDK version github.com/cosmos/cosmos-sdk v0.51.0 @@ -33,21 +44,6 @@ require ( google.golang.org/protobuf v1.33.0 ) -require cosmossdk.io/x/accounts v0.0.0-20240226161501-23359a0b6d91 - -require ( - cosmossdk.io/x/accounts/lockup v0.0.0-00010101000000-000000000000 - cosmossdk.io/x/auth v0.0.0-20240226161501-23359a0b6d91 - cosmossdk.io/x/authz v0.0.0-00010101000000-000000000000 - cosmossdk.io/x/bank v0.0.0-20240226161501-23359a0b6d91 - cosmossdk.io/x/distribution v0.0.0-20240227221813-a248d05f70f4 - cosmossdk.io/x/gov v0.0.0-20231113122742-912390d5fc4a - cosmossdk.io/x/group v0.0.0-00010101000000-000000000000 - cosmossdk.io/x/mint v0.0.0-00010101000000-000000000000 - cosmossdk.io/x/slashing v0.0.0-00010101000000-000000000000 - cosmossdk.io/x/staking v0.0.0-20240226161501-23359a0b6d91 -) - require ( buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.32.0-20240130113600-88ef6483f90f.1 // indirect buf.build/gen/go/tendermint/tendermint/protocolbuffers/go v1.32.0-20231117195010-33ed361a9051.1 // indirect diff --git a/simapp/go.sum b/simapp/go.sum index 8e206369783d..b7762573be20 100644 --- a/simapp/go.sum +++ b/simapp/go.sum @@ -325,8 +325,8 @@ github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZ 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/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= -github.com/cometbft/cometbft v0.38.5 h1:4lOcK5VTPrfbLOhNHmPYe6c7eDXHtBdMCQuKbAfFJdU= -github.com/cometbft/cometbft v0.38.5/go.mod h1:0tqKin+KQs8zDwzYD8rPHzSBIDNPuB4NrwwGDNb/hUg= +github.com/cometbft/cometbft v0.38.6 h1:QSgpCzrGWJ2KUq1qpw+FCfASRpE27T6LQbfEHscdyOk= +github.com/cometbft/cometbft v0.38.6/go.mod h1:8rSPxzUJYquCN8uuBgbUHOMg2KAwvr7CyUw+6ukO4nw= github.com/cometbft/cometbft-db v0.11.0 h1:M3Lscmpogx5NTbb1EGyGDaFRdsoLWrUWimFEyf7jej8= github.com/cometbft/cometbft-db v0.11.0/go.mod h1:GDPJAC/iFHNjmZZPN8V8C1yr/eyityhi2W1hz2MGKSc= github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= diff --git a/simapp/gomod2nix.toml b/simapp/gomod2nix.toml index 94f129bf6c4f..d22dfc9d2278 100644 --- a/simapp/gomod2nix.toml +++ b/simapp/gomod2nix.toml @@ -2,7 +2,7 @@ schema = 3 [mod] [mod."buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go"] - version = "v1.32.0-20230509103710-5e5b9fdd0180.1" + version = "v1.32.0-20240130113600-88ef6483f90f.1" hash = "sha256-+BS0SWZDFyUHohKwCt2pN3ybSR8NZ8DcfqZxhcJn4ho=" [mod."buf.build/gen/go/tendermint/tendermint/protocolbuffers/go"] version = "v1.32.0-20231117195010-33ed361a9051.1" @@ -22,9 +22,6 @@ schema = 3 [mod."cloud.google.com/go/storage"] version = "v1.36.0" hash = "sha256-dRKH1NEyAfEpVo5Mma677L7z0JO9Mfd1bv1lr1uFngI=" - [mod."cosmossdk.io/collections"] - version = "v0.4.0" - hash = "sha256-minFyzgO/D+Oda4E3B1qvOAN5qd65SjS6nmjca4cp/8=" [mod."cosmossdk.io/errors"] version = "v1.0.1" hash = "sha256-MgTocXkBzri9FKkNtkARJXPmxRrRO/diQJS5ZzvYrJY=" @@ -81,8 +78,8 @@ schema = 3 version = "v2.3.2" hash = "sha256-natWs+yIAuD1UI07iZtjPilroQLfXizFn3lNOiOT83U=" [mod."github.com/cenkalti/backoff/v4"] - version = "v4.1.3" - hash = "sha256-u6MEDopHoTWAZoVvvXOKnAg++xre53YgQx0gmf6t2KU=" + version = "v4.2.1" + hash = "sha256-CKogmPe0pCcAdpztzPwr24rLTJZfq8QVZ9AUduwAcoA=" [mod."github.com/cespare/xxhash"] version = "v1.1.0" hash = "sha256-nVDTtXH9PC3yJ0THaQZEN243UP9xgLi/clt5xRqj3+M=" @@ -111,11 +108,11 @@ schema = 3 version = "v0.0.0-20230807174530-cc333fc44b06" hash = "sha256-yZdBXkTVzPxRYntI9I2Gu4gkI11m52Nwl8RNNdlXSrA=" [mod."github.com/cometbft/cometbft"] - version = "v0.38.5" - hash = "sha256-F1NmnJxYCt3dTDS6Z/9zbCEUf2vjUdQs9mQiZEhxyj0=" + version = "v0.38.6" + hash = "sha256-2boDIBhWeQM7c9mAKB23cJ7bHYGf1+Dl0QeFDtO8Usk=" [mod."github.com/cometbft/cometbft-db"] - version = "v0.9.1" - hash = "sha256-ftRdle5ok2aCyqT3u5rYY0jKB8WT8uDus26Pw4Mo1go=" + version = "v0.11.0" + hash = "sha256-qs3J+9ZW7gStN2W+5SQf/JSmgX5Q5kmIau1BLxze5iE=" [mod."github.com/cosmos/btcutil"] version = "v1.0.5" hash = "sha256-t572Sr5iiHcuMKLMWa2i+LBAt192oa+G1oA371tG/eI=" @@ -150,8 +147,8 @@ schema = 3 version = "v0.0.25" hash = "sha256-EW3K2z4sfCdgKTQsjTpHxV96xdnTbnggu1EF34BlTzk=" [mod."github.com/danieljoos/wincred"] - version = "v1.2.0" - hash = "sha256-LHcvTJCc8++bFndbd8ZgMSTe4L5h2C4rN+cSWHCz54Y=" + version = "v1.2.1" + hash = "sha256-hmJediHYMONMEvrRnMs88OXEp4SDt1Pmi8t8eOEk83o=" [mod."github.com/davecgh/go-spew"] version = "v1.1.2-0.20180830191138-d8f796af33cc" hash = "sha256-fV9oI51xjHdOmEx6+dlq7Ku2Ag+m/bmbzPo6A4Y74qc=" @@ -180,8 +177,8 @@ schema = 3 version = "v1.6.1" hash = "sha256-zOpoaepCfPLmU9iQji/Ait+SVEHI9eF3rwtW0h/8lho=" [mod."github.com/fatih/color"] - version = "v1.15.0" - hash = "sha256-7b+scFVQeEUoXfeCDd8X2gS8GMoWA+HxjK8wfbypa5s=" + version = "v1.16.0" + hash = "sha256-Aq/SM28aPJVzvapllQ64R/DM4aZ5CHPewcm/AUJPyJQ=" [mod."github.com/felixge/httpsnoop"] version = "v1.0.4" hash = "sha256-c1JKoRSndwwOyOxq9ddCe+8qn7mG9uRq2o/822x5O/c=" @@ -258,8 +255,8 @@ schema = 3 version = "v1.8.1" hash = "sha256-nDABvAhlYgxUW2N/brrep7NkQXoSGcHhA+XI4+tK0F0=" [mod."github.com/gorilla/websocket"] - version = "v1.5.0" - hash = "sha256-EYVgkSEMo4HaVrsWKqnsYRp8SSS8gNf7t+Elva02Ofc=" + version = "v1.5.1" + hash = "sha256-eHZ/U+eeE5tSgWc1jEDuBwtTRbXKP9fqP9zfW4Zw8T0=" [mod."github.com/grpc-ecosystem/go-grpc-middleware"] version = "v1.4.0" hash = "sha256-0UymBjkg41C9MPqkBLz/ZY9WbimZrabpJk+8C/X63h8=" @@ -276,8 +273,8 @@ schema = 3 version = "v1.7.3" hash = "sha256-z3zrjcOsgJrZkGLwaKVauq/MFAPtulXatV/RrkKNJv4=" [mod."github.com/hashicorp/go-hclog"] - version = "v1.5.0" - hash = "sha256-u3Jqg7Qex11IZ7vbk4hRGgLy6e0cF70CCx7ERF0GUHo=" + version = "v1.6.2" + hash = "sha256-cGlKyuctpU6Jd+L1ybCoJrBwnBlHXks4CQYkTQMCxDU=" [mod."github.com/hashicorp/go-immutable-radix"] version = "v1.3.1" hash = "sha256-65+A2HiVfS/GV9G+6/TkXXjzXhI/V98e6RlJWjxy+mg=" @@ -285,8 +282,8 @@ schema = 3 version = "v0.5.3" hash = "sha256-5jQftEvEhL88yWeVnu+IZKzV5p9osZcgFmwP1zlrjzY=" [mod."github.com/hashicorp/go-plugin"] - version = "v1.5.2" - hash = "sha256-bdBT9TyHUJkUogQZWj0waniVv/Qauy/iKEbegyK2HZA=" + version = "v1.6.0" + hash = "sha256-NeY86Z+qJwt0NPV4cNmWDiTryDPSiyKMkS1ivRX9ThE=" [mod."github.com/hashicorp/go-safetemp"] version = "v1.0.0" hash = "sha256-g5i9m7FSRInQzZ4iRpIsoUu685AY7fppUwjhuZCezT8=" @@ -420,8 +417,8 @@ schema = 3 version = "v1.12.0" hash = "sha256-qvDNCe3l84/LgrA8X4O15e1FeDcazyX91m9LmXGXX6M=" [mod."github.com/rs/cors"] - version = "v1.8.3" - hash = "sha256-VgVB4HKAhPSjNg96mIEUN1bt5ZQng8Fi3ZABy3CDWQE=" + version = "v1.10.1" + hash = "sha256-um4INJM5/675MLK42npIsDbSQ1/Iy5ZiUNuAFReUfeM=" [mod."github.com/rs/zerolog"] version = "v1.32.0" hash = "sha256-9dZjtsES+wLp1cFiSVMuEUbdeXVFcgT0dgg5ACZkILk=" @@ -484,8 +481,8 @@ schema = 3 version = "v0.0.0-20230713102510-df83abbf9a02" hash = "sha256-pehQduoaJRLchebhgvMYacVvbuNIBA++XkiqCuqdato=" [mod."go.etcd.io/bbolt"] - version = "v1.3.8" - hash = "sha256-ekKy8198B2GfPldHLYZnvNjID6x07dUPYKgFx84TgVs=" + version = "v1.3.9" + hash = "sha256-98cKiMZcxl11laO3IiRHnhSgh7mEjl0iKlPxsSPdbww=" [mod."go.opencensus.io"] version = "v0.24.0" hash = "sha256-4H+mGZgG2c9I1y0m8avF4qmt8LUKxxVsTqR8mKgP4yo=" @@ -547,11 +544,11 @@ schema = 3 version = "v1.6.8" hash = "sha256-decMa0MiWfW/Bzr8QPPzzpeya0YWGHhZAt4Cr/bD1wQ=" [mod."google.golang.org/genproto"] - version = "v0.0.0-20240213162025-012b6fc9bca9" - hash = "sha256-Xn9/mncRY7WS/O5TiFDMMtJLCAzc0JZNQ8z6yV8jnjY=" + version = "v0.0.0-20240221002015-b0ce06bbee7c" + hash = "sha256-XxWl5Ejw/HOet2bm+hqiYj6ZzBCMq6qT6PhVHRsDazk=" [mod."google.golang.org/genproto/googleapis/api"] - version = "v0.0.0-20240205150955-31a09d347014" - hash = "sha256-SgYAbD0iBY8XCp4c9PLpaS4TeKVBexTfTCyV0MUOu98=" + version = "v0.0.0-20240221002015-b0ce06bbee7c" + hash = "sha256-H3d2ZhPJI9RH5EK9NsxUAFmT6tr2DgGV9SjZgqJ80r4=" [mod."google.golang.org/genproto/googleapis/rpc"] version = "v0.0.0-20240221002015-b0ce06bbee7c" hash = "sha256-XF1eaB8Uwjuii1SVpiZABBhrpszJy5ujOtN+7qAAouM=" @@ -571,8 +568,8 @@ schema = 3 version = "v3.5.1" hash = "sha256-ps2GEc3P2xvlrU4TCtXz+nLTxyP0RrF7SScz5jUqE5E=" [mod."nhooyr.io/websocket"] - version = "v1.8.6" - hash = "sha256-DyaiCc/1iELrl6JSpz6WYMtFwUiSCOSoNF8IhSyP1ag=" + version = "v1.8.10" + hash = "sha256-EsUWUFIA2uJTap1DfsYuSxlPMH3UHDpxEohJMalDOcI=" [mod."pgregory.net/rapid"] version = "v1.1.0" hash = "sha256-sVQY9EQ9Y5blYyVYfaOa+y12e+399OqdHiEY3BaDnqo=" diff --git a/tests/go.mod b/tests/go.mod index 4c93e11dffab..4ecb03a9df76 100644 --- a/tests/go.mod +++ b/tests/go.mod @@ -20,7 +20,7 @@ require ( cosmossdk.io/x/protocolpool v0.0.0-20230925135524-a1bc045b3190 cosmossdk.io/x/tx v0.13.1 cosmossdk.io/x/upgrade v0.0.0-20230613133644-0a778132a60f - github.com/cometbft/cometbft v0.38.5 + github.com/cometbft/cometbft v0.38.6 github.com/cosmos/cosmos-db v1.0.2 github.com/cosmos/cosmos-proto v1.0.0-beta.4 // this version is not used as it is always replaced by the latest Cosmos SDK version diff --git a/tests/go.sum b/tests/go.sum index 4dc30e249bba..6833aa86ce81 100644 --- a/tests/go.sum +++ b/tests/go.sum @@ -321,8 +321,8 @@ github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZ 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/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= -github.com/cometbft/cometbft v0.38.5 h1:4lOcK5VTPrfbLOhNHmPYe6c7eDXHtBdMCQuKbAfFJdU= -github.com/cometbft/cometbft v0.38.5/go.mod h1:0tqKin+KQs8zDwzYD8rPHzSBIDNPuB4NrwwGDNb/hUg= +github.com/cometbft/cometbft v0.38.6 h1:QSgpCzrGWJ2KUq1qpw+FCfASRpE27T6LQbfEHscdyOk= +github.com/cometbft/cometbft v0.38.6/go.mod h1:8rSPxzUJYquCN8uuBgbUHOMg2KAwvr7CyUw+6ukO4nw= github.com/cometbft/cometbft-db v0.11.0 h1:M3Lscmpogx5NTbb1EGyGDaFRdsoLWrUWimFEyf7jej8= github.com/cometbft/cometbft-db v0.11.0/go.mod h1:GDPJAC/iFHNjmZZPN8V8C1yr/eyityhi2W1hz2MGKSc= github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= diff --git a/tests/starship/tests/go.mod b/tests/starship/tests/go.mod index 1c1722ff811b..1a1910b23588 100644 --- a/tests/starship/tests/go.mod +++ b/tests/starship/tests/go.mod @@ -20,6 +20,7 @@ replace ( cosmossdk.io/depinject => ../../../depinject cosmossdk.io/simapp => ../../../simapp cosmossdk.io/x/accounts => ../../../x/accounts + cosmossdk.io/x/accounts/lockup => ../../../x/accounts/defaults/lockup cosmossdk.io/x/auth => ../../../x/auth cosmossdk.io/x/authz => ../../../x/authz cosmossdk.io/x/bank => ../../../x/bank @@ -41,8 +42,8 @@ require ( cosmossdk.io/log v1.3.1 cosmossdk.io/math v1.3.0 cosmossdk.io/simapp v0.0.0-00010101000000-000000000000 - cosmossdk.io/x/auth v0.0.0-00010101000000-000000000000 - cosmossdk.io/x/bank v0.0.0-00010101000000-000000000000 + cosmossdk.io/x/auth v0.0.0-20240226161501-23359a0b6d91 + cosmossdk.io/x/bank v0.0.0-20240226161501-23359a0b6d91 github.com/cosmos/cosmos-db v1.0.2 github.com/cosmos/cosmos-sdk v0.51.0 github.com/stretchr/testify v1.9.0 @@ -51,7 +52,7 @@ require ( ) require ( - buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.32.0-20230509103710-5e5b9fdd0180.1 // indirect + buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.32.0-20240130113600-88ef6483f90f.1 // indirect buf.build/gen/go/tendermint/tendermint/protocolbuffers/go v1.32.0-20231117195010-33ed361a9051.1 // indirect cloud.google.com/go v0.112.0 // indirect cloud.google.com/go/compute v1.24.0 // indirect @@ -65,7 +66,8 @@ require ( cosmossdk.io/depinject v1.0.0-alpha.4 // indirect cosmossdk.io/errors v1.0.1 // indirect cosmossdk.io/store v1.0.2 // indirect - cosmossdk.io/x/accounts v0.0.0-20240104091155-b729e981f130 // indirect + cosmossdk.io/x/accounts v0.0.0-20240226161501-23359a0b6d91 // indirect + cosmossdk.io/x/accounts/lockup v0.0.0-00010101000000-000000000000 // indirect cosmossdk.io/x/authz v0.0.0-00010101000000-000000000000 // indirect cosmossdk.io/x/circuit v0.0.0-20230613133644-0a778132a60f // indirect cosmossdk.io/x/distribution v0.0.0-20240227221813-a248d05f70f4 // indirect @@ -77,7 +79,7 @@ require ( cosmossdk.io/x/nft v0.0.0-20230613133644-0a778132a60f // indirect cosmossdk.io/x/protocolpool v0.0.0-20230925135524-a1bc045b3190 // indirect cosmossdk.io/x/slashing v0.0.0-00010101000000-000000000000 // indirect - cosmossdk.io/x/staking v0.0.0-00010101000000-000000000000 // indirect + cosmossdk.io/x/staking v0.0.0-20240226161501-23359a0b6d91 // indirect cosmossdk.io/x/tx v0.13.1 // indirect cosmossdk.io/x/upgrade v0.0.0-20230613133644-0a778132a60f // indirect filippo.io/edwards25519 v1.1.0 // indirect @@ -92,7 +94,7 @@ require ( 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/cenkalti/backoff/v4 v4.2.0 // 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 github.com/chzyer/readline v1.5.1 // indirect @@ -102,8 +104,8 @@ require ( github.com/cockroachdb/pebble v1.1.0 // indirect github.com/cockroachdb/redact v1.1.5 // indirect github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect - github.com/cometbft/cometbft v0.38.5 // indirect - github.com/cometbft/cometbft-db v0.9.1 // indirect + github.com/cometbft/cometbft v0.38.6 // indirect + github.com/cometbft/cometbft-db v0.11.0 // indirect github.com/cosmos/btcutil v1.0.5 // indirect github.com/cosmos/cosmos-proto v1.0.0-beta.4 // indirect github.com/cosmos/go-bip39 v1.0.0 // indirect @@ -112,7 +114,7 @@ require ( github.com/cosmos/iavl v1.0.1 // indirect github.com/cosmos/ics23/go v0.10.0 // indirect github.com/cosmos/ledger-cosmos-go v0.13.3 // indirect - github.com/danieljoos/wincred v1.2.0 // indirect + github.com/danieljoos/wincred v1.2.1 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f // indirect @@ -122,7 +124,7 @@ require ( github.com/dustin/go-humanize v1.0.1 // indirect github.com/dvsekhvalnov/jose2go v1.6.0 // indirect github.com/emicklei/dot v1.6.1 // indirect - github.com/fatih/color v1.15.0 // indirect + github.com/fatih/color v1.16.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/getsentry/sentry-go v0.27.0 // indirect @@ -148,16 +150,16 @@ require ( github.com/googleapis/gax-go/v2 v2.12.0 // indirect github.com/gorilla/handlers v1.5.2 // indirect github.com/gorilla/mux v1.8.1 // indirect - github.com/gorilla/websocket v1.5.0 // indirect + github.com/gorilla/websocket v1.5.1 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect github.com/hashicorp/go-getter v1.7.3 // indirect - github.com/hashicorp/go-hclog v1.5.0 // indirect + github.com/hashicorp/go-hclog v1.6.2 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect github.com/hashicorp/go-metrics v0.5.3 // indirect - github.com/hashicorp/go-plugin v1.5.2 // indirect + github.com/hashicorp/go-plugin v1.6.0 // indirect github.com/hashicorp/go-safetemp v1.0.0 // indirect github.com/hashicorp/go-version v1.6.0 // indirect github.com/hashicorp/golang-lru v1.0.2 // indirect @@ -200,7 +202,7 @@ require ( github.com/prometheus/procfs v0.12.0 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/rogpeppe/go-internal v1.12.0 // indirect - github.com/rs/cors v1.8.3 // indirect + github.com/rs/cors v1.10.1 // indirect github.com/rs/zerolog v1.32.0 // indirect github.com/sagikazarmark/locafero v0.4.0 // indirect github.com/sagikazarmark/slog-shim v0.1.0 // indirect @@ -221,7 +223,7 @@ require ( github.com/zondax/ledger-go v0.14.3 // indirect gitlab.com/yawning/secp256k1-voi v0.0.0-20230925100816-f2616030848b // indirect gitlab.com/yawning/tuplehash v0.0.0-20230713102510-df83abbf9a02 // indirect - go.etcd.io/bbolt v1.3.8 // indirect + go.etcd.io/bbolt v1.3.9 // indirect go.opencensus.io v0.24.0 // indirect go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.47.0 // indirect @@ -242,13 +244,13 @@ require ( golang.org/x/tools v0.18.0 // indirect google.golang.org/api v0.162.0 // indirect google.golang.org/appengine v1.6.8 // indirect - google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240205150955-31a09d347014 // indirect + google.golang.org/genproto v0.0.0-20240221002015-b0ce06bbee7c // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240221002015-b0ce06bbee7c // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240221002015-b0ce06bbee7c // indirect google.golang.org/protobuf v1.33.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gotest.tools/v3 v3.5.1 // indirect - nhooyr.io/websocket v1.8.6 // indirect + nhooyr.io/websocket v1.8.10 // indirect pgregory.net/rapid v1.1.0 // indirect sigs.k8s.io/yaml v1.4.0 // indirect ) diff --git a/tests/starship/tests/go.sum b/tests/starship/tests/go.sum index b76abfe72a07..43a37d79b123 100644 --- a/tests/starship/tests/go.sum +++ b/tests/starship/tests/go.sum @@ -1,5 +1,6 @@ -buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.32.0-20230509103710-5e5b9fdd0180.1 h1:7LKjxs607BNfGhtKLf+bi3SDJgpiGuTgOvemojsH8Hc= buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.32.0-20230509103710-5e5b9fdd0180.1/go.mod h1:5GqIYthcy/ASmnKcaT26APpxMhZirnIHXHKki69zjWI= +buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.32.0-20240130113600-88ef6483f90f.1 h1:68Z59OMFg4fY0XXsJWPZJQxB92R4pw6b5qphrWfHtro= +buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.32.0-20240130113600-88ef6483f90f.1/go.mod h1:5GqIYthcy/ASmnKcaT26APpxMhZirnIHXHKki69zjWI= buf.build/gen/go/tendermint/tendermint/protocolbuffers/go v1.32.0-20231117195010-33ed361a9051.1 h1:VooqQ3rklp3PwMTAE890M76w/8Z01OPa7RdgU9posFE= buf.build/gen/go/tendermint/tendermint/protocolbuffers/go v1.32.0-20231117195010-33ed361a9051.1/go.mod h1:9KmeMJUsSG3IiIwK63Lh1ipZJrwd7KHrWZseJeHukcs= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= @@ -271,8 +272,8 @@ github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= -github.com/cenkalti/backoff/v4 v4.2.0 h1:HN5dHm3WBOgndBH6E8V0q2jIYIR3s9yglV8k/+MN3u4= -github.com/cenkalti/backoff/v4 v4.2.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +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= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= @@ -320,10 +321,10 @@ github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZ 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/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= -github.com/cometbft/cometbft v0.38.5 h1:4lOcK5VTPrfbLOhNHmPYe6c7eDXHtBdMCQuKbAfFJdU= -github.com/cometbft/cometbft v0.38.5/go.mod h1:0tqKin+KQs8zDwzYD8rPHzSBIDNPuB4NrwwGDNb/hUg= -github.com/cometbft/cometbft-db v0.9.1 h1:MIhVX5ja5bXNHF8EYrThkG9F7r9kSfv8BX4LWaxWJ4M= -github.com/cometbft/cometbft-db v0.9.1/go.mod h1:iliyWaoV0mRwBJoizElCwwRA9Tf7jZJOURcRZF9m60U= +github.com/cometbft/cometbft v0.38.6 h1:QSgpCzrGWJ2KUq1qpw+FCfASRpE27T6LQbfEHscdyOk= +github.com/cometbft/cometbft v0.38.6/go.mod h1:8rSPxzUJYquCN8uuBgbUHOMg2KAwvr7CyUw+6ukO4nw= +github.com/cometbft/cometbft-db v0.11.0 h1:M3Lscmpogx5NTbb1EGyGDaFRdsoLWrUWimFEyf7jej8= +github.com/cometbft/cometbft-db v0.11.0/go.mod h1:GDPJAC/iFHNjmZZPN8V8C1yr/eyityhi2W1hz2MGKSc= github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= github.com/containerd/continuity v0.3.0/go.mod h1:wJEAIwKOm/pBZuBd0JmeTvnLquTB1Ag8espWhkykbPM= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= @@ -358,8 +359,8 @@ github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:ma github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/danieljoos/wincred v1.2.0 h1:ozqKHaLK0W/ii4KVbbvluM91W2H3Sh0BncbUNPS7jLE= -github.com/danieljoos/wincred v1.2.0/go.mod h1:FzQLLMKBFdvu+osBrnFODiv32YGwCfx0SkRa/eYHgec= +github.com/danieljoos/wincred v1.2.1 h1:dl9cBrupW8+r5250DYkYxocLeZ1Y4vB1kxgtjxw8GQs= +github.com/danieljoos/wincred v1.2.1/go.mod h1:uGaFL9fDn3OLTvzCGulzE+SzjEe5NGlh5FdCcyfPwps= 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= @@ -410,8 +411,8 @@ github.com/envoyproxy/protoc-gen-validate v1.0.4 h1:gVPz/FMfvh57HdSJQyvBtF00j8JU github.com/envoyproxy/protoc-gen-validate v1.0.4/go.mod h1:qys6tmnRsYrQqIhm2bvKZH4Blx/1gTIZ2UKVY1M+Yew= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= -github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= -github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= +github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= +github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= @@ -428,11 +429,8 @@ github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyT 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/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= -github.com/gin-gonic/gin v1.8.1 h1:4+fr/el88TOO3ewCmQr8cx/CtZ/umlIRIs5M4NTNjf8= -github.com/gin-gonic/gin v1.8.1/go.mod h1:ji8BvRH1azfM+SYow9zQ6SZMvR8qOMZHmsCuWR9tTTk= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= @@ -458,25 +456,14 @@ 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-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= -github.com/go-playground/locales v0.14.0 h1:u50s323jtVGugKlcYeyzC0etD1HifMjqmJqb8WugfUU= -github.com/go-playground/locales v0.14.0/go.mod h1:sawfccIbzZTqEDETgFXqTho0QybSa7l++s0DH+LDiLs= github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= -github.com/go-playground/universal-translator v0.18.0 h1:82dyy6p4OuJq4/CByFNOn/jYrnRPArHwAcmLoJZxyho= -github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl+lu/H90nyDXpg0fqeB/AQUGNTVA= github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= -github.com/go-playground/validator/v10 v10.11.1 h1:prmOlTVv+YjZjmRmNSF3VmspqJIxJWXmqUsHwfTRRkQ= -github.com/go-playground/validator/v10 v10.11.1/go.mod h1:i+3WkQ1FvaUjjxh1kSvIA4dMGDBiPU55YFDl0WbKdWU= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= -github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee h1:s+21KNqlpePfkah2I+gwHF8xmJWRjooY+5248k6m4A0= github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= -github.com/gobwas/pool v0.2.0 h1:QEmUOlnSjWtnpRGHF3SauEiOsy82Cup83Vf2LcMlnc8= github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= -github.com/gobwas/ws v1.0.2 h1:CoAavW/wd/kulfZmSIBt6p24n4j7tHgNVCjsfHVNUbo= github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= -github.com/goccy/go-json v0.9.11 h1:/pAaQDLHEoCq/5FFmSKBswWmK6H0e8g4159Kc/X/nqk= -github.com/goccy/go-json v0.9.11/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= @@ -617,8 +604,8 @@ github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY= github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= -github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gorilla/websocket v1.5.1 h1:gmztn0JnHVt9JZquRuzLw3g4wouNVzKL15iLr/zn/QY= +github.com/gorilla/websocket v1.5.1/go.mod h1:x3kM2JMyaluk02fnUJpQuwD2dCS5NDG2ZHL0uE0tcaY= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI= github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI= @@ -638,8 +625,8 @@ github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9n github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= github.com/hashicorp/go-getter v1.7.3 h1:bN2+Fw9XPFvOCjB0UOevFIMICZ7G2XSQHzfvLUyOM5E= github.com/hashicorp/go-getter v1.7.3/go.mod h1:W7TalhMmbPmsSMdNjD0ZskARur/9GJ17cfHTRtXV744= -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-hclog v1.6.2 h1:NOtoftovWkDheyUM/8JW3QMiXyxJK3uHRK7wV04nD2I= +github.com/hashicorp/go-hclog v1.6.2/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= @@ -647,8 +634,8 @@ github.com/hashicorp/go-metrics v0.5.3 h1:M5uADWMOGCTUNU1YuC4hfknOeHNaX54LDm4oYS github.com/hashicorp/go-metrics v0.5.3/go.mod h1:KEjodfebIOuBYSAe/bHTm+HChmKSxAOXPBieMLYozDE= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-plugin v1.5.2 h1:aWv8eimFqWlsEiMrYZdPYl+FdHaBJSN4AWwGWfT1G2Y= -github.com/hashicorp/go-plugin v1.5.2/go.mod h1:w1sAEES3g3PuV/RzUrgow20W2uErMly84hhD3um1WL4= +github.com/hashicorp/go-plugin v1.6.0 h1:wgd4KxHJTVGGqWBq4QPB1i5BZNEx9BR8+OFmHDmTk8A= +github.com/hashicorp/go-plugin v1.6.0/go.mod h1:lBS5MtSSBZk0SHc66KACcjjlU6WzEVP/8pwz68aMkCI= github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= github.com/hashicorp/go-safetemp v1.0.0 h1:2HR189eFNrjHQyENnQMMpCiBAsRxzbTMIgBhEyExpmo= @@ -708,8 +695,6 @@ github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/u github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= -github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= @@ -736,8 +721,6 @@ github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= -github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w= -github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= github.com/lib/pq v1.10.7 h1:p7ZhMD+KsSRozJr34udlUrhboJwWAgCg34+/ZZNvZZw= github.com/lib/pq v1.10.7/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6cdF0Y8= @@ -785,12 +768,9 @@ github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh 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/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= -github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/mtibben/percent v0.2.1 h1:5gssi8Nqo8QU/r2pynCm+hBQHpkB/uNK7BJCFogWdzs= github.com/mtibben/percent v0.2.1/go.mod h1:KG9uO+SZkUp+VkRHsCdYQV3XSZrrSpR3O9ibNBTZrns= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= @@ -914,8 +894,8 @@ github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/f github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= -github.com/rs/cors v1.8.3 h1:O+qNyWn7Z+F9M0ILBHgMVPuB1xTOucVd5gtaYyXBpRo= -github.com/rs/cors v1.8.3/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= +github.com/rs/cors v1.10.1 h1:L0uuZVXIKlI1SShY2nhFfo44TYvDPQ1w4oFkUJNfhyo= +github.com/rs/cors v1.10.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/zerolog v1.32.0 h1:keLypqrlIjaFsbmJOBdB/qvyF8KEtCWHwobLp5l/mQ0= github.com/rs/zerolog v1.32.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= @@ -997,12 +977,9 @@ github.com/tidwall/btree v1.7.0 h1:L1fkJH/AuEh5zBnnBbmTwQ5Lt+bRJ5A8EWecslvo9iI= github.com/tidwall/btree v1.7.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= -github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= -github.com/ugorji/go/codec v1.2.7 h1:YPXUKf7fYbp/y8xloBqZOw2qaVggbfwMlI8WM3wZUJ0= -github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY= github.com/ulikunitz/xz v0.5.10/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= 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= @@ -1025,8 +1002,8 @@ gitlab.com/yawning/secp256k1-voi v0.0.0-20230925100816-f2616030848b/go.mod h1:/y gitlab.com/yawning/tuplehash v0.0.0-20230713102510-df83abbf9a02 h1:qwDnMxjkyLmAFgcfgTnfJrmYKWhHnci3GjDqcZp1M3Q= gitlab.com/yawning/tuplehash v0.0.0-20230713102510-df83abbf9a02/go.mod h1:JTnUj0mpYiAsuZLmKjTx/ex3AtMowcCgnE7YNyCEP0I= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.8 h1:xs88BrvEv273UsB79e0hcVrlUWmS0a8upikMFhSyAtA= -go.etcd.io/bbolt v1.3.8/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= +go.etcd.io/bbolt v1.3.9 h1:8x7aARPEXiXbHmtUwAIv7eV2fQFHrLLavdiJ3uzJXoI= +go.etcd.io/bbolt v1.3.9/go.mod h1:zaO32+Ti0PK1ivdPtgMESzuzL2VPoIG1PCQNvOdo/dE= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= @@ -1588,10 +1565,10 @@ google.golang.org/genproto v0.0.0-20221010155953-15ba04fc1c0e/go.mod h1:3526vdqw google.golang.org/genproto v0.0.0-20221014173430-6e2ab493f96b/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= google.golang.org/genproto v0.0.0-20221025140454-527a21cfbd71/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= -google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 h1:9+tzLLstTlPTRyJTh+ah5wIMsBW5c4tQwGTN3thOW9Y= -google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9/go.mod h1:mqHbVIp48Muh7Ywss/AD6I5kNVKZMmAa/QEW58Gxp2s= -google.golang.org/genproto/googleapis/api v0.0.0-20240205150955-31a09d347014 h1:x9PwdEgd11LgK+orcck69WVRo7DezSO4VUMPI4xpc8A= -google.golang.org/genproto/googleapis/api v0.0.0-20240205150955-31a09d347014/go.mod h1:rbHMSEDyoYX62nRVLOCc4Qt1HbsdytAYoVwgjiOhF3I= +google.golang.org/genproto v0.0.0-20240221002015-b0ce06bbee7c h1:Zmyn5CV/jxzKnF+3d+xzbomACPwLQqVpLTpyXN5uTaQ= +google.golang.org/genproto v0.0.0-20240221002015-b0ce06bbee7c/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo= +google.golang.org/genproto/googleapis/api v0.0.0-20240221002015-b0ce06bbee7c h1:9g7erC9qu44ks7UK4gDNlnk4kOxZG707xKm4jVniy6o= +google.golang.org/genproto/googleapis/api v0.0.0-20240221002015-b0ce06bbee7c/go.mod h1:5iCWqnniDlqZHrd3neWVTOwvh/v6s3232omMecelax8= google.golang.org/genproto/googleapis/rpc v0.0.0-20240221002015-b0ce06bbee7c h1:NUsgEN92SQQqzfA+YtqYNqYmB3DMMYLlIwUZAQFVFbo= google.golang.org/genproto/googleapis/rpc v0.0.0-20240221002015-b0ce06bbee7c/go.mod h1:H4O17MA/PE9BsGx3w+a+W2VOLLD1Qf7oJneAoU6WktY= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= @@ -1698,8 +1675,9 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -nhooyr.io/websocket v1.8.6 h1:s+C3xAMLwGmlI31Nyn/eAehUlZPwfYZu2JXM621Q5/k= nhooyr.io/websocket v1.8.6/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= +nhooyr.io/websocket v1.8.10 h1:mv4p+MnGrLDcPlBoWsvPP7XCzTYMXP9F9eIGoKbgx7Q= +nhooyr.io/websocket v1.8.10/go.mod h1:rN9OFWIUwuxg4fR5tELlYC04bXYowCP9GX47ivo2l+c= pgregory.net/rapid v1.1.0 h1:CMa0sjHSru3puNx+J0MIAuiiEV4N0qj8/cMWGBBCsjw= pgregory.net/rapid v1.1.0/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= diff --git a/x/accounts/defaults/lockup/go.mod b/x/accounts/defaults/lockup/go.mod index e8773cc4d85d..0aa46ff0fc86 100644 --- a/x/accounts/defaults/lockup/go.mod +++ b/x/accounts/defaults/lockup/go.mod @@ -43,7 +43,7 @@ require ( github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect github.com/cockroachdb/pebble v1.1.0 // indirect github.com/cockroachdb/redact v1.1.5 // indirect - github.com/cometbft/cometbft v0.38.5 // indirect + github.com/cometbft/cometbft v0.38.6 // indirect github.com/cometbft/cometbft-db v0.11.0 // indirect github.com/cosmos/btcutil v1.0.5 // indirect github.com/cosmos/cosmos-db v1.0.2 // indirect diff --git a/x/accounts/defaults/lockup/go.sum b/x/accounts/defaults/lockup/go.sum index c1b0d6431b68..196fd6a9e879 100644 --- a/x/accounts/defaults/lockup/go.sum +++ b/x/accounts/defaults/lockup/go.sum @@ -116,8 +116,8 @@ github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZ 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/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= -github.com/cometbft/cometbft v0.38.5 h1:4lOcK5VTPrfbLOhNHmPYe6c7eDXHtBdMCQuKbAfFJdU= -github.com/cometbft/cometbft v0.38.5/go.mod h1:0tqKin+KQs8zDwzYD8rPHzSBIDNPuB4NrwwGDNb/hUg= +github.com/cometbft/cometbft v0.38.6 h1:QSgpCzrGWJ2KUq1qpw+FCfASRpE27T6LQbfEHscdyOk= +github.com/cometbft/cometbft v0.38.6/go.mod h1:8rSPxzUJYquCN8uuBgbUHOMg2KAwvr7CyUw+6ukO4nw= github.com/cometbft/cometbft-db v0.11.0 h1:M3Lscmpogx5NTbb1EGyGDaFRdsoLWrUWimFEyf7jej8= github.com/cometbft/cometbft-db v0.11.0/go.mod h1:GDPJAC/iFHNjmZZPN8V8C1yr/eyityhi2W1hz2MGKSc= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= diff --git a/x/accounts/go.mod b/x/accounts/go.mod index 4f133da66974..6121fe4e2e33 100644 --- a/x/accounts/go.mod +++ b/x/accounts/go.mod @@ -44,7 +44,7 @@ require ( github.com/cockroachdb/pebble v1.1.0 // indirect github.com/cockroachdb/redact v1.1.5 // indirect github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect - github.com/cometbft/cometbft v0.38.5 // indirect + github.com/cometbft/cometbft v0.38.6 // indirect github.com/cometbft/cometbft-db v0.8.0 // indirect github.com/cosmos/btcutil v1.0.5 // indirect github.com/cosmos/cosmos-db v1.0.2 // indirect diff --git a/x/accounts/go.sum b/x/accounts/go.sum index 66db8db0555c..bf644ddab1de 100644 --- a/x/accounts/go.sum +++ b/x/accounts/go.sum @@ -118,8 +118,8 @@ github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZ 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/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= -github.com/cometbft/cometbft v0.38.5 h1:4lOcK5VTPrfbLOhNHmPYe6c7eDXHtBdMCQuKbAfFJdU= -github.com/cometbft/cometbft v0.38.5/go.mod h1:0tqKin+KQs8zDwzYD8rPHzSBIDNPuB4NrwwGDNb/hUg= +github.com/cometbft/cometbft v0.38.6 h1:QSgpCzrGWJ2KUq1qpw+FCfASRpE27T6LQbfEHscdyOk= +github.com/cometbft/cometbft v0.38.6/go.mod h1:8rSPxzUJYquCN8uuBgbUHOMg2KAwvr7CyUw+6ukO4nw= github.com/cometbft/cometbft-db v0.8.0 h1:vUMDaH3ApkX8m0KZvOFFy9b5DZHBAjsnEuo9AKVZpjo= github.com/cometbft/cometbft-db v0.8.0/go.mod h1:6ASCP4pfhmrCBpfk01/9E1SI29nD3HfVHrY4PG8x5c0= github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= diff --git a/x/auth/go.mod b/x/auth/go.mod index b15108ae1959..9c257ae380dd 100644 --- a/x/auth/go.mod +++ b/x/auth/go.mod @@ -15,7 +15,7 @@ require ( cosmossdk.io/x/bank v0.0.0-00010101000000-000000000000 cosmossdk.io/x/staking v0.0.0-00010101000000-000000000000 cosmossdk.io/x/tx v0.13.1 - github.com/cometbft/cometbft v0.38.5 + github.com/cometbft/cometbft v0.38.6 github.com/cosmos/cosmos-proto v1.0.0-beta.4 github.com/cosmos/cosmos-sdk v0.51.0 github.com/cosmos/gogoproto v1.4.11 diff --git a/x/auth/go.sum b/x/auth/go.sum index 119c6de469be..046ebfecd550 100644 --- a/x/auth/go.sum +++ b/x/auth/go.sum @@ -118,8 +118,8 @@ github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZ 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/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= -github.com/cometbft/cometbft v0.38.5 h1:4lOcK5VTPrfbLOhNHmPYe6c7eDXHtBdMCQuKbAfFJdU= -github.com/cometbft/cometbft v0.38.5/go.mod h1:0tqKin+KQs8zDwzYD8rPHzSBIDNPuB4NrwwGDNb/hUg= +github.com/cometbft/cometbft v0.38.6 h1:QSgpCzrGWJ2KUq1qpw+FCfASRpE27T6LQbfEHscdyOk= +github.com/cometbft/cometbft v0.38.6/go.mod h1:8rSPxzUJYquCN8uuBgbUHOMg2KAwvr7CyUw+6ukO4nw= github.com/cometbft/cometbft-db v0.8.0 h1:vUMDaH3ApkX8m0KZvOFFy9b5DZHBAjsnEuo9AKVZpjo= github.com/cometbft/cometbft-db v0.8.0/go.mod h1:6ASCP4pfhmrCBpfk01/9E1SI29nD3HfVHrY4PG8x5c0= github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= diff --git a/x/authz/go.mod b/x/authz/go.mod index 8544eaaae5f3..1262c450495b 100644 --- a/x/authz/go.mod +++ b/x/authz/go.mod @@ -17,7 +17,7 @@ require ( cosmossdk.io/x/staking v0.0.0-00010101000000-000000000000 cosmossdk.io/x/tx v0.13.1 github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect - github.com/cometbft/cometbft v0.38.5 + github.com/cometbft/cometbft v0.38.6 github.com/cosmos/cosmos-proto v1.0.0-beta.4 github.com/cosmos/cosmos-sdk v0.51.0 github.com/cosmos/gogoproto v1.4.11 diff --git a/x/authz/go.sum b/x/authz/go.sum index 119c6de469be..046ebfecd550 100644 --- a/x/authz/go.sum +++ b/x/authz/go.sum @@ -118,8 +118,8 @@ github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZ 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/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= -github.com/cometbft/cometbft v0.38.5 h1:4lOcK5VTPrfbLOhNHmPYe6c7eDXHtBdMCQuKbAfFJdU= -github.com/cometbft/cometbft v0.38.5/go.mod h1:0tqKin+KQs8zDwzYD8rPHzSBIDNPuB4NrwwGDNb/hUg= +github.com/cometbft/cometbft v0.38.6 h1:QSgpCzrGWJ2KUq1qpw+FCfASRpE27T6LQbfEHscdyOk= +github.com/cometbft/cometbft v0.38.6/go.mod h1:8rSPxzUJYquCN8uuBgbUHOMg2KAwvr7CyUw+6ukO4nw= github.com/cometbft/cometbft-db v0.8.0 h1:vUMDaH3ApkX8m0KZvOFFy9b5DZHBAjsnEuo9AKVZpjo= github.com/cometbft/cometbft-db v0.8.0/go.mod h1:6ASCP4pfhmrCBpfk01/9E1SI29nD3HfVHrY4PG8x5c0= github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= diff --git a/x/bank/go.mod b/x/bank/go.mod index 0aeba2661a84..15d50337d5ac 100644 --- a/x/bank/go.mod +++ b/x/bank/go.mod @@ -13,7 +13,7 @@ require ( cosmossdk.io/store v1.0.2 cosmossdk.io/x/accounts v0.0.0-00010101000000-000000000000 // indirect github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect - github.com/cometbft/cometbft v0.38.5 + github.com/cometbft/cometbft v0.38.6 github.com/cosmos/cosmos-proto v1.0.0-beta.4 github.com/cosmos/cosmos-sdk v0.51.0 github.com/cosmos/gogoproto v1.4.11 diff --git a/x/bank/go.sum b/x/bank/go.sum index 119c6de469be..046ebfecd550 100644 --- a/x/bank/go.sum +++ b/x/bank/go.sum @@ -118,8 +118,8 @@ github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZ 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/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= -github.com/cometbft/cometbft v0.38.5 h1:4lOcK5VTPrfbLOhNHmPYe6c7eDXHtBdMCQuKbAfFJdU= -github.com/cometbft/cometbft v0.38.5/go.mod h1:0tqKin+KQs8zDwzYD8rPHzSBIDNPuB4NrwwGDNb/hUg= +github.com/cometbft/cometbft v0.38.6 h1:QSgpCzrGWJ2KUq1qpw+FCfASRpE27T6LQbfEHscdyOk= +github.com/cometbft/cometbft v0.38.6/go.mod h1:8rSPxzUJYquCN8uuBgbUHOMg2KAwvr7CyUw+6ukO4nw= github.com/cometbft/cometbft-db v0.8.0 h1:vUMDaH3ApkX8m0KZvOFFy9b5DZHBAjsnEuo9AKVZpjo= github.com/cometbft/cometbft-db v0.8.0/go.mod h1:6ASCP4pfhmrCBpfk01/9E1SI29nD3HfVHrY4PG8x5c0= github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= diff --git a/x/circuit/go.mod b/x/circuit/go.mod index 4dca0e8874f0..6593e91b9c31 100644 --- a/x/circuit/go.mod +++ b/x/circuit/go.mod @@ -45,7 +45,7 @@ require ( github.com/cockroachdb/pebble v1.1.0 // indirect github.com/cockroachdb/redact v1.1.5 // indirect github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect - github.com/cometbft/cometbft v0.38.5 // indirect + github.com/cometbft/cometbft v0.38.6 // indirect github.com/cometbft/cometbft-db v0.8.0 // indirect github.com/cosmos/btcutil v1.0.5 // indirect github.com/cosmos/cosmos-db v1.0.2 // indirect diff --git a/x/circuit/go.sum b/x/circuit/go.sum index 119c6de469be..046ebfecd550 100644 --- a/x/circuit/go.sum +++ b/x/circuit/go.sum @@ -118,8 +118,8 @@ github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZ 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/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= -github.com/cometbft/cometbft v0.38.5 h1:4lOcK5VTPrfbLOhNHmPYe6c7eDXHtBdMCQuKbAfFJdU= -github.com/cometbft/cometbft v0.38.5/go.mod h1:0tqKin+KQs8zDwzYD8rPHzSBIDNPuB4NrwwGDNb/hUg= +github.com/cometbft/cometbft v0.38.6 h1:QSgpCzrGWJ2KUq1qpw+FCfASRpE27T6LQbfEHscdyOk= +github.com/cometbft/cometbft v0.38.6/go.mod h1:8rSPxzUJYquCN8uuBgbUHOMg2KAwvr7CyUw+6ukO4nw= github.com/cometbft/cometbft-db v0.8.0 h1:vUMDaH3ApkX8m0KZvOFFy9b5DZHBAjsnEuo9AKVZpjo= github.com/cometbft/cometbft-db v0.8.0/go.mod h1:6ASCP4pfhmrCBpfk01/9E1SI29nD3HfVHrY4PG8x5c0= github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= diff --git a/x/distribution/go.mod b/x/distribution/go.mod index e41ea84c458a..c85f5a62d6a0 100644 --- a/x/distribution/go.mod +++ b/x/distribution/go.mod @@ -52,7 +52,7 @@ require ( github.com/cockroachdb/pebble v1.1.0 // indirect github.com/cockroachdb/redact v1.1.5 // indirect github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect - github.com/cometbft/cometbft v0.38.5 // indirect + github.com/cometbft/cometbft v0.38.6 // indirect github.com/cometbft/cometbft-db v0.8.0 // indirect github.com/cosmos/btcutil v1.0.5 // indirect github.com/cosmos/cosmos-db v1.0.2 // indirect diff --git a/x/distribution/go.sum b/x/distribution/go.sum index aa4e4ab12d66..1e7095cfdb39 100644 --- a/x/distribution/go.sum +++ b/x/distribution/go.sum @@ -120,8 +120,8 @@ github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZ 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/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= -github.com/cometbft/cometbft v0.38.5 h1:4lOcK5VTPrfbLOhNHmPYe6c7eDXHtBdMCQuKbAfFJdU= -github.com/cometbft/cometbft v0.38.5/go.mod h1:0tqKin+KQs8zDwzYD8rPHzSBIDNPuB4NrwwGDNb/hUg= +github.com/cometbft/cometbft v0.38.6 h1:QSgpCzrGWJ2KUq1qpw+FCfASRpE27T6LQbfEHscdyOk= +github.com/cometbft/cometbft v0.38.6/go.mod h1:8rSPxzUJYquCN8uuBgbUHOMg2KAwvr7CyUw+6ukO4nw= github.com/cometbft/cometbft-db v0.8.0 h1:vUMDaH3ApkX8m0KZvOFFy9b5DZHBAjsnEuo9AKVZpjo= github.com/cometbft/cometbft-db v0.8.0/go.mod h1:6ASCP4pfhmrCBpfk01/9E1SI29nD3HfVHrY4PG8x5c0= github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= diff --git a/x/evidence/go.mod b/x/evidence/go.mod index ecc058267a45..f2458d5ec112 100644 --- a/x/evidence/go.mod +++ b/x/evidence/go.mod @@ -11,7 +11,7 @@ require ( cosmossdk.io/log v1.3.1 cosmossdk.io/math v1.3.0 cosmossdk.io/store v1.0.2 - github.com/cometbft/cometbft v0.38.5 + github.com/cometbft/cometbft v0.38.6 github.com/cosmos/cosmos-proto v1.0.0-beta.4 github.com/cosmos/cosmos-sdk v0.51.0 github.com/cosmos/gogoproto v1.4.11 diff --git a/x/evidence/go.sum b/x/evidence/go.sum index 119c6de469be..046ebfecd550 100644 --- a/x/evidence/go.sum +++ b/x/evidence/go.sum @@ -118,8 +118,8 @@ github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZ 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/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= -github.com/cometbft/cometbft v0.38.5 h1:4lOcK5VTPrfbLOhNHmPYe6c7eDXHtBdMCQuKbAfFJdU= -github.com/cometbft/cometbft v0.38.5/go.mod h1:0tqKin+KQs8zDwzYD8rPHzSBIDNPuB4NrwwGDNb/hUg= +github.com/cometbft/cometbft v0.38.6 h1:QSgpCzrGWJ2KUq1qpw+FCfASRpE27T6LQbfEHscdyOk= +github.com/cometbft/cometbft v0.38.6/go.mod h1:8rSPxzUJYquCN8uuBgbUHOMg2KAwvr7CyUw+6ukO4nw= github.com/cometbft/cometbft-db v0.8.0 h1:vUMDaH3ApkX8m0KZvOFFy9b5DZHBAjsnEuo9AKVZpjo= github.com/cometbft/cometbft-db v0.8.0/go.mod h1:6ASCP4pfhmrCBpfk01/9E1SI29nD3HfVHrY4PG8x5c0= github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= diff --git a/x/feegrant/go.mod b/x/feegrant/go.mod index 06317301b706..7f341c716a56 100644 --- a/x/feegrant/go.mod +++ b/x/feegrant/go.mod @@ -15,7 +15,7 @@ require ( cosmossdk.io/x/bank v0.0.0-00010101000000-000000000000 cosmossdk.io/x/gov v0.0.0-20230925135524-a1bc045b3190 github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect - github.com/cometbft/cometbft v0.38.5 + github.com/cometbft/cometbft v0.38.6 github.com/cosmos/cosmos-proto v1.0.0-beta.4 github.com/cosmos/cosmos-sdk v0.51.0 github.com/cosmos/gogoproto v1.4.11 diff --git a/x/feegrant/go.sum b/x/feegrant/go.sum index c7f8dff91b04..1746f5fcaed9 100644 --- a/x/feegrant/go.sum +++ b/x/feegrant/go.sum @@ -126,8 +126,8 @@ github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZ 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/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= -github.com/cometbft/cometbft v0.38.5 h1:4lOcK5VTPrfbLOhNHmPYe6c7eDXHtBdMCQuKbAfFJdU= -github.com/cometbft/cometbft v0.38.5/go.mod h1:0tqKin+KQs8zDwzYD8rPHzSBIDNPuB4NrwwGDNb/hUg= +github.com/cometbft/cometbft v0.38.6 h1:QSgpCzrGWJ2KUq1qpw+FCfASRpE27T6LQbfEHscdyOk= +github.com/cometbft/cometbft v0.38.6/go.mod h1:8rSPxzUJYquCN8uuBgbUHOMg2KAwvr7CyUw+6ukO4nw= github.com/cometbft/cometbft-db v0.8.0 h1:vUMDaH3ApkX8m0KZvOFFy9b5DZHBAjsnEuo9AKVZpjo= github.com/cometbft/cometbft-db v0.8.0/go.mod h1:6ASCP4pfhmrCBpfk01/9E1SI29nD3HfVHrY4PG8x5c0= github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= diff --git a/x/gov/go.mod b/x/gov/go.mod index 03b3dffd3404..54cd2315be84 100644 --- a/x/gov/go.mod +++ b/x/gov/go.mod @@ -19,7 +19,7 @@ require ( cosmossdk.io/x/staking v0.0.0-00010101000000-000000000000 github.com/chzyer/readline v1.5.1 github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect - github.com/cometbft/cometbft v0.38.5 + github.com/cometbft/cometbft v0.38.6 github.com/cosmos/cosmos-proto v1.0.0-beta.4 github.com/cosmos/cosmos-sdk v0.51.0 github.com/cosmos/gogoproto v1.4.11 diff --git a/x/gov/go.sum b/x/gov/go.sum index c7f8dff91b04..1746f5fcaed9 100644 --- a/x/gov/go.sum +++ b/x/gov/go.sum @@ -126,8 +126,8 @@ github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZ 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/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= -github.com/cometbft/cometbft v0.38.5 h1:4lOcK5VTPrfbLOhNHmPYe6c7eDXHtBdMCQuKbAfFJdU= -github.com/cometbft/cometbft v0.38.5/go.mod h1:0tqKin+KQs8zDwzYD8rPHzSBIDNPuB4NrwwGDNb/hUg= +github.com/cometbft/cometbft v0.38.6 h1:QSgpCzrGWJ2KUq1qpw+FCfASRpE27T6LQbfEHscdyOk= +github.com/cometbft/cometbft v0.38.6/go.mod h1:8rSPxzUJYquCN8uuBgbUHOMg2KAwvr7CyUw+6ukO4nw= github.com/cometbft/cometbft-db v0.8.0 h1:vUMDaH3ApkX8m0KZvOFFy9b5DZHBAjsnEuo9AKVZpjo= github.com/cometbft/cometbft-db v0.8.0/go.mod h1:6ASCP4pfhmrCBpfk01/9E1SI29nD3HfVHrY4PG8x5c0= github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= diff --git a/x/group/go.mod b/x/group/go.mod index 0588e354d2a5..e9034adfdc8b 100644 --- a/x/group/go.mod +++ b/x/group/go.mod @@ -17,7 +17,7 @@ require ( cosmossdk.io/x/mint v0.0.0-00010101000000-000000000000 cosmossdk.io/x/staking v0.0.0-00010101000000-000000000000 github.com/cockroachdb/apd/v2 v2.0.2 - github.com/cometbft/cometbft v0.38.5 + github.com/cometbft/cometbft v0.38.6 github.com/cosmos/cosmos-db v1.0.2 github.com/cosmos/cosmos-proto v1.0.0-beta.4 github.com/cosmos/cosmos-sdk v0.51.0 diff --git a/x/group/go.sum b/x/group/go.sum index 9678247d1f7c..8220ce575da3 100644 --- a/x/group/go.sum +++ b/x/group/go.sum @@ -126,8 +126,8 @@ github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZ 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/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= -github.com/cometbft/cometbft v0.38.5 h1:4lOcK5VTPrfbLOhNHmPYe6c7eDXHtBdMCQuKbAfFJdU= -github.com/cometbft/cometbft v0.38.5/go.mod h1:0tqKin+KQs8zDwzYD8rPHzSBIDNPuB4NrwwGDNb/hUg= +github.com/cometbft/cometbft v0.38.6 h1:QSgpCzrGWJ2KUq1qpw+FCfASRpE27T6LQbfEHscdyOk= +github.com/cometbft/cometbft v0.38.6/go.mod h1:8rSPxzUJYquCN8uuBgbUHOMg2KAwvr7CyUw+6ukO4nw= github.com/cometbft/cometbft-db v0.8.0 h1:vUMDaH3ApkX8m0KZvOFFy9b5DZHBAjsnEuo9AKVZpjo= github.com/cometbft/cometbft-db v0.8.0/go.mod h1:6ASCP4pfhmrCBpfk01/9E1SI29nD3HfVHrY4PG8x5c0= github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= diff --git a/x/mint/go.mod b/x/mint/go.mod index eecffb89381e..0a27a9f890d3 100644 --- a/x/mint/go.mod +++ b/x/mint/go.mod @@ -48,7 +48,7 @@ require ( github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect github.com/cockroachdb/pebble v1.1.0 // indirect github.com/cockroachdb/redact v1.1.5 // indirect - github.com/cometbft/cometbft v0.38.5 // indirect + github.com/cometbft/cometbft v0.38.6 // indirect github.com/cometbft/cometbft-db v0.8.0 // indirect github.com/cosmos/btcutil v1.0.5 // indirect github.com/cosmos/cosmos-db v1.0.2 // indirect diff --git a/x/mint/go.sum b/x/mint/go.sum index 119c6de469be..046ebfecd550 100644 --- a/x/mint/go.sum +++ b/x/mint/go.sum @@ -118,8 +118,8 @@ github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZ 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/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= -github.com/cometbft/cometbft v0.38.5 h1:4lOcK5VTPrfbLOhNHmPYe6c7eDXHtBdMCQuKbAfFJdU= -github.com/cometbft/cometbft v0.38.5/go.mod h1:0tqKin+KQs8zDwzYD8rPHzSBIDNPuB4NrwwGDNb/hUg= +github.com/cometbft/cometbft v0.38.6 h1:QSgpCzrGWJ2KUq1qpw+FCfASRpE27T6LQbfEHscdyOk= +github.com/cometbft/cometbft v0.38.6/go.mod h1:8rSPxzUJYquCN8uuBgbUHOMg2KAwvr7CyUw+6ukO4nw= github.com/cometbft/cometbft-db v0.8.0 h1:vUMDaH3ApkX8m0KZvOFFy9b5DZHBAjsnEuo9AKVZpjo= github.com/cometbft/cometbft-db v0.8.0/go.mod h1:6ASCP4pfhmrCBpfk01/9E1SI29nD3HfVHrY4PG8x5c0= github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= diff --git a/x/nft/go.mod b/x/nft/go.mod index b95c4a618226..1a4dbdcc36ef 100644 --- a/x/nft/go.mod +++ b/x/nft/go.mod @@ -47,7 +47,7 @@ require ( github.com/cockroachdb/pebble v1.1.0 // indirect github.com/cockroachdb/redact v1.1.5 // indirect github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect - github.com/cometbft/cometbft v0.38.5 // indirect + github.com/cometbft/cometbft v0.38.6 // indirect github.com/cometbft/cometbft-db v0.8.0 // indirect github.com/cosmos/btcutil v1.0.5 // indirect github.com/cosmos/cosmos-db v1.0.2 // indirect diff --git a/x/nft/go.sum b/x/nft/go.sum index 119c6de469be..046ebfecd550 100644 --- a/x/nft/go.sum +++ b/x/nft/go.sum @@ -118,8 +118,8 @@ github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZ 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/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= -github.com/cometbft/cometbft v0.38.5 h1:4lOcK5VTPrfbLOhNHmPYe6c7eDXHtBdMCQuKbAfFJdU= -github.com/cometbft/cometbft v0.38.5/go.mod h1:0tqKin+KQs8zDwzYD8rPHzSBIDNPuB4NrwwGDNb/hUg= +github.com/cometbft/cometbft v0.38.6 h1:QSgpCzrGWJ2KUq1qpw+FCfASRpE27T6LQbfEHscdyOk= +github.com/cometbft/cometbft v0.38.6/go.mod h1:8rSPxzUJYquCN8uuBgbUHOMg2KAwvr7CyUw+6ukO4nw= github.com/cometbft/cometbft-db v0.8.0 h1:vUMDaH3ApkX8m0KZvOFFy9b5DZHBAjsnEuo9AKVZpjo= github.com/cometbft/cometbft-db v0.8.0/go.mod h1:6ASCP4pfhmrCBpfk01/9E1SI29nD3HfVHrY4PG8x5c0= github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= diff --git a/x/params/go.mod b/x/params/go.mod index 01345428b3a9..4864fc565e1c 100644 --- a/x/params/go.mod +++ b/x/params/go.mod @@ -11,7 +11,7 @@ require ( cosmossdk.io/math v1.3.0 cosmossdk.io/store v1.0.2 cosmossdk.io/x/gov v0.0.0-20230925135524-a1bc045b3190 - github.com/cometbft/cometbft v0.38.5 + github.com/cometbft/cometbft v0.38.6 github.com/cosmos/cosmos-db v1.0.2 github.com/cosmos/cosmos-proto v1.0.0-beta.4 github.com/cosmos/cosmos-sdk v0.51.0 diff --git a/x/params/go.sum b/x/params/go.sum index 119c6de469be..046ebfecd550 100644 --- a/x/params/go.sum +++ b/x/params/go.sum @@ -118,8 +118,8 @@ github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZ 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/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= -github.com/cometbft/cometbft v0.38.5 h1:4lOcK5VTPrfbLOhNHmPYe6c7eDXHtBdMCQuKbAfFJdU= -github.com/cometbft/cometbft v0.38.5/go.mod h1:0tqKin+KQs8zDwzYD8rPHzSBIDNPuB4NrwwGDNb/hUg= +github.com/cometbft/cometbft v0.38.6 h1:QSgpCzrGWJ2KUq1qpw+FCfASRpE27T6LQbfEHscdyOk= +github.com/cometbft/cometbft v0.38.6/go.mod h1:8rSPxzUJYquCN8uuBgbUHOMg2KAwvr7CyUw+6ukO4nw= github.com/cometbft/cometbft-db v0.8.0 h1:vUMDaH3ApkX8m0KZvOFFy9b5DZHBAjsnEuo9AKVZpjo= github.com/cometbft/cometbft-db v0.8.0/go.mod h1:6ASCP4pfhmrCBpfk01/9E1SI29nD3HfVHrY4PG8x5c0= github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= diff --git a/x/protocolpool/go.mod b/x/protocolpool/go.mod index 0bb4361f7caa..7dd949f0bfd0 100644 --- a/x/protocolpool/go.mod +++ b/x/protocolpool/go.mod @@ -49,7 +49,7 @@ require ( github.com/cockroachdb/pebble v1.1.0 // indirect github.com/cockroachdb/redact v1.1.5 // indirect github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect - github.com/cometbft/cometbft v0.38.5 // indirect + github.com/cometbft/cometbft v0.38.6 // indirect github.com/cometbft/cometbft-db v0.8.0 // indirect github.com/cosmos/btcutil v1.0.5 // indirect github.com/cosmos/cosmos-db v1.0.2 // indirect diff --git a/x/protocolpool/go.sum b/x/protocolpool/go.sum index 119c6de469be..046ebfecd550 100644 --- a/x/protocolpool/go.sum +++ b/x/protocolpool/go.sum @@ -118,8 +118,8 @@ github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZ 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/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= -github.com/cometbft/cometbft v0.38.5 h1:4lOcK5VTPrfbLOhNHmPYe6c7eDXHtBdMCQuKbAfFJdU= -github.com/cometbft/cometbft v0.38.5/go.mod h1:0tqKin+KQs8zDwzYD8rPHzSBIDNPuB4NrwwGDNb/hUg= +github.com/cometbft/cometbft v0.38.6 h1:QSgpCzrGWJ2KUq1qpw+FCfASRpE27T6LQbfEHscdyOk= +github.com/cometbft/cometbft v0.38.6/go.mod h1:8rSPxzUJYquCN8uuBgbUHOMg2KAwvr7CyUw+6ukO4nw= github.com/cometbft/cometbft-db v0.8.0 h1:vUMDaH3ApkX8m0KZvOFFy9b5DZHBAjsnEuo9AKVZpjo= github.com/cometbft/cometbft-db v0.8.0/go.mod h1:6ASCP4pfhmrCBpfk01/9E1SI29nD3HfVHrY4PG8x5c0= github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= diff --git a/x/slashing/go.mod b/x/slashing/go.mod index 0027c5231320..b77840696322 100644 --- a/x/slashing/go.mod +++ b/x/slashing/go.mod @@ -15,7 +15,7 @@ require ( cosmossdk.io/x/staking v0.0.0-00010101000000-000000000000 github.com/bits-and-blooms/bitset v1.10.0 github.com/cockroachdb/errors v1.11.1 - github.com/cometbft/cometbft v0.38.5 + github.com/cometbft/cometbft v0.38.6 github.com/cosmos/cosmos-proto v1.0.0-beta.4 github.com/cosmos/cosmos-sdk v0.51.0 github.com/cosmos/gogoproto v1.4.11 diff --git a/x/slashing/go.sum b/x/slashing/go.sum index fbc1a49a504f..f3e1b4f47150 100644 --- a/x/slashing/go.sum +++ b/x/slashing/go.sum @@ -120,8 +120,8 @@ github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZ 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/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= -github.com/cometbft/cometbft v0.38.5 h1:4lOcK5VTPrfbLOhNHmPYe6c7eDXHtBdMCQuKbAfFJdU= -github.com/cometbft/cometbft v0.38.5/go.mod h1:0tqKin+KQs8zDwzYD8rPHzSBIDNPuB4NrwwGDNb/hUg= +github.com/cometbft/cometbft v0.38.6 h1:QSgpCzrGWJ2KUq1qpw+FCfASRpE27T6LQbfEHscdyOk= +github.com/cometbft/cometbft v0.38.6/go.mod h1:8rSPxzUJYquCN8uuBgbUHOMg2KAwvr7CyUw+6ukO4nw= github.com/cometbft/cometbft-db v0.8.0 h1:vUMDaH3ApkX8m0KZvOFFy9b5DZHBAjsnEuo9AKVZpjo= github.com/cometbft/cometbft-db v0.8.0/go.mod h1:6ASCP4pfhmrCBpfk01/9E1SI29nD3HfVHrY4PG8x5c0= github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= diff --git a/x/staking/go.mod b/x/staking/go.mod index 51574a695cb1..d2e52c3fbca4 100644 --- a/x/staking/go.mod +++ b/x/staking/go.mod @@ -12,7 +12,7 @@ require ( cosmossdk.io/math v1.3.0 cosmossdk.io/store v1.0.2 cosmossdk.io/x/accounts v0.0.0-00010101000000-000000000000 // indirect - github.com/cometbft/cometbft v0.38.5 + github.com/cometbft/cometbft v0.38.6 github.com/cosmos/cosmos-proto v1.0.0-beta.4 github.com/cosmos/cosmos-sdk v0.51.0 github.com/cosmos/gogoproto v1.4.11 diff --git a/x/staking/go.sum b/x/staking/go.sum index 119c6de469be..046ebfecd550 100644 --- a/x/staking/go.sum +++ b/x/staking/go.sum @@ -118,8 +118,8 @@ github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZ 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/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= -github.com/cometbft/cometbft v0.38.5 h1:4lOcK5VTPrfbLOhNHmPYe6c7eDXHtBdMCQuKbAfFJdU= -github.com/cometbft/cometbft v0.38.5/go.mod h1:0tqKin+KQs8zDwzYD8rPHzSBIDNPuB4NrwwGDNb/hUg= +github.com/cometbft/cometbft v0.38.6 h1:QSgpCzrGWJ2KUq1qpw+FCfASRpE27T6LQbfEHscdyOk= +github.com/cometbft/cometbft v0.38.6/go.mod h1:8rSPxzUJYquCN8uuBgbUHOMg2KAwvr7CyUw+6ukO4nw= github.com/cometbft/cometbft-db v0.8.0 h1:vUMDaH3ApkX8m0KZvOFFy9b5DZHBAjsnEuo9AKVZpjo= github.com/cometbft/cometbft-db v0.8.0/go.mod h1:6ASCP4pfhmrCBpfk01/9E1SI29nD3HfVHrY4PG8x5c0= github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= diff --git a/x/upgrade/go.mod b/x/upgrade/go.mod index 31811c5113a0..5e3ad6c9ac12 100644 --- a/x/upgrade/go.mod +++ b/x/upgrade/go.mod @@ -11,7 +11,7 @@ require ( cosmossdk.io/store v1.0.2 cosmossdk.io/x/auth v0.0.0-00010101000000-000000000000 cosmossdk.io/x/gov v0.0.0-20230925135524-a1bc045b3190 - github.com/cometbft/cometbft v0.38.5 + github.com/cometbft/cometbft v0.38.6 github.com/cosmos/cosmos-db v1.0.2 github.com/cosmos/cosmos-proto v1.0.0-beta.4 github.com/cosmos/cosmos-sdk v0.51.0 diff --git a/x/upgrade/go.sum b/x/upgrade/go.sum index 0de07a6c87d6..d3f21be0cced 100644 --- a/x/upgrade/go.sum +++ b/x/upgrade/go.sum @@ -320,8 +320,8 @@ github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZ 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/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= -github.com/cometbft/cometbft v0.38.5 h1:4lOcK5VTPrfbLOhNHmPYe6c7eDXHtBdMCQuKbAfFJdU= -github.com/cometbft/cometbft v0.38.5/go.mod h1:0tqKin+KQs8zDwzYD8rPHzSBIDNPuB4NrwwGDNb/hUg= +github.com/cometbft/cometbft v0.38.6 h1:QSgpCzrGWJ2KUq1qpw+FCfASRpE27T6LQbfEHscdyOk= +github.com/cometbft/cometbft v0.38.6/go.mod h1:8rSPxzUJYquCN8uuBgbUHOMg2KAwvr7CyUw+6ukO4nw= github.com/cometbft/cometbft-db v0.8.0 h1:vUMDaH3ApkX8m0KZvOFFy9b5DZHBAjsnEuo9AKVZpjo= github.com/cometbft/cometbft-db v0.8.0/go.mod h1:6ASCP4pfhmrCBpfk01/9E1SI29nD3HfVHrY4PG8x5c0= github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= From 6b1e9fc14866c513ec6e337f2116abde62e0451c Mon Sep 17 00:00:00 2001 From: Qt Date: Sat, 16 Mar 2024 00:46:00 +0800 Subject: [PATCH 30/30] refactor(store/db): remove unnecessary code and correct error handling (#19763) --- store/db/goleveldb.go | 83 +++++++++++++++---------------------------- 1 file changed, 29 insertions(+), 54 deletions(-) diff --git a/store/db/goleveldb.go b/store/db/goleveldb.go index 667f45eef10f..64f1a10384d4 100644 --- a/store/db/goleveldb.go +++ b/store/db/goleveldb.go @@ -2,6 +2,7 @@ package db import ( "bytes" + "errors" "fmt" "path/filepath" @@ -15,7 +16,7 @@ import ( corestore "cosmossdk.io/core/store" "cosmossdk.io/store/v2" - "cosmossdk.io/store/v2/errors" + storeerrors "cosmossdk.io/store/v2/errors" ) // GoLevelDB implements RawDB using github.com/syndtr/goleveldb/leveldb. @@ -46,20 +47,17 @@ func NewGoLevelDBWithOpts(name, dir string, o *opt.Options) (*GoLevelDB, error) if err != nil { return nil, err } - database := &GoLevelDB{ - db: db, - } - return database, nil + return &GoLevelDB{db: db}, nil } // Get implements RawDB. func (db *GoLevelDB) Get(key []byte) ([]byte, error) { if len(key) == 0 { - return nil, errors.ErrKeyEmpty + return nil, storeerrors.ErrKeyEmpty } res, err := db.db.Get(key, nil) if err != nil { - if err == dberrors.ErrNotFound { + if errors.Is(err, dberrors.ErrNotFound) { return nil, nil } return nil, err @@ -69,62 +67,45 @@ func (db *GoLevelDB) Get(key []byte) ([]byte, error) { // Has implements RawDB. func (db *GoLevelDB) Has(key []byte) (bool, error) { - bytes, err := db.Get(key) - if err != nil { - return false, err - } - return bytes != nil, nil + return db.db.Has(key, nil) } // Set implements RawDB. func (db *GoLevelDB) Set(key, value []byte) error { if len(key) == 0 { - return errors.ErrKeyEmpty + return storeerrors.ErrKeyEmpty } if value == nil { - return errors.ErrValueNil - } - if err := db.db.Put(key, value, nil); err != nil { - return err + return storeerrors.ErrValueNil } - return nil + return db.db.Put(key, value, nil) } // SetSync implements RawDB. func (db *GoLevelDB) SetSync(key, value []byte) error { if len(key) == 0 { - return errors.ErrKeyEmpty + return storeerrors.ErrKeyEmpty } if value == nil { - return errors.ErrValueNil - } - if err := db.db.Put(key, value, &opt.WriteOptions{Sync: true}); err != nil { - return err + return storeerrors.ErrValueNil } - return nil + return db.db.Put(key, value, &opt.WriteOptions{Sync: true}) } // Delete implements RawDB. func (db *GoLevelDB) Delete(key []byte) error { if len(key) == 0 { - return errors.ErrKeyEmpty - } - if err := db.db.Delete(key, nil); err != nil { - return err + return storeerrors.ErrKeyEmpty } - return nil + return db.db.Delete(key, nil) } // DeleteSync implements RawDB. func (db *GoLevelDB) DeleteSync(key []byte) error { if len(key) == 0 { - return errors.ErrKeyEmpty - } - err := db.db.Delete(key, &opt.WriteOptions{Sync: true}) - if err != nil { - return err + return storeerrors.ErrKeyEmpty } - return nil + return db.db.Delete(key, &opt.WriteOptions{Sync: true}) } func (db *GoLevelDB) RawDB() *leveldb.DB { @@ -133,10 +114,7 @@ func (db *GoLevelDB) RawDB() *leveldb.DB { // Close implements RawDB. func (db *GoLevelDB) Close() error { - if err := db.db.Close(); err != nil { - return err - } - return nil + return db.db.Close() } // Print implements RawDB. @@ -171,8 +149,7 @@ func (db *GoLevelDB) Stats() map[string]string { stats := make(map[string]string) for _, key := range keys { - str, err := db.db.GetProperty(key) - if err == nil { + if str, err := db.db.GetProperty(key); err == nil { stats[key] = str } } @@ -196,7 +173,7 @@ func (db *GoLevelDB) NewBatchWithSize(size int) store.RawBatch { // Iterator implements RawDB. func (db *GoLevelDB) Iterator(start, end []byte) (corestore.Iterator, error) { if (start != nil && len(start) == 0) || (end != nil && len(end) == 0) { - return nil, errors.ErrKeyEmpty + return nil, storeerrors.ErrKeyEmpty } itr := db.db.NewIterator(&util.Range{Start: start, Limit: end}, nil) return newGoLevelDBIterator(itr, start, end, false), nil @@ -205,7 +182,7 @@ func (db *GoLevelDB) Iterator(start, end []byte) (corestore.Iterator, error) { // ReverseIterator implements RawDB. func (db *GoLevelDB) ReverseIterator(start, end []byte) (corestore.Iterator, error) { if (start != nil && len(start) == 0) || (end != nil && len(end) == 0) { - return nil, errors.ErrKeyEmpty + return nil, storeerrors.ErrKeyEmpty } itr := db.db.NewIterator(&util.Range{Start: start, Limit: end}, nil) return newGoLevelDBIterator(itr, start, end, true), nil @@ -226,8 +203,7 @@ func newGoLevelDBIterator(source iterator.Iterator, start, end []byte, isReverse if end == nil { source.Last() } else { - valid := source.Seek(end) - if valid { + if source.Seek(end) { eoakey := source.Key() // end or after key if bytes.Compare(end, eoakey) <= 0 { source.Prev() @@ -364,13 +340,13 @@ func newGoLevelDBBatchWithSize(db *GoLevelDB, size int) *goLevelDBBatch { // Set implements RawBatch. func (b *goLevelDBBatch) Set(key, value []byte) error { if len(key) == 0 { - return errors.ErrKeyEmpty + return storeerrors.ErrKeyEmpty } if value == nil { - return errors.ErrValueNil + return storeerrors.ErrValueNil } if b.batch == nil { - return errors.ErrBatchClosed + return storeerrors.ErrBatchClosed } b.batch.Put(key, value) return nil @@ -379,10 +355,10 @@ func (b *goLevelDBBatch) Set(key, value []byte) error { // Delete implements RawBatch. func (b *goLevelDBBatch) Delete(key []byte) error { if len(key) == 0 { - return errors.ErrKeyEmpty + return storeerrors.ErrKeyEmpty } if b.batch == nil { - return errors.ErrBatchClosed + return storeerrors.ErrBatchClosed } b.batch.Delete(key) return nil @@ -400,10 +376,9 @@ func (b *goLevelDBBatch) WriteSync() error { func (b *goLevelDBBatch) write(sync bool) error { if b.batch == nil { - return errors.ErrBatchClosed + return storeerrors.ErrBatchClosed } - err := b.db.db.Write(b.batch, &opt.WriteOptions{Sync: sync}) - if err != nil { + if err := b.db.db.Write(b.batch, &opt.WriteOptions{Sync: sync}); err != nil { return err } // Make sure batch cannot be used afterwards. Callers should still call Close(), for errors. @@ -422,7 +397,7 @@ func (b *goLevelDBBatch) Close() error { // GetByteSize implements RawBatch func (b *goLevelDBBatch) GetByteSize() (int, error) { if b.batch == nil { - return 0, errors.ErrBatchClosed + return 0, storeerrors.ErrBatchClosed } return len(b.batch.Dump()), nil }