如果我们查看 polkadot js 文档,我们可以看到以下注释:这仅在该托盘用于存储余额的情况下使用。现在我们如何使用余额托盘来存储余额?因为我们还有这个api.query.system.account函数而不是api.query.balances.account
这是我的selector.ts
export interface ITestState {\n value: number;\n}\nexport interface IReduxState {\n test: ITestState;\n}\nexport const selectTest = (state: IReduxState) => state.test;\nexport const selectTestValue = createSelector(\n selectTest,\n (state: ITestState) => state.value\n);\nRun Code Online (Sandbox Code Playgroud)\n\xc3\x8ff 我尝试使用它app.component.ts\xc3\x8ff 我尝试在\n
constructor(private store: Store) {\n this.vaschal$ = store.select(selectTestValue);\n }\nRun Code Online (Sandbox Code Playgroud)\n我收到以下错误
\nNo overload matches this call.\n Overload 1 of 9, '(mapFn: (state: object) => number): Observable<number>', gave the following error.\n Argument of type 'MemoizedSelector<IReduxState, number, DefaultProjectorFn<number>>' is not assignable to parameter of type …Run Code Online (Sandbox Code Playgroud) 我试图创建一个函数或外部函数,它不收取原始交易费,而是完全免费的。我认为也许权重为 0 就可以解决,但仍然需要花费代币,
#[weight = 0]
Run Code Online (Sandbox Code Playgroud)
然后我尝试通过 rpc 调用来调整状态,该调用做了一些计算但没有修改状态 我如何创建一个免费的函数/外部函数,无需任何交易费用?rpc调用是否可以调整状态?