Skip to content

Commit

Permalink
change txHashChainId to uint32 (#240)
Browse files Browse the repository at this point in the history
  • Loading branch information
waynehoover authored Dec 22, 2023
1 parent 25038f7 commit d873db8
Show file tree
Hide file tree
Showing 26 changed files with 1,947 additions and 268 deletions.
51 changes: 51 additions & 0 deletions broadcast/QuestFactory.s.sol/1/run-1703197395.json

Large diffs are not rendered by default.

86 changes: 12 additions & 74 deletions broadcast/QuestFactory.s.sol/1/run-latest.json

Large diffs are not rendered by default.

54 changes: 54 additions & 0 deletions broadcast/QuestFactory.s.sol/10/run-1703197452.json

Large diffs are not rendered by default.

113 changes: 113 additions & 0 deletions broadcast/QuestFactory.s.sol/10/run-1703197459.json

Large diffs are not rendered by default.

113 changes: 113 additions & 0 deletions broadcast/QuestFactory.s.sol/10/run-1703197477.json

Large diffs are not rendered by default.

64 changes: 32 additions & 32 deletions broadcast/QuestFactory.s.sol/10/run-latest.json

Large diffs are not rendered by default.

54 changes: 54 additions & 0 deletions broadcast/QuestFactory.s.sol/11155111/run-1703195656.json

Large diffs are not rendered by default.

113 changes: 113 additions & 0 deletions broadcast/QuestFactory.s.sol/11155111/run-1703195670.json

Large diffs are not rendered by default.

113 changes: 113 additions & 0 deletions broadcast/QuestFactory.s.sol/11155111/run-1703195705.json

Large diffs are not rendered by default.

54 changes: 54 additions & 0 deletions broadcast/QuestFactory.s.sol/11155111/run-1703197332.json

Large diffs are not rendered by default.

113 changes: 113 additions & 0 deletions broadcast/QuestFactory.s.sol/11155111/run-1703197351.json

Large diffs are not rendered by default.

113 changes: 113 additions & 0 deletions broadcast/QuestFactory.s.sol/11155111/run-1703197385.json

Large diffs are not rendered by default.

76 changes: 38 additions & 38 deletions broadcast/QuestFactory.s.sol/11155111/run-latest.json

Large diffs are not rendered by default.

54 changes: 54 additions & 0 deletions broadcast/QuestFactory.s.sol/137/run-1703197489.json

Large diffs are not rendered by default.

145 changes: 145 additions & 0 deletions broadcast/QuestFactory.s.sol/137/run-1703197527.json

Large diffs are not rendered by default.

145 changes: 145 additions & 0 deletions broadcast/QuestFactory.s.sol/137/run-1703197556.json

Large diffs are not rendered by default.

104 changes: 52 additions & 52 deletions broadcast/QuestFactory.s.sol/137/run-latest.json

Large diffs are not rendered by default.

113 changes: 113 additions & 0 deletions broadcast/QuestFactory.s.sol/42161/run-1703197421.json

Large diffs are not rendered by default.

113 changes: 113 additions & 0 deletions broadcast/QuestFactory.s.sol/42161/run-1703197439.json

Large diffs are not rendered by default.

70 changes: 35 additions & 35 deletions broadcast/QuestFactory.s.sol/42161/run-latest.json

Large diffs are not rendered by default.

54 changes: 54 additions & 0 deletions broadcast/QuestFactory.s.sol/8453/run-1703197567.json

Large diffs are not rendered by default.

113 changes: 113 additions & 0 deletions broadcast/QuestFactory.s.sol/8453/run-1703197573.json

Large diffs are not rendered by default.

113 changes: 113 additions & 0 deletions broadcast/QuestFactory.s.sol/8453/run-1703197592.json

Large diffs are not rendered by default.

64 changes: 32 additions & 32 deletions broadcast/QuestFactory.s.sol/8453/run-latest.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions contracts/QuestFactory.sol
Original file line number Diff line number Diff line change
Expand Up @@ -292,10 +292,10 @@ contract QuestFactory is Initializable, LegacyStorage, OwnableRoles, IQuestFacto
bytes32 vs_,
address ref_,
bytes16 questid_,
uint16 txHashChainId_
uint32 txHashChainId_
) = abi.decode(
data_,
(bytes32, bytes32, bytes32, address, bytes16, uint16)
(bytes32, bytes32, bytes32, address, bytes16, uint32)
);

string memory questIdString_ = bytes16ToUUID(questid_);
Expand Down
6 changes: 3 additions & 3 deletions test/QuestFactory.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,8 @@ contract TestQuestFactory is Test, Errors, Events, TestUtils {

bytes16 questId = hex'550e8400e29b41d4a716446655440000';
bytes32 txHash = hex'7e1975a6bf513022a8cc382a3cdb1e1dbcd58ebb1cb9abf11e64aadb21262516';
uint16 txHashChainId = 1011;
string memory json = '{"actionTxHashes":["0x7e1975a6bf513022a8cc382a3cdb1e1dbcd58ebb1cb9abf11e64aadb21262516"],"actionNetworkChainIds":[1011],"questName":"questName","actionType":"actionType"}';
uint32 txHashChainId = 7777777;
string memory json = '{"actionTxHashes":["0x7e1975a6bf513022a8cc382a3cdb1e1dbcd58ebb1cb9abf11e64aadb21262516"],"actionNetworkChainIds":[7777777],"questName":"questName","actionType":"actionType"}';
bytes memory signData = abi.encode(participant, referrer, "550e8400-e29b-41d4-a716-446655440000", json);
bytes32 msgHash = keccak256(signData);
bytes32 digest = ECDSA.toEthSignedMessageHash(msgHash);
Expand All @@ -277,7 +277,7 @@ contract TestQuestFactory is Test, Errors, Events, TestUtils {
address participantMocked = 0xde967dd32C1d057B368ea9F37d70469Cd7F6bF38;
address referrerMocked = address(0);
bytes32 txHash = 0x57498a77018f78c02a0e2f0d0e4a8aab048b6e249ff936d230b7db7ca48782e1;
uint16 txHashChainId = 1;
uint32 txHashChainId = 1;
bytes16 questId = 0x88e08cb195e64832845fa92ec8f2034a;
string memory questIdString = "88e08cb1-95e6-4832-845f-a92ec8f2034a";
string memory actionType = "other";
Expand Down

0 comments on commit d873db8

Please sign in to comment.