Skip to content
This repository was archived by the owner on Oct 1, 2025. It is now read-only.

feat: token-registry smart contract validation#269

Open
osslgtm wants to merge 1 commit intomasterfrom
feat/token-registry-connect-validation
Open

feat: token-registry smart contract validation#269
osslgtm wants to merge 1 commit intomasterfrom
feat/token-registry-connect-validation

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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant