Skip to content

Commit

Permalink
Merge pull request #3 from BibliothecaDAO/devx
Browse files Browse the repository at this point in the history
Convert contracts to cairo
  • Loading branch information
credence0x authored May 18, 2024
2 parents ee3ee4c + f7f6822 commit 12aa5bd
Show file tree
Hide file tree
Showing 19 changed files with 962 additions and 998 deletions.
51 changes: 26 additions & 25 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,35 @@
name: test
name: test-contracts

on: pull_request

env:
FOUNDRY_PROFILE: ci
on:
push:
branches:
- main
pull_request: {}

jobs:
check:
strategy:
fail-fast: true

name: Foundry project
check-fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v3
- uses: software-mansion/setup-scarb@v1
with:
submodules: recursive
scarb-version: "2.6.4"
- run: cd contracts && scarb fmt --check

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
check-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: software-mansion/setup-scarb@v1
with:
version: nightly
scarb-version: "2.6.4"
- run: cd contracts && scarb build

- name: Run Forge build
run: |
forge --version
forge build --via-ir --sizes
id: build

- name: Run Forge tests
run: |
forge test -vvv --via-ir
id: test
check-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: software-mansion/setup-scarb@v1
with:
scarb-version: "2.6.4"
- run: cd contracts && scarb test
6 changes: 0 additions & 6 deletions .gitmodules

This file was deleted.

1 change: 1 addition & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
scarb 2.6.4
1 change: 1 addition & 0 deletions contracts/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
target
14 changes: 14 additions & 0 deletions contracts/Scarb.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Code generated by scarb DO NOT EDIT.
version = 1

[[package]]
name = "openzeppelin"
version = "0.12.0"
source = "git+https://github.com/openzeppelin/cairo-contracts?rev=e190e55#e190e55ce689809dd09b6ed9fef167fa35bcc19c"

[[package]]
name = "strealm"
version = "0.1.0"
dependencies = [
"openzeppelin",
]
14 changes: 14 additions & 0 deletions contracts/Scarb.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[package]
name = "strealm"
version = "0.1.0"

# See more keys and their definitions at https://docs.swmansion.com/scarb/docs/reference/manifest.html

[dependencies]
openzeppelin = { git = "https://github.com/openzeppelin/cairo-contracts", rev = "e190e55" }


[[target.starknet-contract]]

[tool.fmt]
sort-module-level-items = true
3 changes: 3 additions & 0 deletions contracts/src/components/erc721/extensions.cairo
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
mod erc721_votes;

use erc721_votes::ERC721VotesComponent;
Loading

0 comments on commit 12aa5bd

Please sign in to comment.