Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run plugin commands from console #177

Open
1 task
stranger80 opened this issue Oct 26, 2023 · 22 comments
Open
1 task

Run plugin commands from console #177

stranger80 opened this issue Oct 26, 2023 · 22 comments
Assignees
Labels
console good first issue Good for newcomers ODHack Issues are part of the HackODFest and the contributors will be rewarded during the hackathon period

Comments

@stranger80
Copy link
Contributor

  • Allow to run plugin commands from console (instead of clicking in UI)
@stranger80 stranger80 changed the title - [ ] Allow to run plugin commands from console Run plugin commands from console Oct 26, 2023
@rjnrohit rjnrohit added good first issue Good for newcomers ODHack Issues are part of the HackODFest and the contributors will be rewarded during the hackathon period labels Feb 14, 2024
@makluganteng
Copy link

can i try this ?

@rjnrohit
Copy link
Contributor

Sure @makluganteng

@makluganteng
Copy link

Thanks , maybe can u elaborate more on the task if thats okey ?

@rjnrohit
Copy link
Contributor

rjnrohit commented Feb 15, 2024

sure. The idea is to use scriptRunner from the terminal console to compile, deploy and interact with the cairo contracts. The terminal you see in the remix interface is the javascript console which can run various scripts.

@makluganteng
Copy link

Hi anyway i could get help to set up this env im following the readme but getting fetch error when trying to compile cairo file on remix

@rjnrohit
Copy link
Contributor

Sorry for the inconvenience , I have updated the Developers section in the README. Now, it should not complain these type of errors.

@rjnrohit
Copy link
Contributor

for more info about this issue @makluganteng , you can see #28

@makluganteng
Copy link

image
i still got this currently

@rjnrohit
Copy link
Contributor

rjnrohit commented Feb 16, 2024

Are you running rust backend in your system ? Would you paste the console outputs here if possible ?

@makluganteng
Copy link

makluganteng commented Feb 16, 2024

{"timestamp":"2024-02-16T05:41:04.167874Z","level":"TRACE","fields":{"message":"Conn::read_head"},"target":"hyper::proto::h1::conn"}
{"timestamp":"2024-02-16T05:41:04.168424Z","level":"TRACE","fields":{"message":"received 616 bytes"},"target":"hyper::proto::h1::io"}
{"timestamp":"2024-02-16T05:41:04.168778Z","level":"TRACE","fields":{"message":"Request.parse","bytes":616},"target":"hyper::proto::h1::role","span":{"name":"parse_headers"},"spans":[{"name":"parse_headers"}]}
{"timestamp":"2024-02-16T05:41:04.169205Z","level":"TRACE","fields":{"message":"Request.parse Complete(616)"},"target":"hyper::proto::h1::role","span":{"name":"parse_headers"},"spans":[{"name":"parse_headers"}]}
{"timestamp":"2024-02-16T05:41:04.169582Z","level":"DEBUG","fields":{"message":"parsed 13 headers"},"target":"hyper::proto::h1::io"}
{"timestamp":"2024-02-16T05:41:04.169680Z","level":"DEBUG","fields":{"message":"incoming body is empty"},"target":"hyper::proto::h1::conn"}
{"timestamp":"2024-02-16T05:41:04.169832Z","level":"TRACE","fields":{"message":"flushed({role=server}): State { reading: KeepAlive, writing: Init, keep_alive: Busy }"},"target":"hyper::proto::h1::conn"}
OPTIONS /save_code/1c6d0edb1d302863392ed05bca8b79aa44f6d5b5f34bbc63e0459b8a8f0621b6/hello_world/src/balance.cairo:
   >> No matching routes for OPTIONS /save_code/1c6d0edb1d302863392ed05bca8b79aa44f6d5b5f34bbc63e0459b8a8f0621b6/hello_world/src/balance.cairo.
   >> No 404 catcher registered. Using Rocket default.
   >> Response succeeded.
{"timestamp":"2024-02-16T05:41:04.171468Z","level":"TRACE","fields":{"message":"Server::encode status=204, body=Some(Unknown), req_method=Some(OPTIONS)"},"target":"hyper::proto::h1::role","span":{"name":"encode_headers"},"spans":[{"name":"encode_headers"}]}
{"timestamp":"2024-02-16T05:41:04.171766Z","level":"TRACE","fields":{"message":"server body forced to 0; method=Some(OPTIONS), status=204"},"target":"hyper::proto::h1::role","span":{"name":"encode_headers"},"spans":[{"name":"encode_headers"}]}
{"timestamp":"2024-02-16T05:41:04.171964Z","level":"TRACE","fields":{"message":"no more write body allowed, user body is_end_stream = false"},"target":"hyper::proto::h1::dispatch"}
{"timestamp":"2024-02-16T05:41:04.172216Z","level":"DEBUG","fields":{"message":"flushed 440 bytes"},"target":"hyper::proto::h1::io"}
{"timestamp":"2024-02-16T05:41:04.172339Z","level":"TRACE","fields":{"message":"flushed({role=server}): State { reading: Init, writing: Init, keep_alive: Idle }"},"target":"hyper::proto::h1::conn"}

@rjnrohit
Copy link
Contributor

Also, could I get to see the console output from the browser ?

@makluganteng
Copy link

Access to fetch at 'http://localhost:8000/save_code/1c6d0edb1d302863392ed05bca8b79aa44f6d5b5f34bbc63e0459b8a8f0621b6/hello_world/src/balance.cairo' from origin 'http://localhost:3000' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: The 'Access-Control-Allow-Origin' header has a value 'https://cairo-remix-dev.nethermind.io' that is not equal to the supplied origin. Have the server send the header with a valid value, or, if an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

@makluganteng
Copy link

aaa cors problem somehow

@makluganteng
Copy link

i dont think i have any extension blocking it

@rjnrohit
Copy link
Contributor

cd api;
export VITE_URL=http://localhost:3000
cargo run;

Did you run this? How did you fire up the rust backend ?

@makluganteng
Copy link

Aaa im missing the vite part , now its compiling

@makluganteng
Copy link

All working now thank you

@rjnrohit
Copy link
Contributor

Welcome :)

@makluganteng
Copy link

One question as well , any recommendation on which file to look at for this ??

@rjnrohit
Copy link
Contributor

You can start researching how to make starknet.js available in cell, right now we know: https://remix-ide.readthedocs.io/en/latest/terminal.html

@jelilat
Copy link

jelilat commented Feb 27, 2024

@makluganteng were you able to get started with this?

@makluganteng
Copy link

Hey , im currently still doing the other one so i might back out on this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
console good first issue Good for newcomers ODHack Issues are part of the HackODFest and the contributors will be rewarded during the hackathon period
Projects
Status: Backlog
Development

No branches or pull requests

5 participants
@stranger80 @jelilat @rjnrohit @makluganteng and others