Skip to content

Commit 2470e61

Browse files
committed
fix(update_service): 컨테이너에서 registry_address.json 경로를 올바르게 참조하도록 수정 및 registry-service 볼륨 마운트 추가
1 parent c5e4ea6 commit 2470e61

4 files changed

Lines changed: 4 additions & 6 deletions

File tree

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"address": "0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0", "abi": [{"inputs": [], "stateMutability": "nonpayable", "type": "constructor"}, {"anonymous": false, "inputs": [{"indexed": false, "internalType": "string", "name": "name", "type": "string"}, {"indexed": true, "internalType": "address", "name": "addr", "type": "address"}, {"indexed": false, "internalType": "uint256", "name": "timestamp", "type": "uint256"}], "name": "ContractAddressUpdated", "type": "event"}, {"inputs": [], "name": "admin", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "stateMutability": "view", "type": "function"}, {"inputs": [{"internalType": "string", "name": "", "type": "string"}], "name": "contracts", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "stateMutability": "view", "type": "function"}, {"inputs": [{"internalType": "string", "name": "name", "type": "string"}], "name": "getContractAddress", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "stateMutability": "view", "type": "function"}, {"inputs": [{"internalType": "string", "name": "name", "type": "string"}, {"internalType": "address", "name": "addr", "type": "address"}], "name": "setContractAddress", "outputs": [], "stateMutability": "nonpayable", "type": "function"}]}
1+
{"address": "0xA51c1fc2f0D1a1b8494Ed1FE312d7C3a78Ed91C0", "abi": [{"inputs": [], "stateMutability": "nonpayable", "type": "constructor"}, {"anonymous": false, "inputs": [{"indexed": false, "internalType": "string", "name": "name", "type": "string"}, {"indexed": true, "internalType": "address", "name": "addr", "type": "address"}, {"indexed": false, "internalType": "uint256", "name": "timestamp", "type": "uint256"}], "name": "ContractAddressUpdated", "type": "event"}, {"inputs": [], "name": "admin", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "stateMutability": "view", "type": "function"}, {"inputs": [{"internalType": "string", "name": "", "type": "string"}], "name": "contracts", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "stateMutability": "view", "type": "function"}, {"inputs": [{"internalType": "string", "name": "name", "type": "string"}], "name": "getContractAddress", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "stateMutability": "view", "type": "function"}, {"inputs": [{"internalType": "string", "name": "name", "type": "string"}, {"internalType": "address", "name": "addr", "type": "address"}], "name": "setContractAddress", "outputs": [], "stateMutability": "nonpayable", "type": "function"}]}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"address": "0x5FC8d32690cc91D4c39d9d3abcBD16989F875707", "abi": [{"inputs": [], "stateMutability": "nonpayable", "type": "constructor"}, {"anonymous": false, "inputs": [{"indexed": false, "internalType": "address", "name": "owner", "type": "address"}, {"indexed": false, "internalType": "string", "name": "uid", "type": "string"}], "name": "UpdateDelivered", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "internalType": "address", "name": "owner", "type": "address"}, {"indexed": false, "internalType": "string", "name": "uid", "type": "string"}, {"indexed": false, "internalType": "string", "name": "deviceId", "type": "string"}], "name": "UpdateInstalled", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "internalType": "string", "name": "uid", "type": "string"}, {"indexed": false, "internalType": "string", "name": "version", "type": "string"}, {"indexed": false, "internalType": "string", "name": "description", "type": "string"}], "name": "UpdateRegistered", "type": "event"}, {"inputs": [{"internalType": "string", "name": "uid", "type": "string"}, {"internalType": "string", "name": "deviceId", "type": "string"}], "name": "confirmInstallation", "outputs": [], "stateMutability": "nonpayable", "type": "function"}, {"inputs": [], "name": "getOwnerUpdates", "outputs": [{"internalType": "string[]", "name": "", "type": "string[]"}], "stateMutability": "view", "type": "function"}, {"inputs": [], "name": "getUpdateCount", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "stateMutability": "view", "type": "function"}, {"inputs": [{"internalType": "uint256", "name": "index", "type": "uint256"}], "name": "getUpdateIdByIndex", "outputs": [{"internalType": "string", "name": "", "type": "string"}], "stateMutability": "view", "type": "function"}, {"inputs": [{"internalType": "string", "name": "uid", "type": "string"}], "name": "getUpdateInfo", "outputs": [{"internalType": "string", "name": "ipfsHash", "type": "string"}, {"internalType": "string", "name": "encryptedKey", "type": "string"}, {"internalType": "string", "name": "hashOfUpdate", "type": "string"}, {"internalType": "string", "name": "description", "type": "string"}, {"internalType": "uint256", "name": "price", "type": "uint256"}, {"internalType": "string", "name": "version", "type": "string"}, {"internalType": "bool", "name": "isAuthorized", "type": "bool"}], "stateMutability": "view", "type": "function"}, {"inputs": [], "name": "manufacturer", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "stateMutability": "view", "type": "function"}, {"inputs": [{"internalType": "string", "name": "uid", "type": "string"}], "name": "purchaseUpdate", "outputs": [], "stateMutability": "payable", "type": "function"}, {"inputs": [{"internalType": "string", "name": "uid", "type": "string"}, {"internalType": "string", "name": "ipfsHash", "type": "string"}, {"internalType": "string", "name": "encryptedKey", "type": "string"}, {"internalType": "string", "name": "hashOfUpdate", "type": "string"}, {"internalType": "string", "name": "description", "type": "string"}, {"internalType": "uint256", "name": "price", "type": "uint256"}, {"internalType": "string", "name": "version", "type": "string"}, {"internalType": "bytes", "name": "", "type": "bytes"}], "name": "registerUpdate", "outputs": [], "stateMutability": "nonpayable", "type": "function"}]}
1+
{"address": "0x0DCd1Bf9A1b36cE34237eEaFef220932846BCD82", "abi": [{"inputs": [], "stateMutability": "nonpayable", "type": "constructor"}, {"anonymous": false, "inputs": [{"indexed": false, "internalType": "address", "name": "owner", "type": "address"}, {"indexed": false, "internalType": "string", "name": "uid", "type": "string"}], "name": "UpdateDelivered", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "internalType": "address", "name": "owner", "type": "address"}, {"indexed": false, "internalType": "string", "name": "uid", "type": "string"}, {"indexed": false, "internalType": "string", "name": "deviceId", "type": "string"}], "name": "UpdateInstalled", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "internalType": "string", "name": "uid", "type": "string"}, {"indexed": false, "internalType": "string", "name": "version", "type": "string"}, {"indexed": false, "internalType": "string", "name": "description", "type": "string"}], "name": "UpdateRegistered", "type": "event"}, {"inputs": [{"internalType": "string", "name": "uid", "type": "string"}], "name": "cancelUpdate", "outputs": [], "stateMutability": "nonpayable", "type": "function"}, {"inputs": [{"internalType": "string", "name": "uid", "type": "string"}, {"internalType": "string", "name": "deviceId", "type": "string"}], "name": "confirmInstallation", "outputs": [], "stateMutability": "nonpayable", "type": "function"}, {"inputs": [], "name": "getOwnerUpdates", "outputs": [{"internalType": "string[]", "name": "", "type": "string[]"}], "stateMutability": "view", "type": "function"}, {"inputs": [], "name": "getUpdateCount", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "stateMutability": "view", "type": "function"}, {"inputs": [{"internalType": "uint256", "name": "index", "type": "uint256"}], "name": "getUpdateIdByIndex", "outputs": [{"internalType": "string", "name": "", "type": "string"}], "stateMutability": "view", "type": "function"}, {"inputs": [{"internalType": "string", "name": "uid", "type": "string"}], "name": "getUpdateInfo", "outputs": [{"internalType": "string", "name": "ipfsHash", "type": "string"}, {"internalType": "string", "name": "encryptedKey", "type": "string"}, {"internalType": "string", "name": "hashOfUpdate", "type": "string"}, {"internalType": "string", "name": "description", "type": "string"}, {"internalType": "uint256", "name": "price", "type": "uint256"}, {"internalType": "string", "name": "version", "type": "string"}, {"internalType": "bool", "name": "isAuthorized", "type": "bool"}], "stateMutability": "view", "type": "function"}, {"inputs": [], "name": "manufacturer", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "stateMutability": "view", "type": "function"}, {"inputs": [{"internalType": "string", "name": "uid", "type": "string"}], "name": "purchaseUpdate", "outputs": [], "stateMutability": "payable", "type": "function"}, {"inputs": [{"internalType": "string", "name": "uid", "type": "string"}, {"internalType": "string", "name": "ipfsHash", "type": "string"}, {"internalType": "string", "name": "encryptedKey", "type": "string"}, {"internalType": "string", "name": "hashOfUpdate", "type": "string"}, {"internalType": "string", "name": "description", "type": "string"}, {"internalType": "uint256", "name": "price", "type": "uint256"}, {"internalType": "string", "name": "version", "type": "string"}, {"internalType": "bytes", "name": "signature", "type": "bytes"}], "name": "registerUpdate", "outputs": [], "stateMutability": "nonpayable", "type": "function"}]}

update_service/deploy/deploy_contract.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,7 @@ def update_registry(web3, account_address, private_key, contract_address):
131131
"""레지스트리 컨트랙트에 소프트웨어 업데이트 컨트랙트 주소 등록"""
132132
try:
133133
# 레지스트리 주소 및 ABI 로드
134-
registry_path = os.path.join(
135-
os.path.dirname(os.path.dirname(os.path.abspath(__file__))),
136-
"registry_address.json",
137-
)
134+
registry_path = "/app/registry-service/registry_address.json"
138135

139136
if not os.path.exists(registry_path):
140137
logger.warning(

update_service/docker-compose.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ services:
1010
- PRIVATE_KEY=0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80
1111
volumes:
1212
- ./:/app
13+
- ../registry-service:/app/registry-service
1314
extra_hosts:
1415
- "host.docker.internal:host-gateway"
1516
working_dir: /app

0 commit comments

Comments
 (0)