-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: deprecate network URLs, add asset ID and chain ID for mainnet (#…
…3107) * export `MAINNET_NETWORK_URL` * add chainid and assetid for mainnet * add changeset * update changeset * update changeset * remove constant, add deprecation notice * update changeset * replace all url constant instances w hardcoded values * fix test * rename variable * move constants inside `@internal/utils` * fix test * re-use tsup config * Delete vite.config.ts.timestamp-1725856816588-3e7d000dce87b.mjs * update changeset Co-authored-by: Peter Smith <[email protected]> --------- Co-authored-by: Peter Smith <[email protected]>
- Loading branch information
1 parent
65f3e04
commit c98461f
Showing
22 changed files
with
109 additions
and
45 deletions.
There are no files selected for viewing
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,6 @@ | ||
--- | ||
"@fuel-ts/account": patch | ||
"create-fuels": patch | ||
--- | ||
|
||
chore: deprecate network URLs, add asset ID and chain ID for mainnet |
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
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 @@ | ||
This package contains some internal utilities used by the SDK, which we don't want to export to our users. |
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,26 @@ | ||
{ | ||
"private": true, | ||
"name": "@internal/utils", | ||
"version": "0.0.1", | ||
"main": "dist/index.js", | ||
"module": "dist/index.mjs", | ||
"types": "dist/index.d.ts", | ||
"exports": { | ||
".": { | ||
"require": "./dist/index.js", | ||
"import": "./dist/index.mjs", | ||
"types": "./dist/index.d.ts" | ||
} | ||
}, | ||
"files": [ | ||
"dist" | ||
], | ||
"scripts": { | ||
"build": "tsup", | ||
"postbuild": "tsx ../../scripts/postbuild.ts" | ||
}, | ||
"license": "Apache-2.0", | ||
"devDependencies": { | ||
"@internal/tsup": "workspace:*" | ||
} | ||
} |
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,2 @@ | ||
export const DEVNET_NETWORK_URL = 'https://devnet.fuel.network/v1/graphql'; | ||
export const TESTNET_NETWORK_URL = 'https://testnet.fuel.network/v1/graphql'; |
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 @@ | ||
export * from './constants'; |
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,7 @@ | ||
{ | ||
"extends": "../../tsconfig.base.json", | ||
"compilerOptions": { | ||
"outDir": "./dist" | ||
}, | ||
"include": ["src"] | ||
} |
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,3 @@ | ||
import { index } from '@internal/tsup'; | ||
|
||
export default index; |
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 |
---|---|---|
@@ -1,15 +1,17 @@ | ||
import { DEVNET_NETWORK_URL, TESTNET_NETWORK_URL } from '@internal/utils'; | ||
|
||
/** | ||
* @group node | ||
* @group browser | ||
*/ | ||
describe('Configs', () => { | ||
it('exports DEVNET_NETWORK_URL', async () => { | ||
const configs = await import('./configs'); | ||
expect(configs.DEVNET_NETWORK_URL).toBe('https://devnet.fuel.network/v1/graphql'); | ||
expect(configs.DEVNET_NETWORK_URL).toBe(DEVNET_NETWORK_URL); | ||
}); | ||
|
||
it('exports TESTNET_NETWORK_URL', async () => { | ||
const configs = await import('./configs'); | ||
expect(configs.TESTNET_NETWORK_URL).toBe('https://testnet.fuel.network/v1/graphql'); | ||
expect(configs.TESTNET_NETWORK_URL).toBe(TESTNET_NETWORK_URL); | ||
}); | ||
}); |
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 |
---|---|---|
@@ -1,4 +1,9 @@ | ||
/** | ||
* @deprecated This export is deprecated and will be removed in the future. | ||
*/ | ||
export const DEVNET_NETWORK_URL = 'https://devnet.fuel.network/v1/graphql'; | ||
|
||
/** | ||
* @deprecated This export is deprecated and will be removed in the future. | ||
*/ | ||
export const TESTNET_NETWORK_URL = 'https://testnet.fuel.network/v1/graphql'; | ||
// TODO: replace placeholder with mainnet network url | ||
// export const NETWORK_URL = ''; |
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 |
---|---|---|
|
@@ -6,5 +6,6 @@ export const CHAIN_IDS = { | |
fuel: { | ||
devnet: 0, | ||
testnet: 0, | ||
mainnet: 9889, | ||
}, | ||
}; |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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