Skip to content

Commit

Permalink
quick fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ShivaanshK committed Dec 17, 2024
1 parent 0f3894c commit 2378699
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions test/verification/RecipeVerifier.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ contract RecipeVerifier is RecipeMarketHubTestBase {
RECIPE_MARKET_HUB = RecipeMarketHub(0x783251f103555068c1E9D755f69458f39eD937c0);

// Replace with the market hash of the market you want to verify
MARKET_HASH = 0x021B96A61753074DCB33CC139E873058ECB3B9591FE9E8A7A59A58E9AA8CFEBC;
MARKET_HASH = 0xea47034ba4ba711a3c9b3d87c84149e7666040e2a31389e8594778feddb28ce2;
}

function getRoleOrAddress(address candidate, address ap, address wallet, address hub) internal pure returns (string memory) {
Expand Down Expand Up @@ -96,9 +96,6 @@ contract RecipeVerifier is RecipeMarketHubTestBase {

Vm.Log[] memory depositLogs = vm.getRecordedLogs();

// The Weiroll wallet address is the second indexed topic in the first log (market creation logic)
weirollWallets[i] = address(uint160(uint256(depositLogs[0].topics[2])));

// Process each Transfer event log for deposit
for (uint256 j = 0; j < depositLogs.length; j++) {
Vm.Log memory log = depositLogs[j];
Expand All @@ -107,6 +104,11 @@ contract RecipeVerifier is RecipeMarketHubTestBase {
address from = address(uint160(uint256(log.topics[1])));
address to = address(uint160(uint256(log.topics[2])));

if (from == ap) {
// The Weiroll wallet address is the second indexed topic in the first log (market creation logic)
weirollWallets[i] = to;
}

bool isERC20Transfer = (log.data.length > 0);
uint256 tokenIdOrAmount = isERC20Transfer
? abi.decode(log.data, (uint256)) // ERC20: amount in data
Expand Down

0 comments on commit 2378699

Please sign in to comment.