PromiseBox
contract PromiseBox
Source: contracts/util/promiseBox.sol
Index
Reference
Functions
addWord
function addWord(string text) public payable
Save your word to the blockchain.
- Parameters:
text
- string
fallback
function (address treasure_) public
- Parameters:
treasure_
- address
getContractBalance
function getContractBalance() public view returns (uint256)
Returns total balance of Smart Contract.
- Returns:
- uint256
getNickByAddress
function getNickByAddress(address ad) public view returns (string)
Return nickname given the address.
- Parameters:
ad
- address- Returns:
- string
getTotalWords
function getTotalWords() public view returns (uint)
Returns the total number of words saved in the contract.
- Returns:
- uint
getWordById
function getWordById(uint id) public view returns (string, address, uint, bool, bool)
Returns word by a given ID.
- Parameters:
id
- uint- Returns:
- string
- address
- uint
- bool
- bool
resolveWord
function resolveWord(uint id, bool verdict) public
Resolve a word status.
- Parameters:
id
- uintverdict
- bool
setNick
function setNick(string name) public payable
Set a nickname for yourself.
- Parameters:
name
- string
utfStringLength
function utfStringLength(string str) internal pure returns (uint)
- Parameters:
str
- string- Returns:
- uint