Skip to content

Commit a6576a4

Browse files
authored
Merge pull request #554 from InjectiveLabs/dev
PRv1.15
2 parents 2f6892e + fb65dd2 commit a6576a4

File tree

86 files changed

+1556
-355
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+1556
-355
lines changed

.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
TEST_PRIVATE_KEY=
2-
TEST_SEED_PHASE=
2+
TEST_SEED_PHRASE=

.gitbook/core-modules-and-examples/peggy.md

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,14 @@ This message is used to withdraw funds from the Injective Chain via the [peggy c
99
Note that a $10 USD bridge fee will be charged for this transaction to cover for the ethereum gas fee on top of the standard INJ transaction fee.
1010

1111
```ts
12-
import {
13-
TokenPrice,
14-
MsgSendToEth,
15-
DenomClientAsync,
16-
MsgBroadcasterWithPk,
17-
} from '@injectivelabs/sdk-ts'
12+
import { TokenPrice, MsgSendToEth, DenomClientAsync, TokenStaticFactory, MsgBroadcasterWithPk } from '@injectivelabs/sdk-ts'
1813
import { BigNumberInBase } from '@injectivelabs/utils'
1914
import { ChainId } from '@injectivelabs/ts-types'
2015
import { getNetworkEndpoints, Network } from '@injectivelabs/networks'
2116
// refer to https://docs.ts.injective.network/readme/assets/injective-list
2217
import { tokens } from '../data/tokens.json'
2318

24-
export const tokenFactoryStatic = new TokenFactoryStatic(
25-
tokens as TokenStatic[],
26-
)
19+
export const tokenStaticFactory = new TokenStaticFactory(tokens as TokenStatic[])
2720

2821
const tokenPriceMap = new TokenPrice(Network.Mainnet)
2922
const tokenService = new TokenService({
@@ -38,7 +31,7 @@ const denomClient = new DenomClientAsync(Network.Mainnet, {
3831
})
3932

4033
const tokenSymbol = 'INJ'
41-
const tokenMeta = tokenFactoryStatic.toToken(tokenSymbol)
34+
const tokenMeta = tokenStaticFactory.toToken(tokenSymbol)
4235

4336
const amount = 1
4437
const injectiveAddress = 'inj1...'
@@ -50,12 +43,8 @@ if (!tokenMeta) {
5043
}
5144

5245
const tokenUsdPrice = tokenPriceMap[tokenMeta.coinGeckoId]
53-
const amountToFixed = new BigNumberInBase(amount)
54-
.toWei(tokenMeta.decimals)
55-
.toFixed()
56-
const bridgeFeeInToken = new BigNumberInBase(ETH_BRIDGE_FEE_IN_USD)
57-
.dividedBy(tokenUsdPrice)
58-
.toFixed()
46+
const amountToFixed = new BigNumberInBase(amount).toWei(tokenMeta.decimals).toFixed()
47+
const bridgeFeeInToken = new BigNumberInBase(ETH_BRIDGE_FEE_IN_USD).dividedBy(tokenUsdPrice).toFixed()
5948

6049
const msg = MsgSendToEth.fromJSON({
6150
injectiveAddress,

.gitbook/getting-started/assets/injective-list.md

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,17 @@ Here is an example of how to integrate injective-list with the TokenFactoryStati
77
1. Download the injective list json file from github:
88
https://github.com/InjectiveLabs/injective-lists?tab=readme-ov-file#-usage
99

10-
2. Use the `TokenFactoryStatic` class from the `sdk-ts` package
10+
2. Use the `TokenStaticFactory` class from the `sdk-ts` package
1111

1212
```ts
13-
import {
14-
TokenType,
15-
TokenStatic,
16-
TokenFactoryStatic,
17-
} from '@injectivelabs/sdk-ts'
13+
import { TokenType, TokenStatic, TokenStaticFactory } from '@injectivelabs/sdk-ts'
1814
import { tokens } from '../data/tokens.json' // json file downloaded from step 1
1915
20-
export const tokenFactoryStatic = new TokenFactoryStatic(
21-
tokens as TokenStatic[],
22-
)
16+
export const tokenStaticFactory = new TokenStaticFactory(tokens as TokenStatic[])
2317

2418
// After instantiating, we can start using it in our dApp
2519
const denom = 'peggy0x...'
26-
const token = tokenFactoryStatic.toToken(denom)
20+
const token = tokenStaticFactory.toToken(denom)
2721

2822
console.log(token)
2923
```

.github/workflows/dev.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ jobs:
4747

4848
- name: Version and publish
4949
run: |
50-
lerna version prerelease --preid beta --force-git-tag --no-changelog --yes
51-
lerna publish from-git --force-git-tag --dist-tag next --yes --summary-file
50+
lerna version patch --force-git-tag --no-changelog --yes
51+
lerna publish from-git --force-git-tag --yes --summary-file
5252
5353
env:
5454
GH_TOKEN: ${{ secrets.GH_TOKEN }}

lerna.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
{
22
"npmClient": "yarn",
33
"name": "injective-ts",
4-
"packages": [
5-
"packages/*",
6-
"packages/wallets/*"
7-
],
4+
"packages": ["packages/*", "packages/wallets/*"],
85
"version": "independent",
96
"command": {
107
"version": {

packages/exceptions/CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,22 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## [1.15.1](https://github.com/InjectiveLabs/injective-ts/compare/@injectivelabs/[email protected]...@injectivelabs/[email protected]) (2025-04-22)
7+
8+
**Note:** Version bump only for package @injectivelabs/exceptions
9+
10+
11+
12+
13+
14+
# [1.15.0](https://github.com/InjectiveLabs/injective-ts/compare/@injectivelabs/[email protected]...@injectivelabs/[email protected]) (2025-04-22)
15+
16+
**Note:** Version bump only for package @injectivelabs/exceptions
17+
18+
19+
20+
21+
622
## [1.14.42](https://github.com/InjectiveLabs/injective-ts/compare/@injectivelabs/[email protected]...@injectivelabs/[email protected]) (2025-03-06)
723

824
**Note:** Version bump only for package @injectivelabs/exceptions

packages/exceptions/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@injectivelabs/exceptions",
33
"description": "List of exceptions that can be reused throughout Injective's projects.",
4-
"version": "1.14.43-beta.2",
4+
"version": "1.15.1",
55
"sideEffects": false,
66
"license": "Apache-2.0",
77
"type": "module",

packages/networks/CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,22 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## [1.15.1](https://github.com/InjectiveLabs/injective-ts/compare/@injectivelabs/[email protected]...@injectivelabs/[email protected]) (2025-04-22)
7+
8+
**Note:** Version bump only for package @injectivelabs/networks
9+
10+
11+
12+
13+
14+
# [1.15.0](https://github.com/InjectiveLabs/injective-ts/compare/@injectivelabs/[email protected]...@injectivelabs/[email protected]) (2025-04-22)
15+
16+
**Note:** Version bump only for package @injectivelabs/networks
17+
18+
19+
20+
21+
622
## [1.14.42](https://github.com/InjectiveLabs/injective-ts/compare/@injectivelabs/[email protected]...@injectivelabs/[email protected]) (2025-03-06)
723

824
**Note:** Version bump only for package @injectivelabs/networks

packages/networks/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@injectivelabs/networks",
33
"description": "Endpoints, networks, etc. Can be reused throughout Injective's projects.",
4-
"version": "1.14.43-beta.1",
4+
"version": "1.15.1",
55
"sideEffects": false,
66
"type": "module",
77
"license": "Apache-2.0",
@@ -56,7 +56,7 @@
5656
"start": "node dist/index.js"
5757
},
5858
"dependencies": {
59-
"@injectivelabs/ts-types": "^1.14.43-beta.0"
59+
"@injectivelabs/ts-types": "^1.15.1"
6060
},
6161
"devDependencies": {
6262
"shx": "^0.3.4"

packages/sdk-ts/CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,22 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## [1.15.1](https://github.com/InjectiveLabs/injective-ts/compare/@injectivelabs/[email protected]...@injectivelabs/[email protected]) (2025-04-22)
7+
8+
**Note:** Version bump only for package @injectivelabs/sdk-ts
9+
10+
11+
12+
13+
14+
# [1.15.0](https://github.com/InjectiveLabs/injective-ts/compare/@injectivelabs/[email protected]...@injectivelabs/[email protected]) (2025-04-22)
15+
16+
**Note:** Version bump only for package @injectivelabs/sdk-ts
17+
18+
19+
20+
21+
622
## [1.14.43](https://github.com/InjectiveLabs/injective-ts/compare/@injectivelabs/[email protected]...@injectivelabs/[email protected]) (2025-03-06)
723

824
**Note:** Version bump only for package @injectivelabs/sdk-ts

0 commit comments

Comments
 (0)