hyperweb-io / hyperweb-io/telescope
Log: invalid length: tx parse error
- Dominant language
- TypeScript
- Stars
- 154
- Forks
- 53
- PR merge metrics
- No merged PRs in 30d
Description
### Context:
I am generating an amino message for the Gravity Bridge Fee Auction. The message generates, and I can sign/broadcast it just fine.
### Issue:
Recently, one of the parameters which is required to submit the tx, BidFee, was raised. It was initially 3110 ugraviton but has been increased to 3110000000 ugraviton or 3110 graviton for short. After updating the parameter in the transaction, I am now getting
```
Error: Broadcasting transaction failed with code 2 (codespace: sdk). Log: invalid length: tx parse error
```
If i remove one digit from the fee number so instead of 3110000000 i use 311000000 it will sign and broadcast but ultimately fail as the chain will not accept any number lower then 3110000000.
I cant find anyone who's run into that error, and i'm having a hard time figuring out why that error appears. The issue is not with the chain or the transaction as I can sign and successfully broadcast the exact same transaction via cli and this was working before the fee change.
Any help or simply pointing me in the right direction would be awesome!
[Link to successfully signed and broadcasted tx](https://www.mintscan.io/gravity-bridge/tx/02F57A46B45A6C5D246EC536BB80C1DA4E07489167DF1A8A20DD2B7A5807AF1F)
### Replicate
```
git clone https://github.com/chalabi2/auction-frontend
cd auction-frontend
npm install
npm run dev
```
OR
[Live Site](https://auction.gravitypulse.app)
### TX
```
export const bidOnAuction = (
getSigningStargateClient: (
signerOptions: SignerOptions
) => Promise,
signerOptions: SignerOptions,
setResp: (resp: string) => any,
chainName: string,
address: string,
auctionId: string,
bidAmount: string,
bidFeeAmount: string,
toast: ReturnType
) => {
return async () => {
const stargateClient = await getSigningStargateClient(signerOptions);
if (!stargateClient || !address) {
console.error("stargateClient undefined or address undefined.");
return;
}
const { bid } = auction.v1.MessageComposer.withTypeUrl;
const msg = bid({
auctionId: BigInt(auctionId),
bidder: address,
amount: BigInt(bidAmount),
bidFee: BigInt(bidFeeAmount),
});
const memo: string = "Submitted by Gravity Bridge Fee Auction App";
const fee: StdFee = {
gas: "1000000",
amount: [
{
amount: "1000000",
denom: "ugraviton",
},
],
};
try {
const response = await stargateClient.signAndBroadcast(
address,
[msg],
fee,
memo
);
setResp(JSON.stringify(response, null, 2));
showSuccessToast(toast, response.transactionHash, chainName);
} catch (error) {
console.error("Error signing and sending transaction:", error);
if (error instanceof Error) {
showErrorToast(toast, error.message);
}
}
};
};
```
This was an issue i posted in cosmjs and I was advised to contact the gravity bridge package maintainers which at this time is me.
My most up to date gravity bridge telescope generated package is [here](https://github.com/chalabi2/gravity-bridgejs)
Any advice on how i could generate types that allow me to use larger numbers would be much appreciated!
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.