I am trying to compile this smart contract (fluxAggregator) to setup a Flux-Monitor within VS Code using brownie:

Windows 10, Brownie v1.19.0, Python v3.9.13, Node.JS v16.14.2, NPM v8.13.1

Within the import code lines in the smart contract, I have replaced the paths with @chainlink/contracts/src/v0.6/

Then my execution commands are:

brownie init
npm install @chainlink/contracts --save
brownie compile

Once I compile, I get this error returned.

UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 5029: character maps to

My brownie-config.yaml which is located in the root directory of the working directory contains:

dotenv: .env
  - smartcontractkit/chainlink-brownie-contracts@0.4.0
      - "@chainlink=smartcontractkit/chainlink-brownie-contracts@0.4.0"

And finally, the VS Code Solidity extension warns me that the source file requires a different compiler version (current compiler is 0.8.9....). To fix this I change the workspace compiler version to the same as the smart contract (v0.6.6). But I still receive the Decode error message upon compiling.

  • Hi Matt, are you trying to deploy your own aggregator smartcontract on a blockchain network? it seems the issue is not related to solc compiler or smart contract. Can you share your repo so that I can try to reproduce it.
    – Frank Kong
    Aug 6 at 12:23
  • Hey Frank. The problem seems to be something with my windows configuration. When I compile on ubuntu 18.04 LTS it has no issues. github.com/translucent-link/firecrest.git
    – Matt
    Aug 7 at 8:10


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.