Skip to content

Commit b205280

Browse files
initial nebula docs (#5720)
Co-authored-by: greg <gregfromstl@gmail.com>
1 parent b173ad2 commit b205280

File tree

12 files changed

+837
-17
lines changed

12 files changed

+837
-17
lines changed

apps/portal/src/app/Header.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ const links = [
3232
name: "Insight",
3333
href: "/insight",
3434
},
35+
{
36+
name: "Nebula",
37+
href: "/nebula",
38+
},
3539
];
3640

3741
const toolLinks = [
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
2+
3+
# ERC-20 Paymaster
4+
5+
In traditional Ethereum transactions, users pay gas fees in the native cryptocurrency of the network, such as ETH. This requirement can create friction, especially for applications where users interact with smart contracts without holding native tokens. ERC-20 Paymaster enables users pay gas fees using ERC-20 tokens. [Learn more about ERC-20 Paymasters.](https://blog.thirdweb.com/account-abstraction-paymaster-pay-evm-gas-fees-with-usdt-usdc-or-any-other-erc-20-token/)
6+
7+
### Get Started
8+
9+
10+
1. Install Connect SDK
11+
12+
```bash
13+
npm install thirdweb
14+
```
15+
16+
2. Configure the Paymaster In your SDK code, specify the ERC-20 token you wish to use for gas fees.
17+
18+
Currently you may use Lisk LSK, Base USDC or Celo CUSD.
19+
20+
21+
```tsx
22+
import { base, lisk, celo } from "thirdweb/chains";
23+
import { TokenPaymaster, smartWallet } from "thirdweb/wallets";
24+
25+
// Have users pay for gas in Base USDC
26+
const usdcWallet = smartWallet({
27+
chain: base,
28+
sponsorGas: true,
29+
overrides: {
30+
tokenPaymaster: TokenPaymaster.BASE_USDC,
31+
},
32+
});
33+
34+
// Have users pay for gas in Lisk LSK
35+
const lskWallet = smartWallet({
36+
chain: lisk,
37+
sponsorGas: true,
38+
overrides: {
39+
tokenPaymaster: TokenPaymaster.LISK_LSK,
40+
},
41+
});
42+
43+
// Have users pay for gas in Celo CUSD
44+
const cusdWallet = smartWallet({
45+
chain: celo,
46+
sponsorGas: true,
47+
overrides: {
48+
tokenPaymaster: TokenPaymaster.CELO_CUSD,
49+
},
50+
});
51+
```

apps/portal/src/app/connect/sidebar.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,10 @@ export const sidebar: SideBar = {
172172
},
173173
],
174174
},
175+
{
176+
name: "ERC-20 Paymaster",
177+
href: `${aAslug}/erc-20-paymaster`,
178+
},
175179
{
176180
name: "Account Factories",
177181
href: `${aAslug}/factories`,

apps/portal/src/app/layout.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@ export default function RootLayout({
6666
<StickyTopContainer>
6767
{/* Note: Please change id as well when changing text or href so that new banner is shown to user even if user dismissed the older one */}
6868
<Banner
69-
id="modular-contracts"
70-
text="Modular Contracts Beta: Secure, Customizable, and Easy to Integrate contracts"
71-
href="https://thirdweb.com/explore/modular-contracts"
69+
id="nebula-alpha"
70+
text="Introducing Nebula - the most powerful AI to interact with the blockchain. Join the waitlist."
71+
href="https://thirdweb.com/nebula"
7272
/>
7373
<Header />
7474
</StickyTopContainer>

0 commit comments

Comments
 (0)