Skip to content

Commit

Permalink
initial structure
Browse files Browse the repository at this point in the history
  • Loading branch information
dgaviola committed Aug 31, 2018
1 parent c311c04 commit b94d44a
Show file tree
Hide file tree
Showing 7 changed files with 84 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.idea/
slingr-security-tokens.iml
security-tokens.iml
installed_contracts
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# slingr-security-tokens
# SLINGR Security Tokens

Protocol for security tokens smart contracts that work with the SLINGR Transfer Agent app.
23 changes: 23 additions & 0 deletions contracts/Migrations.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
pragma solidity ^0.4.23;

contract Migrations {
address public owner;
uint public last_completed_migration;

constructor() public {
owner = msg.sender;
}

modifier restricted() {
if (msg.sender == owner) _;
}

function setCompleted(uint completed) public restricted {
last_completed_migration = completed;
}

function upgrade(address new_address) public restricted {
Migrations upgraded = Migrations(new_address);
upgraded.setCompleted(last_completed_migration);
}
}
16 changes: 16 additions & 0 deletions ethpm.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"package_name": "slingr-security-tokens",
"version": "0.0.1",
"description": "Contracts to create SLINGR security tokens",
"authors": [
"Diego Gaviola <dgaviola@slingr.io>"
],
"keywords": [
"tokens",
"security"
],
"dependencies": {
"zeppelin": "1.3.0"
},
"license": "MIT"
}
5 changes: 5 additions & 0 deletions migrations/1_initial_migration.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
var Migrations = artifacts.require("./Migrations.sol");

module.exports = function(deployer) {
deployer.deploy(Migrations);
};
18 changes: 18 additions & 0 deletions truffle-config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
* NB: since truffle-hdwallet-provider 0.0.5 you must wrap HDWallet providers in a
* function when declaring them. Failure to do so will cause commands to hang. ex:
* ```
* mainnet: {
* provider: function() {
* return new HDWalletProvider(mnemonic, 'https://mainnet.infura.io/<infura-key>')
* },
* network_id: '1',
* gas: 4500000,
* gasPrice: 10000000000,
* },
*/

module.exports = {
// See <http://truffleframework.com/docs/advanced/configuration>
// to customize your Truffle configuration!
};
18 changes: 18 additions & 0 deletions truffle.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
* NB: since truffle-hdwallet-provider 0.0.5 you must wrap HDWallet providers in a
* function when declaring them. Failure to do so will cause commands to hang. ex:
* ```
* mainnet: {
* provider: function() {
* return new HDWalletProvider(mnemonic, 'https://mainnet.infura.io/<infura-key>')
* },
* network_id: '1',
* gas: 4500000,
* gasPrice: 10000000000,
* },
*/

module.exports = {
// See <http://truffleframework.com/docs/advanced/configuration>
// to customize your Truffle configuration!
};

0 comments on commit b94d44a

Please sign in to comment.