Run Mythril tool on a Hardhat Project? - ethereum

How to run the Mythril tool for analysis on smart contracts compiled by Hardhat?
Hardhat project has the contract(.sol) and artifacts(.json) files .
Mythril when run with a (.sol) contract uses solc-compiler to compile the contract, whereas solc-compiler does not work for me, and I want to use hardhat to compile and later Mythril to analyze it.
Research-Based

Related

Emulate Firebase functions with latest version of functions

I'm currently developing Firebase functions using the Firebase emulators locally.
Every time I'm changing the logic in my functions, I want to simply run
firebase emulators:start
But it seems the latest changes are never included unless I first deploy the functions using
firebase deploy --only functions
This causes unnecessary deploys of unfinished code and adds a lot of time between testing each iteration.
Is there any way I can ensure the latest version of my functions are included when only running the emulators without running deploy? I've been scouring the documentation and couldn't find anything pointing me in the right direction.
So after snooping around a bit it seems that my functions written in Typescript are not compiled to javascript when only starting the emulators. The javascript in functions/lib/**.js is run, but since the Typescript is not compiled it will always run the previous version.
This seems like a bug on Firebase's side. The natural expectation when creating a firebase folder using Firebase-cli and running emulators from the root directory would be for the Typescript to be compiled.
I've sent a bug ticket to Google Firebase and will close this question. A work around is to create a script that runs tsc before firebase emulators:start.
I found in my package.json there's one of script named build, almost sure it's part of the firebase setup so everyone should have it too.
So just go to the functions folder and execute: "npm run build".

InternalCompilerError: Compiled contract not found. My contract is extending ERC721 interface.

https://remix.ethereum.org/#optimize=false&version=soljson-v0.4.25+commit.59dbf8f1.js
The Remix editor with the error
Can someone help me go past this error? Why does the contract not compiling?
I am able to deploy the source on my machine, just restart the browser and clean the cache and everything then it should work.

How do I run the Web3J Smart Contract example?

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.

How would I run integration tests from vivet/googleApi?

I am trying to work out how I would integrate this shared library from GitHub into my code, since it is a shared class library, for starters I just want to run the integration tests, but I cannot work out how go get the test runner to run them.
I created a console application in my main project and a reference to the GoogleMapsApiTest in the console but I am not sure how to call the tests from there to run them.
GoogleAPIClassLibrary
I had to download the gui test runner and build it from GitHub. Link to project
now I can at least run the tests, I am still not sure how to use the library but that should help at least see how it is supposed to work.
I was able to run the unit tests by downloading the NUnit source code at the link in my post and then browsing to the output dll of the class project, to load the tests apparently the gui-test runner is no longer available for download, so hopefully that will help someone else out if they run into a need for running tests in NUnit.

Truffle migrate Server Error (on truffle init demo)

I'm a DAPP beginner, and am trying to get up and running with the Truffle framework. I've been walking through the Truffle docs, but it doesn't work out of the box for me.
Create directory, cd into it, and run 'truffle init'
Run 'truffle compile'
Run testrpc in a second terminal window, same project directory
Run 'truffle migrate'
This is the error I get from truffle:
Running migration: 1_initial_migration.js
Deploying Migrations...
Error encountered, bailing. Network state unknown. Review successful transactions manually.
Error: Server error
at Object.module.exports.InvalidResponse (/usr/local/lib/node_modules/truffle/node_modules/ether-pudding/node_modules/web3/lib/web3/errors.js:35:16)
at /usr/local/lib/node_modules/truffle/node_modules/ether-pudding/node_modules/web3/lib/web3/requestmanager.js:86:36
I get this with Node v5 & v6.
Truffle v2.1.1.
Web3 and ether-pudding are installed as truffle dependencies.
TestRPC/0.8.7/darwin/python2.7.12.
Thanks for the help-
Are you sure you did run testrpc in a second window and let it run? This is important as testrpc in that case is yoir blockchain. If it does not run you will get similar errors as what you describe.
To keep it simple, I also suggest as a start that you do not run another client while running testrpc (geth, parity, mist, ... )
So in short, do a reboot, start testrpc, make sure it does not display errors, then run the truffle migrate command while testrpc still runs in the background.
Truffle migrate does run correctly. I've reposted my issue with testrpc here:
Testrpc error: 'no loggers could be found for logger 'jsonrpc.manager'