Skip to content

Commit

Permalink
Update contract name
Browse files Browse the repository at this point in the history
  • Loading branch information
LouisPosition committed Jul 14, 2022
1 parent 45be677 commit 21e3a18
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";

contract PositionCreditBUSD is ERC20, Ownable {
contract PositionBUSDBonus is ERC20, Ownable {
mapping(address => bool) public _insuranceFundContracts;
mapping(address => bool) internal _whitelistAddresses;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import {verifyContract} from "../../scripts/utils";

const migrations: MigrationDefinition = {
getTasks: (context: MigrationContext) => ({
'deploy position credit busd token': async () => {
'deploy position busd bonus token': async () => {
const name = ''
const symbol = ''
const creditToken = await context.hre.ethers.getContractFactory('PositionCreditBUSD')
const creditToken = await context.hre.ethers.getContractFactory('PositionBUSDBonus')
if(await context.db.findAddressByKey(symbol) ) return;
const deployTx = await creditToken.deploy(name, symbol)
await deployTx.deployTransaction.wait(3)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import {PositionCreditBUSD} from "../../typeChain";
import {PositionBUSDBonus} from "../../typeChain";
import { ethers } from "hardhat";
import { BigNumber, Signer } from "ethers";
import {expect, use} from "chai"

describe("Position Credit BUSD", function () {
let creditToken: PositionCreditBUSD;
describe("Position BUSD Bonus", function () {
let creditToken: PositionBUSDBonus;
let deployer : any;
let trader1 : any;
let trader2 : any;
Expand All @@ -13,15 +13,15 @@ describe("Position Credit BUSD", function () {

beforeEach(async function () {
[deployer, trader1, trader2, insuranceFund, minter] = await ethers.getSigners()
const creditTokenFactory = await ethers.getContractFactory("PositionCreditBUSD")
creditToken = (await creditTokenFactory.deploy("Position Credit BUSD","PBUSD")) as unknown as PositionCreditBUSD
const creditTokenFactory = await ethers.getContractFactory("PositionBUSDBonus")
creditToken = (await creditTokenFactory.deploy("Position BUSD Bonus","PBUSD")) as unknown as PositionBUSDBonus
await creditToken.updateInsuranceFundContracts(insuranceFund.getAddress(),true)
});

it("should deploy success", async function () {
expect(creditToken.address).to.not.equal(ethers.constants.AddressZero)
expect(creditToken.address).to.not.equal(undefined)
expect(await creditToken.name()).equal("Position Credit BUSD")
expect(await creditToken.name()).equal("Position BUSD Bonus")
expect(await creditToken.symbol()).equal("PBUSD")
expect(await creditToken.owner()).equal(deployer.address)
expect(await creditToken.isWhitelistAddress(deployer.address)).equal(true)
Expand Down

0 comments on commit 21e3a18

Please sign in to comment.