Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

insufficient funds for gas * price + value #21

Open
toutou8148 opened this issue Dec 22, 2020 · 2 comments
Open

insufficient funds for gas * price + value #21

toutou8148 opened this issue Dec 22, 2020 · 2 comments

Comments

@toutou8148
Copy link

Hello,
I can interact with Ethereum network using this library but I can't interact with smart contracts as I receive the error "insufficient funds for gas * price + value". However, the account that I use has enough ether. The problem is related to the private key, I think I am not accessing to my account. May you help me.

I am setting my private key as a string and I got it using Metamask. In provided example, the form of the private key is as follow:
const char PRIVATE_KEY[] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 };
How can I get this form.

@ghost
Copy link

ghost commented Jan 12, 2021

You are using mnemonic right? You tried using the key as it is given by metamask in account details and passing it as a string?

Also, if you dont mind, how can you make this library work? it worked at first try without changing anything? im having a lot of problems trying to simply make a call with the samples

@toutou8148
Copy link
Author

Hi, Actually, I made some changes to get the library work. I don't remember exactly what changes I have made. But, I think that I deleted some files and making some changes on the code. You can send me what errors you get and I will tell you what you must do to fix the errors. the private key must be set as a tab of char and not string, otherwise it will not work. I passed weeks to get it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant