Approval
8c5be1e5
inputs | 0 | address | owner | |
1 | address | spender | ||
2 | uint256 | value |
Transfer
ddf252ad
inputs | 0 | address | from | |
1 | address | to | ||
2 | uint256 | value |
UTXORedeemed
2475a9b3
inputs | 0 | bytes32 | txid | |
1 | uint8 | outputIndex | ||
2 | uint256 | satoshis | ||
3 | bytes | proof | ||
4 | bytes | pubKey | ||
5 | uint8 | v | ||
6 | bytes32 | r | ||
7 | bytes32 | s | ||
8 | address | redeemer | ||
9 | uint256 | numberOfTokens |
allowance
dd62ed3e
Function to check the amount of tokens that an owner allowed to a spender.
inputs | 0 | address | _owner | address The address which owns the funds. |
1 | address | _spender | address The address which will spend the funds. | |
outputs | 0 | uint256 |
approve
095ea7b3
Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
inputs | 0 | address | _spender | The address which will spend the funds. |
1 | uint256 | _value | The amount of tokens to be spent. |
balanceOf
70a08231
Gets the balance of the specified address.
inputs | 0 | address | _owner | The address to query the the balance of. |
outputs | 0 | uint256 | balance |
canRedeemUTXO
06f84701
Convenience helper function to check if a UTXO can be redeemed
inputs | 0 | bytes32 | txid | Transaction hash |
1 | bytes20 | originalAddress | Raw Bitcoin address (no base58-check encoding) | |
2 | uint8 | outputIndex | Output index of UTXO | |
3 | uint256 | satoshis | Amount of UTXO in satoshis | |
4 | bytes | proof | Merkle tree proof | |
outputs | 0 | bool |
canRedeemUTXOHash
a2d0f942
Verify that a UTXO with the specified Merkle leaf hash can be redeemed
inputs | 0 | bytes32 | merkleLeafHash | Merkle tree hash of the UTXO to be checked |
1 | bytes | proof | Merkle tree proof | |
outputs | 0 | bool |
decreaseApproval
66188463
inputs | 0 | address | _spender | |
1 | uint256 | _subtractedValue |
ecdsaVerify
ce267b55
Validate that the hash of a provided address was signed by the ECDSA public key associated with the specified Ethereum address
inputs | 0 | address | addr | Address signed |
1 | bytes | pubKey | Uncompressed ECDSA public key claiming to have created this signature | |
2 | uint8 | v | v parameter of ECDSA signature | |
3 | bytes32 | r | r parameter of ECDSA signature | |
4 | bytes32 | s | s parameter of ECDSA signature | |
outputs | 0 | bool |
increaseApproval
d73dd623
approve should be called when allowed[_spender] == 0. To increment allowed value is better to use this function to avoid 2 calls (and wait until the first transaction is mined) From MonolithDAO Token.sol
inputs | 0 | address | _spender | |
1 | uint256 | _addedValue |
maximumRedeemable
08b4312b
multiplier
1b3ed722
pubKeyToBitcoinAddress
e073ef69
Calculate the Bitcoin-style address associated with an ECDSA public key
inputs | 0 | bytes | pubKey | ECDSA public key to convert |
1 | bool | isCompressed | Whether or not the Bitcoin address was generated from a compressed key | |
outputs | 0 | bytes20 |
pubKeyToEthereumAddress
5418796c
Convert an uncompressed ECDSA public key into an Ethereum address
inputs | 0 | bytes | pubKey | Uncompressed ECDSA public key to convert |
outputs | 0 | address |
redeemUTXO
cce2771e
Redeem a UTXO, crediting a proportional amount of tokens (if valid) to the sending address
inputs | 0 | bytes32 | txid | Transaction hash |
1 | uint8 | outputIndex | Output index of the UTXO | |
2 | uint256 | satoshis | Amount of UTXO in satoshis | |
3 | bytes | proof | Merkle tree proof | |
4 | bytes | pubKey | Uncompressed ECDSA public key to which the UTXO was sent | |
5 | bool | isCompressed | Whether the Bitcoin address was generated from a compressed public key | |
6 | uint8 | v | v parameter of ECDSA signature | |
7 | bytes32 | r | r parameter of ECDSA signature | |
8 | bytes32 | s | s parameter of ECDSA signature | |
outputs | 0 | uint256 | tokensRedeemed |
rootUTXOMerkleTreeHash
e6997f6d
totalRedeemed
f35dad40
totalSupply
18160ddd
transfer
a9059cbb
transfer token for a specified address
inputs | 0 | address | _to | The address to transfer to. |
1 | uint256 | _value | The amount to be transferred. |
transferFrom
23b872dd
Transfer tokens from one address to another
inputs | 0 | address | _from | address The address which you want to send tokens from |
1 | address | _to | address The address which you want to transfer to | |
2 | uint256 | _value | uint256 the amount of tokens to be transferred |
validateSignature
af1d06e8
Validate that a provided ECSDA signature was signed by the specified address
inputs | 0 | bytes32 | hash | Hash of signed data |
1 | uint8 | v | v parameter of ECDSA signature | |
2 | bytes32 | r | r parameter of ECDSA signature | |
3 | bytes32 | s | s parameter of ECDSA signature | |
4 | address | expected | Address claiming to have created this signature | |
outputs | 0 | bool |
verifyProof
1858cb5b
Verify a Merkle proof using the UTXO Merkle tree
inputs | 0 | bytes | proof | Generated Merkle tree proof |
1 | bytes32 | merkleLeafHash | Hash asserted to be present in the Merkle tree | |
outputs | 0 | bool |