Sending ether to Contract from another Contract

pragma solidity ^0.5.0; contract Contract1 { address payable owner; uint public value; constructor() public payable { owner = msg.sender; value = msg.value; } function() external payable { value = msg.value; } } contract Contract2{ Contract1 public c; function setContract(address payable _addr) public{ c = Contract1(_addr); } function() external payable{ } function sendEther() public payable{ address(c).transfer(msg.value);…

Send message in blockchain network using web3.shh

I want to send message from one address to another in the ethereum network using shh module of web3js library. const Web3 = require(‘web3’); const url = ‘http://localhost:7545’; const web3 = new Web3(url); const eventProvider = new Web3.providers.WebsocketProvider(‘ws://localhost:7545’) web3.setProvider(eventProvider); await web3.eth.net.isListening(); const POW_TIME = 100; const TTL = 20; const POW_TARGET = 2; await web3.shh.post({…