dapp-bin by ethereum

I badly need this code to work. I'm running it on remix dot ethereum dot org. can someone help me debug it? its been weeks and i still dont have any progress

pragma solidity ^0.4.26;

import "github.com/ethereum/dapp-bin/library/stringUtils.sol";

contract ElectronicHealthRecords {
bool public status;
address public Admin;
address public EHRsManager;
uint public numberOfUsers;
mapping (address=>uint) public userId;
User[] public users;
event UserAdded(address UserPK, string UserRole);
event UserRemoved(address UserPK);
event DataResult(address UserPK);
event ReturnAccessResult(address index_from, string message, bool result, uint time, uint penalty);
//Creating a data structure for storing variables of different data types
struct User {
address user;// from the original code "address userPK"
string role;// from the original code "address userRole"
}
struct EHRstorage {
string storageName;
address AreaID;
string Hash_value;
address PatientID;
}
struct PolicyItem { //for ; {
bool userPK;
bool AreaID;
bool PatientID;
string permission; //verify permission: "allow" or "deny"
bool result; //ReturnAccessResult
bool checkID; //check the access
}
mapping (bytes32=>EHRstorage)
public DTHtable;
mapping (bytes32=>mapping(bytes32=>PolicyItem)) policies; ///mapping(EHRs resource, action) to policy checking
modifier onlyAdmin {
require(msg.sender==Admin);
_;
}
function SC_creation()public {
Admin=msg.sender;
status=true;
User(Admin, 'Creator of Smart Contract');
numberOfUsers=0;
}
function addUser(address userPK, string userRole)
onlyAdmin public {
require(status = true);
uint id = userId[userPK];
if(id==0) {
userId[userPK]=users.length;
id=users.length++;
}
users[id]= User({user:userPK, role:userRole});
emit UserAdded(userPK, userRole);
numberOfUsers++;
}
function removeUser(address userPK){
onlyAdmin; {
require(userId[userPK]!=0);
for (uint i=userId[userPK]; i users[i]=users[i+1];
}
delete users[users.length-1];
users.length--;
emit UserRemoved(userPK);
numberOfUsers--;
}
}
function stringToBytes32(string memory source) returns (bytes32 result){
bytes memory tempEmptyStringTest = bytes(source);
if (tempEmptyStringTest.length == 0) {
return 0x0;
}
assembly {
result := mload(add(source, 32))
}
}
function stringToBytes32Memory(string memory source) returns (bytes result )
{
bytes memory b3 = bytes(source);
return b3;
}
function retrieveEHRs(string stringToBytes32, string retrieve_name, address userPK,string storageName, address AreaID, address PatientID, string Hash_value)
onlyAdminp public{
bytes32 key=stringToBytes32(retrieve_name);
/'Look up the EHRs data in DHT table'/
DTHtable[key].storageName=storageName;
DTHtable[key].AreaID=AreaID;
DTHtable[key].PatientID=PatientID;
DTHtable[key].Hash_value=Hash_value;
emit DataResult(userPK);
//DTHtable[key];
}
function policyList(address EHRsManager,stringToBytes32,'/ string_resource, string_action, string_permission /'address userPK, address AreaID, address PatientID'/)
public{
bytes32 EHRresource=stringToBytes32(_resource);
bytes memory action=stringToBytesMemory(_action);
if (msg.sender==EHRsManager){
policies[EHRresource][action].userPK=true;
policies[EHRresource][action]..AreaID=true;
policies[EHRresource][action].PatientID=true;
policies[EHRresource][action].permission=_permission;
policies[EHRresource][action].result=false;
}
else revert();
}
function penalty( string_resource, string_action, uint time )
public{
//bool policycheck=false;
//bool behaviorcheck=true;
bool userPKcheck = false;
bool AreaIDcheck = false;
bool PatientIDcheck = false;
bool checkID = flase;
uint penalty=0;
bytes32 EHRresource_Conv=stringToBytes32(_resource);
bytes memory action=stringToBytesMemory(_action);
if (msg.sender==EHRsManager){
userPKcheck=policies[EHRsresource_Conv][action].userPK;
userPKcheck=policies[EHRsresource_Conv][action].AreaID;
PatientIDcheck=policies[EHRsresource_Conv][action].PatientID;
checkID=userPKcheck && AreaIDcheck && PatientIDcheck;
if(checkID==true) //Detect authorized access
emit ReturnAccessResult(msg.sender, "Successful!", true, time, Penalty);
else //Detect an unauthorized access
emit ReturnAccessResult(msg.sender, "Failed!", true, time, Penalty);
}
}
}
submitted by FateTrickster to ethereum [link] [comments]

Hello. im running this code on remix dot ethereum dot org. I cant debug it. its been weeks already and i still dont have any progress. this is my last resort. can someone debug it for me. this is the whole code

pragma solidity ^0.4.26;

import "github.com/ethereum/dapp-bin/library/stringUtils.sol";

contract ElectronicHealthRecords {
bool public status;
address public Admin;
address public EHRsManager;
uint public numberOfUsers;
mapping (address=>uint) public userId;
User[] public users;
event UserAdded(address UserPK, string UserRole);
event UserRemoved(address UserPK);
event DataResult(address UserPK);
event ReturnAccessResult(address index_from, string message, bool result, uint time, uint penalty);
//Creating a data structure for storing variables of different data types
struct User {
address user;// from the original code "address userPK"
string role;// from the original code "address userRole"
}
struct EHRstorage {
string storageName;
address AreaID;
string Hash_value;
address PatientID;
}
struct PolicyItem { //for ; {
bool userPK;
bool AreaID;
bool PatientID;
string permission; //verify permission: "allow" or "deny"
bool result; //ReturnAccessResult
bool checkID; //check the access
}
mapping (bytes32=>EHRstorage)
public DTHtable;
mapping (bytes32=>mapping(bytes32=>PolicyItem)) policies; ///mapping(EHRs resource, action) to policy checking
modifier onlyAdmin {
require(msg.sender==Admin);
_;
}
function SC_creation()public {
Admin=msg.sender;
status=true;
User(Admin, 'Creator of Smart Contract');
numberOfUsers=0;
}
function addUser(address userPK, string userRole)
onlyAdmin public {
require(status = true);
uint id = userId[userPK];
if(id==0) {
userId[userPK]=users.length;
id=users.length++;
}
users[id]= User({user:userPK, role:userRole});
emit UserAdded(userPK, userRole);
numberOfUsers++;
}
function removeUser(address userPK){
onlyAdmin; {
require(userId[userPK]!=0);
for (uint i=userId[userPK]; i users[i]=users[i+1];
}
delete users[users.length-1];
users.length--;
emit UserRemoved(userPK);
numberOfUsers--;
}
}
function stringToBytes32(string memory source) returns (bytes32 result){
bytes memory tempEmptyStringTest = bytes(source);
if (tempEmptyStringTest.length == 0) {
return 0x0;
}
assembly {
result := mload(add(source, 32))
}
}
function stringToBytes32Memory(string memory source) returns (bytes result )
{
bytes memory b3 = bytes(source);
return b3;
}
function retrieveEHRs(string stringToBytes32, string retrieve_name, address userPK,string storageName, address AreaID, address PatientID, string Hash_value)
onlyAdminp public{
bytes32 key=stringToBytes32(retrieve_name);
/'Look up the EHRs data in DHT table'/
DTHtable[key].storageName=storageName;
DTHtable[key].AreaID=AreaID;
DTHtable[key].PatientID=PatientID;
DTHtable[key].Hash_value=Hash_value;
emit DataResult(userPK);
//DTHtable[key];
}
function policyList(address EHRsManager,stringToBytes32,'/ string_resource, string_action, string_permission /'address userPK, address AreaID, address PatientID'/)
public{
bytes32 EHRresource=stringToBytes32(_resource);
bytes memory action=stringToBytesMemory(_action);
if (msg.sender==EHRsManager){
policies[EHRresource][action].userPK=true;
policies[EHRresource][action]..AreaID=true;
policies[EHRresource][action].PatientID=true;
policies[EHRresource][action].permission=_permission;
policies[EHRresource][action].result=false;
}
else revert();
}
function penalty( string_resource, string_action, uint time )
public{
//bool policycheck=false;
//bool behaviorcheck=true;
bool userPKcheck = false;
bool AreaIDcheck = false;
bool PatientIDcheck = false;
bool checkID = flase;
uint penalty=0;
bytes32 EHRresource_Conv=stringToBytes32(_resource);
bytes memory action=stringToBytesMemory(_action);
if (msg.sender==EHRsManager){
userPKcheck=policies[EHRsresource_Conv][action].userPK;
userPKcheck=policies[EHRsresource_Conv][action].AreaID;
PatientIDcheck=policies[EHRsresource_Conv][action].PatientID;
checkID=userPKcheck && AreaIDcheck && PatientIDcheck;
if(checkID==true) //Detect authorized access
emit ReturnAccessResult(msg.sender, "Successful!", true, time, Penalty);
else //Detect an unauthorized access
emit ReturnAccessResult(msg.sender, "Failed!", true, time, Penalty);
}
}
}
submitted by FateTrickster to ethdev [link] [comments]

Help. Can someone debug this code for me. I use remix dot ethereum dot org to run this code. I badly need it to work.

pragma solidity ^0.4.26;

import "github.com/ethereum/dapp-bin/library/stringUtils.sol";

contract ElectronicHealthRecords {
bool public status;
address public Admin;
address public EHRsManager;
uint public numberOfUsers;
mapping (address=>uint) public userId;
User[] public users;
event UserAdded(address UserPK, string UserRole);
event UserRemoved(address UserPK);
event DataResult(address UserPK);
event ReturnAccessResult(address index_from, string message, bool result, uint time, uint penalty);
//Creating a data structure for storing variables of different data types
struct User {
address user;// from the original code "address userPK"
string role;// from the original code "address userRole"
}
struct EHRstorage {
string storageName;
address AreaID;
string Hash_value;
address PatientID;
}
struct PolicyItem { //for ; {
bool userPK;
bool AreaID;
bool PatientID;
string permission; //verify permission: "allow" or "deny"
bool result; //ReturnAccessResult
bool checkID; //check the access
}
mapping (bytes32=>EHRstorage)
public DTHtable;
mapping (bytes32=>mapping(bytes32=>PolicyItem)) policies; ///mapping(EHRs resource, action) to policy checking
modifier onlyAdmin {
require(msg.sender==Admin);
_;
}
function SC_creation()public {
Admin=msg.sender;
status=true;
User(Admin, 'Creator of Smart Contract');
numberOfUsers=0;
}
function addUser(address userPK, string userRole)
onlyAdmin public {
require(status = true);
uint id = userId[userPK];
if(id==0) {
userId[userPK]=users.length;
id=users.length++;
}
users[id]= User({user:userPK, role:userRole});
emit UserAdded(userPK, userRole);
numberOfUsers++;
}
function removeUser(address userPK){
onlyAdmin; {
require(userId[userPK]!=0);
for (uint i=userId[userPK]; i users[i]=users[i+1];
}
delete users[users.length-1];
users.length--;
emit UserRemoved(userPK);
numberOfUsers--;
}
}
function stringToBytes32(string memory source) returns (bytes32 result){
bytes memory tempEmptyStringTest = bytes(source);
if (tempEmptyStringTest.length == 0) {
return 0x0;
}
assembly {
result := mload(add(source, 32))
}
}
function stringToBytes32Memory(string memory source) returns (bytes result )
{
bytes memory b3 = bytes(source);
return b3;
}
function retrieveEHRs(string stringToBytes32, string retrieve_name, address userPK,string storageName, address AreaID, address PatientID, string Hash_value)
onlyAdminp public{
bytes32 key=stringToBytes32(retrieve_name);
/'Look up the EHRs data in DHT table'/
DTHtable[key].storageName=storageName;
DTHtable[key].AreaID=AreaID;
DTHtable[key].PatientID=PatientID;
DTHtable[key].Hash_value=Hash_value;
emit DataResult(userPK);
//DTHtable[key];
}
function policyList(address EHRsManager,stringToBytes32,'/ string_resource, string_action, string_permission /'address userPK, address AreaID, address PatientID'/)
public{
bytes32 EHRresource=stringToBytes32(_resource);
bytes memory action=stringToBytesMemory(_action);
if (msg.sender==EHRsManager){
policies[EHRresource][action].userPK=true;
policies[EHRresource][action]..AreaID=true;
policies[EHRresource][action].PatientID=true;
policies[EHRresource][action].permission=_permission;
policies[EHRresource][action].result=false;
}
else revert();
}
function penalty( string_resource, string_action, uint time )
public{
//bool policycheck=false;
//bool behaviorcheck=true;
bool userPKcheck = false;
bool AreaIDcheck = false;
bool PatientIDcheck = false;
bool checkID = flase;
uint penalty=0;
bytes32 EHRresource_Conv=stringToBytes32(_resource);
bytes memory action=stringToBytesMemory(_action);
if (msg.sender==EHRsManager){
userPKcheck=policies[EHRsresource_Conv][action].userPK;
userPKcheck=policies[EHRsresource_Conv][action].AreaID;
PatientIDcheck=policies[EHRsresource_Conv][action].PatientID;
checkID=userPKcheck && AreaIDcheck && PatientIDcheck;
if(checkID==true) //Detect authorized access
emit ReturnAccessResult(msg.sender, "Successful!", true, time, Penalty);
else //Detect an unauthorized access
emit ReturnAccessResult(msg.sender, "Failed!", true, time, Penalty);
}
}
}
submitted by FateTrickster to solidity [link] [comments]

What's the reason why this says no contract compiled yet

pragma solidity ^0.4.26;

import "github.com/ethereum/dapp-bin/library/stringUtils.sol";

contract ElectronicHealthRecords {
bool public status;
address public Admin;
address public EHRsManager;
uint public numberOfUsers;
mapping (address=>uint) public userId;
User[] public users;
event UserAdded(address UserPK, string UserRole);
event UserRemoved(address UserPK);
event DataResult(address UserPK);
event ReturnAccessResult(address index_from, string message, bool result, uint time, uint penalty);
//Creating a data structure for storing variables of different data types
struct User {
address user;// from the original code "address userPK"
string role;// from the original code "address userRole"
}
struct EHRstorage {
string storageName;
address AreaID;
string Hash_value;
address PatientID;
}
struct PolicyItem { //for ; {
bool userPK;
bool AreaID;
bool PatientID;
string permission; //verify permission: "allow" or "deny"
bool result; //ReturnAccessResult
bool checkID; //check the access
}
mapping (bytes32=>EHRstorage)
public DTHtable;
mapping (bytes32=>mapping(bytes32=>PolicyItem)) policies; ///mapping(EHRs resource, action) to policy checking
modifier onlyAdmin {
require(msg.sender==Admin);
_;
}
function SC_creation()public {
Admin=msg.sender;
status=true;
User(Admin, 'Creator of Smart Contract');
numberOfUsers=0;
}
function addUser(address userPK, string userRole)
onlyAdmin public {
require(status = true);
uint id = userId[userPK];
if(id==0) {
userId[userPK]=users.length;
id=users.length++;
}
users[id]= User({user:userPK, role:userRole});
emit UserAdded(userPK, userRole);
numberOfUsers++;
}
function removeUser(address userPK){
onlyAdmin; {
require(userId[userPK]!=0);
for (uint i=userId[userPK]; i users[i]=users[i+1];
}
delete users[users.length-1];
users.length--;
emit UserRemoved(userPK);
numberOfUsers--;
}
}
function stringToBytes32(string memory source) returns (bytes32 result){
bytes memory tempEmptyStringTest = bytes(source);
if (tempEmptyStringTest.length == 0) {
return 0x0;
}
assembly {
result := mload(add(source, 32))
}
}
function stringToBytes32Memory(string memory source) returns (bytes result )
{
bytes memory b3 = bytes(source);
return b3;
}
function retrieveEHRs(string stringToBytes32, string retrieve_name, address userPK,string storageName, address AreaID, address PatientID, string Hash_value)
onlyAdminp public{
bytes32 key=stringToBytes32(retrieve_name);
/'Look up the EHRs data in DHT table'/
DTHtable[key].storageName=storageName;
DTHtable[key].AreaID=AreaID;
DTHtable[key].PatientID=PatientID;
DTHtable[key].Hash_value=Hash_value;
emit DataResult(userPK);
//DTHtable[key];
}
function policyList(address EHRsManager,stringToBytes32,'/ string_resource, string_action, string_permission /'address userPK, address AreaID, address PatientID'/)
public{
bytes32 EHRresource=stringToBytes32(_resource);
bytes memory action=stringToBytesMemory(_action);
if (msg.sender==EHRsManager){
policies[EHRresource][action].userPK=true;
policies[EHRresource][action]..AreaID=true;
policies[EHRresource][action].PatientID=true;
policies[EHRresource][action].permission=_permission;
policies[EHRresource][action].result=false;
}
else revert();
}
function penalty( string_resource, string_action, uint time )
public{
//bool policycheck=false;
//bool behaviorcheck=true;
bool userPKcheck = false;
bool AreaIDcheck = false;
bool PatientIDcheck = false;
bool checkID = flase;
uint penalty=0;
bytes32 EHRresource_Conv=stringToBytes32(_resource);
bytes memory action=stringToBytesMemory(_action);
if (msg.sender==EHRsManager){
userPKcheck=policies[EHRsresource_Conv][action].userPK;
userPKcheck=policies[EHRsresource_Conv][action].AreaID;
PatientIDcheck=policies[EHRsresource_Conv][action].PatientID;
checkID=userPKcheck && AreaIDcheck && PatientIDcheck;
if(checkID==true) //Detect authorized access
emit ReturnAccessResult(msg.sender, "Successful!", true, time, Penalty);
else //Detect an unauthorized access
emit ReturnAccessResult(msg.sender, "Failed!", true, time, Penalty);
}
}
}
submitted by FateTrickster to ethdev [link] [comments]

TokenClub Bi-Weekly Report — Issue 114(5.4–5.17)

TokenClub Bi-Weekly Report — Issue 114(5.4–5.17)

https://preview.redd.it/sxiftidp8cz41.png?width=1343&format=png&auto=webp&s=645584b9971068f347f80b63016bf229e45b0bbf
Hello everyone, thank you for your continued interest and support. In the past two weeks, various tasks of TokenClub have been progressing steadily. The product development and community operation progress this week are as follows:
1. TokenClub Events
1)Binance blockchain live streaming program “Block 101” joins TokenClub APP
TokenClub teamed up with Binance “Block 101” to host a series of live broadcast events. In the past two weeks, the big brothers such as the CEO of Feixin, Cobo co-founder Shenyu, and IOST co-founder Terry visited the TokenClub live broadcast room. See live summary. “Block 101” is a live broadcast of dialogues launched by Binance New Media Marketing Team, hosted by Jiayi, Anna, Liuliu, Yingge, Sisi, Qiqi, Doris, etc. Here will invite entrepreneurs in the industry, investment giants, opinion leaders, trading bulls or ordinary people with stories. Every Monday to Friday, with you in the TokenClub live room.

https://preview.redd.it/2ftnirwq8cz41.png?width=1080&format=png&auto=webp&s=88f45a13ad522f8d5139a703cbf2f337720907f2
https://preview.redd.it/qubkprdr8cz41.png?width=690&format=png&auto=webp&s=878a619dc582b7c2bb6d660395be4b350cb74983
2)Participate in poster forwarding, draw red envelope prize
When Bitcoin halves, TokenClub launches a poster forwarding red envelope campaign. On the day of the event, forward the poster to Twitter and the telegram group, and upload a screenshot to have the opportunity to extract the TCT red envelope award ~



3)Participate in live streaming interactive questions and win mysterious gift events
From May 11th to May 15th, TokenClub launched a live question and prize draw event. During the event, watch the block 101 live broadcast and interact with questions during the live broadcast, you will have the opportunity to get a mysterious gift from TokenClub.


https://preview.redd.it/rcx8yett8cz41.png?width=1080&format=png&auto=webp&s=4e2541c0d893e20725c54d76ad96634a79cfb8fd
3)TokenClub’s self-media Bilaoye was invited to participate in AMA
a. On May 7th,Bilaoye was invited by UPChain to conduct an AMA with the theme of “Half Countdown, Where Will the Market Go” in the Chains community. AMA article link:
http://public.tokenup100.com/page/article.html?articleId=f1db8c6bfaa94886bbdd863ec9908252&from=timeline&isappinstalled=0
b. On May 8th, Bilaoye was invited by Golden Finance to conduct an AMA with the theme “Bitcoin Breaks Over US $ 10,000 and Will Do This in Half”. Review link:
https://m.jinse.com/live/topic?id=11813&from=singlemessage&isappinstalled=0
C. On May 14, Bilaoye was invited by Cailu Finance to conduct an AMA with the theme of “Correct Postures for Depositing Money” in the Cailu community.Review link:

https://preview.redd.it/47prnpkv8cz41.png?width=1080&format=png&auto=webp&s=5baa2e06ec09ecdd60adb609bac247333059c016
2.TokenClub Live
1) Summary
Recently, Feng Yuqing, the director of Yicai Global America, the first Chinese reporter to interview Buffett, the organizer & host of the First Financial New York Forum; a world-renowned financial expert, a professor of finance at the Cheung Kong Graduate School of Business, and the director of the finance department -Cao Huining; ARPA founder Felix, SWFT Blockchain one-stop currency exchange cross-chain platform operation in Greater China & BD leader-Ye Fei, mining big man Binxin Mining CEO “Feige”, contract emperor co-founder Xiaoding, AlchemyPay co-founder Shi Xiang, financial expert & first-line trader Xu Zhe, Huobi Key Account Manager-Xiaotong, Roark Group & Bitribe & 499 Block founder sky, Cobo co-founder Shenyu, DappReview CEO Niu Fengxuan, IOST co-founder Terry; and TokenClub blockchain and cryptocurrency investment strategy senior expert-Zao Shen talks with you about the blockchain ~
On May 6, Block 101 Sisi Dialogue Felix, the founder of the hard-core technical team on the blockchain, ARPA Felix, the theme is “The Wall Street Battle of the Wall Street Elite”. In this live dialogue, the resume is dazzling. , The young man who was free to switch between “Yangchun Baixue” and “earthed gas” from the team’s initial heart chat to his investment strategy to the judgment of the entire currency market, his fanaticism of rock seems to explain a series of “adventure” options- — Longing for a more free and innovative world.


https://preview.redd.it/7fahx79x8cz41.png?width=1080&format=png&auto=webp&s=b0282a4fb4730d2898b15326d42e0460a3b92f10
On May 6th, TokenClub invited the one-stop SWFT Blockchain currency exchange cross-chain platform Greater China operation & BD leader-Ye Fei as a guest to “Jingjing at 8 o’clock” live broadcast, bringing us “flash exchange in the future block The theme of “Chain Payment Ecosystem” is shared. Mr. Ye made a detailed interpretation of SWFTC, and revealed the development plan of SWFTC, and exchanged questions and answers with fans enthusiastically.

https://preview.redd.it/27thi7cy8cz41.png?width=1080&format=png&auto=webp&s=df20cc7176e671942d85edf6b0790c0b8020663f
On May 7th, Block 101 Luna talked to the CEO of the mining industry, who is most familiar with KTV, Kexin Mining, “Fei Ge”. Liu Fei talked to Bin An Luna, he counted his mining “stepping on the pit road” “, Talking about halving the market and investment experience, talking to the second half, wearing a red Polo shirt, he began to persuade everyone to learn more in the KTV in Beijing at night, and recommended books.


https://preview.redd.it/4nhtp1sz8cz41.png?width=1080&format=png&auto=webp&s=03b8e1da731eefd1d57f65e3d1fa337e7eaafd66
On May 8, the TokenClub live column-”Professor had an appointment” shared the theme: “BOC crude oil treasure and financial derivatives market”. In this issue, Professor Cao invited the first U.S. Global Director of the United States, the first Chinese reporter to interview Buffett, the organizer & host of the First Financial New York Forum, and Columbia University Master of International Relations Feng Yuqing to share with guests on Chain, digital currency financial derivatives market, etc. have done a detailed exchange analysis.

https://preview.redd.it/4zgaxsw09cz41.png?width=1080&format=png&auto=webp&s=a88fc93057a631cc152b225dfb186385abaffbd6
On May 8th, block 101 was led by Binance BD’s head Li Jiayi, who talked about contract emperor co-founder Xiao Dingdang. He is an old code farmer who is known for his futures contract operations. He wrote a 10-year code, and the front end Everyone is familiar with it, and it is hard to say anything on the line of speech. Frankly, he talked from his fortune history to the story of the endless number of contract circles, and shared his trading iron law with everyone: there must be a stop loss; must practice more and try more.


https://preview.redd.it/90hyrg639cz41.png?width=1080&format=png&auto=webp&s=ded092ee130fa72d7b38e2ee9ca9b4d67d382c71
On May 9th, Zaoshen is coming ~ The sharing theme of this issue is: The Yangtze River will push back and forth, and one wave will be more than one wave. Speaking of the “Houlang” hot event, Zao Shen mainly analyzed the halving market with everyone in detail, to see how many opportunities there are and what strategies to choose. Soul asked: How much money did you make in this wave of quotes?


https://preview.redd.it/dwh2ojp49cz41.png?width=1080&format=png&auto=webp&s=466850dcc4d01e49872b144e49369c859256a67c
On May 11, Block 101 was discussed by Binance Qiqi Dialogue AlchemyPay co-founder Shi Xiang, the former vice president of Zhongan Technology and the founder of Micro Index shared with you the experience of dealing with overseas regulators: supervision is not actually strong Groups, regulation will strike you because you are worried about doing bad things, but as long as you are willing to actively communicate, regulation usually gives a tolerance period. For more content, please move to the live room.

https://preview.redd.it/grgnfkw59cz41.png?width=1080&format=png&auto=webp&s=83afa9faf03d4da0b26fc85f9e0c562127ca9f83
May 12, Exclusive: Huobi Global & Knowing Daniel Interpretation of “Physical Currency, Debt Currency to Encrypted Digital Currency”. The key account manager of Huobi Global has a conversation with financial expert and front-line trader Xu Zhe, talking about physical currency, debt currency and encrypted digital currency. Work is tired enough, the market is already exciting enough, pick Xu Da Tucao various currencies, teach you to return all the money. The value of the young lady’s face is a feeling of emotion.


https://preview.redd.it/8vsehsc79cz41.png?width=1080&format=png&auto=webp&s=b305df0b0c51b339ef109d8041da4ae05a7f7fd0
On May 12, Block 101 was founded by Binance Thinking, the founder of Roark Group, Bitribe, and 499Block. Sky, a science and technology man from Tsinghua University and MIT, has the title of “Coin Circle Zheng Kai”. Sky said that starting a business in the blockchain industry is like drifting in the turbulent Amazon River. If you do n’t believe that you will eventually reach the sea, you will be thrown off. Sky believes that Bitcoin is essentially a consensus based on time. Halving is like escaping the monsters, and each level increases the consensus.

https://preview.redd.it/gc9mgni89cz41.png?width=1080&format=png&auto=webp&s=2842c60a520c27993f8b4d1c611e112514352482
On May 13th, Block 101 Luna talked to F2Pool and Cobo co-founder Shenyu, and talked about the “new” story of Bitcoin. Leo ’s Godfish talked to us about the monopoly of computing power, mining pool operations, halving and Cobo ’s future development goals. He said that 80–90% of personal assets are Bitcoin, and about 10% of Ethereum and other Strange coins from mining. It is called “the first segment of the coin circle” because “more pits are filled, so in the end each pit becomes a stalk.”

https://preview.redd.it/rga6ean99cz41.png?width=1080&format=png&auto=webp&s=243c7aae2d8144621e913f3c8615465eea1d42e4
On May 14, Niu Fengxuan, CEO of DappReview, talked about “how ordinary people make money through Dapp”. Niu Fengxuan graduated from Fudan and Stanford. He is a serious game enthusiast. He has written many in-depth game evaluations and is an early participant of Dapp. He said that many people think that the biggest application of blockchain is speculation, but the technology ultimately serves products and applications. In the long run, if blockchain can really bring changes and innovations to the world technically, then it must be C-side users should feel it in a more friendly way in other fields.


https://preview.redd.it/zx38u5qa9cz41.png?width=1080&format=png&auto=webp&s=da5a65164e1ee8a3b91e446bdce8c5c7e905990f
On May 15th, Block 101 Yingge talked to IOST co-founder Terry and talked about “The Blockchain Ideal of Princeton Schoolmaster”. Terry told us about his sad history, happy history, and experience and experience of mining from college mining to graduate school to entrepreneurship, talked about the development direction of the blockchain market, and interacted with fans.


https://preview.redd.it/uats2yqb9cz41.png?width=1080&format=png&auto=webp&s=aba5587f0a96b0e31b3b205ea0d7a48a03664dd5
On May 16th, senior expert Zao Shen brought a live broadcast on the theme of “Depth Is Insufficient In Operation, How To Play With Crash”. In this live broadcast, in addition to analyzing the macro level of the economy, Zao Shen also focused on sharing The specific operation skills emphasized the principle of buying and selling, and finally commented on the hot events such as the recent Federal Reserve announcement that it will not fall to negative interest rates.


3.TokenClub operation data
-Live data: 13 live broadcasts in the past two weeks, with over 600,000 views. TokenClub hosted a total of 835 live broadcasts with a total of 44.25 million views.
-Binary trade data: In the past two weeks, guess the rise and fall to participate in a total of 1060 times, the amount of participation exceeded 2 million TCT. At present, it is guessed that the rise and fall function has participated in a total of 1.11 million times, with a cumulative participation amount of 496 million TCT.
-Chat data: In the past two weeks, a total of 28,950 messages have been generated. A total of 4.83 milliom messages have been launched since the function was launched.
-Mini-game data: The mini-game has participated in a total of 7,830 times in the past two weeks. A total of 1,66 million self-functions have been online.
-Cut leeks game data together: Since the game was launched, the total number of user participation in the game was 954,364 TCT total consumption was 6,27 million gift certificate total consumption was 15,53 million and TCT mining output was 160,48.
-TokenClub KOL data: Over the past two weeks, the total reading volume of the BTCGrandpa article has been viewed by more than 300,000 people.
-Social media data: At present, the number of Weibo official accounts is 17,972 and the number of Twitter followers is 1310, and we have opened the official Medium account this week, welcome to follow.
-Telegram official group data: In the past 2 weeks, there were 310 chats in the group, and the total number of Telegram official groups is currently 2971.
-Medium data: Medium official account u/TokenClub has published 1 excellent articles, official announcements and updates are published in English, welcome to follow.
4.Communities
1)Overseas community
TokenClub held an event for forwarding Twitter and telegram group chats for overseas users. Bitcoin halved in less than two weeks, overseas users are more active in the telegram group, and some friends are more concerned about Binance Block 101 live broadcast, aggregation exchange, TCT usage and other issues, the administrator responded in time.On May 12th, when Bitcoin was halved, TokenClub organized a forwarding Twitter, telegram group chat prize event and participating in a live question asking interactive prize event for overseas users. There are many live broadcast events in the near future. The live broadcast poster information will be released to overseas users as soon as possible. The follow-up TokenClub will translate and broadcast high-quality live broadcast content to Twitter and Medium. Bitcoin halved, overseas users are more active in the telegram group, and some partners are more concerned about block 101 live broadcast, bitcoin future price trend, TCT usage and other issues, the administrator responded in time in the group.

https://preview.redd.it/msi423re9cz41.png?width=1080&format=png&auto=webp&s=f0c453445cea34b8cba807e8bfa237dabfe9fb24
2)Domestic community
Last Friday, a holiday, the community opened the red envelope rain event, and brought a sincere gift to everyone while relaxing in the holiday. At the same time, it also sent the most sincere blessings to all mothers in the community on Mother’s Day. Thank you for your long-term support and help to the Orange Club community.


The third week of the second 100-day fixed investment plan held this week has been awarded. The participation of this event is still quite positive. This week, the bitcoin halving market was also opened in advance. If it starts according to the first day The small partners participating in the fixed investment should now have a certain floating win, so we adopt the correct cycle investment strategy to believe that it can bring unexpected benefits to everyone.


On May 9th and May 16th, TCT Fortune Free Academy carried out red envelope party activities as scheduled. In the event, in addition to GF red envelopes, students were reminded that there may be a callback risk after the pie halving, and short-term profits are available.


On the evening of May 3rd and May 10th, TCT Fortune Free Academy carried out the 51st and 52nd week sign-in sweepstakes, and rewarded the small TCT partners who had always insisted on signing in. In these two sign-in sweepstakes, the lucky friends received 20–180TCT as a reward. In addition, during the lucky draw, the college friends also actively expressed their opinions on the topic of this year’s bull market.

The Leek Paradise Community Conference will continue as usual every Sunday at 20:00. During the conference, members will discuss recent hot topics, including gifts and blessings for Mother ’s Day, and the halving of Bitcoin everyone is paying attention to. At the end, the friends in the group also showed a rare enthusiasm at the first sight. It seems that the market still affects the mood. The members routinely started a red envelope rain to cheer for the participating partners and encourage everyone to maintain patience and confidence. Of course, at the same time, we are encouraging ourselves to see the community meeting next week. Come on!

TokenClub volunteer community, sign in red envelopes every day, as long as you sign in every day, you can get good benefits, friends join us quickly! In the past two weeks, the community has conducted active partners.

TCT has been listed on Binance、Okex、Gate.io、ZB-M、MXC、Biki、Coinex、BigOne、Coinbene、Cybex、SWFT、Loopring、Rootrex etc.
TokenClub website: www.tokenclub.com
Telegram:https://t.me/token\_club
TokenClub App download QR code

https://preview.redd.it/59o55ojn9cz41.png?width=560&format=png&auto=webp&s=b3b3f69f59d6f25c87319d7e9331435e36e27ba7
submitted by tokenclubtct to u/tokenclubtct [link] [comments]

Very welcome Wallet.sol Improvements by Benedict Chan. Please all have a look.

We would like to merge these wallet.sol PR's, as they make interacting with the wallet contract easier, than the original one written by Gavin Wood.
To make sure its solid, please take your time and look at them to find any bugs, or security issues http://github.com/ethereum/dapp-bin/pulls/bencxr
submitted by frozeman to ethereum [link] [comments]

It's time for investors to pursue quality, and to stop chasing shit

Guys, I'm going to put this out there, as a self-professed and defiant holder. I know some of you are active traders that may take offense to this, so just cover your eyes or ignore me for what follows.
There was a time to trade shitcoins and easily make money in crypto. Almost anyone could do it, practically by throwing darts at a board. And those times come in cycles, with history repeating itself. One of these cycles is likely in the process of ending, with coins that briefly found themselves in top spots, that are now relegated back to the dust bin of the crypto charts.
But I believe we may be nearing the end of a mega-cycle of trading shitcoins to make easy money, because the world is about to realize what a "quality" blockchain is, in the form of Ethereum.
Don't get me wrong, some of you can still trade the volatility and make money, but most of us can't do it consistently. And even if you can, consider if now is the time you want to risk your ETH to chase such gains, especially when we are on the precipice of truly amazing things happening for Ethereum.
Take this announcement from Vitalik yesterday, where he straight up says 2018 is going to be a huge year for Ethereum. And this coming from a guy who is known for being incredibly un-sensational. Vitalik does not hype.
Or this article in today's New York Times, which presents Ethereum as a "base layer" for a future, blockchain-enabled world. This is the most flattering depictions I have ever seen of Ethereum in the mainstream press, and it is just the beginning of Ethereum entering the zeitgeist.
What's holding Ethereum back from true greatness? Scaling. What has Vitalik committed to bringing to Ethereum in 2018/2019? Scaling.
Here's my insane prediction: as soon as we have any form of scaling that allows for meaningful dapp usage, which could come in the form of Trusted Relay Networks or Minimum Viable Plasma, it's going to be game on for Ethereum and game over for much of the competition.
What will that look like for the price? I think up to 5x, just from temporary / suboptimal (and perhaps linear) scaling that allows for many currently ready dapps to run. Add on imminent futures, EEA announcements, Proof of Stake, Sharding, and maybe even an ETF? Add on another possible 5x to 10x. I know, this yields insanely high numbers, and I know many will think this is being completely unrealistic, but you're about to see what happens in a market when it starts to realize fundamental value over hype.
submitted by DCinvestor to ethtrader [link] [comments]

How to build a dApp on VeChain: Initial Steps

I’m creating these possible series to hopefully start a dialog between those that are interested in dApp development on VeChain. I’ve created a few dApps on Ethereum (nothing published) so I have a bit of insight on how all this jazz is put together. It should be noted that i’m in no way a professional dApp developer, especially with building dApps on VeChain, so if anyone would like to chime in, correct me, or offer constructive criticism I would be grateful as it helps out me and the community. I thought about ironing out all the details and presenting one body of work but I too am learning and thought it would be nice to get feedback along the way.
This is the initial steps and is no way a complete guide to dApp development. I’ll be discussing how to connect to the VeChain blockchain locally on your computer. This should (crossing my fingers) hopefully get you in a place to interact with the smart contracts you deploy to a local blockchain (see edit) the testnet from your computer. I have a mac so there probably will be some differences getting this going on a PC. Hopefully we all can help each other. Enough talking lets get to it!

Installation

To build a dApp locally you’ll need to have a local (see edit) the local network running the blockchain. To do that you’ll need to install VeChain Thor. I guess thats the name of it? Thats all it says in the repo. Anyways to install make sure you have Go installed.
To install Go, follow this link. Once you’ve install Go, clone the VeChain Thor repo using git:
git clone https://github.com/vechain/thor.git cd thor 
Now in the README.md under “Installation” there is a heading entitled “Dependency management” and there are a few steps you can take. Those steps are make dep or to manually install dependencies you can run dep ensure. Because I didn’t have the source code in my gopath I kept receiving the error is not within a known GOPATH/src. So i just had to create my gopath and add it to my .bash_profile. If you still get an error check out these resources:
Really it was a headache getting that to work so I took a break from my computer and ate a cupcake.
Once you have installed the dependancies you’ll need to cd back to the thor repo that you just cloned and run:
make
or as the instructions say “if you want to build the full suite” run:
make all
Does anyone know the difference between the full suite and the non full suite? (see edit 2)
Once you have built the main app you are ready to run the Thor network.

Running the Thor network

For our purposes we will want to connect to the testnet. To connect run:
bin/thor --network test
Again make sure you are running this command in the thor repo that you cloned. To connect to the mainnet replace “test” with “main”.
Per the README if you want to see all the commands and play around run bin/thor -h to get some help.
Once you run this you should see a lot of stuff being printed in your console. Let it sit and open up a new terminal window. You can rejoice because got the testnet running locally on your machine!
Note: These instructions are all on the VeChain/Thor README.

Proxy to the Thor network

Now we will need to proxy to the network using something VeChain provides us called web3-gear. My educated guess is that this is the medium between the network (local blockchain??) and the services running on your client, aka web3.
You won’t need to clone the web3-gear repo. You’ll use a package manager to install it.
On a mac run:
brew install openssl
To install the dependancies needed to run web3-gear. Once that completes run:
pip3 install web3-gear
Make sure you have Python 3.6+ to run both of these steps. On a PC you’ll just have to run pip install web3-gear but make sure beforehand you have Visual C++ Build Tools and script-py.
Once you’re done install web3-gear run it by calling its name “web3-gear”.
You now have the web proxy up and running and can connect to it using different tools.
Want to play around with some smart contracts? Connect to the network using Remix. Go to the “Run” tab and select “Web3 Provider” from the “Environment” tab. You’ll see a bunch of stuff happening in your console which is pretty neat.
If you want to continue your development locally using something like Vue, React or Node you can keep reading.

Connect your client to the Thor network

So at this point i was pretty familiar with using web3 to connect to the services running on the backend. But VeChain is a bit different (superior in my opinion) and had to use Thorify to adapt web3 to work alongside the background services. For this part i’ll use React as i’ve been working with it for the past 2 years.
Lets get react up and running with create-react-app. To install create-react-app just run:
npx create-react-app thor-web-app cd thor-web-app 
Next we will want to install Thorify and Web3. To do so run:
npm install --save thorify npm install --save web3 
Now run npm run start and your app just pop up.
So by now you have an app running and you are about to connect to the VeChain Thor network but you might need some smart contracts. For that I recommend Truffle. Truffle is a suite that helps compile, deploy and test your smart contracts. It does more as well but we will just need it now for compiling and deploying your smart contracts.
To install truffle run:
npm install -g truffle
Bow! You got truffle.
So lets get some contracts into your app. Navigate, clone or download the truffle-webpack-demo repo. In this repo you will find 3 things that you need. They are the contracts folder, the migrations folder, and truffle.js. Copy those to the root of your thor-web-app.
Note: On windows systems you might have trouble running truffle in your main folder due to the truffle.js file so create truffle.config.js and put it in the root of your thor-web-app.
What we just copied over are really elementary contracts but it should give you an idea of how a contract works. I’m not really gonna go into detail on understanding Solidity right now but hopefully that gives you a starting point.
We will need to configure Truffle to deploy our contracts to the right network. To do so add this to your truffle.js or truffle.config.js files:
module.exports = { networks: { development: { host: "localhost", port: 8545, network_id: "*" // Match any network id } } }; 
Once we have those items in place we need to compile and migrate contracts.
Solidity is what our contracts are written in but we need to compile them to bytecode to deploy to our local the testnet (see edit) network. To do so run:
truffle compile
in the root of your app. This will create a build directory. Then we will want to migrate the newly compiled contracts to the development network that we set up previously. To do so run:
truffle migrate --development
Boom! Your contracts have been migrated and now should be living on the blockchain. You can now interact with your contracts.
Here is where I could have done things differently. The build folder creates JSON files that your app will need to read. The JSON files are essentially a blueprint of your contracts that your client will read. Because the build folder is built and placed in the root of our app React can’t reach those files. So I had to move the build folder into the src folder. That’s not optimal. You don’t want to have to keep moving it. I believe you can tell Truffle where to place your build files. But for now just move the build folder into the src folder.
Once you have the build folder inside your src folder its time to get that data into your app. For ease of this article I chose to put my web3 code in App.js but it really can be done in many places. Open up App.js and import Thorify, web3, and your contract data like so:
// ES6 style import { thorify } from "thorify"; import MetaCoin from './build/contracts/MetaCoin.json'; const Web3 = require("web3"); // Its recommended to use require instead of import const web3 = thorify(new Web3(), "http://localhost:8669"); 
If you want to write ES5 style code:
const thorify = require("thorify").thorify; const MetaCoin = require('./build/contracts/MetaCoin.json'); const Web3 = require("web3"); const web3 = thorify(new Web3(), "http://localhost:8669"); 
I messed up here and thought that I needed to connect to port “8545” but that is wrong. Make sure you are connecting to port “8669”.
Now lets connect it all!
const MetaCoinContract = new web3.eth.Contract(MetaCoin.abi);
From the web3 docs:
The web3.eth.Contract object makes it easy to interact with smart contracts on the ethereum blockchain. When you create a new contract object you give it the json interface of the respective smart contract and web3 will auto convert all calls into low level ABI calls over RPC for you.
This allows you to interact with smart contracts as if they were JavaScript objects.
If you console log MetaCoinContract you’ll see an object with many different properties. Some of the properties you will see are methods and these methods should correspond to the functions inside your Solidity contract. You run these methods to execute those functions!
Alright I’m going to leave you guys now but hopefully this is a good start for you guys. What do you think? Can anything be optimized? What can be done better or different?
Also we are trying to get this VeChain open source community going so if you have an idea or need help PM me.

edit: it seems as though we aren't connecting to a local standalone blockchain on your local machine per the docs. This is different from my Ethereum development as you create a standalone testing blockchain. Maybe someone can provide further information. I will update the post to reflect information given by the community.

edit 2 (thanks u/davy_li): Running make without a target name will process the first Makefile target that doesn't start with a . (so in this case, equivalent to running make thor). On the other hand, make all will run the thor and disco targets, where "disco" is a boostrap node for the Ethereum discovery protocol.
​​update: I published my Intro to VeChain dApp Development post here:

P.S. Community site is coming along nicely.
submitted by Raleigh_CA to Vechain [link] [comments]

Whitehat Withdraw contract is deployed at 0x9f5304da62a5408416ea58a17a92611019bd5ce3

The Whitehat Withdraw contract has been deployed at 0x9f5304da62a5408416ea58a17a92611019bd5ce3 . 4,171,615 ETC have been transferred and are now available to be retrieved by any DAO Token Holder who had Tokens at the Hard Fork.
Reminder, to retrieve your share of ETC please use the following options:
A great Q&A is available here: http://ethereum.stackexchange.com/questions/8338/how-do-i-convert-my-the-dao-tokens-into-ethers-on-the-ethereum-classic-chain
We also updated the last blog post: https://blog.bity.com/2016/08/29/whitehat-withdrawal-contract-last-update-before-deployment/
The method to deposit funds in the contract is only by using the deposit() function: whwithdraw.deposit({from: account, gas: 90000, value: web3.toWei(ETHERAMOUNT, 'ether')})
Within moments of deploying the initial contract, we discovered an irregular behaviour when people were donating 0% We decided to immediately stop the contract using the Escape Hatch while we looked into the irregularities.
After investigation, it appears that using the send() function with a value of 0 from a contract account to a multisig account will not work. The reason is that send() with a value of 0 gives a gas stipend of 0 gas which when sending to the typical multisig wallet hits this line (https://github.com/ethereum/dapp-bin/blob/mastewallet/wallet.sol#L336) and has no gas to spend. As a result, the whole transaction was throwing. This issue was fixed by not calling the send() function if a zero donation is detected. We of course had tests available (https://github.com/BitySA/whetcwithdraw/blob/086170f38eef1762726c4109a3ed713d79b87c26/tests/deploy.js#L274) for this scenario, but with a normal end-user account as the donation address instead of a multi-sig wallet. This is why the discrepancy was not discovered until we went live.
We were able to reproduce, adjust, test, and deploy a modified contract at 0x9f5304da62a5408416ea58a17a92611019bd5ce3. In this new contract, we pre-populated the paidOut mapping for the people who had already performed withdrawals. 54 transactions already had happened.
If you are part of these 54 transactions and you were forced to use 1% as a donation argument to make the transaction go through, please contact us and we will send the remaining back to you.
Some best practises:
Edit:
If your tokens are in a Contract Wallet, we prepared a walk-through to retrieve your ETC: https://blog.bity.com/2016/08/31/using-whetcwithdraw-from-a-mist-contract/
submitted by rachyandco to ethereum [link] [comments]

Thoughts going into 2018 & why we may see 50 before we see 5000...

I’ve been here since January, when I heard a podcast interview with Vitalik and bought my first Ethers. Each one put me back about the price of a Chipotle burrito.
I expected to see some gains in 5 years. Little did I know that I had stumbled into a once-in-a-generation investment opportunity.
Fast-forward a year, and Ether is almost flirting with quadruple digits.
Now, I am very bullish on Ether longterm. I think that someday we will likely see 10k and beyond. But I also think there’s a decent chance we will see 50 again before we see 5000.
Now that might sound crazy. And maybe it is. But let’s consider for a moment how terrible we are at predicting the future.
Look at the threads here from this time last year when Ether was in the single digits. Even the most bullish predictions for the end of 2017 rarely exceeded 50, let alone 100. Folks who predicted 700+ would have been sent straight to the loony bin.
Now, we see the opposite: predictions like 5k and even 10k don’t seem all that crazy. Predicting a major crash though to sub 100 puts you in the minority, among Ethtraders.
But the history of cryptocurrency is one of booms and busts. Prices shoot up then crash and then go up again. And there’s no reason to think that this pattern will stop anytime soon.
After all, it happens in the early days of any world-changing technology. Whether the Internet or the blockchain, there is always a tug of war between reality and possibility. Between the recognition that a technology will be world-changing and the reality that it is not yet so. A tug of war between reason, fear and greed.
I see Ethereum as a precocious kid. She is brilliant and she has all the potential in the world. But she is still young. She is learning fast but she still has a lot to learn. Some day she will fly, but today, she is still learning to walk.
Someday she may be the world’s leading platform for economy, law, and governance. Today she is a place to collect and breed digital cats.
Vitalik himself has said that he thinks Crypto does not deserve its current market cap....yet.
I love Ethtrader but it can also be an echo chamber of bullish sentiment, Ethereum maximalism, and hodl absolutism.
And I think that as a whole, our community is underestimating the likelihood of a major crash in the next few months to a year. I don't mean a 25% dip. I mean a crash to below 150 or 100 where it stays there for months or even years (unlikely but possible).
Currently something like 40 of the top 100 cryptos by market cap, are ERC-20s and many run on Ethereum. Some of these tokens are north of 500 million or even a billion in market cap and haven’t even released a product yet. This is a boon to Ethereum in the long-term, but it creates short-term vulnerability as many of these projects will fail (most startups fail).
In the next few months, the rubber hits the road as some high-profile dapps go live. This means that Ethereum will be tested like never before. Ethereum has exciting scaling solutions down the road (sharding, Raiden, Plasma), but we’re just not there...yet. Expect some major growing pains in the coming months. And like it always does, the market will overreact and we can expect a major sell-off.
So let’s say that there’s a decent chance of a crash in the next year. What to do about it?
If you are the sort of person who truly does not give a f**k about the short to medium-term e.g., you can go weeks without looking at prices, then sure, just HODL. Be honest with yourself though. I think this is true for very few of us. This is Ethtrader after all.
Imagine Ether plummets to sub 150 and lingers there for months. If there’s been nothing but blood on the streets, red on GDAX, and bearish posts on reddit for months, it will be tough to stay optimistic. This will be especially true if at the same time, other cryptos are soaring.
And for those of us who have the resolve to HODL, we still may kick ourselves for not taking some profits when it was higher so we could buy back lower.
Now, of course the flip side is that it may keep soaring and this could be 1996 in the Dot Com Bubble.
So this isn’t about predicting what will happen. After all, nobody can do that. Well, except maybe Scienceguy...
But rather this is about situating ourselves to be well-positioned regardless of what happens.
So what I’m proposing is to sell enough that you won’t panic sell or stress out (too much) if it crashes and that you’ll be able to buy back at a lower price. But not so much that you’ll freak out and FOMO back in if it keeps going up.
If it drops, you’ll be able to buy back in at a discount. If it keeps going up...well you’ll still make a bunch.
I'm talking about selling maybe 15-25% of your holdings. If it falls to a quarter of the price, you'll double your stack. This is less about the financial gain though than about getting peace of mind, which is priceless. What I mean is that if it crashes 50 or 80% you won't freak out too much, but instead will think 'oh cool I can buy back in lower.'
But the most important thing is to have a system and stick to it. If you are in the minority who is truly immune to crashes, then by all means hodl. Power to you.
I just don't think that's true for most of us here.
Now some of you bought in recently and may be in the red right now. Let's say you bought at 830.
In that case, I wouldn't sell...yet. I don't think it makes sense to sell at a loss unless something fundamental has changed or you need the cash. And I think this bull run likely has some steam left. I could see us breaking 1000 in the next month or two before a big correction.
Of course, that’s just a guess. Anything is possible.
So I'd say set a limit sell a bit above your buy-in price. Again, just for a small portion of your stack. If the order goes through before a potential crash then you can get some peace of mind and can buy back in lower. If not, just try to hodl through and eventually things should pan out.
Ok guys, just my two cents. It's been a hell of a year, and in the scheme of things, we're just getting started here. Stay safe, stay hungry, and happy New Year!
submitted by pacific_Oc3an to ethtrader [link] [comments]

Do More with Dapps - Try something new :)

Do More with Dapps - Try something new :)

https://preview.redd.it/qlntlvmfpo731.jpg?width=2560&format=pjpg&auto=webp&s=3edfd49e90a46acd362942afcc8924d6dab0ff41
Forget your 🔒insecure Gmail and old 🗑 apps, the new internet is here! These latest dapps can help you check off everything on your bucket list:

🌏TravelFeed: Discover hidden gems and share unique travel experiences with this global community!
💰Hydroppay: Just like Venmo, but on Ethereum.
🛡Dmail: A decentralized service which puts you in control of your own data.
📚NEMOStudy: Get your lectures on the go with this blockchain-based platform.
🤾‍♀️PUML Better Health: Earn rewards for accomplishing your fitness goals!

🔍Explore more dapps - https://www.dapp.com/article/do-more-with-dapps
submitted by dapp_com to dapps [link] [comments]

Telos - zusätzlicher Eigentumsnachweis (vom Artikel Telos Blockchain-Proof of ownership)

Telos, eine sisterchain von EOS bietet eine zusätzliche Möglichkeit seinen account abzusichern. In Zukunft wird es noch einfacher sein nachzuweisen, dass du der rechtmäßige Inhaber deines accounts bist, auch wenn er gehacked worden sein sollte (was hoffentlich nie passiert) Ich füge den Link zum englischen Medium Artikel hinten an. Kurz erklärt in deutsch bedeutet es, dass man vom eigenen account 0,1 Telos (TLOS) an "proveaccount" sendet. Nur der Inhaber kann das tun) Im Memo schreibt ihr dazu: This account is owned by the holder of the private key for Ethereum address: 0xyxy...usw (am besten einen neuen anlegen oder einen bei dem ihr wenige Token drauf habt, denn nach so einer Aktion wäre dieser account "verbrannt". Sicher würde das Gremium darauf bestehen, dass die Coins darauf transferiert sind vor Bekanntgabe des private keys) Dort ist diese Information dann hinterlegt, ohne dass ihr jemals eure Identität preisgeben müsstet und ihr habt das Memo in der Blockchain für immer festgeschrieben. (Ich hab zusätzlich einen screenshot gemacht und extra archiviert) Sollte der account wider erwarten jemals gehackt werden, dann gibt es ein Gremium, welche accounts erstmal einfrieren kann und dann nach diesem und anderen Verfahren entscheiden kann. https://medium.com/goodblock-io/proveaccount-7e0f4aeacef4 Telos ist ebenso wie EOS mit zwei public adressen und zwei private keys gesichert, dem active key und dem owner key. Verwendet wird zur Sicherheit ohnehin nur der active key. Mit dem owner key der eigentlich nur bei dir sicher verwahrt sein sollte, kannst du jederzeit beide Keys ändern. Ein Hacker hat dann schlechte Karten, wenn du sowieso deine Coins gestaked hast. Er müsste "unstaken" (worüber du Info bekomen kannst über EOS Authority und bis er die Coins bekäme sind 72 Stunden Zeit mit dem ownerkey beide Keys zu ändern. Schon hat der Dieb keinen Zugriff mehr auf deinen account! Bis dahin bräuchte es kein Gremium, du hättest alles selbst im Griff. Sollte all das versagen, weil du z.B. im Urlaub warst,dann erst könntest du so noch deine geklauten Coins zurückerhalten. Manche sagen, dass sei nicht mehr dezentral. Ich sage: Dezentral, sehr clever und sicher dazu! Bei EOS und Telos und den anderen sisterchains bin ich Teil der community, kann mit abstimmen damit sich die Blockchain ständig verbessert und entwickelt. Unabdingbar zur massenhaften Verbreitung von Kryptowährungen sind einfacher Zugang und sichere Verwahrung meines Besitzes. Deshalb ist EOS so erfolgreich und das ist gerade erst der Anfang...:
EOS Kryptowelt mit Sisterchains und dApps - Vollständige Diskussion unter: https://www.wallstreet-online.de/diskussion/1296044-neustebeitraege/eos-kryptowelt-sisterchains-dapps-to-the-moon-muelldeponie
submitted by Jotka888 to TELOS [link] [comments]

(Doge/Ethereum two-way peg) I wrote up an implementation of scrypt in EVM for use in verifying dogecoin block headers

Here it is:
https://github.com/ethereum/dapp-bin/tree/mastescrypt
Note that it currently takes ~370M gas to verify one instance of scrypt, hence the function in my script above has the ability to save partial progress and start from the most recent saved state and go as far as it can; you need to send 118 transactions before the function actually returns an answer. The bulk of the annoyance is scrypt's choice to use salsa20, which needed to be implemented in serpent; if it weren't for that then the whole thing would likely be doable in one or two transactions.
Since this is obviously absurdly inefficient, you do need some cryptoeconomic machinery to make sure that the verification happens extremely rarely. My preferred scheme is a system where to submit a scrypt solution you must provide a security deposit with some minimum (say, 25 eth), and then there is a period of six hours where anyone can either challenge you (by submitting the 118 transactions to compute the scrypt result inside the blockchain) or outbid you (say, by at least 2x). If someone outbids you, then you or anyone else have six hours to outbid or challenge them. Once a challenge period runs out, or if the 118 transactions are submitted, the winner is determined based on either, if possible, the actual result of the 118 transactions or by who submitted the highest bid, and the winners and the transaction submitter proportionately collect 50% of the security deposits of the losers (the other 50% is burned). The theory is that the threat of someone submitting the 118 transactions disincentivizes people from submitting a bad scrypt solution in the first place, and if the initial deposit is too low then the escalation mechanism allows other players to force it higher. Hence, in the normal case, people will just submit correct scrypt solutions with the minimal deposit and everyone will be happy.
The next step is actually integrating this into a version of btcrelay. I am not an expert on how litecoin/dogecoin merge mining works, so I'll need some help here on taking this code and turning it into an actual dogecoin block header verifier. For reference the original btcrelay can be found here: https://github.com/ethereum/btcrelay/
I welcome any questions, whether on the code, the cryptoeconomics, how it can actually be used, or anything else!
submitted by vbuterin to dogecoin [link] [comments]

23 April AMA - All Questions and Answers! (DJ Qian & Bin Jiang)

Today was the AMA in the official Telegram group. I grouped all questions and answers for the people that missed out :) Enjoy.
Question: I got some questions about the testnet. You kow me, I am here since first minute. I am curious about the testnet release. and where are we
Answer (DJ Qian): I think I would rather not answer you by a percentage. After all, the percentage is caculated by lines of codes or modules. Maybe 95% cost 1 months, but finally find the rest 5% will cost 2 months. haha. My expectation is we release a version of testnet in May. And so far I think we are still on track.
Question: Can you explain to me in noob terms how fusion VM will be different from let’s say EVM?
Answer (Bin Jiang): 1. FUSION VM added outside data source, like oracle. 2. In FUSION VM, for some frequent app calls, we have a design to calculate the frequency of usage and compile to native code dynamically 3. Regarding the data format, we optimized the decimal calculation because it is very important for finance.
Question: My question, how will you calculate the gas amount for tx? And are you able to communicatie with Hedera Hashgraph
Answer (Bin Jiang): Similar to Ethereum, caculate by steps and price of steps.
Question: Hello, my two questions are how do you plan to implement the TIME and HTTP inside a smart contract those make the smart contracts not deterministic. (technichal answer please :) I hope you understand my questions ?
Answer (Bin Jiang): It will depend on consensus. On today's blockchain, nodes get consensus of time. We are going to use the same machenism to determine the event. Regarding HTTP, first of all, the data from HTTP will be packed in block, and nodes need to get consensus on the data which trigger smart contract.
Question: Is the test net will be publicly open ? What futures test net will show us ?
Answer (Bin Jiang): Yes. And most important features in our first version of mainet will be 1. Lock in& Lock out 2. Split token by time (financial functions) 3. Optimized VM for finance.
Question: Will there ever be more Fusion tokens or is there a Finite number
Answer (Bin Jiang): No. Finite number is 81.92M.
Question: I'm not a programmer, some ppl says if vm code is in C++ can be more efficient than Java.So Why not choose Java.
Answer (Bin Jiang): The reason we released VM in java is that we want to prove the design fast. Actually in mainnet, we are using GO
Question: With the first version released will we get to test some of the interoperable features, cross-chain atomic swap etc...?
Answer (Bin Jiang): On FUSION, we don't need to pay much attention to atomic swap. And I can assure you, the feature I just mentioned are really exciting and important to financial functions. Atomic swap is only a exchange transaction, only one type of financial service.
Question: Last question, how will cross chain consensus work in systems that don’t have smart contracts.
Answer (Bin Jiang): On FUSION, all token/digital assets/cryptos actually they are on same layer.
Question: WAN, ICON and AION have an alliance to work on things like Interoperability etc. Are you planning to join the same alliance or create a new alliance to solve the Interoperability issue.
Answer (Bin Jiang): Technically, all token/digital assets/cryptos can be locked in on fusion. It even does not need support from other chain. Anyone holding those token/digital assets/cryptos, they can do by themselves.
Question: Hi Bin Jiang in general do you feel you guys are on track to meet current deadlines or do you foresee some additional challenges.
Answer (Bin Jiang): Yes.
Question: And is there any project that has a similar consensus model to fusion (hccm)
Answer (Bin Jiang): Not yet. But I feel there will be in the future. We are very confident with the consensus we design
Question: how do you validate the source ? TLS and if its consensus as in multiple requests to same source, thats not efficient could that be source for DDOSing somebody
Answer (Bin Jiang): Actually, on future we really don't care whether the data source is reliable or not. In blockchain, if something is not truth, but everyone says it is truth, then it is truth.
Question: DJ, do you and the Fusion team to plan to attend consensus NYC?
Answer (Bin Jiang): We will be there.
Question: Hello. Which blockchain project is the base for Fusion (Ethereum, Tendermint, EOS,...)?
Answer (Bin Jiang): The amazing part of FUSION is that our technology team can do much more than developing a project based on another one. We absorbed some projects excellent features, but we are not based on any other existing projects. From testnet code in May, you will find out.
Question: Will Fusion release libraries to develop with upon TestNet release? Or is it up to community to create the libraries for all languages
Answer (Bin Jiang): We will release a SDK, though it will be very simple in the first version.
Question: Is fusion able to communicate with EVERY blockchain or are the specific requirements to be able to communicate?
Answer (Bin Jiang): Every blockchain, whose token is controlled by private key.
Question: How do you plan to balance anonymous nature of decentralised loans with the ID system native to blockchain contracts? A financial institution may need this for confidence in loans, is this something that will be handles off chain or will it be a part of the native system of Fusion?
Answer (Bin Jiang): This can be build in apps. Not infrastructure like FUSION.
Question: Noob question- how come you decided not to have masternodes? And is this decision finalised? I appreciate there is still staking/mining, but I thought the masternode concept was quite good to help encourage a high proportion of 'trusted' consensus nodes, and therefore help with stability
Answer (Bin Jiang): No, some model like masternode is still being evaluated. I also agree masternode concept is good.
Question: What sets Fusion apart from similar projects such as Ziliqua,Wanchain, and upcoming projects such as Quarkchain, Seele, Edenchain. How is Fusion considering to evolve to keep up with new incoming infrastructure projects?
Answer (Bin Jiang): From my perspective, these are quite different projects, no matter targeting market, technical design...
Question: How big is the developer team?
Answer (Bin Jiang): Today, 17. But will add some in these days.
Question: DJ I was wondering if your company Bitse is related to Fusion or of this is an independent project?
Answer (DJ Qian): BitSE is transformed to be a token holding company now. Not much operation.
Question: Can we have Testnet release date in May , with atleast a 2 Weeks countdown ticker.
Answer (DJ Qian): That creates shilling. But the most important thing is we deliver that.
Question: What about awareness?
Answer (DJ Qian): We will keep creating awareness. What I care more is we really have assets lock in on future once our mainnet go live, and financial dapps running on FUSION as well.
Question: Are there already contracts signed for dApps to run on Fusion?
Answer (DJ Qian): What I can tell you is that there are already some companies and projects developing products like wallet, finance dapp on fusion.
Question: Today we found about about Testnet in May, from an investor point of view, it boosted our confidence and reassured us. Having some key dates mentioned, provides new investors with the confidence they need
Answer (DJ Qian): If it is the only question that matters, I would rather have Jiangbin go back to coding than answering questions here, hahaha
Question: Will it be possible to lock in any token from any other blockchains? Or does fusion need to have some kind of tailored bridge functionality for every blockchain out there?
Answer (DJ Qian): Yes. That's what we are targeting. But for first batch, we might choose 1. BTC. 2. USDT 3. ETH 4. ERC20.
Question: DJ could you please explain what this project means to you , you have been extremely successful and I feel this is almost a legacy that you are wanting to leave
Answer (DJ Qian): I have been dreamt of doing project like FUSION for long. I am not doing FUSION for money, but for self accomplishment.
Question: Hey dj i really like Fusion since the start. But that *code release was not really much and kinda felt not like the smart contract for the Ico felt.
Answer (DJ Qian): ICO model is a full function. That's why you can feel it. VM is only a module. So you don't have much feeling about it. But still it is very important. When we release the first version of testnet, maybe you can have some feeling.
Question: DJ, will we get Ledger Nano support right away after main chain?
Answer (DJ Qian): I hope so. Will talk to them.
submitted by JoeyKhd to FusionFoundation [link] [comments]

(Doge/Ethereum two-way peg, x-post from /r/dogecoin) I wrote up an implementation of scrypt in EVM for use in verifying dogecoin block headers

Here it is:
https://github.com/ethereum/dapp-bin/tree/mastescrypt
Note that it currently takes ~370M gas to verify one instance of scrypt, hence the function in my script above has the ability to save partial progress and start from the most recent saved state and go as far as it can; you need to send 118 transactions before the function actually returns an answer. The bulk of the annoyance is scrypt's choice to use salsa20, which needed to be implemented in serpent; if it weren't for that then the whole thing would likely be doable in one or two transactions.
Since this is obviously absurdly inefficient, you do need some cryptoeconomic machinery to make sure that the verification happens extremely rarely. My preferred scheme is a system where to submit a scrypt solution you must provide a security deposit with some minimum (say, 25 eth), and then there is a period of six hours where anyone can either challenge you (by submitting the 118 transactions to compute the scrypt result inside the blockchain) or outbid you (say, by at least 2x). If someone outbids you, then you or anyone else have six hours to outbid or challenge them. Once a challenge period runs out, or if the 118 transactions are submitted, the winner is determined based on either, if possible, the actual result of the 118 transactions or by who submitted the highest bid, and the winners and the transaction submitter proportionately collect 50% of the security deposits of the losers (the other 50% is burned). The theory is that the threat of someone submitting the 118 transactions disincentivizes people from submitting a bad scrypt solution in the first place, and if the initial deposit is too low then the escalation mechanism allows other players to force it higher. Hence, in the normal case, people will just submit correct scrypt solutions with the minimal deposit and everyone will be happy.
The next step is actually integrating this into a version of btcrelay. I am not an expert on how litecoin/dogecoin merge mining works, so I'll need some help here on taking this code and turning it into an actual dogecoin block header verifier. For reference the original btcrelay can be found here: https://github.com/ethereum/btcrelay/
I welcome any questions, whether on the code, the cryptoeconomics, how it can actually be used, or anything else!
submitted by vbuterin to ethereum [link] [comments]

[1 month] Looking for an ethereum multisig wallet source code. Need to create a multisig wallet with friends.

I need a working ethreum multisig wallet that I can deploy.
Found several multisig wallet source codes but I can't deploy them in ethereum wallet because they can't be compiled. Either they use an old version of solidity or I get the error "No visibility specified."
https://raw.githubusercontent.com/ethereum/dapp-bin/mastewallet/wallet.sol
https://github.com/gnosis/MultiSigWallet/blob/mastecontracts/MultiSigWallet.sol
Needless to say I also can't use Parity's multisig as it was hacked
https://etherscan.io/address/0x863df6bfa4469f3ead0be8f9f2aae51c91a907b4#code
EDIT:
Found several other codes here but still wasn't able to get it to work. Related support thread: https://www.reddit.com/ethereum/comments/7gn8z9/development_support_trying_to_create_a_multisig/
submitted by johnturtle to GoForGold [link] [comments]

Blockchain/Dapp Domains

Hi domainers,
I've created a domain portfolio focused on upcoming blockchains (Cardano, EOS, Lisk), the growing dapp industry, and puns using the 'block' keyword.
Each domain is for sale on Afternic with BIN prices (listed below), or you can make your own offer.
Feel free to PM me with any questions.
-TopCryptoDomains
submitted by TopCryptoDomains to Domains [link] [comments]

Blockchain/Dapp Domains

Hi domainers,
Instead of focusing on Bitcoin, I created a domain portfolio focused on upcoming blockchains (Cardano, EOS, Lisk), the growing dapp industry, and puns using the 'block' keyword.
They are all for sale on Afternic with BIN prices (listed below), or you can make your own offer.
Feel free to PM me with any questions.
-TopCryptoDomains
submitted by TopCryptoDomains to domainnames [link] [comments]

Solidity's string utils are a bit lacking - here's a workaround I came up with for a string.equals function

There's a fairly extensive library here I've been using for string utils: github.com/ethereum/dapp-bin/blob/mastelibrary/stringUtils.sol
However, I think the equals/compare methods could be considerably shortened/made more efficient.
Here is what I have been using for an equals function:
function equals(string _a, string _b) returns(bool){ return sha3(_a) == sha3(_b); } 
I've run this through my testnet to compare gas costs, and it seems to be much more efficient gas-wise, not to mention being far shorter and more simple than the previous solution.
Please let me know if anyone else has been using this, or if there are issues with this!
submitted by Janus_Alex to ethdev [link] [comments]

Looking for multisig wallet source code?

Found several multisig wallet source codes but I can't deploy them in ethereum wallet because they can't be compiled. Either they use an old version of solidity or I get the error "No visibility specified."
https://raw.githubusercontent.com/ethereum/dapp-bin/mastewallet/wallet.sol
https://github.com/gnosis/MultiSigWallet/blob/mastecontracts/MultiSigWallet.sol
EDIT:
Needless to say I also can't use Parity's multisig as it was hacked
https://etherscan.io/address/0x863df6bfa4469f3ead0be8f9f2aae51c91a907b4#code
submitted by johnturtle to ethereum [link] [comments]

If you are going to be building gambling sites, please use a smart contract so that users are guaranteed to recover their funds even if you shut down

See sample code here, that enforces provable fairness and gives the owner of the contract a 2-day time window to provide the seed or else everyone gets refunded and the contract suicides.
https://github.com/ethereum/dapp-bin/tree/masteserpent_gamble
The whole point of Ethereum is that it's much more than just a cryptocurrency and actually allows these kinds of reduced-trust interactions to happen, and so I would really love to see the community step up a bit and put a little more effort into showcasing these benefits; don't just make boring old centralized websites where we're still just as vulnerable to the owner running away. It would be great if, even for partially centralized services, this kind of fail-safe shutdown property would start to be incorporated more and become a community standard.
submitted by vbuterin to ethereum [link] [comments]

Automatic bug bounty for `multiowned` base contract

Multi-signature wallet is deployed at 0xb5f4651540ae4ad3a5c2a89b0d14eb06df886745 where you can see the wallet code. Balance is 10 Ether. Feel free to search for and exploit any security vulnerabilities in this code and capture by your own hand 10 ether stored in the wallet. That's why this bug bounty is completely automatic and dispute-free.
About multiowned contract. My objective was to create a general-purpose base class contract which provides multi-signature ownership control to any ethereum contract: token, crowdsale, wallet, etc. I enhanced a bit, audited, refactored and tested a part of existing solution which is credited in comments. I like this solution because it's general-purpose and user-friendly: sign any action is as easy as execute desired function in GUI with proper parameters. I considered gnosis multi-signature implementation, but found it inconvenient for the task at hand: it's wallet-centered and you have to pack data of transactions (for submitTransaction) manually. Plus, when confirming transaction (confirmTransaction) you see only transactionId which tells you nothing about action you are about to sign. Have't found any other decent implementation of multi-signature ownership control.
Bug bounty is open for a couple of weeks.
submitted by Eenae to ethdev [link] [comments]

Code a Youtube Clone with Blockchain - Ethereum, Solidity ... Ethereum and Algorand Dapp Development with Reach - YouTube How to build a dApp on Ethereum - YouTube SMART CONTRACT New DApp HOW TO EARN 50,000 ETHEREUM ... Ethereum Gold Stat Site Is Now LIVE! #dapp #crypto # ...

A place for all the ÐApps to live. Contribute to ethereum/dapp-bin development by creating an account on GitHub. Indeed, given its compatibility with Ethereum Virtual Machines and tools, developers should be able to run their current Ethereum dapps on the Smart Chain with little modification. Cross-chain bridges will enable tokens to move between the two blockchains too. Something that could be very important to allow the deep liquidity of Binance users to flow into both the Binance Smart Chain and ... Dapp Build, test, deploy and transact with Ethereum contracts from the comfort of the command-line. The dapp command is the basic user-facing tool in our development toolkit.. It is opinionated and designed to support a simple and robust workflow while being fast, predictable, and a good citizen of the Unix command line. Neben Ethereum haben sich offenbar auch EOS und Tron als Blockchains der dezentralen Anwendungen (DApps) etabliert. Der Vergleich zwischen den drei Plattformen zeigt, dass Ethereum zwar die meisten DApps, aber am wenigsten User und Transaktionen hat. Dafür sind die DApps bei Ethereum interessanter, während auf EOS und Tron hauptsächlich gegambelt wird. dapp-bin open issues Ask a question (View All Issues) about 4 years wallet.sol can't be compiled on latest ethereum wallet; over 4 years Todo: Make iterable mapping for multiple types, included a double iterable mapping; dapp-bin open pull requests (View All Pulls) Add initial and final kdf, allow multiple verifications. ...

[index] [715] [2622] [477] [5177] [4899] [2688] [2843] [2504] [1687] [127]

Code a Youtube Clone with Blockchain - Ethereum, Solidity ...

SMART CONTRACT New DApp HOW TO EARN 50,000 ETHEREUM Presentation in ENGLISH 🔗 ACTIVATION LINK 👉 https://i.eth50k.io/891 I*INSTRUCTIONS STEP-BY-STEP - HOW TO ... Ethereum Gold Stats - http://ethgoldstats.com/ Ethereum Gold Stat Site Is Now LIVE! #dapp #crypto #ethereum #gold #ethereumgold Become a Patron! - https://ww... Enjoy the videos and music you love, upload original content, and share it all with friends, family, and the world on YouTube. This video shows the user how to create a distributed application for both Ethereum and Algorand Blockchains using a single codebase 🤑 Become an in-demand blockchain MASTER: https://dappuniversity.com/bootcamp Subscribe to this channel: https://www.youtube.com/channel/UCY0xL8V6NzzFcwzHCgB8...

#