starknet-remix-plugin
starknet-remix-plugin copied to clipboard
Run plugin commands from console
- [ ] Allow to run plugin commands from console (instead of clicking in UI)
can i try this ?
Sure @makluganteng
Thanks , maybe can u elaborate more on the task if thats okey ?
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.
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
Sorry for the inconvenience , I have updated the Developers section in the README. Now, it should not complain these type of errors.
for more info about this issue @makluganteng , you can see #28
i still got this currently
Are you running rust backend in your system ? Would you paste the console outputs here if possible ?
{"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"}
Also, could I get to see the console output from the browser ?
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.
aaa cors problem somehow
i dont think i have any extension blocking it
cd api;
export VITE_URL=http://localhost:3000
cargo run;
Did you run this? How did you fire up the rust backend ?
Aaa im missing the vite part , now its compiling
All working now thank you
Welcome :)
One question as well , any recommendation on which file to look at for this ??
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
@makluganteng were you able to get started with this?
Hey , im currently still doing the other one so i might back out on this