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

feat: start bridging and udate sdk start refactor #1

Open
wants to merge 40 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
6e2949e
feat: init smart wallet
Mar 29, 2024
38a3bcf
feat: add smart wallet V2
Mar 29, 2024
54f5a8f
fix: fix issue in V2 wallet
Mar 29, 2024
b8b6eae
add smart walletv2 tests
Mar 29, 2024
74dfafc
fix
Mar 29, 2024
f7a0945
start cleanup tests and scripts
Mar 29, 2024
f874090
feat: native transfer script complete
Mar 29, 2024
ecb0aa0
feat: cleanup main scripts
Mar 30, 2024
5ccc9df
add wrapper for easy accessing ultchain assets
Mar 30, 2024
e3ac860
chore use tokens in correct places
Mar 30, 2024
673434e
feat: starting new impl for handling extenral transfers
Mar 30, 2024
cfdfcda
feat: starting router
Apr 3, 2024
1e175b2
feat: develop more on smart wallet router
Apr 3, 2024
680d872
feat: starting viem migration
Apr 4, 2024
b3da467
feat: finish gas estimator
Apr 5, 2024
ea17875
feat: finish base viem migration
Apr 5, 2024
ff3b809
feat: clean up and types organisation
Apr 5, 2024
a2b1ce3
feat: implement permit2
Apr 7, 2024
3ec563c
feat: add permit2 extension
Apr 7, 2024
0eb19ad
feat: extend permit2 contracts
Apr 7, 2024
4923f70
feat: create demo
Apr 12, 2024
4cccc30
feat: next.js demo and sdk improvmements
Apr 12, 2024
fa25892
feat: integrte permit2 approvals
Apr 12, 2024
995f7b5
feat work on permit flow for cutom token gas fees
Apr 13, 2024
f976835
fix: cleanup
Apr 16, 2024
e4c7cb1
feat add monorepo
Apr 16, 2024
1f4075c
feat: refactor to pnpm monorepo and improve fee handling
Apr 17, 2024
bbe3fa7
feat: continue work on contract fee handling
Apr 17, 2024
e978c78
feat: minor sc changes for better var access
Apr 17, 2024
a5822e7
update latest stable compilation
Apr 17, 2024
0b3f06e
feat: start custom permit2 to combinee ecdsa exec ops
Apr 17, 2024
6858cf5
implemented new sig scheme from uin permit2
Apr 18, 2024
9d20869
finish base permit2 custom intergration
Apr 18, 2024
c8d35df
feat: wrap up permit2 integration
Apr 18, 2024
887d8b9
feat: clean up contract layout and better define SW spec
Apr 18, 2024
4a0ffc9
feat adding and function docs for contracts
Apr 18, 2024
e6efa5f
finish sw main set up scripts and add contracts package config
Apr 19, 2024
90dd5e9
better contracts layout
Apr 19, 2024
6a6a185
feat: adding bridge ops
Apr 19, 2024
7c61bf3
feat: start bridging and udate sdk start refactor
Apr 21, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto eol=lf
11 changes: 1 addition & 10 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,2 @@
node_modules
.env
coverage
coverage.json
typechain
typechain-types

#Hardhat files
cache
artifacts

.env
7 changes: 7 additions & 0 deletions .lintstagedrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"!(package).json": [],
"*{.js,.jsx,.ts,.tsx}": [
"biome format",
"biome check"
]
}
7 changes: 7 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
node_modules
build
.next
apps/example/.next
dist
packages/smart-router-sdk/
apps/example/
4 changes: 4 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"printWidth": 120,
"tabWidth": 5
}
36 changes: 36 additions & 0 deletions .stylelintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/**
* @type {import("stylelint").ConfigRules}
*/
const commonRules = {
"alpha-value-notation": null,
"color-function-notation": null,
"comment-empty-line-before": null,
"custom-property-empty-line-before": null,
"declaration-empty-line-before": null,
"function-whitespace-after": null,
"no-descending-specificity": null,
"rule-empty-line-before": null,
"value-keyword-case": null,
};

/**
* @type {import("stylelint").Config}
*/
module.exports = {
overrides: [
{
files: ["**/*.{ts,tsx}"],
extends: [
"stylelint-config-standard",
"stylelint-config-recommended",
"stylelint-config-styled-components",
"stylelint-config-prettier",
],
customSyntax: "@stylelint/postcss-css-in-js",
rules: {
...commonRules,
"function-no-unknown": null,
},
},
],
};
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"solidity.compileUsingRemoteVersion": "v0.7.5+commit.eb77ed08"
}
13 changes: 0 additions & 13 deletions README.md

This file was deleted.

14 changes: 14 additions & 0 deletions apps/example/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Since the ".env" file is gitignored, you can use the ".env.example" file to
# build a new ".env" file when you clone the repo. Keep this file up-to-date
# when you add new variables to `.env`.

# This file will be committed to version control, so make sure not to have any
# secrets in it. If you are cloning this repo, create a copy of this file named
# ".env" and populate it with your secrets.

# When adding additional environment variables, the schema in "/src/env.js"
# should be updated accordingly.

# Example:
# SERVERVAR="foo"
# NEXT_PUBLIC_CLIENTVAR="bar"
42 changes: 42 additions & 0 deletions apps/example/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# database
/prisma/db.sqlite
/prisma/db.sqlite-journal

# next.js
/.next/
/out/
next-env.d.ts

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*

# local env files
# do not commit any .env files to git, except for the .env.example file. https://create.t3.gg/en/usage/env-variables#using-environment-variables
.env
.env*.local

# vercel
.vercel

# typescript
*.tsbuildinfo
29 changes: 29 additions & 0 deletions apps/example/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Create T3 App

This is a [T3 Stack](https://create.t3.gg/) project bootstrapped with `create-t3-app`.

## What's next? How do I make an app with this?

We try to keep this project as simple as possible, so you can start with just the scaffolding we set up for you, and add additional things later when they become necessary.

If you are not familiar with the different technologies used in this project, please refer to the respective docs. If you still are in the wind, please join our [Discord](https://t3.gg/discord) and ask for help.

- [Next.js](https://nextjs.org)
- [NextAuth.js](https://next-auth.js.org)
- [Prisma](https://prisma.io)
- [Drizzle](https://orm.drizzle.team)
- [Tailwind CSS](https://tailwindcss.com)
- [tRPC](https://trpc.io)

## Learn More

To learn more about the [T3 Stack](https://create.t3.gg/), take a look at the following resources:

- [Documentation](https://create.t3.gg/)
- [Learn the T3 Stack](https://create.t3.gg/en/faq#what-learning-resources-are-currently-available) — Check out these awesome tutorials

You can check out the [create-t3-app GitHub repository](https://github.com/t3-oss/create-t3-app) — your feedback and contributions are welcome!

## How do I deploy this?

Follow our deployment guides for [Vercel](https://create.t3.gg/en/deployment/vercel), [Netlify](https://create.t3.gg/en/deployment/netlify) and [Docker](https://create.t3.gg/en/deployment/docker) for more information.
26 changes: 26 additions & 0 deletions apps/example/next.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/**
* Run `build` or `dev` with `SKIP_ENV_VALIDATION` to skip env validation. This is especially useful
* for Docker builds.
*/
await import("./src/env.js");

/** @type {import("next").NextConfig} */
const config = {
reactStrictMode: true,
compiler: {
styledComponents: true,
},
transpilePackages: ["@smart-wallet/smart-router-sdk"],

/**
* If you are using `appDir` then you must comment the below `i18n` config out.
*
* @see https://github.com/vercel/next.js/issues/41980
*/
i18n: {
locales: ["en"],
defaultLocale: "en",
},
};

export default config;
72 changes: 72 additions & 0 deletions apps/example/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
{
"name": "example",
"version": "0.1.0",
"private": true,
"type": "module",
"scripts": {
"build": "next build",
"dev": "next dev",
"lint": "next lint",
"start": "next start"
},
"dependencies": {
"@chakra-ui/next-js": "^2.2.0",
"@chakra-ui/react": "^2.8.2",
"@emotion/styled": "^11.11.5",
"@ethersproject/abi": "^5.4.7",
"@headlessui/react": "^1.7.18",
"@heroicons/react": "^1.0.6",
"@nextui-org/react": "^1.0.0-beta.9",
"@pancakeswap/chains": "^0.4.1",
"@pancakeswap/multicall": "^3.5.0",
"@pancakeswap/sdk": "^5.8.0",
"@pancakeswap/smart-router": "^5.0.0",
"@pancakeswap/swap-sdk-core": "^1.1.0",
"@pancakeswap/token-lists": "^0.0.11",
"@pancakeswap/tokens": "^0.6.11",
"@pancakeswap/uikit": "^0.64.0",
"@pancakeswap/v3-sdk": "^3.8.0",
"@saas-ui/react": "^2.7.4",
"@smart-wallet/smart-router-sdk": "workspace:*",
"@t3-oss/env-nextjs": "^0.9.2",
"@tanstack/react-query": "^5.29.0",
"bignumber.js": "^9.1.2",
"ethers": "5.4.7",
"graphql-request": "^5.0.0",
"next": "^14.1.3",
"react": "18.2.0",
"react-dom": "18.2.0",
"styled-components": "6.0.7",
"viem": "^1.3.1",
"wagmi": "^1.3.9",
"zod": "^3.22.4"
},
"devDependencies": {
"@babel/core": "^7.24.4",
"@babel/preset-typescript": "^7.24.1",
"@emotion/react": "^11.11.4",
"@types/eslint": "^8.56.2",
"@types/node": "^20.11.20",
"@types/react": "^18.2.57",
"@types/react-dom": "^18.2.19",
"@typescript-eslint/eslint-plugin": "^7.1.1",
"@typescript-eslint/parser": "^7.1.1",
"babel-loader": "^9.1.3",
"css-loader": "^7.1.1",
"eslint": "^8.57.0",
"eslint-config-next": "^14.1.3",
"framer-motion": "^11.0.28",
"postcss": "^8.4.34",
"prettier": "^3.2.5",
"prettier-plugin-tailwindcss": "^0.5.11",
"sass-loader": "^14.1.1",
"style-loader": "^4.0.0",
"tailwindcss": "^3.4.1",
"ts-loader": "^9.5.1",
"typescript": "^5.4.2"
},
"ct3aMetadata": {
"initVersion": "7.30.2"
},
"packageManager": "[email protected]"
}
7 changes: 7 additions & 0 deletions apps/example/postcss.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
const config = {
plugins: {
tailwindcss: {},
},
};

module.exports = config;
6 changes: 6 additions & 0 deletions apps/example/prettier.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/** @type {import('prettier').Config & import('prettier-plugin-tailwindcss').PluginOptions} */
const config = {
plugins: ["prettier-plugin-tailwindcss"],
};

export default config;
Binary file added apps/example/public/favicon.ico
Binary file not shown.
Loading