Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions contracts/QuestChain.sol
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,8 @@ contract QuestChain is
/// @notice Address of the limiter contract, if any.
address public limiterContract;

/// @notice Array of quests.
QuestDetails[] public questDetails;

/// @notice Mapping from quest ID to quest details.
mapping(uint256 => QuestDetails) public questDetails;
/// @notice Mapping from user address to a mapping of quest ID to quest completion status.
mapping(address => mapping(uint256 => QuestStatus)) private _questStatus;

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"*.{json,yml,yaml,md}": [
"prettier --write"
],
"*.{sol}": [
"*.sol": [
"prettier --write --plugin=prettier-plugin-solidity",
"solhint --fix"
]
Expand Down
11 changes: 5 additions & 6 deletions test/questChain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1370,7 +1370,7 @@ describe('QuestChain', () => {
0,
'1',
),
).to.be.revertedWith('TokenGated: only admin');
).to.be.revertedWithCustomError(limiterTokenGated, 'OnlyAdmin');
});

it('addQuestChainDetails: works when sender is QuestChain admin', async () => {
Expand Down Expand Up @@ -1434,9 +1434,9 @@ describe('QuestChain', () => {
(await limiterChain.createQuests([''])).wait();

await mockToken.setBalanceOf(signers[0].address, 9);
await expect(limiterChain.submitProofs(['0'], [''])).to.be.revertedWith(
'LimiterTokenGated: limited',
);
await expect(
limiterChain.submitProofs(['0'], ['']),
).to.be.revertedWithCustomError(limiterTokenGated, 'Limited');
});

it('submitProofs: works when sender has minimum balance or above', async () => {
Expand Down Expand Up @@ -1472,7 +1472,7 @@ describe('QuestChain', () => {
await limiterChain.getAddress(),
'1',
),
).to.be.revertedWith('TokenGated: only admin');
).to.be.revertedWithCustomError(limiterTokenFee, 'OnlyAdmin');
});

it('addQuestChainDetails: works when sender is QuestChain admin', async () => {
Expand Down Expand Up @@ -1540,7 +1540,6 @@ describe('QuestChain', () => {
it('submitProofs: revert when sender does not have enough balance', async () => {
(await limiterChain.createQuests([''])).wait();

console.log('mockToken', await mockToken.getAddress());
await expect(
limiterChain.submitProofs(['0'], ['']),
).to.be.revertedWithCustomError(limiterTokenFee, 'Limited');
Expand Down