Skip to content

Commit

Permalink
Rename ACC with DMS or KIOS
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelKim20 committed Aug 12, 2024
1 parent b99ddc5 commit 82d080c
Show file tree
Hide file tree
Showing 52 changed files with 2,481 additions and 3,169 deletions.
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ This package contains the code for the smart contract.

This package is what is needed to create an SDK by utilizing the code of the smart contract.

## Faker

This package functions to store fake purchase data in a smart contract.

## Relay

This package has two functions.
Expand Down
6 changes: 3 additions & 3 deletions active_contracts.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"acc_mainnet": {
"kios_mainnet": {
"LoyaltyToken": "0xB5e4d7AF952F612A2CCB1474b49bd03459F1429f",
"PhoneLinkCollection": "0x8382d54B85e30706e9Bbf62825D0fE2a7Ef9D0C7",
"Validator": "0x18087d75396BEEABC97528083237DB0B0652CB9b",
Expand All @@ -14,7 +14,7 @@
"Shop": "0x7ebbe71bDB2B22808A3954D77df7EAb1cED5133d",
"Ledger": "0x6a77Fc2308C5326615921909358bACb904E5a1B0"
},
"acc_testnet": {
"kios_testnet": {
"LoyaltyToken": "0x8D34D6102AD64abDa8bcF36c278140bAC4D97323",
"PhoneLinkCollection": "0x23074adeD2E687C30483A64869AaA0e8C22e90C9",
"Validator": "0x80DAa9bF9B8Db32A36141DE9308784e91e9215FF",
Expand All @@ -29,7 +29,7 @@
"Shop": "0x911b2749053f966c651777A4485DDB4E33CE495F",
"Ledger": "0xe782E73900613EF72E972C9e73669e1e0aBc859E"
},
"acc_devnet": {
"kios_devnet": {
"LoyaltyToken": "0xB1A90a5C6e30d64Ab6f64C30eD392F46eDBcb022",
"PhoneLinkCollection": "0x3bAB9e04b609dE0d51Aa74261fFD5fcE555b4b0B",
"Validator": "0x01dfc87EC0f8B199cF841079EC1fF394d7f59455",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "dms-osx",
"version": "1.0.0",
"description": "A smart contract framework that decentralized loyalty systems",
"repository": "https://github.com/acc-coin/acc-osx",
"repository": "https://github.com/bosagora/dms-osx",
"author": "BOSagora Foundation",
"license": "AGPL-3.0-or-later",
"private": true,
Expand Down
10 changes: 5 additions & 5 deletions packages/contracts/contracts/Reference.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import "multisig-wallet-contracts/contracts/MultiSigWallet.sol";
import "loyalty-tokens/contracts/LoyaltyToken.sol";
import "loyalty-tokens/contracts/LYT.sol";

import "acc-bridge-contracts-v2/contracts/interfaces/IBridge.sol";
import "acc-bridge-contracts-v2/contracts/interfaces/IBridgeLiquidity.sol";
import "acc-bridge-contracts-v2/contracts/interfaces/IBridgeValidator.sol";
import "acc-bridge-contracts-v2/contracts/bridge/Bridge.sol";
import "acc-bridge-contracts-v2/contracts/bridge/BridgeValidator.sol";
import "dms-bridge-contracts-v2/contracts/interfaces/IBridge.sol";
import "dms-bridge-contracts-v2/contracts/interfaces/IBridgeLiquidity.sol";
import "dms-bridge-contracts-v2/contracts/interfaces/IBridgeValidator.sol";
import "dms-bridge-contracts-v2/contracts/bridge/Bridge.sol";
import "dms-bridge-contracts-v2/contracts/bridge/BridgeValidator.sol";
6 changes: 3 additions & 3 deletions packages/contracts/contracts/controllers/LoyaltyBridge.sol
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";

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

import "acc-bridge-contracts-v2/contracts/interfaces/IBridge.sol";
import "acc-bridge-contracts-v2/contracts/interfaces/IBridgeValidator.sol";
import "acc-bridge-contracts-v2/contracts/lib/BridgeLib.sol";
import "dms-bridge-contracts-v2/contracts/interfaces/IBridge.sol";
import "dms-bridge-contracts-v2/contracts/interfaces/IBridgeValidator.sol";
import "dms-bridge-contracts-v2/contracts/lib/BridgeLib.sol";

import "../lib/DMS.sol";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ pragma solidity ^0.8.2;

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

import "acc-bridge-contracts-v2/contracts/interfaces/IBridge.sol";
import "acc-bridge-contracts-v2/contracts/interfaces/IBridgeValidator.sol";
import "dms-bridge-contracts-v2/contracts/interfaces/IBridge.sol";
import "dms-bridge-contracts-v2/contracts/interfaces/IBridgeValidator.sol";

import "../interfaces/ILedger.sol";

Expand Down
4 changes: 2 additions & 2 deletions packages/contracts/contracts/ledger/Ledger.sol
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";

import "loyalty-tokens/contracts/BIP20/BIP20DelegatedTransfer.sol";
import "acc-bridge-contracts-v2/contracts/interfaces/IBridgeLiquidity.sol";
import "acc-bridge-contracts-v2/contracts/lib/BridgeLib.sol";
import "dms-bridge-contracts-v2/contracts/interfaces/IBridgeLiquidity.sol";
import "dms-bridge-contracts-v2/contracts/lib/BridgeLib.sol";

import "../interfaces/ICurrencyRate.sol";
import "../interfaces/ILedger.sol";
Expand Down
2 changes: 1 addition & 1 deletion packages/contracts/contracts/lib/DMS.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ library DMS {
uint256 public constant TOKEN_MAX_PROTOCOL_FEE = 5e18;
uint256 public constant TOKEN_DEFAULT_PROTOCOL_FEE = 1e17;

string public constant DEFAULT_CURRENCY_SYMBOL = "php";
string public constant DEFAULT_CURRENCY_SYMBOL = "krw";

/// @notice Hash value of a blank string
bytes32 public constant NULL = 0x32105b1d0b88ada155176b58ee08b45c31e4f2f7337475831982c313533b880c;
Expand Down
2 changes: 1 addition & 1 deletion packages/contracts/contracts/token/TestLYT.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pragma solidity ^0.8.2;
import "loyalty-tokens/contracts/BIP20/BIP20DelegatedTransfer.sol";

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

Expand Down
20 changes: 10 additions & 10 deletions packages/contracts/deploy/data/shops.json
Original file line number Diff line number Diff line change
@@ -1,69 +1,69 @@
[
{
"shopId": "0x0001be96d74202df38fd21462ffcef10dfe0fcbd7caa3947689a3903e8b6b874",
"shopId": "0x0005be96d74202df38fd21462ffcef10dfe0fcbd7caa3947689a3903e8b6b874",
"name": "Shop-0001",
"currency": "php",
"address": "0xafFe745418Ad24c272175e5B58610A8a35e2EcDa",
"privateKey": "0xa237d68cbb66fd5f76e7b321156c46882546ad87d662dec8b82703ac31efbf0a"
},
{
"shopId": "0x00015f59d6b480ff5a30044dcd7fe3b28c69b6d0d725ca469d1b685b57dfc105",
"shopId": "0x00055f59d6b480ff5a30044dcd7fe3b28c69b6d0d725ca469d1b685b57dfc105",
"name": "Shop-0002",
"currency": "php",
"address": "0xD10ADf251463A260242c216c8c7D3e736eBdB398",
"privateKey": "0x05152ad8d5b14d3f65539e0e42131bc72cbdd16c486cb215d60b7dc113ca1ebd"
},
{
"shopId": "0x000108f12f827f0521be34e7563948dc778cb80f7498cebb57cb1a62840d96eb",
"shopId": "0x000508f12f827f0521be34e7563948dc778cb80f7498cebb57cb1a62840d96eb",
"name": "Shop-0003",
"currency": "php",
"address": "0xD12e250C8F5C3720297CeBF5A50655A8e2348847",
"privateKey": "0xf4b8aa615834c57d1e4836c683c8d3460f8ff232667dc317f82844e674ee4f26"
},
{
"shopId": "0x0001befa86be32da60a87a843bf3e63e77092040ee044f854e8d318d1eb18d20",
"shopId": "0x0005befa86be32da60a87a843bf3e63e77092040ee044f854e8d318d1eb18d20",
"name": "Shop-0004",
"currency": "php",
"address": "0x57D5E271FF8A4d49AE793B8b6Cf005E33FA4FA48",
"privateKey": "0xe58b3ae0e68a04996d6c13c9f9cb65b2d88ada662f28edd67db8c8e1ef45eed4"
},
{
"shopId": "0x00013ecc54754b835d04ee5b4df7d0d0eb4e0eafc33ac8de4d282d641f7f054d",
"shopId": "0x00053ecc54754b835d04ee5b4df7d0d0eb4e0eafc33ac8de4d282d641f7f054d",
"name": "Shop-0005",
"currency": "php",
"address": "0x14De3f38D8deB7fFc5c15859bA05e4B088F8F631",
"privateKey": "0x1f2246394971c643d371a2b2ab9176d34b98c0a84a6aa5e4e53f73ab6119dcc1"
},
{
"shopId": "0x0001548b7faa282b8721218962e3c1ae43608009534663de91a1548e37cc1c69",
"shopId": "0x0005548b7faa282b8721218962e3c1ae43608009534663de91a1548e37cc1c69",
"name": "Shop-0006",
"currency": "php",
"address": "0xA9c5559da87A7511D28e87C751dAfE65374Ce59f",
"privateKey": "0x49d28e02787ca6f2827065c83c9c4de2369b4d18d132505d3c01ba35a4558214"
},
{
"shopId": "0x000108bde9ef98803841f22e8bc577a69fc47913914a8f5fa60e016aaa74bc86",
"shopId": "0x000508bde9ef98803841f22e8bc577a69fc47913914a8f5fa60e016aaa74bc86",
"name": "Shop-0007",
"currency": "php",
"address": "0xAAa610aE6711B810921ca06629c42a3E127851cd",
"privateKey": "0xd72fb7fe49fd18f92481cbee186050816631391b4a25d579b7cff7efdf7099d3"
},
{
"shopId": "0x000104ef11be936f49f6388dd20d062e43170fd7ce9e968e51426317e284b930",
"shopId": "0x000504ef11be936f49f6388dd20d062e43170fd7ce9e968e51426317e284b930",
"name": "Shop-0008",
"currency": "php",
"address": "0x4BbfEd63b19954A357C1Dfc3Ba8820d2eE31Bbcf",
"privateKey": "0x90ee852d612e080fb99914d40e0cd75edf928ca895bdda8b91be4b464c55edfc"
},
{
"shopId": "0x00016bad0e0f6ad0fdd7660393b45f452a0eca3f6f1f0eeb25c5902e46a1ffee",
"shopId": "0x00056bad0e0f6ad0fdd7660393b45f452a0eca3f6f1f0eeb25c5902e46a1ffee",
"name": "Shop-0009",
"currency": "php",
"address": "0xe3812c628b1E0245Eed4A548914e32C9eeFda019",
"privateKey": "0x8bfcb398c9cb1c7c11790a2293f6d4d8c0adc5f2bd3620561dd81e2db2e9a83e"
},
{
"shopId": "0x00012a23595cf31762a61502546e8b9f947baf3bd55040d9bd535f8afdbff409",
"shopId": "0x00052a23595cf31762a61502546e8b9f947baf3bd55040d9bd535f8afdbff409",
"name": "Shop-0010",
"currency": "php",
"address": "0xfD8072e4809BFADd90ad6D60aF31C8dCd7a46990",
Expand Down
6 changes: 1 addition & 5 deletions packages/contracts/deploy/side_chain_devnet/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -983,11 +983,7 @@ async function storeSampleExchangeRate(accounts: IAccount, deployment: Deploymen
const height = 0;
const rates = [
{
symbol: "ACC",
rate: BigNumber.from(1761925042),
},
{
symbol: "LYT",
symbol: "KIOS",
rate: BigNumber.from(1761925042),
},
{
Expand Down
12 changes: 6 additions & 6 deletions packages/contracts/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,14 @@ function getAccounts() {
}

if (
process.env.ACC_SYSTEM !== undefined &&
process.env.ACC_SYSTEM.trim() !== "" &&
reg_bytes64.test(process.env.ACC_SYSTEM)
process.env.DMS_SYSTEM !== undefined &&
process.env.DMS_SYSTEM.trim() !== "" &&
reg_bytes64.test(process.env.DMS_SYSTEM)
) {
accounts.push(process.env.ACC_SYSTEM);
accounts.push(process.env.DMS_SYSTEM);
} else {
process.env.ACC_SYSTEM = Wallet.createRandom().privateKey;
accounts.push(process.env.ACC_SYSTEM);
process.env.DMS_SYSTEM = Wallet.createRandom().privateKey;
accounts.push(process.env.DMS_SYSTEM);
}

if (
Expand Down
10 changes: 5 additions & 5 deletions packages/contracts/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "acc-contracts-v2",
"name": "dms-contracts-v2",
"version": "2.6.0",
"description": "Smart contracts that decentralized loyalty systems",
"files": [
Expand Down Expand Up @@ -27,14 +27,14 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/acc-coin/acc-osx.git"
"url": "git+https://github.com/bosagora/dms-osx.git"
},
"author": "BOSagora Foundation",
"license": "AGPL-3.0-or-later",
"bugs": {
"url": "https://github.com/acc-coin/acc-osx/issues"
"url": "https://github.com/bosagora/dms-osx/issues"
},
"homepage": "https://github.com/acc-coin/acc-osx#readme",
"homepage": "https://github.com/bosagora/dms-osx#readme",
"devDependencies": {
"@ethersproject/constants": "^5.7.0",
"@nomiclabs/hardhat-ethers": "^2.2.3",
Expand Down Expand Up @@ -70,7 +70,7 @@
"@openzeppelin/contracts": "^4.9.5",
"@openzeppelin/contracts-upgradeable": "^4.9.5",
"@openzeppelin/hardhat-upgrades": "^1.28.0",
"acc-bridge-contracts-v2": "~2.5.0",
"dms-bridge-contracts-v2": "~2.5.0",
"loyalty-tokens": "~2.1.1",
"multisig-wallet-contracts": "~2.0.0"
}
Expand Down
4 changes: 3 additions & 1 deletion packages/contracts/src/utils/ContractUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ import * as hre from "hardhat";

export enum LoyaltyNetworkID {
ACC_TESTNET = 1,
ACC_MAINNET,
ACC_MAINNET = 2,
KIOS_TESTNET = 5,
KIOS_MAINNET= 6,
}

export class ContractUtils {
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 @@ -40,7 +40,7 @@ describe("Test for CurrencyRate", () => {
});

it("Check default symbol", async () => {
expect(await currencyRateContract.defaultSymbol()).to.equal("php");
expect(await currencyRateContract.defaultSymbol()).to.equal("krw");
});

it("Set Array - revert", async () => {
Expand All @@ -60,7 +60,7 @@ describe("Test for CurrencyRate", () => {
rate: multiple.mul(1),
},
{
symbol: "LYT",
symbol: "KIOS",
rate: multiple.mul(150),
},
];
Expand Down Expand Up @@ -94,7 +94,7 @@ describe("Test for CurrencyRate", () => {
rate: multiple.mul(1),
},
{
symbol: "LYT",
symbol: "KIOS",
rate: multiple.mul(150),
},
];
Expand Down Expand Up @@ -130,7 +130,7 @@ describe("Test for CurrencyRate", () => {
rate: multiple.mul(1),
},
{
symbol: "LYT",
symbol: "KIOS",
rate: multiple.mul(150),
},
];
Expand Down Expand Up @@ -166,7 +166,7 @@ describe("Test for CurrencyRate", () => {
rate: multiple.mul(1),
},
{
symbol: "LYT",
symbol: "KIOS",
rate: multiple.mul(150),
},
];
Expand Down Expand Up @@ -202,7 +202,7 @@ describe("Test for CurrencyRate", () => {
rate: multiple.mul(1),
},
{
symbol: "LYT",
symbol: "KIOS",
rate: multiple.mul(150),
},
];
Expand Down Expand Up @@ -246,7 +246,7 @@ describe("Test for CurrencyRate", () => {
rate: multiple.mul(1),
},
{
symbol: "LYT",
symbol: "KIOS",
rate: multiple.mul(150),
},
];
Expand Down Expand Up @@ -286,7 +286,7 @@ describe("Test for CurrencyRate", () => {
rate: multiple.mul(1),
},
{
symbol: "LYT",
symbol: "KIOS",
rate: multiple.mul(150),
},
];
Expand Down
2 changes: 1 addition & 1 deletion packages/contracts/test/03-Shop.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ describe("Test for Shop", () => {

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

Expand Down
Loading

0 comments on commit 82d080c

Please sign in to comment.