Skip to content
This repository has been archived by the owner on Jun 13, 2022. It is now read-only.

Commit

Permalink
Merge pull request #4 from Aku-mi/web3
Browse files Browse the repository at this point in the history
Web3 integration
  • Loading branch information
Akuqt authored Sep 1, 2021
2 parents 71f8e68 + 771e843 commit cafe48d
Show file tree
Hide file tree
Showing 20 changed files with 7,329 additions and 2,247 deletions.
9 changes: 9 additions & 0 deletions cattleia-backend/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
PORT=
JWT_ACCESS=
JWT_REFRESH=
MONGODB_URI=
DAPP_TOKEN=
INFURA_MAIN=
INFURA_ROPSTEN=
INFURA_RINKEBY=
GANACHE=
2 changes: 1 addition & 1 deletion cattleia-backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"typescript": "^4.3.5"
},
"dependencies": {
"@openzeppelin/contracts": "^4.3.0",
"@openzeppelin/contracts": "2.5",
"argon2": "^0.28.2",
"cookie-parser": "^1.4.5",
"cors": "^2.8.5",
Expand Down
6,090 changes: 6,090 additions & 0 deletions cattleia-backend/src/abis/CattleiaToken.json

Large diffs are not rendered by default.

914 changes: 914 additions & 0 deletions cattleia-backend/src/abis/Migrations.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions cattleia-backend/src/contracts/CattleiaToken.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.6;
pragma solidity ^0.5.0;

import "@openzeppelin/contracts/token/ERC20/";
// import "@openzeppelin/contracts/token/ERC20/";

contract CattleiaToken {
string public name;
Expand All @@ -19,7 +19,7 @@ contract CattleiaToken {
uint256 _value
);

constructor(string memory _name, string memory _symbol) {
constructor(string memory _name, string memory _symbol) public {
name = _name;
symbol = _symbol;
decimals = 18;
Expand Down
26 changes: 13 additions & 13 deletions cattleia-backend/src/contracts/Migrations.sol
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
// SPDX-License-Identifier: MIT
pragma solidity >=0.4.22 <0.9.0;
pragma solidity ^0.5.0;

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

modifier restricted() {
require(
msg.sender == owner,
"This function is restricted to the contract's owner"
);
_;
}
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;
}
function setCompleted(uint256 completed) public restricted {
last_completed_migration = completed;
}
}
Loading

0 comments on commit cafe48d

Please sign in to comment.