Skip to content

Commit

Permalink
Initial Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Quantumplation committed Feb 1, 2024
0 parents commit 60f0d43
Show file tree
Hide file tree
Showing 6 changed files with 1,099 additions and 0 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Build

on:
workflow_dispatch:
push:
branches: ["main"]
tags: ["v*.*.*"]
pull_request:
branches: ["main"]

permissions:
contents: write

jobs:
build:
runs-on: macos-latest
steps:
- name: 📥 Checkout repository
uses: actions/checkout@v3

- name: 🧰 Download Typst
uses: robinraju/[email protected]
with:
repository: typst/typst
tag: v0.9.0
fileName: typst-x86_64-apple-darwin.tar.xz

- name: 🧰 Extract Typst
shell: bash
run: |
sudo mkdir /usr/local/typst
sudo tar -xzf typst-x86_64-apple-darwin.tar.xz -C /usr/local/typst/
rm -f typst-x86_64-apple-darwin.tar.xz
echo "/usr/local/typst/typst-x86_64-apple-darwin" >> $GITHUB_PATH
- name: 📘 Compile
shell: bash
run: ./build.sh

- name: 📦 Upload artifacts
uses: actions/upload-artifact@v3
with:
name: docs
path: outputs/*.pdf

- name: 🚀 Release
uses: softprops/action-gh-release@v1
if: github.ref_type == 'tag'
with:
name: ${{ github.ref_name }}
tag_name: ${{ github.ref_name }}
files: "src/*.pdf"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
**/*.pdf
16 changes: 16 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
ROOT="$(cd "$(dirname "$0")/" && pwd)"

mkdir -p ${ROOT}/outputs

# loop through all the files in the directory:
for file in ${ROOT}/**/*.typ
do
filename=$(basename -- "${file}")
directory=$(basename $(dirname -- "${file}"))
filename="${filename%.*}"
if [ "$directory" = "templates" ]; then
continue
fi
# run the compiler
typst compile --root ${ROOT} --format=pdf "$file" "${ROOT}/outputs/${directory}.pdf"
done
257 changes: 257 additions & 0 deletions example/example.typ
Original file line number Diff line number Diff line change
@@ -0,0 +1,257 @@
#import "../template/audit.typ": *

#show: report.with(
client: "Example",
title: "Example audit report",
repo: "https://github.com/SundaeSwap-finance/sundae-audits",
date: "2023-01-15",
authors: (
(
name: "Pi Lanningham",
display: text(1.3em, $pi$) + " Lanningham",
),
),
about: [
Example Labs is a fake company used for this template report.
],
disclaimer: [
This is an example, what do you need disclaimed?
],
links: [
#link("https://google.com", "Google")
]
)

= Audit Manifest

Please find below the list of pinned software dependencies and files that were covered by the audit.

#software_versions(
items: (
(
name: "Staking Contracts",
version: "0.0.0",
commit: "7122206784b1ea36214393e7775aadc96928a141",
),
)
)

#files_audited(
items: (
(
file: "validators/a.ak",
hash: "9916fb18fb1e6c3015270a17841acd5a8e4414e760c910bbe7e7a0fd72ed2fd3",
),
(
file: "validators/b.ak",
hash: "d14562ce6a6e190cd3074304457a2d76e3a26e3ac059bfa0918748d0d0299db8",
),
(
file: "validators/c.ak",
hash: "9311884bc97ce154eacb7c25b06f118169d058fe57862da1d3ea6e46d33a7baf",
),
(
file: "validators/d.ak",
hash: "e5d7a0ebd84f7905076e0dbc2b60d6bec5de7559fdcf792aeacb4c638bd33a19",
),
(
file: "lib/.../e.ak",
hash: "099cf3ffd3b468455d6dcbace6dec6c3386f53d23f07aa35c4090bda4acf4d50",
),
(
file: "lib/.../f.ak",
hash: "5af9ebd593cbbcbf087a00bc9f9a8daad2d47014bdca0cfc3c80e858bcac3c02",
),
)
)

#parameters(
(
(
name: "delay",
value: "1500",
),
)
)

#artifacts(
(
(
name: "abc",
type: "minting",
hash: "41429696a31fccad078830c182fec39d0df34ec5526df3420fdb4ac132f81843",
),
)
)

#pagebreak()

= Specification

This is a protocol that seeks to do a thing.

#pagebreak()

== Detailed Specification

=== Definitions

#defn("A thing",
[A thing, that references another #ref("Other thing")]
)
#defn("Other thing",
[Another thing, referred to by #ref("A thing")],
)

#pagebreak()

=== Requirements

+ The protocol must do a thing.
+ It must do it well.
+ It must do it fast.

#transaction(
"Some Transaction",
inputs: (
(
name: "Sample UTXO",
address: "Pool Contract",
value: (
ada: 10,
),
datum: (
a: 123,
b: "xyz",
)
),
(
name: "Other UTXO",
value: (
ada: 1,
"Access NFT": 1,
),
datum: (
a: 123,
b: "xyz",
)
),
(
name: "Third UTXO",
address: "Order Contract",
value: (
ada: "N",
INDY: "M",
LQ: "P"
),
datum: (
a: 123,
b: "xyz",
)
),
(
name: "Fourth UTXO",
reference: true,
value: (
ada: 1000000,
),
datum: (
a: 123,
b: "xyz",
c: 123,
)
),

(
name: "Fifth UTXO",
reference: true,
value: (
ada: 1000000,
WMT: "X"
),
datum: (
a: 123,
b: "xyz",
c: 123,
d: "xyz"
)
),
),
outputs: (
(
name: "Output UTXO",
address: "Pool Contract",
value: (
ada: 2000010,
"Access NFT": 1,
),
datum: (
a: 123,
b: "xyz",
)
),
(
name: "Other Output",
address: "Order Contract",
value: (
ada: "N",
INDY: "M",
LQ: "P",
),
datum: (
a: 123,
b: "xyz",
)
),
(
name: "Third Output",
address: "Order Contract",
value: (
ada: 1,
WMT: "X"
),
datum: (
a: 123,
b: "xyz",
)
),
),
signatures: (
"User A",
"User B",
),
certificates: (
"Withdraw Stake A",
),
notes: [ABC! tada!]
)

= Findings Summary

#findings(prefix: "EX", items: (
(
title: [Some Minor Inconvenience],
severity: "Minor",
category: "Incentives",
description: [
This is a small issue.
],
recommendation: [
Maybe fix #ref("Other thing")
],
resolution: (
comment: "This isn't actually an issue"
)
),
(
title: [Major issue],
severity: "Major",
category: "Access",
description: [
Some major issue with a the protocol.
],
recommendation: [
Fix it.
],
),
))
Loading

0 comments on commit 60f0d43

Please sign in to comment.