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

Commit

Permalink
Add audit information
Browse files Browse the repository at this point in the history
  • Loading branch information
geoff-vball committed Jul 10, 2024
1 parent 9e03a1e commit af2939e
Show file tree
Hide file tree
Showing 24 changed files with 146 additions and 0 deletions.
8 changes: 8 additions & 0 deletions audits/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Audits

Please check out __only__ listed audited version for production code.

| Date | Version | Commit | Auditor | Scope | Links |
| ------------ | ------- | ---------- | ------------ | -------------------- | ----------------------------------------------------------- |
| June 2024 | v1.0.0 | `9e03a1e5` | OpenZeppelin | All contracts in `contracts/src/` excluding `mocks/` | [🔗](./OpenZeppelin-Audit-2024-06-24.pdf) |

6 changes: 6 additions & 0 deletions contracts/src/TokenHome/ERC20TokenHome.sol
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ import {SafeERC20} from "@openzeppelin/[email protected]/token/ERC20/utils/SafeERC
import {SafeERC20TransferFrom} from "../utils/SafeERC20TransferFrom.sol";
import {CallUtils} from "../utils/CallUtils.sol";

/**
* THIS CONTRACT HAS BEEN AUDITED, BUT MAY CONTAIN UN-AUDITED CHANGES.
* PLEASE CHECK `audits/README.md` FOR INFORMATION ON AUDITED VERSIONS OF THIS CONTRACT.
* DO NOT USE UN-AUDITED CODE IN PRODUCTION.
*/

/**
* @title ERC20TokenHome
* @notice An {IERC20TokenHome} implementation that locks a specified ERC20 token to be sent to
Expand Down
6 changes: 6 additions & 0 deletions contracts/src/TokenHome/NativeTokenHome.sol
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ import {CallUtils} from "../utils/CallUtils.sol";
import {SafeWrappedNativeTokenDeposit} from "../utils/SafeWrappedNativeTokenDeposit.sol";
import {Address} from "@openzeppelin/[email protected]/utils/Address.sol";

/**
* THIS CONTRACT HAS BEEN AUDITED, BUT MAY CONTAIN UN-AUDITED CHANGES.
* PLEASE CHECK `audits/README.md` FOR INFORMATION ON AUDITED VERSIONS OF THIS CONTRACT.
* DO NOT USE UN-AUDITED CODE IN PRODUCTION.
*/

/**
* @title NativeTokenHome
* @notice An {INativeTokenHome} implementation that locks the native token of this chain to be transferred to
Expand Down
6 changes: 6 additions & 0 deletions contracts/src/TokenHome/TokenHome.sol
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ import {IWarpMessenger} from
"@avalabs/[email protected]/contracts/interfaces/IWarpMessenger.sol";
import {IERC20} from "@openzeppelin/[email protected]/token/ERC20/ERC20.sol";

/**
* THIS CONTRACT HAS BEEN AUDITED, BUT MAY CONTAIN UN-AUDITED CHANGES.
* PLEASE CHECK `audits/README.md` FOR INFORMATION ON AUDITED VERSIONS OF THIS CONTRACT.
* DO NOT USE UN-AUDITED CODE IN PRODUCTION.
*/

/**
* @notice Each TokenRemote instance registers with the home contract, and provides settings for transferring
* to the remote token transfer contract.
Expand Down
6 changes: 6 additions & 0 deletions contracts/src/TokenHome/interfaces/IERC20TokenHome.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ pragma solidity 0.8.18;
import {IERC20TokenTransferrer} from "../../interfaces/IERC20TokenTransferrer.sol";
import {ITokenHome} from "./ITokenHome.sol";

/**
* THIS CONTRACT HAS BEEN AUDITED, BUT MAY CONTAIN UN-AUDITED CHANGES.
* PLEASE CHECK `audits/README.md` FOR INFORMATION ON AUDITED VERSIONS OF THIS CONTRACT.
* DO NOT USE UN-AUDITED CODE IN PRODUCTION.
*/

/**
* @notice Interface for a ERC20 token "home" contract that locks its specified ERC20
* token on its chain to be transferred to supported remote token transfer contracts on other chains.
Expand Down
6 changes: 6 additions & 0 deletions contracts/src/TokenHome/interfaces/INativeTokenHome.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ pragma solidity 0.8.18;
import {INativeTokenTransferrer} from "../../interfaces/INativeTokenTransferrer.sol";
import {ITokenHome} from "./ITokenHome.sol";

/**
* THIS CONTRACT HAS BEEN AUDITED, BUT MAY CONTAIN UN-AUDITED CHANGES.
* PLEASE CHECK `audits/README.md` FOR INFORMATION ON AUDITED VERSIONS OF THIS CONTRACT.
* DO NOT USE UN-AUDITED CODE IN PRODUCTION.
*/

/**
* @notice Interface for a native token "home" contract that locks the native token
* on its chain to be transferred to supported remote token transfer contracts on other chains.
Expand Down
6 changes: 6 additions & 0 deletions contracts/src/TokenHome/interfaces/ITokenHome.sol
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ import {
SendAndCallInput
} from "../../interfaces/ITokenTransferrer.sol";

/**
* THIS CONTRACT HAS BEEN AUDITED, BUT MAY CONTAIN UN-AUDITED CHANGES.
* PLEASE CHECK `audits/README.md` FOR INFORMATION ON AUDITED VERSIONS OF THIS CONTRACT.
* DO NOT USE UN-AUDITED CODE IN PRODUCTION.
*/

/**
* @dev Interface for a "home" token transferrer contract that locks a specific token
* on its chain to be transferred to supported "remote" token transferrer contracts on other chains.
Expand Down
6 changes: 6 additions & 0 deletions contracts/src/TokenRemote/ERC20TokenRemote.sol
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ import {IERC20, ERC20} from "@openzeppelin/[email protected]/token/ERC20/ERC20.sol
import {SafeERC20TransferFrom} from "../utils/SafeERC20TransferFrom.sol";
import {CallUtils} from "../utils/CallUtils.sol";

/**
* THIS CONTRACT HAS BEEN AUDITED, BUT MAY CONTAIN UN-AUDITED CHANGES.
* PLEASE CHECK `audits/README.md` FOR INFORMATION ON AUDITED VERSIONS OF THIS CONTRACT.
* DO NOT USE UN-AUDITED CODE IN PRODUCTION.
*/

/**
* @title ERC20TokenRemote
* @notice This contract is an {IERC20TokenTransferrer} that receives tokens from its specifed {TokenHome} instance,
Expand Down
6 changes: 6 additions & 0 deletions contracts/src/TokenRemote/NativeTokenRemote.sol
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ import {CallUtils} from "../utils/CallUtils.sol";
import {TokenScalingUtils} from "../utils/TokenScalingUtils.sol";
import {SafeERC20TransferFrom} from "../utils/SafeERC20TransferFrom.sol";

/**
* THIS CONTRACT HAS BEEN AUDITED, BUT MAY CONTAIN UN-AUDITED CHANGES.
* PLEASE CHECK `audits/README.md` FOR INFORMATION ON AUDITED VERSIONS OF THIS CONTRACT.
* DO NOT USE UN-AUDITED CODE IN PRODUCTION.
*/

/**
* @title NativeTokenRemote
* @notice This contract is an {INativeTokenRemote} that receives tokens from its specifed {TokenHome} instance,
Expand Down
6 changes: 6 additions & 0 deletions contracts/src/TokenRemote/TokenRemote.sol
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ import {IWarpMessenger} from
import {SendReentrancyGuard} from "../utils/SendReentrancyGuard.sol";
import {TokenScalingUtils} from "../utils/TokenScalingUtils.sol";

/**
* THIS CONTRACT HAS BEEN AUDITED, BUT MAY CONTAIN UN-AUDITED CHANGES.
* PLEASE CHECK `audits/README.md` FOR INFORMATION ON AUDITED VERSIONS OF THIS CONTRACT.
* DO NOT USE UN-AUDITED CODE IN PRODUCTION.
*/

/**
* @title TokenRemote
* @dev Abstract contract for a token transferrer remote that receives tokens from its specified token TokenHome instance, and
Expand Down
6 changes: 6 additions & 0 deletions contracts/src/TokenRemote/interfaces/INativeTokenRemote.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ pragma solidity 0.8.18;
import {INativeTokenTransferrer} from "../../interfaces/INativeTokenTransferrer.sol";
import {ITokenRemote} from "./ITokenRemote.sol";

/**
* THIS CONTRACT HAS BEEN AUDITED, BUT MAY CONTAIN UN-AUDITED CHANGES.
* PLEASE CHECK `audits/README.md` FOR INFORMATION ON AUDITED VERSIONS OF THIS CONTRACT.
* DO NOT USE UN-AUDITED CODE IN PRODUCTION.
*/

/**
* @dev Interface that describes functionalities for a contract that can mint native tokens when
* paired with a {ITokenHome} contract that will lock tokens on another chain.
Expand Down
6 changes: 6 additions & 0 deletions contracts/src/TokenRemote/interfaces/ITokenRemote.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ pragma solidity 0.8.18;
import {ITokenTransferrer} from "../../interfaces/ITokenTransferrer.sol";
import {TeleporterFeeInfo} from "@teleporter/ITeleporterMessenger.sol";

/**
* THIS CONTRACT HAS BEEN AUDITED, BUT MAY CONTAIN UN-AUDITED CHANGES.
* PLEASE CHECK `audits/README.md` FOR INFORMATION ON AUDITED VERSIONS OF THIS CONTRACT.
* DO NOT USE UN-AUDITED CODE IN PRODUCTION.
*/

/**
* @notice Settings for constructing a {ITokenRemote} contract.
* @param teleporterRegistryAddress The current blockchain ID's Teleporter registry
Expand Down
6 changes: 6 additions & 0 deletions contracts/src/WrappedNativeToken.sol
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ import {IWrappedNativeToken} from "./interfaces/IWrappedNativeToken.sol";
import {ERC20} from "@openzeppelin/[email protected]/token/ERC20/ERC20.sol";
import {Address} from "@openzeppelin/[email protected]/utils/Address.sol";

/**
* THIS CONTRACT HAS BEEN AUDITED, BUT MAY CONTAIN UN-AUDITED CHANGES.
* PLEASE CHECK `audits/README.md` FOR INFORMATION ON AUDITED VERSIONS OF THIS CONTRACT.
* DO NOT USE UN-AUDITED CODE IN PRODUCTION.
*/

contract WrappedNativeToken is IWrappedNativeToken, ERC20 {
using Address for address payable;

Expand Down
6 changes: 6 additions & 0 deletions contracts/src/interfaces/IERC20SendAndCallReceiver.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@

pragma solidity 0.8.18;

/**
* THIS CONTRACT HAS BEEN AUDITED, BUT MAY CONTAIN UN-AUDITED CHANGES.
* PLEASE CHECK `audits/README.md` FOR INFORMATION ON AUDITED VERSIONS OF THIS CONTRACT.
* DO NOT USE UN-AUDITED CODE IN PRODUCTION.
*/

/**
* @notice Interface for contracts that are called to receive token transfers.
*/
Expand Down
6 changes: 6 additions & 0 deletions contracts/src/interfaces/IERC20TokenTransferrer.sol
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ pragma solidity 0.8.18;

import {ITokenTransferrer, SendTokensInput, SendAndCallInput} from "./ITokenTransferrer.sol";

/**
* THIS CONTRACT HAS BEEN AUDITED, BUT MAY CONTAIN UN-AUDITED CHANGES.
* PLEASE CHECK `audits/README.md` FOR INFORMATION ON AUDITED VERSIONS OF THIS CONTRACT.
* DO NOT USE UN-AUDITED CODE IN PRODUCTION.
*/

/**
* @notice Interface for an Avalanche interchain token transferrer that sends ERC20 tokens to another chain.
*
Expand Down
6 changes: 6 additions & 0 deletions contracts/src/interfaces/INativeSendAndCallReceiver.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@

pragma solidity 0.8.18;

/**
* THIS CONTRACT HAS BEEN AUDITED, BUT MAY CONTAIN UN-AUDITED CHANGES.
* PLEASE CHECK `audits/README.md` FOR INFORMATION ON AUDITED VERSIONS OF THIS CONTRACT.
* DO NOT USE UN-AUDITED CODE IN PRODUCTION.
*/

/**
* @notice Interface for a contracts that are called to receive native tokens.
*/
Expand Down
6 changes: 6 additions & 0 deletions contracts/src/interfaces/INativeTokenTransferrer.sol
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ pragma solidity 0.8.18;

import {ITokenTransferrer, SendTokensInput, SendAndCallInput} from "./ITokenTransferrer.sol";

/**
* THIS CONTRACT HAS BEEN AUDITED, BUT MAY CONTAIN UN-AUDITED CHANGES.
* PLEASE CHECK `audits/README.md` FOR INFORMATION ON AUDITED VERSIONS OF THIS CONTRACT.
* DO NOT USE UN-AUDITED CODE IN PRODUCTION.
*/

/**
* @notice Interface for an Avalanche interchain token transferrer that sends native tokens to another chain.
*
Expand Down
6 changes: 6 additions & 0 deletions contracts/src/interfaces/ITokenTransferrer.sol
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ pragma solidity 0.8.18;

import {ITeleporterReceiver} from "@teleporter/ITeleporterReceiver.sol";

/**
* THIS CONTRACT HAS BEEN AUDITED, BUT MAY CONTAIN UN-AUDITED CHANGES.
* PLEASE CHECK `audits/README.md` FOR INFORMATION ON AUDITED VERSIONS OF THIS CONTRACT.
* DO NOT USE UN-AUDITED CODE IN PRODUCTION.
*/

/**
* @notice Input parameters for transferring tokens to another chain as part of a simple transfer.
* @param destinationBlockchainID Blockchain ID of the destination
Expand Down
6 changes: 6 additions & 0 deletions contracts/src/interfaces/IWrappedNativeToken.sol
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ pragma solidity 0.8.18;

import {IERC20} from "@openzeppelin/[email protected]/token/ERC20/ERC20.sol";

/**
* THIS CONTRACT HAS BEEN AUDITED, BUT MAY CONTAIN UN-AUDITED CHANGES.
* PLEASE CHECK `audits/README.md` FOR INFORMATION ON AUDITED VERSIONS OF THIS CONTRACT.
* DO NOT USE UN-AUDITED CODE IN PRODUCTION.
*/

/**
* @title IWrappedNativeToken
* @notice Interface for a wrapped native token
Expand Down
6 changes: 6 additions & 0 deletions contracts/src/utils/CallUtils.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
// SPDX-License-Identifier: Ecosystem
pragma solidity 0.8.18;

/**
* THIS CONTRACT HAS BEEN AUDITED, BUT MAY CONTAIN UN-AUDITED CHANGES.
* PLEASE CHECK `audits/README.md` FOR INFORMATION ON AUDITED VERSIONS OF THIS CONTRACT.
* DO NOT USE UN-AUDITED CODE IN PRODUCTION.
*/

library CallUtils {
/**
* @dev calls target address with exactly gasAmount gas and data as calldata
Expand Down
6 changes: 6 additions & 0 deletions contracts/src/utils/SafeERC20TransferFrom.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ pragma solidity 0.8.18;
import {IERC20} from "@openzeppelin/[email protected]/token/ERC20/IERC20.sol";
import {SafeERC20} from "@openzeppelin/[email protected]/token/ERC20/utils/SafeERC20.sol";

/**
* THIS CONTRACT HAS BEEN AUDITED, BUT MAY CONTAIN UN-AUDITED CHANGES.
* PLEASE CHECK `audits/README.md` FOR INFORMATION ON AUDITED VERSIONS OF THIS CONTRACT.
* DO NOT USE UN-AUDITED CODE IN PRODUCTION.
*/

/**
* @dev Provides a wrapper used for calling an ERC20 transferFrom method to receive tokens to a contract
* from a specified sender. Differs from the "SafeERC20TransferFrom" implementation found here
Expand Down
6 changes: 6 additions & 0 deletions contracts/src/utils/SafeWrappedNativeTokenDeposit.sol
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ pragma solidity 0.8.18;

import {IWrappedNativeToken} from "../interfaces/IWrappedNativeToken.sol";

/**
* THIS CONTRACT HAS BEEN AUDITED, BUT MAY CONTAIN UN-AUDITED CHANGES.
* PLEASE CHECK `audits/README.md` FOR INFORMATION ON AUDITED VERSIONS OF THIS CONTRACT.
* DO NOT USE UN-AUDITED CODE IN PRODUCTION.
*/

/**
* @dev Provides a wrapper used for calling the {IWrappedNativeToken-deposit} method
* to deposit native tokens into the contract.
Expand Down
6 changes: 6 additions & 0 deletions contracts/src/utils/SendReentrancyGuard.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@

pragma solidity 0.8.18;

/**
* THIS CONTRACT HAS BEEN AUDITED, BUT MAY CONTAIN UN-AUDITED CHANGES.
* PLEASE CHECK `audits/README.md` FOR INFORMATION ON AUDITED VERSIONS OF THIS CONTRACT.
* DO NOT USE UN-AUDITED CODE IN PRODUCTION.
*/

/**
* @dev Abstract contract that helps implement reentrancy guards for Avalanche interchain token transfer {_send} and {_sendAndCall}
* functions.
Expand Down
6 changes: 6 additions & 0 deletions contracts/src/utils/TokenScalingUtils.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
// SPDX-License-Identifier: Ecosystem
pragma solidity 0.8.18;

/**
* THIS CONTRACT HAS BEEN AUDITED, BUT MAY CONTAIN UN-AUDITED CHANGES.
* PLEASE CHECK `audits/README.md` FOR INFORMATION ON AUDITED VERSIONS OF THIS CONTRACT.
* DO NOT USE UN-AUDITED CODE IN PRODUCTION.
*/

library TokenScalingUtils {
uint256 public constant MAX_TOKEN_DECIMALS = 18;

Expand Down

0 comments on commit af2939e

Please sign in to comment.