Created
October 20, 2021 04:03
-
-
Save andreiashu/fc12e3900cf79b55bb2a9db9cfcd8041 to your computer and use it in GitHub Desktop.
Load ethers in browser console
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// paste this in your browser's console | |
(function() { | |
_loadScript = function(path){ var script= document.createElement('script'); script.type= 'text/javascript'; script.src= path; document.head.appendChild(script); } | |
_loadScript('https://cdn.jsdelivr.net/npm/ethers@5.5.0/dist/ethers.umd.js'); | |
// @TODO: this can fail on slow connections; should have a retry mechanism | |
setTimeout(() => { | |
console.log(`Loaded ethersjs version: ${ethers.version}`); | |
}, 1500); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment