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

Remove certifier's key #369

Merged
merged 1 commit into from
Mar 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
3 changes: 0 additions & 3 deletions packages/contracts/deploy/bosagora_devnet/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ interface IDeployedContract {
interface IAccount {
deployer: Wallet;
owner: Wallet;
certifier: Wallet;
foundation: Wallet;
settlements: Wallet;
fee: Wallet;
Expand Down Expand Up @@ -90,7 +89,6 @@ class Deployments {
foundation,
settlements,
fee,
certifier,
certifier01,
certifier02,
certifier03,
Expand Down Expand Up @@ -133,7 +131,6 @@ class Deployments {
this.accounts = {
deployer,
owner,
certifier,
foundation,
settlements,
fee,
Expand Down
3 changes: 0 additions & 3 deletions packages/contracts/env/.env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ SETTLEMENTS=0xa483b4395a7052148aa56ffe43161886c53a8c9bf8315e650b470415ecf874cf
# 0x6440665c7480451f28aE57A3d552DF3bA04383b1
FEE=0x3b153d2988f2f4923b30c8d53624ced34b10b75b22d3eed37426ee46d36e54ad

# 0xEaeB90D77f7756fBf177D6E0E1BB794639e6097f
CERTIFIER=0x8a840e693d52e57ca028621a8692c42d2d9c368c6fe4d0c1027408b87827e6ef

# 0x454cd944C9Eac1e84064c0D105931aDCEbC86c89
CERTIFIER01=0xf17b5048d0acdcabcc1fa5f3e1aa6753243d4309a6a30f951d5712cb50c86671
# 0x9f97e74e211D53B16491f33a1fF3A6E774B6Af26
Expand Down
11 changes: 0 additions & 11 deletions packages/contracts/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,6 @@ function getAccounts() {
accounts.push(process.env.FEE);
}

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

if (
process.env.CERTIFIER01 !== undefined &&
process.env.CERTIFIER01.trim() !== "" &&
Expand Down
2 changes: 1 addition & 1 deletion packages/contracts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
"typescript": "^4.5.5"
},
"dependencies": {
"del-osx-artifacts": "^2.2.0",
"del-osx-artifacts": "^2.3.0",
"dms-bridge-contracts": "^1.2.0",
"multisig-wallet-contracts": "^1.1.0",
"loyalty-tokens": "^1.0.5"
Expand Down
14 changes: 7 additions & 7 deletions packages/contracts/test/03-Shop.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ describe("Test for Shop", () => {
const signature = await ContractUtils.signMessage(elem.wallet, message);
await expect(
shopContract
.connect(deployments.accounts.certifier)
.connect(deployments.accounts.certifiers[0])
.add(elem.shopId, elem.name, elem.currency.toLowerCase(), elem.wallet.address, signature)
)
.to.emit(shopContract, "AddedShop")
Expand Down Expand Up @@ -149,7 +149,7 @@ describe("Test for Shop", () => {
const signature = await ContractUtils.signMessage(elem.wallet, message);
await expect(
shopContract
.connect(deployments.accounts.certifier)
.connect(deployments.accounts.certifiers[0])
.update(elem.shopId, elem.name, "usd", elem.wallet.address, signature)
)
.to.emit(shopContract, "UpdatedShop")
Expand Down Expand Up @@ -178,7 +178,7 @@ describe("Test for Shop", () => {
const signature = await ContractUtils.signMessage(elem.wallet, message);
await expect(
shopContract
.connect(deployments.accounts.certifier)
.connect(deployments.accounts.certifiers[0])
.changeStatus(elem.shopId, ContractShopStatus.INACTIVE, elem.wallet.address, signature)
)
.to.emit(shopContract, "ChangedShopStatus")
Expand Down Expand Up @@ -206,7 +206,7 @@ describe("Test for Shop", () => {
const signature = await ContractUtils.signMessage(elem.wallet, message);
await expect(
shopContract
.connect(deployments.accounts.certifier)
.connect(deployments.accounts.certifiers[0])
.changeStatus(elem.shopId, ContractShopStatus.ACTIVE, elem.wallet.address, signature)
)
.to.emit(shopContract, "ChangedShopStatus")
Expand All @@ -229,7 +229,7 @@ describe("Test for Shop", () => {
const signature = await ContractUtils.signMessage(elem.wallet, message);
await expect(
shopContract
.connect(deployments.accounts.certifier)
.connect(deployments.accounts.certifiers[0])
.changeDelegator(elem.shopId, delegator.address, elem.wallet.address, signature)
)
.to.emit(shopContract, "ChangedDelegator")
Expand All @@ -256,7 +256,7 @@ describe("Test for Shop", () => {
const signature = await ContractUtils.signMessage(delegator, message);
await expect(
shopContract
.connect(deployments.accounts.certifier)
.connect(deployments.accounts.certifiers[0])
.update(elem.shopId, "new name", "usd", delegator.address, signature)
)
.to.emit(shopContract, "UpdatedShop")
Expand All @@ -278,7 +278,7 @@ describe("Test for Shop", () => {
const signature = await ContractUtils.signMessage(delegator, message);
await expect(
shopContract
.connect(deployments.accounts.certifier)
.connect(deployments.accounts.certifiers[0])
.changeStatus(elem.shopId, ContractShopStatus.INACTIVE, delegator.address, signature)
)
.to.emit(shopContract, "ChangedShopStatus")
Expand Down
Loading
Loading