diff --git a/foundry/addresses.json b/foundry/addresses.json
index 6898a36..c26ab1f 100644
--- a/foundry/addresses.json
+++ b/foundry/addresses.json
@@ -2,7 +2,7 @@
"11155420": {
"Counter": "0x8354Ef7b78012151c276f51F8d19147FF8C47288",
"OnChainAI": "0xd1ca741de2d2975822ADf4646Cf0A8AE3Df51c78",
- "OnChainAIv1": "0xa043949B6984D8704501EC64519E2b6e00a4329A",
+ "OnChainAIv1": "0x879ae6BC9a6173A14111FE204ec0E14DCB619e9E",
"chainName": "optimism-sepolia"
},
"31337": {
@@ -13,7 +13,7 @@
},
"8453": {
"OnChainAI": "0xd798E6E526d7893e4F7aCED9F56DF69643bCf1B6",
- "OnChainAIv1": "0x1F4666E268Ec7F1Fc46C467A8CdAF6b01f88B935",
+ "OnChainAIv1": "0x5095f726C40D0AE7360c6307B7cE57620ae8594c",
"chainName": "base"
},
"84532": {
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 1ca2792..1c6ca93 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -156,8 +156,8 @@ importers:
specifier: ^2.46.0
version: 2.46.0(eslint@9.14.0(jiti@2.4.0))(svelte@5.1.9)(ts-node@10.9.2(@types/node@22.8.7)(typescript@5.6.3))
globals:
- specifier: ^15.11.0
- version: 15.11.0
+ specifier: ^15.12.0
+ version: 15.12.0
postcss:
specifier: ^8.4.47
version: 8.4.47
@@ -3820,8 +3820,8 @@ packages:
resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==}
engines: {node: '>=18'}
- globals@15.11.0:
- resolution: {integrity: sha512-yeyNSjdbyVaWurlwCpcA6XNBrHTMIeDdj0/hnvX/OLJ9ekOXYbLsLinH/MucQyGvNnXhidTdNhTtJaffL2sMfw==}
+ globals@15.12.0:
+ resolution: {integrity: sha512-1+gLErljJFhbOVyaetcwJiJ4+eLe45S2E7P5UiZ9xGfeq3ATQf5DOv9G7MH3gGbKQLkzmNh2DxfZwLdw+j6oTQ==}
engines: {node: '>=18'}
globalyzer@0.1.0:
@@ -11730,7 +11730,7 @@ snapshots:
globals@14.0.0: {}
- globals@15.11.0: {}
+ globals@15.12.0: {}
globalyzer@0.1.0: {}
diff --git a/svelte5/package.json b/svelte5/package.json
index fb4b3a1..3a98ec8 100644
--- a/svelte5/package.json
+++ b/svelte5/package.json
@@ -29,7 +29,7 @@
"eslint": "^9.14.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-svelte": "^2.46.0",
- "globals": "^15.11.0",
+ "globals": "^15.12.0",
"postcss": "^8.4.47",
"postcss-load-config": "^6.0.1",
"prettier": "^3.3.3",
diff --git a/svelte5/src/lib/deployments.json b/svelte5/src/lib/deployments.json
index e707879..4107238 100644
--- a/svelte5/src/lib/deployments.json
+++ b/svelte5/src/lib/deployments.json
@@ -1,7 +1,7 @@
{
"8453": {
"OnChainAIv1": {
- "address": "0x1F4666E268Ec7F1Fc46C467A8CdAF6b01f88B935",
+ "address": "0x5095f726C40D0AE7360c6307B7cE57620ae8594c",
"abi": [
{
"type": "constructor",
@@ -1495,7 +1495,7 @@
]
},
"OnChainAIv1": {
- "address": "0xa043949B6984D8704501EC64519E2b6e00a4329A",
+ "address": "0x879ae6BC9a6173A14111FE204ec0E14DCB619e9E",
"abi": [
{
"type": "constructor",
diff --git a/svelte5/src/lib/onchain-ai/components/Chat.svelte b/svelte5/src/lib/onchain-ai/components/Chat.svelte
index 63bff3f..2a7f91a 100644
--- a/svelte5/src/lib/onchain-ai/components/Chat.svelte
+++ b/svelte5/src/lib/onchain-ai/components/Chat.svelte
@@ -49,5 +49,3 @@
{interactionsCount}/{interactionsMax}
-
-
diff --git a/svelte5/src/lib/onchain-ai/runes/contract.svelte.ts b/svelte5/src/lib/onchain-ai/runes/contract.svelte.ts
index d710f58..0b25217 100644
--- a/svelte5/src/lib/onchain-ai/runes/contract.svelte.ts
+++ b/svelte5/src/lib/onchain-ai/runes/contract.svelte.ts
@@ -14,7 +14,7 @@ const createOnchainAI = () => {
const config = $derived(readConfig(chainId));
// $inspect("createOnchainAI chainId", chainId)
-
+
return {
get client() {
return client;
diff --git a/svelte5/src/lib/onchain-ai/runes/lastInteraction.svelte.ts b/svelte5/src/lib/onchain-ai/runes/lastInteraction.svelte.ts
index b025085..aa5fc4d 100644
--- a/svelte5/src/lib/onchain-ai/runes/lastInteraction.svelte.ts
+++ b/svelte5/src/lib/onchain-ai/runes/lastInteraction.svelte.ts
@@ -8,7 +8,7 @@ const createLastInteraction = (account: Address) => {
$effect(() => {
blockNumber;
fetch && fetch();
- })
+ });
const { data: interactionTuple, fetch } = $derived.by(() => {
if (!account) return { data: null, fetch: null };
@@ -16,18 +16,17 @@ const createLastInteraction = (account: Address) => {
return createReadOnchainAI({ functionName: "lastInteraction", args: [account] });
});
-
const lastInteraction = $derived.by(() => {
if (!interactionTuple) return null;
-
const [requestId, sender, prompt, response] = interactionTuple as InteractionTypeTuple;
return { requestId, sender, prompt, response };
-
}) as InteractionType | null;
return {
- get lastInteraction() { return lastInteraction; }
+ get lastInteraction() {
+ return lastInteraction;
+ }
};
};
diff --git a/svelte5/src/lib/onchain-ai/ts/types.ts b/svelte5/src/lib/onchain-ai/ts/types.ts
index 31bd61b..cc8de91 100644
--- a/svelte5/src/lib/onchain-ai/ts/types.ts
+++ b/svelte5/src/lib/onchain-ai/ts/types.ts
@@ -1,12 +1,12 @@
import type { Address, Log } from "viem";
-type InteractionTypeTuple = [string, Address, string, string]
+type InteractionTypeTuple = [string, Address, string, string];
type InteractionType = {
- requestId: string,
- sender: Address,
- prompt: string,
- response: string,
- isResponse?: boolean
+ requestId: string;
+ sender: Address;
+ prompt: string;
+ response: string;
+ isResponse?: boolean;
};
type InteractionLogWithArgs = Log & { args: InteractionType; index: number };
diff --git a/svelte5/src/lib/scaffold.config.ts b/svelte5/src/lib/scaffold.config.ts
index 1a475c5..1dd627b 100644
--- a/svelte5/src/lib/scaffold.config.ts
+++ b/svelte5/src/lib/scaffold.config.ts
@@ -17,7 +17,7 @@ const { PUBLIC_ALCHEMY_API_KEY, PUBLIC_WALLET_CONNECT_PROJECT_ID } = env as {
const scaffoldConfig = {
// The networks on which your DApp is live
- targetNetworks: [chains.baseSepolia, chains.anvil, chains.optimismSepolia, chains.base],
+ targetNetworks: [chains.base, chains.baseSepolia, chains.optimismSepolia, chains.anvil],
// The interval at which your front-end polls the RPC servers for new data
// it has no effect if you only target the local network (default is 4000)
diff --git a/svelte5/src/lib/wagmi/runes/blocks.svelte.ts b/svelte5/src/lib/wagmi/runes/blocks.svelte.ts
index 28129f6..e2e1fde 100644
--- a/svelte5/src/lib/wagmi/runes/blocks.svelte.ts
+++ b/svelte5/src/lib/wagmi/runes/blocks.svelte.ts
@@ -3,7 +3,7 @@ import { createConfig } from "./config.svelte";
import { createTargetNetworkId } from "$lib/scaffold-eth/runes/global.svelte";
const createBlockNumber = (params?: { chainId?: number; watch?: boolean }) => {
- let { chainId, watch } = params || {}
+ let { chainId, watch } = params || {};
watch ??= true;
const config = $derived.by(createConfig());
@@ -20,7 +20,7 @@ const createBlockNumber = (params?: { chainId?: number; watch?: boolean }) => {
};
fetch();
- let unwatch = (): void => { };
+ let unwatch = (): void => {};
$effect(() => {
unwatch();
unwatch = watchBlockNumber(config, {
diff --git a/svelte5/src/lib/wagmi/runes/read.svelte.ts b/svelte5/src/lib/wagmi/runes/read.svelte.ts
index 981b0f7..25576ad 100644
--- a/svelte5/src/lib/wagmi/runes/read.svelte.ts
+++ b/svelte5/src/lib/wagmi/runes/read.svelte.ts
@@ -1,6 +1,6 @@
import type { Abi, AbiFunction, AbiParameter } from "abitype";
import type { Address } from "viem";
-import { type ReadContractReturnType, readContract } from "@wagmi/core";
+import { type ReadContractReturnType, readContract, deepEqual } from "@wagmi/core";
import { createConfig } from "$lib/wagmi/runes";
const createReadContract = ({
@@ -37,8 +37,7 @@ const createReadContract = ({
try {
const newData = await readContract(config, { address, abi, functionName, args });
- if (JSON.stringify($state.snapshot(data)) == JSON.stringify(newData)) return;
- data = newData;
+ if (!deepEqual($state.snapshot(data), newData)) data = newData;
} catch (e: unknown) {
console.error("createReadContract ERROR", e);
}
diff --git a/svelte5/src/routes/tests/+page.svelte b/svelte5/src/routes/tests/+page.svelte
index 3397ea6..f12994d 100644
--- a/svelte5/src/routes/tests/+page.svelte
+++ b/svelte5/src/routes/tests/+page.svelte
@@ -2,7 +2,6 @@
Tests