Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2024 10 24 deps #962

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
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
12 changes: 0 additions & 12 deletions .devcontainer.json

This file was deleted.

1 change: 1 addition & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@
[submodule "lib/rain.interpreter"]
path = lib/rain.interpreter
url = https://github.com/rainlanguage/rain.interpreter
branch = 3.x
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ resolver = "2"

[workspace.package]
edition = "2021"
license = "CAL-1.0"
license = "LicenseRef-DCL-1.0"
version = "0.0.0-alpha.0"
homepage = "https://github.com/rainprotocol/rain.orderbook"

Expand Down
1 change: 1 addition & 0 deletions LICENSE
189 changes: 189 additions & 0 deletions LICENSES/LicenseRef-DCL-1.0.txt

Large diffs are not rendered by default.

48 changes: 45 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# rain.orderbook

Docs at https://rainprotocol.github.io/foundry.template

## Run Tauri App for local development
- Prepare the tauri build: `./prep-tauri.sh`
- Copy `tauri-app/.env.example` to `tauri-ap/.env` and fill in values
Expand All @@ -22,7 +20,7 @@ deploy in the matrix.

## Generating Rust Types from Graphql

**NOTICE** The crates and tauri app are currently expecting a subgraph compatible with the schema in `crates/subgraph/schema/orderbook.graphql`.
**NOTICE** The crates and tauri app are currently expecting a subgraph compatible with the schema in `crates/subgraph/schema/orderbook.graphql`.
When this project is migrated to use the subgraph schema defined in `subgraph/schema/graphql`, the command below will change.

1. Run the following commands to generate Rust types from GraphQL Queries
Expand Down Expand Up @@ -65,3 +63,47 @@ Run the following from the repo root, outside the nix shell, to generate Typescr
```bash
nix run .#ob-tauri-prelude
```

## Dev stuff

### Local environment & CI

Uses nixos.

Install `nix develop` - https://nixos.org/download.html.

Run `nix develop` in this repo to drop into the shell. Please ONLY use the nix
version of `foundry` for development, to ensure versions are all compatible.

Read the `flake.nix` file to find some additional commands included for dev and
CI usage.

## Legal stuff

Everything is under DecentraLicense 1.0 (DCL-1.0) which can be found in `LICENSES/`.

This is basically `CAL-1.0` which is an open source license
https://opensource.org/license/cal-1-0

The non-legal summary of DCL-1.0 is that the source is open, as expected, but
also user data in the systems that this code runs on must also be made available
to those users as relevant, and that private keys remain private.

Roughly it's "not your keys, not your coins" aware, as close as we could get in
legalese.

This is the default situation on permissionless blockchains, so shouldn't require
any additional effort by dev-users to adhere to the license terms.

This repo is REUSE 3.2 compliant https://reuse.software/spec-3.2/ and compatible
with `reuse` tooling (also available in the nix shell here).

```
nix develop -c rainix-sol-legal
```

## Contributions

Contributions are welcome **under the same license** as above.

Contributors agree and warrant that their contributions are compliant.
33 changes: 33 additions & 0 deletions REUSE.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
version = 1

[[annotations]]
path = [
".gas-snapshot",
".github/workflows/**/",
".gitignore",
".gitmodules",
"README.md",
"flake.lock",
"flake.nix",
"foundry.toml",
"slither.config.json",
"REUSE.toml",
"typeshare.toml",
"tsconfig.json",
"test-js/**/",
"tauri-app/**/",
"subgraph/**/",
"scripts/**/",
"crates/**/",
".eslintignore",
".eslintrc.js",
".vscode/**/",
"Cargo.lock",
"Cargo.toml",
"package-lock.json",
"package.json",
"pointers.sh",
"prep-tauri.sh",
]
SPDX-FileCopyrightText = "Copyright (c) 2020 thedavidmeister"
SPDX-License-Identifier = "LicenseRef-DCL-1.0"
12 changes: 6 additions & 6 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ remappings = [
"rain.interpreter/=lib/rain.interpreter/src/",
"rain.metadata/=lib/rain.interpreter/lib/rain.metadata/src/",
"rain.interpreter.interface/=lib/rain.orderbook.interface/lib/rain.interpreter.interface/src/",
"rain.intorastring/=lib/rain.interpreter/lib/rain.intorastring/",
"rain.intorastring/=lib/rain.interpreter/lib/rain.intorastring/src/",
"rain.sol.codegen/=lib/rain.interpreter/lib/rain.sol.codegen/src/",
"rain.solmem/=lib/rain.orderbook.interface/lib/rain.interpreter.interface/lib/rain.solmem/src",
]
Expand Down
2 changes: 1 addition & 1 deletion lib/rain.interpreter
Submodule rain.interpreter updated 306 files
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "Provides RainLanguage Orderbook rust crates' functionalities in typescript through wasm bindgen",
"version": "0.0.1-alpha.4",
"author": "Rain Language",
"license": "CAL-1.0",
"license": "LicenseRef-DCL-1.0",
"repository": {
"type": "git",
"url": "https://github.com/rainlanguage/rain.orderbook.git"
Expand Down
3 changes: 2 additions & 1 deletion script/BuildAuthoringMeta.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: CAL
// SPDX-License-Identifier: LicenseRef-DCL-1.0
// SPDX-FileCopyrightText: Copyright (c) 2020 thedavidmeister
pragma solidity =0.8.25;

import {Script} from "forge-std/Script.sol";
Expand Down
6 changes: 4 additions & 2 deletions script/BuildPointers.sol
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
// SPDX-License-Identifier: CAL
// SPDX-License-Identifier: LicenseRef-DCL-1.0
// SPDX-FileCopyrightText: Copyright (c) 2020 thedavidmeister
pragma solidity =0.8.25;

import {Script} from "forge-std/Script.sol";
import {LibCodeGen} from "rain.sol.codegen/lib/LibCodeGen.sol";
import {LibFs} from "rain.sol.codegen/lib/LibFs.sol";
import {OrderBookSubParser} from "src/concrete/parser/OrderBookSubParser.sol";
import {LibOrderBookSubParser, EXTERN_PARSE_META_BUILD_DEPTH} from "src/lib/LibOrderBookSubParser.sol";
import {LibGenParseMeta} from "rain.interpreter.interface/lib/codegen/LibGenParseMeta.sol";

contract BuildPointers is Script {
function buildOrderBookSubParserPointers() internal {
Expand All @@ -19,7 +21,7 @@ contract BuildPointers is Script {
name,
string.concat(
LibCodeGen.describedByMetaHashConstantString(vm, name),
LibCodeGen.parseMetaConstantString(
LibGenParseMeta.parseMetaConstantString(
vm, LibOrderBookSubParser.authoringMetaV2(), EXTERN_PARSE_META_BUILD_DEPTH
),
LibCodeGen.subParserWordParsersConstantString(vm, subParser),
Expand Down
3 changes: 2 additions & 1 deletion script/Deploy.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: CAL
// SPDX-License-Identifier: LicenseRef-DCL-1.0
// SPDX-FileCopyrightText: Copyright (c) 2020 thedavidmeister
pragma solidity =0.8.25;

import {Script} from "forge-std/Script.sol";
Expand Down
3 changes: 2 additions & 1 deletion src/abstract/OrderBookV4ArbCommon.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: CAL
// SPDX-License-Identifier: LicenseRef-DCL-1.0
// SPDX-FileCopyrightText: Copyright (c) 2020 thedavidmeister
pragma solidity ^0.8.19;

import {EvaluableV3, SignedContextV1} from "rain.interpreter.interface/interface/IInterpreterCallerV3.sol";
Expand Down
3 changes: 2 additions & 1 deletion src/abstract/OrderBookV4ArbOrderTaker.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: CAL
// SPDX-License-Identifier: LicenseRef-DCL-1.0
// SPDX-FileCopyrightText: Copyright (c) 2020 thedavidmeister
pragma solidity ^0.8.19;

import {ERC165, IERC165} from "openzeppelin-contracts/contracts/utils/introspection/ERC165.sol";
Expand Down
3 changes: 2 additions & 1 deletion src/abstract/OrderBookV4FlashBorrower.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: CAL
// SPDX-License-Identifier: LicenseRef-DCL-1.0
// SPDX-FileCopyrightText: Copyright (c) 2020 thedavidmeister
pragma solidity ^0.8.19;

import {ERC165, IERC165} from "openzeppelin-contracts/contracts/utils/introspection/ERC165.sol";
Expand Down
3 changes: 2 additions & 1 deletion src/abstract/OrderBookV4FlashLender.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: CAL
// SPDX-License-Identifier: LicenseRef-DCL-1.0
// SPDX-FileCopyrightText: Copyright (c) 2020 thedavidmeister
pragma solidity ^0.8.19;

import {ERC165, IERC165} from "openzeppelin-contracts/contracts/utils/introspection/ERC165.sol";
Expand Down
3 changes: 2 additions & 1 deletion src/concrete/arb/GenericPoolOrderBookV4ArbOrderTaker.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: CAL
// SPDX-License-Identifier: LicenseRef-DCL-1.0
// SPDX-FileCopyrightText: Copyright (c) 2020 thedavidmeister
pragma solidity =0.8.25;

import {IERC20} from "openzeppelin-contracts/contracts/token/ERC20/IERC20.sol";
Expand Down
3 changes: 2 additions & 1 deletion src/concrete/arb/GenericPoolOrderBookV4FlashBorrower.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: CAL
// SPDX-License-Identifier: LicenseRef-DCL-1.0
// SPDX-FileCopyrightText: Copyright (c) 2020 thedavidmeister
pragma solidity =0.8.25;

import {IERC3156FlashLender} from "rain.orderbook.interface/interface/ierc3156/IERC3156FlashLender.sol";
Expand Down
3 changes: 2 additions & 1 deletion src/concrete/arb/RouteProcessorOrderBookV4ArbOrderTaker.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: CAL
// SPDX-License-Identifier: LicenseRef-DCL-1.0
// SPDX-FileCopyrightText: Copyright (c) 2020 thedavidmeister
pragma solidity =0.8.25;

import {IRouteProcessor} from "sushixswap-v2/src/interfaces/IRouteProcessor.sol";
Expand Down
3 changes: 2 additions & 1 deletion src/concrete/ob/OrderBook.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: CAL
// SPDX-License-Identifier: LicenseRef-DCL-1.0
// SPDX-FileCopyrightText: Copyright (c) 2020 thedavidmeister
pragma solidity =0.8.25;

import {Math} from "openzeppelin-contracts/contracts/utils/math/Math.sol";
Expand Down
3 changes: 2 additions & 1 deletion src/concrete/parser/OrderBookSubParser.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: CAL
// SPDX-License-Identifier: LicenseRef-DCL-1.0
// SPDX-FileCopyrightText: Copyright (c) 2020 thedavidmeister
pragma solidity =0.8.25;

import {
Expand Down
3 changes: 2 additions & 1 deletion src/generated/OrderBookSubParser.pointers.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
// needs the pointers file to exist so that it can compile, and the pointers
// file needs the contract to exist so that it can be compiled.

// SPDX-License-Identifier: CAL
// SPDX-License-Identifier: LicenseRef-DCL-1.0
// SPDX-FileCopyrightText: Copyright (c) 2020 thedavidmeister
pragma solidity =0.8.25;

/// @dev Hash of the known bytecode.
Expand Down
3 changes: 2 additions & 1 deletion src/lib/LibOrder.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: CAL
// SPDX-License-Identifier: LicenseRef-DCL-1.0
// SPDX-FileCopyrightText: Copyright (c) 2020 thedavidmeister
pragma solidity ^0.8.18;

import {OrderV3} from "rain.orderbook.interface/interface/IOrderBookV4.sol";
Expand Down
3 changes: 2 additions & 1 deletion src/lib/LibOrderBook.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: CAL
// SPDX-License-Identifier: LicenseRef-DCL-1.0
// SPDX-FileCopyrightText: Copyright (c) 2020 thedavidmeister
pragma solidity ^0.8.19;

import {
Expand Down
3 changes: 2 additions & 1 deletion src/lib/LibOrderBookArb.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: CAL
// SPDX-License-Identifier: LicenseRef-DCL-1.0
// SPDX-FileCopyrightText: Copyright (c) 2020 thedavidmeister
pragma solidity ^0.8.19;

import {TaskV1} from "rain.orderbook.interface/interface/IOrderBookV4.sol";
Expand Down
3 changes: 2 additions & 1 deletion src/lib/LibOrderBookSubParser.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: CAL
// SPDX-License-Identifier: LicenseRef-DCL-1.0
// SPDX-FileCopyrightText: Copyright (c) 2020 thedavidmeister
pragma solidity ^0.8.19;

import {AuthoringMetaV2, Operand} from "rain.interpreter.interface/interface/ISubParserV3.sol";
Expand Down
2 changes: 1 addition & 1 deletion subgraph/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "Subgraph setup",
"version": "1.0.0",
"author": "rainlanguage",
"license": "CAL",
"license": "LicenseRef-DCL-1.0",
"scripts": {
"test": "graph test -d"
},
Expand Down
1 change: 1 addition & 0 deletions tauri-app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "tauri-app",
"version": "0.0.1",
"license": "LicenseRef-DCL-1.0",
"private": true,
"scripts": {
"dev": "vite dev",
Expand Down
2 changes: 1 addition & 1 deletion tauri-app/src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "tauri-app"
version = "0.0.0"
description = "raindex"
edition = "2021"
license = "CAL-1.0"
license = "LicenseRef-DCL-1.0"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand Down
3 changes: 2 additions & 1 deletion test/abstract/OrderBookV4ArbOrderTaker.context.t.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: CAL
// SPDX-License-Identifier: LicenseRef-DCL-1.0
// SPDX-FileCopyrightText: Copyright (c) 2020 thedavidmeister
pragma solidity =0.8.25;

import {
Expand Down
3 changes: 2 additions & 1 deletion test/abstract/OrderBookV4ArbOrderTaker.ierc165.t.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: CAL
// SPDX-License-Identifier: LicenseRef-DCL-1.0
// SPDX-FileCopyrightText: Copyright (c) 2020 thedavidmeister
pragma solidity =0.8.25;

import {Test} from "forge-std/Test.sol";
Expand Down
3 changes: 2 additions & 1 deletion test/abstract/OrderBookV4FlashBorrower.ierc165.t.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: CAL
// SPDX-License-Identifier: LicenseRef-DCL-1.0
// SPDX-FileCopyrightText: Copyright (c) 2020 thedavidmeister
pragma solidity =0.8.25;

import {Test} from "forge-std/Test.sol";
Expand Down
3 changes: 2 additions & 1 deletion test/abstract/OrderBookV4FlashLender.fee.t.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: CAL
// SPDX-License-Identifier: LicenseRef-DCL-1.0
// SPDX-FileCopyrightText: Copyright (c) 2020 thedavidmeister
pragma solidity =0.8.25;

import {OrderBookExternalMockTest} from "test/util/abstract/OrderBookExternalMockTest.sol";
Expand Down
3 changes: 2 additions & 1 deletion test/abstract/OrderBookV4FlashLender.griefRecipient.t.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: CAL
// SPDX-License-Identifier: LicenseRef-DCL-1.0
// SPDX-FileCopyrightText: Copyright (c) 2020 thedavidmeister
pragma solidity =0.8.25;

import {OrderBookExternalMockTest} from "test/util/abstract/OrderBookExternalMockTest.sol";
Expand Down
3 changes: 2 additions & 1 deletion test/abstract/OrderBookV4FlashLender.ierc165.t.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: CAL
// SPDX-License-Identifier: LicenseRef-DCL-1.0
// SPDX-FileCopyrightText: Copyright (c) 2020 thedavidmeister
pragma solidity =0.8.25;

import {Test} from "forge-std/Test.sol";
Expand Down
Loading
Loading