im writing a script in python and brownie to deploy my smart contract to a testnet but i want to set an if statement for not deploying the smart contract if its already deployed . I know that deployed contracts are stored in the build/deployments/map.json file but how can i check that the contract is already in this json file (i.e. contract already deployed) or there is a keyword in brownie syntax to check this ? Help please .

1 Answer 1


You can use the Project.load() method to try to load the contract from the build/deployments/map.json file. If the contract is not found in the file, an error will be raised.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.