Any opensource (github) ETH based scriptural transaction + data scripts available

I am looking for a ‘github’ or open-sourced script/framework so that I can scripturally automate an eth transaction from ‘a’ to ‘b’ that will include ‘data’ within the transaction. Like a smart-contract + application to pull from DB and push into the smart contract which then deducts the nominal value from the wallet for the…

Can i disable direct transactions to smart contract address?

I want to use rewardsAmount variable to calculate my rewards: uint rewardsAmount = 0; // Only here i can withdraw rewards function withdrawRewards() onlyOwner external { require(rewardsAmount != 0); owner.transfer(rewardsAmount); rewardsAmount = 0; } // If the contract doesn’t have users funds, then i can destroy it function kill() onlyOwner external { require(address(this).balance – rewardsAmount…

How can I turn this into a human readable output?

I have this buy function but the output gives me a transaction Nr. or whatever this is async function buy() { var a = document.getElementById(“amount”).value; var accounts= await web3.eth.getAccounts(); console.log(accounts); var contract = new web3.eth.Contract(abi,address); contract.methods.buy(a, “0x0000000000000000000000000000000000000000”).send( {from:accounts[0]}, function(error, approve){ if(error){ console.log(error) } else if(approve){ console.log(“you bought :” + approve) } }); }; And this…