Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into feat/additional-check…
Browse files Browse the repository at this point in the history
…s-for-execute-with-token
  • Loading branch information
Foivos committed Mar 26, 2024
2 parents 10ed394 + aede779 commit 52c75e6
Show file tree
Hide file tree
Showing 12 changed files with 449 additions and 628 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/codecov.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Coverage

on:
pull_request:
push:
branches:
- main
- releases/**

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
coverage:
runs-on: blacksmith-2vcpu-ubuntu-2204

steps:
- uses: actions/checkout@v4

- name: Install Node.js
uses: useblacksmith/setup-node@v5
with:
node-version: 18.x
cache: 'npm'

- name: Install Dependencies
run: npm ci

- name: Build
run: npm run build > build.log 2>&1

- name: Check for build warnings
run: |
if grep -q -i "error" build.log || grep -q -i "warning" build.log; then
echo "Build contains following errors or warnings..."
cat build.log
exit 1
else
exit 0;
fi
- name: Generate code coverage
run: npm run coverage

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: lcov.info
fail_ci_if_error: true
4 changes: 4 additions & 0 deletions .github/workflows/conventional-commits.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ name: Ensure Conventional Commit message
on:
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
ensure-CC:
runs-on: ubuntu-latest
Expand Down
60 changes: 0 additions & 60 deletions .github/workflows/coverage.yaml

This file was deleted.

18 changes: 9 additions & 9 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,22 @@ name: Linting
on:
- pull_request

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
lint:
strategy:
matrix:
node-version:
- 18.x
os:
- ubuntu-latest
runs-on: ${{ matrix.os }}
runs-on: blacksmith-2vcpu-ubuntu-2204

steps:
- uses: actions/checkout@v4

- name: Install Node.js
uses: actions/setup-node@v3
uses: useblacksmith/setup-node@v5
with:
node-version: ${{ matrix.node-version }}
node-version: 18.x
cache: 'npm'

- name: Install Dependencies
run: npm ci
Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/slither.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Slither Static Analysis

on:
- pull_request

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
slither:
runs-on: blacksmith-2vcpu-ubuntu-2204

steps:
- uses: actions/checkout@v4

- name: Install Node.js
uses: useblacksmith/setup-node@v5
with:
node-version: 18.x
cache: 'npm'

- name: Install Dependencies
run: npm ci

- name: Run Slither
uses: crytic/[email protected]
16 changes: 0 additions & 16 deletions .github/workflows/slither.yml

This file was deleted.

18 changes: 9 additions & 9 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,22 @@ name: Testing
on:
- pull_request

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
strategy:
matrix:
node-version:
- 18.x
os:
- ubuntu-latest
runs-on: ${{ matrix.os }}
runs-on: blacksmith-2vcpu-ubuntu-2204

steps:
- uses: actions/checkout@v4

- name: Install Node.js
uses: actions/setup-node@v3
uses: useblacksmith/setup-node@v5
with:
node-version: ${{ matrix.node-version }}
node-version: 18.x
cache: 'npm'

- name: Install Dependencies
run: npm ci
Expand Down
5 changes: 0 additions & 5 deletions contracts/InterchainTokenFactory.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
pragma solidity ^0.8.0;

import { AddressBytes } from '@axelar-network/axelar-gmp-sdk-solidity/contracts/libs/AddressBytes.sol';
import { SafeTokenTransfer, SafeTokenTransferFrom, SafeTokenCall } from '@axelar-network/axelar-gmp-sdk-solidity/contracts/libs/SafeTransfer.sol';
import { Multicall } from '@axelar-network/axelar-gmp-sdk-solidity/contracts/utils/Multicall.sol';
import { Upgradable } from '@axelar-network/axelar-gmp-sdk-solidity/contracts/upgradable/Upgradable.sol';
import { IAxelarGateway } from '@axelar-network/axelar-gmp-sdk-solidity/contracts/interfaces/IAxelarGateway.sol';
Expand All @@ -19,11 +18,7 @@ import { IInterchainToken } from './interfaces/IInterchainToken.sol';
* @notice This contract is responsible for deploying new interchain tokens and managing their token managers.
*/
contract InterchainTokenFactory is IInterchainTokenFactory, ITokenManagerType, Multicall, Upgradable {
using AddressBytes for bytes;
using AddressBytes for address;
using SafeTokenTransfer for IInterchainToken;
using SafeTokenTransferFrom for IInterchainToken;
using SafeTokenCall for IInterchainToken;

IInterchainTokenService public immutable interchainTokenService;
bytes32 public immutable chainNameHash;
Expand Down
7 changes: 1 addition & 6 deletions contracts/InterchainTokenService.sol
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@ import { IAxelarGasService } from '@axelar-network/axelar-gmp-sdk-solidity/contr
import { IAxelarGateway } from '@axelar-network/axelar-gmp-sdk-solidity/contracts/interfaces/IAxelarGateway.sol';
import { ExpressExecutorTracker } from '@axelar-network/axelar-gmp-sdk-solidity/contracts/express/ExpressExecutorTracker.sol';
import { Upgradable } from '@axelar-network/axelar-gmp-sdk-solidity/contracts/upgradable/Upgradable.sol';
import { SafeTokenTransferFrom, SafeTokenCall } from '@axelar-network/axelar-gmp-sdk-solidity/contracts/libs/SafeTransfer.sol';
import { Create3Address } from '@axelar-network/axelar-gmp-sdk-solidity/contracts/deploy/Create3Address.sol';

Check warning on line 10 in contracts/InterchainTokenService.sol

View workflow job for this annotation

GitHub Actions / lint

imported name Create3Address is not used
import { AddressBytes } from '@axelar-network/axelar-gmp-sdk-solidity/contracts/libs/AddressBytes.sol';
import { StringToBytes32, Bytes32ToString } from '@axelar-network/axelar-gmp-sdk-solidity/contracts/libs/Bytes32String.sol';
import { Multicall } from '@axelar-network/axelar-gmp-sdk-solidity/contracts/utils/Multicall.sol';
import { Pausable } from '@axelar-network/axelar-gmp-sdk-solidity/contracts/utils/Pausable.sol';
import { InterchainAddressTracker } from '@axelar-network/axelar-gmp-sdk-solidity/contracts/utils/InterchainAddressTracker.sol';
Expand Down Expand Up @@ -44,12 +43,8 @@ contract InterchainTokenService is
InterchainAddressTracker,
IInterchainTokenService
{
using StringToBytes32 for string;
using Bytes32ToString for bytes32;
using AddressBytes for bytes;
using AddressBytes for address;
using SafeTokenTransferFrom for IERC20;
using SafeTokenCall for IERC20;

IAxelarGateway public immutable gateway;
IAxelarGasService public immutable gasService;
Expand Down
Loading

0 comments on commit 52c75e6

Please sign in to comment.