Could someone please help on an issue, where I'm not getting a json file after I compile the contract in brownie..It just says
Brownie v1.19.2 - Python development framework for Ethereum
Project has been compiled. Build artifacts saved at Simple_Storage/build/contracts
But there is no JSON file.
Any input would be appreciated.
Did you see a "cache" folder in your project after compiling? The .json file should be there
Related
We are working on a project which requires CAN communication in it. We have made some code in the Arduino IDE which we are trying to do in ESP IDE. However, there are some libraries which we are finding difficult to import into the esp IDE, example (Adafruit). Is there any way we can do it?
We cloned the Arduino as component library from the github and made the necessary changes into some basic codes such as wifi scan from arduino IDE which worked successfully in the espressif IDE , we tried the same method and cloned the Adafruit libraries for OLED and MLX sensor but each time we tried to build program, it highlighted the library includation line and said "no such file or directory exits", we expect for a method to resolve this issue.
You can install libraries from a local ZIP file or by using the built-in library manager.
Go to Sketch > Include Library > Manage Libraries. Type a name in and find the one that you want to install and click install.
I am trying to compile a contract so that I can start the brownie console but I keep getting the error for the contracts I am trying to import.
ParserError: Source "#openzeppelin/contracts/token/ERC1155/IERC1155.sol" not found: File not found.
--> contracts/DutchAuction.sol:3:1:
|
3 | import "#openzeppelin/contracts/token/ERC1155/IERC1155.sol";
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^`
How would I go about fixing this? Much appreciated!
When importing packages, per the brownie docs you first have to install the packages. You can install them from:
Install from github
Install from ethpm
One of the most common ways is just installing directly from github releases. To do this, you have to update your brownie-config.yaml (or make this file it if you haven't already)
You then have to add the github repo as a dependency with the structure:
REPO_OWNER/REPO_NAME#RELEASE_VERSION
And then add it to remappings if you want to use the # syntax, like so:
dependencies:
- OpenZeppelin/openzeppelin-contracts#4.3.2
compiler:
solc:
remappings:
- '#openzeppelin=OpenZeppelin/openzeppelin-contracts#4.3.2'
This example should work for this specific use case if you pop it into your brownie-config.yaml
I struggled with the same issue for days. I realized my mistake: the config file was named brownie_config.yaml (with underscore) instead of brownie-config.yaml (with dash)
I'm trying to run the Web3j example available at https://github.com/web3j/sample-project-gradle
Unfortunately, there is hardly any information available on how to build and run the example, and newbies have to contend with learning Gradle in addition to the Web3j-Java interface.
I'm able to build the example (after creating a Wallet account with a JSON file, loading it with Rinkleby Ether and inserting my Infura API key into the Application file) as follows:
$ gradle build
which succeeds without errors. However, I am clueless on how to run the project...thanks in advance for any help.
s1b
Everything seems ok with the your project. Have you tried "Run as a Java application" option from the Eclipse IDE? I am running my Java smart contract functions in this way.
I am creating an example for our next F# meetup and have run into an issue.
I have downloaded the FSharp.Data v2.2.1 to try the JSON tutorials to parse (stock options) data downloaded from the web. I have been struggling with this issue for almost a week now. I have followed the suggestions seen in other posts including complete uninstall of packages suggestion. I ran into the same issue trying to use the CSV provider and decided to switch to JSON.
I have #load #"C:\ full path to dll ...\lib\net40\FSharp.Data.dll" For some reason I have to give the full path for the F# script file to recognize it.
The line open FSharp.Data has an error "The namespace 'Data' is not defined"
Nuget package manager shows that FSharp.Data version:2.2.1 is installed.
I have uninstalled and reinstalled all packages in the project several times but it does not change the error.
So I am stuck at that point. I could use some insights from anyone who has been down this path.
The following steps worked for me. I started from a new F# project and did everything in F# Interactive.
Right click references folder in the project manager.
Select manage nuget packages
Install FSharp.Data
Reference the library in F# Interactive:
\#r #"C:\Users\{Full project path}\packages\FSharp.Data.2.2.1\lib\net40\FSharp.Data.DesignTime.dll";;
I get the warning that the library is locked. But F# Interactive allows me to open it.
Open the library:
open FSharp.Data;;
Run JsonProvider on file with data:
type Stocks = JsonProvider<"C:\msft.txt">;;
I am using gwtprojsonserializer to convert objects to JSON. I've added the version 1.0.4 jar I downloaded from the website http://code.google.com/p/gwtprojsonserializer/ but although the source code on the website includes functionality for serializing arraylists, it is not included in the jar and hence i get the following error:
com.kfuntak.gwt.json.serialization.client.SerializationException: Can't find object serializer for java.util.ArrayList
Does anyone know how I can update the jar or use their latest source code?
Thanks in advance.
Its open source project. The entire source code can be easily downloaded from http://code.google.com/p/gwtprojsonserializer/source/browse/#svn%2Ftrunk
I am assuming the required code for serializing arraylists is in trunk. You can add/remove/modify on you local copy. Build the jar ( it just requires mvn clean install command)
If you are having local repository, use mvn deploy. Ensure your version id is different to avoid confusion.