Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 1 addition & 1 deletion .changeset/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ with multi-package repos, or single-package repos to help you version and publis
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
[our documentation](https://github.com/changesets/changesets/blob/master/docs/common-questions.md)
4 changes: 2 additions & 2 deletions .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"fixed": [],
"linked": [],
"access": "restricted",
"baseBranch": "master",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": ["@0xsequence/wallet-primitives-cli", "docs", "web"]
"ignore": []
}
22 changes: 22 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
version: 2.1

jobs:
test:
docker:
- image: ghcr.io/foundry-rs/foundry:latest
steps:
- checkout
- run:
name: Install submodules
command: git submodule update --init --recursive
- run:
name: Build
command: forge build
- run:
name: Test
command: forge test -vvv

workflows:
main:
jobs:
- test
32 changes: 32 additions & 0 deletions .codesandbox/.github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: build dapp

on:
push:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest
name: Build and Push
steps:
- name: git-checkout
uses: actions/checkout@v3

- name: Setup PNPM
uses: pnpm/action-setup@v2
with:
version: 8
run_install: true

- name: Build
run: pnpm dist

- name: Push
uses: s0/git-publish-subdir-action@develop
env:
REPO: self
BRANCH: build
FOLDER: dist
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MESSAGE: 'Build: ({sha}) {msg}'
19 changes: 19 additions & 0 deletions .codesandbox/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
.env

#dependencies
node_modules/

# production
dist/

# misc
.DS_Store
.vscode
.idea/
*.iml
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

.env.local
9 changes: 9 additions & 0 deletions .codesandbox/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"tabWidth": 2,
"useTabs": false,
"semi": false,
"singleQuote": true,
"trailingComma": "none",
"arrowParens": "avoid",
"printWidth": 130
}
49 changes: 49 additions & 0 deletions .codesandbox/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
Demo Dapp
=========

Dapp example on how to use Sequence Wallet. Covers how to connect, sign messages and send transctions.

Try this dapp at: [https://0xsequence.github.io/demo-dapp](https://0xsequence.github.io/demo-dapp)

For complete documentation on Sequence, please see: [https://docs.sequence.build](https://docs.sequence.build)

## Usage

1. pnpm install
2. pnpm start
3. Open browser to http://localhost:4000 to access the demo dapp
4. Open browser inspector to see responses from the remote Sequence Wallet

## Development

See https://github.com/0xsequence/demo-dapp/blob/master/src/App.tsx for the source
usage for a variety of functions. Be sure to open your browser's dev inspector to see output.
Think of these functions as a "cookbook" for how you can perform these functions in your dapps.

Also note, sequence.js is built on top of ethers.js, and is API-compatible.

## Screenshots

**Opening wallet from dapp:**

![Open Sequence Wallet From Dapp](./screenshots/screen-open.png)


**Send transaction from dapp:**

Sequence Wallet is an Ethereum wallet supporting Ethereum mainnet, Polygon and more. Sequence will work
with any blockchain which is EVM compatible and supports Ethereum's node JSON-RPC interface.

Here you can see in this screenshot the call to "Send DAI" from demo-dapp
(https://github.com/0xsequence/demo-dapp/blob/master/src/routes/HomeRoute.tsx#L420). This function demonstrates
how you can transfer an ERC-20 token like DAI on any Ethereum network.

Notice how you can pay gas fees for a transaction in either MATIC token or USDC for price of $0.01.

![Transfer ERC-20 token on Polygon](./screenshots/screen-txn.png)



## LICENSE

Apache 2.0 or MIT (your choice)
35 changes: 35 additions & 0 deletions .codesandbox/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta
name="description"
content="Web site created using create-react-app"
/>
<link rel="apple-touch-icon" href="/logo192.png" />
<!--
manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link rel="manifest" href="/manifest.json" />
<!--
Notice the use of in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Only files inside the `public` folder can be referenced from the HTML.

Unlike "/favicon.ico" or "favicon.ico", "/favicon.ico" will
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>Sequence | Demo Dapp</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<a href="https://github.com/0xsequence/demo-dapp" target="_blank" rel="noopener noreferrer" class="github-corner" aria-label="View source on GitHub"><svg width="80" height="80" viewBox="0 0 250 250" style="fill:#fff; color:#151513; position: absolute; top: 0; border: 0; right: 0;" aria-hidden="true"><path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path></svg></a><style>.github-corner:hover .octo-arm{animation:octocat-wave 560ms ease-in-out}@keyframes octocat-wave{0%,100%{transform:rotate(0)}20%,60%{transform:rotate(-25deg)}40%,80%{transform:rotate(10deg)}}@media (max-width:500px){.github-corner:hover .octo-arm{animation:none}.github-corner .octo-arm{animation:octocat-wave 560ms ease-in-out}}</style>
<div id="root"></div>
<script type="module" src="/src/index.tsx"></script>
</body>
</html>
60 changes: 60 additions & 0 deletions .codesandbox/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
"name": "demo-dapp",
"description": "Ethereum Demo Dapp built on Sequence stack",
"version": "0.1.0",
"private": true,
"homepage": "demo-dapp",
"scripts": {
"dev": "BROWSER=none pnpm start",
"start": "vite",
"build": "BUILD_PATH='./dist' tsc && vite build",
"typecheck": "tsc --noEmit",
"serve": "vite preview",
"dist": "pnpm build",
"link-sequence": "pnpm run clear:vite:cache && ../sequence.js/scripts/pnpm-link.sh link",
"unlink-sequence": "pnpm run clear:vite:cache && ../sequence.js/scripts/pnpm-link.sh unlink",
"clear:vite:cache": "rm -rf node_modules/.vite/"
},
"dependencies": {
"0xsequence": "2.2.3",
"@0xsequence/abi": "2.2.13",
"@0xsequence/design-system": "^1.8.1",
"@0xsequence/ethauth": "^1.0.0",
"@0xsequence/network": "2.2.13",
"@0xsequence/provider": "2.2.13",
"@0xsequence/utils": "2.2.13",
"@types/node": "^20.11.30",
"@types/react": "^18.3.7",
"@types/react-dom": "^18.3.0",
"@vanilla-extract/css": "^1.14.1",
"ethers": "^6.13.4",
"framer-motion": "^9.0.1",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"typescript": "^4.5.5"
},
"devDependencies": {
"@vanilla-extract/vite-plugin": "^4.0.6",
"@vitejs/plugin-react": "^4.2.1",
"vite": "^6.4.2",
"vite-plugin-svgr": "^4.2.0",
"vite-tsconfig-paths": "^4.3.2"
},
"eslintConfig": {
"extends": [
"react-app"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
Loading
Loading