Skip to content
Merged
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
12 changes: 3 additions & 9 deletions contracts/ETHHelper.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import "@openzeppelin/contracts/access/Ownable.sol";
import "@ironblocks/firewall-consumer/contracts/FirewallConsumer.sol";

contract ETHHelper is Ownable, FirewallConsumer {
constructor() {
constructor() Ownable(_msgSender()) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IsPayble = false;
}

Expand Down Expand Up @@ -33,16 +33,10 @@ contract ETHHelper is Ownable, FirewallConsumer {
IsPayble = !IsPayble;
}

function TransferETH(address payable _Reciver, uint256 _amount)
internal
firewallProtectedSig(0xfd69c215)
{
function TransferETH(address payable _Reciver, uint256 _amount) internal firewallProtectedSig(0xfd69c215) {
emit TransferOutETH(_amount, _Reciver);
uint256 beforeBalance = address(_Reciver).balance;
_Reciver.transfer(_amount);
require(
(beforeBalance + _amount) == address(_Reciver).balance,
"The transfer did not complite"
);
require((beforeBalance + _amount) == address(_Reciver).balance, "The transfer did not complite");
}
}
2 changes: 1 addition & 1 deletion contracts/GovManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ contract GovManager is Ownable, FirewallConsumer {
emit GovernorUpdated(oldGov, GovernorContract);
}

constructor() {
constructor() Ownable(_msgSender()) {
GovernorContract = address(0);
}
}
2 changes: 1 addition & 1 deletion contracts/PausableHelper.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

pragma solidity ^0.8.4;

import "@openzeppelin/contracts/security/Pausable.sol";
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

import "@openzeppelin/contracts/utils/Pausable.sol";
import "./GovManager.sol";

/**
Expand Down
5 changes: 4 additions & 1 deletion contracts/token/ERC20Token.sol
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ contract ERC20Token is ERC20, Ownable {
* @dev assign totalSupply to account creating this contract
*/

constructor(string memory _TokenName, string memory _TokenSymbol) ERC20(_TokenName, _TokenSymbol) {
constructor(
string memory _TokenName,
string memory _TokenSymbol
) ERC20(_TokenName, _TokenSymbol) Ownable(_msgSender()) {
_mint(msg.sender, 5_000_000 * 10 ** 18);
}

Expand Down
8 changes: 2 additions & 6 deletions contracts/token/ERC721Token.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,17 @@ pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


contract ERC721Token is ERC721URIStorage {
using Counters for Counters.Counter;
Counters.Counter private _tokenIds;
uint256 private _tokenIdCounter;

constructor() ERC721("GameItem", "ITM") {}

function awardItem(address player, string memory tokenURI)
public
returns (uint256)
{
_tokenIds.increment();

uint256 newItemId = _tokenIds.current();
uint256 newItemId = ++_tokenIdCounter;
_mint(player, newItemId);
_setTokenURI(newItemId, tokenURI);

Expand Down
2 changes: 1 addition & 1 deletion hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import 'solidity-coverage';
const config: HardhatUserConfig = {
defaultNetwork: 'hardhat',
solidity: {
version: '0.8.19',
version: '0.8.24',
settings: {
evmVersion: 'istanbul',
optimizer: {
Expand Down
Loading