diff --git a/x/igp/keeper/msg_server_test.go b/x/igp/keeper/msg_server_test.go index be9451e..91606eb 100644 --- a/x/igp/keeper/msg_server_test.go +++ b/x/igp/keeper/msg_server_test.go @@ -1,7 +1,6 @@ package keeper_test import ( - "encoding/hex" "fmt" "math/big" "math/rand" @@ -667,16 +666,6 @@ func (suite *KeeperTestSuite) SetupIsm() { } } -func (suite *KeeperTestSuite) getTestMessageMetadata(index int) (message []byte, metadata []byte) { - var err error - message, err = hex.DecodeString(messages[index]) - suite.Require().NoError(err) - - metadata, err = hex.DecodeString(metadatas[index]) - suite.Require().NoError(err) - return -} - func (suite *KeeperTestSuite) VerifyMessage(message []byte, metadata []byte) (bool, error) { // Verify Merkle Proof & Validator signature (for LegacyMultiSig). TODO: Ask Steve why this isn't the case for other MultiSigs. return ismMap[common.Origin(message)].Verify(metadata, message) diff --git a/x/igp/keeper/test_data_test.go b/x/igp/keeper/test_data_test.go index cb2b886..7c41e45 100644 --- a/x/igp/keeper/test_data_test.go +++ b/x/igp/keeper/test_data_test.go @@ -22,15 +22,6 @@ var messages = [...]string{ "000000045a000000010000000000000000000000009311cee522a7c122b843b66cc31c6a63e2f926410000a86a0000000000000000000000002a925cd8a5d919c5c6599633090c37fe38a561b648656c6c6f21", } -var metadatas = [...]string{ - "aa5797134051585ace61aff064b5381fa8968e30052e17ddeb94b17a9274475f00000e4900000000000000000000000035231d4c2d8b8adcb5617a638a0c4548684c7c70cb37d17e971e972f318cc549147645fd58b9a2e38389abd67f34b4983a9494caad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5b4c11951957c6f8f642c4af61cd6b24640fec6dc7fc607ee8206a99e92410d30673e29464ce0d8d6448690c1bb00df55826aa341c01c6409f31669de22523987e58769b32a1beaf1ea27375a44095a0d1fb664ce2dd358e7fcbfb78c26a193440eb01ebfc9ed27500cd4dfc979272d1f0913cc9f66540d7e8005811109e1cf2d5158932e6950edfdfec29a2628b0d2af699f425f3ab05cf10171ddfb379e13a2ffd70157e48063fc33c97a050f7f640233bf646cc98d9524c6b92bcf3ab56f839867cc5f7f196b93bae1e27e6320742445d290f2263827498b54fec539f756af49571f110407b5132f3e389dc1a4dc03105ae45c712c4cf7c88addb18f6d77e76f048f148a337b45a8382297684b204b2cfea33b0a3925a674151d574be7f7a972ddae13b46ee19a90fe53a7480c70b26db0c9c5eca759e69ce0ff3984f2561b3490c6ceeb450aecdc82e28293031d10c7d73bf85e57bf041a97360aa2c5d99cc1df82d9c4b87413eae2ef048f94b4d3554cea73d92b0f7af96e0271c691e2bb5c67add7c6caf302256adedf7ab114da0acfe870d449a3a489f781d659e8beccda7bce9f4e8618b6bd2f4132ce798cdc7a60e7e1460a7299e3c6342a579626d22733e50f526ec2fa19a22b31e8ed50f23cd1fdf94c9154ed3a7609a2f1ff981fe1d3b5c807b281e4683cc6d6315cf95b9ade8641defcb32372f1c126e398ef7a5a2dce0a8a7f68bb74560f8f71837c2c2ebbcbf7fffb42ae1896f13f7c7479a0b46a28b6f55540f89444f63de0378e3d121be09e06cc9ded1c20e65876d36aa0c65e9645644786b620e2dd2ad648ddfcbf4a7e5b1a3a4ecfe7f64667a3f0b7e2f4418588ed35a2458cffeb39b93d26f18d2ab13bdce6aee58e7b99359ec2dfd95a9c16dc00d6ef18b7933a6f8dc65ccb55667138776f7dea101070dc8796e3774df84f40ae0c8229d0d6069e5c8f39a7c299677a09d367fc7b05e3bc380ee652cdc72595f74c7b1043d0e1ffbab734648c838dfb0527d971b602bc216c9619ef0abf5ac974a1ed57f4050aa510dd9c74f508277b39d7973bb2dfccc5eeb0618db8cd74046ff337f0a7bf2c8e03e10f642c1886798d71806ab1e888d9e5ee87d0838c5655cb21c6cb83313b5a631175dff4963772cce9108188b34ac87c81c41e662ee4dd2dd7b2bc707961b1e646c4047669dcb6584f0d8d770daf5d7e7deb2e388ab20e2573d171a88108e79d820e98f26c0b84aa8b2f4aa4968dbb818ea32293237c50ba75ee485f4c22adf2f741400bdf8d6a9cc7df7ecae576221665d7358448818bb4ae4562849e949e17ac16e0be16688e156b5cf15e098c627c0056a9042a23422ae6e547c23411de0211969a9139252907b5df59aaa25030a379c79db22bda4c87ab45e566b83f1a3f22ecb1502f416e1c54b61bc6036606b5edbe805e1cf6959c69b24748b24e6fae0e815bbd9ecdafb277dfc1d674310499ee3e3f05e81c25a0f19d3f0bc63c092e31b7ce60da799021eb275751a279da73edd0aca26d1c5ecf5056602360d99759a14e36213af02282bb84f3a13d9d319c486b37942ab16e0d6f86b11129ed9e125aada97ce29677830195c0a416b43b27e0643014be481c5105b6904d1aaee579aadf30a2ebbe7b267f820be207a151b6936207d8682cbb40352f7c5ebba55127d57b580eb06a904364c362cb533d383c97542f1e97a8f01c0000000000000000000000009f2296d5cfc6b5176adc7716c7596898ded13d35000000000000000000000000fa174eb2b4921bb652bc1ada3e8b00e7e280bf3c000000000000000000000000aff4718d5d637466ad07441ee3b7c4af8e328dbd0000000000000000000000009c10bbe8efa03a8f49dfdb5c549258e3a8dca09700000000000000000000000062144d4a52a0a0335ea5bb84392ef9912461d9dd000000000000000000000000c64d1efeab8ae222bc889fe669f75d21b23005d9", - "5f9f938d58ba3a96a12f1eb278bec940f84ab45c2380a39cb4696f28172abfb000000e2d00000000000000000000000035231d4c2d8b8adcb5617a638a0c4548684c7c709306d6efa4eac3dc4dbdae95b71dbd5e61e1174ecc9962b4310740b9ee9af6aaad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5b03aa382b80e49a0bf0c9192bfd9829c5d09114ad44bc169e071b87bc9fd78d0fb10a575f53b5e95ed4d13ecf5617c2dd70862f2c39ef87e6ff798e08be89f52e58769b32a1beaf1ea27375a44095a0d1fb664ce2dd358e7fcbfb78c26a193441b77441305b28a344d4c3704b5d946ab11b69a56953128901e9b1163e684cc2c887c22bd8750d34016ac3c66b5ff102dacdd73f6b014e710b51e8022af9a1968ffd70157e48063fc33c97a050f7f640233bf646cc98d9524c6b92bcf3ab56f839867cc5f7f196b93bae1e27e6320742445d290f2263827498b54fec539f756af49571f110407b5132f3e389dc1a4dc03105ae45c712c4cf7c88addb18f6d77e76f048f148a337b45a8382297684b204b2cfea33b0a3925a674151d574be7f7a972ddae13b46ee19a90fe53a7480c70b26db0c9c5eca759e69ce0ff3984f2561b3490c6ceeb450aecdc82e28293031d10c7d73bf85e57bf041a97360aa2c5d99cc1df82d9c4b87413eae2ef048f94b4d3554cea73d92b0f7af96e0271c691e2bb5c67add7c6caf302256adedf7ab114da0acfe870d449a3a489f781d659e8beccda7bce9f4e8618b6bd2f4132ce798cdc7a60e7e1460a7299e3c6342a579626d22733e50f526ec2fa19a22b31e8ed50f23cd1fdf94c9154ed3a7609a2f1ff981fe1d3b5c807b281e4683cc6d6315cf95b9ade8641defcb32372f1c126e398ef7a5a2dce0a8a7f68bb74560f8f71837c2c2ebbcbf7fffb42ae1896f13f7c7479a0b46a28b6f55540f89444f63de0378e3d121be09e06cc9ded1c20e65876d36aa0c65e9645644786b620e2dd2ad648ddfcbf4a7e5b1a3a4ecfe7f64667a3f0b7e2f4418588ed35a2458cffeb39b93d26f18d2ab13bdce6aee58e7b99359ec2dfd95a9c16dc00d6ef18b7933a6f8dc65ccb55667138776f7dea101070dc8796e3774df84f40ae0c8229d0d6069e5c8f39a7c299677a09d367fc7b05e3bc380ee652cdc72595f74c7b1043d0e1ffbab734648c838dfb0527d971b602bc216c9619ef0abf5ac974a1ed57f4050aa510dd9c74f508277b39d7973bb2dfccc5eeb0618db8cd74046ff337f0a7bf2c8e03e10f642c1886798d71806ab1e888d9e5ee87d0838c5655cb21c6cb83313b5a631175dff4963772cce9108188b34ac87c81c41e662ee4dd2dd7b2bc707961b1e646c4047669dcb6584f0d8d770daf5d7e7deb2e388ab20e2573d171a88108e79d820e98f26c0b84aa8b2f4aa4968dbb818ea32293237c50ba75ee485f4c22adf2f741400bdf8d6a9cc7df7ecae576221665d7358448818bb4ae4562849e949e17ac16e0be16688e156b5cf15e098c627c0056a904347d1ff8eb70c75a1aa99fabda94f1aba6444c5bb8234775e87c0d0c9eca07256f6923ce2982dd92c7c8d5d669a7d2333f6e0bbdcec39bc4259f3a90b0c868161c912a8f93cc2147e0f33b4d045f074b93d6e50bc272a0d757f3e0847c52b371901a6991463e9f43b20b5ea5b801406e9b2ad5c3da67b9f501b472000088c4c7481c233e8c9080ccc31e528d074b01005e7e9224e4b30d8fd981289a34560981d5c6435ae7ca9db3c0cb597bb71684c393527ec252713fa4e410c0e6cf8cd5f9d40d1cf9f5d63e21cadeaac84556fb13537812698bdd0189e3af849264aa2e6392fdcc237ea769f1db013abd63bb098dbb6f0a060f1455125909aee72b1afb2f3a9dc91b0000000000000000000000009f2296d5cfc6b5176adc7716c7596898ded13d35000000000000000000000000fa174eb2b4921bb652bc1ada3e8b00e7e280bf3c000000000000000000000000aff4718d5d637466ad07441ee3b7c4af8e328dbd0000000000000000000000009c10bbe8efa03a8f49dfdb5c549258e3a8dca09700000000000000000000000062144d4a52a0a0335ea5bb84392ef9912461d9dd000000000000000000000000c64d1efeab8ae222bc889fe669f75d21b23005d9", - "da76ce05bb8a40d7001d884f98d7182780b3f9036b5f313fd65cb8d57ae8c80e00000e6600000000000000000000000035231d4c2d8b8adcb5617a638a0c4548684c7c700000000000000000000000000000000000000000000000000000000000000000138e3e9ae545ec3233e47716dc877999892556646669bd723fc5e231adf6abec82f617fb07d56048212c6d49b248f700f4ed25fd9ad10d4b3110b3f3366efe1021ddb9a356815c3fac1026b6dec5df3124afbadb485c9ba5a3e3398a04b7ba85e58769b32a1beaf1ea27375a44095a0d1fb664ce2dd358e7fcbfb78c26a193447429e44068a0031f8a614d404feb2bef3bc9491b7593faeb38fdc072eb59952d58ab28d85294e81dc2da5f8c54d9dc264ab27a3948846ed4700b99a1139d03eaffd70157e48063fc33c97a050f7f640233bf646cc98d9524c6b92bcf3ab56f839867cc5f7f196b93bae1e27e6320742445d290f2263827498b54fec539f756af397530372afa581ca3b317777b92fd2a2e8acad2aabd2e4f6149ff333cff6123aadcf517b917ff76e4c0d12290b7a422ce6d3d3e82252e8b4491f4b4b08c1deaf7010463b1d2ef2759627225449505d22e3483c6e7c28a2e4277800fd9c611cc3490c6ceeb450aecdc82e28293031d10c7d73bf85e57bf041a97360aa2c5d99cc1df82d9c4b87413eae2ef048f94b4d3554cea73d92b0f7af96e0271c691e2bb5c67add7c6caf302256adedf7ab114da0acfe870d449a3a489f781d659e8beccda7bce9f4e8618b6bd2f4132ce798cdc7a60e7e1460a7299e3c6342a579626d22733e50f526ec2fa19a22b31e8ed50f23cd1fdf94c9154ed3a7609a2f1ff981fe1d3b5c807b281e4683cc6d6315cf95b9ade8641defcb32372f1c126e398ef7a5a2dce0a8a7f68bb74560f8f71837c2c2ebbcbf7fffb42ae1896f13f7c7479a0b46a28b6f55540f89444f63de0378e3d121be09e06cc9ded1c20e65876d36aa0c65e9645644786b620e2dd2ad648ddfcbf4a7e5b1a3a4ecfe7f64667a3f0b7e2f4418588ed35a2458cffeb39b93d26f18d2ab13bdce6aee58e7b99359ec2dfd95a9c16dc00d6ef18b7933a6f8dc65ccb55667138776f7dea101070dc8796e3774df84f40ae0c8229d0d6069e5c8f39a7c299677a09d367fc7b05e3bc380ee652cdc72595f74c7b1043d0e1ffbab734648c838dfb0527d971b602bc216c9619ef0abf5ac974a1ed57f4050aa510dd9c74f508277b39d7973bb2dfccc5eeb0618db8cd74046ff337f0a7bf2c8e03e10f642c1886798d71806ab1e888d9e5ee87d0838c5655cb21c6cb83313b5a631175dff4963772cce9108188b34ac87c81c41e662ee4dd2dd7b2bc707961b1e646c4047669dcb6584f0d8d770daf5d7e7deb2e388ab20e2573d171a88108e79d820e98f26c0b84aa8b2f4aa4968dbb818ea32293237c50ba75ee485f4c22adf2f741400bdf8d6a9cc7df7ecae576221665d7358448818bb4ae4562849e949e17ac16e0be16688e156b5cf15e098c627c0056a904e70c3cb1b6654234cd1bda367452d720a4cac3c847376a86dcdea4e3676f76595b137e377a7dce6844a2edb6bf35289110484380eab313fc8babcee6cefea7a41ba622692316fd8524a4adad4d1770f184fc8a6303ba1e598c40dfd33d07e0b2423ea6f02aea5c9eff0c015aab024c0db728c0f3b1bdbedc3920826b5a0e0918961c461af8021c0e8474d7347dc367444f270bd4b8a12e5720f5405a78b4db09621c6adb300a2bf691c7ec2541afe1044a7ef69673268207339e6cb2e8275b69eed71c754fea7760a550f74f90eca32d2fd133783e964cb99d144e39b9dde32f6a338867ac8c0dc491c3628bbc9ad00e233db63b2929ad512de9f9b498d9019aac95111c000000000000000000000000bcb815f38d481a5eba4d7ac4c9e74d9d0fc2a7e700000000000000000000000025c6779d4610f940bf2488732e10bcffb9d36f810000000000000000000000009856dcb10fd6e5407fa74b5ab1d3b96cc193e9b7000000000000000000000000d839424e2e5ace0a81152298dc2b1e3bb3c7fb20000000000000000000000000b8085c954b75b7088bcce69e61d12fcef797cd8d000000000000000000000000505dff4e0827aa5065f5e001db888e0569d46490", - "7fe20784b47206e5ec1e0d7e8188864b5e274769b49d098e4d96caedece4a07900000e4900000000000000000000000035231d4c2d8b8adcb5617a638a0c4548684c7c708fc2a8ab37c064cc3dee1a96ad5c293a004fdd1f42e9584e7250a41a17147a12ad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5b4c11951957c6f8f642c4af61cd6b24640fec6dc7fc607ee8206a99e92410d3043a283fae5b3ba44157f0dc6c9f4abdc9acf55edaa8b600e0d9d9f6a82e709ade58769b32a1beaf1ea27375a44095a0d1fb664ce2dd358e7fcbfb78c26a193440eb01ebfc9ed27500cd4dfc979272d1f0913cc9f66540d7e8005811109e1cf2d58ab28d85294e81dc2da5f8c54d9dc264ab27a3948846ed4700b99a1139d03eaffd70157e48063fc33c97a050f7f640233bf646cc98d9524c6b92bcf3ab56f839867cc5f7f196b93bae1e27e6320742445d290f2263827498b54fec539f756af397530372afa581ca3b317777b92fd2a2e8acad2aabd2e4f6149ff333cff6123aadcf517b917ff76e4c0d12290b7a422ce6d3d3e82252e8b4491f4b4b08c1deaf7010463b1d2ef2759627225449505d22e3483c6e7c28a2e4277800fd9c611cc3490c6ceeb450aecdc82e28293031d10c7d73bf85e57bf041a97360aa2c5d99cc1df82d9c4b87413eae2ef048f94b4d3554cea73d92b0f7af96e0271c691e2bb5c67add7c6caf302256adedf7ab114da0acfe870d449a3a489f781d659e8beccda7bce9f4e8618b6bd2f4132ce798cdc7a60e7e1460a7299e3c6342a579626d22733e50f526ec2fa19a22b31e8ed50f23cd1fdf94c9154ed3a7609a2f1ff981fe1d3b5c807b281e4683cc6d6315cf95b9ade8641defcb32372f1c126e398ef7a5a2dce0a8a7f68bb74560f8f71837c2c2ebbcbf7fffb42ae1896f13f7c7479a0b46a28b6f55540f89444f63de0378e3d121be09e06cc9ded1c20e65876d36aa0c65e9645644786b620e2dd2ad648ddfcbf4a7e5b1a3a4ecfe7f64667a3f0b7e2f4418588ed35a2458cffeb39b93d26f18d2ab13bdce6aee58e7b99359ec2dfd95a9c16dc00d6ef18b7933a6f8dc65ccb55667138776f7dea101070dc8796e3774df84f40ae0c8229d0d6069e5c8f39a7c299677a09d367fc7b05e3bc380ee652cdc72595f74c7b1043d0e1ffbab734648c838dfb0527d971b602bc216c9619ef0abf5ac974a1ed57f4050aa510dd9c74f508277b39d7973bb2dfccc5eeb0618db8cd74046ff337f0a7bf2c8e03e10f642c1886798d71806ab1e888d9e5ee87d0838c5655cb21c6cb83313b5a631175dff4963772cce9108188b34ac87c81c41e662ee4dd2dd7b2bc707961b1e646c4047669dcb6584f0d8d770daf5d7e7deb2e388ab20e2573d171a88108e79d820e98f26c0b84aa8b2f4aa4968dbb818ea32293237c50ba75ee485f4c22adf2f741400bdf8d6a9cc7df7ecae576221665d7358448818bb4ae4562849e949e17ac16e0be16688e156b5cf15e098c627c0056a90477d84c02778c05caaa5c74423f8ca609188d2d5c0a4e3652a98d87068adaa8df705f5c5f6dc7065077ae03f35f7b28b11b78a2e7409e354eed585084e58474f81ba2dcbd2869cfe2c0aedcae55afc9a930afd9076a0770874cada0d3abe8f04fe922fa0c2004189b014efbd0726a7d96e442152be1de1e9959bb5b21802ef5e4981cc190ec75b38319101cbbc7784c0e41f54660641778d3adad3fa852c5b6bf1c1701a265c5f6b68b2b189b7461df7bac5d46512a8350d0bc28a73138f0b010bc301c12b7906a5471458edc0bc748ec176fef860da21279010e613017b0d6fe13e6c35b11971c5a5d1b76fd0dd950cb90fd804926886179503d18f853562f4fb1688e1c000000000000000000000000bcb815f38d481a5eba4d7ac4c9e74d9d0fc2a7e700000000000000000000000025c6779d4610f940bf2488732e10bcffb9d36f810000000000000000000000009856dcb10fd6e5407fa74b5ab1d3b96cc193e9b7000000000000000000000000d839424e2e5ace0a81152298dc2b1e3bb3c7fb20000000000000000000000000b8085c954b75b7088bcce69e61d12fcef797cd8d000000000000000000000000505dff4e0827aa5065f5e001db888e0569d46490", - "7ec67c4c0c6e5112dea1842e1d2aba9a10a4dd11f9ca742f27d6929e5bdeee710000046200000000000000000000000035231d4c2d8b8adcb5617a638a0c4548684c7c70000000000000000000000000000000000000000000000000000000000000000091f06135f1f5a1ea35f2db0ed56d924b5b60e551681e19de6d83b6c08474d4b5b4c11951957c6f8f642c4af61cd6b24640fec6dc7fc607ee8206a99e92410d3021ddb9a356815c3fac1026b6dec5df3124afbadb485c9ba5a3e3398a04b7ba85e58769b32a1beaf1ea27375a44095a0d1fb664ce2dd358e7fcbfb78c26a193441bb015620548839999a115a1b1a288200c9bf2c55753f7136ad82acbac04f8056e3fb8b75586d0f9c9826b06e6b4408b7e6a55a56830343d0632e03a98e400a8ffd70157e48063fc33c97a050f7f640233bf646cc98d9524c6b92bcf3ab56f839867cc5f7f196b93bae1e27e6320742445d290f2263827498b54fec539f756afcefad4e508c098b9a7e1d8feb19955fb02ba9675585078710969d3440f5054e00f25f5fa494636481b4b00f7d402df0fd4e3474a68241e525a3e94e1b0c23233f8b13a49e282f609c317a833fb8d976d11517c571d1221a265d25af778ecf8923490c6ceeb450aecdc82e28293031d10c7d73bf85e57bf041a97360aa2c5d99cc1df82d9c4b87413eae2ef048f94b4d3554cea73d92b0f7af96e0271c691e2bb5c67add7c6caf302256adedf7ab114da0acfe870d449a3a489f781d659e8beccda7bce9f4e8618b6bd2f4132ce798cdc7a60e7e1460a7299e3c6342a579626d22733e50f526ec2fa19a22b31e8ed50f23cd1fdf94c9154ed3a7609a2f1ff981fe1d3b5c807b281e4683cc6d6315cf95b9ade8641defcb32372f1c126e398ef7a5a2dce0a8a7f68bb74560f8f71837c2c2ebbcbf7fffb42ae1896f13f7c7479a0b46a28b6f55540f89444f63de0378e3d121be09e06cc9ded1c20e65876d36aa0c65e9645644786b620e2dd2ad648ddfcbf4a7e5b1a3a4ecfe7f64667a3f0b7e2f4418588ed35a2458cffeb39b93d26f18d2ab13bdce6aee58e7b99359ec2dfd95a9c16dc00d6ef18b7933a6f8dc65ccb55667138776f7dea101070dc8796e3774df84f40ae0c8229d0d6069e5c8f39a7c299677a09d367fc7b05e3bc380ee652cdc72595f74c7b1043d0e1ffbab734648c838dfb0527d971b602bc216c9619ef0abf5ac974a1ed57f4050aa510dd9c74f508277b39d7973bb2dfccc5eeb0618db8cd74046ff337f0a7bf2c8e03e10f642c1886798d71806ab1e888d9e5ee87d0838c5655cb21c6cb83313b5a631175dff4963772cce9108188b34ac87c81c41e662ee4dd2dd7b2bc707961b1e646c4047669dcb6584f0d8d770daf5d7e7deb2e388ab20e2573d171a88108e79d820e98f26c0b84aa8b2f4aa4968dbb818ea32293237c50ba75ee485f4c22adf2f741400bdf8d6a9cc7df7ecae576221665d7358448818bb4ae4562849e949e17ac16e0be16688e156b5cf15e098c627c0056a904f23ebbb13fa012ad900ba1ab4287387b9d0c37036df7ce8e116e7e5e1166374648f4863da1cf64406faba78bbf82b6f6cc1a90bd7e80e62e16c3b687612d9e5e1b70afdbfd77a373e9a1185540978958024c9e21ab0b720c7db5a1e0a8b36552450c39500efd31bbdb9965767c1e3d2a26d361891058bf18139c995dd8a16d98581c7ee6649c005ea378571498ceacf0793d3c5bd6cae8a27ae15a21b3ae1aa4825d76f6734a876f6cd3b9ab5fc5aed54709e5991a80e4f66bd1b50cb67dfb9368fe1c6981df19fe6ce55299a2b4cd50d1a25605258925857c49a9de04001d43820f314b58cd461b31db94971f4af7671f0781cb235796b3e04d893f562f95bba909451c0000000000000000000000004c327ccb881a7542be77500b2833dc84c839e7b7000000000000000000000000892dc66f5b2f8c438e03f6323394e34a9c24f2d6000000000000000000000000d4c1211f0eefb97a846c4e6d6589832e52fc03db00000000000000000000000084cb373148ef9112b277e68acf676fefa9a9a9a00000000000000000000000000d860c2b28bec3af4fd3a5997283e460ff6f2789000000000000000000000000600c90404d5c9df885404d2cc5350c9b314ea3a2", - "c2e8f82906b56bcaac5af08a5a6fc3f7ce0cfa1c44571826363c9c72a532b30b0000045a00000000000000000000000035231d4c2d8b8adcb5617a638a0c4548684c7c70000000000000000000000000000000000000000000000000000000000000000046cd745fccccae885fcfea0fad4701dcd5a1bb48794c9e8746324a1b530b0314b4c11951957c6f8f642c4af61cd6b24640fec6dc7fc607ee8206a99e92410d30c6f6b7ec8cfe49eb189d8573532d5517fe16e9dca77493f13331e7b41f6263acf9c383ed70c357c3e9157e1a96cc15694e362cfa1e900bfcde8f4dc18005769b0eb01ebfc9ed27500cd4dfc979272d1f0913cc9f66540d7e8005811109e1cf2d6e3fb8b75586d0f9c9826b06e6b4408b7e6a55a56830343d0632e03a98e400a8ffd70157e48063fc33c97a050f7f640233bf646cc98d9524c6b92bcf3ab56f839867cc5f7f196b93bae1e27e6320742445d290f2263827498b54fec539f756afcefad4e508c098b9a7e1d8feb19955fb02ba9675585078710969d3440f5054e00f25f5fa494636481b4b00f7d402df0fd4e3474a68241e525a3e94e1b0c23233f8b13a49e282f609c317a833fb8d976d11517c571d1221a265d25af778ecf8923490c6ceeb450aecdc82e28293031d10c7d73bf85e57bf041a97360aa2c5d99cc1df82d9c4b87413eae2ef048f94b4d3554cea73d92b0f7af96e0271c691e2bb5c67add7c6caf302256adedf7ab114da0acfe870d449a3a489f781d659e8beccda7bce9f4e8618b6bd2f4132ce798cdc7a60e7e1460a7299e3c6342a579626d22733e50f526ec2fa19a22b31e8ed50f23cd1fdf94c9154ed3a7609a2f1ff981fe1d3b5c807b281e4683cc6d6315cf95b9ade8641defcb32372f1c126e398ef7a5a2dce0a8a7f68bb74560f8f71837c2c2ebbcbf7fffb42ae1896f13f7c7479a0b46a28b6f55540f89444f63de0378e3d121be09e06cc9ded1c20e65876d36aa0c65e9645644786b620e2dd2ad648ddfcbf4a7e5b1a3a4ecfe7f64667a3f0b7e2f4418588ed35a2458cffeb39b93d26f18d2ab13bdce6aee58e7b99359ec2dfd95a9c16dc00d6ef18b7933a6f8dc65ccb55667138776f7dea101070dc8796e3774df84f40ae0c8229d0d6069e5c8f39a7c299677a09d367fc7b05e3bc380ee652cdc72595f74c7b1043d0e1ffbab734648c838dfb0527d971b602bc216c9619ef0abf5ac974a1ed57f4050aa510dd9c74f508277b39d7973bb2dfccc5eeb0618db8cd74046ff337f0a7bf2c8e03e10f642c1886798d71806ab1e888d9e5ee87d0838c5655cb21c6cb83313b5a631175dff4963772cce9108188b34ac87c81c41e662ee4dd2dd7b2bc707961b1e646c4047669dcb6584f0d8d770daf5d7e7deb2e388ab20e2573d171a88108e79d820e98f26c0b84aa8b2f4aa4968dbb818ea32293237c50ba75ee485f4c22adf2f741400bdf8d6a9cc7df7ecae576221665d7358448818bb4ae4562849e949e17ac16e0be16688e156b5cf15e098c627c0056a90416ba10348c004f0233942335099a767a092a8a0429de954522ecc2d785a855e8473b1e65bcf6d07ce8d43a6efd60f28a5c8d57be3875489c2245dc4c9243f2381cf43f08a126f1be03fd3d7b6e9221745673b33d3555b81b8a1cfccc70e8f6a68a27dd800507edfe6e8eea9c7fc2e140eb07cdfc06e225840e425203b01c74a55e1cceb2cc15128eb8ba22e3b3c69bc13680787719af5708ecf273138793b9c183a01f39be66b119131a61a222482b5f74e1d3fa03c719d7071d272670cbf03887a61bea0c40b3b397cf2ae4b6dd377957335eb3b1e96971b63df4a873758513f98adc748776cbd8210dd0564b462f8548d0f71a74d4454004c31bb5bdf284499404361c0000000000000000000000004c327ccb881a7542be77500b2833dc84c839e7b7000000000000000000000000892dc66f5b2f8c438e03f6323394e34a9c24f2d6000000000000000000000000d4c1211f0eefb97a846c4e6d6589832e52fc03db00000000000000000000000084cb373148ef9112b277e68acf676fefa9a9a9a00000000000000000000000000d860c2b28bec3af4fd3a5997283e460ff6f2789000000000000000000000000600c90404d5c9df885404d2cc5350c9b314ea3a2", -} - var defaultIsms = []*types.Ism{ { Origin: 1, // Ethereum origin diff --git a/x/ism/keeper/genesis.go b/x/ism/keeper/genesis.go index c936ed8..08603e3 100644 --- a/x/ism/keeper/genesis.go +++ b/x/ism/keeper/genesis.go @@ -42,6 +42,9 @@ func (k Keeper) ExportGenesis(ctx sdk.Context) types.GenesisState { panic(err) } ismAny, err := types.PackAbstractIsm(ism) + if err != nil { + panic(err) + } genesisState.DefaultIsm = append(genesisState.DefaultIsm, types.Ism{ Origin: uint32(origin), AbstractIsm: ismAny, diff --git a/x/ism/types/errors.go b/x/ism/types/errors.go index 2407354..390afa2 100644 --- a/x/ism/types/errors.go +++ b/x/ism/types/errors.go @@ -1,6 +1,6 @@ package types -import sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +import sdkerrors "cosmossdk.io/errors" var ( ErrInvalid = sdkerrors.Register(ModuleName, 1, "invalid") diff --git a/x/ism/types/message_id_multisig/metadata_test.go b/x/ism/types/message_id_multisig/metadata_test.go index db01437..43f58da 100644 --- a/x/ism/types/message_id_multisig/metadata_test.go +++ b/x/ism/types/message_id_multisig/metadata_test.go @@ -15,7 +15,6 @@ type MultisigIsmMetadata struct { Index uint32 OriginMailbox []byte Proof []byte - signatures [][]byte } func TestMetadataSuccess(t *testing.T) { diff --git a/x/mailbox/bindings/message_plugin.go b/x/mailbox/bindings/message_plugin.go index ddc1638..948f100 100644 --- a/x/mailbox/bindings/message_plugin.go +++ b/x/mailbox/bindings/message_plugin.go @@ -3,10 +3,10 @@ package bindings import ( "encoding/json" + sdkerrors "cosmossdk.io/errors" wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" wasmvmtypes "github.com/CosmWasm/wasmvm/types" sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" bindingstypes "github.com/strangelove-ventures/hyperlane-cosmos/x/mailbox/bindings/types" mailboxkeeper "github.com/strangelove-ventures/hyperlane-cosmos/x/mailbox/keeper" diff --git a/x/mailbox/keeper/genesis.go b/x/mailbox/keeper/genesis.go index 7f91a08..6f575a4 100644 --- a/x/mailbox/keeper/genesis.go +++ b/x/mailbox/keeper/genesis.go @@ -21,7 +21,10 @@ func (k *Keeper) InitGenesis(ctx sdk.Context, gs types.GenesisState) error { } var index uint32 for index = 0; index < gs.Tree.Count; index++ { - k.Tree.Insert(tempTree[index]) + err := k.Tree.Insert(tempTree[index]) + if err != nil { + panic("unreachable") + } } for _, msgDelivered := range gs.DeliveredMessages { k.Delivered[msgDelivered.Id] = true diff --git a/x/mailbox/keeper/keeper_test.go b/x/mailbox/keeper/keeper_test.go index 9545936..ccbcebd 100644 --- a/x/mailbox/keeper/keeper_test.go +++ b/x/mailbox/keeper/keeper_test.go @@ -14,17 +14,13 @@ import ( "github.com/strangelove-ventures/hyperlane-cosmos/x/mailbox/types" "github.com/stretchr/testify/suite" - - ismkeeper "github.com/strangelove-ventures/hyperlane-cosmos/x/ism/keeper" ) type KeeperTestSuite struct { suite.Suite ctx sdk.Context - ismctx sdk.Context keeper keeper.Keeper - ismkeeper ismkeeper.Keeper queryClient types.QueryClient msgServer types.MsgServer diff --git a/x/mailbox/types/errors.go b/x/mailbox/types/errors.go index a619b0e..307f185 100644 --- a/x/mailbox/types/errors.go +++ b/x/mailbox/types/errors.go @@ -1,6 +1,6 @@ package types -import sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +import sdkerrors "cosmossdk.io/errors" var ( ErrInvalid = sdkerrors.Register(ModuleName, 1, "invalid")