mojtaba-eshghie / HighGuard

The runtime monitoring tool for smart contracts high-level properties.
https://arxiv.org/abs/2305.08254
MIT License
5 stars 2 forks source link

Monitoring properties that expand over multipe contracts; #63

Open mojtaba-eshghie opened 6 months ago

mojtaba-eshghie commented 6 months ago

As events in business processes (high-level events) might have properties that expand over multiple contracts; we can look at multiple contracts during the interactions: The following lines of the lib/monitor/watchpost.js could for instance be replaced by something that looks over any transaction (not just incoming), to monitor properties over transactions that spread over multiple contracts (tx.origin is our contract and msg.sender is a EOA if I'm not wrong).

// Iterate over all transactions in the block
        block.transactions.forEach((tx) => {            
            // Check if the transaction involves the specified contract contractAddress
            if (tx.to && tx.to.toLowerCase() === contractAddress.toLowerCase()) {
            let dcrEvents = getDCREvents(tx);
            if (dcrEvents) {
                monitorQueue.push(dcrEvents);
            }
            }
        });