Skip to content
This repository has been archived by the owner on Dec 18, 2024. It is now read-only.

Commit

Permalink
Merge pull request #15 from Abstract-Foundation/merge-upstream
Browse files Browse the repository at this point in the history
Merge upstream
  • Loading branch information
coffeexcoin authored Nov 20, 2024
2 parents b2c88fc + 5f4d4ea commit 5fcc2e5
Show file tree
Hide file tree
Showing 7 changed files with 81 additions and 61 deletions.
120 changes: 60 additions & 60 deletions contracts/libraries/Errors.sol
Original file line number Diff line number Diff line change
Expand Up @@ -6,136 +6,136 @@ library Errors {
CLAVE
//////////////////////////////////////////////////////////////*/

error INSUFFICIENT_FUNDS();
error FEE_PAYMENT_FAILED();
error UNAUTHORIZED_OUTSIDE_TRANSACTION();
error VALIDATION_HOOK_FAILED();
error INSUFFICIENT_FUNDS(); // 0xe7931438
error FEE_PAYMENT_FAILED(); // 0x3d40a3a3
error UNAUTHORIZED_OUTSIDE_TRANSACTION(); // 0xfc82da4e
error VALIDATION_HOOK_FAILED(); // 0x52c9d27a

/*//////////////////////////////////////////////////////////////
LINKED LIST
//////////////////////////////////////////////////////////////*/

error INVALID_PREV();
error INVALID_PREV(); // 0x5a4c0eb3
// Bytes
error INVALID_BYTES();
error BYTES_ALREADY_EXISTS();
error BYTES_NOT_EXISTS();
error INVALID_BYTES(); // 0xb6dfaaff
error BYTES_ALREADY_EXISTS(); // 0xdf6cac6b
error BYTES_NOT_EXISTS(); // 0x689908a6
// Address
error INVALID_ADDRESS();
error ADDRESS_ALREADY_EXISTS();
error ADDRESS_NOT_EXISTS();
error INVALID_ADDRESS(); // 0x5963709b
error ADDRESS_ALREADY_EXISTS(); // 0xf2d4d191
error ADDRESS_NOT_EXISTS(); // 0xad6ab975

/*//////////////////////////////////////////////////////////////
OWNER MANAGER
//////////////////////////////////////////////////////////////*/

error EMPTY_OWNERS();
error INVALID_PUBKEY_LENGTH();
error EMPTY_OWNERS(); // 0xc957eb7e
error INVALID_PUBKEY_LENGTH(); // 0x04c4d8f7

/*//////////////////////////////////////////////////////////////
VALIDATOR MANAGER
//////////////////////////////////////////////////////////////*/

error EMPTY_VALIDATORS();
error VALIDATOR_ERC165_FAIL();
error EMPTY_VALIDATORS(); // 0xd7c64d89
error VALIDATOR_ERC165_FAIL(); // 0x5d5273ad

/*//////////////////////////////////////////////////////////////
UPGRADE MANAGER
//////////////////////////////////////////////////////////////*/

error SAME_IMPLEMENTATION();
error SAME_IMPLEMENTATION(); // 0x5e741005

/*//////////////////////////////////////////////////////////////
HOOK MANAGER
//////////////////////////////////////////////////////////////*/

error EMPTY_HOOK_ADDRESS();
error HOOK_ERC165_FAIL();
error INVALID_KEY();
error EMPTY_HOOK_ADDRESS(); // 0x413348ae
error HOOK_ERC165_FAIL(); // 0x9f93f87d
error INVALID_KEY(); // 0xce7045bd

/*//////////////////////////////////////////////////////////////
MODULE MANAGER
//////////////////////////////////////////////////////////////*/

error EMPTY_MODULE_ADDRESS();
error RECUSIVE_MODULE_CALL();
error MODULE_ERC165_FAIL();
error EMPTY_MODULE_ADDRESS(); // 0x912fe2f2
error RECUSIVE_MODULE_CALL(); // 0x2cf7b9c8
error MODULE_ERC165_FAIL(); // 0xc1ad2a50

/*//////////////////////////////////////////////////////////////
AUTH
//////////////////////////////////////////////////////////////*/

error NOT_FROM_BOOTLOADER();
error NOT_FROM_MODULE();
error NOT_FROM_HOOK();
error NOT_FROM_SELF();
error NOT_FROM_SELF_OR_MODULE();
error NOT_FROM_BOOTLOADER(); // 0x93887e3b
error NOT_FROM_MODULE(); // 0x574a805d
error NOT_FROM_HOOK(); // 0xd675a4f1
error NOT_FROM_SELF(); // 0xa70c28d1
error NOT_FROM_SELF_OR_MODULE(); // 0x22a1259f

/*//////////////////////////////////////////////////////////////
R1 VALIDATOR
//////////////////////////////////////////////////////////////*/

error INVALID_SIGNATURE();
error INVALID_SIGNATURE(); // 0xa3402a38

/*//////////////////////////////////////////////////////////////
SOCIAL RECOVERY
//////////////////////////////////////////////////////////////*/

error INVALID_RECOVERY_CONFIG();
error INVALID_RECOVERY_NONCE();
error INVALID_GUARDIAN();
error INVALID_GUARDIAN_SIGNATURE();
error ZERO_ADDRESS_GUARDIAN();
error GUARDIANS_MUST_BE_SORTED();
error RECOVERY_TIMELOCK();
error RECOVERY_NOT_STARTED();
error RECOVERY_NOT_INITED();
error RECOVERY_IN_PROGRESS();
error INSUFFICIENT_GUARDIANS();
error ALREADY_INITED();
error INVALID_RECOVERY_CONFIG(); // 0xf774f439
error INVALID_RECOVERY_NONCE(); // 0x098c9f8e
error INVALID_GUARDIAN(); // 0x11a2a82b
error INVALID_GUARDIAN_SIGNATURE(); // 0xcc117c1c
error ZERO_ADDRESS_GUARDIAN(); // 0x6de9b401
error GUARDIANS_MUST_BE_SORTED(); // 0xc52b41f7
error RECOVERY_TIMELOCK(); // 0x1506ac5a
error RECOVERY_NOT_STARTED(); // 0xa6a4a3aa
error RECOVERY_NOT_INITED(); // 0xd0f6fdbf
error RECOVERY_IN_PROGRESS(); // 0x8daa42a9
error INSUFFICIENT_GUARDIANS(); // 0x7629075d
error ALREADY_INITED(); // 0xdb0c77c8

/*//////////////////////////////////////////////////////////////
FACTORY
//////////////////////////////////////////////////////////////*/

error DEPLOYMENT_FAILED();
error INITIALIZATION_FAILED();
error DEPLOYMENT_FAILED(); // 0x0f02d218
error INITIALIZATION_FAILED(); // 0x5b101091

/*//////////////////////////////////////////////////////////////
PAYMASTER
//////////////////////////////////////////////////////////////*/

error UNSUPPORTED_FLOW();
error UNAUTHORIZED_WITHDRAW();
error INVALID_TOKEN();
error SHORT_PAYMASTER_INPUT();
error UNSUPPORTED_TOKEN();
error LESS_ALLOWANCE_FOR_PAYMASTER();
error FAILED_FEE_TRANSFER();
error INVALID_MARKUP();
error USER_LIMIT_REACHED();
error INVALID_USER_LIMIT();
error NOT_CLAVE_ACCOUNT();
error EXCEEDS_MAX_SPONSORED_ETH();
error UNSUPPORTED_FLOW(); // 0xd721e389
error UNAUTHORIZED_WITHDRAW(); // 0x7809a0b4
error INVALID_TOKEN(); // 0xd0995cf2
error SHORT_PAYMASTER_INPUT(); // 0x48d170f6
error UNSUPPORTED_TOKEN(); // 0xce706f70
error LESS_ALLOWANCE_FOR_PAYMASTER(); // 0x11f7d13f
error FAILED_FEE_TRANSFER(); // 0xf316e09d
error INVALID_MARKUP(); // 0x4af7ffe3
error USER_LIMIT_REACHED(); // 0x07235346
error INVALID_USER_LIMIT(); // 0x2640fa41
error NOT_CLAVE_ACCOUNT(); // 0x81566ee0
error EXCEEDS_MAX_SPONSORED_ETH(); // 0x3f379f40

/*//////////////////////////////////////////////////////////////
REGISTRY
//////////////////////////////////////////////////////////////*/

error NOT_FROM_FACTORY();
error NOT_FROM_DEPLOYER();
error NOT_FROM_FACTORY(); // 0x238438ed
error NOT_FROM_DEPLOYER(); // 0x83f090e3

/*//////////////////////////////////////////////////////////////
BatchCaller
//////////////////////////////////////////////////////////////*/

error ONLY_DELEGATECALL();
error CALL_FAILED();
error ONLY_DELEGATECALL(); // 0x43d22ee9
error CALL_FAILED(); // 0x84aed38d

/*//////////////////////////////////////////////////////////////
INITABLE
//////////////////////////////////////////////////////////////*/

error MODULE_NOT_ADDED_CORRECTLY();
error MODULE_NOT_REMOVED_CORRECTLY();
error MODULE_NOT_ADDED_CORRECTLY(); // 0xb66e8ec4
error MODULE_NOT_REMOVED_CORRECTLY(); // 0x680c8744
}
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"ts-morph": "^19.0.0"
},
"devDependencies": {
"@getclave/constants": "1.0.0",
"@matterlabs/hardhat-zksync": "1.1.0",
"@nomicfoundation/hardhat-chai-matchers": "2.0.7",
"@nomicfoundation/hardhat-ethers": "3.0.6",
Expand Down
5 changes: 5 additions & 0 deletions subgraph/src/clave-appa-stake.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,4 +121,9 @@ export function handleRewardPaid(event: RewardPaidEvent): void {
weeklyEarnFlow.claimedGain = weeklyEarnFlow.claimedGain.plus(amount);
monthlyEarnFlow.claimedGain = monthlyEarnFlow.claimedGain.plus(amount);
earnPosition.normalGain = earnPosition.normalGain.plus(amount);

dailyEarnFlow.save();
weeklyEarnFlow.save();
monthlyEarnFlow.save();
earnPosition.save();
}
5 changes: 5 additions & 0 deletions subgraph/src/clave-zk-stake.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,4 +123,9 @@ export function handleRewardPaid(event: RewardPaidEvent): void {
weeklyEarnFlow.claimedGain = weeklyEarnFlow.claimedGain.plus(amount);
monthlyEarnFlow.claimedGain = monthlyEarnFlow.claimedGain.plus(amount);
earnPosition.normalGain = earnPosition.normalGain.plus(amount);

dailyEarnFlow.save();
weeklyEarnFlow.save();
monthlyEarnFlow.save();
earnPosition.save();
}
5 changes: 5 additions & 0 deletions subgraph/src/koi-pair.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,4 +123,9 @@ export function handleClaim(event: ClaimEvent): void {
weeklyEarnFlow.claimedGain = weeklyEarnFlow.claimedGain.plus(amount);
monthlyEarnFlow.claimedGain = monthlyEarnFlow.claimedGain.plus(amount);
earnPosition.normalGain = earnPosition.normalGain.plus(amount);

dailyEarnFlow.save();
weeklyEarnFlow.save();
monthlyEarnFlow.save();
earnPosition.save();
}
5 changes: 5 additions & 0 deletions subgraph/src/meow-staking.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,4 +126,9 @@ export function handleRewardPaid(event: RewardPaidEvent): void {
weeklyEarnFlow.claimedGain = weeklyEarnFlow.claimedGain.plus(amount);
monthlyEarnFlow.claimedGain = monthlyEarnFlow.claimedGain.plus(amount);
earnPosition.normalGain = earnPosition.normalGain.plus(amount);

dailyEarnFlow.save();
weeklyEarnFlow.save();
monthlyEarnFlow.save();
earnPosition.save();
}
1 change: 1 addition & 0 deletions subgraph/src/venus-reward.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* Unauthorized copying of this file, via any medium is strictly prohibited
* Proprietary and confidential
*/

/* eslint-disable @typescript-eslint/consistent-type-imports */
import { Address } from '@graphprotocol/graph-ts';

Expand Down

0 comments on commit 5fcc2e5

Please sign in to comment.