Files
smom-dbis-138/contracts/bridge/atomic/AtomicSlashingManager.sol
defiQUG 76aa419320 feat: bridges, PMM, flash workflow, token-aggregation, and deployment docs
- CCIP/trustless bridge contracts, GRU tokens, DEX/PMM tests, reserve vault.
- Token-aggregation service routes, planner, chain config, relay env templates.
- Config snapshots and multi-chain deployment markdown updates.
- gitignore services/btc-intake/dist/ (tsc output); do not track dist.

Run forge build && forge test before deploy (large solc graph).

Made-with: Cursor
2026-04-07 23:40:52 -07:00

28 lines
1.0 KiB
Solidity

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
import "@openzeppelin/contracts/access/AccessControl.sol";
import {IAtomicFulfillerRegistry} from "./interfaces/IAtomicFulfillerRegistry.sol";
contract AtomicSlashingManager is AccessControl {
bytes32 public constant COORDINATOR_ROLE = keccak256("COORDINATOR_ROLE");
IAtomicFulfillerRegistry public immutable fulfillerRegistry;
event ObligationSlashed(bytes32 indexed obligationId, address indexed recipient, bytes32 indexed reason, uint256 amount);
constructor(address fulfillerRegistry_, address admin) {
fulfillerRegistry = IAtomicFulfillerRegistry(fulfillerRegistry_);
_grantRole(DEFAULT_ADMIN_ROLE, admin);
}
function slash(bytes32 obligationId, address recipient, bytes32 reason)
external
onlyRole(COORDINATOR_ROLE)
returns (uint256 amount)
{
amount = fulfillerRegistry.slashBond(obligationId, recipient);
emit ObligationSlashed(obligationId, recipient, reason, amount);
}
}