windranger-io / windranger-treasury-subgraph

Subgraph for @windranger-io/windranger-treasury
1 stars 0 forks source link

Issue: missing Bond event tests #6

Closed CjHare closed 2 years ago

CjHare commented 2 years ago

The follow Bond events are not in the Bond test

    event AllowRedemption(address indexed authorizer, string reason);
    event DebtIssue(
        address indexed receiver,
        address indexed debTokens,
        uint256 debtAmount
    );
    event Deposit(
        address indexed depositor,
        address indexed collateralTokens,
        uint256 collateralAmount
    );
    event Expire(
        address indexed treasury,
        address indexed collateralTokens,
        uint256 collateralAmount,
        address indexed instigator
    );
    event PartialCollateral(
        address indexed collateralTokens,
        uint256 collateralAmount,
        address indexed debtTokens,
        uint256 debtRemaining,
        address indexed instigator
    );
    event FullCollateral(
        address indexed collateralTokens,
        uint256 collateralAmount,
        address indexed instigator
    );
    event Redemption(
        address indexed redeemer,
        address indexed debtTokens,
        uint256 debtAmount,
        address indexed collateralTokens,
        uint256 collateralAmount
    );
    event SlashDeposits(
        address indexed collateralTokens,
        uint256 collateralAmount,
        string reason,
        address indexed instigator
    );
    event WithdrawCollateral(
        address indexed treasury,
        address indexed collateralTokens,
        uint256 collateralAmount,
        address indexed instigator
    );

(source https://github.com/windranger-io/windranger-treasury/blob/f1aec8b5c837fefbecc7a34bd4af8b31aa23e6fb/contracts/bond/ERC20SingleCollateralBond.sol#L78)


    event ClaimReward(
        address indexed tokens,
        uint256 amount,
        address indexed instigator
    );
    event RegisterReward(
        address indexed tokens,
        uint256 amount,
        uint256 timeLock,
        address indexed instigator
    );
    event RewardDebt(
        address indexed tokens,
        address indexed claimant,
        uint256 rewardDebt,
        address indexed instigator
    );
    event RedemptionTimestampUpdate(
        uint256 timestamp,
        address indexed instigator
    );
    event RewardTimeLockUpdate(
        address indexed tokens,
        uint256 timeLock,
        address indexed instigator
    );

(source: https://github.com/windranger-io/windranger-treasury/blob/f1aec8b5c837fefbecc7a34bd4af8b31aa23e6fb/contracts/bond/TimeLockMultiRewardBond.sol#L29 )

    event RedeemableUpdate(
        bool isRedeemable,
        string reason,
        address indexed instigator
    );

( Source: https://github.com/windranger-io/windranger-treasury/blob/f1aec8b5c837fefbecc7a34bd4af8b31aa23e6fb/contracts/bond/Redeemable.sol#L16 )

grezle commented 2 years ago
    event DebtIssue(
        address indexed receiver,
        address indexed debTokens,
        uint256 debtAmount
    );

I think this is the only event that has been missed. I will take a closer look at the .sol and get this written up

CjHare commented 2 years ago

Were there tests for all the above events? ...or were they in a different test file to the one I was looking in 🤔

grezle commented 2 years ago

They should be there, does this link take you to the test runs? https://github.com/windranger-io/windranger-treasury-subgraph/runs/6583857327?check_suite_focus=true#step:8:37

CjHare commented 2 years ago

Gotcha, I must have missed them when browsing through the test code 🙄

CjHare commented 2 years ago

Just a problem localised to my peepers 🙄