Skip to content

Commit

Permalink
Merge pull request #11 from delta-mpc/0.5.2
Browse files Browse the repository at this point in the history
0.5.2
  • Loading branch information
mh739025250 authored May 20, 2022
2 parents e0baa26 + 5912c7b commit 90e15d0
Show file tree
Hide file tree
Showing 16 changed files with 72 additions and 15,368 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules
.idea
test.js
build
16 changes: 11 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
FROM node:14.15.4-alpine
FROM node:16

WORKDIR /app
COPY . .
RUN yarn
ENTRYPOINT ["npm", "run"]
CMD ["server"]

COPY contracts/ /app/contracts
COPY migrations/ /app/migrations
COPY truffle-config.js /app/truffle-config.js

RUN npm install -g truffle && truffle compile

ENTRYPOINT [ "truffle" ]
CMD [ "migrate" ]
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;
}
}
Loading

0 comments on commit 90e15d0

Please sign in to comment.