Skip to content
Open
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
19 changes: 19 additions & 0 deletions contracts/Migrations.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// SPDX-License-Identifier: MIT
pragma solidity >=0.4.22 <0.9.0;

contract Migrations {
address public owner = msg.sender;
uint public last_completed_migration;

modifier restricted() {
require(
msg.sender == owner,
"This function is restricted to the contract's owner"
);
_;
}

function setCompleted(uint completed) public restricted {
last_completed_migration = completed;
}
}
2 changes: 1 addition & 1 deletion migrations/1_initial_migration.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const Migrations = artifacts.require("Migrations");

module.exports = function(deployer) {
module.exports = function (deployer) {
deployer.deploy(Migrations);
};
7 changes: 4 additions & 3 deletions migrations/2_deploy_contracts.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,17 @@ const DaiToken = artifacts.require('DaiToken')
const TokenFarm = artifacts.require('TokenFarm')

module.exports = async function(deployer, network, accounts) {

// Deploy Mock DAI Token
await deployer.deploy(DaiToken)
const daiToken = await DaiToken.deployed()
await deployer.deploy(DaiToken)
const daiToken = await DaiToken.deployed()

// Deploy Dapp Token
await deployer.deploy(DappToken)
const dappToken = await DappToken.deployed()

// Deploy TokenFarm
await deployer.deploy(TokenFarm, dappToken.address, daiToken.address)
await deployer.deploy(TokenFarm, dappToken.address, daiToken.address)
const tokenFarm = await TokenFarm.deployed()

// Transfer all tokens to TokenFarm (1 million)
Expand Down
56,667 changes: 41,042 additions & 15,625 deletions package-lock.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
"chai-bignumber": "3.0.0",
"identicon.js": "^2.3.3",
"react": "16.8.4",
"react-bootstrap": "1.0.0-beta.5",
"react-bootstrap": "^1.4.3",
"react-dom": "16.8.4",
"react-scripts": "2.1.3",
"truffle": "5.1.39",
"react-scripts": "^4.0.2",
"truffle": "^5.1.66",
"web3": "1.2.11"
},
"scripts": {
Expand Down
5,067 changes: 2,619 additions & 2,448 deletions src/abis/DaiToken.json

Large diffs are not rendered by default.

5,067 changes: 2,619 additions & 2,448 deletions src/abis/DappToken.json

Large diffs are not rendered by default.

1,426 changes: 760 additions & 666 deletions src/abis/Migrations.json

Large diffs are not rendered by default.

6,131 changes: 3,174 additions & 2,957 deletions src/abis/TokenFarm.json

Large diffs are not rendered by default.

Empty file added test/.gitkeep
Empty file.
109 changes: 0 additions & 109 deletions test/TokenFarm.test.js

This file was deleted.

Loading