From d2990da05c9fe06c96ef97707406d887bbd8bf12 Mon Sep 17 00:00:00 2001 From: rrr523 Date: Thu, 14 Sep 2023 16:34:38 +0800 Subject: [PATCH] feat: Custom Tx --- .changeset/warm-clouds-decide.md | 5 ++ .../nextjs/src/components/customtx/index.tsx | 63 +++++++-------- packages/chain-sdk/src/clients/txClient.ts | 80 +++++++++++++++++++ packages/chain-sdk/src/types/tx.ts | 19 +++++ 4 files changed, 135 insertions(+), 32 deletions(-) create mode 100644 .changeset/warm-clouds-decide.md diff --git a/.changeset/warm-clouds-decide.md b/.changeset/warm-clouds-decide.md new file mode 100644 index 00000000..028aaef4 --- /dev/null +++ b/.changeset/warm-clouds-decide.md @@ -0,0 +1,5 @@ +--- +'@bnb-chain/greenfield-js-sdk': patch +--- + +feat: Custom any tx by raw info diff --git a/examples/nextjs/src/components/customtx/index.tsx b/examples/nextjs/src/components/customtx/index.tsx index 6417a914..f6b0ee0f 100644 --- a/examples/nextjs/src/components/customtx/index.tsx +++ b/examples/nextjs/src/components/customtx/index.tsx @@ -1,7 +1,6 @@ import { client } from '@/client'; -import { useAccount } from 'wagmi'; import { MsgSend } from '@bnb-chain/greenfield-cosmos-types/cosmos/bank/v1beta1/tx'; -import { parseEther } from 'viem'; +import { useAccount } from 'wagmi'; export const CustomTx = () => { const { address } = useAccount(); @@ -14,61 +13,63 @@ export const CustomTx = () => {