Quellcode durchsuchen

implement sei deployer

0xfirefist vor 2 Jahren
Ursprung
Commit
8b04f55490

+ 481 - 0
target_chains/cosmwasm/tools/package-lock.json

@@ -14,6 +14,7 @@
         "@injectivelabs/networks": "^1.0.55",
         "@injectivelabs/sdk-ts": "^1.0.354",
         "@injectivelabs/utils": "^1.0.47",
+        "@sei-js/proto": "^1.1.6",
         "@terra-money/terra.js": "^3.1.3",
         "chain-registry": "^1.6.0",
         "cosmjs-utils": "^0.1.0",
@@ -1512,6 +1513,230 @@
         "node": ">= 8"
       }
     },
+    "node_modules/@osmonauts/helpers": {
+      "version": "0.6.0",
+      "resolved": "https://registry.npmjs.org/@osmonauts/helpers/-/helpers-0.6.0.tgz",
+      "integrity": "sha512-l62tWR/0W4R+5wRvMeRK0zlaJ8WZhULKsQAZ7kNzggL0pbndIAV+0BJ/jEBbNletoeGtuV8rpi6Wo+w+RmtZGw==",
+      "dependencies": {
+        "@babel/runtime": "^7.18.9",
+        "@cosmjs/amino": "0.28.13",
+        "@cosmjs/crypto": "0.28.13",
+        "@cosmjs/proto-signing": "0.28.13",
+        "@cosmjs/stargate": "0.28.13",
+        "cosmjs-types": "0.5.1",
+        "long": "^5.2.0",
+        "protobufjs": "^6.11.3"
+      }
+    },
+    "node_modules/@osmonauts/helpers/node_modules/@cosmjs/amino": {
+      "version": "0.28.13",
+      "resolved": "https://registry.npmjs.org/@cosmjs/amino/-/amino-0.28.13.tgz",
+      "integrity": "sha512-IHnH2zGwaY69qT4mVAavr/pfzx6YE+ud1NHJbvVePlbGiz68CXTi5LHR+K0lrKB5mQ7E+ZErWz2mw5U/x+V1wQ==",
+      "dependencies": {
+        "@cosmjs/crypto": "0.28.13",
+        "@cosmjs/encoding": "0.28.13",
+        "@cosmjs/math": "0.28.13",
+        "@cosmjs/utils": "0.28.13"
+      }
+    },
+    "node_modules/@osmonauts/helpers/node_modules/@cosmjs/crypto": {
+      "version": "0.28.13",
+      "resolved": "https://registry.npmjs.org/@cosmjs/crypto/-/crypto-0.28.13.tgz",
+      "integrity": "sha512-ynKfM0q/tMBQMHJby6ad8lR3gkgBKaelQhIsCZTjClsnuC7oYT9y3ThSZCUWr7Pa9h0J8ahU2YV2oFWFVWJQzQ==",
+      "dependencies": {
+        "@cosmjs/encoding": "0.28.13",
+        "@cosmjs/math": "0.28.13",
+        "@cosmjs/utils": "0.28.13",
+        "@noble/hashes": "^1",
+        "bn.js": "^5.2.0",
+        "elliptic": "^6.5.3",
+        "libsodium-wrappers": "^0.7.6"
+      }
+    },
+    "node_modules/@osmonauts/helpers/node_modules/@cosmjs/encoding": {
+      "version": "0.28.13",
+      "resolved": "https://registry.npmjs.org/@cosmjs/encoding/-/encoding-0.28.13.tgz",
+      "integrity": "sha512-jtXbAYtV77rLHxoIrjGFsvgGjeTKttuHRv6cvuy3toCZzY7JzTclKH5O2g36IIE4lXwD9xwuhGJ2aa6A3dhNkA==",
+      "dependencies": {
+        "base64-js": "^1.3.0",
+        "bech32": "^1.1.4",
+        "readonly-date": "^1.0.0"
+      }
+    },
+    "node_modules/@osmonauts/helpers/node_modules/@cosmjs/json-rpc": {
+      "version": "0.28.13",
+      "resolved": "https://registry.npmjs.org/@cosmjs/json-rpc/-/json-rpc-0.28.13.tgz",
+      "integrity": "sha512-fInSvg7x9P6p+GWqet+TMhrMTM3OWWdLJOGS5w2ryubMjgpR1rLiAx77MdTNkArW+/6sUwku0sN4veM4ENQu6A==",
+      "dependencies": {
+        "@cosmjs/stream": "0.28.13",
+        "xstream": "^11.14.0"
+      }
+    },
+    "node_modules/@osmonauts/helpers/node_modules/@cosmjs/math": {
+      "version": "0.28.13",
+      "resolved": "https://registry.npmjs.org/@cosmjs/math/-/math-0.28.13.tgz",
+      "integrity": "sha512-PDpL8W/kbyeWi0mQ2OruyqE8ZUAdxPs1xCbDX3WXJwy2oU+X2UTbkuweJHVpS9CIqmZulBoWQAmlf6t6zr1N/g==",
+      "dependencies": {
+        "bn.js": "^5.2.0"
+      }
+    },
+    "node_modules/@osmonauts/helpers/node_modules/@cosmjs/proto-signing": {
+      "version": "0.28.13",
+      "resolved": "https://registry.npmjs.org/@cosmjs/proto-signing/-/proto-signing-0.28.13.tgz",
+      "integrity": "sha512-nSl/2ZLsUJYz3Ad0RY3ihZUgRHIow2OnYqKsESMu+3RA/jTi9bDYhiBu8mNMHI0xrEJry918B2CyI56pOUHdPQ==",
+      "dependencies": {
+        "@cosmjs/amino": "0.28.13",
+        "@cosmjs/crypto": "0.28.13",
+        "@cosmjs/encoding": "0.28.13",
+        "@cosmjs/math": "0.28.13",
+        "@cosmjs/utils": "0.28.13",
+        "cosmjs-types": "^0.4.0",
+        "long": "^4.0.0"
+      }
+    },
+    "node_modules/@osmonauts/helpers/node_modules/@cosmjs/proto-signing/node_modules/cosmjs-types": {
+      "version": "0.4.1",
+      "resolved": "https://registry.npmjs.org/cosmjs-types/-/cosmjs-types-0.4.1.tgz",
+      "integrity": "sha512-I7E/cHkIgoJzMNQdFF0YVqPlaTqrqKHrskuSTIqlEyxfB5Lf3WKCajSXVK2yHOfOFfSux/RxEdpMzw/eO4DIog==",
+      "dependencies": {
+        "long": "^4.0.0",
+        "protobufjs": "~6.11.2"
+      }
+    },
+    "node_modules/@osmonauts/helpers/node_modules/@cosmjs/proto-signing/node_modules/long": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz",
+      "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA=="
+    },
+    "node_modules/@osmonauts/helpers/node_modules/@cosmjs/socket": {
+      "version": "0.28.13",
+      "resolved": "https://registry.npmjs.org/@cosmjs/socket/-/socket-0.28.13.tgz",
+      "integrity": "sha512-lavwGxQ5VdeltyhpFtwCRVfxeWjH5D5mmN7jgx9nuCf3XSFbTcOYxrk2pQ4usenu1Q1KZdL4Yl5RCNrJuHD9Ug==",
+      "dependencies": {
+        "@cosmjs/stream": "0.28.13",
+        "isomorphic-ws": "^4.0.1",
+        "ws": "^7",
+        "xstream": "^11.14.0"
+      }
+    },
+    "node_modules/@osmonauts/helpers/node_modules/@cosmjs/stargate": {
+      "version": "0.28.13",
+      "resolved": "https://registry.npmjs.org/@cosmjs/stargate/-/stargate-0.28.13.tgz",
+      "integrity": "sha512-dVBMazDz8/eActHsRcZjDHHptOBMqvibj5CFgEtZBp22gP6ASzoAUXTlkSVk5FBf4sfuUHoff6st134/+PGMAg==",
+      "dependencies": {
+        "@confio/ics23": "^0.6.8",
+        "@cosmjs/amino": "0.28.13",
+        "@cosmjs/encoding": "0.28.13",
+        "@cosmjs/math": "0.28.13",
+        "@cosmjs/proto-signing": "0.28.13",
+        "@cosmjs/stream": "0.28.13",
+        "@cosmjs/tendermint-rpc": "0.28.13",
+        "@cosmjs/utils": "0.28.13",
+        "cosmjs-types": "^0.4.0",
+        "long": "^4.0.0",
+        "protobufjs": "~6.11.3",
+        "xstream": "^11.14.0"
+      }
+    },
+    "node_modules/@osmonauts/helpers/node_modules/@cosmjs/stargate/node_modules/cosmjs-types": {
+      "version": "0.4.1",
+      "resolved": "https://registry.npmjs.org/cosmjs-types/-/cosmjs-types-0.4.1.tgz",
+      "integrity": "sha512-I7E/cHkIgoJzMNQdFF0YVqPlaTqrqKHrskuSTIqlEyxfB5Lf3WKCajSXVK2yHOfOFfSux/RxEdpMzw/eO4DIog==",
+      "dependencies": {
+        "long": "^4.0.0",
+        "protobufjs": "~6.11.2"
+      }
+    },
+    "node_modules/@osmonauts/helpers/node_modules/@cosmjs/stargate/node_modules/long": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz",
+      "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA=="
+    },
+    "node_modules/@osmonauts/helpers/node_modules/@cosmjs/stream": {
+      "version": "0.28.13",
+      "resolved": "https://registry.npmjs.org/@cosmjs/stream/-/stream-0.28.13.tgz",
+      "integrity": "sha512-AnjtfwT8NwPPkd3lhZhjOlOzT0Kn9bgEu2IPOZjQ1nmG2bplsr6TJmnwn0dJxHT7UGtex17h6whKB5N4wU37Wg==",
+      "dependencies": {
+        "xstream": "^11.14.0"
+      }
+    },
+    "node_modules/@osmonauts/helpers/node_modules/@cosmjs/tendermint-rpc": {
+      "version": "0.28.13",
+      "resolved": "https://registry.npmjs.org/@cosmjs/tendermint-rpc/-/tendermint-rpc-0.28.13.tgz",
+      "integrity": "sha512-GB+ZmfuJIGQm0hsRtLYjeR3lOxF7Z6XyCBR0cX5AAYOZzSEBJjevPgUHD6tLn8zIhvzxaW3/VKnMB+WmlxdH4w==",
+      "dependencies": {
+        "@cosmjs/crypto": "0.28.13",
+        "@cosmjs/encoding": "0.28.13",
+        "@cosmjs/json-rpc": "0.28.13",
+        "@cosmjs/math": "0.28.13",
+        "@cosmjs/socket": "0.28.13",
+        "@cosmjs/stream": "0.28.13",
+        "@cosmjs/utils": "0.28.13",
+        "axios": "^0.21.2",
+        "readonly-date": "^1.0.0",
+        "xstream": "^11.14.0"
+      }
+    },
+    "node_modules/@osmonauts/helpers/node_modules/@cosmjs/utils": {
+      "version": "0.28.13",
+      "resolved": "https://registry.npmjs.org/@cosmjs/utils/-/utils-0.28.13.tgz",
+      "integrity": "sha512-dVeMBiyg+46x7XBZEfJK8yTihphbCFpjVYmLJVqmTsHfJwymQ65cpyW/C+V/LgWARGK8hWQ/aX9HM5Ao8QmMSg=="
+    },
+    "node_modules/@osmonauts/helpers/node_modules/axios": {
+      "version": "0.21.4",
+      "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz",
+      "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==",
+      "dependencies": {
+        "follow-redirects": "^1.14.0"
+      }
+    },
+    "node_modules/@osmonauts/helpers/node_modules/bech32": {
+      "version": "1.1.4",
+      "resolved": "https://registry.npmjs.org/bech32/-/bech32-1.1.4.tgz",
+      "integrity": "sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ=="
+    },
+    "node_modules/@osmonauts/helpers/node_modules/bn.js": {
+      "version": "5.2.1",
+      "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz",
+      "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ=="
+    },
+    "node_modules/@osmonauts/helpers/node_modules/cosmjs-types": {
+      "version": "0.5.1",
+      "resolved": "https://registry.npmjs.org/cosmjs-types/-/cosmjs-types-0.5.1.tgz",
+      "integrity": "sha512-NcC58xUIVLlKdIimWWQAmSlmCjiMrJnuHf4i3LiD8PCextfHR0fT3V5/WlXZZreyMgdmh6ML1zPUfGTbbo3Z5g==",
+      "dependencies": {
+        "long": "^4.0.0",
+        "protobufjs": "~6.11.2"
+      }
+    },
+    "node_modules/@osmonauts/helpers/node_modules/cosmjs-types/node_modules/long": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz",
+      "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA=="
+    },
+    "node_modules/@osmonauts/helpers/node_modules/long": {
+      "version": "5.2.1",
+      "resolved": "https://registry.npmjs.org/long/-/long-5.2.1.tgz",
+      "integrity": "sha512-GKSNGeNAtw8IryjjkhZxuKB3JzlcLTwjtiQCHKvqQet81I93kXslhDQruGI/QsddO83mcDToBVy7GqGS/zYf/A=="
+    },
+    "node_modules/@osmonauts/lcd": {
+      "version": "0.8.0",
+      "resolved": "https://registry.npmjs.org/@osmonauts/lcd/-/lcd-0.8.0.tgz",
+      "integrity": "sha512-k7m2gAVnXc0H4m/eTq4z/8A6hFrr3MPS9wnLV4Xu9/K/WYltCnp2PpiObZm+feZUPK/svES6hxIQeO1bODLx8g==",
+      "dependencies": {
+        "@babel/runtime": "^7.19.0",
+        "axios": "0.27.2"
+      }
+    },
+    "node_modules/@osmonauts/lcd/node_modules/axios": {
+      "version": "0.27.2",
+      "resolved": "https://registry.npmjs.org/axios/-/axios-0.27.2.tgz",
+      "integrity": "sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==",
+      "dependencies": {
+        "follow-redirects": "^1.14.9",
+        "form-data": "^4.0.0"
+      }
+    },
     "node_modules/@protobufjs/aspromise": {
       "version": "1.1.2",
       "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz",
@@ -1566,6 +1791,17 @@
       "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz",
       "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw=="
     },
+    "node_modules/@sei-js/proto": {
+      "version": "1.1.6",
+      "resolved": "https://registry.npmjs.org/@sei-js/proto/-/proto-1.1.6.tgz",
+      "integrity": "sha512-UnIDXTjon8xP0g1piqsU/P3Ct00OiAs6udD7pAl5otmICIX9N6k38KpPj+OMJgUl/QGEHW3rgCXt63HkTi7hEw==",
+      "dependencies": {
+        "@babel/runtime": "^7.18.9",
+        "@osmonauts/helpers": "^0.6.0",
+        "@osmonauts/lcd": "^0.8.0",
+        "protobufjs": "^6.11.2"
+      }
+    },
     "node_modules/@terra-money/legacy.proto": {
       "name": "@terra-money/terra.proto",
       "version": "0.1.7",
@@ -6356,6 +6592,240 @@
         "fastq": "^1.6.0"
       }
     },
+    "@osmonauts/helpers": {
+      "version": "0.6.0",
+      "resolved": "https://registry.npmjs.org/@osmonauts/helpers/-/helpers-0.6.0.tgz",
+      "integrity": "sha512-l62tWR/0W4R+5wRvMeRK0zlaJ8WZhULKsQAZ7kNzggL0pbndIAV+0BJ/jEBbNletoeGtuV8rpi6Wo+w+RmtZGw==",
+      "requires": {
+        "@babel/runtime": "^7.18.9",
+        "@cosmjs/amino": "0.28.13",
+        "@cosmjs/crypto": "0.28.13",
+        "@cosmjs/proto-signing": "0.28.13",
+        "@cosmjs/stargate": "0.28.13",
+        "cosmjs-types": "0.5.1",
+        "long": "^5.2.0",
+        "protobufjs": "^6.11.3"
+      },
+      "dependencies": {
+        "@cosmjs/amino": {
+          "version": "0.28.13",
+          "resolved": "https://registry.npmjs.org/@cosmjs/amino/-/amino-0.28.13.tgz",
+          "integrity": "sha512-IHnH2zGwaY69qT4mVAavr/pfzx6YE+ud1NHJbvVePlbGiz68CXTi5LHR+K0lrKB5mQ7E+ZErWz2mw5U/x+V1wQ==",
+          "requires": {
+            "@cosmjs/crypto": "0.28.13",
+            "@cosmjs/encoding": "0.28.13",
+            "@cosmjs/math": "0.28.13",
+            "@cosmjs/utils": "0.28.13"
+          }
+        },
+        "@cosmjs/crypto": {
+          "version": "0.28.13",
+          "resolved": "https://registry.npmjs.org/@cosmjs/crypto/-/crypto-0.28.13.tgz",
+          "integrity": "sha512-ynKfM0q/tMBQMHJby6ad8lR3gkgBKaelQhIsCZTjClsnuC7oYT9y3ThSZCUWr7Pa9h0J8ahU2YV2oFWFVWJQzQ==",
+          "requires": {
+            "@cosmjs/encoding": "0.28.13",
+            "@cosmjs/math": "0.28.13",
+            "@cosmjs/utils": "0.28.13",
+            "@noble/hashes": "^1",
+            "bn.js": "^5.2.0",
+            "elliptic": "^6.5.3",
+            "libsodium-wrappers": "^0.7.6"
+          }
+        },
+        "@cosmjs/encoding": {
+          "version": "0.28.13",
+          "resolved": "https://registry.npmjs.org/@cosmjs/encoding/-/encoding-0.28.13.tgz",
+          "integrity": "sha512-jtXbAYtV77rLHxoIrjGFsvgGjeTKttuHRv6cvuy3toCZzY7JzTclKH5O2g36IIE4lXwD9xwuhGJ2aa6A3dhNkA==",
+          "requires": {
+            "base64-js": "^1.3.0",
+            "bech32": "^1.1.4",
+            "readonly-date": "^1.0.0"
+          }
+        },
+        "@cosmjs/json-rpc": {
+          "version": "0.28.13",
+          "resolved": "https://registry.npmjs.org/@cosmjs/json-rpc/-/json-rpc-0.28.13.tgz",
+          "integrity": "sha512-fInSvg7x9P6p+GWqet+TMhrMTM3OWWdLJOGS5w2ryubMjgpR1rLiAx77MdTNkArW+/6sUwku0sN4veM4ENQu6A==",
+          "requires": {
+            "@cosmjs/stream": "0.28.13",
+            "xstream": "^11.14.0"
+          }
+        },
+        "@cosmjs/math": {
+          "version": "0.28.13",
+          "resolved": "https://registry.npmjs.org/@cosmjs/math/-/math-0.28.13.tgz",
+          "integrity": "sha512-PDpL8W/kbyeWi0mQ2OruyqE8ZUAdxPs1xCbDX3WXJwy2oU+X2UTbkuweJHVpS9CIqmZulBoWQAmlf6t6zr1N/g==",
+          "requires": {
+            "bn.js": "^5.2.0"
+          }
+        },
+        "@cosmjs/proto-signing": {
+          "version": "0.28.13",
+          "resolved": "https://registry.npmjs.org/@cosmjs/proto-signing/-/proto-signing-0.28.13.tgz",
+          "integrity": "sha512-nSl/2ZLsUJYz3Ad0RY3ihZUgRHIow2OnYqKsESMu+3RA/jTi9bDYhiBu8mNMHI0xrEJry918B2CyI56pOUHdPQ==",
+          "requires": {
+            "@cosmjs/amino": "0.28.13",
+            "@cosmjs/crypto": "0.28.13",
+            "@cosmjs/encoding": "0.28.13",
+            "@cosmjs/math": "0.28.13",
+            "@cosmjs/utils": "0.28.13",
+            "cosmjs-types": "^0.4.0",
+            "long": "^4.0.0"
+          },
+          "dependencies": {
+            "cosmjs-types": {
+              "version": "0.4.1",
+              "resolved": "https://registry.npmjs.org/cosmjs-types/-/cosmjs-types-0.4.1.tgz",
+              "integrity": "sha512-I7E/cHkIgoJzMNQdFF0YVqPlaTqrqKHrskuSTIqlEyxfB5Lf3WKCajSXVK2yHOfOFfSux/RxEdpMzw/eO4DIog==",
+              "requires": {
+                "long": "^4.0.0",
+                "protobufjs": "~6.11.2"
+              }
+            },
+            "long": {
+              "version": "4.0.0",
+              "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz",
+              "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA=="
+            }
+          }
+        },
+        "@cosmjs/socket": {
+          "version": "0.28.13",
+          "resolved": "https://registry.npmjs.org/@cosmjs/socket/-/socket-0.28.13.tgz",
+          "integrity": "sha512-lavwGxQ5VdeltyhpFtwCRVfxeWjH5D5mmN7jgx9nuCf3XSFbTcOYxrk2pQ4usenu1Q1KZdL4Yl5RCNrJuHD9Ug==",
+          "requires": {
+            "@cosmjs/stream": "0.28.13",
+            "isomorphic-ws": "^4.0.1",
+            "ws": "^7",
+            "xstream": "^11.14.0"
+          }
+        },
+        "@cosmjs/stargate": {
+          "version": "0.28.13",
+          "resolved": "https://registry.npmjs.org/@cosmjs/stargate/-/stargate-0.28.13.tgz",
+          "integrity": "sha512-dVBMazDz8/eActHsRcZjDHHptOBMqvibj5CFgEtZBp22gP6ASzoAUXTlkSVk5FBf4sfuUHoff6st134/+PGMAg==",
+          "requires": {
+            "@confio/ics23": "^0.6.8",
+            "@cosmjs/amino": "0.28.13",
+            "@cosmjs/encoding": "0.28.13",
+            "@cosmjs/math": "0.28.13",
+            "@cosmjs/proto-signing": "0.28.13",
+            "@cosmjs/stream": "0.28.13",
+            "@cosmjs/tendermint-rpc": "0.28.13",
+            "@cosmjs/utils": "0.28.13",
+            "cosmjs-types": "^0.4.0",
+            "long": "^4.0.0",
+            "protobufjs": "~6.11.3",
+            "xstream": "^11.14.0"
+          },
+          "dependencies": {
+            "cosmjs-types": {
+              "version": "0.4.1",
+              "resolved": "https://registry.npmjs.org/cosmjs-types/-/cosmjs-types-0.4.1.tgz",
+              "integrity": "sha512-I7E/cHkIgoJzMNQdFF0YVqPlaTqrqKHrskuSTIqlEyxfB5Lf3WKCajSXVK2yHOfOFfSux/RxEdpMzw/eO4DIog==",
+              "requires": {
+                "long": "^4.0.0",
+                "protobufjs": "~6.11.2"
+              }
+            },
+            "long": {
+              "version": "4.0.0",
+              "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz",
+              "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA=="
+            }
+          }
+        },
+        "@cosmjs/stream": {
+          "version": "0.28.13",
+          "resolved": "https://registry.npmjs.org/@cosmjs/stream/-/stream-0.28.13.tgz",
+          "integrity": "sha512-AnjtfwT8NwPPkd3lhZhjOlOzT0Kn9bgEu2IPOZjQ1nmG2bplsr6TJmnwn0dJxHT7UGtex17h6whKB5N4wU37Wg==",
+          "requires": {
+            "xstream": "^11.14.0"
+          }
+        },
+        "@cosmjs/tendermint-rpc": {
+          "version": "0.28.13",
+          "resolved": "https://registry.npmjs.org/@cosmjs/tendermint-rpc/-/tendermint-rpc-0.28.13.tgz",
+          "integrity": "sha512-GB+ZmfuJIGQm0hsRtLYjeR3lOxF7Z6XyCBR0cX5AAYOZzSEBJjevPgUHD6tLn8zIhvzxaW3/VKnMB+WmlxdH4w==",
+          "requires": {
+            "@cosmjs/crypto": "0.28.13",
+            "@cosmjs/encoding": "0.28.13",
+            "@cosmjs/json-rpc": "0.28.13",
+            "@cosmjs/math": "0.28.13",
+            "@cosmjs/socket": "0.28.13",
+            "@cosmjs/stream": "0.28.13",
+            "@cosmjs/utils": "0.28.13",
+            "axios": "^0.21.2",
+            "readonly-date": "^1.0.0",
+            "xstream": "^11.14.0"
+          }
+        },
+        "@cosmjs/utils": {
+          "version": "0.28.13",
+          "resolved": "https://registry.npmjs.org/@cosmjs/utils/-/utils-0.28.13.tgz",
+          "integrity": "sha512-dVeMBiyg+46x7XBZEfJK8yTihphbCFpjVYmLJVqmTsHfJwymQ65cpyW/C+V/LgWARGK8hWQ/aX9HM5Ao8QmMSg=="
+        },
+        "axios": {
+          "version": "0.21.4",
+          "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz",
+          "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==",
+          "requires": {
+            "follow-redirects": "^1.14.0"
+          }
+        },
+        "bech32": {
+          "version": "1.1.4",
+          "resolved": "https://registry.npmjs.org/bech32/-/bech32-1.1.4.tgz",
+          "integrity": "sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ=="
+        },
+        "bn.js": {
+          "version": "5.2.1",
+          "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz",
+          "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ=="
+        },
+        "cosmjs-types": {
+          "version": "0.5.1",
+          "resolved": "https://registry.npmjs.org/cosmjs-types/-/cosmjs-types-0.5.1.tgz",
+          "integrity": "sha512-NcC58xUIVLlKdIimWWQAmSlmCjiMrJnuHf4i3LiD8PCextfHR0fT3V5/WlXZZreyMgdmh6ML1zPUfGTbbo3Z5g==",
+          "requires": {
+            "long": "^4.0.0",
+            "protobufjs": "~6.11.2"
+          },
+          "dependencies": {
+            "long": {
+              "version": "4.0.0",
+              "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz",
+              "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA=="
+            }
+          }
+        },
+        "long": {
+          "version": "5.2.1",
+          "resolved": "https://registry.npmjs.org/long/-/long-5.2.1.tgz",
+          "integrity": "sha512-GKSNGeNAtw8IryjjkhZxuKB3JzlcLTwjtiQCHKvqQet81I93kXslhDQruGI/QsddO83mcDToBVy7GqGS/zYf/A=="
+        }
+      }
+    },
+    "@osmonauts/lcd": {
+      "version": "0.8.0",
+      "resolved": "https://registry.npmjs.org/@osmonauts/lcd/-/lcd-0.8.0.tgz",
+      "integrity": "sha512-k7m2gAVnXc0H4m/eTq4z/8A6hFrr3MPS9wnLV4Xu9/K/WYltCnp2PpiObZm+feZUPK/svES6hxIQeO1bODLx8g==",
+      "requires": {
+        "@babel/runtime": "^7.19.0",
+        "axios": "0.27.2"
+      },
+      "dependencies": {
+        "axios": {
+          "version": "0.27.2",
+          "resolved": "https://registry.npmjs.org/axios/-/axios-0.27.2.tgz",
+          "integrity": "sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==",
+          "requires": {
+            "follow-redirects": "^1.14.9",
+            "form-data": "^4.0.0"
+          }
+        }
+      }
+    },
     "@protobufjs/aspromise": {
       "version": "1.1.2",
       "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz",
@@ -6410,6 +6880,17 @@
       "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz",
       "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw=="
     },
+    "@sei-js/proto": {
+      "version": "1.1.6",
+      "resolved": "https://registry.npmjs.org/@sei-js/proto/-/proto-1.1.6.tgz",
+      "integrity": "sha512-UnIDXTjon8xP0g1piqsU/P3Ct00OiAs6udD7pAl5otmICIX9N6k38KpPj+OMJgUl/QGEHW3rgCXt63HkTi7hEw==",
+      "requires": {
+        "@babel/runtime": "^7.18.9",
+        "@osmonauts/helpers": "^0.6.0",
+        "@osmonauts/lcd": "^0.8.0",
+        "protobufjs": "^6.11.2"
+      }
+    },
     "@terra-money/legacy.proto": {
       "version": "npm:@terra-money/terra.proto@0.1.7",
       "resolved": "https://registry.npmjs.org/@terra-money/terra.proto/-/terra.proto-0.1.7.tgz",

+ 1 - 0
target_chains/cosmwasm/tools/package.json

@@ -16,6 +16,7 @@
     "@injectivelabs/networks": "^1.0.55",
     "@injectivelabs/sdk-ts": "^1.0.354",
     "@injectivelabs/utils": "^1.0.47",
+    "@sei-js/proto": "^1.1.6",
     "@terra-money/terra.js": "^3.1.3",
     "chain-registry": "^1.6.0",
     "cosmjs-utils": "^0.1.0",

+ 12 - 0
target_chains/cosmwasm/tools/src/deployer/config.ts

@@ -3,11 +3,13 @@ import { TerraHost } from "./terra";
 import { InjectiveHost } from "./injective";
 import { NETWORKS } from "../network";
 import { OsmosisHost } from "./osmosis";
+import { SeiHost } from "./sei";
 
 export enum CONFIG_TYPE {
   TERRA = "terra",
   INJECTIVE = "injective",
   OSMOSIS = "osmosis",
+  SEI = "sei",
 }
 
 export const CONFIG: Config = {
@@ -53,6 +55,12 @@ export const CONFIG: Config = {
       endpoint: "http://localhost:26657",
     },
   },
+  [NETWORKS.SEI_TESTNET]: {
+    type: CONFIG_TYPE.SEI,
+    host: {
+      endpoint: "https://node-6.sei-chain-incentivized.com/sei-chain-tm/",
+    },
+  },
 };
 
 export type Config = Record<NETWORKS, NetworkConfig>;
@@ -69,4 +77,8 @@ export type NetworkConfig =
   | {
       type: CONFIG_TYPE.OSMOSIS;
       host: OsmosisHost;
+    }
+  | {
+      type: CONFIG_TYPE.SEI;
+      host: SeiHost;
     };

+ 4 - 0
target_chains/cosmwasm/tools/src/deployer/index.ts

@@ -2,6 +2,7 @@ import { CONFIG_TYPE, NetworkConfig } from "./config";
 import { TerraDeployer } from "./terra";
 import { InjectiveDeployer } from "./injective";
 import { OsmosisDeployer } from "./osmosis";
+import { SeiDeployer } from "./sei";
 
 export type ContractInfo = {
   codeId: number;
@@ -35,6 +36,9 @@ export class DeployerFactory {
       case CONFIG_TYPE.OSMOSIS:
         return OsmosisDeployer.fromHostAndMnemonic(config.host, mnemonic);
 
+      case CONFIG_TYPE.SEI:
+        return SeiDeployer.fromHostAndMnemonic(config.host, mnemonic);
+
       default:
         throw new Error("Invalid config type");
     }

+ 187 - 0
target_chains/cosmwasm/tools/src/deployer/sei.ts

@@ -0,0 +1,187 @@
+import { ContractInfo, Deployer } from ".";
+import { DirectSecp256k1HdWallet } from "@cosmjs/proto-signing";
+import { SigningStargateClient, GasPrice } from "@cosmjs/stargate";
+import { cosmwasm } from "@sei-js/proto";
+import { readFileSync } from "fs";
+import { EncodeObject } from "@cosmjs/proto-signing";
+import { DeliverTxResponse, calculateFee } from "@cosmjs/stargate";
+import { convert_terra_address_to_hex, extractFromRawLog } from "./terra";
+import { Long } from "@osmonauts/helpers";
+import assert from "assert";
+
+export type SeiHost = {
+  endpoint: string;
+};
+
+export class SeiDeployer implements Deployer {
+  constructor(private endpoint: string, private mnemonic: string) {}
+
+  private async getAccountAddress(): Promise<string> {
+    const wallet = await DirectSecp256k1HdWallet.fromMnemonic(this.mnemonic);
+    const accounts = await wallet.getAccounts();
+    console.log(accounts[0].address);
+    return accounts[0].address;
+  }
+
+  private async signAndBroadcast(
+    msg: EncodeObject
+  ): Promise<DeliverTxResponse> {
+    const wallet = await DirectSecp256k1HdWallet.fromMnemonic(this.mnemonic);
+    const client = await SigningStargateClient.connectWithSigner(
+      this.endpoint,
+      wallet
+    );
+    const address = await this.getAccountAddress();
+
+    const gasPrice = GasPrice.fromString("0.025uosmo");
+    const gasEstimation = await client.simulate(address, [msg], "estimate fee");
+    const fee = calculateFee(Math.round(gasEstimation * 1.5), gasPrice);
+
+    const rs = await client.signAndBroadcast(address, [msg], fee);
+
+    if (rs.code !== 0) {
+      console.error(`Transaction failed: ${rs.rawLog}`);
+    } else {
+      console.log(
+        `Broadcasted transaction hash: ${JSON.stringify(rs.transactionHash)}`
+      );
+    }
+
+    client.disconnect();
+
+    return rs;
+  }
+
+  async deployArtifact(artifact: string): Promise<number> {
+    const contract_bytes = readFileSync(artifact);
+    console.log(`Storing WASM: ${artifact} (${contract_bytes.length} bytes)`);
+    // @ts-ignore
+    const storeCode = cosmwasm.wasm.v1.MessageComposer.withTypeUrl.storeCode({
+      sender: await this.getAccountAddress(),
+      wasmByteCode: contract_bytes,
+    });
+
+    const rs = await this.signAndBroadcast(storeCode);
+    if (rs.rawLog === undefined)
+      throw new Error("error parsing raw logs: rawLog undefined");
+
+    var codeId: number;
+    try {
+      // {"key":"code_id","value":"14"}
+      const ci = extractFromRawLog(rs.rawLog, "code_id");
+      codeId = parseInt(ci);
+    } catch (e) {
+      console.error(
+        "Encountered an error in parsing deploy code result. Printing raw log"
+      );
+      console.error(rs.rawLog);
+      throw e;
+    }
+
+    return codeId;
+  }
+  async instantiate(
+    codeId: number,
+    inst_msg: string | object,
+    label: string
+  ): Promise<string> {
+    const accAddress = await this.getAccountAddress();
+    const instMsg =
+      cosmwasm.wasm.v1.MessageComposer.withTypeUrl.instantiateContract({
+        sender: accAddress,
+        admin: accAddress,
+        codeId: Long.fromNumber(codeId),
+        label,
+        msg: Buffer.from(JSON.stringify(inst_msg)),
+        funds: [],
+      });
+
+    const rs = await this.signAndBroadcast(instMsg);
+    if (rs.rawLog === undefined)
+      throw new Error("error parsing raw logs: rawLog undefined");
+
+    var address: string = "";
+    try {
+      // {"key":"_contract_address","value":"terra1xxx3ps3gm3wceg4g300hvggdv7ga0hmsk64srccffmfy4wvcrugqnlvt8w"}
+      address = extractFromRawLog(rs.rawLog, "_contract_address");
+    } catch (e) {
+      console.error(
+        "Encountered an error in parsing instantiation result. Printing raw log"
+      );
+      console.error(rs.rawLog);
+      throw e;
+    }
+
+    console.log(
+      `Instantiated ${label} at ${address} (${convert_terra_address_to_hex(
+        address
+      )})`
+    );
+    return address;
+  }
+  async migrate(contract: string, codeId: number): Promise<void> {
+    const migrateMsg =
+      cosmwasm.wasm.v1.MessageComposer.withTypeUrl.migrateContract({
+        sender: await this.getAccountAddress(),
+        contract,
+        codeId: Long.fromNumber(codeId),
+        msg: Buffer.from(
+          JSON.stringify({
+            action: "",
+          })
+        ),
+      });
+
+    const rs = await this.signAndBroadcast(migrateMsg);
+    if (rs.rawLog === undefined)
+      throw new Error("error parsing raw logs: rawLog undefined");
+
+    try {
+      // {"key":"code_id","value":"13"}
+      let resultCodeId = parseInt(extractFromRawLog(rs.rawLog, "code_id"));
+      assert.strictEqual(codeId, resultCodeId);
+    } catch (e) {
+      console.error(
+        "Encountered an error in parsing migration result. Printing raw log"
+      );
+      console.error(rs.rawLog);
+      throw e;
+    }
+  }
+  async updateAdmin(newAdmin: string, contract: string): Promise<void> {
+    const currAdmin = await this.getAccountAddress();
+    const updateAdminMsg =
+      cosmwasm.wasm.v1.MessageComposer.withTypeUrl.updateAdmin({
+        sender: currAdmin,
+        newAdmin,
+        contract,
+      });
+
+    const rs = await this.signAndBroadcast(updateAdminMsg);
+    if (rs.rawLog === undefined)
+      throw new Error("error parsing raw logs: rawLog undefined");
+  }
+  async getContractInfo(contract: string): Promise<ContractInfo> {
+    const { createRPCQueryClient } = cosmwasm.ClientFactory;
+    const client = await createRPCQueryClient({ rpcEndpoint: this.endpoint });
+    const { address, contractInfo } =
+      await client.cosmwasm.wasm.v1.contractInfo({ address: contract });
+
+    if (contractInfo === undefined)
+      throw new Error("error fetching contract info");
+
+    const { codeId, creator, admin } = contractInfo;
+
+    return {
+      codeId: codeId.toNumber(),
+      address: address,
+      creator: creator,
+      admin: admin,
+      initMsg: undefined,
+    };
+  }
+
+  static fromHostAndMnemonic({ endpoint }: SeiHost, mnemonic: string) {
+    return new SeiDeployer(endpoint, mnemonic);
+  }
+}

+ 1 - 0
target_chains/cosmwasm/tools/src/network.ts

@@ -5,6 +5,7 @@ export enum NETWORKS {
   INJECTIVE_TESTNET = "injective_testnet",
   OSMOSIS_TESTNET = "osmosis_testnet",
   OSMOSIS_LOCAL = "osmosis_local",
+  SEI_TESTNET = "sei_testnet",
 }
 
 export const NETWORKS_OPTIONS = Object.values(NETWORKS);

+ 14 - 0
target_chains/cosmwasm/tools/src/pyth_config.ts

@@ -160,4 +160,18 @@ export const CONFIG: Config = {
     // used only for development and testing purposes
     ...PYTH_SOURCES_TESTNET,
   },
+  [NETWORKS.SEI_TESTNET]: {
+    // TODO: update it when there is a wormhole deployment on SEI
+    wormhole_contract: "sei1cfpxp6zggqzgsngt5tn8kj53pemkg6e4s7j8qj",
+    governance_source_index: 0,
+    governance_sequence_number: 0,
+    // TODO: update this too
+    chain_id: 19,
+    valid_time_period_secs: 60,
+    fee: {
+      amount: "1",
+      denom: "usei",
+    },
+    ...PYTH_SOURCES_TESTNET,
+  },
 };