Open jasmeenPedalsup opened 10 months ago
2.4MB is more than what most chains can accept. A typical limit of the Wasm file is 800 KB. You can probably get the contract much smaller by using the rust-optimizer.
rust-optimizer reduce contract size from 2.4MB to 327.7kb but now I getting another error
Error: Broadcasting transaction failed with code 2 (codespace: sdk). Log: unable to resolve type URL /cosmwasm.wasm.v1.MsgStoreCode: tx parse error
at SigningCosmWasmClient.broadcastTx (/home/pedalsup/D-drive/Learning/cosmos/frontend/academy-deploy-main/node_modules/@cosmjs/cosmwasm-stargate/src/cosmwasmclient.ts:293:13)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at async SigningCosmWasmClient.upload (/home/pedalsup/D-drive/Learning/cosmos/frontend/academy-deploy-main/node_modules/@cosmjs/cosmwasm-stargate/src/signingcosmwasmclient.ts:252:20)
at async uploadContracts (/home/pedalsup/D-drive/Learning/cosmos/frontend/academy-deploy-main/scripts/helpers/uploadContracts.ts:25:21)
at async main (/home/pedalsup/D-drive/Learning/cosmos/frontend/academy-deploy-main/scripts/upload_contract.ts:50:18)
error Command failed with exit code 1.
below is my RPC URL and chain-Id
chainId: "theta-testnet-001",
rpcEndpoint:"https://rpc.sentry-01.theta-testnet.polypore.xyz",
can anyone explain above error and how can I solve above error?
The error
unable to resolve type URL /cosmwasm.wasm.v1.MsgStoreCode: tx parse error
sounds like the network has no CosmWasm support. Could you ask the maintainers of the network about it?
I am getting
Error: Bad status on response: 400
error while upload cotract usingupload
function below is my codebelow is error
Note: my wasm file is around 2.4MB.