Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(adapter): Add RGT to Tribe migration adapter [SIM-52] #188

Merged
Show file tree
Hide file tree
Changes from 1 commit
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
8 changes: 2 additions & 6 deletions contracts/mocks/external/TribePegExchangerMock.sol
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,10 @@ pragma solidity 0.6.10;

import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
import "hardhat/console.sol";

/**
@title Contract to exchange RGT with TRIBE post-merger
*/
* @title Contract to exchange RGT with TRIBE post-merger
*/
contract TribePegExchangerMock {
using SafeERC20 for IERC20;

Expand All @@ -49,11 +48,8 @@ contract TribePegExchangerMock {
function exchange(uint256 amount) public {
uint256 tribeOut = amount * exchangeRate / scalar;
IERC20(rgt).safeTransferFrom(msg.sender, address(this), amount);
console.log("transferred from rgt");
console.log("transferring %s", tribeOut);
console.log(IERC20(tribe).balanceOf(address(this)));
pblivin0x marked this conversation as resolved.
Show resolved Hide resolved
IERC20(tribe).safeTransfer(msg.sender, tribeOut);
console.log("transferred tribe");
emit Exchange(msg.sender, amount, tribeOut);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ contract RgtMigrationWrapAdapter {
/* ============ External Getter Functions ============ */

/**
* Generates the calldata to migrate KNC Legacy to KNC.
* Generates the calldata to migrate RGT tokens to TRIBE tokens.
*
* @param _underlyingUnits Total quantity of underlying units to wrap
*
Expand Down