Skip to content

Commit

Permalink
- remove env configs
Browse files Browse the repository at this point in the history
- separate intro from main app with providers
- create network configs file
- add dojo setup for burner manager
- remove most arcade components
- add other connectors
  • Loading branch information
starknetdev committed Jun 7, 2024
1 parent 6b082db commit d11fb51
Show file tree
Hide file tree
Showing 46 changed files with 1,534 additions and 3,127 deletions.
18 changes: 1 addition & 17 deletions ui/.env.production
Original file line number Diff line number Diff line change
@@ -1,17 +1 @@
NEXT_PUBLIC_NETWORK=mainnet
NEXT_PUBLIC_RPC_URL=https://starknet-sepolia.blastapi.io/5ef61753-e7c1-4593-bc62-97fdf96f8de5
NEXT_PUBLIC_RPC_API_KEY=5ef61753-e7c1-4593-bc62-97fdf96f8de5
NEXT_PUBLIC_LS_GQL_URL=https://survivor-mainnet-indexer.realms.world/graphql
NEXT_PUBLIC_TOKENS_GQL_URL=https://realmsworld-8gqj4xan8-loot-bibliotheca.vercel.app/api/graphql
NEXT_PUBLIC_ETH_ADDRESS=0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7
NEXT_PUBLIC_GAME_ADDRESS=0x03c10537fa0073b2dd5120242697dbf76d6173eb9f384d3bf3d284d53388a0b0
NEXT_PUBLIC_OLD_GAME_ADDRESS=0x006388d8846a7a87f00b353112268f5e010335b2440175ba99717b6ff11545be
NEXT_PUBLIC_LORDS_ADDRESS=0x0124aeb495b947201f5fac96fd1138e326ad86195b98df6dec9009158a533b49
NEXT_PUBLIC_BEASTS_ADDRESS=0x0158160018d590d93528995b340260e65aedd76d28a686e9daa5c4e8fad0c5dd
NEXT_PUBLIC_GOLDEN_TOKEN_ADDRESS=0x04f5e296c805126637552cf3930e857f380e7c078e8f00696de4fc8545356b1d
NEXT_PUBLIC_ARCADE_ACCOUNT_CLASS_HASH=0x0251830adc3d8b4d818c2c309d71f1958308e8c745212480c26e01120c69ee49
NEXT_PUBLIC_DAO_ADDRESS=0x049FB4281D13E1f5f488540Cd051e1507149E99CC2E22635101041Ec5E4e4557
NEXT_PUBLIC_APP_URL=https://survivor.realms.world/
NEXT_PUBLIC_BEASTS_VIEWER_URL=https://realms.world/collection/beasts
NEXT_PUBLIC_GOLDEN_TOKEN_MINT_URL=https://realms.world/collection/goldenToken
NEXT_PUBLIC_BLOCK_EXPLORER_URL=https://voyager.online/
NEXT_PUBLIC_NETWORK=prod
1 change: 1 addition & 0 deletions ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"dependencies": {
"@apollo/client": "^3.7.11",
"@cartridge/connector": "^0.3.25",
"@dojoengine/create-burner": "^0.7.0-alpha.1",
"@fontsource/vt323": "^4.5.10",
"@starknet-react/core": "^2.5.0",
"@svgr/webpack": "^7.0.0",
Expand Down
5 changes: 2 additions & 3 deletions ui/src/app/api/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ interface MintEthProps {
address: string;
}

export const getBlock = async (blockNumber: number) => {
const rpcUrl = process.env.NEXT_PUBLIC_RPC_URL!;
export const getBlock = async (rpcUrl: string, blockNumber: number) => {
try {
const requestBody = {
jsonrpc: "2.0",
Expand Down Expand Up @@ -69,10 +68,10 @@ export const getApibaraStatus = async () => {
};

export const getInterface = async (
rpcUrl: string,
masterAddress: string,
arcade_interface_id: string
) => {
const rpcUrl = process.env.NEXT_PUBLIC_RPC_URL!;
const response = await fetch(rpcUrl, {
method: "POST",
headers: {
Expand Down
4 changes: 1 addition & 3 deletions ui/src/app/api/checkEntropy.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
export const getEntropy = async () => {
const rpcUrl = process.env.NEXT_PUBLIC_RPC_URL!;
const gameAddress = process.env.NEXT_PUBLIC_GAME_ADDRESS!;
export const getEntropy = async (rpcUrl: string, gameAddress: string) => {
const response = await fetch(rpcUrl, {
method: "POST",
headers: {
Expand Down
8 changes: 5 additions & 3 deletions ui/src/app/api/fetchMetadata.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { shortString } from "starknet";

export const fetchBeastImage = async (
rpcUrl: string,
beastsAddress: string,
tokenId: number
) => {
const rpcUrl = process.env.NEXT_PUBLIC_RPC_URL!;
const response = await fetch(rpcUrl, {
method: "POST",
headers: {
Expand Down Expand Up @@ -54,8 +54,10 @@ export const fetchBeastImage = async (
return parsedJson.image;
};

export const fetchGoldenTokenImage = async (goldenTokenAddress: string) => {
const rpcUrl = process.env.NEXT_PUBLIC_RPC_URL!;
export const fetchGoldenTokenImage = async (
rpcUrl: string,
goldenTokenAddress: string
) => {
const response = await fetch(rpcUrl, {
method: "POST",
headers: {
Expand Down
4 changes: 1 addition & 3 deletions ui/src/app/api/getItems.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
export const getItems = async () => {
const rpcUrl = process.env.NEXT_PUBLIC_RPC_URL!;
const gameAddress = process.env.NEXT_PUBLIC_GAME_ADDRESS!;
export const getItems = async (rpcUrl: string, gameAddress: string) => {
const response = await fetch(rpcUrl, {
method: "POST",
headers: {
Expand Down
Loading

0 comments on commit d11fb51

Please sign in to comment.