I'd like to use Substrate Frontier as a private blockchain for my current project. I have set up a project using a frontier-template-node build and I am now trying to adjust its settings.
I am currently stuck with issues with accounts I generated:
- In the chain specification file (customSpec.yml), I replaced the sudo account id of Alice by an account id I created. This account is not able to deploy a contract but Alice is still authorized to do it. I get the error
Returned error: insufficient funds for gas * price + value
while the substrate and EVM balances of the account seems well funded. - All the user accounts I created are not able to perform a transaction. I get the same error
Returned error: insufficient funds for gas * price + value
even with a balance of1,000,000,000 ETH
Here is a sample call I execute on my code:
// Load contract
const contract = new web3.eth.Contract(contractAbi, contractAddress, {
from: signerAddress,
gasPrice: '0x3B9ACA00',
});
// Prepare method transaction
const encodedMethod = await contract.methods.transfer([userAddress, 100]).encodeABI();
// Sign transaction
const methodTx = await web3.eth.accounts.signTransaction(
{
from: signerAddress,
to: contractAddress,
data: encodedMethod,
gasPrice: '0x3B9ACA00',
gas: '0x1000000',
},
signerPrivateKey,
);
// Send transaction
const txReceipt = await web3.eth.sendSignedTransaction(methodTx.rawTransaction);
Could you give me some advices to fix this issue?
./target/release/frontier-template-node key generate
with a password and I wonder if it could be the reason to the problem. It looks like theprivateKey
I passed to the transaction is not properly linked to the account. Could it be the problem and i there a way to give the password in order to fix this issue?./target/release/frontier-template-node build-spec --disable-default-bootnode --chain local > customSpec.json
in both sectionsbalances
andevm.accounts
. Should I edit the chain_spec.rs before generating the json?