I want to use the grant fee with cosmjs but I get errors
example 1
const grantFeeMsg = {
typeUrl: '/cosmos.feegrant.v1beta1.MsgGrantAllowance',
value: {
granter: accountMain.address,
/** grantee is the address of the user being granted an allowance of another user's funds. */
grantee: accountGrantee.address,
/** allowance can be any of basic and filtered fee allowance. */
allowance: BasicAllowance.encode(BasicAllowance.fromPartial({
spendLimit: [{ denom: 'uatom', amount: '1000' }],
expiration: Timestamp.fromPartial({
seconds: defaultExpiry.unix(),
nanos: 0
})
})).finish()
// BasicAllowance.encode()
}
}
const resultExecGrant = await clientMainGrant.signAndBroadcast(accountMain.address, [grantFeeMsg], 'auto');
console.log(resultExecGrant);
Error: Query failed with (18): unable to resolve type URL : tx parse error: invalid request
example 2
const grantFeeMsg = {
typeUrl: '/cosmos.feegrant.v1beta1.MsgGrantAllowance',
value: {
granter: accountMain.address,
/** grantee is the address of the user being granted an allowance of another user's funds. */
grantee: accountGrantee.address,
/** allowance can be any of basic and filtered fee allowance. */
}
}
const resultExecGrant = await clientMainGrant.signAndBroadcast(accountMain.address, [grantFeeMsg], 'auto');
console.log(resultExecGrant);
I want to use the grant fee with cosmjs but I get errors
example 1
Error: Query failed with (18): unable to resolve type URL : tx parse error: invalid request
example 2