Skip to content

Commit

Permalink
docs: adding the last notes
Browse files Browse the repository at this point in the history
  • Loading branch information
praetoriansentry committed Apr 24, 2024
1 parent 8ae6c89 commit 52a150a
Showing 1 changed file with 69 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,75 @@ printf "%d\n" $(cast block -j --rpc-url $(kurtosis port print cdk-v1 el-1-geth-l
1713983298
#+end_src

It looks like we still have to wait 37 minutes
It looks like we still have to wait 37 minutes.

Once the time is elapsed, I should be able to repeat the same exact
call from ~execute~ and use ~execute~ instead. First let's make sure
that it reports that it's ready.

#+begin_src bash :exports both verbatim :results output code
id="0x2834e50d0fbd2359263689c685f4afd0311de4b150625c349a40a7b2b7e7f34e"
cast call --rpc-url $(kurtosis port print cdk-v1 el-1-geth-lighthouse rpc) 0x07783C37CAAFe0f05C4105250C032062A83F7AC2 \
'isOperationReady(bytes32)(bool)' "$id"
#+end_src

#+RESULTS:
#+begin_src bash
true
#+end_src

Nice, that looks good. Let's execute it.


#+begin_src bash :exports both verbatim :results output code
target="0x2F50ef6b8e8Ee4E579B17619A92dE3E2ffbD8AD2"
value="0"
calldata="0xd547741f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e34aaf64b29273b7d567fcfc40544c014eee9970"
predecessor="0x0000000000000000000000000000000000000000000000000000000000000000"
salt="0x0000000000000000000000000000000000000000000000000000000000000000"

cast send \
--private-key 0x12d7de8621a77640c9241b2595ba78ce443d05e94090365ab3bb5e19df82c625 \
--rpc-url $(kurtosis port print cdk-v1 el-1-geth-lighthouse rpc) 0x07783C37CAAFe0f05C4105250C032062A83F7AC2 \
'execute(address,uint256,bytes,bytes32,bytes32)' "$target" "$value" "$calldata" "$predecessor" "$salt"
#+end_src

#+RESULTS:
#+begin_src bash

blockHash 0x32fe6a5224885c605eeca7052cb89925f018965d4ac176b1e99ceff3ad4e9b1c
blockNumber 14076
contractAddress
cumulativeGasUsed 55161
effectiveGasPrice 3000000007
from 0xE34aaF64b29273B7D567FCFc40544c014EEe9970
gasUsed 55161
logs [{"address":"0x2f50ef6b8e8ee4e579b17619a92de3e2ffbd8ad2","topics":["0xf6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b","0x0000000000000000000000000000000000000000000000000000000000000000","0x000000000000000000000000e34aaf64b29273b7d567fcfc40544c014eee9970","0x00000000000000000000000007783c37caafe0f05c4105250c032062a83f7ac2"],"data":"0x","blockHash":"0x32fe6a5224885c605eeca7052cb89925f018965d4ac176b1e99ceff3ad4e9b1c","blockNumber":"0x36fc","transactionHash":"0x7f0de30fe4db193ed75aba6f2c3862da8a1f8cef63e4408b8bbd802cc892559e","transactionIndex":"0x0","logIndex":"0x0","removed":false},{"address":"0x07783c37caafe0f05c4105250c032062a83f7ac2","topics":["0xc2617efa69bab66782fa219543714338489c4e9e178271560a91b82c3f612b58","0x2834e50d0fbd2359263689c685f4afd0311de4b150625c349a40a7b2b7e7f34e","0x0000000000000000000000000000000000000000000000000000000000000000"],"data":"0x0000000000000000000000002f50ef6b8e8ee4e579b17619a92de3e2ffbd8ad2000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000044d547741f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e34aaf64b29273b7d567fcfc40544c014eee997000000000000000000000000000000000000000000000000000000000","blockHash":"0x32fe6a5224885c605eeca7052cb89925f018965d4ac176b1e99ceff3ad4e9b1c","blockNumber":"0x36fc","transactionHash":"0x7f0de30fe4db193ed75aba6f2c3862da8a1f8cef63e4408b8bbd802cc892559e","transactionIndex":"0x0","logIndex":"0x1","removed":false}]
logsBloom 0x00000000000000000000000000000000000000400000000000008000000000000000000000000000000008000000000000200000000800000000000000000000000000000000000000000000000004000200000002000000000000000000002040000000020000000000000000000800000000000000000000000000400000000000000040000000000000000000000000000040000000000000010000000000000000090000000000000000000000000000000000000004000000000000000000000000000000080000000000000000000000000000000000000000000020000000400000000000000000000000000000000000000000001000000200000000
root
status 1
transactionHash 0x7f0de30fe4db193ed75aba6f2c3862da8a1f8cef63e4408b8bbd802cc892559e
transactionIndex 0
type 2
to 0x07783C37CAAFe0f05C4105250C032062A83F7AC2
#+end_src

Okay, I think that looks good. Let's make sure that the role has
actually be revoked.


#+begin_src bash :exports both verbatim :results output code
cast call --rpc-url $(kurtosis port print cdk-v1 el-1-geth-lighthouse rpc) 0x2F50ef6b8e8Ee4E579B17619A92dE3E2ffbD8AD2 'hasRole(bytes32,address)(bool)' 0x0000000000000000000000000000000000000000000000000000000000000000 0xE34aaF64b29273B7D567FCFc40544c014EEe9970
#+end_src

#+RESULTS:
#+begin_src bash
false
#+end_src

Nice! It looks like the admin account no longer has the default admin
role.


* Ref

Expand Down

0 comments on commit 52a150a

Please sign in to comment.