Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .cursor/rules/solidity-example-project.mdc
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ alwaysApply: false
pragma solidity 0.8.24;

import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";

import { AccessControlExtUpgradeable } from "./base/AccessControlExtUpgradeable.sol";
import { PausableExtUpgradeable } from "./base/PausableExtUpgradeable.sol";
Expand Down Expand Up @@ -72,6 +73,10 @@ contract Blueprint is
Versionable,
IBlueprint
{
// ------------------ Types ----------------------------------- //

using SafeERC20 for IERC20;

// ------------------ Constants ------------------------------- //

/// @dev The kind of operation that is deposit.
Expand Down Expand Up @@ -260,9 +265,9 @@ contract Blueprint is
);

if (operationKind == OPERATION_KIND_DEPOSIT) {
IERC20($.token).transferFrom(account, treasury, amount);
IERC20($.token).safeTransferFrom(account, treasury, amount);
} else {
IERC20($.token).transferFrom(treasury, account, amount);
IERC20($.token).safeTransferFrom(treasury, account, amount);
}
}

Expand Down
4 changes: 2 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
SOLIDITY_VERSION = 0.8.24
OPTIMIZER_ENABLED = true
OPTIMIZER_RUNS = 1000
GAS_REPORTER_ENABLED = false
CONTRACT_SIZER_ENABLED = false
HARDHAT_MNEMONIC = test test test test test test test test test test test junk
GANACHE_RPC = http://127.0.0.1:7545
GANACHE_MNEMONIC = test test test test test test test test test test test junk
STRATUS_PORT = 3000
STRATUS_MNEMONIC = test test test test test test test test test test test junk
CW_TESTNET_RPC =
CW_TESTNET_PK =
CW_TESTNET_MNEMONIC =
Expand Down
104 changes: 0 additions & 104 deletions .eslintrc.json

This file was deleted.

16 changes: 16 additions & 0 deletions .github/workflows/branch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: branch

on:
push:
branches: ["main"]
pull_request:
branches: ["*"]

jobs:
call-branch-testing:
permissions:
contents: read
uses: cloudwalk/brlc-dev-ex/.github/workflows/branch.yml@main
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
GHA_PAT: ${{ secrets.GHA_PAT }}
34 changes: 0 additions & 34 deletions .github/workflows/build.yml

This file was deleted.

38 changes: 0 additions & 38 deletions .github/workflows/coverage.yml

This file was deleted.

34 changes: 0 additions & 34 deletions .github/workflows/test.yml

This file was deleted.

29 changes: 0 additions & 29 deletions .prettierrc

This file was deleted.

24 changes: 1 addition & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,30 +12,8 @@
This repository contains auxiliary smart contracts required for service operations.

## Project Setup
1. Clone the repo.
2. Create the `.env` file based on the `.env.example` one:
* Windows:
```sh
copy .env.example .env
```
* MacOS/Linux:
```sh
cp .env.example .env
```
3. Optionally update the settings in the newly created `.env` file (e.g., Solidity version, number of optimization runs, network RPC URLs, private keys (PK) for networks, etc.).

## Build and test

```sh
# Install all dependencies
npm install

# Compile all contracts
npx hardhat compile

# Run all tests
npx hardhat test
```
Read [Documentation](https://github.com/cloudwalk/brlc-dev-ex/blob/main/docs/DEVELOPMENT.md).

## Licensing

Expand Down
3 changes: 3 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/* eslint @typescript-eslint/no-require-imports: "off" */

module.exports = require("@cloudwalk/eslint-config-smart-contracts");
Loading