@fairblock/stabletrust 2.0.12 → 2.0.13
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/package.json +1 -1
- package/src/backend.js +1 -0
- package/src/confidential-client.js +4 -3
- package/src/constants.js +1 -0
package/package.json
CHANGED
package/src/backend.js
CHANGED
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
ANONYMOUS_IPFS_TRANSFER_FEE_SIGNATURE,
|
|
10
10
|
ANONYMOUS_INLINE_TRANSFER_FEE_SIGNATURE,
|
|
11
11
|
getStabletrustContractAddress,
|
|
12
|
+
STABLETRUST_CONTRACTS_BY_CHAIN_ID,
|
|
12
13
|
} from "./constants.js";
|
|
13
14
|
import { deriveKeys, decryptCiphertext, combineCiphertext } from "./crypto.js";
|
|
14
15
|
import {
|
|
@@ -76,9 +77,9 @@ export class ConfidentialTransferClient {
|
|
|
76
77
|
throw new Error("chainId is required");
|
|
77
78
|
}
|
|
78
79
|
if (!resolvedContractAddress) {
|
|
79
|
-
const supportedChainIds =
|
|
80
|
-
|
|
81
|
-
|
|
80
|
+
const supportedChainIds = Object.keys(
|
|
81
|
+
STABLETRUST_CONTRACTS_BY_CHAIN_ID,
|
|
82
|
+
).join(", ");
|
|
82
83
|
throw new Error(
|
|
83
84
|
`contractAddress is required for chainId ${resolvedChainId}. No default Stabletrust contract is configured for this chain. Supported chainIds: ${supportedChainIds}`,
|
|
84
85
|
);
|
package/src/constants.js
CHANGED
|
@@ -69,6 +69,7 @@ export const STABLETRUST_CONTRACTS_BY_CHAIN_ID = Object.freeze({
|
|
|
69
69
|
11155111: "0x7507a13352AFAa79D33E994f86f2f62463ba8DE4", //Ethereum
|
|
70
70
|
421614: "0x5acECCdeb5CbD3C727eCB49F8706Eb80EF2f977F", //Arbitrum
|
|
71
71
|
42431: "0xE559fB936C69c46E216bf61B07C16bF1a6d444aa", //Tempo
|
|
72
|
+
42161: "0xCAA6384D5Ac8b9111D482dd676BB890f2b6e9513", //Arbitrum One (mainnet)
|
|
72
73
|
});
|
|
73
74
|
|
|
74
75
|
export function getStabletrustContractAddress(chainId) {
|