Skip to content

Commit caf5749

Browse files
committedMar 20, 2019
update hdwallet and add Migrations.sol
1 parent ba16eb8 commit caf5749

File tree

4 files changed

+84
-116
lines changed

4 files changed

+84
-116
lines changed
 

‎contracts/Migrations.sol

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
pragma solidity >=0.4.21 <0.6.0;
2+
3+
contract Migrations {
4+
address public owner;
5+
uint public last_completed_migration;
6+
7+
constructor() public {
8+
owner = msg.sender;
9+
}
10+
11+
modifier restricted() {
12+
if (msg.sender == owner) _;
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_migrations.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
const Migrations = artifacts.require("../node_modules/zeppelin-solidity/contracts/lifecycle/Migrations.sol");
1+
var Migrations = artifacts.require("./Migrations.sol");
22

33
module.exports = function(deployer) {
44
deployer.deploy(Migrations);
5-
};
5+
};

‎package-lock.json

+58-113
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"opensea-js": "latest",
2222
"openzeppelin-solidity": "^2.1.3",
2323
"truffle": "^5.0.7",
24-
"truffle-hdwallet-provider": "0.0.7-beta.0",
24+
"truffle-hdwallet-provider": "1.0.5",
2525
"web3": "^1.0.0-beta.34"
2626
},
2727
"engines": {

0 commit comments

Comments
 (0)