web-examples
web-examples copied to clipboard
feat: added tezos-provider dapp example
Added an example of dApp for Tezos based on TezosProvider.
It supports the following operations:
- get accounts
- sign message
- transaction
- delegation, undelegation
- origination
- contract call
- stake, unstake, finalize unstake
- increase paid storage
Currently, TezosProvider is library by trilitech: https://github.com/trilitech/tezos-provider
To run dApp:
cd dapps/universal-provider-tezos
yarn install
yarn build
yarn dev
Then open http://localhost:5173/
TezosProvider allows to connect only one network at a time.
Now connect a wallet, e.g. advanced/wallets/react-wallet-v2, react-wallet-v2. It was updated in #694 to allow one network.
| Before connection | Connected |
|---|---|
Operations
| Type | Screenshot |
|---|---|
| Get accounts | |
| Sign | |
| Send transaction | |
| Delegation | |
| Origination | |
| Contract call | |
| Stake | |
| Unstake | |
| Finalize unstake | |
| Error handling, e.g. if delegated twice |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| vue-web-examples | ⬜️ Ignored (Inspect) | Visit Preview | Jan 6, 2025 1:30pm |
@dianasavvatina is attempting to deploy a commit to the WalletConnect Team on Vercel.
A member of the Team first needs to authorize it.
hi @dianasavvatina, can you guide me on how to test it ?
trust: only mainnet. temple wallet: didn't work kukai sallet: didn't work
also would you like using the same pattern as other examples for the directory ?
universal-provider-tezos
hi @dianasavvatina, can you guide me on how to test it ?
trust: only mainnet. temple wallet: didn't work kukai sallet: didn't work
also would you like using the same pattern as other examples for the directory ?
universal-provider-tezos
Tezos blockchain is supported by several wallets but only one of them currently supports WalletConnect. It's Trust and it has a partial support for WalletConnect.
I'm working now on Umami web to support WalletConnect: https://github.com/trilitech/umami-v2/pull/2029 It's under review. I used Wallet provided by the WalletConnect to test the dapp example built with TezosProvider:
- wallet: https://github.com/reown-com/web-examples/pull/694
- dapp: https://github.com/reown-com/web-examples/pull/697
- Umami web PR: https://github.com/trilitech/umami-v2/pull/2029
I can move the dapp to universal-provider-tezos if needed
hi @dianasavvatina, can you guide me on how to test it ? trust: only mainnet. temple wallet: didn't work kukai wallet: didn't work
@rtomas , please use Umami for testing: https://umami-v2-web.vercel.app/
I think that Trust works with mainnet only. The problem is that the example wallet supports tezos:testnet as a test network though it's a bug:
https://github.com/reown-com/web-examples/blob/main/advanced/wallets/react-wallet-v2/src/data/TezosData.ts#L31
export const TEZOS_TEST_CHAINS: Record<string, ChainMetadata> = {
'tezos:testnet': {
chainId: 'testnet',
name: 'Tezos Testnet',
logo: '/chain-logos/tezos.svg',
rgb: '44, 125, 247',
rpc: 'https://ghostnet.ecadinfra.com',
namespace: 'tezos'
}
}
But Tezos has ghostnet as a testnet. See here: https://docs.reown.com/cloud/chains/chain-list
I fixed the wallet in https://github.com/reown-com/web-examples/pull/694
It's not merged yet but it will be compatible with the reference docs.
See also CAIP-2 for Tezos, here
I can move the dapp to universal-provider-tezos if needed
please, move it to that directory.
Example: https://github.com/user-attachments/assets/5fee89dd-dc11-48a9-a6cc-1e000e4e28f8
dApp: this PR
wallet: Umami v2, web, PR#2029 This adaptation is incomplete. Umami doesn't support
- increase paid storage
- sign
- get accounts
@rtomas as you requested: Second example: https://github.com/user-attachments/assets/25a8a03f-6c51-40d3-b7af-d604a845d9d0
dApp - this PR
wallet - PR#694 it's also waiting for your review
@rtomas please use Umami web for testing: https://umami-v2-web.vercel.app/