@cityofzion/bs-ethereum 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.rush/temp/operation/build/state.json +1 -1
- package/.rush/temp/package-deps_build.json +6 -6
- package/CHANGELOG.json +24 -0
- package/CHANGELOG.md +15 -1
- package/dist/BSEthereum.js +1 -4
- package/dist/graphql.js +1 -4
- package/package.json +1 -1
- package/src/BSEthereum.ts +1 -4
- package/src/__tests__/BitqueryEDSEthereum.spec.ts +6 -0
- package/src/graphql.ts +1 -4
|
@@ -2,23 +2,23 @@
|
|
|
2
2
|
"files": {
|
|
3
3
|
"packages/bs-ethereum/.eslintignore": "3ee402c88b68258919e4f4b4eef4f25e5d078d90",
|
|
4
4
|
"packages/bs-ethereum/.eslintrc.cjs": "5ec0bf6332ec01b3e02beb532bb47025c4c1bf7b",
|
|
5
|
-
"packages/bs-ethereum/CHANGELOG.json": "
|
|
6
|
-
"packages/bs-ethereum/CHANGELOG.md": "
|
|
5
|
+
"packages/bs-ethereum/CHANGELOG.json": "e9deaab142df67f914c0937a354e52d95788e123",
|
|
6
|
+
"packages/bs-ethereum/CHANGELOG.md": "df6978b6ed3433dd4fea769889161b1b95ef68e7",
|
|
7
7
|
"packages/bs-ethereum/jest.config.ts": "d944475db93cbe41a9339187fd94b9962e411c43",
|
|
8
8
|
"packages/bs-ethereum/jest.setup.ts": "9a1976a32050616d4d2ee95b1aa21041bc4daca3",
|
|
9
|
-
"packages/bs-ethereum/package.json": "
|
|
10
|
-
"packages/bs-ethereum/src/BSEthereum.ts": "
|
|
9
|
+
"packages/bs-ethereum/package.json": "c601b40f37debd8788b2aab66e4a2387bbb821e8",
|
|
10
|
+
"packages/bs-ethereum/src/BSEthereum.ts": "21e03098208f6764ca8848cc344a6268ff16262c",
|
|
11
11
|
"packages/bs-ethereum/src/BitqueryBDSEthereum.ts": "47f24d0f3a94aa0eb761e1c2e96f6aeb9c51f82b",
|
|
12
12
|
"packages/bs-ethereum/src/BitqueryEDSEthereum.ts": "a1232bf1d1683d7fe0e752577f3eb489cfce734f",
|
|
13
13
|
"packages/bs-ethereum/src/GhostMarketNDSEthereum.ts": "7768175d74e42759582273f7f0ae4dff5054c2ca",
|
|
14
14
|
"packages/bs-ethereum/src/RpcBDSEthereum.ts": "6cbca256420b09cef7182cbc485eb4799ff9b614",
|
|
15
15
|
"packages/bs-ethereum/src/__tests__/BDSEthereum.spec.ts": "b5d64fe975c82fb604f15717ede1707d016d1f9d",
|
|
16
16
|
"packages/bs-ethereum/src/__tests__/BSEthereum.spec.ts": "4d123a45f1431ad00db142522423359122b692b7",
|
|
17
|
-
"packages/bs-ethereum/src/__tests__/BitqueryEDSEthereum.spec.ts": "
|
|
17
|
+
"packages/bs-ethereum/src/__tests__/BitqueryEDSEthereum.spec.ts": "a0994e0ad66408b281ec96a5f72b30b5e14a68ce",
|
|
18
18
|
"packages/bs-ethereum/src/__tests__/GhostMarketNDSEthereum.spec.ts": "f5c9ba8f6c866b97bcf647d105bfa2d5f140180d",
|
|
19
19
|
"packages/bs-ethereum/src/assets/tokens/common.json": "96597dd06475ee6068b484510f27ffad27b52ebd",
|
|
20
20
|
"packages/bs-ethereum/src/constants.ts": "03fa0c2e94d53e42f1b81e66f736807364b60f16",
|
|
21
|
-
"packages/bs-ethereum/src/graphql.ts": "
|
|
21
|
+
"packages/bs-ethereum/src/graphql.ts": "2e759e198a9a37205ed115c41165eda18df66539",
|
|
22
22
|
"packages/bs-ethereum/src/index.ts": "69ca9c23acdd0afd70f7eaa0a840b07b62bdb07a",
|
|
23
23
|
"packages/bs-ethereum/tsconfig.build.json": "4dc23fb9c4c5e4d19a9bc3947a47c523f4bd967c",
|
|
24
24
|
"packages/bs-ethereum/tsconfig.json": "93e09769572b58e642d4990e9552c70a8b85e142",
|
package/CHANGELOG.json
CHANGED
|
@@ -1,6 +1,30 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cityofzion/bs-ethereum",
|
|
3
3
|
"entries": [
|
|
4
|
+
{
|
|
5
|
+
"version": "1.0.2",
|
|
6
|
+
"tag": "@cityofzion/bs-ethereum_v1.0.2",
|
|
7
|
+
"date": "Tue, 27 Feb 2024 20:29:09 GMT",
|
|
8
|
+
"comments": {
|
|
9
|
+
"patch": [
|
|
10
|
+
{
|
|
11
|
+
"comment": "Remove the mining wait in the transfer method to avoid long promises that take time to resolve."
|
|
12
|
+
}
|
|
13
|
+
]
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"version": "1.0.1",
|
|
18
|
+
"tag": "@cityofzion/bs-ethereum_v1.0.1",
|
|
19
|
+
"date": "Thu, 22 Feb 2024 16:49:56 GMT",
|
|
20
|
+
"comments": {
|
|
21
|
+
"patch": [
|
|
22
|
+
{
|
|
23
|
+
"comment": "Fix getTokenPrices that is returning a wrong price for ETH token address"
|
|
24
|
+
}
|
|
25
|
+
]
|
|
26
|
+
}
|
|
27
|
+
},
|
|
4
28
|
{
|
|
5
29
|
"version": "1.0.0",
|
|
6
30
|
"tag": "@cityofzion/bs-ethereum_v1.0.0",
|
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
# Change Log - @cityofzion/bs-ethereum
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Tue, 27 Feb 2024 20:29:09 GMT and should not be manually modified.
|
|
4
|
+
|
|
5
|
+
## 1.0.2
|
|
6
|
+
Tue, 27 Feb 2024 20:29:09 GMT
|
|
7
|
+
|
|
8
|
+
### Patches
|
|
9
|
+
|
|
10
|
+
- Remove the mining wait in the transfer method to avoid long promises that take time to resolve.
|
|
11
|
+
|
|
12
|
+
## 1.0.1
|
|
13
|
+
Thu, 22 Feb 2024 16:49:56 GMT
|
|
14
|
+
|
|
15
|
+
### Patches
|
|
16
|
+
|
|
17
|
+
- Fix getTokenPrices that is returning a wrong price for ETH token address
|
|
4
18
|
|
|
5
19
|
## 1.0.0
|
|
6
20
|
Fri, 16 Feb 2024 16:13:22 GMT
|
package/dist/BSEthereum.js
CHANGED
|
@@ -144,10 +144,7 @@ class BSEthereum {
|
|
|
144
144
|
value: amount,
|
|
145
145
|
});
|
|
146
146
|
}
|
|
147
|
-
|
|
148
|
-
if (!transactionMined)
|
|
149
|
-
throw new Error('Transaction not mined');
|
|
150
|
-
return transactionMined.transactionHash;
|
|
147
|
+
return transaction.hash;
|
|
151
148
|
});
|
|
152
149
|
}
|
|
153
150
|
calculateTransferFee({ senderAccount, intent }) {
|
package/dist/graphql.js
CHANGED
|
@@ -141,10 +141,7 @@ exports.bitqueryGetBalanceQuery = (0, core_1.gql) `
|
|
|
141
141
|
exports.bitqueryGetPricesQuery = (0, core_1.gql) `
|
|
142
142
|
query getPrice($after: ISO8601DateTime!, $network: EthereumNetwork!) {
|
|
143
143
|
ethereum(network: $network) {
|
|
144
|
-
dexTrades(
|
|
145
|
-
options: { limitBy: { each: "baseCurrency.address", limit: 1 }, desc: "date.date" }
|
|
146
|
-
time: { after: $after }
|
|
147
|
-
) {
|
|
144
|
+
dexTrades(options: { desc: "date.date" }, time: { after: $after }) {
|
|
148
145
|
quoteCurrency(quoteCurrency: { is: "0xdac17f958d2ee523a2206206994597c13d831ec7" }) {
|
|
149
146
|
symbol
|
|
150
147
|
address
|
package/package.json
CHANGED
package/src/BSEthereum.ts
CHANGED
|
@@ -148,10 +148,7 @@ export class BSEthereum<BSCustomName extends string = string>
|
|
|
148
148
|
})
|
|
149
149
|
}
|
|
150
150
|
|
|
151
|
-
|
|
152
|
-
if (!transactionMined) throw new Error('Transaction not mined')
|
|
153
|
-
|
|
154
|
-
return transactionMined.transactionHash
|
|
151
|
+
return transaction.hash
|
|
155
152
|
}
|
|
156
153
|
|
|
157
154
|
async calculateTransferFee({ senderAccount, intent }: TransferParam): Promise<string> {
|
|
@@ -46,4 +46,10 @@ describe('FlamingoEDSNeo3', () => {
|
|
|
46
46
|
})
|
|
47
47
|
})
|
|
48
48
|
})
|
|
49
|
+
|
|
50
|
+
it('Should return the ETH price in USD', async () => {
|
|
51
|
+
const tokenPriceList = await bitqueryEDSEthereum.getTokenPrices('USD')
|
|
52
|
+
|
|
53
|
+
expect(tokenPriceList).toEqual(expect.arrayContaining([{ symbol: 'ETH', hash: '-', price: expect.any(Number) }]))
|
|
54
|
+
})
|
|
49
55
|
})
|
package/src/graphql.ts
CHANGED
|
@@ -269,10 +269,7 @@ export type BitQueryGetTokenPricesVariables = {
|
|
|
269
269
|
export const bitqueryGetPricesQuery = gql<BitQueryGetTokenPricesResponse, BitQueryGetTokenPricesVariables>`
|
|
270
270
|
query getPrice($after: ISO8601DateTime!, $network: EthereumNetwork!) {
|
|
271
271
|
ethereum(network: $network) {
|
|
272
|
-
dexTrades(
|
|
273
|
-
options: { limitBy: { each: "baseCurrency.address", limit: 1 }, desc: "date.date" }
|
|
274
|
-
time: { after: $after }
|
|
275
|
-
) {
|
|
272
|
+
dexTrades(options: { desc: "date.date" }, time: { after: $after }) {
|
|
276
273
|
quoteCurrency(quoteCurrency: { is: "0xdac17f958d2ee523a2206206994597c13d831ec7" }) {
|
|
277
274
|
symbol
|
|
278
275
|
address
|