Rename to abacus (#126)

pull/127/head
Nam Chu Hoai 3 years ago committed by GitHub
parent e7e37ce4a1
commit 79f1f200e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 18
      .github/workflows/npm/action.yml
  2. 4
      .github/workflows/solidity.yml
  3. 4
      .github/workflows/typescript.yml
  4. 4
      pre-commit.sh
  5. 6
      scripts/prettier.sh
  6. 2
      scripts/test-all.sh
  7. 14
      scripts/test-solidity.sh
  8. 0
      solidity/abacus-core/.env.example
  9. 0
      solidity/abacus-core/.eslintrc.json
  10. 0
      solidity/abacus-core/.gitignore
  11. 0
      solidity/abacus-core/.prettierrc
  12. 0
      solidity/abacus-core/.solcover.js
  13. 0
      solidity/abacus-core/.solhint.json
  14. 4
      solidity/abacus-core/README.md
  15. 0
      solidity/abacus-core/contracts/Common.sol
  16. 2
      solidity/abacus-core/contracts/Home.sol
  17. 0
      solidity/abacus-core/contracts/Merkle.sol
  18. 0
      solidity/abacus-core/contracts/Queue.sol
  19. 0
      solidity/abacus-core/contracts/Replica.sol
  20. 0
      solidity/abacus-core/contracts/UpdaterManager.sol
  21. 0
      solidity/abacus-core/contracts/Version0.sol
  22. 0
      solidity/abacus-core/contracts/XAppConnectionManager.sol
  23. 0
      solidity/abacus-core/contracts/governance/GovernanceMessage.sol
  24. 6
      solidity/abacus-core/contracts/governance/GovernanceRouter.sol
  25. 0
      solidity/abacus-core/contracts/test/MysteryMath.sol
  26. 0
      solidity/abacus-core/contracts/test/MysteryMathV1.sol
  27. 0
      solidity/abacus-core/contracts/test/MysteryMathV2.sol
  28. 0
      solidity/abacus-core/contracts/test/TestCommon.sol
  29. 0
      solidity/abacus-core/contracts/test/TestGovernanceRouter.sol
  30. 0
      solidity/abacus-core/contracts/test/TestHome.sol
  31. 0
      solidity/abacus-core/contracts/test/TestMerkle.sol
  32. 0
      solidity/abacus-core/contracts/test/TestMessage.sol
  33. 0
      solidity/abacus-core/contracts/test/TestQueue.sol
  34. 0
      solidity/abacus-core/contracts/test/TestRecipient.sol
  35. 0
      solidity/abacus-core/contracts/test/TestReplica.sol
  36. 0
      solidity/abacus-core/contracts/test/TestXAppConnectionManager.sol
  37. 0
      solidity/abacus-core/contracts/test/bad-recipient/BadRecipient1.sol
  38. 0
      solidity/abacus-core/contracts/test/bad-recipient/BadRecipient2.sol
  39. 0
      solidity/abacus-core/contracts/test/bad-recipient/BadRecipient3.sol
  40. 0
      solidity/abacus-core/contracts/test/bad-recipient/BadRecipient4.sol
  41. 0
      solidity/abacus-core/contracts/test/bad-recipient/BadRecipient5.sol
  42. 0
      solidity/abacus-core/contracts/test/bad-recipient/BadRecipient6.sol
  43. 0
      solidity/abacus-core/contracts/test/bad-recipient/BadRecipientHandle.sol
  44. 0
      solidity/abacus-core/contracts/upgrade/UpgradeBeacon.sol
  45. 0
      solidity/abacus-core/contracts/upgrade/UpgradeBeaconController.sol
  46. 0
      solidity/abacus-core/contracts/upgrade/UpgradeBeaconProxy.sol
  47. 2
      solidity/abacus-core/hardhat.config.ts
  48. 0
      solidity/abacus-core/interfaces/IMessageRecipient.sol
  49. 0
      solidity/abacus-core/interfaces/IUpdaterManager.sol
  50. 0
      solidity/abacus-core/libs/Merkle.sol
  51. 0
      solidity/abacus-core/libs/Message.sol
  52. 0
      solidity/abacus-core/libs/Queue.sol
  53. 0
      solidity/abacus-core/libs/TypeCasts.sol
  54. 0
      solidity/abacus-core/package-lock.json
  55. 2
      solidity/abacus-core/package.json
  56. 0
      solidity/abacus-core/tsconfig.json
  57. 0
      solidity/abacus-core/update_abis.sh
  58. 0
      solidity/abacus-xapps/.env.example
  59. 0
      solidity/abacus-xapps/.eslintrc.json
  60. 0
      solidity/abacus-xapps/.gitignore
  61. 0
      solidity/abacus-xapps/.prettierrc
  62. 0
      solidity/abacus-xapps/.solcover.js
  63. 0
      solidity/abacus-xapps/.solhint.json
  64. 0
      solidity/abacus-xapps/.solhintignore
  65. 2
      solidity/abacus-xapps/README.md
  66. 2
      solidity/abacus-xapps/contracts/Router.sol
  67. 6
      solidity/abacus-xapps/contracts/XAppConnectionClient.sol
  68. 0
      solidity/abacus-xapps/contracts/bridge/BridgeMessage.sol
  69. 12
      solidity/abacus-xapps/contracts/bridge/BridgeRouter.sol
  70. 4
      solidity/abacus-xapps/contracts/bridge/BridgeToken.sol
  71. 8
      solidity/abacus-xapps/contracts/bridge/ETHHelper.sol
  72. 0
      solidity/abacus-xapps/contracts/bridge/Encoding.sol
  73. 4
      solidity/abacus-xapps/contracts/bridge/TokenRegistry.sol
  74. 10
      solidity/abacus-xapps/contracts/bridge/test/MockCore.sol
  75. 0
      solidity/abacus-xapps/contracts/bridge/test/MockWeth.sol
  76. 0
      solidity/abacus-xapps/contracts/bridge/test/TestBridgeMessage.sol
  77. 0
      solidity/abacus-xapps/contracts/bridge/test/TestEncoding.sol
  78. 0
      solidity/abacus-xapps/contracts/bridge/vendored/OZERC20.sol
  79. 0
      solidity/abacus-xapps/contracts/ping-pong/PingPongMessage.sol
  80. 4
      solidity/abacus-xapps/contracts/ping-pong/PingPongRouter.sol
  81. 4
      solidity/abacus-xapps/contracts/xapp-template/MessageTemplate.sol
  82. 6
      solidity/abacus-xapps/contracts/xapp-template/RouterTemplate.sol
  83. 2
      solidity/abacus-xapps/hardhat.config.ts
  84. 0
      solidity/abacus-xapps/interfaces/bridge/IBridgeToken.sol
  85. 0
      solidity/abacus-xapps/interfaces/bridge/IWeth.sol
  86. 45152
      solidity/abacus-xapps/package-lock.json
  87. 6
      solidity/abacus-xapps/package.json
  88. 0
      solidity/abacus-xapps/tsconfig.json
  89. 19604
      solidity/optics-xapps/package-lock.json
  90. 0
      typescript/abacus-tests/.gitignore
  91. 0
      typescript/abacus-tests/.prettierrc
  92. 0
      typescript/abacus-tests/hardhat.config.ts
  93. 0
      typescript/abacus-tests/lib/bridge.ts
  94. 2
      typescript/abacus-tests/lib/core.ts
  95. 4
      typescript/abacus-tests/lib/index.ts
  96. 2
      typescript/abacus-tests/lib/permit.ts
  97. 4
      typescript/abacus-tests/lib/types.ts
  98. 0
      typescript/abacus-tests/lib/utils.ts
  99. 33539
      typescript/abacus-tests/package-lock.json
  100. 7
      typescript/abacus-tests/package.json
  101. Some files were not shown because too many files have changed in this diff Show More

@ -19,22 +19,22 @@ runs:
id: core-cache
uses: actions/cache@v2
with:
path: ./solidity/optics-core/node_modules
key: ${{ inputs.runneros }}-core-cache-${{ hashFiles('solidity/optics-core/package-lock.json') }}
path: ./solidity/abacus-core/node_modules
key: ${{ inputs.runneros }}-core-cache-${{ hashFiles('solidity/abacus-core/package-lock.json') }}
- name: XApps Cache
id: xapps-cache
uses: actions/cache@v2
with:
path: ./solidity/optics-xapps/node_modules
key: ${{ inputs.runneros }}-xapps-cache-${{ hashFiles('solidity/optics-xapps/package-lock.json') }}
path: ./solidity/abacus-xapps/node_modules
key: ${{ inputs.runneros }}-xapps-cache-${{ hashFiles('solidity/abacus-xapps/package-lock.json') }}
- name: Tests Cache
id: tests-cache
uses: actions/cache@v2
with:
path: ./typescript/optics-tests/node_modules
key: ${{ inputs.runneros }}-tests-cache-${{ hashFiles('typescript/optics-tests/package-lock.json') }}
path: ./typescript/abacus-tests/node_modules
key: ${{ inputs.runneros }}-tests-cache-${{ hashFiles('typescript/abacus-tests/package-lock.json') }}
- name: Deploy Cache
id: deploy-cache
@ -68,17 +68,17 @@ runs:
- name: Install Core
shell: bash
if: steps.core-cache.outputs.cache-hit != 'true'
run: cd ./solidity/optics-core && npm i
run: cd ./solidity/abacus-core && npm i
- name: Install XApps
shell: bash
if: steps.xapps-cache.outputs.cache-hit != 'true'
run: cd ./solidity/optics-xapps && npm i
run: cd ./solidity/abacus-xapps && npm i
- name: Install Tests
shell: bash
if: steps.tests-cache.outputs.cache-hit != 'true'
run: cd ./typescript/optics-tests && npm i
run: cd ./typescript/abacus-tests && npm i
- name: Install Deploy
shell: bash

@ -32,9 +32,9 @@ jobs:
- name: lint
run: |
cd ./solidity/optics-core
cd ./solidity/abacus-core
npm run lint
cd ../optics-xapps
cd ../abacus-xapps
npm run lint
solidity-test:

@ -56,6 +56,6 @@ jobs:
npm run prettier
cd ../optics-provider
npm run prettier
cd ../optics-tests
npm run prettier
cd ../abacus-tests
npm run prettier-ci
[[ -z $(git status -s) ]]

@ -143,9 +143,9 @@ else
fi
# Test solidity contracts
if ! git diff-index --quiet HEAD -- ./solidity/optics-core ./solidity/optics-xapps ./typescript/optics-tests ./typescript/optics-deploy; then
if ! git diff-index --quiet HEAD -- ./solidity/optics-core ./solidity/optics-xapps ./typescript/abacus-tests ./typescript/optics-deploy; then
echo "+Running solidity tests"
cd ./typescript/optics-tests
cd ./typescript/abacus-tests
npm run testNoCompile
cd ../..
else

@ -4,11 +4,11 @@
set -e
# solidity
npm --prefix ./solidity/optics-core run prettier
npm --prefix ./solidity/optics-xapps run prettier
npm --prefix ./solidity/abacus-core run prettier
npm --prefix ./solidity/abacus-xapps run prettier
# typescript
npm --prefix ./typescript/contract-metrics run prettier
npm --prefix ./typescript/optics-deploy run prettier
npm --prefix ./typescript/optics-provider run prettier
npm --prefix ./typescript/optics-tests run prettier
npm --prefix ./typescript/abacus-tests run prettier

@ -45,5 +45,5 @@ set -xe
# Run solidity tests
echo "+Running solidity tests"
cd ./typescript/optics-tests
cd ./typescript/abacus-tests
npm run testNoCompile

@ -4,22 +4,22 @@
set -e
# compile contracts
cd ./solidity/optics-core
cd ./solidity/abacus-core
npm run compile
cd ../optics-xapps
cd ../abacus-xapps
npm run compile
cd ../../
# copy artifacts
cp -R ./solidity/optics-xapps/artifacts ./typescript/optics-tests
cp -R ./solidity/optics-core/artifacts ./typescript/optics-tests
cp -R ./solidity/abacus-xapps/artifacts ./typescript/abacus-tests
cp -R ./solidity/abacus-core/artifacts ./typescript/abacus-tests
# copy cache
cp -R ./solidity/optics-xapps/cache ./typescript/optics-tests
cp -R ./solidity/optics-core/cache ./typescript/optics-tests
cp -R ./solidity/abacus-xapps/cache ./typescript/abacus-tests
cp -R ./solidity/abacus-core/cache ./typescript/abacus-tests
# run tests
cd ./typescript/optics-tests
cd ./typescript/abacus-tests
npm i
npm run testNoCompile
cd ../..

@ -1,6 +1,6 @@
## Optics Solidity
## Abacus Solidity
On-chain implementations of Optics in Solidity.
On-chain implementations of Abacus in Solidity.
### Setup

@ -57,7 +57,7 @@ contract Home is
// ============ Events ============
/**
* @notice Emitted when a new message is dispatched via Optics
* @notice Emitted when a new message is dispatched via Abacus
* @param leafIndex Index of message's leaf in merkle tree
* @param destinationAndNonce Destination and destination-specific
* nonce combined in single field ((destination << 32) & nonce)

@ -182,9 +182,9 @@ contract GovernanceRouter is Version0, Initializable, IMessageRecipient {
// ============ External Functions ============
/**
* @notice Handle Optics messages
* @notice Handle Abacus messages
* For all non-Governor chains to handle messages
* sent from the Governor chain via Optics.
* sent from the Governor chain via Abacus.
* Governor chain should never receive messages,
* because non-Governor chains are not able to send them
* @param _origin The domain (of the Governor Router)
@ -234,7 +234,7 @@ contract GovernanceRouter is Version0, Initializable, IMessageRecipient {
bytes32 _router = _mustHaveRouter(_destination);
// format call message
bytes memory _msg = GovernanceMessage.formatCalls(_calls);
// dispatch call message using Optics
// dispatch call message using Abacus
Home(xAppConnectionManager.home()).dispatch(
_destination,
_router,

@ -56,7 +56,7 @@ module.exports = {
// TODO: add Ropsten
},
typechain: {
outDir: "../../typescript/typechain/optics-core",
outDir: "../../typescript/typechain/abacus-core",
target: "ethers-v5",
alwaysGenerateOverloads: false, // should overloads with full signatures like deposit(uint256) be generated always, even if there are no overloads?
},

@ -1,5 +1,5 @@
{
"name": "@celo-org/optics-sol",
"name": "@abacus-network/abacus-sol",
"devDependencies": {
"@nomiclabs/hardhat-ethers": "^2.0.1",
"@nomiclabs/hardhat-etherscan": "^2.1.2",

@ -1,4 +1,4 @@
# Optics Token Bridge
# Abacus Token Bridge
### Message Format

@ -4,7 +4,7 @@ pragma solidity >=0.6.11;
// ============ Internal Imports ============
import {XAppConnectionClient} from "./XAppConnectionClient.sol";
// ============ External Imports ============
import {IMessageRecipient} from "@celo-org/optics-sol/interfaces/IMessageRecipient.sol";
import {IMessageRecipient} from "@abacus-network/abacus-sol/interfaces/IMessageRecipient.sol";
abstract contract Router is XAppConnectionClient, IMessageRecipient {
// ============ Mutable Storage ============

@ -2,8 +2,8 @@
pragma solidity >=0.6.11;
// ============ External Imports ============
import {Home} from "@celo-org/optics-sol/contracts/Home.sol";
import {XAppConnectionManager} from "@celo-org/optics-sol/contracts/XAppConnectionManager.sol";
import {Home} from "@abacus-network/abacus-sol/contracts/Home.sol";
import {XAppConnectionManager} from "@abacus-network/abacus-sol/contracts/XAppConnectionManager.sol";
import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
abstract contract XAppConnectionClient is OwnableUpgradeable {
@ -15,7 +15,7 @@ abstract contract XAppConnectionClient is OwnableUpgradeable {
// ============ Modifiers ============
/**
* @notice Only accept messages from an Optics Replica contract
* @notice Only accept messages from an Abacus Replica contract
*/
modifier onlyReplica() {
require(_isReplica(msg.sender), "!replica");

@ -8,9 +8,9 @@ import {XAppConnectionClient} from "../XAppConnectionClient.sol";
import {IBridgeToken} from "../../interfaces/bridge/IBridgeToken.sol";
import {BridgeMessage} from "./BridgeMessage.sol";
// ============ External Imports ============
import {Home} from "@celo-org/optics-sol/contracts/Home.sol";
import {Version0} from "@celo-org/optics-sol/contracts/Version0.sol";
import {TypeCasts} from "@celo-org/optics-sol/contracts/XAppConnectionManager.sol";
import {Home} from "@abacus-network/abacus-sol/contracts/Home.sol";
import {Version0} from "@abacus-network/abacus-sol/contracts/Version0.sol";
import {TypeCasts} from "@abacus-network/abacus-sol/contracts/XAppConnectionManager.sol";
import {TypedMemView} from "@summa-tx/memview-sol/contracts/TypedMemView.sol";
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
@ -145,7 +145,7 @@ contract BridgeRouter is Version0, Router, TokenRegistry {
}
// format Transfer Tokens action
bytes29 _action = BridgeMessage.formatTransfer(_recipient, _amount);
// send message to remote chain via Optics
// send message to remote chain via Abacus
Home(xAppConnectionManager.home()).dispatch(
_destination,
_remote,
@ -354,7 +354,7 @@ contract BridgeRouter is Version0, Router, TokenRegistry {
TypeCasts.coerceBytes32(_bridgeToken.symbol()),
_bridgeToken.decimals()
);
// send message to remote chain via Optics
// send message to remote chain via Abacus
Home(xAppConnectionManager.home()).dispatch(
_messageOrigin,
_messageRemoteRouter,
@ -392,7 +392,7 @@ contract BridgeRouter is Version0, Router, TokenRegistry {
}
// format Request Details message
bytes29 _action = BridgeMessage.formatRequestDetails();
// send message to remote chain via Optics
// send message to remote chain via Abacus
Home(xAppConnectionManager.home()).dispatch(
_destination,
_remote,

@ -5,8 +5,8 @@ pragma solidity >=0.6.11;
import {IBridgeToken} from "../../interfaces/bridge/IBridgeToken.sol";
import {ERC20} from "./vendored/OZERC20.sol";
// ============ External Imports ============
import {Version0} from "@celo-org/optics-sol/contracts/Version0.sol";
import {TypeCasts} from "@celo-org/optics-sol/contracts/XAppConnectionManager.sol";
import {Version0} from "@abacus-network/abacus-sol/contracts/Version0.sol";
import {TypeCasts} from "@abacus-network/abacus-sol/contracts/XAppConnectionManager.sol";
import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
contract BridgeToken is Version0, IBridgeToken, OwnableUpgradeable, ERC20 {

@ -5,7 +5,7 @@ pragma solidity >=0.6.11;
import {BridgeRouter} from "./BridgeRouter.sol";
import {IWeth} from "../../interfaces/bridge/IWeth.sol";
// ============ External Imports ============
import {TypeCasts} from "@celo-org/optics-sol/contracts/XAppConnectionManager.sol";
import {TypeCasts} from "@abacus-network/abacus-sol/contracts/XAppConnectionManager.sol";
contract ETHHelper {
// ============ Immutables ============
@ -26,7 +26,7 @@ contract ETHHelper {
// ============ External Functions ============
/**
* @notice Sends ETH over the Optics Bridge. Sends to a full-width Optics
* @notice Sends ETH over the Abacus Bridge. Sends to a full-width Abacus
* identifer on the other side.
* @dev As with all bridges, improper use may result in loss of funds.
* @param _domain The domain to send funds to.
@ -38,7 +38,7 @@ contract ETHHelper {
}
/**
* @notice Sends ETH over the Optics Bridge. Sends to the same address on
* @notice Sends ETH over the Abacus Bridge. Sends to the same address on
* the other side.
* @dev WARNING: This function should only be used when sending TO an
* EVM-like domain. As with all bridges, improper use may result in loss of
@ -50,7 +50,7 @@ contract ETHHelper {
}
/**
* @notice Sends ETH over the Optics Bridge. Sends to a specified EVM
* @notice Sends ETH over the Abacus Bridge. Sends to a specified EVM
* address on the other side.
* @dev This function should only be used when sending TO an EVM-like
* domain. As with all bridges, improper use may result in loss of funds

@ -7,8 +7,8 @@ import {Encoding} from "./Encoding.sol";
import {IBridgeToken} from "../../interfaces/bridge/IBridgeToken.sol";
import {XAppConnectionClient} from "../XAppConnectionClient.sol";
// ============ External Imports ============
import {TypeCasts} from "@celo-org/optics-sol/contracts/XAppConnectionManager.sol";
import {UpgradeBeaconProxy} from "@celo-org/optics-sol/contracts/upgrade/UpgradeBeaconProxy.sol";
import {TypeCasts} from "@abacus-network/abacus-sol/contracts/XAppConnectionManager.sol";
import {UpgradeBeaconProxy} from "@abacus-network/abacus-sol/contracts/upgrade/UpgradeBeaconProxy.sol";
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import {TypedMemView} from "@summa-tx/memview-sol/contracts/TypedMemView.sol";
import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol";

@ -1,12 +1,12 @@
// SPDX-License-Identifier: MIT OR Apache-2.0
pragma solidity >=0.6.11;
import {MerkleTreeManager} from "@celo-org/optics-sol/contracts/Merkle.sol";
import {QueueManager} from "@celo-org/optics-sol/contracts/Queue.sol";
import {MerkleTreeManager} from "@abacus-network/abacus-sol/contracts/Merkle.sol";
import {QueueManager} from "@abacus-network/abacus-sol/contracts/Queue.sol";
import {Message} from "@celo-org/optics-sol/libs/Message.sol";
import {MerkleLib} from "@celo-org/optics-sol/libs/Merkle.sol";
import {QueueLib} from "@celo-org/optics-sol/libs/Queue.sol";
import {Message} from "@abacus-network/abacus-sol/libs/Message.sol";
import {MerkleLib} from "@abacus-network/abacus-sol/libs/Merkle.sol";
import {QueueLib} from "@abacus-network/abacus-sol/libs/Queue.sol";
// We reproduce a significant amount of logic from `Home` to ensure that
// calling dispatch here is AT LEAST AS EXPENSIVE as calling it on home

@ -11,7 +11,7 @@ import {XAppConnectionClient} from "../XAppConnectionClient.sol";
/*
============ PingPong xApp ============
The PingPong xApp is capable of initiating PingPong "matches" between two chains.
A match consists of "volleys" sent back-and-forth between the two chains via Optics.
A match consists of "volleys" sent back-and-forth between the two chains via Abacus.
The first volley in a match is always a Ping volley.
When a Router receives a Ping volley, it returns a Pong.
@ -55,7 +55,7 @@ contract PingPongRouter is Router {
// ============ Handle message functions ============
/**
* @notice Handle "volleys" sent via Optics from other remote PingPong Routers
* @notice Handle "volleys" sent via Abacus from other remote PingPong Routers
* @param _origin The domain the message is coming from
* @param _sender The address the message is coming from
* @param _message The message in the form of raw bytes

@ -19,8 +19,8 @@ We use a 1-byte type tag on the front of the message.
Message Flow Between xApps:
1. xApp Router A receives a command on chain A
2. xApp Router A encodes (formats) the information into a message
2. xApp Router A sends the message to xApp Router B on chain B via Optics
3. xApp Router B receives the message via Optics
2. xApp Router A sends the message to xApp Router B on chain B via Abacus
3. xApp Router B receives the message via Abacus
4. xApp Router B decodes (gets) the information from the message and acts on it
The Message Library should contain the following for each type of message:

@ -40,9 +40,9 @@ contract RouterTemplate is Router {
// ============ Handle message functions ============
/**
* @notice Receive messages sent via Optics from other remote xApp Routers;
* @notice Receive messages sent via Abacus from other remote xApp Routers;
* parse the contents of the message and enact the message's effects on the local chain
* @dev Called by an Optics Replica contract while processing a message sent via Optics
* @dev Called by an Abacus Replica contract while processing a message sent via Abacus
* @param _origin The domain the message is coming from
* @param _sender The address the message is coming from
* @param _message The message in the form of raw bytes
@ -80,7 +80,7 @@ contract RouterTemplate is Router {
// ============ Dispatch message functions ============
/**
* @notice Send a message of "Type A" to a remote xApp Router via Optics;
* @notice Send a message of "Type A" to a remote xApp Router via Abacus;
* this message is called to take some action in the cross-chain context
* Example message types:
* Sending tokens from this chain to the destination chain;

@ -57,7 +57,7 @@ module.exports = {
},
typechain: {
outDir: "../../typescript/typechain/optics-xapps",
outDir: "../../typescript/typechain/abacus-xapps",
target: "ethers-v5",
alwaysGenerateOverloads: false, // should overloads with full signatures like deposit(uint256) be generated always, even if there are no overloads?
},

@ -1,5 +1,5 @@
{
"name": "@celo-org/optics-xapps-sol",
"name": "@abacus-network/abacus-xapps-sol",
"devDependencies": {
"@nomiclabs/hardhat-ethers": "^2.0.1",
"@nomiclabs/hardhat-etherscan": "^2.1.2",
@ -22,7 +22,7 @@
"typescript": "^4.3.5"
},
"version": "0.0.0",
"description": "A bridge using optics",
"description": "A bridge using abacus",
"main": " ",
"scripts": {
"prettier": "prettier --write './contracts'",
@ -41,7 +41,7 @@
"author": "James Prestwich",
"license": "MIT OR Apache-2.0",
"dependencies": {
"@celo-org/optics-sol": "file:../optics-core",
"@abacus-network/abacus-sol": "file:../abacus-core",
"@openzeppelin/contracts": "~3.4.2",
"@openzeppelin/contracts-upgradeable": "~3.4.2",
"@summa-tx/memview-sol": "^2.0.0"

File diff suppressed because it is too large Load Diff

@ -186,7 +186,7 @@ function formatCalls(callsData: types.CallData[]): string {
);
}
export const optics: types.HardhatOpticsHelpers = {
export const abacus: types.HardhatAbacusHelpers = {
formatMessage,
governance: {
formatTransferGovernor,

@ -1,12 +1,12 @@
import '@nomiclabs/hardhat-waffle';
import { extendEnvironment } from 'hardhat/config';
import { optics } from './core';
import { abacus } from './core';
import { bridge } from './bridge';
// HardhatRuntimeEnvironment
extendEnvironment((hre) => {
hre.optics = optics;
hre.abacus = abacus;
hre.bridge = bridge;
});

@ -1,5 +1,5 @@
import { BigNumber, BigNumberish, ethers } from 'ethers';
import { BridgeToken } from 'optics-ts-interface/dist/optics-xapps';
import { BridgeToken } from '@abacus-network/ts-interface/dist/abacus-xapps';
const PERMIT_TYPEHASH = ethers.utils.keccak256(
ethers.utils.toUtf8Bytes(

@ -5,7 +5,7 @@ import { BridgeMessageTypes } from './bridge';
/********* HRE *********/
export interface HardhatOpticsHelpers {
export interface HardhatAbacusHelpers {
formatMessage: Function;
governance: {
formatTransferGovernor: Function;
@ -33,7 +33,7 @@ export interface HardhatBridgeHelpers {
declare module 'hardhat/types/runtime' {
interface HardhatRuntimeEnvironment {
optics: HardhatOpticsHelpers;
abacus: HardhatAbacusHelpers;
bridge: HardhatBridgeHelpers;
}
}

File diff suppressed because it is too large Load Diff

@ -16,12 +16,12 @@
"typescript": "^4.3.2"
},
"dependencies": {
"@abacus-network/abacus-deploy": "0.0.5",
"@abacus-network/sdk": "0.0.0",
"@abacus-network/ts-interface": "^1.1.2",
"@types/node": "^15.14.7",
"dotenv": "^10.0.0",
"hardhat-gas-reporter": "^1.0.7",
"optics-deploy": "0.0.5",
"optics-ts-interface": "^1.1.2"
"hardhat-gas-reporter": "^1.0.7"
},
"name": "@abacus-network/test",
"version": "0.0.0",
@ -30,6 +30,7 @@
"scripts": {
"check": "tsc --noEmit",
"prettier": "prettier --write ./test ./lib",
"prettier-ci": "prettier --check ./test",
"test": "hardhat test",
"testNoCompile": "hardhat test"
},

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save