¿ Cuál es el problema de este simple html
// código ?JavaScript
ethreumjs
web3.js
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>EthereumJS - Browser Example</title>
</head>
<body>
<script src="https://rawgit.com/ethereumjs/browser-builds/master/dist/ethereumjs-abi/ethereumjs-abi-0.6.5.js"></script>
<script src="https://rawgit.com/ethereum/web3.js/develop/dist/web3.js"></script>
<script src="https://cdn.jsdelivr.net/gh/ethereum/web3.js/dist/web3.min.js"></script>
<script>
var abi = new ethereumjs.ABI()
var Web3
web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:8545"));
</script>
</body>
</html>
Cuando ejecuto este código, recibo el siguiente error en Console
este browser
código line 17
(es decir web3 = new Web3(new Web3.providers...
):
TypeError no detectado: no se puede leer la propiedad 'proveedores' de undefined en test.html:17
Nota: tenga en cuenta que no puedo usar Web3 = require("web3")
porque recibo el siguiente error:
Uncaught ReferenceError: require is not defined
Nota: Tenga en cuenta que no puedo usar Web3 = require("web3") , porque recibo el siguiente error:
Según la documentación para incluir web3
como módulo de navegador (que ya está haciendo para el código ABI):
<script src="https://cdn.jsdelivr.net/gh/ethereum/web3.js/dist/web3.min.js"></script>
Preguntador