CRYPTO NEWS

Chinese court invalidates 2019 car sale made using now worthless crypto token

It appears that not only was the sales contract invalidated, but the buyer paid for the car with a questionable digital token in the first place.

Solidity | How to throw "string" argument using Send() function?

I have a function which get a parameter as String and compare it like below. function freezeAccount(string _value) onlyOwner public { if (keccak256(_value) == keccak256(“true”)){ isFrozen = “true”; } if (keccak256(_value) == keccak256(“false”)){ isFrozen = “false”; } } Above is my smart contract code. I wanna use this my method using web3 so I’m trying::Listen

I have a function which get a parameter as String and compare it like below.

function freezeAccount(string _value) onlyOwner public {     if (keccak256(_value) == keccak256("true")){ isFrozen = "true"; }     if (keccak256(_value) == keccak256("false")){ isFrozen = "false"; } } 

Above is my smart contract code. I wanna use this my method using web3 so I’m trying to make transition by send() function like below.

export const setFreezeAccount = value => { console.log("setFreezeAccount :: value: ", value);   const str = value.toString();    myContract.methods   .freezeAccount(str)   .send({ from: TOKENOWNER })   .then(receipt => {     console.log("setFreezeAccount :: receipt: ", receipt);   })   .catch(err => {     console.log("setFreezeAccount :: err: ", err);   }); }; 

The freezeAccount() function is working well on Remix IDE but the Error: Invalid JSON RPC response: "" error returned When I execute the setFreezeAccount() function.

Chinese court invalidates 2019 car sale made using now worthless crypto token

Shopping cart
There are no products in the cart!
Continue shopping
0