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

latest code changes (to be merged) #18

Closed
wants to merge 122 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
122 commits
Select commit Hold shift + click to select a range
a7e0953
staging ready changes
AmanRaj1608 Jan 27, 2023
a582496
new changes merged
AmanRaj1608 Feb 24, 2023
e33d6bd
chore: revamp
AmanRaj1608 Mar 13, 2023
2a4ddcc
workflows file update
manjeet-thadani04 Mar 14, 2023
60634c9
faucet code update
AmanRaj1608 Mar 14, 2023
d7f13e1
workflows file update
manjeet-thadani04 Mar 14, 2023
b2a576a
Update dev.yaml
manjeet-thadani04 Mar 14, 2023
fa05d99
update to latest code
AmanRaj1608 Mar 24, 2023
fdb87ab
whitelist url fix
AmanRaj1608 Mar 24, 2023
943f188
fix: api id
AmanRaj1608 Mar 24, 2023
5055c3c
feat: forward flow
AmanRaj1608 Mar 24, 2023
27991f1
minor change
AmanRaj1608 Mar 24, 2023
8746563
fix gasLimit
AmanRaj1608 Mar 28, 2023
58d3089
fix: version bump
AmanRaj1608 Mar 30, 2023
9cbd3a7
fix: polygon mainnet
AmanRaj1608 Mar 30, 2023
9035d9d
fix: button style
shaansundar Apr 3, 2023
e7946e0
fix: app-landing
shaansundar Apr 3, 2023
5a877d2
fix: loading-reform
shaansundar Apr 3, 2023
4686789
fix: navbar styling
shaansundar Apr 3, 2023
76e1020
fix: add logo to title
shaansundar Apr 3, 2023
26bc255
fix: logo change
shaansundar Apr 3, 2023
e88eb2a
fix: tabs body
shaansundar Apr 3, 2023
9c0ce98
fix: spacing
shaansundar Apr 4, 2023
fe08965
fix: toast position
shaansundar Apr 4, 2023
b9cb6a7
fix: layout and minor changes
shaansundar Apr 5, 2023
cf43662
fix: faucet
shaansundar Apr 5, 2023
829224e
fix: AA tab landing
shaansundar Apr 5, 2023
29f09f9
fix: white to e6e6e6
shaansundar Apr 5, 2023
1ad9af5
fix: balance
shaansundar Apr 5, 2023
5af4185
fix: added routing from forward and AA
shaansundar Apr 5, 2023
a0d8a79
REMOVE: testnet migration
shaansundar Apr 5, 2023
71f1193
fix: smart account tag
shaansundar Apr 5, 2023
7a0a05b
fix: mintERC20 flow
shaansundar Apr 5, 2023
82d2716
fix: balance Title
shaansundar Apr 5, 2023
b3252df
fix: width limit and placement
shaansundar Apr 5, 2023
e258b3d
fix: modal design
shaansundar Apr 6, 2023
fcb7f0a
fix: forward designs and radio choose
shaansundar Apr 6, 2023
f0a2268
fix: aa design and view
shaansundar Apr 6, 2023
03373bc
fix: message
shaansundar Apr 7, 2023
cf3be39
Merge pull request #20 from bcnmy/dev-ui-update
shaansundar Apr 7, 2023
38294e6
fix: lock for build failure
shaansundar Apr 8, 2023
c6d2f61
fix: build
AmanRaj1608 Apr 10, 2023
c5c8f51
latest devx changes
AmanRaj1608 Apr 11, 2023
210e6b6
minor fix
AmanRaj1608 Apr 11, 2023
37c0714
update to prod
AmanRaj1608 Apr 12, 2023
aeaa3c9
Merge pull request #21 from bcnmy/devx-changes
AmanRaj1608 Apr 12, 2023
87c6197
minor fix
AmanRaj1608 Apr 12, 2023
17845b0
chore fix
AmanRaj1608 Apr 18, 2023
cef62aa
bump package version and push lockfile
livingrockrises May 18, 2023
0d7576b
add arbitrum goerli in chains config + remove hardcoded gas limit
livingrockrises Jun 5, 2023
4a629fe
update node version
livingrockrises Jun 5, 2023
0f000f1
change active chain id to mumbai
livingrockrises Jun 7, 2023
19d07b2
bump package version
livingrockrises Jun 10, 2023
05a3f27
feat ✨: scw v3 migration
AmanRaj1608 Jul 13, 2023
1e96425
minor changes
AmanRaj1608 Jul 13, 2023
d4c9075
update v2 methods
AmanRaj1608 Aug 24, 2023
31fb761
bump version
AmanRaj1608 Aug 24, 2023
9d76dc0
update tx flow
AmanRaj1608 Aug 24, 2023
999dea8
refactor for testing
livingrockrises Aug 25, 2023
24b2a09
Show action message instead of error for known errors.
tomarsachin2271 Aug 25, 2023
d0fd4a4
Fix session module address and add check for isSessionEnabled
tomarsachin2271 Aug 25, 2023
e9925a1
refactor + update package
livingrockrises Aug 25, 2023
ef09d1c
version update + using custom gas limits
livingrockrises Aug 26, 2023
82c2858
Fir wrong sesionKeyData creation for ERC20 session validation module
tomarsachin2271 Aug 26, 2023
e937408
update gas limits
livingrockrises Aug 28, 2023
574e94a
update package version
livingrockrises Aug 28, 2023
9124ef4
update version and allow bundler estimation
livingrockrises Aug 30, 2023
27000de
back to skipBundler call as session key module dummySig doesnt always…
livingrockrises Aug 30, 2023
51efc6f
updates with bumped package version + session key manager dummy sig
livingrockrises Sep 5, 2023
d96522a
Update README.md
tomarsachin2271 Sep 6, 2023
83eeb16
router module temp test
livingrockrises Sep 6, 2023
dcd33ac
update addresses
livingrockrises Sep 7, 2023
b6b1fd1
refactor
livingrockrises Sep 7, 2023
5643257
revert back to just session key manager demo (no executeBatch)
livingrockrises Sep 7, 2023
afb90f8
update version
livingrockrises Sep 8, 2023
1a62f59
minor fixes
AmanRaj1608 Sep 8, 2023
596fff8
ui for batched router module
AmanRaj1608 Sep 11, 2023
93dfb4a
update addresses and version
livingrockrises Sep 11, 2023
bbc2c70
Merge branch 'dev-v2' into dev-v2-fix
livingrockrises Sep 11, 2023
55b6a38
code refactor
AmanRaj1608 Sep 11, 2023
e55529d
Merge pull request #23 from bcnmy/dev-v2-fix
AmanRaj1608 Sep 12, 2023
4d9e970
add mock session validation module updated address + session key data…
livingrockrises Sep 12, 2023
7241dbf
use addresses from imports
livingrockrises Sep 12, 2023
9d254e8
enable router module if not enabled
AmanRaj1608 Sep 12, 2023
d233012
update version and create data returns sessionId
livingrockrises Sep 13, 2023
c86fd6d
version bump
AmanRaj1608 Sep 21, 2023
3690ee2
update web3Auth with rainbowkit
AmanRaj1608 Nov 2, 2023
326fd9b
update package version
livingrockrises Nov 15, 2023
4978800
refactor + lockfile
livingrockrises Nov 15, 2023
fc8e5ad
feat: add 3.1.1 release changes
AmanRaj1608 Nov 15, 2023
d801898
Merge pull request #24 from bcnmy/fix/update-wallet-lib
AmanRaj1608 Nov 15, 2023
cfcaf2b
minor fix
AmanRaj1608 Nov 15, 2023
35944e2
refactor with comments
livingrockrises Dec 5, 2023
aea68d1
Merge branch 'dev' into dev-v2
livingrockrises Dec 5, 2023
c5bf62b
add lock file
livingrockrises Dec 5, 2023
c4b6750
Merge pull request #25 from bcnmy/dev-v2
livingrockrises Dec 5, 2023
e3569f3
session key comments
livingrockrises Dec 6, 2023
4719078
fee quotes only for faucet tokens + fix batch add liquidity
livingrockrises Dec 7, 2023
7617847
CC abi validation module demo
livingrockrises Dec 9, 2023
b4e469e
limit session key demo to abi sess validation module
livingrockrises Dec 9, 2023
feac360
fix: design changes
AmanRaj1608 Dec 12, 2023
3fe859f
minor changes
AmanRaj1608 Dec 12, 2023
3080bdc
Merge pull request #26 from bcnmy/contract-call-abi-svm-demo
AmanRaj1608 Dec 12, 2023
e48b575
feat: add v4 example
AmanRaj1608 Jan 9, 2024
28cc6f4
bump version
AmanRaj1608 Jan 26, 2024
4b63bbf
fix: typescript and viem compatibility + local linked v4 packages
livingrockrises Jan 29, 2024
21e34de
updated with v4 and devx
livingrockrises Jan 31, 2024
82ff870
update latest code
livingrockrises Feb 1, 2024
648a09a
fix: encoding type
AmanRaj1608 Feb 1, 2024
027aa93
updated with devx
livingrockrises Feb 2, 2024
8a872f3
update with latest viem v2 changes
livingrockrises Feb 6, 2024
454b26d
v4 updates
GabiDev45 Feb 6, 2024
9f6d80d
merge
GabiDev45 Feb 6, 2024
c07cb59
Merge branch 'v4-tests' of https://github.com/bcnmy/sdk-demo into ref…
GabiDev45 Feb 15, 2024
7793415
Added session batch router module
GabiDev45 Feb 15, 2024
a5f05ef
Added Batched Router + Update deps & Code + ABI SVM
GabiDev45 Feb 19, 2024
2f8cf71
Add constants & fixes
GabiDev45 Feb 20, 2024
9cc7511
Merge pull request #27 from bcnmy/refactor/batched_session_router
VGabriel45 Feb 21, 2024
1bb8003
Merge branch 'dev' of https://github.com/bcnmy/sdk-demo into v4-tests
GabiDev45 Feb 21, 2024
2bf623a
Merge branch 'v4-tests' of https://github.com/bcnmy/sdk-demo into v4-…
GabiDev45 Feb 28, 2024
a868e64
Fixed ABI SVM example
GabiDev45 Feb 28, 2024
23902f4
Merge pull request #28 from bcnmy/v4-tests
VGabriel45 Feb 28, 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: 0 additions & 1 deletion .env-example

This file was deleted.

46 changes: 46 additions & 0 deletions .github/workflows/dev.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Sdk Dev Deployment

on:
push:
branches:
- dev
permissions:
id-token: write
contents: read

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.16.0]

steps:
- uses: actions/checkout@v2

- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: Generate build
run: |
yarn install
yarn run build
env:
CI: false
NODE_OPTIONS: --max_old_space_size=4096
REACT_APP_PKEY: ${{ secrets.REACT_APP_PKEY }}

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: ${{ secrets.AWS_DEV_ROLE_ARN }}
role-session-name: dev-deploy
aws-region: ${{ secrets.AWS_DEFAULT_REGION }}

# publish to dev environment
- name: Deploy to S3
run: |
aws s3 sync build s3://${{ secrets.DEV_S3_BUCKET_NAME }}
aws cloudfront create-invalidation --distribution-id ${{ secrets.DEV_CF_ID }} --paths /
4 changes: 2 additions & 2 deletions .github/workflows/staging.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Staging Sdk Deployment
name: staging Sdk Deployment

on:
push:
Expand Down Expand Up @@ -36,7 +36,7 @@ jobs:
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
role-session-name: staging-deploy
role-session-name: dev-deploy
aws-region: ${{ secrets.AWS_DEFAULT_REGION }}

# publish to staging environment
Expand Down
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@

Example codes for integrating biconomy sdk in your repo.

- [https://sdk-dev.biconomy.io](https://sdk-dev.biconomy.io)

#### Run locally

```bash
git clone https://github.com/bcnmy/sdk-demo.git
cd sdk-demo
yarn install
cd node_modules/@uniswap/v3-periphery
yarn
npx hardhat compile
cd -
yarn start
```
1 change: 1 addition & 0 deletions config-overrides.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ module.exports = function override(config) {
"url": require.resolve("url"),
"zlib": require.resolve("browserify-zlib"),
"path": require.resolve("path-browserify"),
"c-kzg": require.resolve("c-kzg"),
"process/browser": require.resolve("process/browser"),
})
config.resolve.fallback = fallback;
Expand Down
46 changes: 21 additions & 25 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,36 +1,31 @@
{
"name": "demo",
"version": "0.1.0",
"name": "biconomy-sdk-demo",
"version": "1.0.0",
"private": true,
"dependencies": {
"@biconomy/core-types": "1.0.0",
"@biconomy/relayer": "1.0.0",
"@biconomy/smart-account": "1.0.0",
"@biconomy/transactions": "1.0.0",
"@biconomy/web3-auth": "1.0.0",
"@material-ui/core": "^4.11.3",
"@material-ui/icons": "^4.11.2",
"@alchemy/aa-core": "1.2.2",
"@biconomy/account": "4.0.0",
"@emotion/react": "^11.10.6",
"@emotion/styled": "^11.10.6",
"@mui/icons-material": "^5.11.11",
"@mui/material": "^5.11.12",
"@mui/styles": "^5.11.12",
"@rainbow-me/rainbowkit": "^2.0.0",
"@tanstack/react-query": "^5.22.2",
"@types/node": "^16.7.13",
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
"@walletconnect/web3-provider": "^1.8.0",
"@web3auth/base": "^2.1.2",
"@web3auth/coinbase-adapter": "^2.1.2",
"@web3auth/web3auth": "^2.1.2",
"buffer": "^6.0.3",
"ethers": "^5.6.9",
"net": "^1.0.2",
"path-browserify": "^1.0.1",
"process": "^0.11.10",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-scripts": "5.0.1",
"react-toastify": "^9.0.8",
"tls": "^0.0.1",
"typescript": "^4.4.2",
"walletlink": "^2.5.0",
"web-vitals": "^2.1.0",
"web3": "^1.7.5",
"web3modal": "^1.9.8"
"typescript": "5.2.0",
"viem": "^2.7.3",
"wagmi": "^2.5.5",
"web-vitals": "^2.1.0"
},
"scripts": {
"start": "react-app-rewired start",
Expand Down Expand Up @@ -59,17 +54,18 @@
]
},
"devDependencies": {
"@uniswap/sdk-core": "^3.0.1",
"@uniswap/smart-order-router": "^2.8.2",
"@uniswap/v3-sdk": "^3.9.0",
"assert": "^2.0.0",
"browserify-zlib": "^0.2.0",
"c-kzg": "^1.0.9",
"crypto-browserify": "^3.12.0",
"https-browserify": "^1.0.0",
"net": "^1.0.2",
"os-browserify": "^0.3.0",
"path-browserify": "^1.0.1",
"react-app-rewired": "^2.2.1",
"stream-browserify": "^3.0.0",
"stream-http": "^3.2.0",
"tls": "^0.0.1",
"url": "^0.11.0"
}
}
}
Binary file added public/img/batch.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/erc20.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/nft.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/nfts.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<link rel="icon" href="%PUBLIC_URL%/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" />
<meta name="description" content="A playground to test some use casees of the SDK." />
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<link rel="preconnect" href="https://fonts.gstatic.com">
Expand Down
9 changes: 6 additions & 3 deletions public/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
117 changes: 43 additions & 74 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,108 +1,77 @@
import React from "react";
import { makeStyles } from "@material-ui/core/styles";
import { makeStyles } from "@mui/styles";
import { ToastContainer } from "react-toastify";
import Navbar from "./components/Navbar";
import { useAccount } from 'wagmi'
import { ConnectButton } from '@rainbow-me/rainbowkit';
import TabsBody from "./components/TabsBody";
import { useSmartAccountContext } from "./contexts/SmartAccountContext";
import { useWeb3AuthContext } from "./contexts/SocialLoginContext";
import Button from "./components/Button";

const App: React.FC = () => {
const classes = useStyles();
const { connect, address, loading: eoaWalletLoading } = useWeb3AuthContext();
const { address } = useAccount()
const { loading } = useSmartAccountContext();

if (!address) {
return (
<div
className={classes.bgCover}
style={{
display: "flex",
flexDirection: "column",
alignItems: "center",
paddingTop: "30vh",
}}
>
<h1 className={classes.title}>Biconomy SDK Demo</h1>
<Button
title="Get Started"
onClickFunc={connect}
isLoading={eoaWalletLoading}
style={{
fontSize: 20,
padding: "30px 20px",
border: 0,
background:
"linear-gradient(90deg, #0063FF -2.21%, #9100FF 89.35%)",
}}
/>
<ToastContainer />
<div className={classes.bgCover}>
<div className={classes.container}>
<h1 className={classes.title}>
<img width={35} style={
{
marginRight: 20,
}
} src="/logo.svg" alt="" />
Biconomy SDK</h1>
<p className={classes.subTitle}>
Solve complex UX challenges with customisable SDK modules in
minutes.
</p>
<ConnectButton />
</div>
</div>
);
}

return (
<div className={classes.bgCover}>
<Navbar />
{loading ? (
<div className={classes.container}>
<img src="/logo.svg" className={classes.animateBlink} alt="" />
</div>
) : (
<TabsBody />
)}
<ToastContainer />
<TabsBody loading={loading} />
<ToastContainer position="bottom-left" newestOnTop theme="dark" />
</div>
);
};

const useStyles = makeStyles(() => ({
bgCover: {
backgroundColor: "#1a1e23",
// backgroundImage: `url(/img/northern-lights-bg.png)`,
backgroundSize: "cover",
width: "100%",
minHeight: "100vh",
color: "#fff",
fontStyle: "italic",
width: "100vw",
height: "100vh",
background: "linear-gradient(120.85deg, #3F2E27 23.78%, #0E1117 68.7%)",
display: "flex",
color: "#e6e6e6",
justifyContent: "start",
alignItems: "center",
padding: "0px 20px",
},
container: {
width: "60vw",
height: "60vh",
backgroundColor: "#151520",
border: "1px solid #5B3320",
padding: "32px",
borderRadius: 20,
display: "flex",
flexDirection: "column",
width: "100%",
height: "80vh",
alignItems: "start",
justifyContent: "center",
alignItems: "center",
gap: 20,
},
title: {
marginBottom: 50,
fontSize: 60,
background: "linear-gradient(90deg, #12ECB8 -2.21%, #00B4ED 92.02%)",
"-webkit-background-clip": "text",
"-webkit-text-fill-color": "transparent",
},
animateBlink: {
animation: "$bottom_up 2s linear infinite",
"&:hover": {
transform: "scale(1.2)",
},
margin: 0,
fontSize: 50,
color: "#ffb999",
},
"@keyframes bottom_up": {
"0%": {
transform: "translateY(0px)",
},
"25%": {
transform: "translateY(20px)",
},
"50%": {
transform: "translateY(0px)",
},
"75%": {
transform: "translateY(-20px)",
},
"100%": {
transform: "translateY(0px)",
},
subTitle: {
fontSize: 22,
margin: 0,
},
}));

Expand Down
Loading
Loading