Skip to content

Commit

Permalink
[Contract] Change token name KIOS to LYT
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelKim20 committed Apr 3, 2024
1 parent 289ed75 commit 2890b46
Show file tree
Hide file tree
Showing 36 changed files with 153 additions and 200 deletions.
48 changes: 3 additions & 45 deletions active_contracts.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"bosagora_mainnet": {
"loyalty_mainnet": {
"LoyaltyToken": "0xB1A90a5C6e30d64Ab6f64C30eD392F46eDBcb022",
"Validator": "0x4Ca91738C7cD24895467c6d550D96BE8dC4b33AA",
"CurrencyRate": "0x979a62090BDCff36F2e140F6915fbAdA7510cb6a",
Expand All @@ -13,49 +13,7 @@
"Shop": "0xB4B0d4D6aAd2f963CC2FaeCBb4B8C94C3eeE6DB8",
"Ledger": "0xcAde85D03A2ABd41b608004BBB25440D28C64912"
},
"bosagora_testnet": {
"LoyaltyToken": "0xB1A90a5C6e30d64Ab6f64C30eD392F46eDBcb022",
"Validator": "0x4Ca91738C7cD24895467c6d550D96BE8dC4b33AA",
"CurrencyRate": "0x979a62090BDCff36F2e140F6915fbAdA7510cb6a",
"LoyaltyBurner": "0x5B4f8F9566706D4dB7f5E3020cE0485f96415749",
"LoyaltyProvider": "0xDD91A65534847537c290FEbc721cf8457f860744",
"LoyaltyConsumer": "0xb9CE93eeb00a74Deeec319cBCD37938b5aAE6314",
"LoyaltyExchanger": "0x1ae7b2564Ae7a7Fb1E7976F3F71cAF43ef49ac6F",
"LoyaltyTransfer": "0xcAE5A9f266991dcEdc62bb9291f15E112f212820",
"BridgeValidator": "0xE7D4f38Fad1C1C5EAA8A1280678B860a7A9519c1",
"LoyaltyBridge": "0xd73e6a2f2e47236F1Ff737E72497f598652122F9",
"Shop": "0xB4B0d4D6aAd2f963CC2FaeCBb4B8C94C3eeE6DB8",
"Ledger": "0xcAde85D03A2ABd41b608004BBB25440D28C64912"
},
"bosagora_devnet": {
"LoyaltyToken": "0xB1A90a5C6e30d64Ab6f64C30eD392F46eDBcb022",
"Validator": "0x4Ca91738C7cD24895467c6d550D96BE8dC4b33AA",
"CurrencyRate": "0x979a62090BDCff36F2e140F6915fbAdA7510cb6a",
"LoyaltyBurner": "0x5B4f8F9566706D4dB7f5E3020cE0485f96415749",
"LoyaltyProvider": "0xDD91A65534847537c290FEbc721cf8457f860744",
"LoyaltyConsumer": "0xb9CE93eeb00a74Deeec319cBCD37938b5aAE6314",
"LoyaltyExchanger": "0x1ae7b2564Ae7a7Fb1E7976F3F71cAF43ef49ac6F",
"LoyaltyTransfer": "0xcAE5A9f266991dcEdc62bb9291f15E112f212820",
"BridgeValidator": "0xE7D4f38Fad1C1C5EAA8A1280678B860a7A9519c1",
"LoyaltyBridge": "0xd73e6a2f2e47236F1Ff737E72497f598652122F9",
"Shop": "0xB4B0d4D6aAd2f963CC2FaeCBb4B8C94C3eeE6DB8",
"Ledger": "0xcAde85D03A2ABd41b608004BBB25440D28C64912"
},
"kios_mainnet": {
"LoyaltyToken": "0xB1A90a5C6e30d64Ab6f64C30eD392F46eDBcb022",
"Validator": "0x4Ca91738C7cD24895467c6d550D96BE8dC4b33AA",
"CurrencyRate": "0x979a62090BDCff36F2e140F6915fbAdA7510cb6a",
"LoyaltyBurner": "0x5B4f8F9566706D4dB7f5E3020cE0485f96415749",
"LoyaltyProvider": "0xDD91A65534847537c290FEbc721cf8457f860744",
"LoyaltyConsumer": "0xb9CE93eeb00a74Deeec319cBCD37938b5aAE6314",
"LoyaltyExchanger": "0x1ae7b2564Ae7a7Fb1E7976F3F71cAF43ef49ac6F",
"LoyaltyTransfer": "0xcAE5A9f266991dcEdc62bb9291f15E112f212820",
"BridgeValidator": "0xE7D4f38Fad1C1C5EAA8A1280678B860a7A9519c1",
"LoyaltyBridge": "0xd73e6a2f2e47236F1Ff737E72497f598652122F9",
"Shop": "0xB4B0d4D6aAd2f963CC2FaeCBb4B8C94C3eeE6DB8",
"Ledger": "0xcAde85D03A2ABd41b608004BBB25440D28C64912"
},
"kios_testnet": {
"loyalty_testnet": {
"LoyaltyToken": "0x3A90432BBfd5Bd87788f397F46c24685492fb30E",
"Validator": "0x7265F4D550AEdc3Ed97a6ae6dDAf4289eDFaC0C5",
"CurrencyRate": "0xE2EE763820443c6953B7e9c4bD3D729509524a4D",
Expand All @@ -69,7 +27,7 @@
"Shop": "0x011BD972Ee1724a300250Bf614ACE1ddC5DEe37E",
"Ledger": "0x2fD2Cdae46578dCa6AB208feCb247E5B25876309"
},
"kios_devnet": {
"loyalty_devnet": {
"LoyaltyToken": "0xB1A90a5C6e30d64Ab6f64C30eD392F46eDBcb022",
"Validator": "0x4Ca91738C7cD24895467c6d550D96BE8dC4b33AA",
"CurrencyRate": "0x979a62090BDCff36F2e140F6915fbAdA7510cb6a",
Expand Down
4 changes: 2 additions & 2 deletions packages/contracts-lib/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dms-osx-lib",
"version": "2.10.3",
"version": "2.11.0",
"description": "",
"main": "dist/bundle-cjs.js",
"module": "dist/bundle-esm.js",
Expand All @@ -10,7 +10,7 @@
},
"scripts": {
"build:contracts": "cd ../contracts && yarn build",
"build": "find ../contracts/artifacts/contracts/ ../contracts/artifacts/loyalty-tokens/contracts/ -name '*.json' -type f | grep -v '.dbg.json' | xargs typechain --target=ethers-v5 --out-dir ./types",
"build": "find ../contracts/artifacts/contracts/ ../contracts/artifacts/loyalty-tokens/contracts/ ../contracts/artifacts/dms-bridge-contracts/contracts/ -name '*.json' -type f | grep -v '.dbg.json' | xargs typechain --target=ethers-v5 --out-dir ./types",
"build:npm": "rollup --config rollup.config.ts"
},
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion packages/contracts/contracts/Reference.sol
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import "multisig-wallet-contracts/contracts/MultiSigWalletFactory.sol";
import "multisig-wallet-contracts/contracts/MultiSigWallet.sol";

import "loyalty-tokens/contracts/LoyaltyToken.sol";
import "loyalty-tokens/contracts/KIOS.sol";
import "loyalty-tokens/contracts/LYT.sol";

import "dms-bridge-contracts/contracts/interfaces/IBridge.sol";
import "dms-bridge-contracts/contracts/interfaces/IBridgeLiquidity.sol";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ pragma solidity ^0.8.2;

import "loyalty-tokens/contracts/BIP20/BIP20DelegatedTransfer.sol";

contract TestKIOS is BIP20DelegatedTransfer {
constructor(address owner) BIP20DelegatedTransfer("KIOS", "KIOS") {
contract TestLYT is BIP20DelegatedTransfer {
constructor(address owner) BIP20DelegatedTransfer("LYT", "LYT") {
_mint(owner, 1e10 * 1e18);
}

Expand Down
12 changes: 5 additions & 7 deletions packages/contracts/deploy/main_chain_devnet/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,16 @@ import fs from "fs";
import * as hre from "hardhat";
import { ethers, upgrades } from "hardhat";

const network = "bosagora_devnet";
const network = "main_chain_devnet";

export const MULTI_SIG_WALLET_ADDRESSES: { [key: string]: string } = {
bosagora_mainnet: "0x6d9493FB6D8c8bD3534a3E1F4163921161BEf187",
bosagora_testnet: "0x6d9493FB6D8c8bD3534a3E1F4163921161BEf187",
bosagora_devnet: "0x6d9493FB6D8c8bD3534a3E1F4163921161BEf187",
main_chain_devnet: "0x6d9493FB6D8c8bD3534a3E1F4163921161BEf187",
side_chain_devnet: "0x6d9493FB6D8c8bD3534a3E1F4163921161BEf187",
};

export const LOYALTY_TOKEN_ADDRESSES: { [key: string]: string } = {
bosagora_mainnet: "0xB1A90a5C6e30d64Ab6f64C30eD392F46eDBcb022",
bosagora_testnet: "0xB1A90a5C6e30d64Ab6f64C30eD392F46eDBcb022",
bosagora_devnet: "0xB1A90a5C6e30d64Ab6f64C30eD392F46eDBcb022",
main_chain_devnet: "0xB1A90a5C6e30d64Ab6f64C30eD392F46eDBcb022",
side_chain_devnet: "0xB1A90a5C6e30d64Ab6f64C30eD392F46eDBcb022",
};

interface IDeployedContract {
Expand Down
21 changes: 9 additions & 12 deletions packages/contracts/deploy/side_chain_devnet/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {
MultiSigWallet,
PhoneLinkCollection,
Shop,
TestKIOS,
TestLYT,
Validator,
} from "../../typechain-types";

Expand All @@ -30,24 +30,21 @@ import fs from "fs";

import * as hre from "hardhat";

const network = "bosagora_devnet";
const network = "side_chain_devnet";

export const PHONE_LINK_COLLECTION_ADDRESSES: { [key: string]: string } = {
bosagora_mainnet: "0xaE7018CaF086EB2Ca62eAA7b91B61dDA6b046F70",
bosagora_testnet: "0xaE7018CaF086EB2Ca62eAA7b91B61dDA6b046F70",
bosagora_devnet: "0xaE7018CaF086EB2Ca62eAA7b91B61dDA6b046F70",
main_chain_devnet: "0xaE7018CaF086EB2Ca62eAA7b91B61dDA6b046F70",
side_chain_devnet: "0xaE7018CaF086EB2Ca62eAA7b91B61dDA6b046F70",
};

export const MULTI_SIG_WALLET_ADDRESSES: { [key: string]: string } = {
bosagora_mainnet: "0x6d9493FB6D8c8bD3534a3E1F4163921161BEf187",
bosagora_testnet: "0x6d9493FB6D8c8bD3534a3E1F4163921161BEf187",
bosagora_devnet: "0x6d9493FB6D8c8bD3534a3E1F4163921161BEf187",
main_chain_devnet: "0x6d9493FB6D8c8bD3534a3E1F4163921161BEf187",
side_chain_devnet: "0x6d9493FB6D8c8bD3534a3E1F4163921161BEf187",
};

export const LOYALTY_TOKEN_ADDRESSES: { [key: string]: string } = {
bosagora_mainnet: "0xB1A90a5C6e30d64Ab6f64C30eD392F46eDBcb022",
bosagora_testnet: "0xB1A90a5C6e30d64Ab6f64C30eD392F46eDBcb022",
bosagora_devnet: "0xB1A90a5C6e30d64Ab6f64C30eD392F46eDBcb022",
main_chain_devnet: "0xB1A90a5C6e30d64Ab6f64C30eD392F46eDBcb022",
side_chain_devnet: "0xB1A90a5C6e30d64Ab6f64C30eD392F46eDBcb022",
};

interface IDeployedContract {
Expand Down Expand Up @@ -928,7 +925,7 @@ async function deploySideChainBridge(accounts: IAccount, deployment: Deployments

const chainId = (await hre.ethers.provider.getNetwork()).chainId;
{
const tokenContract = (await deployment.getContract("LoyaltyToken")) as TestKIOS;
const tokenContract = (await deployment.getContract("LoyaltyToken")) as TestLYT;
const tokenId = ContractUtils.getTokenId(await tokenContract.name(), await tokenContract.symbol());
await contract.connect(accounts.deployer).registerToken(tokenId, tokenContract.address);
const assetAmount = Amount.make(500_000_000, 18).value;
Expand Down
4 changes: 2 additions & 2 deletions packages/contracts/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dms-osx-artifacts",
"version": "2.10.3",
"version": "2.11.0",
"description": "Smart contracts that decentralized point systems",
"files": [
"**/*.sol"
Expand Down Expand Up @@ -69,6 +69,6 @@
"del-osx-artifacts": "^2.3.0",
"dms-bridge-contracts": "^1.2.3",
"multisig-wallet-contracts": "^1.1.0",
"loyalty-tokens": "^1.0.7"
"loyalty-tokens": "^1.1.0"
}
}
2 changes: 1 addition & 1 deletion packages/contracts/src/utils/ContractUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import { verifyMessage } from "@ethersproject/wallet";
import * as hre from "hardhat";

export enum LoyaltyNetworkID {
KIOS,
LYT,
PNB,
}

Expand Down
2 changes: 1 addition & 1 deletion packages/contracts/test/00-Validator.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ describe("Test for Validator", () => {
before(async () => {
await deployments.doDeployToken();

tokenContract = deployments.getContract("TestKIOS") as ERC20;
tokenContract = deployments.getContract("TestLYT") as ERC20;

for (const elem of deployments.accounts.validators) {
await tokenContract.connect(deployments.accounts.owner).transfer(elem.address, amount.value);
Expand Down
16 changes: 8 additions & 8 deletions packages/contracts/test/01-CurrencyRate.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ describe("Test for CurrencyRate", () => {
before(async () => {
await deployments.doDeployValidator();

tokenContract = deployments.getContract("TestKIOS") as ERC20;
tokenContract = deployments.getContract("TestLYT") as ERC20;
validatorContract = deployments.getContract("Validator") as Validator;

const currencyRateFactory = await ethers.getContractFactory("CurrencyRate");
Expand Down Expand Up @@ -58,7 +58,7 @@ describe("Test for CurrencyRate", () => {
rate: multiple.mul(1),
},
{
symbol: "KIOS",
symbol: "LYT",
rate: multiple.mul(150),
},
];
Expand Down Expand Up @@ -86,7 +86,7 @@ describe("Test for CurrencyRate", () => {
rate: multiple.mul(1),
},
{
symbol: "KIOS",
symbol: "LYT",
rate: multiple.mul(150),
},
];
Expand Down Expand Up @@ -116,7 +116,7 @@ describe("Test for CurrencyRate", () => {
rate: multiple.mul(1),
},
{
symbol: "KIOS",
symbol: "LYT",
rate: multiple.mul(150),
},
];
Expand Down Expand Up @@ -146,7 +146,7 @@ describe("Test for CurrencyRate", () => {
rate: multiple.mul(1),
},
{
symbol: "KIOS",
symbol: "LYT",
rate: multiple.mul(150),
},
];
Expand Down Expand Up @@ -176,7 +176,7 @@ describe("Test for CurrencyRate", () => {
rate: multiple.mul(1),
},
{
symbol: "KIOS",
symbol: "LYT",
rate: multiple.mul(150),
},
];
Expand Down Expand Up @@ -212,7 +212,7 @@ describe("Test for CurrencyRate", () => {
rate: multiple.mul(1),
},
{
symbol: "KIOS",
symbol: "LYT",
rate: multiple.mul(150),
},
];
Expand Down Expand Up @@ -245,7 +245,7 @@ describe("Test for CurrencyRate", () => {
rate: multiple.mul(1),
},
{
symbol: "KIOS",
symbol: "LYT",
rate: multiple.mul(150),
},
];
Expand Down
4 changes: 2 additions & 2 deletions packages/contracts/test/03-Shop.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ describe("Test for Shop", () => {
const deployAllContract = async () => {
await deployments.doDeployCurrencyRate();

tokenContract = deployments.getContract("TestKIOS") as ERC20;
tokenContract = deployments.getContract("TestLYT") as ERC20;
validatorContract = deployments.getContract("Validator") as Validator;
currencyContract = deployments.getContract("CurrencyRate") as CurrencyRate;
};
Expand Down Expand Up @@ -107,7 +107,7 @@ describe("Test for Shop", () => {

before("Set Shop ID", async () => {
for (const elem of shopData) {
elem.shopId = ContractUtils.getShopId(elem.wallet.address, LoyaltyNetworkID.KIOS);
elem.shopId = ContractUtils.getShopId(elem.wallet.address, LoyaltyNetworkID.LYT);
}
});

Expand Down
18 changes: 9 additions & 9 deletions packages/contracts/test/04-Ledger.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ describe("Test for Ledger", () => {
const deployAllContract = async (shopData: IShopData[]) => {
await deployments.doDeployAll();

tokenContract = deployments.getContract("TestKIOS") as ERC20;
tokenContract = deployments.getContract("TestLYT") as ERC20;
validatorContract = deployments.getContract("Validator") as Validator;
currencyContract = deployments.getContract("CurrencyRate") as CurrencyRate;

Expand Down Expand Up @@ -237,7 +237,7 @@ describe("Test for Ledger", () => {

before("Set Shop ID", async () => {
for (const elem of shopData) {
elem.shopId = ContractUtils.getShopId(elem.wallet.address, LoyaltyNetworkID.KIOS);
elem.shopId = ContractUtils.getShopId(elem.wallet.address, LoyaltyNetworkID.LYT);
}
});

Expand Down Expand Up @@ -1853,7 +1853,7 @@ describe("Test for Ledger", () => {

before("Set Shop ID", async () => {
for (const elem of shopData) {
elem.shopId = ContractUtils.getShopId(elem.wallet.address, LoyaltyNetworkID.KIOS);
elem.shopId = ContractUtils.getShopId(elem.wallet.address, LoyaltyNetworkID.LYT);
}
});

Expand Down Expand Up @@ -2012,7 +2012,7 @@ describe("Test for Ledger", () => {

before("Set Shop ID", async () => {
for (const elem of shopData) {
elem.shopId = ContractUtils.getShopId(elem.wallet.address, LoyaltyNetworkID.KIOS);
elem.shopId = ContractUtils.getShopId(elem.wallet.address, LoyaltyNetworkID.LYT);
}
});

Expand Down Expand Up @@ -2199,7 +2199,7 @@ describe("Test for Ledger", () => {

before("Set Shop ID", async () => {
for (const elem of shopData) {
elem.shopId = ContractUtils.getShopId(elem.wallet.address, LoyaltyNetworkID.KIOS);
elem.shopId = ContractUtils.getShopId(elem.wallet.address, LoyaltyNetworkID.LYT);
}
});

Expand Down Expand Up @@ -2650,7 +2650,7 @@ describe("Test for Ledger", () => {

before("Set Shop ID", async () => {
for (const elem of shopData) {
elem.shopId = ContractUtils.getShopId(elem.wallet.address, LoyaltyNetworkID.KIOS);
elem.shopId = ContractUtils.getShopId(elem.wallet.address, LoyaltyNetworkID.LYT);
}
});

Expand Down Expand Up @@ -2883,7 +2883,7 @@ describe("Test for Ledger", () => {

before("Set Shop ID", async () => {
for (const elem of shopData) {
elem.shopId = ContractUtils.getShopId(elem.wallet.address, LoyaltyNetworkID.KIOS);
elem.shopId = ContractUtils.getShopId(elem.wallet.address, LoyaltyNetworkID.LYT);
}
});

Expand Down Expand Up @@ -3257,7 +3257,7 @@ describe("Test for Ledger", () => {

before("Set Shop ID", async () => {
for (const elem of shopData) {
elem.shopId = ContractUtils.getShopId(elem.wallet.address, LoyaltyNetworkID.KIOS);
elem.shopId = ContractUtils.getShopId(elem.wallet.address, LoyaltyNetworkID.LYT);
}
});

Expand Down Expand Up @@ -3466,7 +3466,7 @@ describe("Test for Ledger", () => {

before("Set Shop ID", async () => {
for (const elem of shopData) {
elem.shopId = ContractUtils.getShopId(elem.wallet.address, LoyaltyNetworkID.KIOS);
elem.shopId = ContractUtils.getShopId(elem.wallet.address, LoyaltyNetworkID.LYT);
}
});

Expand Down
Loading

0 comments on commit 2890b46

Please sign in to comment.