-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Getting an error while trying to create post with desmjs library. #1340
Comments
Hey, the const createSubspaceMsg: MsgCreateSubspaceEncodeObject = {
typeUrl: "/desmos.subspaces.v3.MsgCreateSubspace",
value: MsgCreateSubspace.fromPartial({
creator: account.address,
name: "Test Subspace",
description: "This is a test subspace",
owner: account.address, // this field must be included
}),
}; |
@dadamu thank you very much, i have successfully create post. |
since you are here i would like to share this, trying to connectWallet, after clicking the conectWallet button the qrcode pop-up i scanned it with trust wallet mobile app i got this pop-up on my mobile below is the snippet code import { useCallback, useEffect, useState } from "react"; export default function Header() { const [address, setAddress] = useState(""); useEffect(() => { const connectDisabled =
const walletConnect = new WalletConnectConnector({ // Function to connect to MetaMask Thanks |
@sundayonah |
Thanks |
I am running desmos node locally, and i have been able to create several posts successfully. desmos query posts post [subspace-id] [post-id] [flags] i run it in terminal, it successfully display the post, how do i do the same UI, so i can see the posts created. Thanks @dadamu |
You can use |
Thanks @dadamu |
So basically while going through the desmjs docs, i found that i have to create subspaceId,
creating subspaceId
useEffect(() => {
const initializeClient = async () => {
const mnemonic = ""
const rpcEndpoint = "http://127.0.0.1:26657";
const gasPrice = GasPrice.fromString("0.025stake");
const signer = await OfflineSignerAdapter.fromMnemonic(SigningMode.DIRECT, mnemonic);
const [account] = await signer.getAccounts();
}, []);
the error i have been getting
VM41549 page.tsx:206 Failed to create subspace: Error: Query failed with (6): rpc error: code = Unknown desc = invalid owner address: invalid address [desmos-labs/desmos/v7/x/subspaces/types/msgs.go:95] With gas wanted: '0' and gas used: '1168' : unknown request
at QueryClient.queryAbci (queryclient.js:118:19)
at async Object.request (utils.js:35:30)
at async Object.simulate (queries.js:50:34)
at async DesmosClient.simulate (signingcosmwasmclient.js:90:29)
at async DesmosClient.signAndBroadcast (desmosclient.js:74:35)
at async initializeClient (VM41549 page.tsx:182:40)
The function below is for creating post
const handleSubmit = async (event: React.FormEvent) => {
event.preventDefault();
};
The text was updated successfully, but these errors were encountered: