-
Notifications
You must be signed in to change notification settings - Fork 133
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: integrate sdk + nft contract for onboarding (#11)
* feat: clean up components for profile and nft fetching * feat: add smart contract for nft * feat: integrate sdk + nft contract for onboarding
- Loading branch information
Showing
39 changed files
with
3,385 additions
and
1,366 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[submodule "examples/contracts/DAAppNFT/lib/openzeppelin-contracts"] | ||
path = examples/contracts/DAAppNFT/lib/openzeppelin-contracts | ||
url = https://github.com/openzeppelin/openzeppelin-contracts | ||
[submodule "examples/contracts/DAAppNFT/lib/forge-std"] | ||
path = examples/contracts/DAAppNFT/lib/forge-std | ||
url = https://github.com/foundry-rs/forge-std | ||
[submodule "examples/contracts/DAAppNFT/lib/ds-test"] | ||
path = examples/contracts/DAAppNFT/lib/ds-test | ||
url = https://github.com/dapphub/ds-test | ||
[submodule "examples/contracts/DAAppNFT/lib/solmate"] | ||
path = examples/contracts/DAAppNFT/lib/solmate | ||
url = https://github.com/transmissions11/solmate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
# When adding additional environment variables, the schema in "/src/env.mjs" | ||
# should be updated accordingly. | ||
|
||
NFT_CONTRACT_ADDRESS="" | ||
ALCHEMY_API_URL="" | ||
ALCHEMY_API_URL=https://polygon-mumbai.g.alchemy.com/v2/your-api-key | ||
|
||
NEXT_PUBLIC_NFT_CONTRACT_ADDRESS=0xYOURADDRESSHERE | ||
NEXT_PUBLIC_SIMPLE_ACCOUNT_FACTORY_ADDRESS=0xYOURADDRESSHERE | ||
NEXT_PUBLIC_PAYMASTER_POLICY_ID=some-policy-id |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
export const NFTContractABI = { | ||
abi: [ | ||
{ | ||
inputs: [ | ||
{ | ||
internalType: "address", | ||
name: "recipient", | ||
type: "address", | ||
}, | ||
], | ||
name: "mintTo", | ||
outputs: [ | ||
{ | ||
internalType: "uint256", | ||
name: "", | ||
type: "uint256", | ||
}, | ||
], | ||
stateMutability: "payable", | ||
type: "function", | ||
}, | ||
], | ||
}; |
This file was deleted.
Oops, something went wrong.
163 changes: 0 additions & 163 deletions
163
examples/alchemy-daapp/src/components/onboarding/OnboardingPage.tsx
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { Chain, polygonMumbai, sepolia } from "viem/chains"; | ||
|
||
export interface DAAppConfiguration { | ||
nftContractAddress: `0x${string}`; | ||
simpleAccountFactoryAddress: `0x${string}`; | ||
gasManagerPolicyId: string; | ||
rpcUrl: string; | ||
chain: Chain; | ||
} | ||
|
||
// TODO: Replace with your own contract addresses and policy ids, feel free to add or remove chains. | ||
export const daappConfigurations: Record<number, DAAppConfiguration> = { | ||
[polygonMumbai.id]: { | ||
nftContractAddress: "0x5679b0de84bba361d31b2e7152ab20f0f8565245", | ||
simpleAccountFactoryAddress: "0x9406Cc6185a346906296840746125a0E44976454", | ||
gasManagerPolicyId: "469689aa-4fdd-43bd-a721-697f7d5e2c5d", | ||
rpcUrl: `/api/rpc/proxy?chainId=${polygonMumbai.id}`, | ||
chain: polygonMumbai, | ||
}, | ||
[sepolia.id]: { | ||
nftContractAddress: "0x5679b0de84bba361d31b2e7152ab20f0f8565245", | ||
simpleAccountFactoryAddress: "0xc8c5736988F4Ea76B9f620dc678c23d5cBf3C83c", | ||
gasManagerPolicyId: "97ca8953-1692-40ff-9cb8-202accb1416c", | ||
rpcUrl: `/api/rpc/proxy?chainId=${sepolia.id}`, | ||
chain: sepolia, | ||
}, | ||
}; |
Oops, something went wrong.