{"id":18841490,"url":"https://github.com/subvisual/svarknet","last_synced_at":"2025-09-15T20:45:35.112Z","repository":{"id":59994498,"uuid":"468849024","full_name":"subvisual/svarknet","owner":"subvisual","description":"A Starknet starter dapp built with Svelte and Vite","archived":false,"fork":false,"pushed_at":"2022-09-23T16:03:20.000Z","size":125,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-03T06:35:55.691Z","etag":null,"topics":["js","starknet","starter","svelte"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/subvisual.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-03-11T17:51:16.000Z","updated_at":"2025-04-10T17:04:45.000Z","dependencies_parsed_at":"2022-09-23T17:22:51.847Z","dependency_job_id":null,"html_url":"https://github.com/subvisual/svarknet","commit_stats":null,"previous_names":["subvisual/svarknet","finiam/svarknet"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/subvisual/svarknet","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/subvisual%2Fsvarknet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/subvisual%2Fsvarknet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/subvisual%2Fsvarknet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/subvisual%2Fsvarknet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/subvisual","download_url":"https://codeload.github.com/subvisual/svarknet/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/subvisual%2Fsvarknet/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275320017,"owners_count":25443827,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-15T02:00:09.272Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["js","starknet","starter","svelte"],"created_at":"2024-11-08T02:51:32.384Z","updated_at":"2025-09-15T20:45:35.049Z","avatar_url":"https://github.com/subvisual.png","language":"TypeScript","readme":"# Svarknet\n\nA Starknet starter dapp built with Svelte and Vite\n\nDeployed at [svarknet.netlify.app](https://svarknet.netlify.app/).\nIt uses [this ERC20 contract](https://goerli.voyager.online/contract/0x07394cbe418daa16e42b87ba67372d4ab4a5df0b05c6e554d158458ce245bc10).\n\n## Getting started\n\nJust run `yarn` to install dependencies, and `yarn dev` to run the app, on `http://localhost:5173`.\n\n## Using stores\n\nThis starter contains several stores that help you interact with Starknet.\n\nAn example is the `connectStore`:\n\n```svelte\n{#if $connectStore.idle}\n  \u003cbutton\n    type=\"button\"\n    on:click={() =\u003e connectStore.connectWallet()}\n  \u003e\n    Connect wallet\n  \u003c/button\u003e\n{:else if $connectStore.loading}\n  \u003cp\u003eConnecting wallet...\u003c/p\u003e\n{/if}\n```\n\nYou can also create a contract instance store, and provide a name. The instance will be kept in a store, and can be accessed from anywhere in the app.\n\n```svelte\n// App.svelte\n\u003cscript lang=\"ts\"\u003e\n  contractStore(\"testERC20\", {\n      contractAddress: CONTRACT_ADDRESS,\n      abi: ERC20,\n      providerOrAccount: $accountStore.account,\n  });\n\u003c/script\u003e\n\n//MintForm.svelte\n\u003cscript lang=\"ts\"\u003e\n  const contract = $contractsStore.testERC20;\n\n  $contract.mint($account.address, 1)\n\u003c/script\u003e\n```\n\nIn the same way, you can track the balance of a given token. It will also get added to a store, so you can interact with it elsewhere.\n\n```svelte\n// Component A\n\u003cscript lang=\"ts\"\u003e\n  let bal = balance(\"testERC20\", {\n    contract: $contractsStore.testERC20,\n  });\n\u003c/script\u003e\n\n\u003cdiv\u003e\n  {#if $bal.loading}\n    \u003cp\u003eLoading balance...\u003c/p\u003e\n  {/if}\n  {#if $bal.success}\n    ERC20 Balance: {$bal.balance}\n  {/if}\n\u003c/div\u003e\n\n// Component B\n\u003cscript lang=\"ts\"\u003e\n  function refreshBalance() {\n    $balancesStore.testERC20.getBalance();\n  }\n\u003c/script\u003e\n```\n\nYou can use the `transactionHandler` to track the status of a transaction. It creates a store with reactive values for `pending`, `success`, etc.\n\n```svelte\n\u003cscript lang=\"ts\"\u003e\n  const tx = transactionHandler();\n  const contract = $contractsStore.testERC20;\n\n  async function mint() {\n    await tx.waitFor(() =\u003e\n      $contract.mint($account.address, 1)\n    );\n  }\n\u003c/script\u003e\n\n\u003cdiv\u003e\n  {#if $tx.pending}\n    \u003cp\u003ePending...\u003c/p\u003e\n  {:else if $tx.error}\n    \u003cp\u003eSomething went wrong!\u003c/p\u003e\n  {:else if $tx.success}\n    \u003cp\u003eSuccess!\u003c/p\u003e\n  {/if}\n\u003c/div\u003e\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsubvisual%2Fsvarknet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsubvisual%2Fsvarknet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsubvisual%2Fsvarknet/lists"}