Skip to content

Commit

Permalink
Upgrade Bridge contracts
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelKim20 committed Mar 19, 2024
1 parent 50e1625 commit 495d149
Show file tree
Hide file tree
Showing 11 changed files with 19 additions and 77 deletions.
2 changes: 1 addition & 1 deletion 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.0",
"version": "2.10.1",
"description": "",
"main": "dist/bundle-cjs.js",
"module": "dist/bundle-esm.js",
Expand Down
3 changes: 3 additions & 0 deletions packages/contracts/contracts/Reference.sol
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,8 @@ import "loyalty-tokens/contracts/LoyaltyToken.sol";
import "loyalty-tokens/contracts/KIOS.sol";
import "loyalty-tokens/contracts/PNB.sol";

import "dms-bridge-contracts/contracts/interfaces/IBridge.sol";
import "dms-bridge-contracts/contracts/interfaces/IBridgeLiquidity.sol";
import "dms-bridge-contracts/contracts/interfaces/IBridgeValidator.sol";
import "dms-bridge-contracts/contracts/bridge/Bridge.sol";
import "dms-bridge-contracts/contracts/bridge/BridgeValidator.sol";
8 changes: 5 additions & 3 deletions packages/contracts/contracts/controllers/LoyaltyBridge.sol
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ import "../interfaces/ILedger.sol";
import "./LoyaltyBridgeStorage.sol";

contract LoyaltyBridge is LoyaltyBridgeStorage, Initializable, OwnableUpgradeable, UUPSUpgradeable, IBridge {
event BridgeDeposited(bytes32 tokenId, bytes32 depositId, address account, uint256 amount, uint256 balance);
event BridgeWithdrawn(bytes32 tokenId, bytes32 withdrawId, address account, uint256 amount, uint256 balance);

function initialize(address _validatorAddress) external initializer {
__UUPSUpgradeable_init();
__Ownable_init_unchained();
Expand Down Expand Up @@ -184,6 +181,11 @@ contract LoyaltyBridge is LoyaltyBridgeStorage, Initializable, OwnableUpgradeabl
return false;
}

/// @notice 입력된 주소에 대해 검증이 되었는지를 리턴합니다.
function isConfirmedOf(bytes32 _withdrawId, address validator) external view override returns (bool) {
return confirmations[_withdrawId][validator];
}

/// @notice 예치정보를 조회합니다
function getDepositInfo(bytes32 _depositId) external view override returns (DepositData memory) {
return deposits[_depositId];
Expand Down
36 changes: 0 additions & 36 deletions packages/contracts/contracts/interfaces/IBridge.sol

This file was deleted.

11 changes: 0 additions & 11 deletions packages/contracts/contracts/interfaces/IBridgeLiquidity.sol

This file was deleted.

13 changes: 0 additions & 13 deletions packages/contracts/contracts/interfaces/IBridgeValidator.sol

This file was deleted.

3 changes: 0 additions & 3 deletions packages/contracts/contracts/ledger/Ledger.sol
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,6 @@ contract Ledger is LedgerStorage, Initializable, OwnableUpgradeable, UUPSUpgrade

event RemovedPhoneInfo(bytes32 phone, address account);

event DepositedLiquidity(bytes32 tokenId, address account, uint256 amount, uint256 liquidity);
event WithdrawnLiquidity(bytes32 tokenId, address account, uint256 amount, uint256 liquidity);

struct ManagementAddresses {
address foundation;
address settlement;
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.0",
"version": "2.10.2",
"description": "Smart contracts that decentralized point systems",
"files": [
"**/*.sol"
Expand Down Expand Up @@ -69,7 +69,7 @@
},
"dependencies": {
"del-osx-artifacts": "^2.3.0",
"dms-bridge-contracts": "^1.2.0",
"dms-bridge-contracts": "^1.2.2",
"multisig-wallet-contracts": "^1.1.0",
"loyalty-tokens": "^1.0.5"
}
Expand Down
4 changes: 2 additions & 2 deletions packages/faker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@
"axios": "^1.6.7",
"chai": "^4.3.7",
"del-osx-artifacts": "^2.3.0",
"dms-bridge-contracts": "^1.2.0",
"dms-osx-artifacts": "^2.10.0",
"dms-bridge-contracts": "^1.2.2",
"dms-osx-artifacts": "^2.10.2",
"dotenv": "^10.0.0",
"ethereum-waffle": "^4.0.10",
"ethers": "npm:boa-ethers2@^5.7.9",
Expand Down
4 changes: 2 additions & 2 deletions packages/relay/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@
"chai-http": "^4.3.7",
"cors": "^2.8.5",
"del-osx-artifacts": "^2.3.0",
"dms-bridge-contracts": "^1.2.0",
"dms-osx-artifacts": "^2.10.0",
"dms-bridge-contracts": "^1.2.2",
"dms-osx-artifacts": "^2.10.2",
"dotenv": "^10.0.0",
"ethereum-waffle": "^4.0.10",
"ethereumjs-util": "^7.1.5",
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3507,10 +3507,10 @@ [email protected]:
resolved "https://registry.yarnpkg.com/discontinuous-range/-/discontinuous-range-1.0.0.tgz#e38331f0844bba49b9a9cb71c771585aab1bc65a"
integrity sha512-c68LpLbO+7kP/b1Hr1qs8/BJ09F5khZGTxqxZuhzxpmwJKOgRFHJWIb9/KmqnqHhLdO55aOxFH/EGBvUQbL/RQ==

dms-bridge-contracts@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/dms-bridge-contracts/-/dms-bridge-contracts-1.2.0.tgz#e43390ec751e44d39f33ede882f488f6979fbf2b"
integrity sha512-RyXp5OADs2SzwmL/tptG4cREHdoa5+oUokI+jXHwT39hJL8S3RFipNvY4oq4qeodcqkoAxYIBYzAcHupCzwMrw==
dms-bridge-contracts@^1.2.2:
version "1.2.2"
resolved "https://registry.yarnpkg.com/dms-bridge-contracts/-/dms-bridge-contracts-1.2.2.tgz#53d1b60b77fda5f712a2b09003a29ee0ec746435"
integrity sha512-VAS6MlqmrObR24wODzPcG3XR7VqlYIFdj72ei9iu66f17fXQ1JICbqQNIn9cfEK5e+DWYsvN+SyZmAV4NuKbrg==

dns-over-http-resolver@^1.2.3:
version "1.2.3"
Expand Down

0 comments on commit 495d149

Please sign in to comment.