https://ethereum.stackexchange.com/questions/21448/how-to-get-a-contracts-balance-in-solidity
function contractbalance() public view returns (uint256){ return address(this).balance; }
var thecontract = web3.eth.contract([{"constant":false,"inputs":[{"name":"x","type":"uint256"}],"name":"set","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"get","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"gett","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"buy","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_from","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Set","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"tokens","type":"uint256"}],"name":"Buyvalue","type":"event"}]); var MyContract = thecontract.at('0xbed0229199614a11e47c39d4800420de968627fa'); MyContract.buy({ from:'0x5921a4C1B13afbD4b61d63e9c7BD47741C47B176', value:web3.toWei("1", "ether") }, console.log)
Just try to click website function or action. Like compile, then try again console
web3.eth.accounts
maybe no error
Or
var web3 = new Web3(new Web3.providers.HttpProvider(“http://myLocalHostIP:myRpcPort”));
https://remix.ethereum.org/
Method 1: No function name
function () payable external { t = msg.value; emit Buyvalue(msg.value); } function () payable external {
OR
function () external payable {
pragma solidity >=0.4.0 <0.6.0; contract SimpleStorage { uint storedData; uint256 t; event Set(address indexed _from, uint value); event Buyvalue(uint tokens); function set(uint x) public { storedData = x; emit Set(msg.sender, x); } function get() public view returns (uint) { return storedData; } function gett() public view returns (uint) { return t; } function () payable external { t = msg.
https://www.ethereum.org/token
https://theethereum.wiki/w/index.php/ERC20_Token_Standard
https://github.com/bokkypoobah/Tokens#fixed-supply-token
和朋友聊天提到
隱私資料,來源不刪除沒關係,但不能被關連到
這點 一開始 我覺得 這跟刪掉來源,同等難度
但 今天看一些區塊鍊文章時,其中有一個點,跟這有關
上鍊後資料無法刪除,那就只能像妳說的,採用 不能被關連到來處理
當然 肯定要有一個完整的關制才行,看將來有沒有人提出了
https://www.samsonhoi.com/677/blockchain-ethereum-testing-network
https://www.samsonhoi.com/