File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed
packages/auto-consensus/src Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ export * from './info'
88export * from './position'
99export * from './remark'
1010export * from './staking'
11+ export * from './transactionFees'
1112export * from './transfer'
1213
1314export * from './types'
Original file line number Diff line number Diff line change 1+ import { ApiPromise } from '@polkadot/api'
2+ import { z } from 'zod'
3+
4+ const TransactionByteFeeSchema = z . object ( {
5+ current : z . number ( ) ,
6+ next : z . number ( ) ,
7+ } )
8+
9+ export const transactionByteFee = async ( api : ApiPromise ) => {
10+ await api . isReady
11+
12+ // Query transactionFees.transactionByteFee
13+ const transactionByteFee = await api . query . transactionFees
14+ . transactionByteFee ( )
15+ . then ( ( v ) => TransactionByteFeeSchema . parse ( v . toJSON ( ) ) )
16+
17+ return transactionByteFee
18+ }
You can’t perform that action at this time.
0 commit comments