Skip to content

Commit a6148b9

Browse files
committed
Initializing truffle
1 parent 02472d2 commit a6148b9

9 files changed

+867
-1
lines changed

.editorconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 2
6+
max_line_length = 100
7+
insert_final_newline = false
8+
trim_trailing_whitespace = true
9+
end_of_line = lf
10+
charset = utf-8

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.DS_Store
2+
.node*
3+
node_modules
4+
build/*
5+
!build/.keep
6+

.travis.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
language: node_js
2+
node_js:
3+
- "10"
4+
- "9"

README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,11 @@
1-
# ethereum-erc721
1+
# ERC-721 Token
2+
3+
This is a complete implementation of the [ERC-721](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md) non-fungible token standard for the Ethereum blockchain.
4+
5+
This is an open source project build with [Truffle](http://truffleframework.com) framework.
6+
7+
# Licence (MIT)
8+
9+
```
10+
Copyright (c) 2018 0xcert admin@0xcert.org.
11+
```

contracts/Migrations.sol

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
pragma solidity ^0.4.23;
2+
3+
contract Migrations {
4+
address public owner;
5+
uint public last_completed_migration;
6+
7+
modifier restricted() {
8+
if (msg.sender == owner) _;
9+
}
10+
11+
constructor() public {
12+
owner = msg.sender;
13+
}
14+
15+
function setCompleted(uint completed) public restricted {
16+
last_completed_migration = completed;
17+
}
18+
19+
function upgrade(address new_address) public restricted {
20+
Migrations upgraded = Migrations(new_address);
21+
upgraded.setCompleted(last_completed_migration);
22+
}
23+
}

migrations/1_initial_migration.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
var Migrations = artifacts.require("./Migrations.sol");
2+
3+
module.exports = function(deployer) {
4+
deployer.deploy(Migrations);
5+
};

0 commit comments

Comments
 (0)