Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #1082 is still not solved #1086

Closed
WeMakeBest opened this issue Apr 4, 2024 · 2 comments
Closed

Issue #1082 is still not solved #1086

WeMakeBest opened this issue Apr 4, 2024 · 2 comments

Comments

@WeMakeBest
Copy link

Follow up on issue #1082

317705188-9b66a265-7dce-454e-ad39-830deda18064

I'm still getting the same issue I have tried reinstalling the "@tatumio/tatum" and "@tatumio/evm-wallet-provider"

@rostislavjadavan
Copy link
Collaborator

Hi,

I have slightly modified your code, and this should work:

import { TatumSDK, Network } from "@tatumio/tatum";
import { EvmWalletProvider } from "@tatumio/evm-wallet-provider";

async function bsc() {
    const tatumSdk = await TatumSDK.init({
        network: Network.BINANCE_SMART_CHAIN_TESTNET,
        apiKey: { v4: "YOUR_API_KEY" },
        configureWalletProviders: [EvmWalletProvider],
    });

    const payload = {
        privateKey: "YOUR_PRIVATE_KEY",
        to: "TO",
        value: "0.1",
        maxPriorityFeePerGas: "10",
        maxFeePerGas: "10",
    };

    console.log(tatumSdk.walletProvider);

    const txHash = await tatumSdk.walletProvider
        .use(EvmWalletProvider)
        .signAndBroadcast(payload);

    console.log(txHash);
    await tatumSdk.destroy();
}

bsc();

Let me know if it works for you!

@WeMakeBest
Copy link
Author

Thank you for your help 👍
It's working fine now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants