Git Product home page Git Product logo

foundry-simple-storage-f23's Issues

Anvil doesn't compile on Windows due to IPC

Hey guys!

Just in case, if anyone ran into this error while installing foundry components directly from their Github simply use this command and you'll be fine (i'm sharing this cuz it took me 2 hours to find the reason):

$ cargo install --git https://github.com/foundry-rs/foundry --locked anvil --features ethers/ipc

This command will fetch the latest dependencies from the master branch of foundry github and simply be adequate to handle the error. Then after the command succeeded you can foundryup and/or follow along.

Thanks everyone and enjoy the lovely course!

Compiler version must be fixed

Hello guys, awesome course!

  • Currently at lesson 6. Foundry ran properly.
  • Forge, Anvil, Cast and Chisel are installed.
  • The issue occur when I copy paste SimpleStorage.sol in src:
4:1: SyntaxError: Source file requires different compiler version (current compiler is 0.4.17+commit.bdeb9e52.Emscripten.clang - note that nightly builds are considered to be strictly less than the released version\npragma solidity 0.8.19;\n^---------------------^\n",
	"startLineNumber": 4,
	"startColumn": 2,
	"endLineNumber": 4,
	"endColumn": 2
}]

I also have compiler version must be fixed.

It's been a couple of hours that I'm stuck on this and can't seems to find what I must do.

Tried to reinstalled solc but everytime I do so and look for the version I receive: command not found.

Not sure but since Foundry seems to have an integrated compiler (I'm beginning guys) I think that might be the reason why. I'm also running the code on a MacBook Pro High Sierra which I think might be the issue.

Any suggestions?

Cast Call for interacting with deployed contract

I'm trying to interact with a deployed contract using terminal in VS code. I can successfully deploy a contract. cast send command also works fine with store() function. but when I try to use cast call for retrieve() function, I get 0x everytime.below is my code:

cast call 0x90193C961A926261B756D1E5bb255e67ff9498A1 "retrieve()"

but all I get is:

0x

I have also tried to store different values and then retrieve them, but nothings changed.
I also check the retrieve() spelling and copy the exact function name from the main contract.

Any help would be appreciated.

Don't have lib & forge-std in my folder

Dear all,

I was doing the learning Solidity video but I encountered an error where I am unable to

import "forge-std/Script.sol"

because I dont have lib folder & script in my folder

Furthermore, running

forge install foundry-rs/forge-std

returns me an error

The target directory is a part of or on its own an already initialized git repository,
and it requires clean working and staging areas, including no untracked files.

I apologize in advance if my formatting for this question is bad. This is my first time asking/writing something on Github

I can't initiate forge directories

Hello
I was following the tutorial but when I reached the initiation of forge I typed
forge init
nothing created but instead I got this
`FORGE - training program for SNAP (version 2006-07-28)

usage: forge [options] [options]
options:
-help
-verbose
-pseudocount [1] (absolute number for all models)
-pseudoCoding [0.0] (eg. 0.05)
-pseudoIntron [0.0]
-pseudoInter [0.0]
-min-counts [0]
-lcmask [-fragmentN]
-utr5-length [50]
-utr5-offset [10]
-utr3-length [50]
-utr3-offset [10]
-explicit [250]
-min-intron [30]
-boost (file of ID )`
Kindly feedback me whats the issue

Foundry setup in vs code

Hi People,
when I typed "curl -L https://foundry.paradigm.xyz | bash" in my terminal to install foundry i am facing the following error

...
curl -L https://foundry.paradigm.xyz | bash
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- 0:02:11 --:--:-- 0
curl: (28) Failed to connect to raw.githubusercontent.com port 443 after 130511 ms: Connection timed out
...

Kindly help

How to connect WSL Anvil to Windows Chrome Metamask?

It kind of bugs me that Windows is second class here, and you have to run CLI tools in WSL (like Foundry) but interacting with the blockchain is Metamask and that's in (actual)Windows Chome/Firefox/Brave.

Metamask is not accepting either the Ganache or the Anvil RPC. I can only assume it's because one is in WSL and one is in actual Windows.

Ganache was installed properly for WSL, at least it seems so. Followed Microsoft's instructions to install in WSL and it launched.
But it doesn't have a GUI - that's WINDOWS (again). So I also installed the Windows Ganache so I access the GUI. Tried pointing Ganache to both the WSL ethernet and also "all" (0.0.0.0) but Metamask doesn't see an RPC on either of those methods.

Metamask also doesn't seem to see the Anvil RPC.

Any tips here on what to do?
Why is blockchain development seemingly Mac/Linux only and zero care for anyone on Windows? I thought blockheads wanted mass adoption.... I'm sorry but you're not going to get "mass" with Mac/Linux only!

NB: I do have a Mac and was tinkering some time back, but the Mac is 10.13.6 and not updated for reasons. Sadly this means Foundry won't install on it. And the tools I was tinkering with (Brownie etc) are either deprecated or on their way out. Road closed to any non-current Mac/Unix people.

Deploy script doesn't deploy. Is there some update to Foundry since recording?

Doing EXACTLY what Patrick says
forge script script/DeploySimpleStorage.s.sol
gives

Error: 
contract source info format must be `<path>:<contractname>` or `<contractname>`

Instead you should just do
forge script DeploySimpleStorage
So I assume there was some kind of update with Forge and syntax for deployement.

NB the error also isn't so helpful. I wasn't sure if the error was with my command in bash, or with one of the imports paths in the deploy script. As both (in this example at least) are a very simple path/filename.sol format, so to me it could have been either, IMO at least. This has been true of my experience with Foundry so far - the errors are all kind of vague.

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.