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

fix: Fixed standard_input_json generation and improved library linking #1491

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

Conversation

kj-crypto
Copy link

@kj-crypto kj-crypto commented Mar 30, 2022

What I did

This PR includes few changes, which improves standard_input_json generation for contract code verification.
It relates to following issues:
#1461
#1474
#1330

How I did it

  • Changed sources "global" file names generation from base file name into sub directory name. New form of standard_input_json can view as follow
"sources": {
    "dir/c.sol": {
        "content": "..."
}

This should prevent from name collision like here #1461 However collision detection will raise error to indicate the problem.

  • Added ability to fetch source from external project directories via only remappings section, without including into dependencies section. It is helpful if project depends on code pre-downloaded manualy.
  • Fixed finding flies which are imported via multiline import syntax e.g
pragma solidity ^0.8.0;

import 
'./dir/contract.sol'
as C;
  • Added option for linking deployed libraries address from brownie-config.yaml. The structure is as follow
libraries:
  lib_name: '0x123...'

It was added because currently there is no option to pass library address deployed from outside of current project. The only way is to redeploy the source code of libraries.

How to verify it

There are automated tests for new feature and fixes

Checklist

  • I have confirmed that my PR passes all linting checks
  • I have included test cases
  • I have updated the documentation
  • I have added an entry to the changelog

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