Skip to content

Commit

Permalink
replace contract with deployed
Browse files Browse the repository at this point in the history
  • Loading branch information
0xAleksaOpacic committed Sep 18, 2024
1 parent 413e56d commit f4cad0a
Show file tree
Hide file tree
Showing 15 changed files with 41 additions and 662 deletions.
21 changes: 19 additions & 2 deletions contracts/Currency.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

pragma solidity ^0.8.0;

import "./nil/NilCurrencyBase.sol";
import "@nilfoundation/smart-contracts/contracts/NilCurrencyBase.sol";

contract Currency is NilCurrencyBase {

Expand All @@ -12,6 +12,23 @@ contract Currency is NilCurrencyBase {

tokenName = _currencyName;
}

receive() external payable {}

/**
* @dev Sends currency to a specified address
* This is a workaround until we are able to send external messages to smart contracts
* For production, consider implementing access control, such as Ownable from OpenZeppelin
*/
function sendCurrencyPublic(address to, uint256 currencyId, uint256 amount) public {
sendCurrencyInternal(to, currencyId, amount);
}

/**
* @dev Mints new currency
* This is a workaround until we are able to send external messages to smart contracts
* For production, consider implementing access control, such as Ownable from OpenZeppelin
*/
function mintCurrencyPublic(uint256 amount) public {
mintCurrencyInternal(amount);
}
}
4 changes: 2 additions & 2 deletions contracts/UniswapV2Pair.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ pragma solidity ^0.8.0;
import "./interfaces/IUniswapV2Pair.sol";
import "./libraries/Math.sol";
import "./interfaces/IUniswapV2Factory.sol";
import {NilCurrencyBase} from "./nil/NilCurrencyBase.sol";
import "@nilfoundation/smart-contracts/contracts/NilCurrencyBase.sol";
import "./libraries/SafeMath.sol";
import "./nil/Nil.sol";
import "@nilfoundation/smart-contracts/contracts/Nil.sol";

contract UniswapV2Pair is NilCurrencyBase, IUniswapV2Pair {
using SafeMath for uint;
Expand Down
5 changes: 2 additions & 3 deletions contracts/UniswapV2Router01.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@ pragma solidity ^0.8.0;
import './interfaces/IUniswapV2Router01.sol';
import './interfaces/IUniswapV2Factory.sol';
import './libraries/UniswapV2Library.sol';
import './nil/NilCurrencyBase.sol';
import './nil/Nil.sol';
import "./nil/Nil.sol";
import "@nilfoundation/smart-contracts/contracts/NilCurrencyBase.sol";
import "@nilfoundation/smart-contracts/contracts/Nil.sol";
import "./interfaces/IUniswapV2Pair.sol";

contract UniswapV2Router01 is IUniswapV2Router01, NilCurrencyBase {
Expand Down
308 changes: 0 additions & 308 deletions contracts/nil/Nil.sol

This file was deleted.

Loading

0 comments on commit f4cad0a

Please sign in to comment.