forked from Scaffold-Stark/scaffold-stark-2
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update and Sync ch-2 with last version Scaffold Stark
- Loading branch information
Showing
40 changed files
with
3,004 additions
and
1,924 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
DESIRED_COMMIT="46e0ec032956f0e7cbe0330f32b6b31eff824087" | ||
|
||
cd packages/snfoundry/local-devnet | ||
|
||
LAST_COMMIT=$(git log -1 --format="%H") | ||
|
||
if [ "$LAST_COMMIT" != "$DESIRED_COMMIT" ]; then | ||
echo "FAIL: Last local-devnet commit ($LAST_COMMIT) is not the desired ($DESIRED_COMMIT)." | ||
exit 1 | ||
fi | ||
|
||
cd - | ||
|
||
npm run format:check |
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 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,31 @@ | ||
export async function GET( | ||
_: Request, | ||
{ params: { symbol } }: { params: { symbol: string } }, | ||
) { | ||
let apiUrl = ""; | ||
if (symbol === "ETH") { | ||
apiUrl = | ||
"https://api.coingecko.com/api/v3/simple/price?ids=ethereum&vs_currencies=usd"; | ||
} else if (symbol === "STRK") { | ||
apiUrl = | ||
"https://api.coingecko.com/api/v3/simple/price?ids=starknet&vs_currencies=usd"; | ||
} else { | ||
return Response.json({ | ||
ethereum: { usd: 0 }, | ||
starknet: { usd: 0 }, | ||
}); | ||
} | ||
try { | ||
const response = await fetch(apiUrl); | ||
if (!response.ok) { | ||
throw new Error(`coingecko response status: ${response.status}`); | ||
} | ||
const json = await response.json(); | ||
return Response.json(json); | ||
} catch (e) { | ||
return Response.json({ | ||
ethereum: { usd: 0 }, | ||
starknet: { usd: 0 }, | ||
}); | ||
} | ||
} |
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
3 changes: 0 additions & 3 deletions
3
packages/nextjs/app/debug/_components/contract/ContractReadMethods.tsx
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
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
Oops, something went wrong.