feat: add new evm token SOL support

This commit is contained in:
c4605
2025-04-05 09:41:56 +02:00
parent c6c77f1bab
commit db3751512d
3 changed files with 19 additions and 0 deletions

View File

@@ -224,6 +224,7 @@ const _getOnChainConfigsImpl = async (
ONCHAIN_CONFIG_KEY.TOKEN_TRUMP,
ONCHAIN_CONFIG_KEY.TOKEN_GHIBLICZ,
ONCHAIN_CONFIG_KEY.TOKEN_ETH,
ONCHAIN_CONFIG_KEY.TOKEN_SOL,
],
],
}).catch(err => {
@@ -272,6 +273,7 @@ const _getOnChainConfigsImpl = async (
[EVMToken.TRUMP]: maybeAddress(configs[18]),
[EVMToken.GHIBLICZ]: maybeAddress(configs[19]),
[EVMToken.ETH]: maybeAddress(configs[20]),
[EVMToken.SOL]: maybeAddress(configs[21]),
}
}
function maybeAddress(value: string | null): Address | undefined {
@@ -324,4 +326,7 @@ enum ONCHAIN_CONFIG_KEY {
// https://t.me/c/1599543687/73347
TOKEN_ETH = "TOKEN_ETH",
// https://t.me/c/1599543687/73387
TOKEN_SOL = "TOKEN_SOL",
}

View File

@@ -360,4 +360,14 @@ export const stxTokenContractAddresses_legacy: Record<
contractName: "token-eth",
}),
},
[KnownTokenId.Stacks.SOL]: {
[KnownChainId.Stacks.Mainnet]: wrapContractAddress("mainnet", {
deployerAddress: xlinkContractsMultisigMainnet,
contractName: "token-sol",
}),
[KnownChainId.Stacks.Testnet]: wrapContractAddress("testnet", {
deployerAddress: xlinkContractsMultisigTestnet,
contractName: "token-sol",
}),
},
}

View File

@@ -85,6 +85,7 @@ export namespace KnownTokenId {
export const TRUMP = tokenId("evm-trump")
export const GHIBLICZ = tokenId("evm-ghiblicz")
export const ETH = tokenId("evm-eth")
export const SOL = tokenId("evm-sol")
}
/** This type includes all known tokens on EVM-compatible blockchains. */
export type EVMToken = (typeof _allKnownEVMTokens)[number]
@@ -118,6 +119,7 @@ export namespace KnownTokenId {
export const TRUMP = tokenId("stx-trump")
export const GHIBLICZ = tokenId("stx-ghiblicz")
export const ETH = tokenId("stx-eth")
export const SOL = tokenId("stx-sol")
}
const _allKnownStacksTokens = [
Stacks.sUSDT,
@@ -134,6 +136,8 @@ export namespace KnownTokenId {
Stacks.STX,
Stacks.TRUMP,
Stacks.GHIBLICZ,
Stacks.ETH,
Stacks.SOL,
] as const
export type StacksToken =
| TokenId<`a Stacks token`>