Skip to content

Commit

Permalink
Feat: add Aave and Arweave integrations (#14)
Browse files Browse the repository at this point in the history
* feat: add aave integration

* feat: add arweave integration
  • Loading branch information
marthendalnunes authored Aug 23, 2023
1 parent 1afcf58 commit d1466a1
Show file tree
Hide file tree
Showing 79 changed files with 12,463 additions and 3,588 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "create-turbo-eth",
"version": "0.4.1",
"version": "0.5.0",
"description": "Create web3 apps in turbo mode.",
"author": "Vitor @marthendalnunes",
"license": "MIT",
Expand Down
30 changes: 30 additions & 0 deletions src/config/integrations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,36 @@ export const integrationOptions: Integrations = {
},
},
},
aave: {
name: 'Aave V3',
pageDependencies: [
{
dependencyPath: dataConfigPath,
type: 'snippet',
regexList: [/\n\s*aave: \{\s*name: 'Aave',[\s\S]*?imgDark: '\/integrations\/aave.png',\s*\},/g],
},
{
dependencyPath: indexPagePath,
type: 'snippet',
regexList: [/\n\s*{\s*title: turboIntegrations\.aave\.name,[\s\S]*?<\/IsDarkTheme>\s*<\/div>\s*\),\s*},/g],
},
],
},
arweave: {
name: 'Arweave',
pageDependencies: [
{
dependencyPath: dataConfigPath,
type: 'snippet',
regexList: [/\n\s*arweave: \{\s*name: 'Arweave',[\s\S]*?imgDark: '\/integrations\/arweave-dark.png',\s*\},/g],
},
{
dependencyPath: indexPagePath,
type: 'snippet',
regexList: [/\n\s*{\s*title: turboIntegrations\.arweave\.name,[\s\S]*?<\/IsDarkTheme>\s*<\/div>\s*\),\s*},/g],
},
],
},
starter: {
name: 'Starter',
pageDependencies: [
Expand Down
2 changes: 2 additions & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ export type AvailableIntegrations =
| 'gelato'
| 'push-protocol'
| 'moralis'
| 'aave'
| 'arweave'
| 'starter'

export type Integrations = Record<AvailableIntegrations, Integration>
Expand Down
2 changes: 1 addition & 1 deletion template/base/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ ETHERSCAN_API_KEY_POLYGON=
OPENAI_API_KEY=

# Moralis API Key: https://admin.moralis.io/settings#secret-keys
MORALIS_API_KEY=
MORALIS_API_KEY=
32 changes: 31 additions & 1 deletion template/base/app/(general)/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export default function Home() {
</motion.div>
<CopyToClipboard text="pnpm create turbo-eth@latest" onCopy={() => setCopied(true)}>
<motion.div
className="group mx-auto mt-8 flex max-w-fit cursor-pointer items-center justify-between gap-x-2 rounded-xl border border-gray-200 bg-white py-4 px-3 text-sm font-medium shadow-md transition-colors dark:border-gray-800 dark:bg-neutral-800 dark:text-white hover:dark:border-gray-600/70 hover:dark:bg-neutral-700/70 md:px-6 md:text-lg"
className="group mx-auto mt-8 flex max-w-fit cursor-pointer items-center justify-between gap-x-2 rounded-xl border border-gray-200 bg-white px-3 py-4 text-sm font-medium shadow-md transition-colors dark:border-gray-800 dark:bg-neutral-800 dark:text-white hover:dark:border-gray-600/70 hover:dark:bg-neutral-700/70 md:px-6 md:text-lg"
variants={FADE_DOWN_ANIMATION_VARIANTS}>
<pre>pnpm create turbo-eth@latest</pre>
<span className="flex-center flex h-4 w-4 cursor-pointer rounded-md text-neutral-600 dark:text-neutral-100 md:h-7 md:w-7">
Expand Down Expand Up @@ -379,6 +379,36 @@ const features = [
</div>
),
},
{
title: turboIntegrations.aave.name,
description: turboIntegrations.aave.description,
href: turboIntegrations.aave.href,
demo: (
<div className="flex items-center justify-center space-x-20">
<IsLightTheme>
<Image alt="Aave logo" height={100} src={turboIntegrations.aave.imgDark} width={100} />
</IsLightTheme>
<IsDarkTheme>
<Image alt="Aave logo" height={100} src={turboIntegrations.aave.imgLight} width={100} />
</IsDarkTheme>
</div>
),
},
{
title: turboIntegrations.arweave.name,
description: turboIntegrations.arweave.description,
href: turboIntegrations.arweave.href,
demo: (
<div className="flex items-center justify-center space-x-20">
<IsLightTheme>
<Image alt="Arweave logo" height={100} src={turboIntegrations.arweave.imgDark} width={100} />
</IsLightTheme>
<IsDarkTheme>
<Image alt="Arweave logo" height={100} src={turboIntegrations.arweave.imgLight} width={100} />
</IsDarkTheme>
</div>
),
},
{
title: turboIntegrations.starter.name,
description: turboIntegrations.starter.description,
Expand Down
18 changes: 17 additions & 1 deletion template/base/data/turbo-integrations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ export const turboIntegrations = {
imgLight: '/integrations/connext.png',
imgDark: '/integrations/connext.png',
},

gelato: {
name: 'Gelato',
href: '/integration/gelato',
Expand All @@ -112,6 +111,23 @@ export const turboIntegrations = {
imgLight: '/integrations/moralis.png',
imgDark: '/integrations/moralis.png',
},
aave: {
name: 'Aave',
href: '/integration/aave',
url: 'https://docs.aave.com/hub/',
description: 'Aave is a decentralized non-custodial liquidity protocol.',
imgLight: '/integrations/aave.png',
imgDark: '/integrations/aave.png',
},
arweave: {
name: 'Arweave',
href: '/integration/arweave',
url: 'https://arwiki.arweave.dev',
description:
'Arweave is the first protocol that enables permanent data storage. Its design allows anyone to preserve data forever with just a single, one-time fee.',
imgLight: '/integrations/arweave-light.png',
imgDark: '/integrations/arweave-dark.png',
},
starter: {
name: 'Starter Template',
href: '/integration/starter',
Expand Down
2 changes: 1 addition & 1 deletion template/base/next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import './env.mjs'
const nextConfig = {
reactStrictMode: true,
images: {
domains: ['avatars.githubusercontent.com', 'images.unsplash.com', 'cloudflare-ipfs.com','gateway.ipfs.io'],
domains: ['avatars.githubusercontent.com', 'app.aave.com', 'images.unsplash.com', 'cloudflare-ipfs.com', 'gateway.ipfs.io'],
},
env: {
mode: process.env.NODE_ENV,
Expand Down
3 changes: 3 additions & 0 deletions template/base/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
},
"packageManager": "[email protected]",
"dependencies": {
"@bgd-labs/aave-address-book": "^1.30.0",
"@connext/nxtp-utils": "^2.0.3",
"@connext/sdk": "2.0.4-alpha.2",
"@gelatonetwork/automate-sdk": "^2.14.0",
Expand Down Expand Up @@ -81,6 +82,8 @@
"@tailwindcss/typography": "^0.5.9",
"@tanstack/react-query": "^4.3.9",
"abitype": "^0.9.6",
"arweave": "^1.14.0",
"arweave-account": "^1.4.0",
"axios": "^1.2.2",
"class-variance-authority": "^0.4.0",
"clsx": "^1.2.1",
Expand Down
Loading

0 comments on commit d1466a1

Please sign in to comment.