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
provider_test.go upgraded to Sepolia #563
provider_test.go upgraded to Sepolia #563
Conversation
The fixed test is breaking with the 'devnet' param, the devnet is returning 'goerli' as the chainId. I didn't test with devnet, my bad. |
Hey, the PR looks good, you just need to fix the TestCall that is failing on devnet |
@@ -107,8 +112,9 @@ func (devnet *DevNet) IsAlive() bool { | |||
} | |||
|
|||
type MintResponse struct { | |||
NewBalance *big.Int `json:"new_balance"` | |||
Unit string `json:"unit"` | |||
NewBalance string `json:"new_balance"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new devnet version returns a string instead a number, and a new field. The compiler was unable to convert to bigInt
@@ -44,26 +48,6 @@ func TestDevnet_Accounts(t *testing.T) { | |||
} | |||
} | |||
|
|||
// TestDevnet_FeeToken tests the FeeToken function of the Devnet struct. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was this removed? I think we can add it back in without breaking tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed this tests because the new devnet doesn't have the "/fee_token" endpoint anymore. That being said, I believe the "Mint" and "TestCall" tests are enough to prove the token existing, address correctness, and functionalities.
@@ -38,12 +38,12 @@ func TestCall(t *testing.T) { | |||
{ | |||
FunctionCall: FunctionCall{ | |||
// ContractAddress of predeployed devnet Feetoken | |||
ContractAddress: utils.TestHexToFelt(t, "0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7"), | |||
EntryPointSelector: utils.GetSelectorFromNameFelt("name"), | |||
ContractAddress: utils.TestHexToFelt(t, DevNetETHAddress), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using an existing variable instead of hardcoding the address
ContractAddress: utils.TestHexToFelt(t, "0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7"), | ||
EntryPointSelector: utils.GetSelectorFromNameFelt("name"), | ||
ContractAddress: utils.TestHexToFelt(t, DevNetETHAddress), | ||
EntryPointSelector: utils.GetSelectorFromNameFelt("decimals"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had some issues related to felt.Felt comparison using the "name" method. Using "decimals" was simpler to compare
Started upgrading the RPC tests to Sepolia network instead of Goerli.
This PR upgrades the provider_test.go tests to Sepolia.
Partially resolves the issue #551.