Skip to content

Commit

Permalink
optimize svelte5 code
Browse files Browse the repository at this point in the history
  • Loading branch information
zapaz committed Oct 27, 2024
1 parent 44f2a2d commit 59242dc
Show file tree
Hide file tree
Showing 12 changed files with 184 additions and 261 deletions.
4 changes: 2 additions & 2 deletions foundry/addresses.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"11155420": {
"Counter": "0x8354Ef7b78012151c276f51F8d19147FF8C47288",
"OnChainAI": "0xd1ca741de2d2975822ADf4646Cf0A8AE3Df51c78",
"OnChainAIv1": "0x9ee2948E17b4C25434c7D0D252E71201A2D87B05",
"OnChainAIv1": "0x432beBA9B2Fc71180FF9ba3fA93E1Ae88beDF402",
"chainName": "optimism-sepolia"
},
"31337": {
Expand All @@ -19,7 +19,7 @@
"84532": {
"Counter": "0x1bC96A82609F23419065FCEf120E16E2A6Bd3981",
"OnChainAI": "0xCB60F4a4e578CDDBe89e4a27B2126f54BaeF3500",
"OnChainAIv1": "0x93EB497b305D2cC4Fa3AC62009258EaE951043dB",
"OnChainAIv1": "0xBf196B3732880a51Eaa6Cfc38d82De1A61582B06",
"chainName": "base-sepolia"
}
}
155 changes: 82 additions & 73 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions svelte5/src/lib/deployments.json
Original file line number Diff line number Diff line change
Expand Up @@ -1079,7 +1079,7 @@
]
},
"OnChainAIv1": {
"address": "0x93EB497b305D2cC4Fa3AC62009258EaE951043dB",
"address": "0xBf196B3732880a51Eaa6Cfc38d82De1A61582B06",
"abi": [
{
"type": "constructor",
Expand Down Expand Up @@ -1618,7 +1618,7 @@
]
},
"OnChainAIv1": {
"address": "0x9ee2948E17b4C25434c7D0D252E71201A2D87B05",
"address": "0x432beBA9B2Fc71180FF9ba3fA93E1Ae88beDF402",
"abi": [
{
"type": "constructor",
Expand Down Expand Up @@ -2117,4 +2117,4 @@
]
}
}
}
}
9 changes: 2 additions & 7 deletions svelte5/src/lib/onchain-ai/components/Chat.svelte
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<script lang="ts">
import Explorer from "./Explorer.svelte";
import Events from "$lib/onchain-ai/components/Events.svelte";
import { createInteractions } from "$lib/onchain-ai/runes/events.svelte";
import { createDarkMode } from "$lib/runes/darkMode.svelte.js";
import type { InteractionType } from "../types";
const { isDarkMode } = $derived.by(createDarkMode());
const bgBlue = $derived(isDarkMode ? "dark:bg-blue-800" : "bg-blue-100");
Expand All @@ -11,7 +10,7 @@
let { refresh = 0 }: { refresh: number } = $props();
let interactions: InteractionType[] = $state([]);
const { interactions } = $derived.by(createInteractions);
let interactionsCount = $derived(interactions.length);
</script>

Expand Down Expand Up @@ -40,10 +39,6 @@
</div>
{/if}

<div class="max-w-4xl">
<Events {refresh} bind:interactions />
</div>

<style>
.loader {
display: inline-block;
Expand Down
Loading

0 comments on commit 59242dc

Please sign in to comment.