Skip to content

Commit

Permalink
more chains
Browse files Browse the repository at this point in the history
  • Loading branch information
zfy0701 committed Mar 10, 2024
1 parent fe26af5 commit 23e0e58
Show file tree
Hide file tree
Showing 4 changed files with 209 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
],
"type": "module",
"dependencies": {
"@sentio/sdk": "^2.32.1",
"@sentio/sdk": "^2.32.5",
"node-fetch": "^3.3.1"
},
"resolutions": {
Expand Down
3 changes: 3 additions & 0 deletions projects/pyth/src/evm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ const price_update_counter = Counter.register("price_update_counter", {
}
})

// https://docs.pyth.network/price-feeds/contract-addresses/evm
const CHAIN_ADDRESS_MAP = new Map<EthChainId, string>([
[EthChainId.ETHEREUM, "0x4305FB66699C3B2702D4d05CF36551390A4c69C6"], //ETH
[EthChainId.OPTIMISM, "0xff1a0f4744e8582df1ae09d5611b887b6a12925c"], //Optimism
Expand All @@ -45,6 +46,8 @@ const CHAIN_ADDRESS_MAP = new Map<EthChainId, string>([
[EthChainId.MANTLE, "0xA2aa501b19aff244D90cc15a4Cf739D2725B5729"], // mantle
[EthChainId.LINEA, "0xA2aa501b19aff244D90cc15a4Cf739D2725B5729"], // linea
[EthChainId.BASE, "0x8250f4aF4B972684F7b336503E2D6dFeDeB1487a"], // base
[EthChainId.BLAST, "0xA2aa501b19aff244D90cc15a4Cf739D2725B5729"],
[EthChainId.MODE, "0xA2aa501b19aff244D90cc15a4Cf739D2725B5729"]
]);

const CHAIN_NATIVE_MAP = new Map<EthChainId, string>([
Expand Down
2 changes: 1 addition & 1 deletion projects/pyth/src/sui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const price_update_occur = Gauge.register("price_update_occur", commonOptions)

const price_update_counter = Counter.register("price_update_counter", {
resolutionConfig: {
intervalInMinutes: 1,
intervalInMinutes: 5,
}
})

Expand Down
204 changes: 204 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
# yarn lockfile v1


"@0no-co/graphql.web@^1.0.4":
version "1.0.4"
resolved "https://registry.yarnpkg.com/@0no-co/graphql.web/-/graphql.web-1.0.4.tgz#9606eb651955499525d068ce0ad8bea596286ce2"
integrity sha512-W3ezhHGfO0MS1PtGloaTpg0PbaT8aZSmmaerL7idtU5F7oCI+uu25k+MsMS31BVFlp4aMkHSrNRxiD72IlK8TA==

"@75lb/deep-merge@^1.1.1":
version "1.1.1"
resolved "https://registry.npmjs.org/@75lb/deep-merge/-/deep-merge-1.1.1.tgz"
Expand Down Expand Up @@ -45,6 +50,20 @@
form-data "^4.0.0"
tweetnacl "^1.0.3"

"@aptos-labs/ts-sdk@~1.7.0":
version "1.7.0"
resolved "https://registry.yarnpkg.com/@aptos-labs/ts-sdk/-/ts-sdk-1.7.0.tgz#fc1179e12a1c5d13c1c10d5135bad7196f59f7dd"
integrity sha512-mK7NuGtnu8vaNFNZHqMvLu1PSSdvgytPqysszGPsquSFE+cK75cjr82wkbzQSTf4FCzdCohKSGA2NmBnGkiH7A==
dependencies:
"@aptos-labs/aptos-client" "^0.1.0"
"@noble/curves" "^1.2.0"
"@noble/hashes" "^1.3.3"
"@scure/bip32" "^1.3.3"
"@scure/bip39" "^1.2.1"
eventemitter3 "^5.0.1"
form-data "^4.0.0"
tweetnacl "^1.0.3"

"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.22.5":
version "7.22.5"
resolved "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.5.tgz"
Expand Down Expand Up @@ -725,6 +744,19 @@
"@ethersproject/properties" "^5.7.0"
"@ethersproject/strings" "^5.7.0"

"@gql.tada/cli-utils@0.1.1":
version "0.1.1"
resolved "https://registry.yarnpkg.com/@gql.tada/cli-utils/-/cli-utils-0.1.1.tgz#45f325d1db5d54c81e19c71a9c0b181dda194abc"
integrity sha512-UwT7N1hY3WVUeqeq80MoRovV2mqqu4A8dUEcZThC5KklIYlvxOux6ql3XqKTV1dd9Sva8uCfm+Eym2i7eMFeEg==
dependencies:
"@urql/introspection" "^1.0.3"
graphql "^16.8.1"

"@graphql-typed-document-node/core@^3.2.0":
version "3.2.0"
resolved "https://registry.yarnpkg.com/@graphql-typed-document-node/core/-/core-3.2.0.tgz#5f3d96ec6b2354ad6d8a28bf216a1d97b5426861"
integrity sha512-mB9oAsNCm9aM3/SOv4YtBMqZbYj10R7dkq8byBqxGY/ncFwhf2oQzMV+LCRlWoDSEBJ3COiR1yeDvMtsoOsuFQ==

"@grpc/grpc-js@^1.9.14", "@grpc/grpc-js@^1.9.5":
version "1.9.14"
resolved "https://registry.yarnpkg.com/@grpc/grpc-js/-/grpc-js-1.9.14.tgz#236378822876cbf7903f9d61a0330410e8dcc5a1"
Expand Down Expand Up @@ -1047,6 +1079,13 @@
dependencies:
bs58 "^5.0.0"

"@mysten/bcs@0.11.1", "@mysten/bcs@^0.11.0":
version "0.11.1"
resolved "https://registry.yarnpkg.com/@mysten/bcs/-/bcs-0.11.1.tgz#0cc0b0f5960f60cfe5cf6a8c229affa59cd09b1b"
integrity sha512-xP85isNSYUCHd3O/g+TmZYmg4wK6cU8q/n/MebkIGP4CYVJZz2wU/G24xIZ3wI+0iTop4dfgA5kYrg/DQKCUzA==
dependencies:
bs58 "^5.0.0"

"@mysten/sui.js@~0.49.1":
version "0.49.1"
resolved "https://registry.yarnpkg.com/@mysten/sui.js/-/sui.js-0.49.1.tgz#7adc391377254233bac2cad9da64619a6380beb9"
Expand All @@ -1061,6 +1100,24 @@
superstruct "^1.0.3"
tweetnacl "^1.0.3"

"@mysten/sui.js@~0.50.0":
version "0.50.1"
resolved "https://registry.yarnpkg.com/@mysten/sui.js/-/sui.js-0.50.1.tgz#f201d7cad343321f93297d9b14319b2e155d6876"
integrity sha512-AY0wb4n6PMTRsDGygzrrTHUK/m5KwKZ4aQcN9cayiwsq2iIhfjGo7uuqMA7Y5UiqvLCoF+z7Ig14Q5qejQ/S/w==
dependencies:
"@graphql-typed-document-node/core" "^3.2.0"
"@mysten/bcs" "0.11.1"
"@noble/curves" "^1.1.0"
"@noble/hashes" "^1.3.1"
"@scure/bip32" "^1.3.1"
"@scure/bip39" "^1.2.1"
"@suchipi/femver" "^1.0.0"
bech32 "^2.0.0"
gql.tada "^1.2.0"
graphql "^16.8.1"
superstruct "^1.0.3"
tweetnacl "^1.0.3"

"@noble/curves@^1.0.0", "@noble/curves@^1.1.0", "@noble/curves@~1.1.0":
version "1.1.0"
resolved "https://registry.npmjs.org/@noble/curves/-/curves-1.1.0.tgz"
Expand Down Expand Up @@ -1257,6 +1314,11 @@
resolved "https://registry.yarnpkg.com/@sentio/chain/-/chain-1.0.7.tgz#1eee87087bb9df8b226bcdbf075aa99f3cf4307b"
integrity sha512-DC8o2YOm11XsearSwCar4pLPwwxoxScgj+xzDfveofxSrKTIovkzDIFTbhZLrrZjF2jKGV5bWmpIkDBa7pRj1w==

"@sentio/chain@^1.0.9":
version "1.0.10"
resolved "https://registry.yarnpkg.com/@sentio/chain/-/chain-1.0.10.tgz#8f6f6e5ec97c5a0472987a09aee61fe04bd51726"
integrity sha512-gAeGdGeDtMNCKe5YP2hSc/HI7XZ+pCq58D2+/MG4uLRtSsig9lNjdyY+wz204p3OuwRpviSVWpV7zMuhGXBS0Q==

"@sentio/cli@^2.14.0":
version "2.14.0"
resolved "https://registry.yarnpkg.com/@sentio/cli/-/cli-2.14.0.tgz#1631f2a711406dbafe1ffb486a5a9853ef01f434"
Expand Down Expand Up @@ -1293,6 +1355,14 @@
lodash "^4.17.15"
ts-essentials "^7.0.1"

"@sentio/ethers-v6@^1.0.29":
version "1.0.29"
resolved "https://registry.yarnpkg.com/@sentio/ethers-v6/-/ethers-v6-1.0.29.tgz#0a3a5bfc1dc771e24213a17ef78107a81fa9f046"
integrity sha512-/4jZZn+eM3EfI0bUMBAf5vu8muy8ABptu8ucFoMDTZLLTjxcSKRffLP3RL7w1JHGjyC2V6oEQfwS4cn9JEohHQ==
dependencies:
lodash "^4.17.15"
ts-essentials "^7.0.1"

"@sentio/loopring-protocols@^1.0.7":
version "1.0.7"
resolved "https://registry.npmjs.org/@sentio/loopring-protocols/-/loopring-protocols-1.0.7.tgz"
Expand All @@ -1318,6 +1388,17 @@
nice-grpc-common "^2.0.2"
protobufjs "^7.2.6"

"@sentio/protos@2.32.5":
version "2.32.5"
resolved "https://registry.yarnpkg.com/@sentio/protos/-/protos-2.32.5.tgz#b444d7b5918e8b2549a57e9656e40983def811ae"
integrity sha512-VSG++Au6KjlQjVn9Z0cmMRSEUsPWIgzBi+vQTEEIj24z26yp+bG2NZkitfLq+RlE2OzUfkjVkifqgUbF75kbqQ==
dependencies:
google-protobuf "^3.21.2"
long "^5.2.3"
nice-grpc "^2.1.7"
nice-grpc-common "^2.0.2"
protobufjs "^7.2.6"

"@sentio/runtime@^2.32.1":
version "2.32.1"
resolved "https://registry.yarnpkg.com/@sentio/runtime/-/runtime-2.32.1.tgz#14fea654226eda1db2327e7dee63e678b02b453e"
Expand All @@ -1340,6 +1421,28 @@
utility-types "^3.11.0"
winston "^3.11.0"

"@sentio/runtime@^2.32.5":
version "2.32.5"
resolved "https://registry.yarnpkg.com/@sentio/runtime/-/runtime-2.32.5.tgz#830a97a49f700cc7c841538c44dbdae798e20e6a"
integrity sha512-CGAJCNDByoJFsxuC+8ILhDNreEKpYD5JPMSyJDwOW9yBokKDqXGk7uEZe6bzSL4LTrs7331y9mJoOJhM9q//IQ==
dependencies:
"@grpc/grpc-js" "^1.9.14"
"@sentio/protos" "2.32.5"
command-line-args "^5.2.1"
command-line-usage "^7.0.1"
fs-extra "^11.2.0"
google-protobuf "^3.21.2"
long "^5.2.3"
nice-grpc "^2.1.7"
nice-grpc-client-middleware-retry "^3.1.6"
nice-grpc-common "^2.0.2"
nice-grpc-error-details "^0.2.4"
nice-grpc-prometheus "^0.2.2"
prom-client "^14.2.0"
protobufjs "^7.2.6"
utility-types "^3.11.0"
winston "^3.11.0"

"@sentio/sdk@^2.32.1":
version "2.32.1"
resolved "https://registry.yarnpkg.com/@sentio/sdk/-/sdk-2.32.1.tgz#eb7887919d61ff7fa3334ffd37446c3e7ece4e4f"
Expand Down Expand Up @@ -1380,6 +1483,46 @@
utility-types "^3.11.0"
yaml "^2.3.4"

"@sentio/sdk@^2.32.5":
version "2.32.5"
resolved "https://registry.yarnpkg.com/@sentio/sdk/-/sdk-2.32.5.tgz#954044fe7519ac3314236ef4200430a9ca8ef083"
integrity sha512-aCSXlM0xeQ0OIEp4NLHtWG2kUY+7cW0zqoq2u6BZPUrcV0QugDR/1aPAxC58X2egkiyubh5xYJNNnC/ZUFzsyA==
dependencies:
"@aptos-labs/ts-sdk" "~1.7.0"
"@coral-xyz/borsh" "^0.29.0"
"@mysten/sui.js" "~0.50.0"
"@project-serum/anchor" "^0.26.0"
"@sentio/bigdecimal" "9.1.1-patch.3"
"@sentio/chain" "^1.0.9"
"@sentio/ethers-v6" "^1.0.29"
"@sentio/protos" "2.32.5"
"@sentio/runtime" "^2.32.5"
"@solana/web3.js" "^1.89.1"
"@typemove/aptos" "~1.5.4"
"@typemove/move" "~1.5.4"
"@typemove/sui" "~1.5.4"
bs58 "^5.0.0"
chalk "^5.3.0"
csv-parse "^5.5.3"
ethers "npm:@sentio/ethers@6.7.1-patch.4"
js-sha3 "^0.9.3"
lru-cache "^10.2.0"
mkdirp "^1.0.4"
nice-grpc "^2.1.7"
nice-grpc-client-middleware-retry "^3.1.6"
nice-grpc-common "^2.0.2"
nice-grpc-prometheus "^0.2.2"
node-fetch "^3.3.2"
p-queue "^8.0.1"
prettier "^3.2.4"
prettier2 "npm:prettier@2.8.8"
radash "^11.0.0"
superstruct_solana "npm:superstruct@^0.14.2"
typechain "^8.3.2"
typedoc "^0.25.7"
utility-types "^3.11.0"
yaml "^2.3.4"

"@sinclair/typebox@^0.25.16":
version "0.25.24"
resolved "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.25.24.tgz"
Expand Down Expand Up @@ -1514,6 +1657,18 @@
prettier "^3.2.4"
radash "^11.0.0"

"@typemove/aptos@~1.5.4":
version "1.5.4"
resolved "https://registry.yarnpkg.com/@typemove/aptos/-/aptos-1.5.4.tgz#cd581e2e6e020a74125132515101df7a59feb502"
integrity sha512-ZXVhHW1SJtblM7ef8Xvhf1+KswW+ZjWkhYr+Ki+8lpcQCW9Q6q362DL+42VJ1YbTyucZD9i07YeJjl/h84DHQw==
dependencies:
"@aptos-labs/ts-sdk" "~1.7.0"
"@typemove/move" "1.5.4"
chalk "^5.3.0"
commander "^12.0.0"
prettier "^3.2.4"
radash "^11.0.0"

"@typemove/move@1.5.1", "@typemove/move@~1.5.1":
version "1.5.1"
resolved "https://registry.yarnpkg.com/@typemove/move/-/move-1.5.1.tgz#61674fa418f73ae93e42c7615cb1a3eae05c4ed9"
Expand All @@ -1522,6 +1677,14 @@
chalk "^5.3.0"
radash "^11.0.0"

"@typemove/move@1.5.4", "@typemove/move@~1.5.4":
version "1.5.4"
resolved "https://registry.yarnpkg.com/@typemove/move/-/move-1.5.4.tgz#194affb747ca524f138db116bbba647fe6aa235b"
integrity sha512-iACwzLnYNkDAQxpDikKePj2tMRE6q/RBcS5NvRwysePUfzRYOvL8EAXtKnbk/dWqC2zIG+IAlmxhyeU/UPKAVw==
dependencies:
chalk "^5.3.0"
radash "^11.0.0"

"@typemove/sui@~1.5.1":
version "1.5.1"
resolved "https://registry.yarnpkg.com/@typemove/sui/-/sui-1.5.1.tgz#12845b6854e0dc854bc8d7ef8eeaf12e419b9c3c"
Expand All @@ -1535,6 +1698,19 @@
prettier "^3.2.4"
radash "^11.0.0"

"@typemove/sui@~1.5.4":
version "1.5.4"
resolved "https://registry.yarnpkg.com/@typemove/sui/-/sui-1.5.4.tgz#1838cfb214e6ef304dae9a52cfb436c3770a4128"
integrity sha512-y6KvOEfXwU1x17gQMFXzoKgs7J6Fm7DgEgjK5gqycdOP02bsDdS0duijm4WyVOQ+6nxR/b6D2bZW6NMd8S6RUA==
dependencies:
"@mysten/bcs" "^0.11.0"
"@mysten/sui.js" "~0.50.0"
"@typemove/move" "1.5.4"
chalk "^5.3.0"
commander "^12.0.0"
prettier "^3.2.4"
radash "^11.0.0"

"@types/babel__core@^7.1.14":
version "7.20.1"
resolved "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.1.tgz"
Expand Down Expand Up @@ -1737,6 +1913,11 @@
dependencies:
"@types/yargs-parser" "*"

"@urql/introspection@^1.0.3":
version "1.0.3"
resolved "https://registry.yarnpkg.com/@urql/introspection/-/introspection-1.0.3.tgz#e35ffe8aa03e91df7472b07d7d730d8bb029ec10"
integrity sha512-5zgnfUDV10c3qudqYvfZ/rOtWVB2QvqanmoDMttqpt+TCCPkSUZdb2qcLCEB6DL7ph8mQRTZhXI29J57nTnqKg==

JSONStream@^1.3.5:
version "1.3.5"
resolved "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz"
Expand Down Expand Up @@ -2139,6 +2320,11 @@ bcrypt-pbkdf@^1.0.0:
dependencies:
tweetnacl "^0.14.3"

bech32@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/bech32/-/bech32-2.0.0.tgz#078d3686535075c8c79709f054b1b226a133b355"
integrity sha512-LcknSilhIGatDAsY1ak2I8VtGaHNhgMSYVxFrGLXv+xLHytaKZKcaUJJUE7qmBr7h33o5YQwP55pMI0xmkpJwg==

bigint-buffer@^1.1.5:
version "1.1.5"
resolved "https://registry.npmjs.org/bigint-buffer/-/bigint-buffer-1.1.5.tgz"
Expand Down Expand Up @@ -2721,6 +2907,11 @@ commander@^11.1.0:
resolved "https://registry.yarnpkg.com/commander/-/commander-11.1.0.tgz#62fdce76006a68e5c1ab3314dc92e800eb83d906"
integrity sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ==

commander@^12.0.0:
version "12.0.0"
resolved "https://registry.yarnpkg.com/commander/-/commander-12.0.0.tgz#b929db6df8546080adfd004ab215ed48cf6f2592"
integrity sha512-MwVNWlYjDTtOjX5PiD7o5pK0UrFU/OYgcJfjjK4RaHZETNtjJqrZa9Y9ds88+A+f+d5lv+561eZ+yCKoS3gbAA==

commander@^2.20.3:
version "2.20.3"
resolved "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz"
Expand Down Expand Up @@ -4169,6 +4360,14 @@ got@^13.0.0:
p-cancelable "^3.0.0"
responselike "^3.0.0"

gql.tada@^1.2.0:
version "1.3.2"
resolved "https://registry.yarnpkg.com/gql.tada/-/gql.tada-1.3.2.tgz#cd3f4534aa4f7baf6578adcfde517c8e905887d6"
integrity sha512-8Ts3y/FCI2nL5i0sOwmHNE8RTsPBwqTjezOlK2H0A+433ndym5BgIoEKH3AQnwiCK3VYFu6tYUeme43UthyFbQ==
dependencies:
"@0no-co/graphql.web" "^1.0.4"
"@gql.tada/cli-utils" "0.1.1"

graceful-fs@4.2.10:
version "4.2.10"
resolved "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz"
Expand All @@ -4179,6 +4378,11 @@ graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.9:
resolved "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz"
integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==

graphql@^16.8.1:
version "16.8.1"
resolved "https://registry.yarnpkg.com/graphql/-/graphql-16.8.1.tgz#1930a965bef1170603702acdb68aedd3f3cf6f07"
integrity sha512-59LZHPdGZVh695Ud9lRzPBVTtlX9ZCV150Er2W43ro37wVof0ctenSaskPPjN7lVTIN8mSZt8PHUNKZuNQUuxw==

har-schema@^2.0.0:
version "2.0.0"
resolved "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz"
Expand Down

0 comments on commit 23e0e58

Please sign in to comment.