osmosis
osmosis copied to clipboard
amino encoding not enabled for tokenfactory
System information
testnet: osmo-test-4
Expected behaviour
should have amino encoding for /osmosis.tokenfactory.v1beta1.MsgCreateDenom
for osmosis/tokenfactory/create-denom
example of initialization: https://github.com/osmosis-labs/osmosis/blob/main/x/lockup/types/codec.go#L26-L34
Actual behaviour
actual codec file (seems to not be initialized): https://github.com/osmosis-labs/osmosis/blob/main/x/tokenfactory/types/codec.go
Steps to reproduce the behaviour
broadcast a message from client with amino encoding.
import * as util from "util";
import { osmosis, getSigningOsmosisClient } from 'osmojs';
import {
getWalletFromMnemonic,
signAndBroadcast
} from '@cosmology/core';
const alohaMnemonic = 'siren garbage suggest drama note tenant desk mad siege business mistake brown limit latin raise dune snack hedgehog maze pear grief soap obscure problem'
const honuaMnemonic = 'secret forest reason select sketch satisfy foil member injury omit hub north tired polar draft cushion check lens sail west beef slush seat insect'
const start = async () => {
const alohaWallet = await getWalletFromMnemonic({
mnemonic: alohaMnemonic,
token: 'OSMO'
});
const alohaAccounts = await alohaWallet.getAccounts();
const alohaAddress = alohaAccounts[0].address
const client = await getSigningOsmosisClient({
rpcEndpoint: 'https://testnet-rpc.osmosis.zone',
signer: alohaWallet
});
const {
createDenom
} = osmosis.tokenfactory.v1beta1.MessageComposer.withTypeUrl;
const result = await signAndBroadcast({
client,
chainId: 'osmo-test-4',
address: alohaAddress,
msg: createDenom({
subdenom: 'aloha',
sender: alohaAddress
}),
fee: {
amount: [
{
amount: '0',
denom: 'uosmo'
}
],
gas: "250000",
},
memo: 'aloha'
});
console.log(util.inspect(result, false, null, true))
}
I think this PR #2206 fixed it.
@pyramation do we have a setup so you can easily test if this now works with a local network?
pardon the delayed reply! I have only been able to test pools in production 😅 I did remember that we may be getting some tooling soon for localosmosis and seeded pools — if that's what you mean, that would be amazing. cc @daniel-farina
Fixed in v12