ilhamm02 / 1inch-easy

This repository is related to the 1inch (https://1inch.exchange) widget to swap ERC-20 tokens.

Home Page:https://okesip.xyz/1inch

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

1inch Easy Widget

How to use

  1. Download the script.js and style.css and then add this above <body> or below </body> (recommended) of your script
<script src="script.js"></script>
  • Jquery Loader (3.5.1 is recommended version)
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.js"></script>
  • Web3
<script src="https://cdn.jsdelivr.net/gh/ethereum/web3.js@1.3.1/dist/web3.min.js"></script>
  1. Add thid css above <body of your script to make 'style' of the widget
<link rel="stylesheet" href="style.css">
  1. In your HTML script add div with id swapInch to show the widget
  2. To show the widget swap, you should using this function (onclick or whatever)
swap(<FROM_TOKEN_ADDRESS>,<TO_TOKEN_ADDRESS>)

Demo

https://okesip.xyz/1inch

About

This repository is related to the 1inch (https://1inch.exchange) widget to swap ERC-20 tokens.

https://okesip.xyz/1inch


Languages

Language:CSS 100.0%