Skip to content

Instantly share code, notes, and snippets.

@timmyers
Last active February 10, 2021 18:29
Show Gist options
  • Save timmyers/0100e93e6e3151a3cae1db2393322391 to your computer and use it in GitHub Desktop.
Save timmyers/0100e93e6e3151a3cae1db2393322391 to your computer and use it in GitHub Desktop.
Infura Pyrmont Example
import axios from 'axios';
const instance = axios.create({
baseURL: 'https://eth2-beacon-pyrmont.infura.io/',
auth: {
username: process.env.INFURA_PROJECT_ID,
password: '',
},
});
(async () => {
const response = await instance.get('/eth/v1/beacon/blocks/head')
console.log(response.data);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment