@layerzerolabs/utils-evm-contracts 1.2.19 → 1.2.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.turbo/turbo-lint.log
CHANGED
|
@@ -13,6 +13,9 @@ contracts/interfaces/IBurnableMintable.sol
|
|
|
13
13
|
5:1 warning Missing @author tag in contract 'IBurnableMintable' use-natspec
|
|
14
14
|
5:1 warning Missing @notice tag in contract 'IBurnableMintable' use-natspec
|
|
15
15
|
|
|
16
|
+
contracts/interfaces/ICreditRedirect.sol
|
|
17
|
+
38:5 warning GC: [amountLD] on Event [CreditRedirected] could be Indexed gas-indexed-events
|
|
18
|
+
|
|
16
19
|
contracts/interfaces/IFeeConfig.sol
|
|
17
20
|
27:5 warning GC: [id] on Event [FeeBpsSet] could be Indexed gas-indexed-events
|
|
18
21
|
27:5 warning GC: [feeBps] on Event [FeeBpsSet] could be Indexed gas-indexed-events
|
|
@@ -31,7 +34,7 @@ contracts/interfaces/IPauseByID.sol
|
|
|
31
34
|
contracts/interfaces/IRateLimiter.sol
|
|
32
35
|
134:5 warning GC: [isExempt] on Event [RateLimitAddressExemptionUpdated] could be Indexed gas-indexed-events
|
|
33
36
|
|
|
34
|
-
✖
|
|
37
|
+
✖ 15 problems (0 errors, 15 warnings)
|
|
35
38
|
|
|
36
39
|
--------------------------------------------------------------------------
|
|
37
40
|
===> Join SOLHINT Community at: https://discord.com/invite/4TYGq3zpjs <===
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
|
+
pragma solidity ^0.8.22;
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @title ICreditRedirect
|
|
6
|
+
* @author LayerZero Labs (tinom.eth)
|
|
7
|
+
* @custom:version 1.0.0
|
|
8
|
+
* @notice Interface for the `CreditRedirect` contract.
|
|
9
|
+
*/
|
|
10
|
+
interface ICreditRedirect {
|
|
11
|
+
/**
|
|
12
|
+
* @notice Credit redirect configuration.
|
|
13
|
+
* @param allowlist Allowlist address implementing `ICreditRedirectAllowlist`
|
|
14
|
+
* @param escrow Escrow address that will receive credits originally sent to a non-allowlisted user
|
|
15
|
+
*/
|
|
16
|
+
struct CreditRedirectConfig {
|
|
17
|
+
address allowlist;
|
|
18
|
+
address escrow;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* @notice Thrown when the credit redirect config has exactly one of `allowlist` or `escrow` unset.
|
|
23
|
+
*/
|
|
24
|
+
error InvalidCreditRedirectConfig();
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* @notice Emitted when the credit redirect configuration is set.
|
|
28
|
+
* @param config Updated credit redirect configuration
|
|
29
|
+
*/
|
|
30
|
+
event CreditRedirectConfigSet(CreditRedirectConfig config);
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* @notice Emitted when a credit to a non-allowlisted recipient is redirected to the escrow.
|
|
34
|
+
* @param from Original intended recipient
|
|
35
|
+
* @param to Escrow address that received the credit
|
|
36
|
+
* @param amountLD Redirected amount in local decimals
|
|
37
|
+
*/
|
|
38
|
+
event CreditRedirected(address indexed from, address indexed to, uint256 amountLD);
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* @notice Returns the credit redirect configuration.
|
|
42
|
+
* @return config Credit redirect configuration
|
|
43
|
+
*/
|
|
44
|
+
function creditRedirectConfig() external view returns (CreditRedirectConfig memory config);
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* @notice Sets the credit redirect configuration.
|
|
48
|
+
* @dev `allowlist` and `escrow` must both be set or both be `address(0)` (disabled).
|
|
49
|
+
* @param _config New credit redirect configuration
|
|
50
|
+
*/
|
|
51
|
+
function setCreditRedirectConfig(CreditRedirectConfig calldata _config) external;
|
|
52
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
|
+
pragma solidity ^0.8.22;
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @title ICreditRedirectAllowlist
|
|
6
|
+
* @author LayerZero Labs (tinom.eth)
|
|
7
|
+
* @custom:version 1.0.0
|
|
8
|
+
* @notice Interface used by the `CreditRedirect` contract to query the allowlist status of a user.
|
|
9
|
+
*/
|
|
10
|
+
interface ICreditRedirectAllowlist {
|
|
11
|
+
/**
|
|
12
|
+
* @notice Checks if a user is allowlisted.
|
|
13
|
+
* @param _user User address
|
|
14
|
+
* @return isUserAllowlisted Whether the user is allowlisted
|
|
15
|
+
*/
|
|
16
|
+
function isAllowlisted(address _user) external view returns (bool isUserAllowlisted);
|
|
17
|
+
}
|
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@layerzerolabs/utils-evm-contracts",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.20",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "LayerZero Labs reference EVM utility implementations",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"devDependencies": {
|
|
8
8
|
"@layerzerolabs/test-devtools-evm-foundry": "8.0.1",
|
|
9
9
|
"@layerzerolabs/toolbox-foundry": "^0.1.13",
|
|
10
|
-
"@openzeppelin/contracts": "
|
|
10
|
+
"@openzeppelin/contracts": "^5.0.2",
|
|
11
11
|
"solhint": "^6.0.1",
|
|
12
|
-
"@layerzerolabs/solhint-configuration": "1.2.
|
|
13
|
-
"@layerzerolabs/vm-tooling-evm": "1.2.
|
|
12
|
+
"@layerzerolabs/solhint-configuration": "1.2.20",
|
|
13
|
+
"@layerzerolabs/vm-tooling-evm": "1.2.20"
|
|
14
14
|
},
|
|
15
15
|
"publishConfig": {
|
|
16
16
|
"access": "public",
|