You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+5-7Lines changed: 5 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -54,9 +54,9 @@ There are multiple implementations of the Gnosis Safe contract with different me
54
54
#### GnosisSafePersonalEdition.sol
55
55
This version is targeted at users that control all keys owning a safe. The transaction hash can be signed with the private keys that manage the safe.
56
56
57
-
Once the required number of confirmations is available `execAndPayTransaction` can be called with the sending confirmation signatures. This method will pay the submitter of the transaction for the transaction fees after the Safe transaction has been executed.
57
+
Once the required number of confirmations is available `execTransactionAndPaySubmitter` can be called with the sending confirmation signatures. This method will pay the submitter of the transaction for the transaction fees after the Safe transaction has been executed.
58
58
59
-
`execAndPayTransaction` expects all confirmations sorted by owner address. This is required to easily validate no confirmation duplicates exist.
59
+
`execTransactionAndPaySubmitter` expects all confirmations sorted by owner address. This is required to easily validate no confirmation duplicates exist.
60
60
61
61
#### GnosisSafeTeamEdition.sol
62
62
This version is targeted at teams where each owner is a different user. Each owner has to confirm a transaction by using `confirmTransaction`. Once the required number of owners has confirmed, the transaction can be executed via `execTransactionIfApproved`. If the sender of `execTransactionIfApproved` is an owner it is not necessary to confirm the transaction before. Furthermore this version doesn't store the nonce in the contract but for each transaction a nonce needs to be specified.
@@ -70,12 +70,10 @@ Assuming we have 2 owners in a 2 out of 2 multisig configuration:
70
70
71
71
`0x1` and `0x2` are confirming by signing a message.
72
72
73
-
The Safe transaction parameters used for `execTransaction` have to be set like the following:
74
-
*`v = [v_0x1, v_0x2]`
75
-
*`r = [r_0x1, r_0x2]`
76
-
*`s = [s_0x1, s_0x2]`
73
+
The signatures bytes used for `execTransaction` have to be build like the following:
`v`, `r` and `s` are the signature parameters for the signed confirmation messages. Position `0` in `v` represents `0x1`'s signature part and corresponds to position `0` in `r` and `s`.
76
+
`v`, `r` and `s` are the signature parameters for the signed confirmation messages. All values are hex encoded. `r` and `s` are padded to 32 bytes and `v` is padded to 8 bytes.
79
77
80
78
### Modules
81
79
Modules allow to execute transactions from the Safe without the requirement of multiple signatures. For this Modules that have been added to a Safe can use the `execTransactionFromModule` function. Modules define their own requirements for execution. Modules need to implement their own replay protection.
@@ -73,7 +73,7 @@ contract GnosisSafePersonalEdition is MasterCopy, GnosisSafe {
73
73
/// 1.) The method can only be called from the safe itself
74
74
/// 2.) The response is returned with a revert
75
75
/// When estimating set `from` to the address of the safe.
76
-
/// Since the `estimateGas` function includes refunds, call this method to get an estimated of the costs that are deducted from the safe with `execAndPayTransaction`
76
+
/// Since the `estimateGas` function includes refunds, call this method to get an estimated of the costs that are deducted from the safe with `execTransactionAndPaySubmitter`
77
77
/// @param to Destination address of Safe transaction.
78
78
/// @param value Ether value of Safe transaction.
79
79
/// @param data Data payload of Safe transaction.
@@ -92,7 +92,7 @@ contract GnosisSafePersonalEdition is MasterCopy, GnosisSafe {
92
92
revert(string(abi.encodePacked(requiredGas)));
93
93
}
94
94
95
-
function checkHash(bytes32hash, uint8[] v, bytes32[] r, bytes32[] s)
95
+
function checkHash(bytes32txHash, bytessignatures)
96
96
internal
97
97
view
98
98
{
@@ -102,7 +102,7 @@ contract GnosisSafePersonalEdition is MasterCopy, GnosisSafe {
102
102
uint256 i;
103
103
// Validate threshold is reached.
104
104
for (i =0; i < threshold; i++) {
105
-
currentOwner =ecrecover(hash, v[i], r[i], s[i]);
105
+
currentOwner =recoverKey(txHash, signatures, i);
106
106
require(owners[currentOwner] !=0, "Signature not provided by owner");
107
107
require(currentOwner > lastOwner, "Signatures are not ordered by owner address");
0 commit comments