-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Sync public branch with internal repository (#1)
- Loading branch information
Showing
15 changed files
with
6,377 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
NEXT_PUBLIC_PAYMASTER_API_KEY= | ||
NEXT_PUBLIC_BUNDLER_URL= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: Push to Public Repo and Create PR | ||
|
||
on: | ||
push: | ||
branches: | ||
- public | ||
|
||
jobs: | ||
push_to_public: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: public | ||
|
||
- name: Set up SSH key | ||
run: | | ||
mkdir -p ~/.ssh | ||
echo "${{ secrets.DEPLOY_KEY }}" > ~/.ssh/id_rsa | ||
chmod 600 ~/.ssh/id_rsa | ||
ssh-keyscan github.com >> ~/.ssh/known_hosts | ||
- name: Configure Git Identity | ||
run: | | ||
git config --global user.name "Delegators" | ||
git config --global user.email "hellogators@consensys.net" | ||
- name: Checkout main branch from public repo | ||
run: | | ||
git remote add public-repo git@github.com:MetaMask/hello-gator.git | ||
git fetch public-repo | ||
git checkout -b public-main public-repo/main | ||
- name: Restore from public branch | ||
run: | | ||
git restore --source=origin/public --worktree --staged . | ||
- name: Commit changes to updates branch | ||
run: | | ||
git checkout -b updates | ||
git commit -m "Sync public branch with internal repository" | ||
- name: Push updates branch to public repo | ||
run: | | ||
git push public-repo updates | ||
# the PR is on the public hello-gator repo, so we need to figure out how to get permissions | ||
|
||
# - name: Create Pull Request | ||
# run: | | ||
# gh auth login --with-token <<< "${{ secrets.GITHUB_TOKEN }}" | ||
# gh pr create --base public --head updates --repo MetaMask/hello-gator --title "Sync updates from internal public branch" --body "This PR syncs the public branch with the latest changes from the internal repository." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# Dependencies | ||
node_modules | ||
.pnp | ||
.pnp.js | ||
|
||
# Local env files | ||
.env | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
|
||
# Testing | ||
coverage | ||
|
||
# Turbo | ||
.turbo | ||
|
||
# Vercel | ||
.vercel | ||
|
||
# Changesets | ||
.changeset | ||
|
||
|
||
# Build Outputs | ||
.next/ | ||
out/ | ||
build | ||
dist | ||
cache | ||
|
||
# Debug | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# Misc | ||
.DS_Store | ||
*.pem | ||
packages/*/.eslintcache | ||
|
||
# yarn v3 (w/o zero-install) | ||
# See: https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored | ||
.pnp.* | ||
.yarn/* | ||
!.yarn/patches | ||
!.yarn/plugins | ||
!.yarn/releases | ||
!.yarn/sdks | ||
!.yarn/versions | ||
|
||
# Yarn Integrity file | ||
.yarn-integrity |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
//nexus.eu-west-3.codefi.network/repository/npm-hosted/:_authToken=${NPM_AUTH_TOKEN} | ||
@codefi:registry=https://nexus.eu-west-3.codefi.network/repository/npm-hosted/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
v18.18.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
nodeLinker: node-modules | ||
|
||
npmRegistries: | ||
"https://nexus.eu-west-3.codefi.network/repository/npm-hosted/": | ||
npmAuthToken: "${NPM_AUTH_TOKEN}" | ||
|
||
npmScopes: | ||
codefi: | ||
npmRegistryServer: "https://nexus.eu-west-3.codefi.network/repository/npm-hosted/" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,33 @@ | ||
# hello-gator | ||
# Hello Gator 🐊 | ||
|
||
Easily get up-to-speed with (and integrate) the MetaMask Delegation Toolkit with this demonstration. It includes examples for all the core elements including Delegator Account (ERC-4337) creation, sending User Operations, and the Delegation lifecycle. Example code is provided utilising the DeleGator Core [Viem](https://viem.sh/) client. | ||
|
||
Note: this template is also designed to complement the [documentation](https://docs.gator.metamask.io). | ||
|
||
## Dependency Setup | ||
|
||
> Note that the package `@codefi/delegator-core-viem` is currently hosted on a private registry. Please get in touch with the team for access at hellogators@consensys.io. | ||
Once configured, you'll be able to install the dependencies (both private and public) via the following: | ||
|
||
```sh | ||
yarn install | ||
``` | ||
|
||
## Configuration | ||
|
||
Configuration is provided via environment variables, you may create a `.env` file in the root of Hello Gator, including the configuration parameters defined in `.env.example`. | ||
|
||
Refer to the [documentation](https://docs.gator.metamask.io) for further information on configuration. | ||
|
||
## Running | ||
|
||
Start development environment: | ||
|
||
```sh | ||
yarn dev | ||
``` | ||
|
||
## Support | ||
|
||
Feel free to open an issue or contact the team directly at [hellogators@consensys.io](mailto:hellogators@consensys.io). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/// <reference types="next" /> | ||
/// <reference types="next/image-types/global" /> | ||
|
||
// NOTE: This file should not be edited | ||
// see https://nextjs.org/docs/basic-features/typescript for more information. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/** @type {import('next').NextConfig} */ | ||
const nextConfig = {} | ||
|
||
module.exports = nextConfig |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"name": "hello-gator", | ||
"private": true, | ||
"version": "0.1.0", | ||
"scripts": { | ||
"dev": "next dev", | ||
"build": "next build", | ||
"start": "next start", | ||
"lint": "next lint" | ||
}, | ||
"dependencies": { | ||
"@codefi/delegator-core-viem": "0.1.1", | ||
"next": "13.5.3", | ||
"react": "^18.2.0", | ||
"react-dom": "^18.2.0", | ||
"viem": "latest", | ||
"wagmi": "latest" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "^20.7.2", | ||
"@types/react": "^18.2.22", | ||
"@types/react-dom": "^18.2.7", | ||
"@wagmi/cli": "latest", | ||
"bufferutil": "^4.0.7", | ||
"encoding": "^0.1.13", | ||
"lokijs": "^1.5.12", | ||
"pino-pretty": "^10.2.0", | ||
"supports-color": "^9.4.0", | ||
"typescript": "^5.2.2", | ||
"utf-8-validate": "^6.0.3" | ||
}, | ||
"packageManager": "yarn@3.2.1" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
:root { | ||
background-color: #181818; | ||
color: rgba(255, 255, 255, 0.87); | ||
color-scheme: light dark; | ||
font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif; | ||
font-synthesis: none; | ||
font-weight: 400; | ||
line-height: 1.5; | ||
text-rendering: optimizeLegibility; | ||
|
||
-webkit-font-smoothing: antialiased; | ||
-moz-osx-font-smoothing: grayscale; | ||
-webkit-text-size-adjust: 100%; | ||
} | ||
|
||
@media (prefers-color-scheme: light) { | ||
:root { | ||
background-color: #f8f8f8; | ||
color: #181818; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import './globals.css' | ||
import type { Metadata } from 'next' | ||
import { Inter } from 'next/font/google' | ||
import { type ReactNode } from 'react' | ||
|
||
const inter = Inter({ subsets: ['latin'] }) | ||
|
||
export const metadata: Metadata = { | ||
title: 'Hello Gator 🐊', | ||
description: 'Minimum Viable Gator', | ||
} | ||
|
||
export default function RootLayout(props: { children: ReactNode }) { | ||
return ( | ||
<html lang="en"> | ||
<body className={inter.className}> | ||
{props.children} | ||
</body> | ||
</html> | ||
) | ||
} |
Oops, something went wrong.