Merge pull request #7 from tschubotz/master

Add Gnosis Safe tx format
This commit is contained in:
Pet3rpan 2018-09-25 18:49:05 +02:00 committed by GitHub
commit 03ae26bb33
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 68 additions and 1 deletions

View File

@ -15,7 +15,9 @@ For now, join us on telegram for the discussion: https://t.me/joinchat/HcTaOxJH6
[tenzorum](https://github.com/austintgriffith/meta-transaction-format-share/blob/master/tenzorum.org.md)
[tokenubscription](https://github.com/austintgriffith/meta-transaction-format-share/blob/master/tokensubscription.com.md)
[tokensubscription](https://github.com/austintgriffith/meta-transaction-format-share/blob/master/tokensubscription.com.md)
[Gnosis Safe](safe.gnosis.io.md)
## Important problems to solve

65
safe.gnosis.io.md Normal file
View File

@ -0,0 +1,65 @@
### Format
```
/// @dev Returns hash to be signed by owners.
/// @param to Destination address.
/// @param value Ether value.
/// @param data Data payload.
/// @param operation Operation type.
/// @param safeTxGas Fas that should be used for the safe transaction.
/// @param dataGas Gas costs for data used to trigger the safe transaction.
/// @param gasPrice Maximum gas price that should be used for this transaction.
/// @param gasToken Token address (or 0 if ETH) that is used for the payment.
/// @param refundReceiver Address of receiver of gas payment (or 0 if tx.origin).
/// @param _nonce Transaction nonce.
/// @return Transaction hash.
function getTransactionHash(
address to,
uint256 value,
bytes data,
Enum.Operation operation,
uint256 safeTxGas,
uint256 dataGas,
uint256 gasPrice,
address gasToken,
address refundReceiver,
uint256 _nonce
)
```
### Rx
```
There is currently no endpoint to pull the transactions from.
```
### Tx
```
/// @dev Allows to execute a Safe transaction confirmed by required number of owners and then pays the account that submitted the transaction.
/// Note: The fees are always transfered, even if the user transaction fails.
/// @param to Destination address of Safe transaction.
/// @param value Ether value of Safe transaction.
/// @param data Data payload of Safe transaction.
/// @param operation Operation type of Safe transaction.
/// @param safeTxGas Gas that should be used for the Safe transaction.
/// @param dataGas Gas costs for data used to trigger the safe transaction and to pay the payment transfer
/// @param gasPrice Gas price that should be used for the payment calculation.
/// @param gasToken Token address (or 0 if ETH) that is used for the payment.
/// @param refundReceiver Address of receiver of gas payment (or 0 if tx.origin).
/// @param signatures Packed signature data ({bytes32 r}{bytes32 s}{uint8 v})
function execTransaction(
address to,
uint256 value,
bytes data,
Enum.Operation operation,
uint256 safeTxGas,
uint256 dataGas,
uint256 gasPrice,
address gasToken,
address refundReceiver,
bytes signatures
)
```
Please check the following links for further context and details:
* https://github.com/gnosis/safe-contracts
* https://gnosis-safe.readthedocs.io/en/latest/