Skip to content

Commit

Permalink
removed outdates readme text
Browse files Browse the repository at this point in the history
  • Loading branch information
roleengineer committed Jan 13, 2025
1 parent d40bec8 commit be61524
Showing 1 changed file with 0 additions and 64 deletions.
64 changes: 0 additions & 64 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,70 +13,6 @@ Foundry consists of:

https://book.getfoundry.sh/

## Group Algorithm

1. Deploy Safe.

2. Deploy UpgradeableRenounceableProxy with LBPMintPolicy as an implementation.

2.1. Get txHash to sign

```Solidity
uint256 nonce = safe.nonce();
bytes32 txHash = safe.getTransactionHash(
address(0x777f78921890Df5Db755e77CbA84CBAdA5DB56D2), // to
0, // value
data, // 0xca4e46bb
Enum.Operation.DelegateCall, // 1
0, // safeTxGas
0, // baseGas
0, // gasPrice
address(0), // gasToken
address(0), // refundReceiver
nonce // safe nonce
);
```
2.2. Sign or approve txHash by safe owners and compile signatures.

```Solidity
uint256 threshold = safe.getThreshold();
address[] memory owners = safe.getOwners();
bytes memory signatures;
for (uint256 i; i < threshold; i++) {
// use owner to send tx
vm.prank(owners[i]);
safe.approveHash(txHash);
// craft signatures
// r s v
bytes memory approvedHashSignature = abi.encodePacked(uint256(uint160(owners[i])), bytes32(0), bytes1(0x01));
// need to sort owners first
signatures = bytes.concat(signatures, approvedHashSignature);
}
```
2.3. Execute safe tx
```Solidity
bool success = safe.execTransaction(
address(0x777f78921890Df5Db755e77CbA84CBAdA5DB56D2), // to
0, // value
data, // 0xca4e46bb
Enum.Operation.DelegateCall, // 1
0, // safeTxGas
0, // baseGas
0, // gasPrice
address(0), // gasToken
payable(address(0)), // refundReceiver
signatures // signatures (65 bytes/owner * threshold)
);
```

3. Approve deployed proxy (find address in event ProxyCreation from previous step) in TrustModule by Safe. It is Enum.Operation.Call, so can be done via Safe UI -> New transaction -> Transaction Builder -> Enter Address 0x56652E53649F20C6a360Ea5F25379F9987cECE82 pick `approveMintPolicy` and paste proxy address.

4. Enable Module by Safe - TrustModule. It is Enum.Operation.Call. Can be done via Safe UI, but the call from Safe to itself, so: Transaction Builder -> Enter Address `Safe Address` pick `enableModule` and paste 0x56652E53649F20C6a360Ea5F25379F9987cECE82.

5. Register Group in Hub with proxy as a mint policy. It is Enum.Operation.Call, can be done via Safe UI.

## User Algorithm

## Usage

### Build
Expand Down

0 comments on commit be61524

Please sign in to comment.