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

Create a burner wallet implementation that works with wagmi and rainbow #1

Closed
2 tasks done
ShravanSunder opened this issue Sep 26, 2022 · 5 comments · Fixed by #8
Closed
2 tasks done

Create a burner wallet implementation that works with wagmi and rainbow #1

ShravanSunder opened this issue Sep 26, 2022 · 5 comments · Fixed by #8
Assignees

Comments

@ShravanSunder
Copy link
Member

ShravanSunder commented Sep 26, 2022

Overview

Details

Based on config values

  • should log into burner wallet in the background on startup for localhost
  • should disable burner wallet for other networks
  • config to disable burner wallet entirely
  • config to disable auto login to burner on localhost
@carletex
Copy link
Member

@ShravanSunder Still not sure about how the scaffold.config.json would work. But some thoughts:

  • How this co-exist or how is it different from a .env file?
  • I think it should be js not json. So we can have some JS logic (like getting env vars there)
  • I think it should live in the root
  • It should be there and work out of the box, no need to generate it and no need to configure anything if you don't want to.

@ShravanSunder
Copy link
Member Author

@carletex some thoughts

  1. we can assume defaults and use that without generating it. I"m also good with ts file.
  2. env variables are different than config. env variables are keys that are based on environment. So you can have API keys that are not checked in and based on prod, staging, dev env. They allow layering. This will be good for api keys
  3. I think we can load env variables in the config.
  4. config should be fore things like the burner wallet settings. they are not env variable based and impact runtime.

@ShravanSunder
Copy link
Member Author

ShravanSunder commented Oct 1, 2022

@carletex here's a video overview, its ready for PR: https://www.dropbox.com/s/f4trel929a2jeou/2022.09.30-21.07-Brave%20Browser%20Scaffod-eth%20App.mp4?dl=0

I'll do the config as a seperate PR i think. better to split things up. See PR #8

this is the burner config so far, please see video for details. Let me know if anything needs improving

export type TAutoConnect = {
  /**
   * Enable the burner wallet.  If this is disabled, burner wallet is entierly disabled
   */
  enableBurnerWallet: boolean;
  /**
   * Always autoConnectToBurner to burner wallet on page load.
   */
  alwaysAutoConnectToBurnerOnLoad: boolean;
  /**
   * If user is not connected to any wallet:  On reload, connect to burner wallet
   */
  connectToBurnerIfDisconnectedOnLoad: boolean;
  /**
   * Auto connect: If the user was connected into a wallet before, on page reload reconnect automatically
   */
  allowAutoConnect: boolean;
};

ShravanSunder added a commit that referenced this issue Oct 1, 2022
ShravanSunder added a commit that referenced this issue Oct 1, 2022
@ShravanSunder
Copy link
Member Author

was thinking to simplify the options. @carletex

export type TAutoConnect = {
  /**
   * Enable the burner wallet.  If this is disabled, burner wallet is entierly disabled
   */
  enableBurnerWallet: boolean;
  /**
   * Auto connect:
   * 1. off
   * 2. autoConnectIfNotDisconnected: If the user was connected into a wallet before, on page reload reconnect automatically
   * 3. alwaysConnectToBurner: Always autoConnectToBurner to burner wallet on page load.
   * 4. autoConnectToBurnerIfDisconnectedOnLoad: If user is not connected to any wallet:  On reload, connect to burner wallet
   */
  allowAutoConnect:
    | "off"
    | "autoConnectIfNotDisconnected"
    | "alwaysAutoConnectToBurner"
    | "autoConnectToBurnerIfDisconnected";
};

ShravanSunder added a commit that referenced this issue Oct 1, 2022
@ShravanSunder ShravanSunder linked a pull request Oct 1, 2022 that will close this issue
ShravanSunder added a commit that referenced this issue Oct 7, 2022
# Conflicts:
#	packages/frontend/package.json
@ShravanSunder
Copy link
Member Author

The options have been changed @carletex

export type TAutoConnect = {
  /**
   * Enable the burner wallet.  If this is disabled, burner wallet is entierly disabled
   */
  enableBurnerWallet: boolean;
  /**
   * Auto connect:
   * 1. If the user was connected into a wallet before, on page reload reconnect automatically
   * 2. If user is not connected to any wallet:  On reload, connect to burner wallet
   */
  autoConnect: boolean;
};

ShravanSunder added a commit that referenced this issue Oct 10, 2022
…rnings will cause prettier to autofix errors without unecessary issues.
ShravanSunder added a commit that referenced this issue Oct 10, 2022
ShravanSunder added a commit that referenced this issue Oct 10, 2022
ShravanSunder added a commit that referenced this issue Oct 10, 2022
ShravanSunder added a commit that referenced this issue Oct 10, 2022
ShravanSunder added a commit that referenced this issue Oct 10, 2022
ShravanSunder added a commit that referenced this issue Oct 10, 2022
ShravanSunder added a commit that referenced this issue Oct 14, 2022
* #1 started creating BurnerConnector.  additionally edited some config

* #1 changing rainbow connectors.  extracted connectors to its own folder

* #1 burner wallet is working

* #1 preminimnarly autoconnect working.  added some temp files to help check.  added useBurnerSigner

* #1 Finished autoconnect and burner wallet

* #1 Finished autoconnect and burner wallet

* #1 Finished autoconnect and burner wallet

* #1 better comments

* #1 better comments

* #1 better comments and cleaned up structure

* #1 simplified options

* minor

* Remove unrelated/extra stuff

* Prettify with exiting rules

* We want prettier to fix errors with eol without causing errors.  warnings will cause prettier to autofix errors without unecessary issues.

* Revert "We want prettier to fix errors with eol without causing errors.  warnings will cause prettier to autofix errors without unecessary issues."

This reverts commit 1282c22.

* #1 We want prettier to fix errors with eol without causing errors.  warnings will cause prettier to autofix errors without unecessary issues.

* We want vscode to have linting properlly work on all of the workspaces.  We also want it to exclude settings files so that search and files are easier to use.

* #1 fixed issue with eslint

* #1 fixed nots

* #1 remove unused variables

* #1 removed comments

* #1 fixes for bugs.  TODO: write is no longer working with burner, need to find out why signer doesn't work

* #1 pushed changes to get the signer to work properly

* #1 removed imports

* #1 changed how initial save of sk was happening

* updated git ignore

Co-authored-by: Carlos Sánchez <oceanrdn@gmail.com>
steve0xp added a commit to steve0xp/se-2_FoundryIntegration that referenced this issue Mar 30, 2023
- Write README.md portion documenting steps taken
- Bring in framework similar to foundry-strategy-mix
(which Scaffold-ETH-DeFi-Challenge scaffold-eth#1 adopted)
- Still need to fix imports in test files for `make test` to work
- Deployment script for strategy would be good, but thinking that
foundry framework may be best to teach true troubleshooting versus
using the debugger UI for this level of smart contract development
   - Mainly due to use of vm.prank() etc. is much easier w/ foundry
   vs the UI debugger
rin-st pushed a commit that referenced this issue Sep 30, 2023
kyofight pushed a commit to kyofight/scaffold-eth-speedrun that referenced this issue Nov 27, 2023
josefvd added a commit to josefvd/scaffold-eth-2 that referenced this issue Jan 18, 2024
checks for attestation, distribution and mint contract based on
Pabl0cks pushed a commit to Pabl0cks/scaffold-eth-2-pablo that referenced this issue Jun 4, 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 a pull request may close this issue.

2 participants