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

testINT #48

Open
123456788940 opened this issue Sep 13, 2023 · 2 comments
Open

testINT #48

123456788940 opened this issue Sep 13, 2023 · 2 comments
Labels
review Review is used by var/core contributor in order to finalise it before even deploytestnet function

Comments

@123456788940
Copy link
Collaborator

// SPDX-License-Identifier: MIT
pragma solidity ^0.8;

import "@openzeppelin/contracts/token/ERC20/ERC20.sol";

contract TestINT is ERC20 {
constructor(uint256 initialSupply) ERC20("TestINT", "TINT") {
_mint(msg.sender, initialSupply * (10 ** uint256(decimals())));
}
}

@123456788940
Copy link
Collaborator Author

// SPDX-License-Identifier: MIT
pragma solidity ^0.8;

import "@openzeppelin/contracts/token/ERC20/ERC20.sol";

contract TestUSDT is ERC20 {
constructor(uint256 initialSupply) ERC20("testUSDT", "TUSDT") {
_mint(msg.sender, initialSupply * 10 ** uint256(decimals()));
}
}

@123456788940
Copy link
Collaborator Author

// SPDX-License-Identifier: MIT
pragma solidity ^0.8;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

contract tokenSwapper{
IERC20 public testINT;
IERC20 public testUSDT;

constructor(IERC20 _testINT, IERC20 _testUSDT) {
    testINT=IERC20(_testINT);
     testUSDT=IERC20(_testUSDT);

}

function swap(uint amount) external{
    require(amount > 0, "Amount must be greater than zero");
    require(testINT.transferFrom(msg.sender, address(this), amount), "TransferFrom failed");
    require(testUSDT.transfer(msg.sender, amount), "Transfer failed");

}

}

@123456788940 123456788940 added the review Review is used by var/core contributor in order to finalise it before even deploytestnet function label Sep 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
review Review is used by var/core contributor in order to finalise it before even deploytestnet function
Projects
None yet
Development

No branches or pull requests

1 participant