Skip to content
This repository was archived by the owner on Apr 3, 2023. It is now read-only.

Commit

Permalink
Bump common-js dependency versions + small refactor (#73)
Browse files Browse the repository at this point in the history
* Bump pyth-common-js version on upstream pkgs

* Bump pyth-aptos-js to 1.0.0 + fix lint issue

* Bump pyth-terra-js package

* Update Readme

* Update env access to fix tsc error
  • Loading branch information
ali-bahjati authored Dec 15, 2022
1 parent b2192f9 commit f9bcf3f
Show file tree
Hide file tree
Showing 8 changed files with 60 additions and 58 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ We require the [pre-commit hooks](https://pre-commit.com/) defined in [`.pre-com
We use [Semantic Versioning](https://semver.org/) for our releases. In order to release a new version of any of the packages and publish it to npm, follow these steps:

1. Run `npm version <new version number> --no-git-tag-version`. This command will update the version of the package. Then push your changes to github.
2. Once your change is merged into `main`, create a release with tag `<package>:v<new version number>` like `pyth-evm-js:v1.5.2`, and a github action will automatically publish the new version of this package to npm.
2. Once your change is merged into `main`, create a release with tag `<package>-v<new version number>` like `pyth-evm-js-v1.5.2`, and a github action will automatically publish the new version of this package to npm.
34 changes: 17 additions & 17 deletions pyth-aptos-js/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions pyth-aptos-js/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pythnetwork/pyth-aptos-js",
"version": "0.2.0",
"version": "1.0.0",
"description": "Pyth Network Aptos Utilities",
"homepage": "https://pyth.network",
"author": {
Expand Down Expand Up @@ -47,7 +47,7 @@
"yargs": "^17.4.1"
},
"dependencies": {
"@pythnetwork/pyth-common-js": "^1.0.0",
"@pythnetwork/pyth-common-js": "^1.2.0",
"aptos": "^1.3.14",
"buffer": "^6.0.3"
}
Expand Down
8 changes: 5 additions & 3 deletions pyth-aptos-js/src/examples/AptosRelay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ import { hideBin } from "yargs/helpers";
import { AptosPriceServiceConnection } from "../index";
import { AptosAccount, AptosClient, TxnBuilderTypes } from "aptos";

const APTOS_KEY = "APTOS_KEY";

const argv = yargs(hideBin(process.argv))
.option("price-ids", {
description:
Expand Down Expand Up @@ -45,7 +43,11 @@ async function run() {
);

// Update the Pyth Contract using this update data
const sender = new AptosAccount(Buffer.from(process.env[APTOS_KEY]!, "hex"));
if (process.env.APTOS_KEY === undefined) {
throw new Error(`APTOS_KEY environment variable should be set.`);
}

const sender = new AptosAccount(Buffer.from(process.env.APTOS_KEY, "hex"));
const client = new AptosClient(argv.fullNode);
const result = await client.generateSignSubmitWaitForTransaction(
sender,
Expand Down
30 changes: 15 additions & 15 deletions pyth-evm-js/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyth-evm-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"yargs": "^17.4.1"
},
"dependencies": {
"@pythnetwork/pyth-common-js": "^1.0.0",
"@pythnetwork/pyth-common-js": "^1.2.0",
"buffer": "^6.0.3"
}
}
34 changes: 17 additions & 17 deletions pyth-terra-js/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions pyth-terra-js/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pythnetwork/pyth-terra-js",
"version": "1.0.0",
"version": "1.1.0",
"description": "Pyth Network Terra Utils in JS",
"homepage": "https://pyth.network",
"author": {
Expand Down Expand Up @@ -43,7 +43,7 @@
"yargs": "^17.4.1"
},
"dependencies": {
"@pythnetwork/pyth-common-js": "^1.0.0",
"@pythnetwork/pyth-common-js": "^1.2.0",
"@terra-money/terra.js": "^3.0.11",
"axios": "^0.26.1"
}
Expand Down

0 comments on commit f9bcf3f

Please sign in to comment.