Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/nikitaeverywhere/ethereum-delegated-tx-widget

Embeddable widget which performs Ethereum delegated transactions with particular setup, as well as it works as a stand-alone page.
https://github.com/nikitaeverywhere/ethereum-delegated-tx-widget

delegated-transactions ethereum ethereum-delegated-transactions ethereum-meta-transactions front-end javascript signature transfer widget

Last synced: 2 months ago
JSON representation

Embeddable widget which performs Ethereum delegated transactions with particular setup, as well as it works as a stand-alone page.

Awesome Lists containing this project

README

        

# Ethereum Delegated Transactions Widget

[![Actions Status](https://github.com/zitros/ethereum-delegated-tx-widget/workflows/Lint%20and%20Test/badge.svg)](https://github.com/zitros/ethereum-delegated-tx-widget/actions)

Elegant Ethereum delegated transactions implementation.

Primarily, delegated transactions, or meta transactions allow users to pay fee in tokens instead of Ether, making crypto user experience great again. This widget is shipped with the [back end](https://github.com/ZitRos/ethereum-delegated-tx-service), which can be used for any token or smart contract supporting doing-something-via-signature.

+ Highly customizable widget and a stand-alone page
+ Can work **with any token** which supports function delegation (but you have to set up a back end for it)
+ Helpful hints, which allow to quickly onboard inexperienced users
+ Signature standard-free paradigm (use any signature your contract supports, e.g. `eth_personalSign`, `eth_signTypedData`)
+ Automatically picks an icon of your token (from Trust Wallet repository)



→ CHECK THE DEMO HERE! ←


screenshot


Need test tokens? Use this widget via this link
and
mint some test tokens in Kovan network
by calling mintTokens function (mints 10 tokens to a calling account).
Need some Ether in Kovan? Find any faucet that can give you some.

Embedding
---------

```html

```

**Widget Customization**:

URL Parameter
Default
Example
Description

fixed
false
true
Disable all inputs

contractAddress
0x82f4ded..fc16587
0x1234..cdef
Smart contract address (usually token address) which is supported by at least one back end

functionName
transfer
approveAndCall
Smart contract function name which is supported by at least one back end

functionArguments
0x17A8..a29D,1000000
0x1aa4..cdaf,20000000
Comma-separated arguments of the function (in this example, transfer("0x1aa4..cdaf", 20000000)).

customBackEnds

my-website.com/api/kovan,my-website.com/api/mainnet
Custom delegated transactions back end APIs list (see ethereum-delegated-tx-service). Otherwise, pre-defined back ends are used.

successRedirectUrl

my-website.com/handle-redirect
URL the user is redirected to once the transaction is mined.

Development
-----------

To start development server, run the following:

```bash
npm install
npm run start
```

To build and deploy the project to GitHub (access is restricted), run

```bash
npm run deploy
```