Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CircleModularWalletsCore/Resources/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>CFBundleShortVersionString</key>
<string>1.4.1</string>
<string>1.2.0</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleName</key>
Expand All @@ -13,7 +13,7 @@
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>NSHumanReadableCopyright</key>
<string/>
<string></string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleVersion</key>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,13 +237,12 @@ extension BundlerRpcApi {
// Some Bundlers fail if nullish gas values are provided for gas estimation :')
// So we will need to set a default zeroish value.
let tmpUserOp = userOp.copy()
tmpUserOp.callGasLimit = tmpUserOp.callGasLimit ?? .zero
tmpUserOp.preVerificationGas = tmpUserOp.preVerificationGas ?? .zero
tmpUserOp.verificationGasLimit = tmpUserOp.verificationGasLimit ?? .zero
tmpUserOp.callGasLimit = .zero
tmpUserOp.preVerificationGas = .zero

if paymaster != nil {
tmpUserOp.paymasterVerificationGasLimit = tmpUserOp.paymasterVerificationGasLimit ?? .zero
tmpUserOp.paymasterPostOpGasLimit = tmpUserOp.paymasterPostOpGasLimit ?? .zero
tmpUserOp.paymasterVerificationGasLimit = .zero
tmpUserOp.paymasterPostOpGasLimit = .zero
} else {
tmpUserOp.paymasterVerificationGasLimit = nil
tmpUserOp.paymasterPostOpGasLimit = nil
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ 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")
}
Expand Down
29 changes: 0 additions & 29 deletions CircleModularWalletsCore/Sources/Chains/ArcTestnet.swift

This file was deleted.

29 changes: 0 additions & 29 deletions CircleModularWalletsCore/Sources/Chains/Monad.swift

This file was deleted.

29 changes: 0 additions & 29 deletions CircleModularWalletsCore/Sources/Chains/MonadTestnet.swift

This file was deleted.

7 changes: 2 additions & 5 deletions CircleModularWalletsCore/Sources/Helpers/Constants.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,23 +27,20 @@ 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",
MonadToken.USDC.name: "0x754704bc059f8c67012fed69bc8a327a5aafb603",
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",
MonadTestnetToken.USDC.name: "0x534b2f3A21130d7a60830c2Df862319e593943A3",
OptimismSepoliaToken.USDC.name: "0x5fd84259d66Cd46123540766Be93DFE6D43130D7",
PolygonAmoyToken.USDC.name: "0x41e94eb019c0762f9bfcf9fb1e58725bfb0e7582",
UnichainSepoliaToken.USDC.name: "0x31d0220469e10c4E71834a79b1f276d740d3768F",
]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import Foundation
#if SWIFT_PACKAGE
extension Bundle {
public enum SDK {
public static let version = "1.4.1" // x-release-please-version
public static let version = "1.2.0"
}
}
#else
Expand Down
2 changes: 1 addition & 1 deletion CircleModularWalletsCore/Sources/Helpers/Utils/Utils.swift
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public struct Utils {
signature: String,
webauthn: WebAuthnData) throws -> Bool {
do {
let rawClientData = try webauthn.clientDataJSON.bytes
let rawClientData = webauthn.clientDataJSON.bytes
let clientData = try JSONDecoder().decode(CollectedClientData.self, from: Data(rawClientData))
let rawAuthenticatorData = try HexUtils.hexToBytes(hex: webauthn.authenticatorData)
let authenticatorData = try AuthenticatorData(bytes: rawAuthenticatorData)
Expand Down
36 changes: 0 additions & 36 deletions CircleModularWalletsCore/Sources/Models/Token.swift
Original file line number Diff line number Diff line change
Expand Up @@ -57,18 +57,6 @@ public enum BaseToken: String {
}
}

public enum MonadToken: String {
case USDC

public var chainId: Int {
return Monad.chainId
}

public var name: String {
return "Monad_\(self.rawValue)"
}
}

public enum OptimismToken: String {
case USDC
case OP
Expand Down Expand Up @@ -120,18 +108,6 @@ 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

Expand All @@ -156,18 +132,6 @@ public enum BaseSepoliaToken: String {
}
}

public enum MonadTestnetToken: String {
case USDC

public var chainId: Int {
return MonadTestnet.chainId
}

public var name: String {
return "MonadTestnet_\(self.rawValue)"
}
}

public enum OptimismSepoliaToken: String {
case USDC

Expand Down
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import PackageDescription
let package = Package(
name: "CircleModularWalletsCore",
platforms: [
.macOS("13.5"), .iOS(.v16)
.iOS(.v16)
],
products: [
.library(
Expand All @@ -31,7 +31,7 @@ let package = Package(
],
dependencies: [
.package(url: "https://github.com/valpackett/SwiftCBOR.git", .upToNextMinor(from: "0.4.7")),
.package(url: "https://github.com/web3swift-team/web3swift.git", .upToNextMinor(from: "3.3.2"))
.package(url: "https://github.com/web3swift-team/web3swift.git", .upToNextMinor(from: "3.2.2"))
],
targets: [
.target(
Expand Down
Loading