brownie

python exec() raises SyntaxError exception when passing an object inside the string argument

python exec() raises SyntaxError exception when passing an object inside the string argument Question: So I am currently trying to deploy my smart contract using a brownie script as shown in the code below: from brownie import accounts, network import sys sys.path.append("../") import globalVars def main(): import_str = "from {0} import {1}".format("brownie", globalVars.contractName) exec(import_str) network.connect(‘development’) …

Total answers: 1

Installing OpenZeppelin Dependencies in Brownie

Installing OpenZeppelin Dependencies in Brownie Question: In my brownie project, I want to install OpenZepplin dependencies. I have included the dependency in the config file, but Brownie is not automatically installing them. What am I doing wrong? enter image description here I tried hitting brownie compile Asked By: Tushar Sharma || Source Answers: Have you …

Total answers: 1

smart contract with brownie gives VirtualMachineError

smart contract with brownie gives VirtualMachineError Question: I encontered a problem when I test my project, any help would be greatly appreciated. All my code can be found in here: https://github.com/Karlus44/smartcontract-lottery When I type the command brownie test my script tests/test_lottery_unit.py is exectuted, and my different tests are submitted. Here some quotes of my logout: …

Total answers: 3

Brownie: CompilerError: File outside of allowed directories

Brownie: CompilerError: File outside of allowed directories Question: I’m trying to import "@chainlink/contracts/src/v0.6/interfaces/AggregatorV3Interface.sol" to my contract but i encountered this error. CompilerError: solc returned the following errors: contracts/Lottery.sol:4:1: ParserError: Source "C:/Users/Алексей/.brownie/packages/smartcontractkit/chainlink-brownie [email protected]/contracts/src/v0.6/interfaces/AggregatorV3Interface.sol" not found: File outside of allowed directories. import "@chainlink/contracts/src/v0.6/interfaces/AggregatorV3Interface.sol"; ^————————————————————————–^ This is my contract (Lottery.sol): // SPDX-License-Identifier: MIT pragma solidity ^0.6.6; import "@chainlink/contracts/src/v0.6/interfaces/AggregatorV3Interface.sol"; …

Total answers: 2

How to create an account on Brownie

How to create an account on Brownie Question: I am looking to create accounts on Brownie for deploying contracts but I am not sure how to do this. I have looked online how to do this and I havent found it. I am running python 3.7 and have brownie installed and working as intended. I …

Total answers: 2

ParserError: Source file requires different compiler version

ParserError: Source file requires different compiler version Question: I tried all that you mentioned in the discussion here (in other questions) and at https://github.com/smartcontractkit/full-blockchain-solidity-course-py/discussions/522 , however it is not solving the issue for me, I also noticed that the current compiler version remains (current compiler is 0.6.12+commit.27d51765.Windows.msvc). But when I right click and select Solidty:Compiler …

Total answers: 5