# I was trying to call the ckSepoliaUSDC but I got an error

**URL:** <https://forum.dfinity.org/t/i-was-trying-to-call-the-cksepoliausdc-but-i-got-an-error/35893>\
**Category:** Developers\
**Created:** [October 7, 2024, 6:38am UTC](https://forum.dfinity.org/t/i-was-trying-to-call-the-cksepoliausdc-but-i-got-an-error/35893 "2024-10-07T06:38:00Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![AliSci](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/alisci/32/33799_2.png) [@AliSci](https://forum.dfinity.org/u/AliSci)\
**Post date:** [October 7, 2024, 6:38am UTC](https://forum.dfinity.org/t/i-was-trying-to-call-the-cksepoliausdc-but-i-got-an-error/35893/1 "2024-10-07T06:38:01Z")

</div>

`TypeError: interfaceFactory is not a function` ?

 ![Screenshot 2024-10-07 at 2.36.52 PM](https://us1.discourse-cdn.com/flex023/uploads/dfn/original/3X/3/0/30b0da5b24ffe4cc23b4023ad125791adcf9834b.png)

[check code sample](https://codesandbox.io/p/sandbox/holy-microservice-37khqy)

---

<div class="post-metadata">

**Author:** ![b3hr4d](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/b3hr4d/32/9755_2.png) [@b3hr4d](https://forum.dfinity.org/u/b3hr4d)\
**Post date:** [October 7, 2024, 7:39am UTC](https://forum.dfinity.org/t/i-was-trying-to-call-the-cksepoliausdc-but-i-got-an-error/35893/2 "2024-10-07T07:39:09Z")

</div>

I’ve modified your code and integrated it with [@ic-reactor/react](https://forum.dfinity.org/t/introduction-ic-reactor-react-for-react-developers/27930).

You can check out the [updated sandbox](https://codesandbox.io/p/sandbox/testing-erc2-forked-hh4jsq?file=%2Fsrc%2FApp.tsx).

---

<div class="post-metadata">

**Author:** ![AliSci](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/alisci/32/33799_2.png) [@AliSci](https://forum.dfinity.org/u/AliSci)\
**Post date:** [October 7, 2024, 11:06am UTC](https://forum.dfinity.org/t/i-was-trying-to-call-the-cksepoliausdc-but-i-got-an-error/35893/3 "2024-10-07T11:06:25Z")

</div>

Do you know to to get my usdc address for deposit from external wallet?

---

<div class="post-metadata">

**Author:** ![b3hr4d](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/b3hr4d/32/9755_2.png) [@b3hr4d](https://forum.dfinity.org/u/b3hr4d)\
**Post date:** [October 7, 2024, 11:14am UTC](https://forum.dfinity.org/t/i-was-trying-to-call-the-cksepoliausdc-but-i-got-an-error/35893/4 "2024-10-07T11:14:23Z")

</div>

You need to convert user principal into bytes32 format, Please take a look at this tutorial:

> [@Building a Cross-Chain ETH Payment and E-Commerce Platform on the Internet Computer: A Step-by-Step Tutorial](https://forum.dfinity.org/t/building-a-cross-chain-eth-payment-and-e-commerce-platform-on-the-internet-computer-a-step-by-step-tutorial/23938/3):
>
> Step 2: Modify the Backend for ETH Deposits In this step, we’ll modify the backend to include a function that generates a deposit principal from a canister ID. This is essential for converting SepoliaETH into ckSepoliaETH, as per the ckEth documentation. Installing the b3\_utils Rust Crate First, we need to install the [b3\_utils](https://docs.rs/b3_utils/latest/b3_utils/) Rust crate. Open your Cargo.toml file and add the following line under [dependencies]: b3\_utils = "0.8.0" or run this command: cargo add b3\_utils Modifying the greet …

---

<div class="post-metadata">

**Author:** ![AliSci](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/alisci/32/33799_2.png) [@AliSci](https://forum.dfinity.org/u/AliSci)\
**Post date:** [October 7, 2024, 11:34am UTC](https://forum.dfinity.org/t/i-was-trying-to-call-the-cksepoliausdc-but-i-got-an-error/35893/5 "2024-10-07T11:34:07Z")

</div>

> [@b3hr4d](#):
>
> user principal into bytes32

what I mean is when I go to binance account and withdraw to a wallet like `0xb7d95e0837fa3a722e28003bae44dd2011e6832f` which is a USC wallet. How can I generate such an address?

 ![Screenshot 2024-10-07 at 7.34.37 PM](https://us1.discourse-cdn.com/flex023/uploads/dfn/original/3X/e/b/eb4717853d30507c48dc22099d265487184b6b8d.png)

---

<div class="post-metadata">

**Author:** ![b3hr4d](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/b3hr4d/32/9755_2.png) [@b3hr4d](https://forum.dfinity.org/u/b3hr4d)\
**Post date:** [October 7, 2024, 12:08pm UTC](https://forum.dfinity.org/t/i-was-trying-to-call-the-cksepoliausdc-but-i-got-an-error/35893/6 "2024-10-07T12:08:22Z")

</div>

> [@AliSci](#):
>
> wallet like `0xb7d95e0837fa3a722e28003bae44dd2011e6832f`

You cannot generate an Ethereum address using Internet Identity because it currently doesn’t support signing Ethereum transactions.

To create an Ethereum wallet within the ICP ecosystem, you need to develop a canister smart contract. Use the [ecdsa\_public\_key](https://internetcomputer.org/docs/current/references/ic-interface-spec/#ic-ecdsa_public_key) to generate an Ethereum address and [sign\_with\_ecdsa](https://internetcomputer.org/docs/current/references/ic-interface-spec/#ic-sign_with_ecdsa) for signing transactions.

For a wallet that interacts with ck tokens, you only need an interface to call the ckMinter canister and the ckUSDC canister directly from the frontend.

**Note:** To mint ck tokens, you need a bytes32 address and then call a helper smart contract on Ethereum.

---

<div class="post-metadata">

**Author:** ![AliSci](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/alisci/32/33799_2.png) [@AliSci](https://forum.dfinity.org/u/AliSci)\
**Post date:** [October 7, 2024, 12:17pm UTC](https://forum.dfinity.org/t/i-was-trying-to-call-the-cksepoliausdc-but-i-got-an-error/35893/7 "2024-10-07T12:17:18Z")

</div>

ok, s I can just call this from my backend

```rs
use b3_utils::{vec_to_hex_string_with_0x, Subaccount};
use candid::Principal;

#[ic_cdk::query]
fn deposit_principal(principal: String) -> String {
    let principal = Principal::from_text(principal).unwrap();
    let subaccount = Subaccount::from_principal(principal);

    let bytes32 = subaccount.to_bytes32().unwrap();

    vec_to_hex_string_with_0x(bytes32)
}

```
