0

My network: filecoin.

I use this RPC: https://api.node.glif.io

I try send FIL token from A to B address on filecoin network and I got error:

{ jsonrpc: '2.0', error: { code: 1, message: "verify msg failed: message will not be included in a block: 'GasLimit' field cannot be less than the cost of storing a message on chain 745262 < 747863" }, id: 1 } 

code:

const tx = { to: (receiver+"").toLowerCase(), value: Utils.parseEther(ethers.utils.formatEther(1+"")+""), gasLimit: ethers.utils.hexlify(745262), maxFeePerGas: ethers.utils.hexlify(txGasPrice), maxPriorityFeePerGas: ethers.utils.hexlify(txGasPrice-1), nonce: await getTransactionCount(rpcUrl, (await wallet.getAddress()).toLowerCase()), type: 2, chainId: await getChainId(rpcUrl), }; const rawTransaction = await wallet.signTransaction(tx); const response = await sendRawTransaction(rpcUrl, rawTransaction); 

function "sendRawTransaction" code:

async function sendRawTransaction(rpcUrl, signedTx) { const headers = { 'Content-Type': 'application/json' }; const dataString = '{"jsonrpc": "2.0", "method": "eth_sendRawTransaction", "params": ["'+ signedTx +'"], "id":1}'; const options = { url: rpcUrl, method: 'POST', headers: headers, body: dataString, }; var result = new Promise((resolve, reject) => request(options, (error, response, body) => { if (!error && response.statusCode == 200) { let json = response.body; let obj = JSON.parse(json) console.log(obj); resolve(obj.result) } else { console.log(error); reject(error); } })); return await result; } 

I try increase gasLimit but same problem... another variables values:

maxFeePerGas 72858108 maxPriorityFeePerGas 72858107 

full tx values:

{ to: '0xcc1947438463a878e576cdc19fa1c78ed1e48ce1', value: BigNumber { _hex: '0x01', _isBigNumber: true }, gasLimit: '0x0b5f2e', maxFeePerGas: '0x0457b9fc', maxPriorityFeePerGas: '0x0457b9fb', nonce: 0, type: 2, chainId: 314 } 

maybe sameone know where is bug?

Thank you, God bless you!

1 Answer 1

0

This issue is resolved by increasing the "gasLimit" value to 1723354, which allows the FIL to transfer.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.