Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing compiler errors - pragma solidity #1174

Merged
merged 1 commit into from
Nov 20, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions example/contract.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

// solidity code code
var source = "" +
"pragma solidity ^0.4.6;" +
"contract test {\n" +
" function multiply(uint a) constant returns(uint d) {\n" +
" return a * 7;\n" +
Expand Down
1 change: 1 addition & 0 deletions example/contract_array.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

// solidity code code
var source = "" +
"pragma solidity ^0.4.6;" +
"contract test {\n" +
" function take(uint[] a, uint b) constant returns(uint d) {\n" +
" return a[b];\n" +
Expand Down
5 changes: 3 additions & 2 deletions example/event_inc.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
web3.setProvider(new web3.providers.HttpProvider('http://localhost:8545'));

var source = "" +
"pragma solidity ^0.4.6;" +
"contract Contract { " +
" event Incremented(bool indexed odd, uint x); " +
" function Contract() { " +
Expand All @@ -22,8 +23,8 @@
"}";

var compiled = web3.eth.compile.solidity(source);
var code = compiled.Contract.code;
var abi = compiled.Contract.info.abiDefinition;
var code = compiled.code;
var abi = compiled.info.abiDefinition;

var address;
var contract;
Expand Down
14 changes: 7 additions & 7 deletions example/namereg.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
web3.eth.defaultAccount = from;

window.onload = function () {
var filter = web3.eth.namereg.Changed();
var filter = web3.eth.namereg().Changed();
filter.watch(function (err, event) {
// live update all fields
onAddressKeyUp();
Expand All @@ -23,21 +23,21 @@

function registerOwner() {
var name = document.getElementById('registerOwner').value;
web3.eth.namereg.reserve(name);
web3.eth.namereg().reserve(name);
document.getElementById('nameAvailability').innerText += ' Registering name in progress, please wait...';
};

function changeAddress() {
var name = document.getElementById('registerOwner').value;
var address = document.getElementById('newAddress').value;
web3.eth.namereg.setAddress(name, address, true);
web3.eth.namereg().setAddress(name, address, true);
document.getElementById('currentAddress').innerText += ' Changing address in progress. Please wait.';
};

function onRegisterOwnerKeyUp() {
var name = document.getElementById('registerOwner').value;
var owner = web3.eth.namereg.owner(name)
document.getElementById('currentAddress').innerText = web3.eth.namereg.addr(name);
var owner = web3.eth.namereg().owner(name)
document.getElementById('currentAddress').innerText = web3.eth.namereg().addr(name);
if (owner !== '0x0000000000000000000000000000000000000000') {
if (owner === from) {
document.getElementById('nameAvailability').innerText = "This name is already owned by you " + owner;
Expand All @@ -51,12 +51,12 @@

function onAddressKeyUp() {
var address = document.getElementById('address').value;
document.getElementById('nameOf').innerText = web3.eth.namereg.name(address);
document.getElementById('nameOf').innerText = web3.eth.namereg().name(address);
};

function onNameKeyUp() {
var name = document.getElementById('name').value;
document.getElementById('addressOf').innerText = web3.eth.namereg.addr(name);
document.getElementById('addressOf').innerText = web3.eth.namereg().addr(name);
};

</script>
Expand Down