dev-protocol / dev-protocol/dev-elements

[FEATURE] <dev-stake-on>

Open
#119 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
TypeScript
Stars
7
Forks
1
PR merge metrics
No merged PRs in 30d

Description

Detailed description

This issue doesn't have a more in-depth spec, it just suggests a feature.


By declaring HTML as follows, the button which is the default slot element is displayed. Clicking that button will bring up a modal dialog with tier slots as child elements and start the staking flow.

<dev-stake-on connection="CONNECTION_ID" destination="0x..." network="NETWORK_NAME">
    <section slot="tier" amount="100">This is the 1st tier</section>
    <section slot="tier" amount="200">This is the 2nd tier</section>
    <section slot="tier" amount="300">This is the 3rd tier</section>
    <button>Please stake on me</button>
</dev-stake-on>
Options
  • *connection: the id of dev-connection element #126
  • *destination: the address of the staking destination
  • *network: the network name
Context

You can easily build such paywalls by using this combined with <dev-when-staked> #118 .

Screenshot 2022-04-14 at 10-04-40 20220406

Possible implementation

No response

Additional information

No response

Code of Conduct
  • I agree to follow this project's Code of Conduct

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the existing element referenced by issue #126 and the component in issue #118. Define the staking modal, tier-slot behavior, and supported options before implementation; done means the declared element renders its default button and completes the described staking flow.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.