UNPKG

token-price-oracles

Version:

tools for creating token price data feeds and oracles that integrate with on-chain dex's

12 lines (10 loc) 225 B
module.exports = function uintToBytes32(num) { const hexString = num.toString(16) return padToBytes32(hexString) } function padToBytes32(n) { while (n.length < 64) { n = "0" + n; } return "0x" + n; }