Skip to content

Commit

Permalink
Etherlink ERC20 Token Deployer (#868)
Browse files Browse the repository at this point in the history
* WIP:
- Implementing WAGMI for Etherlink Login
- Changing useTezos hook to handle login with Etherlink
- Changing Validation options when Etherlink is active.

* WIP:

* WIP - Offchain DAO Almost Works.

* Token Deployer for Etherlink

* Updated changelog

* Fixes after Rebase
  • Loading branch information
ashutoshpw authored Nov 4, 2024
1 parent 16802d5 commit 34c5a7d
Show file tree
Hide file tree
Showing 42 changed files with 3,428 additions and 682 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ yarn-error.log*

# Ignore for yarn.lock
bun.lockb
package-lock.json
package-lock.json
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
- Etherlink ERC20 Token Deployer
- Migration tool for V2 contracts
- Sending XTZ directly to DAO address
- Delegating DAO's XTZ to baker
Expand Down
Binary file added bun.lockb
Binary file not shown.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"@types/react-paginate": "^7.1.2",
"@types/react-router-hash-link": "^2.4.5",
"@types/valid-url": "^1.0.4",
"@web3modal/wagmi": "^5.0.6",
"assert": "^2.0.0",
"bignumber.js": "^9.0.1",
"blockies-ts": "^1.0.0",
Expand Down
98 changes: 52 additions & 46 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ import { DAOExplorerRouter } from "modules/explorer/router"
import { CreatorProvider } from "modules/creator/state"
import ScrollToTop from "modules/common/ScrollToTop"
import { theme } from "theme"
import { WagmiProvider } from "wagmi"
import { config as wagmiConfig } from "services/wagmi/config"

import { TZKTSubscriptionsProvider } from "services/bakingBad/context/TZKTSubscriptions"
import { WarningFooter } from "modules/common/WarningFooter"
Expand Down Expand Up @@ -98,57 +100,61 @@ const App: React.FC = () => {
variantInfo: classes.info
}}
>
<QueryClientProvider client={queryClient}>
<ActionSheetProvider>
<LocalizationProvider dateAdapter={AdapterDayjs}>
<Box bgcolor="primary.dark" position="absolute" width="100%">
<Router>
<ScrollToTop />
<Switch>
<Route path="/creator">
<CreatorProvider>
<ThemeProvider theme={legacyTheme}>
<DAOCreatorRouter />
</ThemeProvider>
</CreatorProvider>
{/* <WarningFooter
<WagmiProvider config={wagmiConfig}>
{/* <TanStackQueryClientProvider client={tsQueryClient}> */}
<QueryClientProvider client={queryClient}>
<ActionSheetProvider>
<LocalizationProvider dateAdapter={AdapterDayjs}>
<Box bgcolor="primary.dark" position="absolute" width="100%">
<Router>
<ScrollToTop />
<Switch>
<Route path="/creator">
<CreatorProvider>
<ThemeProvider theme={legacyTheme}>
<DAOCreatorRouter />
</ThemeProvider>
</CreatorProvider>
{/* <WarningFooter
text={
"The Homebase contract can't transfer FA1.2 tokens. Please make sure any and all tokens you send to the DAO treasury are implementing the FA2 standard."
}
/> */}
</Route>
<Route path="/lite">
<ThemeProvider theme={legacyTheme}>
<CommunityCreator />
</ThemeProvider>
</Route>
<Route path="/explorer">
<TZKTSubscriptionsProvider>
<DAOExplorerRouter />
</TZKTSubscriptionsProvider>
</Route>
<Route path="/lite">
<ThemeProvider theme={legacyTheme}>
<CommunityCreator />
</ThemeProvider>
</Route>
<Route path="/explorer">
<TZKTSubscriptionsProvider>
<DAOExplorerRouter />
</TZKTSubscriptionsProvider>

{window.location.href.indexOf(HUMANITEZ_DAO) !== -1 ? (
<>
{/* Special case for this DAO which was created before FA1.2 fix was created for the smart contract */}
<WarningFooter
text={
"The Homebase contract can't transfer FA1.2 tokens. Please make sure any and all tokens you send to the DAO treasury are implementing the FA2 standard."
}
/>
</>
) : null}
<ExplorerFooter></ExplorerFooter>
</Route>
<Route path="/faq">
<FAQ />
</Route>
<Redirect to="/explorer" />
</Switch>
</Router>
</Box>
</LocalizationProvider>
</ActionSheetProvider>
</QueryClientProvider>
{window.location.href.indexOf(HUMANITEZ_DAO) !== -1 ? (
<>
{/* Special case for this DAO which was created before FA1.2 fix was created for the smart contract */}
<WarningFooter
text={
"The Homebase contract can't transfer FA1.2 tokens. Please make sure any and all tokens you send to the DAO treasury are implementing the FA2 standard."
}
/>
</>
) : null}
<ExplorerFooter></ExplorerFooter>
</Route>
<Route path="/faq">
<FAQ />
</Route>
<Redirect to="/explorer" />
</Switch>
</Router>
</Box>
</LocalizationProvider>
</ActionSheetProvider>
</QueryClientProvider>
{/* </TanStackQueryClientProvider> */}
</WagmiProvider>
</SnackbarProvider>
</ThemeProvider>
)
Expand Down
4 changes: 4 additions & 0 deletions src/assets/abis/TODO.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

# TODO

We can directly fetch the ABI from https://github.com/dOrgTech/homebase-evm-contracts/ once this is ready instead of defining it here as a JSON
Loading

0 comments on commit 34c5a7d

Please sign in to comment.