• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

safe-global / safe-contracts / 3649992897

pending completion
3649992897

Pull #457

github

GitHub
Merge a833e0b56 into c36bcab46
Pull Request #457: Update Readme

145 of 150 branches covered (96.67%)

Branch coverage included in aggregate %.

294 of 301 relevant lines covered (97.67%)

46.4 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/contracts/GnosisSafeL2.sol
1
// SPDX-License-Identifier: LGPL-3.0-only
2
pragma solidity >=0.7.0 <0.9.0;
3

4
import "./GnosisSafe.sol";
5

6
/// @title Gnosis Safe - A multisignature wallet with support for confirmations using signed messages based on ERC191.
7
/// @author Stefan George - <stefan@gnosis.io>
8
/// @author Richard Meissner - <richard@gnosis.io>
9
contract GnosisSafeL2 is GnosisSafe {
10
    event SafeMultiSigTransaction(
11
        address to,
12
        uint256 value,
13
        bytes data,
14
        Enum.Operation operation,
15
        uint256 safeTxGas,
16
        uint256 baseGas,
17
        uint256 gasPrice,
18
        address gasToken,
19
        address payable refundReceiver,
20
        bytes signatures,
21
        // We combine nonce, sender and threshold into one to avoid stack too deep
22
        // Dev note: additionalInfo should not contain `bytes`, as this complicates decoding
23
        bytes additionalInfo
24
    );
25

26
    event SafeModuleTransaction(address module, address to, uint256 value, bytes data, Enum.Operation operation);
27

28
    /// @dev Allows to execute a Safe transaction confirmed by required number of owners and then pays the account that submitted the transaction.
29
    ///      Note: The fees are always transferred, even if the user transaction fails.
30
    /// @param to Destination address of Safe transaction.
31
    /// @param value Ether value of Safe transaction.
32
    /// @param data Data payload of Safe transaction.
33
    /// @param operation Operation type of Safe transaction.
34
    /// @param safeTxGas Gas that should be used for the Safe transaction.
35
    /// @param baseGas Gas costs that are independent of the transaction execution(e.g. base transaction fee, signature check, payment of the refund)
36
    /// @param gasPrice Gas price that should be used for the payment calculation.
37
    /// @param gasToken Token address (or 0 if ETH) that is used for the payment.
38
    /// @param refundReceiver Address of receiver of gas payment (or 0 if tx.origin).
39
    /// @param signatures Packed signature data ({bytes32 r}{bytes32 s}{uint8 v})
40
    function execTransaction(
41
        address to,
42
        uint256 value,
43
        bytes calldata data,
44
        Enum.Operation operation,
45
        uint256 safeTxGas,
46
        uint256 baseGas,
47
        uint256 gasPrice,
48
        address gasToken,
49
        address payable refundReceiver,
50
        bytes memory signatures
51
    ) public payable override returns (bool) {
52
        bytes memory additionalInfo;
×
53
        {
×
54
            additionalInfo = abi.encode(nonce, msg.sender, threshold);
×
55
        }
56
        emit SafeMultiSigTransaction(
×
57
            to,
58
            value,
59
            data,
60
            operation,
61
            safeTxGas,
62
            baseGas,
63
            gasPrice,
64
            gasToken,
65
            refundReceiver,
66
            signatures,
67
            additionalInfo
68
        );
69
        return super.execTransaction(to, value, data, operation, safeTxGas, baseGas, gasPrice, gasToken, refundReceiver, signatures);
×
70
    }
71

72
    /// @dev Allows a Module to execute a Safe transaction without any further confirmations.
73
    /// @param to Destination address of module transaction.
74
    /// @param value Ether value of module transaction.
75
    /// @param data Data payload of module transaction.
76
    /// @param operation Operation type of module transaction.
77
    function execTransactionFromModule(
78
        address to,
79
        uint256 value,
80
        bytes memory data,
81
        Enum.Operation operation
82
    ) public override returns (bool success) {
83
        emit SafeModuleTransaction(msg.sender, to, value, data, operation);
×
84
        success = super.execTransactionFromModule(to, value, data, operation);
×
85
    }
86
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc