Skip to content
This repository has been archived by the owner on Jul 10, 2023. It is now read-only.

Aroralanuk patches #9

Merged
merged 3 commits into from Nov 21, 2022
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
26 changes: 25 additions & 1 deletion README.md
Expand Up @@ -28,4 +28,28 @@ graph TB
Operator -- "process(Ethereum, (Bob, 5))" --> EthereumInbox
EthereumInbox-->|"handle(Ethereum, (Bob, 5))"|HYP_P
HYP_P-.->Bob
```
```

## Setup

```sh
# Install dependencies
yarn

# Build source and generate types
yarn build
```

## Test

```sh
# Run all unit tests
yarn test

# Lint check code
yarn lint
```

## Learn more

For more information, see the [Hyperlane documentation](https://docs.hyperlane.xyz/hyperlane-docs/developers/getting-started).
4 changes: 2 additions & 2 deletions contracts/HypERC20.sol
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.13;

import {Router} from "@hyperlane-xyz/app/contracts/Router.sol";
import {Router} from "@hyperlane-xyz/core/contracts/Router.sol";

import {ERC20Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol";

Expand Down Expand Up @@ -93,7 +93,7 @@ contract HypERC20 is Router, ERC20Upgradeable {
function _handle(
uint32 _origin,
bytes32,
bytes memory _message
bytes calldata _message
) internal override {
(address recipient, uint256 amount) = abi.decode(
_message,
Expand Down
4 changes: 2 additions & 2 deletions contracts/HypERC721.sol
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.13;

import {Router} from "@hyperlane-xyz/app/contracts/Router.sol";
import {Router} from "@hyperlane-xyz/core/contracts/Router.sol";

import {ERC721EnumerableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol";

Expand Down Expand Up @@ -94,7 +94,7 @@ contract HypERC721 is Router, ERC721EnumerableUpgradeable {
function _handle(
uint32 _origin,
bytes32,
bytes memory _message
bytes calldata _message
) internal override {
(address recipient, uint256 tokenId) = abi.decode(
_message,
Expand Down
5 changes: 3 additions & 2 deletions package.json
Expand Up @@ -3,7 +3,8 @@
"description": "A template for interchain ERC20 and ERC721 tokens using Hyperlane",
"version": "0.5.0",
"dependencies": {
"@hyperlane-xyz/sdk": "^0.5.0-beta0",
"@hyperlane-xyz/core": "^0.5.0",
"@hyperlane-xyz/sdk": "^0.5.0",
"@openzeppelin/contracts-upgradeable": "^4.6.0",
"ethers": "^5.6.8"
},
Expand Down Expand Up @@ -54,7 +55,7 @@
"coverage": "hardhat coverage",
"lint": "eslint . --ext .ts",
"prettier": "prettier --write ./contracts ./test",
"test": "hardhat test ./test/**/*.test.ts"
"test": "hardhat test ./test/*.test.ts"
},
"types": "dist/index.d.ts"
}
60 changes: 17 additions & 43 deletions yarn.lock
Expand Up @@ -1192,17 +1192,6 @@ __metadata:
languageName: node
linkType: hard

"@hyperlane-xyz/app@npm:0.5.0-beta0":
version: 0.5.0-beta0
resolution: "@hyperlane-xyz/app@npm:0.5.0-beta0"
dependencies:
"@hyperlane-xyz/core": 0.5.0-beta0
"@hyperlane-xyz/utils": 0.5.0-beta0
"@openzeppelin/contracts-upgradeable": ^4.5.0
checksum: 14dac843eb418bd9807116bb0dd56aca08bd4a8645cd635f534dc75bb8fbfd1b5a12c1d1b2e9343d12592798e827f191c48725d0e6d943e2e9d7fe3bd3fddf47
languageName: node
linkType: hard

"@hyperlane-xyz/celo-ethers-provider@npm:^0.1.1":
version: 0.1.1
resolution: "@hyperlane-xyz/celo-ethers-provider@npm:0.1.1"
Expand All @@ -1212,23 +1201,23 @@ __metadata:
languageName: node
linkType: hard

"@hyperlane-xyz/core@npm:0.5.0-beta0":
version: 0.5.0-beta0
resolution: "@hyperlane-xyz/core@npm:0.5.0-beta0"
"@hyperlane-xyz/core@npm:0.5.3, @hyperlane-xyz/core@npm:^0.5.0":
version: 0.5.3
resolution: "@hyperlane-xyz/core@npm:0.5.3"
dependencies:
"@hyperlane-xyz/utils": 0.5.0-beta0
"@hyperlane-xyz/utils": 0.5.3
"@openzeppelin/contracts": ^4.6.0
"@openzeppelin/contracts-upgradeable": ^4.6.0
"@summa-tx/memview-sol": ^2.0.0
checksum: 7c3f88d4140d63b50013feddd1a13275e28eeb1ff1e7cd119480aee904a11c6ff0b50535159e90058b6a80cf28176a7ef0bdd13a20e99f82ef722a34b807a193
checksum: 2082cceb04022a6d73d5fc04966a72caddc77f84c8b35ed5fc8d46c4d4ff0189f834c5c8fad1355ef2bf2d040cae26b89f200bdbfb3118942ce46c946dc1df30
languageName: node
linkType: hard

"@hyperlane-xyz/hyperlane-token@workspace:.":
version: 0.0.0-use.local
resolution: "@hyperlane-xyz/hyperlane-token@workspace:."
dependencies:
"@hyperlane-xyz/sdk": ^0.5.0-beta0
"@hyperlane-xyz/core": ^0.5.0
"@hyperlane-xyz/sdk": ^0.5.0
"@nomiclabs/hardhat-ethers": ^2.0.5
"@nomiclabs/hardhat-waffle": ^2.0.2
"@openzeppelin/contracts-upgradeable": ^4.6.0
Expand Down Expand Up @@ -1256,29 +1245,28 @@ __metadata:
languageName: unknown
linkType: soft

"@hyperlane-xyz/sdk@npm:^0.5.0-beta0":
version: 0.5.0-beta0
resolution: "@hyperlane-xyz/sdk@npm:0.5.0-beta0"
"@hyperlane-xyz/sdk@npm:^0.5.0":
version: 0.5.3
resolution: "@hyperlane-xyz/sdk@npm:0.5.3"
dependencies:
"@hyperlane-xyz/app": 0.5.0-beta0
"@hyperlane-xyz/celo-ethers-provider": ^0.1.1
"@hyperlane-xyz/core": 0.5.0-beta0
"@hyperlane-xyz/utils": 0.5.0-beta0
"@hyperlane-xyz/core": 0.5.3
"@hyperlane-xyz/utils": 0.5.3
"@types/debug": ^4.1.7
coingecko-api: ^1.0.10
cross-fetch: ^3.1.5
debug: ^4.3.4
ethers: ^5.6.8
checksum: 85ef5c70ad290f1ff67297fdd76419d8b4290b22c3a1eb9ed5c1ac4876c7fef5c11471a063190aa8940156bc622e6527950d24aac9e58897cd301da33c41c1c7
checksum: da21f5eabf14503cb95eeec548bc95eb42aebd4ac7c27193296b2b17e150b2dd7392c075f9930143a8ba81f32643a5be36701b6db6a85213fdd138903f11e38a
languageName: node
linkType: hard

"@hyperlane-xyz/utils@npm:0.5.0-beta0":
version: 0.5.0-beta0
resolution: "@hyperlane-xyz/utils@npm:0.5.0-beta0"
"@hyperlane-xyz/utils@npm:0.5.3":
version: 0.5.3
resolution: "@hyperlane-xyz/utils@npm:0.5.3"
dependencies:
ethers: ^5.6.8
checksum: 7628b0624a1b7bbab77b04ada38d0842dee8076273f58c0cd608877b430e46f2d965de0293d53b6bdcfe66b4fb36840ded0ee2a9e30894394415be38817e223f
checksum: a9d819494cba44f583d575d07d3af1b43357b90d95fb0fd4fa1d8337ad069f938dd678a8a0e824a8e70e767f3b8f5a8e6a1b649e27da21837e51e515ffa793f3
languageName: node
linkType: hard

Expand Down Expand Up @@ -1443,13 +1431,6 @@ __metadata:
languageName: node
linkType: hard

"@openzeppelin/contracts-upgradeable@npm:^4.5.0":
version: 4.6.0
resolution: "@openzeppelin/contracts-upgradeable@npm:4.6.0"
checksum: f9802c9cccf31bd475412ba5d862ed15eed5352302c30b29c38f84aed2dcfe0d957687935a72068f3d44292a4a55b0ff26cd018b2e14a47f16f74f087009aa29
languageName: node
linkType: hard

"@openzeppelin/contracts-upgradeable@npm:^4.6.0":
version: 4.7.3
resolution: "@openzeppelin/contracts-upgradeable@npm:4.7.3"
Expand Down Expand Up @@ -1635,13 +1616,6 @@ __metadata:
languageName: node
linkType: hard

"@summa-tx/memview-sol@npm:^2.0.0":
version: 2.0.1
resolution: "@summa-tx/memview-sol@npm:2.0.1"
checksum: fbdb525033024f2a0a2078c8f36fb74902ea8590b91c4a68b2782eec27f5585220ae17e973ba96dff77bb87cd7491dca0a3af6694dfabc6db4e64c5ce740d5c8
languageName: node
linkType: hard

"@szmarczak/http-timer@npm:^1.1.2":
version: 1.1.2
resolution: "@szmarczak/http-timer@npm:1.1.2"
Expand Down