Explicit type conversion not allowed from “bytes32” to “address”

I am using solidity 0.5.0 when i compile code i am throwing exception as Explicit type conversion not allowed from “bytes32” to “address”. code is working fine in remix IDE and my code is as function orderItem(uint _itemid,string memory _itemname ) public returns(address){ address uniqueId = address(sha256(msg.sender,’block.timestamp’)); packagemapping[uniqueId].isuidgenerated = true; packagemapping[uniqueId].itemid = _itemid; packagemapping[uniqueId].itemname =…

Explicit type conversion not allowed from “bytes32” to “address”

I am using solidity 0.5.0 when i compile code i am throwing exception as Explicit type conversion not allowed from “bytes32” to “address”. code is working fine in remix IDE and my code is as function orderItem(uint _itemid,string memory _itemname ) public returns(address){ address uniqueId = address(sha256(msg.sender,’block.timestamp’)); packagemapping[uniqueId].isuidgenerated = true; packagemapping[uniqueId].itemid = _itemid; packagemapping[uniqueId].itemname =…

Explicit type conversion not allowed from “bytes32” to “address”

I am using solidity 0.5.0 when i compile code i am throwing exception as Explicit type conversion not allowed from “bytes32” to “address”. code is working fine in remix IDE and my code is as function orderItem(uint _itemid,string memory _itemname ) public returns(address){ address uniqueId = address(sha256(msg.sender,’block.timestamp’)); packagemapping[uniqueId].isuidgenerated = true; packagemapping[uniqueId].itemid = _itemid; packagemapping[uniqueId].itemname =…

Deposit Function in Tokens Reflects Deflatonary Tokens

I have a function here function TokenDeposit(address tokenAddress, uint256 tokenDeposit) public { uint256 decimal = uint256(decimals(tokenAddress)); uint256 take = tokenDeposit; if (decimal != 0) { take = tokenDeposit / (10 ** decimal); if (take < 1) { revert(); } } transferToken = tokenToTransfer(tokenAddress); transferToken.transferFrom(msg.sender, address(this), tokenDeposit); tokenUserData[tokenAddress][msg.sender].userTokenBalance += take; } What is there to do…

Automatically set app instance in Truffle console

Is there a way to load the truffle console with the following variables without having to do manual type-ins on every test? let app = await MyContract.deployed(); let accounts = web3.eth.getAccounts(); Excuse the naivety, starting out with Solidity/Truffle and asking the basic questions that don’t seem to be answered (probably because they’re not possible).

Not able to add ‘replayPastTransactionsFlowable’ transaction logs result into an collection List object using Web3j java?

I’m trying to create an api where i have to provide transaction logs in json objects but im unable to add result of replayPastTransactionsFlowable into an collection object @GetMapping(“/test”) public List<Transaction> test() throws InterruptedException, ExecutionException, IOException { String address = “0xeedc155ae507fb0a9becae6315286183a23229b0”; List<Transaction> transactions = new ArrayList<Transaction>(); Web3j web3j = web3jConfig.initializeWeb3j(); System.out.println(“test Running…….”); BigInteger block =…