Skip to content

Commit

Permalink
Merge 3087c22 into 5f2f29d
Browse files Browse the repository at this point in the history
  • Loading branch information
andresilva committed Jun 1, 2018
2 parents 5f2f29d + 3087c22 commit cc8d4d9
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 16 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,18 @@
[travis-url]: https://travis-ci.org/parity-contracts/dapp-registry
[coveralls-image]: https://coveralls.io/repos/github/parity-contracts/dapp-registry/badge.svg?branch=master
[coveralls-url]: https://coveralls.io/github/parity-contracts/dapp-registry?branch=master

## Getting started

This project uses the [Truffle](http://truffleframework.com/) framework. To install the required
dependencies run:

```
yarn install
```

To run the test suite:

```
yarn test
```
22 changes: 11 additions & 11 deletions contracts/DappReg.sol
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
//! See the License for the specific language governing permissions and
//! limitations under the License.

pragma solidity ^0.4.17;
pragma solidity ^0.4.22;

import "./Owned.sol";

Expand All @@ -31,6 +31,16 @@ contract DappReg is Owned {
mapping (bytes32 => bytes32) meta;
}

event MetaChanged(bytes32 indexed id, bytes32 indexed key, bytes32 value);
event OwnerChanged(bytes32 indexed id, address indexed owner);
event Registered(bytes32 indexed id, address indexed owner);
event Unregistered(bytes32 indexed id);

mapping (bytes32 => Dapp) dapps;
bytes32[] ids;

uint public fee = 1 ether;

modifier whenFeePaid {
require(msg.value >= fee);
_;
Expand All @@ -56,16 +66,6 @@ contract DappReg is Owned {
_;
}

event MetaChanged(bytes32 indexed id, bytes32 indexed key, bytes32 value);
event OwnerChanged(bytes32 indexed id, address indexed owner);
event Registered(bytes32 indexed id, address indexed owner);
event Unregistered(bytes32 indexed id);

mapping (bytes32 => Dapp) dapps;
bytes32[] ids;

uint public fee = 1 ether;

// add apps
function register(bytes32 _id)
public
Expand Down
10 changes: 5 additions & 5 deletions contracts/Owned.sol
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@
//! See the License for the specific language governing permissions and
//! limitations under the License.

pragma solidity ^0.4.17;
pragma solidity ^0.4.22;


contract Owned {
event NewOwner(address indexed old, address indexed current);

address public owner = msg.sender;

modifier onlyOwner {
require(msg.sender == owner);
_;
}

event NewOwner(address indexed old, address indexed current);

address public owner = msg.sender;

function setOwner(address _new)
public
onlyOwner
Expand Down

0 comments on commit cc8d4d9

Please sign in to comment.