question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Flatten contract source using CLI

See original GitHub issue

Overview

Currently, Brownie doesn’t provide a way to flattening smart contracts. Feature for flattening smart contracts can be a way for testing contracts with Brownie, while deploying them using another tool. Also, it can simplify the tasks required for verifying an smart contract on the Etherscan.

Specification

For the CLI following simple argument can be used:

brownie --flatten

Dependencies

#411 is related to this issue. Because, probably flattening smart contracts (written in Solidity) will make it easier to verify them on Etherscan.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

8reactions
nazariyvcommented, Nov 24, 2021

@matnad looks like ‘flattened_source’ is no longer available in 1.17.0?

1reaction
DanielVFcommented, Oct 10, 2022
container = YourContractName
print("\n\n".join([x['content'] for x in container.get_verification_info()['standard_json_input']['sources'].values()]))
Read more comments on GitHub >

github_iconTop Results From Across the Web

How to flatten and verify a smart contract using OpenZeppelin ...
This guide uses flattening for verification, but we recommend doing multifile verification as it is easier to read, maintains licenses and ...
Read more >
etherlime flatten - GitBook
Running this command will flatten the given smart contract and will record all Solidity code in one file along with imported sources. It...
Read more >
Flattening Contracts and Debugging with Remix - SitePoint
Flattening a smart contract refers to combining all Solidity code in one file instead of multiple source files such that, instead of having ......
Read more >
etherlime flatten - Read the Docs
Running this command will flatten the given smart contract and will record all Solidity code in one file along with imported sources. It...
Read more >
VSCode Solidity Contract Flattener - Visual Studio Marketplace
select files, right-click -> Solidity: flatten selected file(s); or cmd + shift + p -> Solidity Flattener - flatten current file . context-menu ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found