Skip to content

Instantly share code, notes, and snippets.

Unmixable inputs / MixIn count is too big

I can't send a transaction, what's going on?

When you receive a transaction, the amount is split into thousands, hundreds, tens, ones, etc. So if you are sent 1234 TRTL, this is stored as 1000, 200, 30, 40 in your wallet.

When you want to send a transaction, regardless of how much you are sending, you have to use these stored amounts. If we wanted to send 10 TRTL, and you only have a 1000 TRTL input, you have to use this.

Ok, but how does this relate to my transactions failing?

@gakonst
gakonst / EventTest.js
Last active August 21, 2018 19:21
Examples of event logging in web3.js. Take note that when used with testrpc/ganache, there are various bugs where events don't get fired or get fired twice. More here: https://github.com/trufflesuite/ganache-cli/issues/338. I also prefer using async/await instead of callbacks.
pragma solidity ^0.4.18;
contract EventTest {
event LogEventTest(uint _x);
event LogOtherEventTest(address indexed _sender);
function emitEvent(uint x) public {
LogEventTest(x);
}
@remarkablemark
remarkablemark / draggable-example.js
Created December 17, 2016 04:13
Basic draggable example using vanilla JavaScript.
'use strict';
/**
* Makes an element draggable.
*
* @param {HTMLElement} element - The element.
*/
function draggable(element) {
var isMouseDown = false;
@jbergler
jbergler / .gitignore
Last active April 9, 2024 19:49
Acestream on Mac
.vagrant