[SON for Ethereum] Obtain all the information needed for implementing function calls for primary wallet updates #392

Closed
opened 2022-06-16 03:28:08 +00:00 by serkixenos · 13 comments
serkixenos commented 2022-06-16 03:28:08 +00:00 (Migrated from gitlab.com)

We need to implement methods that will enable updating list of SON primary wallet controllers.

Primary wallet controllers are active SONs. Each active SON should provide Ethereum public key in its configuration.

The output of this task should be set of Ethereum transactions (wrapped in HTTP request???), which, when executed will update the list of primary wallet controllers.

Initial state on Ethereum network is that contract is deployed using random account (in QA environment case, that's default chain account (first account in genesis file). First primary wallet initialization should be executed manually, using smart contract deployment account. In QA environment, initial set of active SONs is available after initialization. They should be the initial primary wallet controllers.

Steps:

Step 1

Using any tools available, obtain the list of all functions and their parameters, and call sequence, that need to be executed in order to update the primary wallet controllers.

Step 2

Capture the HTTP traffic between client tools and Ethereum node while executing the transaction for updating primary wallet controllers, in order to get the reference point for implementation. Expectations is that we will be able to obtain HTTP requests with Ethereum transaction in its body, and data fields that represent encoded function calls and signatures.

We are expecting to see something similar to this:

------------------------------------------------------------------------------------------------
| HTTP Request                                                                                 |
|   -----------------------------------------------------------------------------------------  |
|   | HTTP Headers                                                                          |  |
|   -----------------------------------------------------------------------------------------  |
|   -----------------------------------------------------------------------------------------  |
|   | HTTP Body                                                                             |  |
|   |   ----------------------------------------------------------------------------------  |  |
|   |   | Ethereum transaction                                                           |  |  |
|   |   |   ---------------------------------------------------------------------------  |  |  |
|   |   |   | Various Ethereum transaction fields...                                  |  |  |  |
|   |   |   | Ethereum transaction DATA field - THIS IS WHERE OUR FUNCTION IS ENCODED |  |  |  |
|   |   |   ---------------------------------------------------------------------------  |  |  |
|   |   ----------------------------------------------------------------------------------  |  |
|   -----------------------------------------------------------------------------------------  |
------------------------------------------------------------------------------------------------

HTTP requests contains HTTP headers and HTTP body.

HTTP body contains Ethereum transaction in json or raw tx hex format, which needs decoding.
Once we get to the JSON, we should see fields like nonce, gasPrice, gasLimit, to...), something like this:

{
  "nonce": 415,
  "gasPrice": {
    "_hex": "0x05930665f1"
  },
  "gasLimit": {
    "_hex": "0xdd37"
  },
  "to": "0xe529b502fec3ff0ea86fe63da505ec62fdf4f387",
  "value": {
    "_hex": "0x00"
  },
  "data": "0x095ea7b300000000000000000000000068b3465833fb72a70ecdf485e0e4c7bd8665fc45ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
  "v": 0,
  "r": "0x7d75cbbe33558ef23325ff1063ec4b0693bdebe30fb368535514ea1d41c372d3",
  "s": "0x50b365c6726a7df208c661c8660dcd0a4ced44b892d2190e33167f8465f63ea6"
}

Data field is of specific interests to us at this stage:

  "data": "0x095ea7b300000000000000000000000068b3465833fb72a70ecdf485e0e4c7bd8665fc45ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",

This is the piece we want to build first, using implemented Ethereum encoders.

Step 3

Dissect and document each data field of each function call. We want to know what part of data field represents what piece of data or function parameter.
Describe where each piece of information starts and ends. Eg
Function signature - 8 characters
Parameter name 1: 32 characters
Parameter name 2: 32 characters
Parameter name 3: 4 characters

etc...

Step 4

We are ready for implementation now. Depending on complexity, we will decide how to proceed in separate ticket.

We need to implement methods that will enable updating list of SON primary wallet controllers. Primary wallet controllers are active SONs. Each active SON should provide Ethereum public key in its configuration. The output of this task should be set of Ethereum transactions (wrapped in HTTP request???), which, when executed will update the list of primary wallet controllers. Initial state on Ethereum network is that contract is deployed using random account (in QA environment case, that's default chain account (first account in genesis file). First primary wallet initialization should be executed manually, using smart contract deployment account. In QA environment, initial set of active SONs is available after initialization. They should be the initial primary wallet controllers. Steps: ### Step 1 Using any tools available, obtain the list of all functions and their parameters, and call sequence, that need to be executed in order to update the primary wallet controllers. ### Step 2 Capture the HTTP traffic between client tools and Ethereum node while executing the transaction for updating primary wallet controllers, in order to get the reference point for implementation. Expectations is that we will be able to obtain HTTP requests with Ethereum transaction in its body, and data fields that represent encoded function calls and signatures. We are expecting to see something similar to this: ``` ------------------------------------------------------------------------------------------------ | HTTP Request | | ----------------------------------------------------------------------------------------- | | | HTTP Headers | | | ----------------------------------------------------------------------------------------- | | ----------------------------------------------------------------------------------------- | | | HTTP Body | | | | ---------------------------------------------------------------------------------- | | | | | Ethereum transaction | | | | | | --------------------------------------------------------------------------- | | | | | | | Various Ethereum transaction fields... | | | | | | | | Ethereum transaction DATA field - THIS IS WHERE OUR FUNCTION IS ENCODED | | | | | | | --------------------------------------------------------------------------- | | | | | ---------------------------------------------------------------------------------- | | | ----------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ ``` HTTP requests contains HTTP headers and HTTP body. HTTP body contains Ethereum transaction in json or raw tx hex format, which needs decoding. Once we get to the JSON, we should see fields like nonce, gasPrice, gasLimit, to...), something like this: ``` { "nonce": 415, "gasPrice": { "_hex": "0x05930665f1" }, "gasLimit": { "_hex": "0xdd37" }, "to": "0xe529b502fec3ff0ea86fe63da505ec62fdf4f387", "value": { "_hex": "0x00" }, "data": "0x095ea7b300000000000000000000000068b3465833fb72a70ecdf485e0e4c7bd8665fc45ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", "v": 0, "r": "0x7d75cbbe33558ef23325ff1063ec4b0693bdebe30fb368535514ea1d41c372d3", "s": "0x50b365c6726a7df208c661c8660dcd0a4ced44b892d2190e33167f8465f63ea6" } ``` Data field is of specific interests to us at this stage: ``` "data": "0x095ea7b300000000000000000000000068b3465833fb72a70ecdf485e0e4c7bd8665fc45ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", ``` This is the piece we want to build first, using implemented Ethereum encoders. ### Step 3 Dissect and document each data field of each function call. We want to know what part of data field represents what piece of data or function parameter. Describe where each piece of information starts and ends. Eg Function signature - 8 characters Parameter name 1: 32 characters Parameter name 2: 32 characters Parameter name 3: 4 characters etc... ### Step 4 We are ready for implementation now. Depending on complexity, we will decide how to proceed in separate ticket.
serkixenos commented 2022-06-16 03:28:08 +00:00 (Migrated from gitlab.com)

assigned to @pavel.baykov and @vampik

assigned to @pavel.baykov and @vampik
pavel.baykov commented 2022-06-16 12:10:37 +00:00 (Migrated from gitlab.com)

deployed contract does not mean primary wallet, to create primary wallet it’s required to build/execute a transaction, which returns safe-account address, this address can be used as a primary wallet address controlled by owners

deployed contract does not mean primary wallet, to create primary wallet it’s required to build/execute a transaction, which returns safe-account address, this address can be used as a primary wallet address controlled by owners
pavel.baykov commented 2022-06-16 12:13:35 +00:00 (Migrated from gitlab.com)

to update list of owners there are two methods:

addOwnerWithThreshold(address,uint256)
removeOwner(address,address,uint256)

these methods could be executed only via higher level abstraction (method)

execTransaction(address,uint256,bytes,uint8,uint256,uint256,uint256,address,address,bytes)

called safe-transaction

to update list of owners there are two methods: ``` addOwnerWithThreshold(address,uint256) ``` ``` removeOwner(address,address,uint256) ``` these methods could be executed only via higher level abstraction (method) ``` execTransaction(address,uint256,bytes,uint8,uint256,uint256,uint256,address,address,bytes) ``` called safe-transaction
pavel.baykov commented 2022-06-16 12:15:07 +00:00 (Migrated from gitlab.com)

For instance below I create a primary wallet with 8 owners and 5 threshold:

MacBook-Pro-Pavel:new pavelbaikov$ safe-creator http://127.0.0.1:8545 0xfb9c586f43f98d3a0a568bab501d35a9c0387b0cc85f96df2e52601d9ff1f251 --owners 0x3Bf896929eafC0Ba5de372976733Ff19306Bfcd5 0xf72ADca0c7D2B5b358C2BEA603d35a0Bd8Ed9d7d 0xa4bCb9C203eB5CF8Bc0B824dB88cF7947Ce9C79f 0x053d48B7329628e872842B1A7Ac04F62403f72D9 0xE97cF2e9eC24E76BCf084BB818f16De20fc4a31d 0xd0061dd251452CEd72625AAF4bD1821553Ea3Fcb 0xD649AFa3Be65e5CfDb39cDBBFC279e4c1B537210 0x6B27FACACd456fe2bae2C7E1909FB4DF975e457c --threshold 5 
  ____                 _       ____         __      
 / ___|_ __   ___  ___(_)___  / ___|  __ _ / _| ___ 
| |  _| '_ \ / _ \/ __| / __| \___ \ / _` | |_ / _ \
| |_| | | | | (_) \__ \ \__ \  ___) | (_| |  _|  __/
 \____|_| |_|\___/|___/_|___/ |____/ \__,_|_|  \___|
                                                    
  ____                _             
 / ___|_ __ ___  __ _| |_ ___  _ __ 
| |   | '__/ _ \/ _` | __/ _ \| '__|
| |___| | |  __/ (_| | || (_) | |   
 \____|_|  \___|\__,_|\__\___/|_|   
                                    

Network RINKEBY - Sender 0x3Bf896929eafC0Ba5de372976733Ff19306Bfcd5 - Balance: 0.062448Ξ
Creating new Safe with owners=['0x3Bf896929eafC0Ba5de372976733Ff19306Bfcd5', '0xf72ADca0c7D2B5b358C2BEA603d35a0Bd8Ed9d7d', '0xa4bCb9C203eB5CF8Bc0B824dB88cF7947Ce9C79f', '0x053d48B7329628e872842B1A7Ac04F62403f72D9', '0xE97cF2e9eC24E76BCf084BB818f16De20fc4a31d', '0xd0061dd251452CEd72625AAF4bD1821553Ea3Fcb', '0xD649AFa3Be65e5CfDb39cDBBFC279e4c1B537210', '0x6B27FACACd456fe2bae2C7E1909FB4DF975e457c'] threshold=5 salt-nonce=26609601517049004559006044117793774478498714702091357040614827737475544214571
Proxy factory=0xa6B71E26C5e0845f74c812102Ca7114b6a896AB2 safe-master-copy=0xd9Db270c1B5E3Bd161E8c8503c55cEABeE709552 and fallback-handler=0xf48f2B2d2a534e402487b3ee7C18c33Aec0Fe5e4
Do you want to continue? [y/N]: y
Tx with tx-hash=0x9ebe3696e947bbe84803ad464e564beea803456da4f10f27e1bce3e534a3aca9 will create safe=0x1454940038F289267c796433B74c35f450f97663
Tx paramters={'value': 0, 'gas': 481550, 'maxFeePerGas': 2340633355, 'maxPriorityFeePerGas': 1004382223, 'chainId': 4, 'from': '0x3Bf896929eafC0Ba5de372976733Ff19306Bfcd5', 'to': '0xa6B71E26C5e0845f74c812102Ca7114b6a896AB2', 'data': '0x1688f0b9000000000000000000000000d9db270c1b5e3bd161e8c8503c55ceabee70955200000000000000000000000000000000000000000000000000000000000000603ad4803024cfc0e6882a37c5f281142014758a7d6fc530474dd4a80ef4ef6c2b0000000000000000000000000000000000000000000000000000000000000264b63e800d0000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000220000000000000000000000000f48f2b2d2a534e402487b3ee7c18c33aec0fe5e400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000003bf896929eafc0ba5de372976733ff19306bfcd5000000000000000000000000f72adca0c7d2b5b358c2bea603d35a0bd8ed9d7d000000000000000000000000a4bcb9c203eb5cf8bc0b824db88cf7947ce9c79f000000000000000000000000053d48b7329628e872842b1a7ac04f62403f72d9000000000000000000000000e97cf2e9ec24e76bcf084bb818f16de20fc4a31d000000000000000000000000d0061dd251452ced72625aaf4bd1821553ea3fcb000000000000000000000000d649afa3be65e5cfdb39cdbbfc279e4c1b5372100000000000000000000000006b27facacd456fe2bae2c7e1909fb4df975e457c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000', 'nonce': 29}
MacBook-Pro-Pavel:new pavelbaikov$ safe-creator http://127.0.0.1:8545 0xfb9c586f43f98d3a0a568bab501d35a9c0387b0cc85f96df2e52601d9ff1f251 --owners 0x3Bf896929eafC0Ba5de372976733Ff19306Bfcd5 0xf72ADca0c7D2B5b358C2BEA603d35a0Bd8Ed9d7d 0xa4bCb9C203eB5CF8Bc0B824dB88cF7947Ce9C79f 0x053d48B7329628e872842B1A7Ac04F62403f72D9 0xE97cF2e9eC24E76BCf084BB818f16De20fc4a31d 0xd0061dd251452CEd72625AAF4bD1821553Ea3Fcb 0xD649AFa3Be65e5CfDb39cDBBFC279e4c1B537210 0x6B27FACACd456fe2bae2C7E1909FB4DF975e457c --threshold 5 
  ____                 _       ____         __      
 / ___|_ __   ___  ___(_)___  / ___|  __ _ / _| ___ 
| |  _| '_ \ / _ \/ __| / __| \___ \ / _` | |_ / _ \
| |_| | | | | (_) \__ \ \__ \  ___) | (_| |  _|  __/
 \____|_| |_|\___/|___/_|___/ |____/ \__,_|_|  \___|
                                                    
  ____                _             
 / ___|_ __ ___  __ _| |_ ___  _ __ 
| |   | '__/ _ \/ _` | __/ _ \| '__|
| |___| | |  __/ (_| | || (_) | |   
 \____|_|  \___|\__,_|\__\___/|_|   
                                    

Network RINKEBY - Sender 0x3Bf896929eafC0Ba5de372976733Ff19306Bfcd5 - Balance: 0.061751Ξ
Creating new Safe with owners=['0x3Bf896929eafC0Ba5de372976733Ff19306Bfcd5', '0xf72ADca0c7D2B5b358C2BEA603d35a0Bd8Ed9d7d', '0xa4bCb9C203eB5CF8Bc0B824dB88cF7947Ce9C79f', '0x053d48B7329628e872842B1A7Ac04F62403f72D9', '0xE97cF2e9eC24E76BCf084BB818f16De20fc4a31d', '0xd0061dd251452CEd72625AAF4bD1821553Ea3Fcb', '0xD649AFa3Be65e5CfDb39cDBBFC279e4c1B537210', '0x6B27FACACd456fe2bae2C7E1909FB4DF975e457c'] threshold=5 salt-nonce=3931409452894652624879514618583504736555666532745290300111115700023324792461
Proxy factory=0xa6B71E26C5e0845f74c812102Ca7114b6a896AB2 safe-master-copy=0xd9Db270c1B5E3Bd161E8c8503c55cEABeE709552 and fallback-handler=0xf48f2B2d2a534e402487b3ee7C18c33Aec0Fe5e4
Do you want to continue? [y/N]: y
Tx with tx-hash=0x33203c001804b6e56186ab59a8eac9e70c8c595db9b2cf166a415563810ab130 will create safe=0x838Ca618B49Ecf013e335A8207c4dE92A9f91688
Tx paramters={'value': 0, 'gas': 481550, 'maxFeePerGas': 2229397014, 'maxPriorityFeePerGas': 1008261032, 'chainId': 4, 'from': '0x3Bf896929eafC0Ba5de372976733Ff19306Bfcd5', 'to': '0xa6B71E26C5e0845f74c812102Ca7114b6a896AB2', 'data': '0x1688f0b9000000000000000000000000d9db270c1b5e3bd161e8c8503c55ceabee709552000000000000000000000000000000000000000000000000000000000000006008b119513c48199494f8ee237c065be0f94d0898caeb8a9018084945e8a3568d0000000000000000000000000000000000000000000000000000000000000264b63e800d0000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000220000000000000000000000000f48f2b2d2a534e402487b3ee7c18c33aec0fe5e400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000003bf896929eafc0ba5de372976733ff19306bfcd5000000000000000000000000f72adca0c7d2b5b358c2bea603d35a0bd8ed9d7d000000000000000000000000a4bcb9c203eb5cf8bc0b824db88cf7947ce9c79f000000000000000000000000053d48b7329628e872842b1a7ac04f62403f72d9000000000000000000000000e97cf2e9ec24e76bcf084bb818f16de20fc4a31d000000000000000000000000d0061dd251452ced72625aaf4bd1821553ea3fcb000000000000000000000000d649afa3be65e5cfdb39cdbbfc279e4c1b5372100000000000000000000000006b27facacd456fe2bae2c7e1909fb4df975e457c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000', 'nonce': 30}
For instance below I create a primary wallet with 8 owners and 5 threshold: ``` MacBook-Pro-Pavel:new pavelbaikov$ safe-creator http://127.0.0.1:8545 0xfb9c586f43f98d3a0a568bab501d35a9c0387b0cc85f96df2e52601d9ff1f251 --owners 0x3Bf896929eafC0Ba5de372976733Ff19306Bfcd5 0xf72ADca0c7D2B5b358C2BEA603d35a0Bd8Ed9d7d 0xa4bCb9C203eB5CF8Bc0B824dB88cF7947Ce9C79f 0x053d48B7329628e872842B1A7Ac04F62403f72D9 0xE97cF2e9eC24E76BCf084BB818f16De20fc4a31d 0xd0061dd251452CEd72625AAF4bD1821553Ea3Fcb 0xD649AFa3Be65e5CfDb39cDBBFC279e4c1B537210 0x6B27FACACd456fe2bae2C7E1909FB4DF975e457c --threshold 5 ____ _ ____ __ / ___|_ __ ___ ___(_)___ / ___| __ _ / _| ___ | | _| '_ \ / _ \/ __| / __| \___ \ / _` | |_ / _ \ | |_| | | | | (_) \__ \ \__ \ ___) | (_| | _| __/ \____|_| |_|\___/|___/_|___/ |____/ \__,_|_| \___| ____ _ / ___|_ __ ___ __ _| |_ ___ _ __ | | | '__/ _ \/ _` | __/ _ \| '__| | |___| | | __/ (_| | || (_) | | \____|_| \___|\__,_|\__\___/|_| Network RINKEBY - Sender 0x3Bf896929eafC0Ba5de372976733Ff19306Bfcd5 - Balance: 0.062448Ξ Creating new Safe with owners=['0x3Bf896929eafC0Ba5de372976733Ff19306Bfcd5', '0xf72ADca0c7D2B5b358C2BEA603d35a0Bd8Ed9d7d', '0xa4bCb9C203eB5CF8Bc0B824dB88cF7947Ce9C79f', '0x053d48B7329628e872842B1A7Ac04F62403f72D9', '0xE97cF2e9eC24E76BCf084BB818f16De20fc4a31d', '0xd0061dd251452CEd72625AAF4bD1821553Ea3Fcb', '0xD649AFa3Be65e5CfDb39cDBBFC279e4c1B537210', '0x6B27FACACd456fe2bae2C7E1909FB4DF975e457c'] threshold=5 salt-nonce=26609601517049004559006044117793774478498714702091357040614827737475544214571 Proxy factory=0xa6B71E26C5e0845f74c812102Ca7114b6a896AB2 safe-master-copy=0xd9Db270c1B5E3Bd161E8c8503c55cEABeE709552 and fallback-handler=0xf48f2B2d2a534e402487b3ee7C18c33Aec0Fe5e4 Do you want to continue? [y/N]: y Tx with tx-hash=0x9ebe3696e947bbe84803ad464e564beea803456da4f10f27e1bce3e534a3aca9 will create safe=0x1454940038F289267c796433B74c35f450f97663 Tx paramters={'value': 0, 'gas': 481550, 'maxFeePerGas': 2340633355, 'maxPriorityFeePerGas': 1004382223, 'chainId': 4, 'from': '0x3Bf896929eafC0Ba5de372976733Ff19306Bfcd5', 'to': '0xa6B71E26C5e0845f74c812102Ca7114b6a896AB2', 'data': '0x1688f0b9000000000000000000000000d9db270c1b5e3bd161e8c8503c55ceabee70955200000000000000000000000000000000000000000000000000000000000000603ad4803024cfc0e6882a37c5f281142014758a7d6fc530474dd4a80ef4ef6c2b0000000000000000000000000000000000000000000000000000000000000264b63e800d0000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000220000000000000000000000000f48f2b2d2a534e402487b3ee7c18c33aec0fe5e400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000003bf896929eafc0ba5de372976733ff19306bfcd5000000000000000000000000f72adca0c7d2b5b358c2bea603d35a0bd8ed9d7d000000000000000000000000a4bcb9c203eb5cf8bc0b824db88cf7947ce9c79f000000000000000000000000053d48b7329628e872842b1a7ac04f62403f72d9000000000000000000000000e97cf2e9ec24e76bcf084bb818f16de20fc4a31d000000000000000000000000d0061dd251452ced72625aaf4bd1821553ea3fcb000000000000000000000000d649afa3be65e5cfdb39cdbbfc279e4c1b5372100000000000000000000000006b27facacd456fe2bae2c7e1909fb4df975e457c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000', 'nonce': 29} MacBook-Pro-Pavel:new pavelbaikov$ safe-creator http://127.0.0.1:8545 0xfb9c586f43f98d3a0a568bab501d35a9c0387b0cc85f96df2e52601d9ff1f251 --owners 0x3Bf896929eafC0Ba5de372976733Ff19306Bfcd5 0xf72ADca0c7D2B5b358C2BEA603d35a0Bd8Ed9d7d 0xa4bCb9C203eB5CF8Bc0B824dB88cF7947Ce9C79f 0x053d48B7329628e872842B1A7Ac04F62403f72D9 0xE97cF2e9eC24E76BCf084BB818f16De20fc4a31d 0xd0061dd251452CEd72625AAF4bD1821553Ea3Fcb 0xD649AFa3Be65e5CfDb39cDBBFC279e4c1B537210 0x6B27FACACd456fe2bae2C7E1909FB4DF975e457c --threshold 5 ____ _ ____ __ / ___|_ __ ___ ___(_)___ / ___| __ _ / _| ___ | | _| '_ \ / _ \/ __| / __| \___ \ / _` | |_ / _ \ | |_| | | | | (_) \__ \ \__ \ ___) | (_| | _| __/ \____|_| |_|\___/|___/_|___/ |____/ \__,_|_| \___| ____ _ / ___|_ __ ___ __ _| |_ ___ _ __ | | | '__/ _ \/ _` | __/ _ \| '__| | |___| | | __/ (_| | || (_) | | \____|_| \___|\__,_|\__\___/|_| Network RINKEBY - Sender 0x3Bf896929eafC0Ba5de372976733Ff19306Bfcd5 - Balance: 0.061751Ξ Creating new Safe with owners=['0x3Bf896929eafC0Ba5de372976733Ff19306Bfcd5', '0xf72ADca0c7D2B5b358C2BEA603d35a0Bd8Ed9d7d', '0xa4bCb9C203eB5CF8Bc0B824dB88cF7947Ce9C79f', '0x053d48B7329628e872842B1A7Ac04F62403f72D9', '0xE97cF2e9eC24E76BCf084BB818f16De20fc4a31d', '0xd0061dd251452CEd72625AAF4bD1821553Ea3Fcb', '0xD649AFa3Be65e5CfDb39cDBBFC279e4c1B537210', '0x6B27FACACd456fe2bae2C7E1909FB4DF975e457c'] threshold=5 salt-nonce=3931409452894652624879514618583504736555666532745290300111115700023324792461 Proxy factory=0xa6B71E26C5e0845f74c812102Ca7114b6a896AB2 safe-master-copy=0xd9Db270c1B5E3Bd161E8c8503c55cEABeE709552 and fallback-handler=0xf48f2B2d2a534e402487b3ee7C18c33Aec0Fe5e4 Do you want to continue? [y/N]: y Tx with tx-hash=0x33203c001804b6e56186ab59a8eac9e70c8c595db9b2cf166a415563810ab130 will create safe=0x838Ca618B49Ecf013e335A8207c4dE92A9f91688 Tx paramters={'value': 0, 'gas': 481550, 'maxFeePerGas': 2229397014, 'maxPriorityFeePerGas': 1008261032, 'chainId': 4, 'from': '0x3Bf896929eafC0Ba5de372976733Ff19306Bfcd5', 'to': '0xa6B71E26C5e0845f74c812102Ca7114b6a896AB2', 'data': '0x1688f0b9000000000000000000000000d9db270c1b5e3bd161e8c8503c55ceabee709552000000000000000000000000000000000000000000000000000000000000006008b119513c48199494f8ee237c065be0f94d0898caeb8a9018084945e8a3568d0000000000000000000000000000000000000000000000000000000000000264b63e800d0000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000220000000000000000000000000f48f2b2d2a534e402487b3ee7c18c33aec0fe5e400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000003bf896929eafc0ba5de372976733ff19306bfcd5000000000000000000000000f72adca0c7d2b5b358c2bea603d35a0bd8ed9d7d000000000000000000000000a4bcb9c203eb5cf8bc0b824db88cf7947ce9c79f000000000000000000000000053d48b7329628e872842b1a7ac04f62403f72d9000000000000000000000000e97cf2e9ec24e76bcf084bb818f16de20fc4a31d000000000000000000000000d0061dd251452ced72625aaf4bd1821553ea3fcb000000000000000000000000d649afa3be65e5cfdb39cdbbfc279e4c1b5372100000000000000000000000006b27facacd456fe2bae2c7e1909fb4df975e457c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000', 'nonce': 30} ```
pavel.baykov commented 2022-06-16 12:23:27 +00:00 (Migrated from gitlab.com)

that’s will remove one owner from primary wallet

MacBook-Pro-Pavel:new pavelbaikov$ safe-cli 0x838Ca618B49Ecf013e335A8207c4dE92A9f91688 http://127.0.0.1:8545
  ____                 _       ____         __         ____ _     ___ 
 / ___|_ __   ___  ___(_)___  / ___|  __ _ / _| ___   / ___| |   |_ _|
| |  _| '_ \ / _ \/ __| / __| \___ \ / _` | |_ / _ \ | |   | |    | | 
| |_| | | | | (_) \__ \ \__ \  ___) | (_| |  _|  __/ | |___| |___ | | 
 \____|_| |_|\___/|___/_|___/ |____/ \__,_|_|  \___|  \____|_____|___|
                                                                      

Loading Safe information...
Address=0x838Ca618B49Ecf013e335A8207c4dE92A9f91688
Nonce=0
Threshold=5
Owners=['0x3Bf896929eafC0Ba5de372976733Ff19306Bfcd5', '0xf72ADca0c7D2B5b358C2BEA603d35a0Bd8Ed9d7d', '0xa4bCb9C203eB5CF8Bc0B824dB88cF7947Ce9C79f', '0x053d48B7329628e872842B1A7Ac04F62403f72D9', '0xE97cF2e9eC24E76BCf084BB818f16De20fc4a31d', '0xd0061dd251452CEd72625AAF4bD1821553Ea3Fcb', '0xD649AFa3Be65e5CfDb39cDBBFC279e4c1B537210', '0x6B27FACACd456fe2bae2C7E1909FB4DF975e457c']
Master_copy=0xd9Db270c1B5E3Bd161E8c8503c55cEABeE709552
Modules=[]
Fallback_handler=0xf48f2B2d2a534e402487b3ee7C18c33Aec0Fe5e4
Guard=0x0000000000000000000000000000000000000000
Balance_ether=0
Version=1.3.0
Safe Tx Service=https://safe-transaction.rinkeby.gnosis.io/api/v1/safes/0x838Ca618B49Ecf013e335A8207c4dE92A9f91688/transactions/
Safe Relay Service=https://safe-relay.rinkeby.gnosis.io/api/v1/safes/0x838Ca618B49Ecf013e335A8207c4dE92A9f91688/transactions/
Etherscan=https://rinkeby.etherscan.io/address/0x838Ca618B49Ecf013e335A8207c4dE92A9f91688
blockchain > 0x838Ca618B49Ecf013e335A8207c4dE92A9f91688 >                                                                                                                                                 
MacBook-Pro-Pavel:new pavelbaikov$ safe-cli 0x838Ca618B49Ecf013e335A8207c4dE92A9f91688 http://127.0.0.1:8545
  ____                 _       ____         __         ____ _     ___ 
 / ___|_ __   ___  ___(_)___  / ___|  __ _ / _| ___   / ___| |   |_ _|
| |  _| '_ \ / _ \/ __| / __| \___ \ / _` | |_ / _ \ | |   | |    | | 
| |_| | | | | (_) \__ \ \__ \  ___) | (_| |  _|  __/ | |___| |___ | | 
 \____|_| |_|\___/|___/_|___/ |____/ \__,_|_|  \___|  \____|_____|___|
                                                                      

Loading Safe information...
Address=0x838Ca618B49Ecf013e335A8207c4dE92A9f91688
Nonce=0
Threshold=5
Owners=['0x3Bf896929eafC0Ba5de372976733Ff19306Bfcd5', '0xf72ADca0c7D2B5b358C2BEA603d35a0Bd8Ed9d7d', '0xa4bCb9C203eB5CF8Bc0B824dB88cF7947Ce9C79f', '0x053d48B7329628e872842B1A7Ac04F62403f72D9', '0xE97cF2e9eC24E76BCf084BB818f16De20fc4a31d', '0xd0061dd251452CEd72625AAF4bD1821553Ea3Fcb', '0xD649AFa3Be65e5CfDb39cDBBFC279e4c1B537210', '0x6B27FACACd456fe2bae2C7E1909FB4DF975e457c']
Master_copy=0xd9Db270c1B5E3Bd161E8c8503c55cEABeE709552
Modules=[]
Fallback_handler=0xf48f2B2d2a534e402487b3ee7C18c33Aec0Fe5e4
Guard=0x0000000000000000000000000000000000000000
Balance_ether=0
Version=1.3.0
Safe Tx Service=https://safe-transaction.rinkeby.gnosis.io/api/v1/safes/0x838Ca618B49Ecf013e335A8207c4dE92A9f91688/transactions/
Safe Relay Service=https://safe-relay.rinkeby.gnosis.io/api/v1/safes/0x838Ca618B49Ecf013e335A8207c4dE92A9f91688/transactions/
Etherscan=https://rinkeby.etherscan.io/address/0x838Ca618B49Ecf013e335A8207c4dE92A9f91688
blockchain > 0x838Ca618B49Ecf013e335A8207c4dE92A9f91688 > load_cli_owners 0x055940495d32fcbec8ad0ca9bcc405fea854e4cbd5c42a617a5e83f125b268d5
Loaded account 0x6B27FACACd456fe2bae2C7E1909FB4DF975e457c with balance=0 ether
blockchain > 0x838Ca618B49Ecf013e335A8207c4dE92A9f91688 > load_cli_owners 0xa33c93e219fa74c7bf83f7a9bc1c7f124b527b10a6c155374b3b6c5f018c3b20
Loaded account 0xD649AFa3Be65e5CfDb39cDBBFC279e4c1B537210 with balance=0 ether
blockchain > 0x838Ca618B49Ecf013e335A8207c4dE92A9f91688 > load_cli_owners 0x0a5445c2b39bc784a0f6f98b2e6b4cfaa9f3d7dd4170aef5a415598bcf85a944
Loaded account 0xd0061dd251452CEd72625AAF4bD1821553Ea3Fcb with balance=0 ether
blockchain > 0x838Ca618B49Ecf013e335A8207c4dE92A9f91688 > load_cli_owners 0x612100ad9b1a295a60ac0ab6ffa39eb8a3f74f6bd22179aa421448e7d1829d2c
Loaded account 0xE97cF2e9eC24E76BCf084BB818f16De20fc4a31d with balance=0 ether
blockchain > 0x838Ca618B49Ecf013e335A8207c4dE92A9f91688 > load_cli_owners 0xcf3761bc2d0b133be45f8e6d8f3fd2a9a8e2b52391bd79c7047ab52851292404
Loaded account 0x053d48B7329628e872842B1A7Ac04F62403f72D9 with balance=0 ether
blockchain > 0x838Ca618B49Ecf013e335A8207c4dE92A9f91688 > remove_owner 0x6B27FACACd456fe2bae2C7E1909FB4DF975e457c
Please load a default sender
blockchain > 0x838Ca618B49Ecf013e335A8207c4dE92A9f91688 > load_cli_owners 0xfb9c586f43f98d3a0a568bab501d35a9c0387b0cc85f96df2e52601d9ff1f251
Loaded account 0x3Bf896929eafC0Ba5de372976733Ff19306Bfcd5 with balance=0.061067670106259279 ether
Set account 0x3Bf896929eafC0Ba5de372976733Ff19306Bfcd5 as default sender of txs
blockchain > 0x838Ca618B49Ecf013e335A8207c4dE92A9f91688 > remove_owner 0x6B27FACACd456fe2bae2C7E1909FB4DF975e457c
Result: True
Do you want to execute tx SafeTx - safe=0x838Ca618B49Ecf013e335A8207c4dE92A9f91688 - to=0x838Ca618B49Ecf013e335A8207c4dE92A9f91688 - value=0 - data=0xf8dc5dd9000000000000000000000000d649afa3be65e5cfdb39cdbbfc279e4c1b5372100000000000000000000000006b27facacd456fe2bae2c7e1909fb4df975e457c0000000000000000000000000000000000000000000000000000000000000005 - operation=0 - safe-tx-gas=0 - base-gas=0 - gas-price=0 - gas-token=0x0000000000000000000000000000000000000000 - refund-receiver=0x0000000000000000000000000000000000000000 - signers = ['0x053d48B7329628e872842B1A7Ac04F62403f72D9', '0x3Bf896929eafC0Ba5de372976733Ff19306Bfcd5', '0x6B27FACACd456fe2bae2C7E1909FB4DF975e457c', '0xd0061dd251452CEd72625AAF4bD1821553Ea3Fcb', '0xD649AFa3Be65e5CfDb39cDBBFC279e4c1B537210'] [y/N]: y
Sent tx with tx-hash 0xfe8590d87f9075798fb5c774a44a3273f77e54fe3c9be63d40d248a77578841f and safe-nonce 0, waiting for receipt
Tx was executed on block-number=10861734, fees deducted=0.000363890315664792
that’s will remove one owner from primary wallet ``` MacBook-Pro-Pavel:new pavelbaikov$ safe-cli 0x838Ca618B49Ecf013e335A8207c4dE92A9f91688 http://127.0.0.1:8545 ____ _ ____ __ ____ _ ___ / ___|_ __ ___ ___(_)___ / ___| __ _ / _| ___ / ___| | |_ _| | | _| '_ \ / _ \/ __| / __| \___ \ / _` | |_ / _ \ | | | | | | | |_| | | | | (_) \__ \ \__ \ ___) | (_| | _| __/ | |___| |___ | | \____|_| |_|\___/|___/_|___/ |____/ \__,_|_| \___| \____|_____|___| Loading Safe information... Address=0x838Ca618B49Ecf013e335A8207c4dE92A9f91688 Nonce=0 Threshold=5 Owners=['0x3Bf896929eafC0Ba5de372976733Ff19306Bfcd5', '0xf72ADca0c7D2B5b358C2BEA603d35a0Bd8Ed9d7d', '0xa4bCb9C203eB5CF8Bc0B824dB88cF7947Ce9C79f', '0x053d48B7329628e872842B1A7Ac04F62403f72D9', '0xE97cF2e9eC24E76BCf084BB818f16De20fc4a31d', '0xd0061dd251452CEd72625AAF4bD1821553Ea3Fcb', '0xD649AFa3Be65e5CfDb39cDBBFC279e4c1B537210', '0x6B27FACACd456fe2bae2C7E1909FB4DF975e457c'] Master_copy=0xd9Db270c1B5E3Bd161E8c8503c55cEABeE709552 Modules=[] Fallback_handler=0xf48f2B2d2a534e402487b3ee7C18c33Aec0Fe5e4 Guard=0x0000000000000000000000000000000000000000 Balance_ether=0 Version=1.3.0 Safe Tx Service=https://safe-transaction.rinkeby.gnosis.io/api/v1/safes/0x838Ca618B49Ecf013e335A8207c4dE92A9f91688/transactions/ Safe Relay Service=https://safe-relay.rinkeby.gnosis.io/api/v1/safes/0x838Ca618B49Ecf013e335A8207c4dE92A9f91688/transactions/ Etherscan=https://rinkeby.etherscan.io/address/0x838Ca618B49Ecf013e335A8207c4dE92A9f91688 blockchain > 0x838Ca618B49Ecf013e335A8207c4dE92A9f91688 > MacBook-Pro-Pavel:new pavelbaikov$ safe-cli 0x838Ca618B49Ecf013e335A8207c4dE92A9f91688 http://127.0.0.1:8545 ____ _ ____ __ ____ _ ___ / ___|_ __ ___ ___(_)___ / ___| __ _ / _| ___ / ___| | |_ _| | | _| '_ \ / _ \/ __| / __| \___ \ / _` | |_ / _ \ | | | | | | | |_| | | | | (_) \__ \ \__ \ ___) | (_| | _| __/ | |___| |___ | | \____|_| |_|\___/|___/_|___/ |____/ \__,_|_| \___| \____|_____|___| Loading Safe information... Address=0x838Ca618B49Ecf013e335A8207c4dE92A9f91688 Nonce=0 Threshold=5 Owners=['0x3Bf896929eafC0Ba5de372976733Ff19306Bfcd5', '0xf72ADca0c7D2B5b358C2BEA603d35a0Bd8Ed9d7d', '0xa4bCb9C203eB5CF8Bc0B824dB88cF7947Ce9C79f', '0x053d48B7329628e872842B1A7Ac04F62403f72D9', '0xE97cF2e9eC24E76BCf084BB818f16De20fc4a31d', '0xd0061dd251452CEd72625AAF4bD1821553Ea3Fcb', '0xD649AFa3Be65e5CfDb39cDBBFC279e4c1B537210', '0x6B27FACACd456fe2bae2C7E1909FB4DF975e457c'] Master_copy=0xd9Db270c1B5E3Bd161E8c8503c55cEABeE709552 Modules=[] Fallback_handler=0xf48f2B2d2a534e402487b3ee7C18c33Aec0Fe5e4 Guard=0x0000000000000000000000000000000000000000 Balance_ether=0 Version=1.3.0 Safe Tx Service=https://safe-transaction.rinkeby.gnosis.io/api/v1/safes/0x838Ca618B49Ecf013e335A8207c4dE92A9f91688/transactions/ Safe Relay Service=https://safe-relay.rinkeby.gnosis.io/api/v1/safes/0x838Ca618B49Ecf013e335A8207c4dE92A9f91688/transactions/ Etherscan=https://rinkeby.etherscan.io/address/0x838Ca618B49Ecf013e335A8207c4dE92A9f91688 blockchain > 0x838Ca618B49Ecf013e335A8207c4dE92A9f91688 > load_cli_owners 0x055940495d32fcbec8ad0ca9bcc405fea854e4cbd5c42a617a5e83f125b268d5 Loaded account 0x6B27FACACd456fe2bae2C7E1909FB4DF975e457c with balance=0 ether blockchain > 0x838Ca618B49Ecf013e335A8207c4dE92A9f91688 > load_cli_owners 0xa33c93e219fa74c7bf83f7a9bc1c7f124b527b10a6c155374b3b6c5f018c3b20 Loaded account 0xD649AFa3Be65e5CfDb39cDBBFC279e4c1B537210 with balance=0 ether blockchain > 0x838Ca618B49Ecf013e335A8207c4dE92A9f91688 > load_cli_owners 0x0a5445c2b39bc784a0f6f98b2e6b4cfaa9f3d7dd4170aef5a415598bcf85a944 Loaded account 0xd0061dd251452CEd72625AAF4bD1821553Ea3Fcb with balance=0 ether blockchain > 0x838Ca618B49Ecf013e335A8207c4dE92A9f91688 > load_cli_owners 0x612100ad9b1a295a60ac0ab6ffa39eb8a3f74f6bd22179aa421448e7d1829d2c Loaded account 0xE97cF2e9eC24E76BCf084BB818f16De20fc4a31d with balance=0 ether blockchain > 0x838Ca618B49Ecf013e335A8207c4dE92A9f91688 > load_cli_owners 0xcf3761bc2d0b133be45f8e6d8f3fd2a9a8e2b52391bd79c7047ab52851292404 Loaded account 0x053d48B7329628e872842B1A7Ac04F62403f72D9 with balance=0 ether blockchain > 0x838Ca618B49Ecf013e335A8207c4dE92A9f91688 > remove_owner 0x6B27FACACd456fe2bae2C7E1909FB4DF975e457c Please load a default sender blockchain > 0x838Ca618B49Ecf013e335A8207c4dE92A9f91688 > load_cli_owners 0xfb9c586f43f98d3a0a568bab501d35a9c0387b0cc85f96df2e52601d9ff1f251 Loaded account 0x3Bf896929eafC0Ba5de372976733Ff19306Bfcd5 with balance=0.061067670106259279 ether Set account 0x3Bf896929eafC0Ba5de372976733Ff19306Bfcd5 as default sender of txs blockchain > 0x838Ca618B49Ecf013e335A8207c4dE92A9f91688 > remove_owner 0x6B27FACACd456fe2bae2C7E1909FB4DF975e457c Result: True Do you want to execute tx SafeTx - safe=0x838Ca618B49Ecf013e335A8207c4dE92A9f91688 - to=0x838Ca618B49Ecf013e335A8207c4dE92A9f91688 - value=0 - data=0xf8dc5dd9000000000000000000000000d649afa3be65e5cfdb39cdbbfc279e4c1b5372100000000000000000000000006b27facacd456fe2bae2c7e1909fb4df975e457c0000000000000000000000000000000000000000000000000000000000000005 - operation=0 - safe-tx-gas=0 - base-gas=0 - gas-price=0 - gas-token=0x0000000000000000000000000000000000000000 - refund-receiver=0x0000000000000000000000000000000000000000 - signers = ['0x053d48B7329628e872842B1A7Ac04F62403f72D9', '0x3Bf896929eafC0Ba5de372976733Ff19306Bfcd5', '0x6B27FACACd456fe2bae2C7E1909FB4DF975e457c', '0xd0061dd251452CEd72625AAF4bD1821553Ea3Fcb', '0xD649AFa3Be65e5CfDb39cDBBFC279e4c1B537210'] [y/N]: y Sent tx with tx-hash 0xfe8590d87f9075798fb5c774a44a3273f77e54fe3c9be63d40d248a77578841f and safe-nonce 0, waiting for receipt Tx was executed on block-number=10861734, fees deducted=0.000363890315664792 ```
pavel.baykov commented 2022-06-16 12:31:56 +00:00 (Migrated from gitlab.com)

Attaching pcap files for 4 cases:

  1. create primary wallet with 8 owners and threshold 5
  2. remove owner from primary wallet
  3. add owner to the primary wallet
  4. retrieve list of primary wallets

add.pcap

create.pcap

get.pcap

remove.pcap

Attaching pcap files for 4 cases: 1. create primary wallet with 8 owners and threshold 5 2. remove owner from primary wallet 3. add owner to the primary wallet 4. retrieve list of primary wallets [add.pcap](/uploads/caa338aa9d2f5828ad8e64c05893f032/add.pcap) [create.pcap](/uploads/a5c4fa31829894d71ca9c2dbfa751ce7/create.pcap) [get.pcap](/uploads/c753a610da54a06b67c007fec197ab18/get.pcap) [remove.pcap](/uploads/0cda504d3a4c5846067d2bf5db9c489e/remove.pcap)
pavel.baykov commented 2022-06-16 18:38:36 +00:00 (Migrated from gitlab.com)
remove owner from primary wallet steps: https://docs.google.com/document/d/1jiiP1hLLMEwDIW_Ni2tgD5mlr06SX2lzvVcCnySFEqk/edit
vampik commented 2022-06-17 07:29:44 +00:00 (Migrated from gitlab.com)

Everytime we execute command with safe-cli tool it writes what it would do. Is it the thing we want, no?

For example for adding owner function:

add_owner 0x3Bf896929eafC0Ba5de372976733Ff19306Bfcd5
Result: True
Do you want to execute tx SafeTx - safe=0xe4006A3375BAE84967a656fefAE3d46109E9030B - to=0xe4006A3375BAE84967a656fefAE3d46109E9030B - value=0 - data=0x0d582f130000000000000000000000003bf896929eafc0ba5de372976733ff19306bfcd50000000000000000000000000000000000000000000000000000000000000001 - operation=0 - safe-tx-gas=0 - base-gas=0 - gas-price=0 - gas-token=0x0000000000000000000000000000000000000000 - refund-receiver=0x0000000000000000000000000000000000000000 - signers = ['0x0b0da05EfbDf1939aACB4CE4caC2086bAabE2860'] [y/N]: y
Sent tx with tx-hash 0x30e6aed9898a110c6f0d7a80821787a5a7a73919fe43334a7de04c1a2f4f1d23 and safe-nonce 0, waiting for receipt
Tx was executed on block-number=10866600, fees deducted=0.000255435006845658

Here we have data field.

Everytime we execute command with `safe-cli` tool it writes what it would do. Is it the thing we want, no? For example for adding owner function: ``` add_owner 0x3Bf896929eafC0Ba5de372976733Ff19306Bfcd5 Result: True Do you want to execute tx SafeTx - safe=0xe4006A3375BAE84967a656fefAE3d46109E9030B - to=0xe4006A3375BAE84967a656fefAE3d46109E9030B - value=0 - data=0x0d582f130000000000000000000000003bf896929eafc0ba5de372976733ff19306bfcd50000000000000000000000000000000000000000000000000000000000000001 - operation=0 - safe-tx-gas=0 - base-gas=0 - gas-price=0 - gas-token=0x0000000000000000000000000000000000000000 - refund-receiver=0x0000000000000000000000000000000000000000 - signers = ['0x0b0da05EfbDf1939aACB4CE4caC2086bAabE2860'] [y/N]: y Sent tx with tx-hash 0x30e6aed9898a110c6f0d7a80821787a5a7a73919fe43334a7de04c1a2f4f1d23 and safe-nonce 0, waiting for receipt Tx was executed on block-number=10866600, fees deducted=0.000255435006845658 ``` Here we have `data` field.
vampik commented 2022-06-17 11:12:16 +00:00 (Migrated from gitlab.com)

If we have:
data=0x0d582f130000000000000000000000003bf896929eafc0ba5de372976733ff19306bfcd50000000000000000000000000000000000000000000000000000000000000001

With the help of
https://safe-transaction.gnosis.io/

We can decode it:

curl -X POST "https://safe-transaction.gnosis.io/api/v1/data-decoder/" -H "accept: application/json" -H "Content-Type: application/json" -H "X-CSRFToken: 2gmtdUA8XlNXeTClZNh7DnxGXgwk50lqXDaGKi4IHMrrozkp6FNNXns7ssrpVJj9" -d "{ \"data\": \"0x0d582f130000000000000000000000003bf896929eafc0ba5de372976733ff19306bfcd50000000000000000000000000000000000000000000000000000000000000001\", \"to\": \"0xe4006A3375BAE84967a656fefAE3d46109E9030B\"}"

The result:

{
  "method": "addOwnerWithThreshold",
  "parameters": [
    {
      "name": "owner",
      "type": "address",
      "value": "0x3Bf896929eafC0Ba5de372976733Ff19306Bfcd5"
    },
    {
      "name": "_threshold",
      "type": "uint256",
      "value": "1"
    }
  ]
}
If we have: `data=0x0d582f130000000000000000000000003bf896929eafc0ba5de372976733ff19306bfcd50000000000000000000000000000000000000000000000000000000000000001` With the help of https://safe-transaction.gnosis.io/ We can decode it: `curl -X POST "https://safe-transaction.gnosis.io/api/v1/data-decoder/" -H "accept: application/json" -H "Content-Type: application/json" -H "X-CSRFToken: 2gmtdUA8XlNXeTClZNh7DnxGXgwk50lqXDaGKi4IHMrrozkp6FNNXns7ssrpVJj9" -d "{ \"data\": \"0x0d582f130000000000000000000000003bf896929eafc0ba5de372976733ff19306bfcd50000000000000000000000000000000000000000000000000000000000000001\", \"to\": \"0xe4006A3375BAE84967a656fefAE3d46109E9030B\"}" ` The result: ``` { "method": "addOwnerWithThreshold", "parameters": [ { "name": "owner", "type": "address", "value": "0x3Bf896929eafC0Ba5de372976733Ff19306Bfcd5" }, { "name": "_threshold", "type": "uint256", "value": "1" } ] } ```
serkixenos commented 2022-06-17 12:11:46 +00:00 (Migrated from gitlab.com)

This sounds like exactly what we need for Step 3 - dissecting data.

This sounds like exactly what we need for Step 3 - dissecting data.
pavel.baykov commented 2022-06-17 12:16:51 +00:00 (Migrated from gitlab.com)
add owner document https://docs.google.com/document/d/1nCF8StNWb9N5KTVVs-Vu3TJ7klseHYepAuwEwzRIqP8/edit
vampik commented 2022-06-17 12:23:40 +00:00 (Migrated from gitlab.com)
Here is the transaction for add owner: https://rinkeby.etherscan.io/tx/0x30e6aed9898a110c6f0d7a80821787a5a7a73919fe43334a7de04c1a2f4f1d23
vampik commented 2022-07-27 12:04:04 +00:00 (Migrated from gitlab.com)

We will use our custom smart contract with following functions:

getBalance()
curl http://10.11.12.202:8545 -X POST -H "Content-Type: application/json" --data '{"method":"eth_call","params":[ { "to": "0x3E84f248Cd00A2FDaaDfa0dC5c3ff64D8767Fb01", "data": "0x12065fe0" }, "latest" ],"id":1,"jsonrpc":"2.0"}'
deposit()
curl http://10.11.12.202:8545 -X POST -H "Content-Type: application/json" --data '{"method":"eth_sendTransaction","params":[ { "from": "0x5FbBb31BE52608D2F52247E8400B7fCaA9E0bC12", "to": "0x3E84f248Cd00A2FDaaDfa0dC5c3ff64D8767Fb01", "value": "0x1BC16D674EC80000", "data": "0xd0e30db0" } ],"id":1,"jsonrpc":"2.0"}'
withdraw(address,uint256,string)
curl http://10.11.12.202:8545 -X POST -H "Content-Type: application/json" --data '{"method":"eth_sendTransaction","params":[ { "from": "0x5FbBb31BE52608D2F52247E8400B7fCaA9E0bC12", "to": "0x3E84f248Cd00A2FDaaDfa0dC5c3ff64D8767Fb01", "data": "0xe088747b00000000000000000000000009ee460834498a4ee361beb819470061b7381b490000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000006312e33362e330000000000000000000000000000000000000000000000000000" } ],"id":1,"jsonrpc":"2.0"}'

method signature - 0xe088747b
address _to - 09EE460834498a4ee361beB819470061B7381B49
uint256 _amount - DE0B6B3A7640000
string _object_id - 00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000006312e33362e330000000000000000000000000000000000000000000000000000
We will use our custom smart contract with following functions: ``` getBalance() curl http://10.11.12.202:8545 -X POST -H "Content-Type: application/json" --data '{"method":"eth_call","params":[ { "to": "0x3E84f248Cd00A2FDaaDfa0dC5c3ff64D8767Fb01", "data": "0x12065fe0" }, "latest" ],"id":1,"jsonrpc":"2.0"}' ``` ``` deposit() curl http://10.11.12.202:8545 -X POST -H "Content-Type: application/json" --data '{"method":"eth_sendTransaction","params":[ { "from": "0x5FbBb31BE52608D2F52247E8400B7fCaA9E0bC12", "to": "0x3E84f248Cd00A2FDaaDfa0dC5c3ff64D8767Fb01", "value": "0x1BC16D674EC80000", "data": "0xd0e30db0" } ],"id":1,"jsonrpc":"2.0"}' ``` ``` withdraw(address,uint256,string) curl http://10.11.12.202:8545 -X POST -H "Content-Type: application/json" --data '{"method":"eth_sendTransaction","params":[ { "from": "0x5FbBb31BE52608D2F52247E8400B7fCaA9E0bC12", "to": "0x3E84f248Cd00A2FDaaDfa0dC5c3ff64D8767Fb01", "data": "0xe088747b00000000000000000000000009ee460834498a4ee361beb819470061b7381b490000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000006312e33362e330000000000000000000000000000000000000000000000000000" } ],"id":1,"jsonrpc":"2.0"}' method signature - 0xe088747b address _to - 09EE460834498a4ee361beB819470061B7381B49 uint256 _amount - DE0B6B3A7640000 string _object_id - 00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000006312e33362e330000000000000000000000000000000000000000000000000000 ```
serkixenos (Migrated from gitlab.com) closed this issue 2022-07-27 12:14:13 +00:00
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Peerplays_Blockchain/peerplays_migrated#392
No description provided.