diff --git a/CircleModularWalletsCore/Sources/Accounts/Implementations/Web3swiftLocalAccount.swift b/CircleModularWalletsCore/Sources/Accounts/Implementations/Web3swiftLocalAccount.swift index 32716ef..d12494d 100644 --- a/CircleModularWalletsCore/Sources/Accounts/Implementations/Web3swiftLocalAccount.swift +++ b/CircleModularWalletsCore/Sources/Accounts/Implementations/Web3swiftLocalAccount.swift @@ -57,8 +57,6 @@ class Web3swiftLocalAccount: Account { /// - Parameter privateKeyHex: The hex string representation of the private key. /// - Throws: An `BaseError` if the private key is invalid or cannot be converted to Data. convenience init(privateKeyHex: String) throws { - let privateKey: Data - guard let privateKey = HexUtils.hexToData(hex: privateKeyHex) else { throw BaseError(shortMessage: "Invalid private key hex string") } diff --git a/CircleModularWalletsCore/Sources/Chains/ArcTestnet.swift b/CircleModularWalletsCore/Sources/Chains/ArcTestnet.swift new file mode 100644 index 0000000..fc18167 --- /dev/null +++ b/CircleModularWalletsCore/Sources/Chains/ArcTestnet.swift @@ -0,0 +1,29 @@ +// +// Copyright (c) 2025, Circle Internet Group, Inc. All rights reserved. +// +// SPDX-License-Identifier: Apache-2.0 +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +import Foundation + +public let ArcTestnet = _ArcTestnet() + +public struct _ArcTestnet: Chain { + + public let chainId: Int = 5042002 + + public let blockchain: String = "ARC-TESTNET" + +} diff --git a/CircleModularWalletsCore/Sources/Helpers/Constants.swift b/CircleModularWalletsCore/Sources/Helpers/Constants.swift index 7a35562..d4fc2de 100644 --- a/CircleModularWalletsCore/Sources/Helpers/Constants.swift +++ b/CircleModularWalletsCore/Sources/Helpers/Constants.swift @@ -27,20 +27,21 @@ let CIRCLE_SMART_ACCOUNT_VERSION: [String: String] = [ ] let CONTRACT_ADDRESS: [String: String] = [ - PolygonToken.USDC.name: "0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359", ArbitrumToken.USDC.name: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", ArbitrumToken.ARB.name: "0x912CE59144191C1204E64559FE8253a0e49E6548", AvalancheToken.USDC.name: "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E", BaseToken.USDC.name: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", OptimismToken.USDC.name: "0x0b2c639c533813f4aa9d7837caf62653d097ff85", OptimismToken.OP.name: "0x4200000000000000000000000000000000000042", + PolygonToken.USDC.name: "0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359", UnichainToken.USDC.name: "0x078D782b760474a361dDA0AF3839290b0EF57AD6", - PolygonAmoyToken.USDC.name: "0x41e94eb019c0762f9bfcf9fb1e58725bfb0e7582", ArbitrumSepoliaToken.USDC.name: "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d", + ArcTestnetToken.USDC.name: "0x3600000000000000000000000000000000000000", AvalancheFujiToken.USDC.name: "0x5425890298aed601595a70ab815c96711a31bc65", BaseSepoliaToken.USDC.name: "0x036CbD53842c5426634e7929541eC2318f3dCF7e", OptimismSepoliaToken.USDC.name: "0x5fd84259d66Cd46123540766Be93DFE6D43130D7", + PolygonAmoyToken.USDC.name: "0x41e94eb019c0762f9bfcf9fb1e58725bfb0e7582", UnichainSepoliaToken.USDC.name: "0x31d0220469e10c4E71834a79b1f276d740d3768F", ] diff --git a/CircleModularWalletsCore/Sources/Models/Token.swift b/CircleModularWalletsCore/Sources/Models/Token.swift index 7b2e1aa..74f9c80 100644 --- a/CircleModularWalletsCore/Sources/Models/Token.swift +++ b/CircleModularWalletsCore/Sources/Models/Token.swift @@ -108,6 +108,18 @@ public enum ArbitrumSepoliaToken: String { } } +public enum ArcTestnetToken: String { + case USDC + + public var chainId: Int { + return ArcTestnet.chainId + } + + public var name: String { + return "ArcTestnet_\(self.rawValue)" + } +} + public enum AvalancheFujiToken: String { case USDC diff --git a/Package.swift b/Package.swift index e070dd9..23634b6 100644 --- a/Package.swift +++ b/Package.swift @@ -22,7 +22,7 @@ import PackageDescription let package = Package( name: "CircleModularWalletsCore", platforms: [ - .iOS(.v16) + .macOS("13.5"), .iOS(.v16) ], products: [ .library(