How to use the augur-abi.hex function in augur-abi

To help you get started, we’ve selected a few augur-abi examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github AugurProject / augur.js / test / reporting / makeReports.js View on Github external
it(JSON.stringify(t), function () {
            var localHash = makeReports.makeHash(t.salt, t.report, t.event, t.from, t.isScalar, t.isIndeterminate);
            if (t.expected) {
                assert.strictEqual(localHash, t.expected);
            } else {
                assert.strictEqual(localHash, augur.MakeReports.makeHash(abi.hex(t.salt), abi.hex(t.report), t.event, t.from));
            }
        });
    };
github AugurProject / augur.js / test / integration / reporting / makeReports.js View on Github external
it(JSON.stringify(t), function () {
      var localHash = makeReports.makeHash(t.salt, t.report, t.event, t.from, t.isScalar, t.isIndeterminate);
      assert.strictEqual(localHash, augur.MakeReports.makeHash(abi.hex(t.salt), abi.hex(t.report), t.event, t.from));
    });
  };
github AugurProject / augur.js / src / modules / abacus.js View on Github external
sumTrades: function (trade_ids) {
    var i, numTrades, trades = new BigNumber(0);
    for (i = 0, numTrades = trade_ids.length; i < numTrades; ++i) {
      trades = abi.wrap(trades.plus(abi.bignum(trade_ids[i], null, true)));
    }
    return abi.hex(trades, true);
  },
github AugurProject / augur.js / src / trading / take-order / sum-trades.js View on Github external
function sumTrades(trade_ids) {
  var i, numTrades, trades = new BigNumber(0);
  for (i = 0, numTrades = trade_ids.length; i < numTrades; ++i) {
    trades = abi.wrap(trades.plus(abi.bignum(trade_ids[i], null, true)));
  }
  return abi.hex(trades, true);
}

augur-abi

Contract ABI serialization

MIT
Latest version published 7 years ago

Package Health Score

46 / 100
Full package analysis

Similar packages