1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import { mainnet } from "npm:viem/chains";
import { whatsabi } from "npm:@shazow/whatsabi";
import { createPublicClient, http } from "npm:viem";
// Seaport 1.1 contract address
const address = "0x00000000006c3852cbEf3e08E8dF289169EdE581";
const client = createPublicClient({ chain: mainnet, transport: http() });
const { abi } = await whatsabi.autoload(address, { provider: client });
const result = await client.readContract({
abi,
address,
functionName: "information",
});
console.info(result);
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
Comments
Nobody has commented on this val yet: be the first!
August 28, 2024