Interact with a Solidity Smart Contract Using Ethers and the Contract ABI in SvetleKit

Share this video with your friends

Send Tweet

Now is time to setup the client to talk with the contract, for that you will need to store and access the contract ABI (this is a file generated by the contract compilation) as well as use ethers to set up a connection to the contract.

Once set up is complete, we will listen to any tip events that come in from the contract and display tip information in the application.

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.

~ 2 years ago

I updated this for my rewards project. There are not many examples using Svelte my prefered client. For days I have been debugging to have the transcation render the "reward" it records the transaction, but does not update the table I have tried everything. It loads the account and I may send transactions from multiple accounts, but never does it render the data?