Skip to content

Commit 96c5e5e

Browse files
committed
Fix access and entrypoint
1 parent a9d6846 commit 96c5e5e

File tree

2 files changed

+13
-25
lines changed

2 files changed

+13
-25
lines changed

contracts/src/EthscriptionERC721.sol

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ contract EthscriptionERC721 is ERC721EthscriptionsUpgradeable {
9494
/// @notice Sync ownership for a specific token
9595
/// @param tokenId The token to sync
9696
/// @param ethscriptionId The ethscription ID for this token
97-
function syncOwnership(uint256 tokenId, bytes32 ethscriptionId) external {
97+
function syncOwnership(uint256 tokenId, bytes32 ethscriptionId) external onlyFactory {
9898
// Check if token still exists in collection
9999
require(_tokenExists(tokenId), "Token does not exist");
100100

@@ -110,29 +110,7 @@ contract EthscriptionERC721 is ERC721EthscriptionsUpgradeable {
110110
_transfer(recordedOwner, actualOwner, tokenId);
111111
}
112112
}
113-
114-
/// @notice Batch sync ownership for multiple tokens
115-
/// @param tokenIds Array of token IDs to sync
116-
/// @param ethscriptionIds Array of corresponding ethscription IDs
117-
function syncOwnershipBatch(uint256[] calldata tokenIds, bytes32[] calldata ethscriptionIds) external {
118-
require(tokenIds.length == ethscriptionIds.length, "Array length mismatch");
119-
120-
for (uint256 i = 0; i < tokenIds.length; i++) {
121-
uint256 tokenId = tokenIds[i];
122-
bytes32 ethscriptionId = ethscriptionIds[i];
123-
124-
// Skip non-existent tokens
125-
if (!_tokenExists(tokenId)) continue;
126-
127-
address actualOwner = ethscriptions.ownerOf(ethscriptionId);
128-
address recordedOwner = _ownerOf(tokenId);
129-
130-
if (actualOwner != recordedOwner) {
131-
_transfer(recordedOwner, actualOwner, tokenId);
132-
}
133-
}
134-
}
135-
113+
136114
/// @notice Lock the collection (freeze it)
137115
function lockCollection() external onlyFactory {
138116
locked = true;

docker-entrypoint.sh

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,18 @@ cleanup() {
3232
trap cleanup SIGTERM SIGINT
3333

3434
# Wait for either process to exit and preserve its exit code
35+
set +e
3536
wait -n
3637
exit_code=$?
38+
set -e
3739
echo "One process exited, shutting down..."
3840
kill "${JOBS_PID:-}" "${CLOCKWORK_PID:-}" 2>/dev/null || true
39-
exit "$exit_code"
41+
if [[ "${DEBUG_KEEP_ALIVE:-0}" == "1" && $exit_code -ne 0 ]]; then
42+
echo "Process died with $exit_code; keeping container up for debugging."
43+
if [[ -t 1 ]]; then
44+
exec bash -li
45+
else
46+
exec tail -f /dev/null
47+
fi
48+
fi
49+
exit "$exit_code"

0 commit comments

Comments
 (0)