Course lesson
Create a Form in Svelte and Send a Tip to an Solidity Smart Contract
It is time to interact with the contract, let's send some eth!
- Duration
- 3 min
- Access
- Pro
- Transcript
- Available
It is time to interact with the contract, let's send some eth!
For this you'll need a form that is rendered only when the wallet is connected.
This form use the sendTip function and gather some required information. On submit, it will read the sendingTip loading state variable and disable or enable the button.
Important
SvelteKit is still in beta. Expect bugs! Read more here, and track progress towards 1.0 here.
This lesson was recorded before the latest breaking changes, the content is still valid but it sometimes references a file that does not exists anymore.
Now:
src/routes/index.svelte is called src/routes/+page.svelte
src/routes/__layout.svelte is called src/routes/+layout.svelte
Everything else is 100% valid. This particular content will be updated when Sveltekit reaches 1.0.0 stable.