super weird bug!

This commit is contained in:
dr-frmr 2024-08-09 01:07:44 +03:00
parent 3ff1ea96ed
commit f5cc1371d4
No known key found for this signature in database
2 changed files with 6 additions and 2 deletions

View File

@ -28,5 +28,5 @@ export const mechAbi = parseAbi([
export const dotOsAbi = parseAbi([
"function commit(bytes32)",
"function getCommit(bytes memory, bytes32)",
"function mint(address, bytes calldata, bytes calldata, bytes calldata, address, bytes32)",
"function mint(address,bytes,bytes,bytes,address,bytes32)",
])

View File

@ -6,7 +6,7 @@ import { PageProps } from "../lib/types";
import { useAccount, useWaitForTransactionReceipt, useWriteContract } from "wagmi";
import { useConnectModal, useAddRecentTransaction } from "@rainbow-me/rainbowkit"
import { dotOsAbi, generateNetworkingKeys, KINO_ACCOUNT_IMPL, DOTOS } from "../abis";
import { encodePacked, stringToHex } from "viem";
import { encodePacked, getFunctionSelector, stringToHex } from "viem";
interface RegisterOsNameProps extends PageProps { }
@ -71,6 +71,10 @@ function MintDotOsName({
// strip .os suffix
const name = knsName.replace(/\.os$/, '');
const selector = getFunctionSelector('function mint(address,bytes,bytes,bytes,address,bytes32)')
console.log("selector: ", selector)
writeContract({
abi: dotOsAbi,
address: DOTOS,