Skip to content

Commit

Permalink
chore: use relative import and add docs
Browse files Browse the repository at this point in the history
  • Loading branch information
huyhuynh3103 committed Jan 2, 2024
1 parent 0e00588 commit adb78b0
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 4 deletions.
1 change: 0 additions & 1 deletion remappings.txt

This file was deleted.

10 changes: 10 additions & 0 deletions src/interfaces/IWRON.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,25 @@
pragma solidity ^0.8.0;

interface IWRON {
/**
* @dev Deposit RON and increase balance WRON tokens of sender.
*/
function deposit() external payable;

/// @dev See {IERC20-transfer}.
function transfer(address to, uint256 value) external returns (bool);

/// @dev See {IERC20-transferFrom}.
function transferFrom(address src, address dst, uint256 wad) external returns (bool);

/**
* @dev Withdraw RON and decrease balance WRON tokens of sender.
*/
function withdraw(uint256) external;

/// @dev See {IERC20-balanceOf}.
function balanceOf(address) external view returns (uint256);

/// @dev See {IERC20-approve}.
function approve(address guy, uint256 wad) external returns (bool);
}
15 changes: 15 additions & 0 deletions src/interfaces/IWRONHelper.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,24 @@
pragma solidity ^0.8.0;

interface IWRONHelper {
/**
* @dev Returns WRON address.
*/
function WRON() external view returns (address);

/**
* @dev Deposit WRON and withdraw RON token.
*
* Requirements:
* - This contract must be approved `amount` WRON tokens by sender.
*/
function withdraw(uint256 amount) external;

/**
* @dev Deposit WRON and withdraw RON token to address `to`.
*
* Requirements:
* - This contract must be approved `amount` WRON tokens by sender.
*/
function withdrawTo(address payable to, uint256 amount) external;
}
2 changes: 1 addition & 1 deletion src/legacy/transfers/RONTransferHelper.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import { Strings } from "@openzeppelin/contracts/utils/Strings.sol";
import { Strings } from "../../../lib/openzeppelin-contracts/contracts/utils/Strings.sol";

/**
* @title RONTransferHelper
Expand Down
2 changes: 1 addition & 1 deletion src/legacy/transfers/TransferFromHelper.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import { Strings } from "@openzeppelin/contracts/utils/Strings.sol";
import { Strings } from "../../../lib/openzeppelin-contracts/contracts/utils/Strings.sol";

/**
* @title TransferFromHelper
Expand Down
2 changes: 1 addition & 1 deletion src/legacy/transfers/TransferHelper.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import { Strings } from "@openzeppelin/contracts/utils/Strings.sol";
import { Strings } from "../../../lib/openzeppelin-contracts/contracts/utils/Strings.sol";

/**
* @title TransferHelper
Expand Down

0 comments on commit adb78b0

Please sign in to comment.