Estoy tratando de implementar un nuevo contrato para realizar pruebas en la red ropsten. Estoy usando remix y metamask, pero por alguna razón no puedo seleccionar Web3 inyectado (lo que solía ser la configuración estándar) y, por lo tanto, no se puede implementar.
¿Alguien que pueda ayudar?
El código es:
solidez de pragma ^0.4.11;
contrato ZorgPolisBasic {
address public patient;
address public huisarts;
address public specialist;
address public verzekeraar;
bool public verzekeraaraanvullenbasis;
bool public verzekeraaraanvullenspecialist;
bool public huisartsuitgevoerd;
bool public specialistuitgevoerd;
bool public doorverwijzen;
uint256 public huisartsentarief = 1 ether;
uint256 public specialistentarief = 2 ether;
string public akkoordgeven;
string public fraude;
string public artsendecla;
//alle parameters op 0
function ZorgPolisBasic(){
patient = msg.sender;
huisarts = 0x33E225e01bba3AA05ADDCD8F38142a8d47F9dC37;
specialist = 0xAB7fAE73effD38B5EdaD696E1fb062b0F6863459;
verzekeraar = 0xa8323F5fBcf1980B2093a633cF03020900B81d53;
verzekeraaraanvullenbasis = true;
fraude = "none";
}
//hier claimt de huisarts zijn consult
function huisartsclaim(){
huisartsuitgevoerd = true;
doorverwijzen = false;
akkoordgeven = "bevestig behandeling huisarts";
}
//hier verwijst huisarts door en claimt tegelijk zijn consult
function huisartsdoorverwijzing(){
huisartsuitgevoerd = true;
doorverwijzen = true;
verzekeraaraanvullenspecialist = true;
akkoordgeven = "bevestig behandeling huisarts";
}
//deze twee bevestigen danwel ontkennen de behandeling huisarts
function patientbevestigdHA (){
if (huisartsuitgevoerd==true){
huisarts.transfer(huisartsentarief);
verzekeraaraanvullenbasis = true;
huisartsuitgevoerd = false;
akkoordgeven = "";
artsendecla = "";
}else{
artsendecla = "Huisarts heeft nog niet geclaimd";
}
}
function patientontkentHA (){
if (huisartsuitgevoerd==true){
fraude = "patient ontkent behandeling huisarts";
huisartsuitgevoerd = false;
doorverwijzen = false;
akkoordgeven = "";
}else{
}
}
//hier claimt de specialist
function specialistclaim(){
if (doorverwijzen==false){
fraude = "specialist claimt zonder doorverwijzing";
}else{
specialistuitgevoerd = true;
akkoordgeven = "bevestig behandeling specialist";
}
}
//deze twee bevestigen danwel ontkennen de behandeling specialist
function patientbevestigdS (){
if (specialistuitgevoerd==true){
specialist.transfer(specialistentarief);
specialistuitgevoerd = false;
akkoordgeven = "";
artsendecla = "";
}else{
artsendecla = "Specialist heeft nog niet geclaimd";
}
}
function patientontkentS() {
if (specialistuitgevoerd==true){
fraude = "patient ontkent behandeling specialist";
specialistuitgevoerd = false;
akkoordgeven = "";
}else{
}
}
function aanvullenverzekeraar () payable{
verzekeraaraanvullenbasis = false;
verzekeraaraanvullenspecialist = false;
}
function clearstatussen (){
verzekeraaraanvullenbasis = false;
verzekeraaraanvullenspecialist = false;
huisartsuitgevoerd = false;
specialistuitgevoerd = false;
doorverwijzen = false;
akkoordgeven = "";
fraude = "none";
artsendecla = "";
}
}
Como dije cuando preguntaste en el canal de holgura de MetaMask, este error de análisis ocurre cuando el proveedor de RPC devuelve un mal resultado. MetaMask debería mejorar este mensaje de error, abriré un problema al respecto.
Para diagnosticar el problema con el proveedor, deberá abrir la consola en segundo plano e inspeccionar la mala respuesta de la red: https://github.com/#background-logs-chrome
olivier rikken
olivier rikken
SCBuergel
olivier rikken
olivier rikken
codificadorconactitud