How to use the augur-abi.fix 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 / unit / trading / buyAndSellShares.js View on Github external
sell: function (p) {
			assert.deepEqual(JSON.stringify(p), JSON.stringify({
				amount: abi.fix(120, 'hex'),
				price: abi.fix(.35, 'hex'),
				market: '0xa1',
				outcome: '1',
				scalarMinMax: null,
				onSent: noop,
				onSuccess: noop,
				onFailed: noop,
				minimumTradeSize: abi.fix(MINIMUM_TRADE_SIZE, 'hex'),
				isShortAsk: 0,
				tradeGroupID: 0
			}));
			finished();
    }
  });
github AugurProject / augur.js / test / unit / create / createMarket.js View on Github external
assertions: function (tx) {
      assert.deepEqual(JSON.stringify(tx), JSON.stringify({
        branch: '1010101',
        description: 'This is a test event description',
        expDate: parseInt(1500000000, 10),
        minValue: abi.fix('1', "hex"),
        maxValue: abi.fix('50', "hex"),
        numOutcomes: '2',
        resolution: 'https://iknoweverything.com'
      }));
    }
  });
github AugurProject / augur.js / test / unit / trading / buyAndSellShares.js View on Github external
buy: function (p) {
			assert.deepEqual(JSON.stringify(p), JSON.stringify({
				amount: abi.fix(320, 'hex'),
				price: abi.fix(0.85, 'hex'),
				market: '0xa1',
				outcome: '1',
				scalarMinMax: null,
				onSent: noop,
				onSuccess: noop,
				onFailed: noop,
				tradeGroupID: '0x01',
				minimumTradeSize: abi.fix(MINIMUM_TRADE_SIZE, 'hex'),
			}));
			finished();
    },
  });
github AugurProject / augur.js / test / unit / trading / buyAndSellShares.js View on Github external
shortAsk: function (p) {
			assert.deepEqual(JSON.stringify(p), JSON.stringify({
				amount: abi.fix(5, 'hex'),
				price: abi.fix(0.95, 'hex'),
				market: '0xa1',
				outcome: '1',
				scalarMinMax: null,
				tradeGroupID: '0x01',
				onSent: noop,
				onSuccess: noop,
				onFailed: noop,
				minimumTradeSize: abi.fix(MINIMUM_TRADE_SIZE, 'hex'),
			}));
			finished();
    }
  });
github AugurProject / augur.js / test / unit / create / createMarket.js View on Github external
assertions: function (tx) {
      assert.deepEqual(JSON.stringify(tx), JSON.stringify({
        branch: '1010101',
        description: 'This is a test event description',
        expDate: parseInt(1500000000, 10),
        minValue: abi.fix('10', "hex"),
        maxValue: abi.fix('250', "hex"),
        numOutcomes: '2',
        resolution: ''
      }));
    }
  });

augur-abi

Contract ABI serialization

MIT
Latest version published 7 years ago

Package Health Score

46 / 100
Full package analysis

Similar packages