const erc20Contracts = [
{ address: '0xdac17f958d2ee523a2206206994597c13d831ec7', name:'Tether USD' , ticker:'USDT'}
];
for (let token of erc20Contracts) {
const contract = new web3.eth.Contract(erc20AbiJson, token.address);
const tokenBalance = await contract.methods.balanceOf(myAddress).call();
console.log(token.name+': '+ web3.utils.fromWei(tokenBalance));
}
function getJSONP (script_url, callback) {
// Создаём веб-воркер, который импортирует нам скрипт с коллбэком(jsonp)
const worker = new Worker(window.URL.createObjectURL(new Blob([
'let cb=function(val){postMessage(val)};' +
'importScripts(\'' + script_url + '&callback=cb\');'],
{ type: 'text/javascript' }
)))
// Слушаем ответ от воркера
worker.onmessage = (e) => {
worker.terminate()
callback(e.data)
}
// Убиваем воркер если долго нет ответа
setTimeout(() => { worker.terminate() },10000)
}
fd.append("voice", audioBlob, "recordedfilename.wav");
var blockContentTextHeight = blockPictHeight - (blockContentDescHeight + blockContentSubtextHeight)
$('.block-content-text').height( blockContentTextHeight );
var blockContentTextHeight = $('.block-content-text').height(blockPictHeight - (blockContentDescHeight + blockContentSubtextHeight) ).height();
console.log(typeof blockContentTextHeight);