Official Go implementation of the Ethereum protocol
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
go-ethereum/index.html

29 lines
727 B

<!doctype>
<html>
<head>
<script type="text/javascript" src="main.js"></script>
<script type="text/javascript">
function registerName() {
var name = document.querySelector("#name").value;
name = eth.fromAscii(name);
eth.transact({to: "NameReg", gas: "10000", gasPrice: eth.gasPrice, data: [eth.fromAscii("register"), name]}).then(function(tx) {
document.querySelector("#result").innerHTML = "Registered name. Please wait for the next block to come through.";
}, function(err) {
console.log(err);
});
}
</script>
</head>
<body>
<h1>std::name_reg</h1>
<input type="text" id="name"></input>
<input type="submit" onClick="registerName();"></input>
<div id="result"></div>
</body>
</html>