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

Add test constructor #117

Merged
merged 3 commits into from
Nov 23, 2023
Merged

Add test constructor #117

merged 3 commits into from
Nov 23, 2023

Conversation

julienbrs
Copy link
Contributor

@julienbrs julienbrs commented Nov 18, 2023

Issue: related to #70

Description: Also added get_name to check the init value.

@julio4
Copy link
Member

julio4 commented Nov 20, 2023

Would it be possible to test using the state directly and without the dispatcher and keep the ExampleConstructor contract as minimal as possible? Otherwise this looks good to me

I saw that you tried in the commits history, what was the problem by using unsafe_new_contract_state?

@julienbrs
Copy link
Contributor Author

By using unsafe_new_contract_state, as far as I understand, we create a new instance of ExampleConstructor, but it's not deployed so construcor has never been called, leading to names not set.

@julienbrs
Copy link
Contributor Author

Used set_contract_address that does the trick

@julio4
Copy link
Member

julio4 commented Nov 23, 2023

LGTM! Thank you

@julio4 julio4 merged commit 2f153c0 into NethermindEth:main Nov 23, 2023
1 check passed
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