aboutsummaryrefslogtreecommitdiff
path: root/slides/pws/script.js
diff options
context:
space:
mode:
Diffstat (limited to 'slides/pws/script.js')
-rw-r--r--slides/pws/script.js10
1 files changed, 7 insertions, 3 deletions
diff --git a/slides/pws/script.js b/slides/pws/script.js
index 3f95d00..e044cd7 100644
--- a/slides/pws/script.js
+++ b/slides/pws/script.js
@@ -1,15 +1,18 @@
-const web3 = new Web3(new Web3.providers.HttpProvider('http://95.85.1.235:8545'));
+const web3 = new Web3(new Web3.providers.HttpProvider('http://80.61.192.39:8545'));
Reveal.initialize({
history: true,
backgroundTransition: 'slide'
})
-function addToSlide(data, isHeader) {
+function addToSlide(data, isHeader, isToRobot) {
const pre = document.createElement('pre');
if (isHeader) {
pre.classList.add('header');
}
+ if (isToRobot) {
+ pre.classList.add('robot');
+ }
pre.textContent = data;
document.querySelector('#blockchain').appendChild(pre);
@@ -39,6 +42,7 @@ filter.watch((err, blockHash) => {
}
const humanReadableValue = web3.fromWei(transaction.value, 'ether').toString();
- addToSlide(`${compactStr(transaction.from)} -> ${humanReadableValue} ETHER -> ${compactStr(transaction.to)}`);
+ const isToRobot = transaction.to === '0x5bcd404e6b96dfd033bd362d0f947753d5fb1f57'
+ addToSlide(`${compactStr(transaction.from)} -> ${humanReadableValue} ETHER -> ${compactStr(transaction.to)}`, false, isToRobot);
});
});