book icon indicating copy to clipboard operation
book copied to clipboard

.env Private Key loading

Open 0xPrimata opened this issue 1 year ago • 5 comments

Loading an environment variable should handle private keys if private key is or isn't prefixed by "0x", indicating that its a hexadecimal.

vm.envUint("PRIVATE_KEY"); should handle prefixing it.

0xPrimata avatar Nov 23 '23 16:11 0xPrimata

@0xPrimata your issue seems to be related to the Foundry product itself, not the book. This issue should have been created on the Foundry official repo.

I faced this exact same issue a while before, and I created an issue for this. Does this help you? https://github.com/foundry-rs/foundry/issues/6029

Genesis3800 avatar Nov 24 '23 12:11 Genesis3800

@Genesis3800 appologies! That's exactly what I was looking for, just wondering if they are actually taking your recommendation.

0xPrimata avatar Nov 24 '23 15:11 0xPrimata

Not sure if this was merged though, I think they closed it. @Evalir said in the PR conversation that they included this functionality somewhere else. Are you still facing this issue as of now @0xPrimata ?

Please try again after running foundryup

Genesis3800 avatar Nov 24 '23 15:11 Genesis3800

Yep just checked, still having the same issue.

0xPrimata avatar Nov 24 '23 18:11 0xPrimata

Then you gotta talk to maintainers on the OTHER repo @0xPrimata . I think I already helped a bit by guiding u 2 the right issue.

Genesis3800 avatar Nov 25 '23 03:11 Genesis3800