diff --git a/packages/ethereum/sdk/src/common/index.ts b/packages/ethereum/sdk/src/common/index.ts index ca22b3dbd..806fb5564 100644 --- a/packages/ethereum/sdk/src/common/index.ts +++ b/packages/ethereum/sdk/src/common/index.ts @@ -59,6 +59,14 @@ export function getBlockchainBySDKNetwork(network: EthereumNetwork): EVMBlockcha case "testnet-celo": case "celo": return Blockchain.CELO + case "testnet-fief": + return Blockchain.FIEF + case "xai": + case "testnet-xai": + return Blockchain.XAI + case "kroma": + case "testnet-kroma": + return Blockchain.KROMA default: throw new Error(`Unrecognized ethereum network ${network}`) } } diff --git a/packages/ethereum/sdk/src/config/index.ts b/packages/ethereum/sdk/src/config/index.ts index 0201673f0..f3d463f87 100644 --- a/packages/ethereum/sdk/src/config/index.ts +++ b/packages/ethereum/sdk/src/config/index.ts @@ -21,6 +21,11 @@ import { rariMainnetConfig } from "./rari" import { zkatanaConfig } from "./zkatana" import { baseConfig } from "./base" import { baseSepoliaConfig } from "./base-sepolia" +import { xaiConfig } from "./xai" +import { fiefTestnetConfig } from "./testnet-fief" +import { xaiTestnetConfig } from "./testnet-xai" +import { kromaTestnetConfig } from "./testnet-kroma" +import { kromaConfig } from "./kroma" import { astarZKEVMConfig } from "./astar-zkevm" import { celoTestnetConfig } from "./testnet-celo" import { celoConfig } from "./celo" @@ -50,6 +55,11 @@ export const configDictionary: Record = { "base-sepolia": baseSepoliaConfig, "testnet-celo": celoTestnetConfig, celo: celoConfig, + "testnet-xai": xaiTestnetConfig, + xai: xaiConfig, + "testnet-fief": fiefTestnetConfig, + "testnet-kroma": kromaTestnetConfig, + kroma: kromaConfig, } export function getEthereumConfig(env: EthereumNetwork): EthereumConfig { diff --git a/packages/ethereum/sdk/src/config/kroma.ts b/packages/ethereum/sdk/src/config/kroma.ts new file mode 100644 index 000000000..80a29d295 --- /dev/null +++ b/packages/ethereum/sdk/src/config/kroma.ts @@ -0,0 +1,47 @@ +import { toAddress, ZERO_ADDRESS } from "@rarible/types" +import { id32 } from "../common/id" +import type { EthereumConfig } from "./type" +import { FEE_CONFIG_URL } from "./common" + +export const kromaConfig: EthereumConfig = { + basePath: "https://kroma-api.rarible.org", + chainId: 255, + environment: "production", + exchange: { + v1: ZERO_ADDRESS, + v2: toAddress("0x418f1b76448866CF072dd14d092138190CcdC9aF"), + openseaV1: ZERO_ADDRESS, + wrapper: toAddress("0x69Be0b6f5BB5e9F8DfAA1562F06427142fb0a10a"), + looksrare: ZERO_ADDRESS, + looksrareV2: ZERO_ADDRESS, + x2y2: ZERO_ADDRESS, + }, + transferProxies: { + nft: toAddress("0x30fc6eed1d302F5f5C4a8aa58047d1a730b3Cc91"), + erc20: toAddress("0x6C65a3C3AA67b126e43F86DA85775E0F5e9743F7"), + erc721Lazy: toAddress("0x9f4CE147beF144a571c1372cd6e1DEB148742027"), + erc1155Lazy: toAddress("0x8d5D3e1e6609A798B84160Ec9CC25198B9e4F177"), + openseaV1: ZERO_ADDRESS, + cryptoPunks: ZERO_ADDRESS, + }, + feeConfigUrl: FEE_CONFIG_URL, + openSea: { + metadata: id32("RARIBLE"), + proxyRegistry: ZERO_ADDRESS, + merkleValidator: ZERO_ADDRESS, + }, + factories: { + erc721: toAddress("0x24562E94332f06F1F0aEa79cAf283088F9e1B8A8"), + erc1155: toAddress("0xbd426Ce20Ac84ad3a6FA6FF50cfe5fB325AB0e5d"), + }, + cryptoPunks: { + marketContract: ZERO_ADDRESS, + wrapperContract: ZERO_ADDRESS, + }, + sudoswap: { + pairFactory: ZERO_ADDRESS, + pairRouter: ZERO_ADDRESS, + }, + weth: toAddress("0x4200000000000000000000000000000000000001"), + auction: ZERO_ADDRESS, +} diff --git a/packages/ethereum/sdk/src/config/testnet-fief.ts b/packages/ethereum/sdk/src/config/testnet-fief.ts new file mode 100644 index 000000000..b50ad12b6 --- /dev/null +++ b/packages/ethereum/sdk/src/config/testnet-fief.ts @@ -0,0 +1,48 @@ +import { toAddress, ZERO_ADDRESS } from "@rarible/types" +import { id32 } from "../common/id" +import type { EthereumConfig } from "./type" +import { FEE_CONFIG_URL } from "./common" + +export const fiefTestnetConfig: EthereumConfig = { + basePath: "https://testnet-fief-api.rarible.org", + chainId: 712, + environment: "testnet", + exchange: { + v1: ZERO_ADDRESS, + v2: toAddress("0x61512179F6a16bEC0D259d8010CC0485CE363868"), + openseaV1: ZERO_ADDRESS, + wrapper: toAddress("0xc798B273FaF23932Cf11177402C10C9b44D30Da2"), + looksrare: ZERO_ADDRESS, + looksrareV2: ZERO_ADDRESS, + x2y2: ZERO_ADDRESS, + }, + transferProxies: { + nft: toAddress("0x00C74eD067Cea48F1D6F7D00aBABa3C1D5B2598b"), + erc20: toAddress("0xA094E566b61b3c2D88ACf7Cc15e3Dd0FA83F32af"), + erc721Lazy: toAddress("0xB8863180CAC2d0Ab665e5968C0De25298A1D8CEe"), + erc1155Lazy: toAddress("0xa2eEBb837aEF89369Ad117568d75348e6174520e"), + openseaV1: ZERO_ADDRESS, + cryptoPunks: ZERO_ADDRESS, + }, + feeConfigUrl: FEE_CONFIG_URL, + openSea: { + metadata: id32("RARIBLE"), + proxyRegistry: ZERO_ADDRESS, + merkleValidator: ZERO_ADDRESS, + }, + factories: { + erc721: toAddress("0xe10605b2026884aCc669C2A9Cd4A5ec5f5FFf494"), + erc1155: toAddress("0x57B3f3b79F64c475a37E6c493BAA8E6E7C5F748e"), + }, + cryptoPunks: { + marketContract: ZERO_ADDRESS, + wrapperContract: ZERO_ADDRESS, + }, + sudoswap: { + pairFactory: ZERO_ADDRESS, + pairRouter: ZERO_ADDRESS, + }, + //@todo wrapper token is not available yet (https://docs.fiefdom.gg/core-apps/fief-less-than-greater-than-wfief-wrapper) + weth: ZERO_ADDRESS, + auction: ZERO_ADDRESS, +} diff --git a/packages/ethereum/sdk/src/config/testnet-kroma.ts b/packages/ethereum/sdk/src/config/testnet-kroma.ts new file mode 100644 index 000000000..9a2a747ed --- /dev/null +++ b/packages/ethereum/sdk/src/config/testnet-kroma.ts @@ -0,0 +1,47 @@ +import { toAddress, ZERO_ADDRESS } from "@rarible/types" +import { id32 } from "../common/id" +import type { EthereumConfig } from "./type" +import { FEE_CONFIG_URL } from "./common" + +export const kromaTestnetConfig: EthereumConfig = { + basePath: "https://testnet-kroma-api.rarible.org", + chainId: 2358, + environment: "testnet", + exchange: { + v1: ZERO_ADDRESS, + v2: toAddress("0x0fE65B68Eb627c21EAF3cfe8183C4F946F3d48BD"), + openseaV1: ZERO_ADDRESS, + wrapper: toAddress("0x166F6180170f438Ddc38050a2B708d38c0890956"), + looksrare: ZERO_ADDRESS, + looksrareV2: ZERO_ADDRESS, + x2y2: ZERO_ADDRESS, + }, + transferProxies: { + nft: toAddress("0x4f4cC63D7f2bC894078d41f284453062842Afa46"), + erc20: toAddress("0xBc57D6e50fa760A01536A7c2EAEDD6fC9b2A4f9A"), + erc721Lazy: toAddress("0xF1cb795B7eA59a9213a790f868104c11a14690Fa"), + erc1155Lazy: toAddress("0xa90e536A492aef0d57e6d295FA17687c3ca93347"), + openseaV1: ZERO_ADDRESS, + cryptoPunks: ZERO_ADDRESS, + }, + feeConfigUrl: FEE_CONFIG_URL, + openSea: { + metadata: id32("RARIBLE"), + proxyRegistry: ZERO_ADDRESS, + merkleValidator: ZERO_ADDRESS, + }, + factories: { + erc721: toAddress("0x41407B447Fb5425187A9BCA3a062644EF2410F8D"), + erc1155: toAddress("0xc798B273FaF23932Cf11177402C10C9b44D30Da2"), + }, + cryptoPunks: { + marketContract: ZERO_ADDRESS, + wrapperContract: ZERO_ADDRESS, + }, + sudoswap: { + pairFactory: ZERO_ADDRESS, + pairRouter: ZERO_ADDRESS, + }, + weth: toAddress("0x4200000000000000000000000000000000000001"), + auction: ZERO_ADDRESS, +} diff --git a/packages/ethereum/sdk/src/config/testnet-xai.ts b/packages/ethereum/sdk/src/config/testnet-xai.ts new file mode 100644 index 000000000..1c6ff5628 --- /dev/null +++ b/packages/ethereum/sdk/src/config/testnet-xai.ts @@ -0,0 +1,46 @@ +import { toAddress, ZERO_ADDRESS } from "@rarible/types" +import { id32 } from "../common/id" +import type { EthereumConfig } from "./type" +import { FEE_CONFIG_URL } from "./common" +export const xaiTestnetConfig: EthereumConfig = { + basePath: "https://testnet-xai-api.rarible.org", + chainId: 37714555429, + environment: "testnet", + exchange: { + v1: ZERO_ADDRESS, + v2: toAddress("0x61512179F6a16bEC0D259d8010CC0485CE363868"), + openseaV1: ZERO_ADDRESS, + wrapper: toAddress("0xc798B273FaF23932Cf11177402C10C9b44D30Da2"), + looksrare: ZERO_ADDRESS, + looksrareV2: ZERO_ADDRESS, + x2y2: ZERO_ADDRESS, + }, + transferProxies: { + nft: toAddress("0x00C74eD067Cea48F1D6F7D00aBABa3C1D5B2598b"), + erc20: toAddress("0xA094E566b61b3c2D88ACf7Cc15e3Dd0FA83F32af"), + erc721Lazy: toAddress("0xB8863180CAC2d0Ab665e5968C0De25298A1D8CEe"), + erc1155Lazy: toAddress("0xa2eEBb837aEF89369Ad117568d75348e6174520e"), + openseaV1: ZERO_ADDRESS, + cryptoPunks: ZERO_ADDRESS, + }, + feeConfigUrl: FEE_CONFIG_URL, + openSea: { + metadata: id32("RARIBLE"), + proxyRegistry: ZERO_ADDRESS, + merkleValidator: ZERO_ADDRESS, + }, + factories: { + erc721: toAddress("0xe10605b2026884aCc669C2A9Cd4A5ec5f5FFf494"), + erc1155: toAddress("0x57B3f3b79F64c475a37E6c493BAA8E6E7C5F748e"), + }, + cryptoPunks: { + marketContract: ZERO_ADDRESS, + wrapperContract: ZERO_ADDRESS, + }, + sudoswap: { + pairFactory: ZERO_ADDRESS, + pairRouter: ZERO_ADDRESS, + }, + weth: toAddress("0x3fB787101DC6Be47cfe18aeEe15404dcC842e6AF"), + auction: ZERO_ADDRESS, +} diff --git a/packages/ethereum/sdk/src/config/xai.ts b/packages/ethereum/sdk/src/config/xai.ts new file mode 100644 index 000000000..1bde7724c --- /dev/null +++ b/packages/ethereum/sdk/src/config/xai.ts @@ -0,0 +1,47 @@ +import { toAddress, ZERO_ADDRESS } from "@rarible/types" +import { id32 } from "../common/id" +import type { EthereumConfig } from "./type" +import { FEE_CONFIG_URL } from "./common" + +export const xaiConfig: EthereumConfig = { + basePath: "https://xai-api.rarible.org", + chainId: 660279, + environment: "production", + exchange: { + v1: ZERO_ADDRESS, + v2: toAddress("0x5faf16A85028BE138A7178B222DeC98092FEEF97"), + openseaV1: ZERO_ADDRESS, + wrapper: toAddress("0xF965237c6b3f89f8C62B45b94097899E3562A830"), + looksrare: ZERO_ADDRESS, + looksrareV2: ZERO_ADDRESS, + x2y2: ZERO_ADDRESS, + }, + transferProxies: { + nft: toAddress("0xF65eF65a95821A16E02973b1C2200FA58898e3c0"), + erc20: toAddress("0x248B46BEB66b3078D771a9E7E5a0a0216d0d07ba"), + erc721Lazy: toAddress("0xce4bf732f53A76C463aE8822be858017b02779c8"), + erc1155Lazy: toAddress("0xdA12E4Ab1d731F29bF4Bff8f971579D95f8DDD07"), + openseaV1: ZERO_ADDRESS, + cryptoPunks: ZERO_ADDRESS, + }, + feeConfigUrl: FEE_CONFIG_URL, + openSea: { + metadata: id32("RARIBLE"), + proxyRegistry: ZERO_ADDRESS, + merkleValidator: ZERO_ADDRESS, + }, + factories: { + erc721: toAddress("0xC699FB932c1bD7235C7ED19388f26A2428224AED"), + erc1155: toAddress("0xdA12E4Ab1d731F29bF4Bff8f971579D95f8DDD07"), + }, + cryptoPunks: { + marketContract: ZERO_ADDRESS, + wrapperContract: ZERO_ADDRESS, + }, + sudoswap: { + pairFactory: ZERO_ADDRESS, + pairRouter: ZERO_ADDRESS, + }, + weth: toAddress("0x3fB787101DC6Be47cfe18aeEe15404dcC842e6AF"), + auction: ZERO_ADDRESS, +} diff --git a/packages/ethereum/sdk/src/types.ts b/packages/ethereum/sdk/src/types.ts index 469e07113..01da4da20 100644 --- a/packages/ethereum/sdk/src/types.ts +++ b/packages/ethereum/sdk/src/types.ts @@ -29,6 +29,11 @@ export const ethereumNetworks = [ "base-sepolia", "testnet-celo", "celo", + "testnet-fief", + "testnet-xai", + "xai", + "testnet-kroma", + "kroma", ] export type EthereumNetwork = typeof ethereumNetworks[number] diff --git a/packages/sdk-common/src/utils/blockchain.ts b/packages/sdk-common/src/utils/blockchain.ts index 176d3c6cd..d1b88f7c0 100644 --- a/packages/sdk-common/src/utils/blockchain.ts +++ b/packages/sdk-common/src/utils/blockchain.ts @@ -11,6 +11,9 @@ export const EVMBlockchains = [ Blockchain.RARI, Blockchain.ASTARZKEVM, Blockchain.BASE, + Blockchain.FIEF, + Blockchain.XAI, + Blockchain.KROMA, Blockchain.CELO, ] as const diff --git a/packages/sdk/src/config/development.ts b/packages/sdk/src/config/development.ts index 064ca58da..a79eef5c6 100644 --- a/packages/sdk/src/config/development.ts +++ b/packages/sdk/src/config/development.ts @@ -15,4 +15,8 @@ export const developmentConfig: RaribleSdkConfig = { lightlink: "testnet-lightlink", rari: "testnet-rari", base: "base-sepolia", + xai: "testnet-xai", + fief: "testnet-fief", + kroma: "testnet-kroma", + celo: "testnet-celo", } diff --git a/packages/sdk/src/config/domain.ts b/packages/sdk/src/config/domain.ts index 2c02c10f2..df782f836 100644 --- a/packages/sdk/src/config/domain.ts +++ b/packages/sdk/src/config/domain.ts @@ -21,4 +21,8 @@ export type RaribleSdkConfig = { lightlink: EthereumNetwork rari: EthereumNetwork base: EthereumNetwork + xai: EthereumNetwork + fief?: EthereumNetwork + kroma?: EthereumNetwork + celo: EthereumNetwork } diff --git a/packages/sdk/src/config/prod.ts b/packages/sdk/src/config/prod.ts index 4fd125999..c3a02e5d1 100644 --- a/packages/sdk/src/config/prod.ts +++ b/packages/sdk/src/config/prod.ts @@ -15,4 +15,8 @@ export const prodConfig: RaribleSdkConfig = { lightlink: "lightlink", rari: "rari", base: "base", + xai: "testnet-xai", + fief: "testnet-fief", + kroma: "testnet-kroma", + celo: "testnet-celo", } diff --git a/packages/sdk/src/config/testnet.ts b/packages/sdk/src/config/testnet.ts index 6fabf2383..97b1a76a1 100644 --- a/packages/sdk/src/config/testnet.ts +++ b/packages/sdk/src/config/testnet.ts @@ -15,4 +15,8 @@ export const testnetConfig: RaribleSdkConfig = { lightlink: "testnet-lightlink", rari: "testnet-rari", base: "base-sepolia", + xai: "testnet-xai", + fief: "testnet-fief", + kroma: "testnet-kroma", + celo: "testnet-celo", } diff --git a/packages/transaction/src/ethereum/index.ts b/packages/transaction/src/ethereum/index.ts index ba5636e20..a5d05a030 100644 --- a/packages/transaction/src/ethereum/index.ts +++ b/packages/transaction/src/ethereum/index.ts @@ -82,6 +82,16 @@ Blockchain, TransactionResult return `https://explorer.celo.org/alfajores/tx/${this.hash()}` case "celo": return `https://explorer.celo.org/mainnet/tx/${this.hash()}` + case "testnet-fief": + return `https://explorer.playground.fiefdom.gg/tx/${this.hash()}` + case "testnet-xai": + return `https://testnet-explorer-v2.xai-chain.net/tx/${this.hash()}` + case "xai": + return `https://explorer.xai-chain.net/tx/${this.hash()}` + case "testnet-kroma": + return `https://blockscout.sepolia.kroma.network/tx/${this.hash()}` + case "kroma": + return `https://blockscout.kroma.network/tx/${this.hash()}` default: throw new Error("Unsupported transaction network") }