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

Challenge 4 migration to extension #245

Merged
merged 7 commits into from
Dec 16, 2024

Conversation

damianmarti
Copy link
Member

Challenge 4 migrated to an extension following #234

Install from create-eth repo with:

yarn cli -e scaffold-eth/se-2-challenges:ch4-extension-init

closes #241

Copy link
Member

@rin-st rin-st left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Damu! Added small comments

Also found one bug. Steps to reproduce

  • add solution contract and also uncomment code on deployment file
  • add eth from faucet
  • add "1" to "tokenToEth" input. Press "Send"

Result before (text is easy to understand):
Screenshot 2024-12-12 at 19 05 38

Result in this extension:
Screenshot 2024-12-12 at 19 07 57

Decoded signature:
image

https://openchain.xyz/signatures?query=0xfb8f41b2

extension/packages/hardhat/contracts/Balloons.sol Outdated Show resolved Hide resolved
extension/README.md.args.mjs Outdated Show resolved Hide resolved
extension/README.md.args.mjs Outdated Show resolved Hide resolved
@damianmarti
Copy link
Member Author

Thanks Damu! Added small comments

Also found one bug. Steps to reproduce

  • add solution contract and also uncomment code on deployment file
  • add eth from faucet
  • add "1" to "tokenToEth" input. Press "Send"

Result before (text is easy to understand): Screenshot 2024-12-12 at 19 05 38

Result in this extension: Screenshot 2024-12-12 at 19 07 57

Decoded signature: image

https://openchain.xyz/signatures?query=0xfb8f41b2

Thanks @rin-st for the review and great catch!

I fixed it by adding a package.json to hardhat with @openzeppelin/contracts.

The new @openzeppelin/contracts v5 uses custom errors and our getParsedError is not able to show a nice message in this case. We should add an issue to fix it.

@rin-st
Copy link
Member

rin-st commented Dec 13, 2024

Lgtm! Created an issue to fix that error, see above.

Thank you @damianmarti !


### ⚔️ Side Quests

- [ ] In \`packages\nextjs\app\events\page.tsx\` implement an event and emit for the \`approve()\` function to make it clear when it has been executed.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

`packages\nextjs\app\events\page.tsx` this is getting rendered badly in my instance readme:

In `packages
extjsappeventspage.tsx`

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there was a backslash escaping problem here, was still seeing it wrong.

As a quick fix just changed the backslash for regular slash in a9a4a12 since we're using regular slashes in other folders.

Copy link
Collaborator

@Pabl0cks Pabl0cks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice job Damu!! 🙌 The challenge is working great to me.

Just added some comments with nitpick format errors in the Readme from my instance.

Also just to comment it, I received this message when I tried to yarn vercel. Never saw it before, I needed to do yarn vercel --yes:

$ yarn vercel
Vercel CLI 39.1.3
> NOTE: The Vercel CLI now collects telemetry regarding usage of the CLI.
> This information is used to shape the CLI roadmap and prioritize features.
> You can learn more, including how to opt-out if you'd not like to participate in this program, by visiting the following URL:
> https://vercel.com/docs/cli/about-telemetry
Error: Command `vercel deploy` requires confirmation. Use option "--yes" to confirm.

@rin-st
Copy link
Member

rin-st commented Dec 14, 2024

Also just to comment it, I received this message when I tried to yarn vercel. Never saw it before, I needed to do yarn vercel --yes:

Could you check if it asking it for new deployments? Probably you need to create new instance, or is it asked just one time?

Also, try it with env variables like in this PR

@Pabl0cks
Copy link
Collaborator

Could you check if it asking it for new deployments? Probably you need to create new instance, or is it asked just one time?

Also, try it with env variables like in this scaffold-eth/scaffold-eth-2#1012

Just created a fresh instance of another extension and seems like today I'm getting another error, without the telemetry promt:

image

Tried with PR but still get the message, I needed to add the --yes in order to make it work

@rin-st
Copy link
Member

rin-st commented Dec 15, 2024

from the docs :

The --yes option can be used to skip questions you are asked when setting up a new Vercel project. The questions will be answered with the provided defaults, inferred from vercel.json and the folder name.

So as I understand it should be a question before asking for --yes. Looks like a vercel cli bug.


Could you please try one more thing for the last project:

yarn vercel telemetry disable

and then

yarn vercel

Is it still asking for --yes?

@damianmarti
Copy link
Member Author

Nice job Damu!! 🙌 The challenge is working great to me.

Just added some comments with nitpick format errors in the Readme from my instance.

Thanks @Pabl0cks for the review!!

I used a clean README and pushed the changes. There was an issue with the previous one due to auto-formatting from my IDE. Please, let me know if the formatting is ok now.

@damianmarti
Copy link
Member Author

Also just to comment it, I received this message when I tried to yarn vercel. Never saw it before, I needed to do yarn vercel --yes:

$ yarn vercel
Vercel CLI 39.1.3
> NOTE: The Vercel CLI now collects telemetry regarding usage of the CLI.
> This information is used to shape the CLI roadmap and prioritize features.
> You can learn more, including how to opt-out if you'd not like to participate in this program, by visiting the following URL:
> https://vercel.com/docs/cli/about-telemetry
Error: Command `vercel deploy` requires confirmation. Use option "--yes" to confirm.

I'm using Vercel CLI 37.4.2 and it's working fine. Maybe some wrong project configuration. Can you please try to do it from a fresh project?

@Pabl0cks
Copy link
Collaborator

I'm using Vercel CLI 37.4.2 and it's working fine. Maybe some wrong project configuration. Can you please try to do it from a fresh project?

Realized it was only happening to my Git Bash (on desktop). The rest of terminals were working well, even Git Bash on laptop.
Downloaded and installed last version of Git Bash and is working nicely on desktop without --yes prompt🙏

Copy link
Collaborator

@Pabl0cks Pabl0cks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good to merge! TY @damianmarti

@Pabl0cks Pabl0cks merged commit d34b4dd into challenge-4-dex--extension Dec 16, 2024
@Pabl0cks Pabl0cks deleted the ch4-extension-init branch December 16, 2024 23:06
@rin-st rin-st modified the milestone: ˜ Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants