Categories
DeFi javascript web3js

Reading Chainlink price oracles from JavaScript

A common problem you may face in Ethereum programming is getting a price feed of digital currencies. Chainlink is an oracle platform that is used by many DeFi projects and incentives actors to publish on-chain several information like prices of tokens or price of Ether. in this tutorial we’ll learn how you can retrieve the […]

Categories
ABI data analytics erc20 javascript web3js

How to decode event logs in Javascript using abi-decoder

In this tutorial we’ll see how to decode and make sense of event logs generated by Ethereum transactions. This tutorial will guide you on getting a transaction receipt and getting the data related to one event in their original types using the abi-decoder library. For this tutorial you’ll need : the ABI of the smart […]

Categories
Arbitrage Bot DeFi DEX erc20 javascript web3js

Swap tokens with 1inch Exchange in JavaScript: DEX and Arbitrage part 2

For this tutorial will see how to execute a trade using 1inch DEX aggregator in Javascript with the web3.js library. At the end of the tutorial, you’ll know how to exchange ERC20 tokens and Ether directly on the Ethereum blockchain. This article is part 2 (part 1 here) of tutorials we started while using the […]

Categories
Getting started javascript web3js

Listening to new transactions happening on the blockchain

A common use case of JavaScript programming with Ethereum is to listen to new blocks mined on the blockchain and looking at the content of the blocks for getting specific informations. This task is often used for example if you’d like to store all the blockhain data in a database or if you’d like to […]

Categories
Getting started javascript web3js

Setup web3js to use the Ethereum blockchain in Javascript

In this tutorial, we’ll see how to get started with Web3JS to interact with the Ethereum blockchain. Web3js can be used both in frontends and backends to read data from the blockchain or make transactions and even deploy smart contracts. The first step is to include web3js in your project. To use it in a […]