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

feat: token-registry smart contract validation #269

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

osslgtm
Copy link
Contributor

@osslgtm osslgtm commented Apr 26, 2023

Summary

Input Validation for Token Registry and Token Id

Changes

src/implementations/title-escrow/helpers.ts
To do validation on smart contract - using getCode and calling genesis()
https://docs.ethers.org/v5/api/providers/provider/#Provider-getCode
genesis is part of Token Registry - no gas fees as it's a view function

src/implementations/testsHelper.ts
To help with mocking smart contract and ethers behaviour
Used by merging (mergeMockSmartContract) base contract behaviour (getMockTokenRegistry) and overrides (user-specified)

issue, acceptSurrender and rejectSurrender with test
updated implementation and test code by utilising helper code on testHelper and helpers

Issues

#263

@osslgtm osslgtm marked this pull request as ready for review April 26, 2023 05:30
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.

1 participant