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

Feature/generate index js #103

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Feature/generate index js #103

wants to merge 3 commits into from

Conversation

TateB
Copy link
Contributor

@TateB TateB commented Jul 7, 2022

Created a script that generates the index.js file based on the built contract ABIs, and added to the build script.

@jefflau
Copy link
Member

jefflau commented Jul 15, 2022

This adds every Solidity contract into index.js, but I'm not sure if we want to expose every contract, such as pure testing contracts:

const TestNameEncoder = require('./build/contracts/TestNameEncoder')
const TestRRUtils = require('./build/contracts/TestRRUtils')
const TestRegistrar = require('./build/contracts/TestRegistrar')
const TestResolver = require('./build/contracts/TestResolver')
const TextResolver = require('./build/contracts/TextResolver')
const UniversalResolver = require('./build/contracts/UniversalResolver')
const UpgradedNameWrapperMock = require('./build/contracts/UpgradedNameWrapperMock')

The ones with Mock/Test probably don't need to be exported and probably can be omitted from the npm package to save on size.

Also NameGriefer.sol is an example contract to test for a vulnerability on the NameWrapper. I guess we could rename it to Test and regex out anything that starts with Test

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.

None yet

2 participants