jrkb6 / portal-protocol

Portal is a novel decentralized identity system with privacy-preserving, user-centric, and verifiable data resolution.
2 stars 0 forks source link

go run main.go -deploy true #3

Closed mouhib539 closed 5 months ago

mouhib539 commented 5 months ago

the program refuses to acces the deploy function and indicates an error in the ownerSigner and gives me this error

C:\Users\MSI\Desktop\portal-protocol-main\go-sdk> go run main.go -Deploy true Loaded env variables rpc url: http://localhost:8545, ipfsUrl: http://localhost:5001, ownerPriv: 0xf1b3f8e0d52caec13491368449ab8d90f3d222a3e485aa7f02591bbceb5efba5, userPriv: 0x91821f9af458d612362136648fc8552a47d8289c0f25a8a1bf0860510332cef9 panic: runtime error: invalid memory address or nil pointer dereference [signal 0xc0000005 code=0x0 addr=0x0 pc=0x7ff72640dda4]

goroutine 1 [running]: main.main() C:/Users/MSI/Desktop/portal-protocol-main/go-sdk/main.go:82 +0x424 exit status 2

even though i verified everything including the environement and the function parameters. is there something i could do and thank you .

jrkb6 commented 5 months ago

It appears that you are passing private keys as hexadecimal strings in your .env file. To resolve the problem, you should remove the 0x prefix from the private key entries. This prefix causes formatting issues when the system tries to interpret the key.

OWNER_PRIVATE_KEY=f1b3f8e0d52caec13491368449ab8d90f3d222a3e485aa7f02591bbceb5efba5
USER_PRIVATE_KEY=91821f9af458d612362136648fc8552a47d8289c0f25a8a1bf0860510332cef9
mouhib539 commented 5 months ago

thnak you a lot forThank you for your active and efficient involvement in the project. I'm pleased to inform you that everything is set up smoothly with Ganache. However, after making corrections, I encountered an error regarding the gas limit. The environment variables are properly loaded with the RPC URL set to http://localhost:8545/, IPFS URL set to http://localhost:5001/, owner's private key set to f1b3f8e0d52caec13491368449ab8d90f3d222a3e485aa7f02591bbceb5efba5, and user's private key set to 91821f9af458d612362136648fc8552a47d8289c0f25a8a1bf0860510332cef9. When attempting to deploy contracts using the DeployRegistry and DeployManager functions, I encountered an error indicating that the gas limit was exceeded. Would you please advise on how to resolve this issue?

Loaded env variables rpc url: http://localhost:8545, ipfsUrl: http://localhost:5001, ownerPriv: f1b3f8e0d52caec13491368449ab8d90f3d222a3e485aa7f02591bbceb5efba5, userPriv: 91821f9af458d612362136648fc8552a47d8289c0f25a8a1bf0860510332cef9
Deploying contracts from 0xE280029a7867BA5C9154434886c241775ea87e53 SuggestGasPrice 10000000000 2024/04/21 11:23:09 Exceeds block gas limit exit status 1

mouhib539 commented 5 months ago

i fixed the error, the estimation of the ganache environment should indicated the gas price and gas limit like this

ganache-cli -g 10000000000 -l 10000000 -v -m "much repair shock carbon improve miss forget sock include bullet interest solution"