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

provide support for new Goerli2 chain ID SN_GOERLI2 in gateway provider #186

Merged
merged 1 commit into from
Dec 8, 2022

Conversation

alex-sumner
Copy link
Contributor

Following the upgrade of the StarkNet testnets today, the Goerli2 network has a new chain ID SN_GOERLI2. This pull request allows caigo clients to connect to accounts deployed on Goerli2.

Prior to the StarkNet upgrade a caigo client could connect to Goerli2 as follows:

 gw := gateway.NewProvider(gateway.WithBaseURL("https://alpha4-2.starknet.io"))
 account, err := caigo.NewGatewayAccount(<account private key>, <account address>, gw, caigo.AccountVersion1)

But since the upgrade the returned account has all transactions rejected with the message “Signature (…, …), is invalid, with respect to the public key …, and the message hash …”.

With this pull request clients can successfully connect as follows:

 gw := gateway.NewProvider(gateway.WithChain("SN_GOERLI2"))
 account, err := caigo.NewGatewayAccount(<account private key>, <account address>, gw, caigo.AccountVersion1)

Passing any string which contains "goerli2" in either upper or lower case as the chain ID will work.

@gregoryguillou
Copy link
Contributor

Thank you @alex-sumner and sorry for the delay. We needed it! We will add some tests and make sure this network is also tested.

Copy link
Contributor

@gregoryguillou gregoryguillou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank

@gregoryguillou gregoryguillou merged commit cdccbf5 into NethermindEth:main Dec 8, 2022
@alex-sumner
Copy link
Contributor Author

alex-sumner commented Dec 8, 2022 via email

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

Successfully merging this pull request may close these issues.

2 participants