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

How to create a registry contract in local testnet #49

Open
tnkhanh opened this issue Jun 7, 2022 · 3 comments
Open

How to create a registry contract in local testnet #49

tnkhanh opened this issue Jun 7, 2022 · 3 comments

Comments

@tnkhanh
Copy link

tnkhanh commented Jun 7, 2022

Hi, I'm trying to create the registry contract in a local testnet.
I followed the README and run

$ scripts/generateDeployTxs.js

and got this

 ======= Contract: EthereumDIDRegistry =======
rawTx: 0xf9[..]aaa
senderAddress: 0x3a[..]
cost (ether): 0.2811144
contractAddress: 0x36[..]
done

I transferred some ether to senderAddress .
Now I'm not sure what to do. Should I send the rawTx from senderAddress ? It requires the senderAddress 's private key which I don't have.
This might sound silly but what exactly do I do?

@mirceanis
Copy link
Contributor

The rawTx is already signed.
The corresponding private key does not exist, or rather it's impossible to find.

The next step is to send the raw transaction to your local network.

If you are doing this for testing, it might be easier to deploy the contract normally, from the compiler output and using a local private key.

Please close this if the answer is clear enough :)

@tnkhanh
Copy link
Author

tnkhanh commented Jun 7, 2022

I got this error when sending the rawTx

"error":{"code":-32000,"message":"only replay-protected (EIP-155) transactions allowed over RPC"}

I look around and find chainId might be missing in the transaction (ref. https://ethereum.stackexchange.com/questions/94412/valueerror-code-32000-message-only-replay-protected-eip-155-transac)
Maybe rawTx is missing chainId and I need to add it?

@mirceanis
Copy link
Contributor

I guess so, as it seems your local network requires it.
After you do that and you rebuild the deployment transaction, the sender address will change.

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

2 participants