-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
24 changed files
with
342 additions
and
322 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -460,6 +460,7 @@ fastnode | |
feegrant | ||
feegrantkeeper | ||
feegrantmodule | ||
feegrants | ||
fetchurl | ||
fetchzip | ||
fields | ||
|
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
typescript-sdk/scripts/from-union.ts → typescript-sdk/playground/from-union.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
typescript-sdk/scripts/osmosis-to-union.ts → ...script-sdk/playground/osmosis-to-union.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
typescript-sdk/scripts/to-sepolia.ts → typescript-sdk/playground/to-sepolia.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
#!/usr/bin/env bun | ||
import * as Bun from "bun" | ||
import { UnionClient } from "#mod.ts" | ||
import { consola } from "./logger.ts" | ||
import { parseArgs } from "node:util" | ||
import currentContracts_ from "~root/versions/contracts.json" with { type: "json" } | ||
|
||
/** | ||
* Use this script to publish a new version of the TypeScript SDK to JSR registry | ||
* This will check if the contracts in the SDK are up to date with the contracts in the registry | ||
* If not it will fail | ||
* | ||
* Usage: | ||
* | ||
* `bun scripts/publish` | ||
* `bun scripts/publish --dry-run` | ||
*/ | ||
|
||
const { values } = parseArgs({ | ||
args: process.argv.slice(2), | ||
options: { "dry-run": { type: "boolean", default: false } } | ||
}) | ||
|
||
const DRY_RUN = values["dry-run"] ?? false | ||
|
||
main().catch(_ => { | ||
consola.error(_) | ||
process.exit(1) | ||
}) | ||
|
||
async function main() { | ||
// TODO: Check if the version in jsr.json is bumped | ||
// const versionBumped = Bun.$`git diff --quiet jsr.json && echo false || echo true` | ||
|
||
/** | ||
* Compare contracts in the current version of the SDK with the up to date contracts in $REPO_ROOT/versions/contracts.json. | ||
*/ | ||
|
||
const { chainId, latest, ...currentContracts } = currentContracts_.find( | ||
c => c.latest === true | ||
) as (typeof currentContracts_)[0] | ||
|
||
const pkgContracts = UnionClient.getContractAddresses() | ||
|
||
if (!Bun.deepEquals(currentContracts, pkgContracts, true)) { | ||
consola.fail("Contracts in the SDK are outdated:") | ||
consola.box(JSON.stringify({ currentContracts, pkgContracts }, undefined, 2)) | ||
} | ||
|
||
if (DRY_RUN) return Bun.$ /* sh */`bunx jsr publish --allow-dirty --allow-slow-types --dry-run` | ||
|
||
return Bun.$ /* sh */`bunx jsr publish --allow-dirty --allow-slow-types` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.