ce1609726f
* Start removing duplicated functionality (v1 inside v2) * Update compilation targets * Update locks * Fix js-old build * Update with removed extra references * Adapt dev.{parity,web3}.html for extra debug info * Update dependencies * Remove Tooltips * Update dependencies * Only inject window.ethereum once * Fix versions to 2.0.x for @parity libraries * Update to @parity/api 2.1.x * Update for @parity/api 2.1.x * Freeze signer plugin dependency hashes * Fix lint * Move local account handling from API * Update for 2.2.x @parity/{shared,ui} * Update API references for middleware * Install updated dependencies * Update for build * Always do local builds for development * Remove unused hasAccounts property * Fix Windows build for js-old * Adjust inclusing rules to be Windows friendly * Explicitly add --config option to webpack * Add process.env.EMBED flag for Windows compatability * Revert embed flag * Fix build * Merge changes from beta * Update packages after merge * Update Accounts from beta * Update with beta * Remove upgrade check * Fix CI build script execution * Make rm -rf commands cross-platform * Remove ability to deploy wallets (only watch) * Update path references for js-old (Windows) * Render local dapps first * Cleanup dependencies
47 lines
1.5 KiB
HTML
47 lines
1.5 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
<link rel="icon" href="/parity-logo-black-no-text.png" type="image/png">
|
|
<title>dev::Web3</title>
|
|
<style>
|
|
.box {
|
|
font-size: 1.5em;
|
|
text-align: center;
|
|
border-radius: 0.5em;
|
|
background: #eee;
|
|
padding: 1em;
|
|
margin: 1em;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="box">
|
|
best block #<span id="blockNumber">unknown</span>
|
|
</div>
|
|
<script src="/parity-utils/inject.js"></script>
|
|
<script src="https://rawgit.com/ethereum/web3.js/develop/dist/web3.min.js"></script>
|
|
<script>
|
|
console.log('window.ethereum', window.ethereum);
|
|
console.log('window.ethereum.isParity', window.ethereum.isParity);
|
|
console.log('window.web3.currentProvider', window.web3.currentProvider, window.web3.currentProvider.send, window.web3.currentProvider.sendAsync);
|
|
console.log('window.web3.currentProvider.isParity', window.web3.currentProvider.isParity);
|
|
|
|
const web3 = new Web3(window.web3.currentProvider);
|
|
|
|
window.setInterval(function () {
|
|
web3.eth.getBlockNumber(function (error, blockNumber) {
|
|
if (error) {
|
|
console.error('error', error);
|
|
return;
|
|
}
|
|
|
|
document.getElementById('blockNumber').innerHTML = blockNumber;
|
|
});
|
|
}, 1000);
|
|
</script>
|
|
</body>
|
|
</html>
|