Hey everyone, I just started on the Cosmos SDK and want to write a script that can sign and send transactions via a remote call.
I started by following this tutorial: tutorials.cosmos.network/tutorials/3-run-node/
I have a local node running, I can send transactions, I can see the transactions passing through.
Now, to send transactions from a remote call, I am using CosmJS, once I write my script then any website can use that CosmJS script.
I am following this tutorial: tutorials.cosmos.network/tutorials/7-cosmjs/2-first-steps.html#with-a-locally-started-chain
I make sure my node is running, but when I run the experiment-local.ts, I get this error:
TypeError: fetch failed
at Object.fetch (node:internal/deps/undici/undici:11929:11)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at async HttpClient.execute (code/cosmos/cosmjs-sandbox/node_modules/@cosmjs/tendermint-rpc/src/rpcclients/httpclient.ts:52:43)
at async Function.detectVersion (code/cosmos/cosmjs-sandbox/node_modules/@cosmjs/tendermint-rpc/src/tendermint34/tendermint34client.ts:42:22)
at async Function.create (code/cosmos/cosmjs-sandbox/node_modules/@cosmjs/tendermint-rpc/src/tendermint34/tendermint34client.ts:36:22)
at async Function.connect (code/cosmos/cosmjs-sandbox/node_modules/@cosmjs/stargate/src/stargateclient.ts:155:22)
at async runAll (code/cosmos/cosmjs-sandbox/experiment-local.ts:16:20) {
cause: Error: connect ECONNREFUSED 127.0.0.1:26657
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1481:16) {
errno: -111,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '127.0.0.1',
port: 26657
}
}
What could be an issue causing this to fail to connect?
I cannot seem to find anything related to error code -111
Any help is appreciated