We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Viem is a TypeScript interface for Ethereum that provides low-level stateless primitives for interacting with Ethereum.
Some of the main features are:
For more information check the View Documentation
Package Install
npm i viem
Send Transaction
import {createPublicClient, http,parseGwei } from "viem"; import { privateKeyToAccount } from 'viem/accounts' import { skaleChaosTestnet } from "viem/chains"; import {contract_abi,contract_adress} from "./contract"; import dotenv from 'dotenv'; dotenv.config(); async function main() { const client = createPublicClient({ chain: skaleChaosTestnet, transport: http() }); const pk = "0x"; const account=privateKeyToAccount(pk); const signature = await account.signTransaction({ to:contract_adress, gas:parseGwei('0.0005'), gasPrice:parseGwei('0.0001'), nonce: await client.getTransactionCount({address:account.address}), data: '0xeefa7dfd0000000000000000000000002b3937fe6ef38cd4be0d9ceb05823087b716d689' }) const hash = await client.sendRawTransaction({serializedTransaction:signature}); console.log(hash); } main() .catch((err) => { console.error(err); process.exitCode = 1; });
The text was updated successfully, but these errors were encountered:
What is: Library Language: Typescript Target: Web
Sorry, something went wrong.
No branches or pull requests
Viem
Viem is a TypeScript interface for Ethereum that provides low-level stateless primitives for interacting with Ethereum.
Some of the main features are:
For more information check the View Documentation
Implementation Example
Package Install
Send Transaction
The text was updated successfully, but these errors were encountered: