Skip to content

Commit

Permalink
chore: update contracts name to more meaningful
Browse files Browse the repository at this point in the history
  • Loading branch information
GitGuru7 committed Feb 20, 2024
1 parent 50eaa72 commit 52c53b9
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@ import { ensureNonzeroAddress } from "@venusprotocol/solidity-utilities/contract
import { ExponentialNoError } from "@venusprotocol/solidity-utilities/contracts/ExponentialNoError.sol";

/**
* @title BaseTokenProxyOFT
* @title BaseTokenBridge
* @author Venus
* @notice The BaseTokenProxyOFT contract is tailored for facilitating cross-chain transactions with an ERC20 token.
* @notice The BaseTokenBridge contract is tailored for facilitating cross-chain transactions with an ERC20 token.
* It manages transaction limits of a single and daily transactions.
* This contract inherits key functionalities from other contracts, including pausing capabilities and error handling.
* It holds state variables for the inner token and maps for tracking transaction limits and statistics across various chains and addresses.
* The contract allows the owner to configure limits, set whitelists, and control pausing.
* Internal functions conduct eligibility check of transactions, making the contract a fundamental component for cross-chain token management.
*/

abstract contract BaseTokenProxyOFT is Pausable, ExponentialNoError, BaseOFTV2 {
abstract contract BaseTokenBridge is Pausable, ExponentialNoError, BaseOFTV2 {
using SafeERC20 for IERC20;
IERC20 internal immutable innerToken;

Check warning on line 24 in contracts/Bridge/BaseTokenBridge.sol

View workflow job for this annotation

GitHub Actions / Lint

Immutable variables name are set to be in capitalized SNAKE_CASE
uint256 internal immutable ld2sdRate;

Check warning on line 25 in contracts/Bridge/BaseTokenBridge.sol

View workflow job for this annotation

GitHub Actions / Lint

Immutable variables name are set to be in capitalized SNAKE_CASE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
pragma solidity 0.8.13;

import { IMultichainToken } from "./../interfaces/IMultichainToken.sol";
import { BaseTokenProxyOFT } from "./BaseTokenProxyOFT.sol";
import { BaseTokenBridge } from "./BaseTokenBridge.sol";
import { ensureNonzeroAddress } from "@venusprotocol/solidity-utilities/contracts/validators.sol";

/**
* @title TokenProxyOFT
* @title MintableTokenBridge
* @author Venus
* @notice TokenProxyOFT contract builds upon the functionality of its parent contract, BaseTokenProxyOFT,
* @notice MintableTokenBridge contract builds upon the functionality of its parent contract, BaseTokenBridge,
* and focuses on managing token transfers to the chain where token is mintable and burnable.
* It provides functions to check eligibility and perform the actual token transfers while maintaining strict access controls and pausing mechanisms.
*/

contract TokenProxyOFT is BaseTokenProxyOFT {
contract MintableTokenBridge is BaseTokenBridge {
/**
* @notice Regulates the force minting; It should be true only if the token manage by this Bridge contract can be mintable on both source and destination chains.
*/
Expand All @@ -33,7 +33,7 @@ contract TokenProxyOFT is BaseTokenProxyOFT {
address lzEndpoint_,
address oracle_,
bool isForceMintActive_
) BaseTokenProxyOFT(tokenAddress_, sharedDecimals_, lzEndpoint_, oracle_) {
) BaseTokenBridge(tokenAddress_, sharedDecimals_, lzEndpoint_, oracle_) {
isForceMintActive = isForceMintActive_;
}

Expand Down
6 changes: 3 additions & 3 deletions contracts/Bridge/TokenBridgeAdmin.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pragma solidity 0.8.13;

import { AccessControlledV8 } from "@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV8.sol";
import { ensureNonzeroAddress } from "@venusprotocol/solidity-utilities/contracts/validators.sol";
import { ITokenProxyOFT } from "./../interfaces/ITokenProxyOFT.sol";
import { ITokenBridge } from "./../interfaces/ITokenBridge.sol";

/**
* @title TokenBridgeAdmin
Expand All @@ -15,7 +15,7 @@ import { ITokenProxyOFT } from "./../interfaces/ITokenProxyOFT.sol";
*/
contract TokenBridgeAdmin is AccessControlledV8 {
/// @custom:oz-upgrades-unsafe-allow state-variable-immutable
ITokenProxyOFT public immutable tokenBridge;
ITokenBridge public immutable tokenBridge;
/**
* @notice A mapping keeps track of function signature associated with function name string.
*/
Expand All @@ -29,7 +29,7 @@ contract TokenBridgeAdmin is AccessControlledV8 {
/// @custom:oz-upgrades-unsafe-allow constructor
constructor(address TokenBridge_) {
ensureNonzeroAddress(TokenBridge_);
tokenBridge = ITokenProxyOFT(TokenBridge_);
tokenBridge = ITokenBridge(TokenBridge_);
_disableInitializers();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
pragma solidity 0.8.13;

/**
* @title ITokenProxyOFT
* @title ITokenBridge
* @author Venus
* @notice Interface implemented by `TokenProxyOFT`.
*/
interface ITokenProxyOFT {
interface ITokenBridge {
function transferOwnership(address addr) external;

function setTrustedRemoteAddress(uint16 remoteChainId, bytes calldata srcAddress) external;
Expand Down

0 comments on commit 52c53b9

Please sign in to comment.