Giter Club home page Giter Club logo

erc20-brownie's Introduction

ERC20 Python, Brownie, Solidity

Prerequisites

Please install or have installed the following:

Installation

  1. Install Brownie, if you haven't already. Here is a simple way to install brownie.
pip install eth-brownie

Or, if that doesn't work, via pipx

pip install --user pipx
pipx ensurepath
# restart your terminal
pipx install eth-brownie
  1. Install ganache-cli
npm install -g ganache-cli

Quickstart

  1. Clone this repo
git clone https://github.com/PatrickAlphaC/erc20-brownie
  1. Run a script
brownie run scripts/1_deploy_token.sol

erc20-brownie's People

Contributors

charlesxsh avatar patrickalphac avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

erc20-brownie's Issues

Compile error with brownie

I'm doing the second step from the quickstart of the repo. But this is my output.

image

How can I fix it?

EDIT 1:

brownie run scripts/1_deploy_token.sol
Brownie v1.17.2 - Python development framework for Ethereum

Compiling contracts...
  Solc version: 0.6.12
  Optimizer: Enabled  Runs: 200
  EVM Version: Istanbul
Generating build data...
 - OpenZeppelin/[email protected]/SafeMath
 - OpenZeppelin/[email protected]/ERC20
 - OpenZeppelin/[email protected]/IERC20
 - OpenZeppelin/[email protected]/Context
 - EasyToken

Compiling contracts...
  Solc version: 0.8.11
  Optimizer: Enabled  Runs: 200
  EVM Version: Istanbul
CompilerError: solc returned the following errors:

ParserError: Source file requires different compiler version (current compiler is 0.8.11+commit.d7f03943.Linux.g++) - note that nightly builds are considered to be strictly less than the released version
 --> /home/diazrock/.brownie/packages/OpenZeppelin/[email protected]/contracts/token/ERC20/ERC20.sol:3:1:
  |
3 | pragma solidity >=0.6.0 <0.8.0;
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Compile error due to inconsistent prama versions

There was an error raised when I ran brownie run ./scripts/1_deploy_token.py, and I have figured it out the reason why it raised the exception.

The OurToken.sol' solidity version was inconsistent with ERC20.sol of [email protected] solidity version. refer the details below

The OurToken.sol solidity version specify
image

While ERC20.sol of [email protected] solidity version was

image

They were consistent. So when you ran the command as above. There is no suitable version of solidity for compile those files.

Brownie run scripts

am getting this error when i run my deploy script

File "C:\Users\Daniel, line line, in in
importlib.import_module(f"brownie._cli.{cmd}").main() File "C:\Users\Daniel, line line, in in active_project = project.load() File "C:\Users\Daniel, line line, in in return Project(name, project_path) File "C:\Users\Daniel, line line, in in
self.load()
File "C:\Users\Daniel, line line, in in
self._compile(changed, self._compiler_config, False)
File "C:\Users\Daniel, line line, in in
_install_dependencies(self._path)
File "C:\Users\Daniel, line line, in in
install_package(package_id)
File "C:\Users\Daniel, line line, in in
return _install_from_github(package_id)
File "C:\Users\Daniel, line line, in in
raise ValueError(
ValueError: Invalid version for this package. Available versions are:
4.4.1, 4.4.0, 4.4.0-rc.1, 4.4.0-rc.0, 4.3.3, 4.3.2, 4.3.1, 4.3.0, 4.3.0-rc.0, 4.2.0, 4.2.0-rc.0, 4.1.0, 4.1.0-rc.0, 4.0.0, 4.0.0-rc.0, 4.0.0-beta.1, 4.0.0-beta.0, 3.4.2, 3.4.2-solc-0.7, 3.4.1, 3.4.1-solc-0.7, 3.4.1-solc-0.7-2, 3.4.0, 3.4.0-solc-0.7, 3.4.0-rc.0, 3.3.0, 3.3.0-solc-0.7, 3.3.0-rc.2, 3.3.0-rc.1, 3.3.0-rc.0, 3.2.2-solc-0.7, 3.2.1-solc-0.7, 3.2.0, 3.2.0-rc.0, 3.1.0, 3.1.0-solc-0.7, 3.1.0-rc.0, 3.0.2, 3.0.1, 3.0.0, 3.0.0-rc.1, 3.0.0-rc.0, 3.0.0-beta.0, 2.5.1, 2.5.0, 2.5.0-rc.0, 2.4.0, 2.4.0-beta.2, 2.4.0-beta.1, 2.4.0-beta.0, 2.3.0, 2.3.0-rc.3, 2.3.0-rc.2, 2.3.0-rc.1, 2.3.0-rc.0, 2.2.0, 2.2.0-rc.1, 2.1.3, 2.1.2, 2.1.1, 2.1.0-rc.2, 2.1.0-rc.1, 2.0.1, 2.0.0, 2.0.0-rc.4, 2.0.0-rc.3, 2.0.0-rc.2, 2.0.0-rc.1, 1.12.0, 1.12.0-rc.2, 1.12.0-rc.1, 1.11.0, 1.11.0-rc.1, 1.10.0, 1.9.1, 1.9.0, 1.8.0, 1.7.0, 1.6.0, 1.5.0, 1.4.0, 1.3.0, 1.2.0, 1.1.0, 1.0.7, 1.0.6, 1.0.5, 1.0.4, 1.0.3, 1.0.2, 1.0.1, 1.0.0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.