Osmosis deployment code (#469)
* Osmosis deployment code * extract out pyth sources
This commit is contained in:
parent
3d8638ab3c
commit
670fc23d2f
|
@ -9,19 +9,24 @@
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@cosmjs/cosmwasm-stargate": "^0.29.5",
|
||||||
"@cosmjs/encoding": "^0.26.2",
|
"@cosmjs/encoding": "^0.26.2",
|
||||||
"@injectivelabs/networks": "^1.0.55",
|
"@injectivelabs/networks": "^1.0.55",
|
||||||
"@injectivelabs/sdk-ts": "^1.0.330",
|
"@injectivelabs/sdk-ts": "^1.0.330",
|
||||||
"@injectivelabs/utils": "^1.0.47",
|
"@injectivelabs/utils": "^1.0.47",
|
||||||
"@terra-money/terra.js": "^3.1.3",
|
"@terra-money/terra.js": "^3.1.3",
|
||||||
|
"chain-registry": "^1.6.0",
|
||||||
|
"cosmjs-utils": "^0.1.0",
|
||||||
"dotenv": "^16.0.0",
|
"dotenv": "^16.0.0",
|
||||||
"ethers": "^5.4.4",
|
"ethers": "^5.4.4",
|
||||||
|
"osmojs": "^13.0.0-rc.7-i-alpha",
|
||||||
"yargs": "^17.0.1"
|
"yargs": "^17.0.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/yargs": "^17.0.18",
|
"@types/yargs": "^17.0.18",
|
||||||
"@typescript-eslint/eslint-plugin": "^5.43.0",
|
"@typescript-eslint/eslint-plugin": "^5.43.0",
|
||||||
"@typescript-eslint/parser": "^5.43.0",
|
"@typescript-eslint/parser": "^5.43.0",
|
||||||
|
"cosmjs-types": "^0.6.1",
|
||||||
"eslint": "^8.27.0",
|
"eslint": "^8.27.0",
|
||||||
"eslint-config-prettier": "^8.5.0",
|
"eslint-config-prettier": "^8.5.0",
|
||||||
"ts-node": "^10.9.1",
|
"ts-node": "^10.9.1",
|
||||||
|
@ -80,6 +85,14 @@
|
||||||
"node": ">=6.9.0"
|
"node": ">=6.9.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@chain-registry/types": {
|
||||||
|
"version": "0.14.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@chain-registry/types/-/types-0.14.0.tgz",
|
||||||
|
"integrity": "sha512-TlIqc3CijT734no7RiYBfUvCG2fory0blwrBcK4XTYOCi2vANsxfDdiPLFQcaSETYDd14DdjhrdXwMocEeOnLQ==",
|
||||||
|
"dependencies": {
|
||||||
|
"@babel/runtime": "^7.19.4"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@confio/ics23": {
|
"node_modules/@confio/ics23": {
|
||||||
"version": "0.6.8",
|
"version": "0.6.8",
|
||||||
"resolved": "https://registry.npmjs.org/@confio/ics23/-/ics23-0.6.8.tgz",
|
"resolved": "https://registry.npmjs.org/@confio/ics23/-/ics23-0.6.8.tgz",
|
||||||
|
@ -115,6 +128,48 @@
|
||||||
"resolved": "https://registry.npmjs.org/bech32/-/bech32-1.1.4.tgz",
|
"resolved": "https://registry.npmjs.org/bech32/-/bech32-1.1.4.tgz",
|
||||||
"integrity": "sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ=="
|
"integrity": "sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ=="
|
||||||
},
|
},
|
||||||
|
"node_modules/@cosmjs/cosmwasm-stargate": {
|
||||||
|
"version": "0.29.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/@cosmjs/cosmwasm-stargate/-/cosmwasm-stargate-0.29.5.tgz",
|
||||||
|
"integrity": "sha512-TNdSvm2tEE3XMCuxHxquzls56t40hC8qnLeYJWHsY2ECZmRK3KrnpRReEr7N7bLtODToK7X/riYrV0JaYxjrYA==",
|
||||||
|
"dependencies": {
|
||||||
|
"@cosmjs/amino": "^0.29.5",
|
||||||
|
"@cosmjs/crypto": "^0.29.5",
|
||||||
|
"@cosmjs/encoding": "^0.29.5",
|
||||||
|
"@cosmjs/math": "^0.29.5",
|
||||||
|
"@cosmjs/proto-signing": "^0.29.5",
|
||||||
|
"@cosmjs/stargate": "^0.29.5",
|
||||||
|
"@cosmjs/tendermint-rpc": "^0.29.5",
|
||||||
|
"@cosmjs/utils": "^0.29.5",
|
||||||
|
"cosmjs-types": "^0.5.2",
|
||||||
|
"long": "^4.0.0",
|
||||||
|
"pako": "^2.0.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@cosmjs/cosmwasm-stargate/node_modules/@cosmjs/encoding": {
|
||||||
|
"version": "0.29.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/@cosmjs/encoding/-/encoding-0.29.5.tgz",
|
||||||
|
"integrity": "sha512-G4rGl/Jg4dMCw5u6PEZHZcoHnUBlukZODHbm/wcL4Uu91fkn5jVo5cXXZcvs4VCkArVGrEj/52eUgTZCmOBGWQ==",
|
||||||
|
"dependencies": {
|
||||||
|
"base64-js": "^1.3.0",
|
||||||
|
"bech32": "^1.1.4",
|
||||||
|
"readonly-date": "^1.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@cosmjs/cosmwasm-stargate/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/@cosmjs/cosmwasm-stargate/node_modules/cosmjs-types": {
|
||||||
|
"version": "0.5.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/cosmjs-types/-/cosmjs-types-0.5.2.tgz",
|
||||||
|
"integrity": "sha512-zxCtIJj8v3Di7s39uN4LNcN3HIE1z0B9Z0SPE8ZNQR0oSzsuSe1ACgxoFkvhkS7WBasCAFcglS11G2hyfd5tPg==",
|
||||||
|
"dependencies": {
|
||||||
|
"long": "^4.0.0",
|
||||||
|
"protobufjs": "~6.11.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@cosmjs/crypto": {
|
"node_modules/@cosmjs/crypto": {
|
||||||
"version": "0.29.5",
|
"version": "0.29.5",
|
||||||
"resolved": "https://registry.npmjs.org/@cosmjs/crypto/-/crypto-0.29.5.tgz",
|
"resolved": "https://registry.npmjs.org/@cosmjs/crypto/-/crypto-0.29.5.tgz",
|
||||||
|
@ -215,6 +270,15 @@
|
||||||
"resolved": "https://registry.npmjs.org/bech32/-/bech32-1.1.4.tgz",
|
"resolved": "https://registry.npmjs.org/bech32/-/bech32-1.1.4.tgz",
|
||||||
"integrity": "sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ=="
|
"integrity": "sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ=="
|
||||||
},
|
},
|
||||||
|
"node_modules/@cosmjs/proto-signing/node_modules/cosmjs-types": {
|
||||||
|
"version": "0.5.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/cosmjs-types/-/cosmjs-types-0.5.2.tgz",
|
||||||
|
"integrity": "sha512-zxCtIJj8v3Di7s39uN4LNcN3HIE1z0B9Z0SPE8ZNQR0oSzsuSe1ACgxoFkvhkS7WBasCAFcglS11G2hyfd5tPg==",
|
||||||
|
"dependencies": {
|
||||||
|
"long": "^4.0.0",
|
||||||
|
"protobufjs": "~6.11.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@cosmjs/socket": {
|
"node_modules/@cosmjs/socket": {
|
||||||
"version": "0.29.5",
|
"version": "0.29.5",
|
||||||
"resolved": "https://registry.npmjs.org/@cosmjs/socket/-/socket-0.29.5.tgz",
|
"resolved": "https://registry.npmjs.org/@cosmjs/socket/-/socket-0.29.5.tgz",
|
||||||
|
@ -260,6 +324,15 @@
|
||||||
"resolved": "https://registry.npmjs.org/bech32/-/bech32-1.1.4.tgz",
|
"resolved": "https://registry.npmjs.org/bech32/-/bech32-1.1.4.tgz",
|
||||||
"integrity": "sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ=="
|
"integrity": "sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ=="
|
||||||
},
|
},
|
||||||
|
"node_modules/@cosmjs/stargate/node_modules/cosmjs-types": {
|
||||||
|
"version": "0.5.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/cosmjs-types/-/cosmjs-types-0.5.2.tgz",
|
||||||
|
"integrity": "sha512-zxCtIJj8v3Di7s39uN4LNcN3HIE1z0B9Z0SPE8ZNQR0oSzsuSe1ACgxoFkvhkS7WBasCAFcglS11G2hyfd5tPg==",
|
||||||
|
"dependencies": {
|
||||||
|
"long": "^4.0.0",
|
||||||
|
"protobufjs": "~6.11.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@cosmjs/stream": {
|
"node_modules/@cosmjs/stream": {
|
||||||
"version": "0.29.5",
|
"version": "0.29.5",
|
||||||
"resolved": "https://registry.npmjs.org/@cosmjs/stream/-/stream-0.29.5.tgz",
|
"resolved": "https://registry.npmjs.org/@cosmjs/stream/-/stream-0.29.5.tgz",
|
||||||
|
@ -2244,6 +2317,15 @@
|
||||||
"node": ">=6"
|
"node": ">=6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/chain-registry": {
|
||||||
|
"version": "1.6.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/chain-registry/-/chain-registry-1.6.0.tgz",
|
||||||
|
"integrity": "sha512-1eZpMNoYwiwH8xmhfcAaa5wbY1bKdEQtUJrjUdWcBZvpwUPJTSAZ8UbCvuA/NP4Mwcrkko5kFcgqWDcxG2+w3w==",
|
||||||
|
"dependencies": {
|
||||||
|
"@babel/runtime": "^7.19.4",
|
||||||
|
"@chain-registry/types": "^0.14.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/chalk": {
|
"node_modules/chalk": {
|
||||||
"version": "2.4.2",
|
"version": "2.4.2",
|
||||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
|
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
|
||||||
|
@ -2381,9 +2463,110 @@
|
||||||
"integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ=="
|
"integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ=="
|
||||||
},
|
},
|
||||||
"node_modules/cosmjs-types": {
|
"node_modules/cosmjs-types": {
|
||||||
"version": "0.5.2",
|
"version": "0.6.1",
|
||||||
"resolved": "https://registry.npmjs.org/cosmjs-types/-/cosmjs-types-0.5.2.tgz",
|
"resolved": "https://registry.npmjs.org/cosmjs-types/-/cosmjs-types-0.6.1.tgz",
|
||||||
"integrity": "sha512-zxCtIJj8v3Di7s39uN4LNcN3HIE1z0B9Z0SPE8ZNQR0oSzsuSe1ACgxoFkvhkS7WBasCAFcglS11G2hyfd5tPg==",
|
"integrity": "sha512-fRz6yzElHHBULDyLArF/G1UkkTWW4r3RondBUGnmSsZWYI5NpfDn32MVa5aRmpaaf4tJI2cbnXHs9fykwU7Ttg==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"long": "^4.0.0",
|
||||||
|
"protobufjs": "~6.11.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/cosmjs-utils": {
|
||||||
|
"version": "0.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/cosmjs-utils/-/cosmjs-utils-0.1.0.tgz",
|
||||||
|
"integrity": "sha512-Ao2YhVXN+FqvbKqNeVN6I4njzRsCe3LVuPiLerMrAr6xr4MMABzvZbnY13AK/CYPrFJFJpmBCssocthAxOi59g==",
|
||||||
|
"dependencies": {
|
||||||
|
"@babel/runtime": "^7.11.2",
|
||||||
|
"@cosmjs/amino": "0.29.0",
|
||||||
|
"@cosmjs/crypto": "0.29.0",
|
||||||
|
"@cosmjs/proto-signing": "0.29.0",
|
||||||
|
"@cosmjs/stargate": "0.29.0",
|
||||||
|
"cosmjs-types": "0.5.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/cosmjs-utils/node_modules/@cosmjs/amino": {
|
||||||
|
"version": "0.29.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@cosmjs/amino/-/amino-0.29.0.tgz",
|
||||||
|
"integrity": "sha512-/ZUVx6nRN5YE36H3SDq9+i8g2nZ8DJQnN9fVRC8rSHQKauNkoEuK4NxTNcQ2o2EBLUT0kyYAFY2550HVsPMrgw==",
|
||||||
|
"dependencies": {
|
||||||
|
"@cosmjs/crypto": "^0.29.0",
|
||||||
|
"@cosmjs/encoding": "^0.29.0",
|
||||||
|
"@cosmjs/math": "^0.29.0",
|
||||||
|
"@cosmjs/utils": "^0.29.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/cosmjs-utils/node_modules/@cosmjs/crypto": {
|
||||||
|
"version": "0.29.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@cosmjs/crypto/-/crypto-0.29.0.tgz",
|
||||||
|
"integrity": "sha512-MPJoebRGh7AcZgbfR25ci7iV+XzJiKwVq4wL8n6M5P2QdrIv7DqqniyFXcBbn9dQjMLMHnOSgT9LRv+VXzUVCA==",
|
||||||
|
"dependencies": {
|
||||||
|
"@cosmjs/encoding": "^0.29.0",
|
||||||
|
"@cosmjs/math": "^0.29.0",
|
||||||
|
"@cosmjs/utils": "^0.29.0",
|
||||||
|
"@noble/hashes": "^1",
|
||||||
|
"bn.js": "^5.2.0",
|
||||||
|
"elliptic": "^6.5.3",
|
||||||
|
"libsodium-wrappers": "^0.7.6"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/cosmjs-utils/node_modules/@cosmjs/encoding": {
|
||||||
|
"version": "0.29.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/@cosmjs/encoding/-/encoding-0.29.5.tgz",
|
||||||
|
"integrity": "sha512-G4rGl/Jg4dMCw5u6PEZHZcoHnUBlukZODHbm/wcL4Uu91fkn5jVo5cXXZcvs4VCkArVGrEj/52eUgTZCmOBGWQ==",
|
||||||
|
"dependencies": {
|
||||||
|
"base64-js": "^1.3.0",
|
||||||
|
"bech32": "^1.1.4",
|
||||||
|
"readonly-date": "^1.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/cosmjs-utils/node_modules/@cosmjs/proto-signing": {
|
||||||
|
"version": "0.29.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@cosmjs/proto-signing/-/proto-signing-0.29.0.tgz",
|
||||||
|
"integrity": "sha512-zAdgDz5vRGAfJ5yyKYuTL7qg5UNUT7v4iV1/ZP8ZQn2fLh9QVxViAIovF4r/Y3EEI4JS5uYj/f8UeHMHQSu8hw==",
|
||||||
|
"dependencies": {
|
||||||
|
"@cosmjs/amino": "^0.29.0",
|
||||||
|
"@cosmjs/crypto": "^0.29.0",
|
||||||
|
"@cosmjs/encoding": "^0.29.0",
|
||||||
|
"@cosmjs/math": "^0.29.0",
|
||||||
|
"@cosmjs/utils": "^0.29.0",
|
||||||
|
"cosmjs-types": "^0.5.0",
|
||||||
|
"long": "^4.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/cosmjs-utils/node_modules/@cosmjs/stargate": {
|
||||||
|
"version": "0.29.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@cosmjs/stargate/-/stargate-0.29.0.tgz",
|
||||||
|
"integrity": "sha512-BsV3iA3vMclMm/B1LYO0djBYCALr/UIvL6u9HGvM7QvpdtpQiAvskuS4PieVO/gtF9iCCBJLPqa0scwFIgvDyg==",
|
||||||
|
"dependencies": {
|
||||||
|
"@confio/ics23": "^0.6.8",
|
||||||
|
"@cosmjs/amino": "^0.29.0",
|
||||||
|
"@cosmjs/encoding": "^0.29.0",
|
||||||
|
"@cosmjs/math": "^0.29.0",
|
||||||
|
"@cosmjs/proto-signing": "^0.29.0",
|
||||||
|
"@cosmjs/stream": "^0.29.0",
|
||||||
|
"@cosmjs/tendermint-rpc": "^0.29.0",
|
||||||
|
"@cosmjs/utils": "^0.29.0",
|
||||||
|
"cosmjs-types": "^0.5.0",
|
||||||
|
"long": "^4.0.0",
|
||||||
|
"protobufjs": "~6.11.3",
|
||||||
|
"xstream": "^11.14.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/cosmjs-utils/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/cosmjs-utils/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/cosmjs-utils/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": {
|
"dependencies": {
|
||||||
"long": "^4.0.0",
|
"long": "^4.0.0",
|
||||||
"protobufjs": "~6.11.2"
|
"protobufjs": "~6.11.2"
|
||||||
|
@ -4100,6 +4283,19 @@
|
||||||
"node": ">= 0.8.0"
|
"node": ">= 0.8.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/osmojs": {
|
||||||
|
"version": "13.0.0-rc.7-i-alpha",
|
||||||
|
"resolved": "https://registry.npmjs.org/osmojs/-/osmojs-13.0.0-rc.7-i-alpha.tgz",
|
||||||
|
"integrity": "sha512-c+zwf1PPMBrRHxRSLl//cCk+fnQyukMlwBTJIRjIFA3TspvYQTOqDvDLly2bgnQHb0PkgOn4xLUwgfn+teEY1g==",
|
||||||
|
"dependencies": {
|
||||||
|
"@babel/runtime": "^7.19.4",
|
||||||
|
"@cosmjs/amino": "0.29.5",
|
||||||
|
"@cosmjs/proto-signing": "0.29.5",
|
||||||
|
"@cosmjs/stargate": "0.29.5",
|
||||||
|
"@cosmjs/tendermint-rpc": "^0.29.4",
|
||||||
|
"protobufjs": "^6.11.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/p-limit": {
|
"node_modules/p-limit": {
|
||||||
"version": "3.1.0",
|
"version": "3.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz",
|
||||||
|
@ -4130,6 +4326,11 @@
|
||||||
"url": "https://github.com/sponsors/sindresorhus"
|
"url": "https://github.com/sponsors/sindresorhus"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/pako": {
|
||||||
|
"version": "2.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/pako/-/pako-2.1.0.tgz",
|
||||||
|
"integrity": "sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug=="
|
||||||
|
},
|
||||||
"node_modules/parent-module": {
|
"node_modules/parent-module": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz",
|
||||||
|
@ -5178,6 +5379,14 @@
|
||||||
"regenerator-runtime": "^0.13.11"
|
"regenerator-runtime": "^0.13.11"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"@chain-registry/types": {
|
||||||
|
"version": "0.14.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@chain-registry/types/-/types-0.14.0.tgz",
|
||||||
|
"integrity": "sha512-TlIqc3CijT734no7RiYBfUvCG2fory0blwrBcK4XTYOCi2vANsxfDdiPLFQcaSETYDd14DdjhrdXwMocEeOnLQ==",
|
||||||
|
"requires": {
|
||||||
|
"@babel/runtime": "^7.19.4"
|
||||||
|
}
|
||||||
|
},
|
||||||
"@confio/ics23": {
|
"@confio/ics23": {
|
||||||
"version": "0.6.8",
|
"version": "0.6.8",
|
||||||
"resolved": "https://registry.npmjs.org/@confio/ics23/-/ics23-0.6.8.tgz",
|
"resolved": "https://registry.npmjs.org/@confio/ics23/-/ics23-0.6.8.tgz",
|
||||||
|
@ -5215,6 +5424,50 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"@cosmjs/cosmwasm-stargate": {
|
||||||
|
"version": "0.29.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/@cosmjs/cosmwasm-stargate/-/cosmwasm-stargate-0.29.5.tgz",
|
||||||
|
"integrity": "sha512-TNdSvm2tEE3XMCuxHxquzls56t40hC8qnLeYJWHsY2ECZmRK3KrnpRReEr7N7bLtODToK7X/riYrV0JaYxjrYA==",
|
||||||
|
"requires": {
|
||||||
|
"@cosmjs/amino": "^0.29.5",
|
||||||
|
"@cosmjs/crypto": "^0.29.5",
|
||||||
|
"@cosmjs/encoding": "^0.29.5",
|
||||||
|
"@cosmjs/math": "^0.29.5",
|
||||||
|
"@cosmjs/proto-signing": "^0.29.5",
|
||||||
|
"@cosmjs/stargate": "^0.29.5",
|
||||||
|
"@cosmjs/tendermint-rpc": "^0.29.5",
|
||||||
|
"@cosmjs/utils": "^0.29.5",
|
||||||
|
"cosmjs-types": "^0.5.2",
|
||||||
|
"long": "^4.0.0",
|
||||||
|
"pako": "^2.0.2"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@cosmjs/encoding": {
|
||||||
|
"version": "0.29.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/@cosmjs/encoding/-/encoding-0.29.5.tgz",
|
||||||
|
"integrity": "sha512-G4rGl/Jg4dMCw5u6PEZHZcoHnUBlukZODHbm/wcL4Uu91fkn5jVo5cXXZcvs4VCkArVGrEj/52eUgTZCmOBGWQ==",
|
||||||
|
"requires": {
|
||||||
|
"base64-js": "^1.3.0",
|
||||||
|
"bech32": "^1.1.4",
|
||||||
|
"readonly-date": "^1.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"bech32": {
|
||||||
|
"version": "1.1.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/bech32/-/bech32-1.1.4.tgz",
|
||||||
|
"integrity": "sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ=="
|
||||||
|
},
|
||||||
|
"cosmjs-types": {
|
||||||
|
"version": "0.5.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/cosmjs-types/-/cosmjs-types-0.5.2.tgz",
|
||||||
|
"integrity": "sha512-zxCtIJj8v3Di7s39uN4LNcN3HIE1z0B9Z0SPE8ZNQR0oSzsuSe1ACgxoFkvhkS7WBasCAFcglS11G2hyfd5tPg==",
|
||||||
|
"requires": {
|
||||||
|
"long": "^4.0.0",
|
||||||
|
"protobufjs": "~6.11.2"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"@cosmjs/crypto": {
|
"@cosmjs/crypto": {
|
||||||
"version": "0.29.5",
|
"version": "0.29.5",
|
||||||
"resolved": "https://registry.npmjs.org/@cosmjs/crypto/-/crypto-0.29.5.tgz",
|
"resolved": "https://registry.npmjs.org/@cosmjs/crypto/-/crypto-0.29.5.tgz",
|
||||||
|
@ -5320,6 +5573,15 @@
|
||||||
"version": "1.1.4",
|
"version": "1.1.4",
|
||||||
"resolved": "https://registry.npmjs.org/bech32/-/bech32-1.1.4.tgz",
|
"resolved": "https://registry.npmjs.org/bech32/-/bech32-1.1.4.tgz",
|
||||||
"integrity": "sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ=="
|
"integrity": "sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ=="
|
||||||
|
},
|
||||||
|
"cosmjs-types": {
|
||||||
|
"version": "0.5.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/cosmjs-types/-/cosmjs-types-0.5.2.tgz",
|
||||||
|
"integrity": "sha512-zxCtIJj8v3Di7s39uN4LNcN3HIE1z0B9Z0SPE8ZNQR0oSzsuSe1ACgxoFkvhkS7WBasCAFcglS11G2hyfd5tPg==",
|
||||||
|
"requires": {
|
||||||
|
"long": "^4.0.0",
|
||||||
|
"protobufjs": "~6.11.2"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -5367,6 +5629,15 @@
|
||||||
"version": "1.1.4",
|
"version": "1.1.4",
|
||||||
"resolved": "https://registry.npmjs.org/bech32/-/bech32-1.1.4.tgz",
|
"resolved": "https://registry.npmjs.org/bech32/-/bech32-1.1.4.tgz",
|
||||||
"integrity": "sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ=="
|
"integrity": "sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ=="
|
||||||
|
},
|
||||||
|
"cosmjs-types": {
|
||||||
|
"version": "0.5.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/cosmjs-types/-/cosmjs-types-0.5.2.tgz",
|
||||||
|
"integrity": "sha512-zxCtIJj8v3Di7s39uN4LNcN3HIE1z0B9Z0SPE8ZNQR0oSzsuSe1ACgxoFkvhkS7WBasCAFcglS11G2hyfd5tPg==",
|
||||||
|
"requires": {
|
||||||
|
"long": "^4.0.0",
|
||||||
|
"protobufjs": "~6.11.2"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -6788,6 +7059,15 @@
|
||||||
"integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==",
|
"integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"chain-registry": {
|
||||||
|
"version": "1.6.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/chain-registry/-/chain-registry-1.6.0.tgz",
|
||||||
|
"integrity": "sha512-1eZpMNoYwiwH8xmhfcAaa5wbY1bKdEQtUJrjUdWcBZvpwUPJTSAZ8UbCvuA/NP4Mwcrkko5kFcgqWDcxG2+w3w==",
|
||||||
|
"requires": {
|
||||||
|
"@babel/runtime": "^7.19.4",
|
||||||
|
"@chain-registry/types": "^0.14.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"chalk": {
|
"chalk": {
|
||||||
"version": "2.4.2",
|
"version": "2.4.2",
|
||||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
|
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
|
||||||
|
@ -6907,14 +7187,117 @@
|
||||||
"integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ=="
|
"integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ=="
|
||||||
},
|
},
|
||||||
"cosmjs-types": {
|
"cosmjs-types": {
|
||||||
"version": "0.5.2",
|
"version": "0.6.1",
|
||||||
"resolved": "https://registry.npmjs.org/cosmjs-types/-/cosmjs-types-0.5.2.tgz",
|
"resolved": "https://registry.npmjs.org/cosmjs-types/-/cosmjs-types-0.6.1.tgz",
|
||||||
"integrity": "sha512-zxCtIJj8v3Di7s39uN4LNcN3HIE1z0B9Z0SPE8ZNQR0oSzsuSe1ACgxoFkvhkS7WBasCAFcglS11G2hyfd5tPg==",
|
"integrity": "sha512-fRz6yzElHHBULDyLArF/G1UkkTWW4r3RondBUGnmSsZWYI5NpfDn32MVa5aRmpaaf4tJI2cbnXHs9fykwU7Ttg==",
|
||||||
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"long": "^4.0.0",
|
"long": "^4.0.0",
|
||||||
"protobufjs": "~6.11.2"
|
"protobufjs": "~6.11.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"cosmjs-utils": {
|
||||||
|
"version": "0.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/cosmjs-utils/-/cosmjs-utils-0.1.0.tgz",
|
||||||
|
"integrity": "sha512-Ao2YhVXN+FqvbKqNeVN6I4njzRsCe3LVuPiLerMrAr6xr4MMABzvZbnY13AK/CYPrFJFJpmBCssocthAxOi59g==",
|
||||||
|
"requires": {
|
||||||
|
"@babel/runtime": "^7.11.2",
|
||||||
|
"@cosmjs/amino": "0.29.0",
|
||||||
|
"@cosmjs/crypto": "0.29.0",
|
||||||
|
"@cosmjs/proto-signing": "0.29.0",
|
||||||
|
"@cosmjs/stargate": "0.29.0",
|
||||||
|
"cosmjs-types": "0.5.1"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@cosmjs/amino": {
|
||||||
|
"version": "0.29.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@cosmjs/amino/-/amino-0.29.0.tgz",
|
||||||
|
"integrity": "sha512-/ZUVx6nRN5YE36H3SDq9+i8g2nZ8DJQnN9fVRC8rSHQKauNkoEuK4NxTNcQ2o2EBLUT0kyYAFY2550HVsPMrgw==",
|
||||||
|
"requires": {
|
||||||
|
"@cosmjs/crypto": "^0.29.0",
|
||||||
|
"@cosmjs/encoding": "^0.29.0",
|
||||||
|
"@cosmjs/math": "^0.29.0",
|
||||||
|
"@cosmjs/utils": "^0.29.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"@cosmjs/crypto": {
|
||||||
|
"version": "0.29.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@cosmjs/crypto/-/crypto-0.29.0.tgz",
|
||||||
|
"integrity": "sha512-MPJoebRGh7AcZgbfR25ci7iV+XzJiKwVq4wL8n6M5P2QdrIv7DqqniyFXcBbn9dQjMLMHnOSgT9LRv+VXzUVCA==",
|
||||||
|
"requires": {
|
||||||
|
"@cosmjs/encoding": "^0.29.0",
|
||||||
|
"@cosmjs/math": "^0.29.0",
|
||||||
|
"@cosmjs/utils": "^0.29.0",
|
||||||
|
"@noble/hashes": "^1",
|
||||||
|
"bn.js": "^5.2.0",
|
||||||
|
"elliptic": "^6.5.3",
|
||||||
|
"libsodium-wrappers": "^0.7.6"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"@cosmjs/encoding": {
|
||||||
|
"version": "0.29.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/@cosmjs/encoding/-/encoding-0.29.5.tgz",
|
||||||
|
"integrity": "sha512-G4rGl/Jg4dMCw5u6PEZHZcoHnUBlukZODHbm/wcL4Uu91fkn5jVo5cXXZcvs4VCkArVGrEj/52eUgTZCmOBGWQ==",
|
||||||
|
"requires": {
|
||||||
|
"base64-js": "^1.3.0",
|
||||||
|
"bech32": "^1.1.4",
|
||||||
|
"readonly-date": "^1.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"@cosmjs/proto-signing": {
|
||||||
|
"version": "0.29.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@cosmjs/proto-signing/-/proto-signing-0.29.0.tgz",
|
||||||
|
"integrity": "sha512-zAdgDz5vRGAfJ5yyKYuTL7qg5UNUT7v4iV1/ZP8ZQn2fLh9QVxViAIovF4r/Y3EEI4JS5uYj/f8UeHMHQSu8hw==",
|
||||||
|
"requires": {
|
||||||
|
"@cosmjs/amino": "^0.29.0",
|
||||||
|
"@cosmjs/crypto": "^0.29.0",
|
||||||
|
"@cosmjs/encoding": "^0.29.0",
|
||||||
|
"@cosmjs/math": "^0.29.0",
|
||||||
|
"@cosmjs/utils": "^0.29.0",
|
||||||
|
"cosmjs-types": "^0.5.0",
|
||||||
|
"long": "^4.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"@cosmjs/stargate": {
|
||||||
|
"version": "0.29.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@cosmjs/stargate/-/stargate-0.29.0.tgz",
|
||||||
|
"integrity": "sha512-BsV3iA3vMclMm/B1LYO0djBYCALr/UIvL6u9HGvM7QvpdtpQiAvskuS4PieVO/gtF9iCCBJLPqa0scwFIgvDyg==",
|
||||||
|
"requires": {
|
||||||
|
"@confio/ics23": "^0.6.8",
|
||||||
|
"@cosmjs/amino": "^0.29.0",
|
||||||
|
"@cosmjs/encoding": "^0.29.0",
|
||||||
|
"@cosmjs/math": "^0.29.0",
|
||||||
|
"@cosmjs/proto-signing": "^0.29.0",
|
||||||
|
"@cosmjs/stream": "^0.29.0",
|
||||||
|
"@cosmjs/tendermint-rpc": "^0.29.0",
|
||||||
|
"@cosmjs/utils": "^0.29.0",
|
||||||
|
"cosmjs-types": "^0.5.0",
|
||||||
|
"long": "^4.0.0",
|
||||||
|
"protobufjs": "~6.11.3",
|
||||||
|
"xstream": "^11.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"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"crc-32": {
|
"crc-32": {
|
||||||
"version": "1.2.2",
|
"version": "1.2.2",
|
||||||
"resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.2.tgz",
|
"resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.2.tgz",
|
||||||
|
@ -8247,6 +8630,19 @@
|
||||||
"word-wrap": "^1.2.3"
|
"word-wrap": "^1.2.3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"osmojs": {
|
||||||
|
"version": "13.0.0-rc.7-i-alpha",
|
||||||
|
"resolved": "https://registry.npmjs.org/osmojs/-/osmojs-13.0.0-rc.7-i-alpha.tgz",
|
||||||
|
"integrity": "sha512-c+zwf1PPMBrRHxRSLl//cCk+fnQyukMlwBTJIRjIFA3TspvYQTOqDvDLly2bgnQHb0PkgOn4xLUwgfn+teEY1g==",
|
||||||
|
"requires": {
|
||||||
|
"@babel/runtime": "^7.19.4",
|
||||||
|
"@cosmjs/amino": "0.29.5",
|
||||||
|
"@cosmjs/proto-signing": "0.29.5",
|
||||||
|
"@cosmjs/stargate": "0.29.5",
|
||||||
|
"@cosmjs/tendermint-rpc": "^0.29.4",
|
||||||
|
"protobufjs": "^6.11.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
"p-limit": {
|
"p-limit": {
|
||||||
"version": "3.1.0",
|
"version": "3.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz",
|
||||||
|
@ -8265,6 +8661,11 @@
|
||||||
"p-limit": "^3.0.2"
|
"p-limit": "^3.0.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"pako": {
|
||||||
|
"version": "2.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/pako/-/pako-2.1.0.tgz",
|
||||||
|
"integrity": "sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug=="
|
||||||
|
},
|
||||||
"parent-module": {
|
"parent-module": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz",
|
||||||
|
|
|
@ -11,19 +11,24 @@
|
||||||
"author": "",
|
"author": "",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@cosmjs/cosmwasm-stargate": "^0.29.5",
|
||||||
"@cosmjs/encoding": "^0.26.2",
|
"@cosmjs/encoding": "^0.26.2",
|
||||||
"@injectivelabs/networks": "^1.0.55",
|
"@injectivelabs/networks": "^1.0.55",
|
||||||
"@injectivelabs/sdk-ts": "^1.0.330",
|
"@injectivelabs/sdk-ts": "^1.0.330",
|
||||||
"@injectivelabs/utils": "^1.0.47",
|
"@injectivelabs/utils": "^1.0.47",
|
||||||
"@terra-money/terra.js": "^3.1.3",
|
"@terra-money/terra.js": "^3.1.3",
|
||||||
|
"chain-registry": "^1.6.0",
|
||||||
|
"cosmjs-utils": "^0.1.0",
|
||||||
"dotenv": "^16.0.0",
|
"dotenv": "^16.0.0",
|
||||||
"ethers": "^5.4.4",
|
"ethers": "^5.4.4",
|
||||||
|
"osmojs": "^13.0.0-rc.7-i-alpha",
|
||||||
"yargs": "^17.0.1"
|
"yargs": "^17.0.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/yargs": "^17.0.18",
|
"@types/yargs": "^17.0.18",
|
||||||
"@typescript-eslint/eslint-plugin": "^5.43.0",
|
"@typescript-eslint/eslint-plugin": "^5.43.0",
|
||||||
"@typescript-eslint/parser": "^5.43.0",
|
"@typescript-eslint/parser": "^5.43.0",
|
||||||
|
"cosmjs-types": "^0.6.1",
|
||||||
"eslint": "^8.27.0",
|
"eslint": "^8.27.0",
|
||||||
"eslint-config-prettier": "^8.5.0",
|
"eslint-config-prettier": "^8.5.0",
|
||||||
"ts-node": "^10.9.1",
|
"ts-node": "^10.9.1",
|
||||||
|
|
|
@ -2,10 +2,12 @@ import { Network } from "@injectivelabs/networks";
|
||||||
import { TerraHost } from "./terra";
|
import { TerraHost } from "./terra";
|
||||||
import { InjectiveHost } from "./injective";
|
import { InjectiveHost } from "./injective";
|
||||||
import { NETWORKS } from "../network";
|
import { NETWORKS } from "../network";
|
||||||
|
import { OsmosisHost } from "./osmosis";
|
||||||
|
|
||||||
export enum CONFIG_TYPE {
|
export enum CONFIG_TYPE {
|
||||||
TERRA = "terra",
|
TERRA = "terra",
|
||||||
INJECTIVE = "injective",
|
INJECTIVE = "injective",
|
||||||
|
OSMOSIS = "osmosis",
|
||||||
}
|
}
|
||||||
|
|
||||||
export const CONFIG: Config = {
|
export const CONFIG: Config = {
|
||||||
|
@ -31,6 +33,12 @@ export const CONFIG: Config = {
|
||||||
network: Network.Testnet,
|
network: Network.Testnet,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
[NETWORKS.OSMOSIS_LOCAL]: {
|
||||||
|
type: CONFIG_TYPE.OSMOSIS,
|
||||||
|
host: {
|
||||||
|
endpoint: "http://localhost:26657",
|
||||||
|
},
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
export type Config = Record<NETWORKS, NetworkConfig>;
|
export type Config = Record<NETWORKS, NetworkConfig>;
|
||||||
|
@ -43,4 +51,8 @@ export type NetworkConfig =
|
||||||
| {
|
| {
|
||||||
type: CONFIG_TYPE.INJECTIVE;
|
type: CONFIG_TYPE.INJECTIVE;
|
||||||
host: InjectiveHost;
|
host: InjectiveHost;
|
||||||
|
}
|
||||||
|
| {
|
||||||
|
type: CONFIG_TYPE.OSMOSIS;
|
||||||
|
host: OsmosisHost;
|
||||||
};
|
};
|
||||||
|
|
|
@ -2,6 +2,7 @@ import { CONFIG, CONFIG_TYPE, NetworkConfig } from "./config";
|
||||||
import { TerraDeployer } from "./terra";
|
import { TerraDeployer } from "./terra";
|
||||||
import { InjectiveDeployer } from "./injective";
|
import { InjectiveDeployer } from "./injective";
|
||||||
import { NETWORKS } from "../network";
|
import { NETWORKS } from "../network";
|
||||||
|
import { OsmosisDeployer } from "./osmosis";
|
||||||
|
|
||||||
export interface Deployer {
|
export interface Deployer {
|
||||||
deployArtifact(artifact: string): Promise<number>;
|
deployArtifact(artifact: string): Promise<number>;
|
||||||
|
@ -22,6 +23,9 @@ export class DeployerFactory {
|
||||||
case CONFIG_TYPE.INJECTIVE:
|
case CONFIG_TYPE.INJECTIVE:
|
||||||
return InjectiveDeployer.fromHostAndMnemonic(config.host, mnemonic);
|
return InjectiveDeployer.fromHostAndMnemonic(config.host, mnemonic);
|
||||||
|
|
||||||
|
case CONFIG_TYPE.OSMOSIS:
|
||||||
|
return OsmosisDeployer.fromHostAndMnemonic(config.host, mnemonic);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
throw new Error("Invalid config type");
|
throw new Error("Invalid config type");
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,172 @@
|
||||||
|
import { getSigningOsmosisClient } from "osmojs";
|
||||||
|
import { getOfflineSignerProto as getOfflineSigner } from "cosmjs-utils";
|
||||||
|
import { chains } from "chain-registry";
|
||||||
|
import { Chain } from "@chain-registry/types";
|
||||||
|
import { readFileSync } from "fs";
|
||||||
|
import { cosmwasm, estimateOsmoFee } from "osmojs";
|
||||||
|
import { DeliverTxResponse } from "@cosmjs/stargate";
|
||||||
|
import { wasmTypes } from "@cosmjs/cosmwasm-stargate/build/modules/wasm/messages";
|
||||||
|
import assert from "assert";
|
||||||
|
|
||||||
|
import { Deployer } from ".";
|
||||||
|
import { convert_terra_address_to_hex, extractFromRawLog } from "./terra";
|
||||||
|
import { EncodeObject } from "@cosmjs/proto-signing";
|
||||||
|
import Long from "long";
|
||||||
|
|
||||||
|
export type OsmosisHost = {
|
||||||
|
endpoint: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
export class OsmosisDeployer implements Deployer {
|
||||||
|
private chain: Chain;
|
||||||
|
constructor(private endpoint: string, private mnemonic: string) {
|
||||||
|
const c = chains.find(({ chain_name }) => chain_name === "osmosis");
|
||||||
|
if (c === undefined)
|
||||||
|
throw new Error("Could not find Osmosis in chain registry");
|
||||||
|
this.chain = c;
|
||||||
|
}
|
||||||
|
|
||||||
|
private async getAccountAddress(): Promise<string> {
|
||||||
|
const signer = await getOfflineSigner({
|
||||||
|
mnemonic: this.mnemonic,
|
||||||
|
chain: this.chain,
|
||||||
|
});
|
||||||
|
|
||||||
|
const accountData = await signer.getAccounts();
|
||||||
|
return accountData[0].address;
|
||||||
|
}
|
||||||
|
|
||||||
|
private async signAndBroadcast(
|
||||||
|
msg: EncodeObject
|
||||||
|
): Promise<DeliverTxResponse> {
|
||||||
|
const signer = await getOfflineSigner({
|
||||||
|
mnemonic: this.mnemonic,
|
||||||
|
chain: this.chain,
|
||||||
|
});
|
||||||
|
|
||||||
|
const client = await getSigningOsmosisClient({
|
||||||
|
rpcEndpoint: this.endpoint,
|
||||||
|
signer,
|
||||||
|
defaultTypes: wasmTypes,
|
||||||
|
});
|
||||||
|
|
||||||
|
const address = await this.getAccountAddress();
|
||||||
|
const fee = await estimateOsmoFee(client, address, [msg], "estimate fee");
|
||||||
|
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)`);
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static fromHostAndMnemonic(host: OsmosisHost, mnemonic: string) {
|
||||||
|
return new OsmosisDeployer(host.endpoint, mnemonic);
|
||||||
|
}
|
||||||
|
}
|
|
@ -149,12 +149,12 @@ export class TerraDeployer implements Deployer {
|
||||||
|
|
||||||
// Terra addresses are "human-readable", but for cross-chain registrations, we
|
// Terra addresses are "human-readable", but for cross-chain registrations, we
|
||||||
// want the "canonical" version
|
// want the "canonical" version
|
||||||
function convert_terra_address_to_hex(human_addr: string) {
|
export function convert_terra_address_to_hex(human_addr: string) {
|
||||||
return "0x" + toHex(zeroPad(Bech32.decode(human_addr).data, 32));
|
return "0x" + toHex(zeroPad(Bech32.decode(human_addr).data, 32));
|
||||||
}
|
}
|
||||||
|
|
||||||
// enter key of what to extract
|
// enter key of what to extract
|
||||||
function extractFromRawLog(rawLog: string, key: string): string {
|
export function extractFromRawLog(rawLog: string, key: string): string {
|
||||||
const rx = new RegExp(`"${key}","value":"([^"]+)`, "gm");
|
const rx = new RegExp(`"${key}","value":"([^"]+)`, "gm");
|
||||||
return rx.exec(rawLog)![1];
|
return rx.exec(rawLog)![1];
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,10 +2,7 @@ export enum NETWORKS {
|
||||||
TERRA_MAINNET = "terra_mainnet",
|
TERRA_MAINNET = "terra_mainnet",
|
||||||
TERRA_TESTNET = "terra_testnet",
|
TERRA_TESTNET = "terra_testnet",
|
||||||
INJECTIVE_TESTNET = "injective_testnet",
|
INJECTIVE_TESTNET = "injective_testnet",
|
||||||
|
OSMOSIS_LOCAL = "osmosis_local",
|
||||||
}
|
}
|
||||||
|
|
||||||
export const NETWORKS_OPTIONS = [
|
export const NETWORKS_OPTIONS = Object.values(NETWORKS);
|
||||||
NETWORKS.TERRA_MAINNET,
|
|
||||||
NETWORKS.TERRA_TESTNET,
|
|
||||||
NETWORKS.INJECTIVE_TESTNET,
|
|
||||||
];
|
|
||||||
|
|
|
@ -1,5 +1,57 @@
|
||||||
import { NETWORKS } from "./network";
|
import { NETWORKS } from "./network";
|
||||||
|
|
||||||
|
const PYTH_SOURCES_TESTNET = {
|
||||||
|
data_sources: [
|
||||||
|
{
|
||||||
|
emitter: Buffer.from(
|
||||||
|
"f346195ac02f37d60d4db8ffa6ef74cb1be3550047543a4a9ee9acf4d78697b0",
|
||||||
|
"hex"
|
||||||
|
).toString("base64"),
|
||||||
|
chain_id: 1,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
emitter: Buffer.from(
|
||||||
|
"a27839d641b07743c0cb5f68c51f8cd31d2c0762bec00dc6fcd25433ef1ab5b6",
|
||||||
|
"hex"
|
||||||
|
).toString("base64"),
|
||||||
|
chain_id: 26,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
governance_source: {
|
||||||
|
emitter: Buffer.from(
|
||||||
|
"63278d271099bfd491951b3e648f08b1c71631e4a53674ad43e8f9f98068c385",
|
||||||
|
"hex"
|
||||||
|
).toString("base64"),
|
||||||
|
chain_id: 1,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
const PYTH_SOURCES_MAINNET = {
|
||||||
|
data_sources: [
|
||||||
|
{
|
||||||
|
emitter: Buffer.from(
|
||||||
|
"6bb14509a612f01fbbc4cffeebd4bbfb492a86df717ebe92eb6df432a3f00a25",
|
||||||
|
"hex"
|
||||||
|
).toString("base64"),
|
||||||
|
chain_id: 1,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
emitter: Buffer.from(
|
||||||
|
"f8cd23c2ab91237730770bbea08d61005cdda0984348f3f6eecb559638c0bba0",
|
||||||
|
"hex"
|
||||||
|
).toString("base64"),
|
||||||
|
chain_id: 26,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
governance_source: {
|
||||||
|
emitter: Buffer.from(
|
||||||
|
"5635979a221c34931e32620b9293a463065555ea71fe97cd6237ade875b12e9e",
|
||||||
|
"hex"
|
||||||
|
).toString("base64"),
|
||||||
|
chain_id: 1,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
export type PythConfig = {
|
export type PythConfig = {
|
||||||
wormhole_contract: string;
|
wormhole_contract: string;
|
||||||
data_sources: DataSource[];
|
data_sources: DataSource[];
|
||||||
|
@ -27,29 +79,6 @@ export const CONFIG: Config = {
|
||||||
[NETWORKS.TERRA_MAINNET]: {
|
[NETWORKS.TERRA_MAINNET]: {
|
||||||
wormhole_contract:
|
wormhole_contract:
|
||||||
"terra12mrnzvhx3rpej6843uge2yyfppfyd3u9c3uq223q8sl48huz9juqffcnh",
|
"terra12mrnzvhx3rpej6843uge2yyfppfyd3u9c3uq223q8sl48huz9juqffcnh",
|
||||||
data_sources: [
|
|
||||||
{
|
|
||||||
emitter: Buffer.from(
|
|
||||||
"6bb14509a612f01fbbc4cffeebd4bbfb492a86df717ebe92eb6df432a3f00a25",
|
|
||||||
"hex"
|
|
||||||
).toString("base64"),
|
|
||||||
chain_id: 1,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
emitter: Buffer.from(
|
|
||||||
"f8cd23c2ab91237730770bbea08d61005cdda0984348f3f6eecb559638c0bba0",
|
|
||||||
"hex"
|
|
||||||
).toString("base64"),
|
|
||||||
chain_id: 26,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
governance_source: {
|
|
||||||
emitter: Buffer.from(
|
|
||||||
"5635979a221c34931e32620b9293a463065555ea71fe97cd6237ade875b12e9e",
|
|
||||||
"hex"
|
|
||||||
).toString("base64"),
|
|
||||||
chain_id: 1,
|
|
||||||
},
|
|
||||||
governance_source_index: 0,
|
governance_source_index: 0,
|
||||||
governance_sequence_number: 0,
|
governance_sequence_number: 0,
|
||||||
chain_id: 18,
|
chain_id: 18,
|
||||||
|
@ -58,33 +87,11 @@ export const CONFIG: Config = {
|
||||||
amount: "1",
|
amount: "1",
|
||||||
denom: "uluna",
|
denom: "uluna",
|
||||||
},
|
},
|
||||||
|
...PYTH_SOURCES_MAINNET,
|
||||||
},
|
},
|
||||||
[NETWORKS.TERRA_TESTNET]: {
|
[NETWORKS.TERRA_TESTNET]: {
|
||||||
wormhole_contract:
|
wormhole_contract:
|
||||||
"terra19nv3xr5lrmmr7egvrk2kqgw4kcn43xrtd5g0mpgwwvhetusk4k7s66jyv0",
|
"terra19nv3xr5lrmmr7egvrk2kqgw4kcn43xrtd5g0mpgwwvhetusk4k7s66jyv0",
|
||||||
data_sources: [
|
|
||||||
{
|
|
||||||
emitter: Buffer.from(
|
|
||||||
"f346195ac02f37d60d4db8ffa6ef74cb1be3550047543a4a9ee9acf4d78697b0",
|
|
||||||
"hex"
|
|
||||||
).toString("base64"),
|
|
||||||
chain_id: 1,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
emitter: Buffer.from(
|
|
||||||
"a27839d641b07743c0cb5f68c51f8cd31d2c0762bec00dc6fcd25433ef1ab5b6",
|
|
||||||
"hex"
|
|
||||||
).toString("base64"),
|
|
||||||
chain_id: 26,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
governance_source: {
|
|
||||||
emitter: Buffer.from(
|
|
||||||
"63278d271099bfd491951b3e648f08b1c71631e4a53674ad43e8f9f98068c385",
|
|
||||||
"hex"
|
|
||||||
).toString("base64"),
|
|
||||||
chain_id: 1,
|
|
||||||
},
|
|
||||||
governance_source_index: 0,
|
governance_source_index: 0,
|
||||||
governance_sequence_number: 0,
|
governance_sequence_number: 0,
|
||||||
chain_id: 18,
|
chain_id: 18,
|
||||||
|
@ -93,32 +100,10 @@ export const CONFIG: Config = {
|
||||||
amount: "1",
|
amount: "1",
|
||||||
denom: "uluna",
|
denom: "uluna",
|
||||||
},
|
},
|
||||||
|
...PYTH_SOURCES_TESTNET,
|
||||||
},
|
},
|
||||||
[NETWORKS.INJECTIVE_TESTNET]: {
|
[NETWORKS.INJECTIVE_TESTNET]: {
|
||||||
wormhole_contract: "inj1xx3aupmgv3ce537c0yce8zzd3sz567syuyedpg",
|
wormhole_contract: "inj1xx3aupmgv3ce537c0yce8zzd3sz567syuyedpg",
|
||||||
data_sources: [
|
|
||||||
{
|
|
||||||
emitter: Buffer.from(
|
|
||||||
"f346195ac02f37d60d4db8ffa6ef74cb1be3550047543a4a9ee9acf4d78697b0",
|
|
||||||
"hex"
|
|
||||||
).toString("base64"),
|
|
||||||
chain_id: 1,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
emitter: Buffer.from(
|
|
||||||
"a27839d641b07743c0cb5f68c51f8cd31d2c0762bec00dc6fcd25433ef1ab5b6",
|
|
||||||
"hex"
|
|
||||||
).toString("base64"),
|
|
||||||
chain_id: 26,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
governance_source: {
|
|
||||||
emitter: Buffer.from(
|
|
||||||
"63278d271099bfd491951b3e648f08b1c71631e4a53674ad43e8f9f98068c385",
|
|
||||||
"hex"
|
|
||||||
).toString("base64"),
|
|
||||||
chain_id: 1,
|
|
||||||
},
|
|
||||||
governance_source_index: 0,
|
governance_source_index: 0,
|
||||||
governance_sequence_number: 0,
|
governance_sequence_number: 0,
|
||||||
chain_id: 19,
|
chain_id: 19,
|
||||||
|
@ -127,5 +112,24 @@ export const CONFIG: Config = {
|
||||||
amount: "1",
|
amount: "1",
|
||||||
denom: "inj",
|
denom: "inj",
|
||||||
},
|
},
|
||||||
|
...PYTH_SOURCES_TESTNET,
|
||||||
|
},
|
||||||
|
// this details below are invalid and random
|
||||||
|
// they are to be used only for for testing purposes
|
||||||
|
[NETWORKS.OSMOSIS_LOCAL]: {
|
||||||
|
// random wormhole contract
|
||||||
|
wormhole_contract:
|
||||||
|
"osmo1mypljhatv0prfr9cjzzvamxdf2ctg34xkt50sudxads9zhqnyneqjuvy26",
|
||||||
|
governance_source_index: 0,
|
||||||
|
governance_sequence_number: 0,
|
||||||
|
chain_id: 19,
|
||||||
|
valid_time_period_secs: 60,
|
||||||
|
fee: {
|
||||||
|
amount: "1",
|
||||||
|
denom: "uosmo",
|
||||||
|
},
|
||||||
|
// these are same as testnet but are being used in LocalOsmosis (local blockchain)
|
||||||
|
// used only for development and testing purposes
|
||||||
|
...PYTH_SOURCES_TESTNET,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue