Skip to content
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
27 changes: 23 additions & 4 deletions .github/workflows/contract-size.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,15 @@ jobs:
path: target
key: ${{ runner.os }}-contract-size-${{ hashFiles('Cargo.lock') }}

- name: Build contract WASM
run: |
set -e
cargo build --target wasm32-unknown-unknown --release \
-p comebackhere-compliance \
-p comebackhere-invoice \
-p comebackhere-treasury \
-p comebackhere-settlement-workflow

- name: Install wasm-opt
run: sudo apt-get update && sudo apt-get install -y binaryen

Expand Down Expand Up @@ -74,10 +83,12 @@ jobs:
for wasm in target/wasm32-unknown-unknown/release/*.wasm; do
name=$(basename "$wasm" .wasm)
size=$(stat --format=%s "$wasm")
# treasury gets a temporarily raised threshold while the Result-refactor
# series (#386/#387/#388) lands; revert to MAX_CONTRACT_SIZE once complete.
# treasury carries a temporarily raised threshold: first for the
# Result-refactor series (#386/#387/#388), then for the admin
# signer/threshold-change timelock (#526). Revert to
# MAX_CONTRACT_SIZE once a size-reduction pass brings it back under.
if [ "$name" = "treasury" ]; then
limit=75000
limit=78000
else
limit="$MAX_CONTRACT_SIZE"
fi
Expand All @@ -98,10 +109,18 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Load version pins
shell: bash
run: |
set -a
source .github/versions.env
set +a
echo "RUST_VERSION=$RUST_VERSION" >> "$GITHUB_ENV"

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: "1.95.0"
toolchain: ${{ env.RUST_VERSION }}
targets: wasm32-unknown-unknown

- name: Cache cargo build
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/no-std-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,18 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Load version pins
shell: bash
run: |
set -a
source .github/versions.env
set +a
echo "RUST_VERSION=$RUST_VERSION" >> "$GITHUB_ENV"

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: "1.95.0"
toolchain: ${{ env.RUST_VERSION }}
targets: wasm32-unknown-unknown

- name: Cache Rust dependencies
Expand Down
20 changes: 18 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,18 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Load version pins
shell: bash
run: |
set -a
source .github/versions.env
set +a
echo "RUST_VERSION=$RUST_VERSION" >> "$GITHUB_ENV"

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: "1.95.0"
toolchain: ${{ env.RUST_VERSION }}
targets: wasm32-unknown-unknown

- name: Cache Rust dependencies
Expand Down Expand Up @@ -150,10 +158,18 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Load version pins
shell: bash
run: |
set -a
source .github/versions.env
set +a
echo "RUST_VERSION=$RUST_VERSION" >> "$GITHUB_ENV"

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: "1.95.0"
toolchain: ${{ env.RUST_VERSION }}
targets: wasm32-unknown-unknown

- name: Cache Rust dependencies
Expand Down
12 changes: 10 additions & 2 deletions .github/workflows/testnet-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ on:

env:
CARGO_TERM_COLOR: always
STELLAR_CLI_VERSION: "22.8.2"

jobs:
deploy-testnet:
Expand All @@ -20,6 +19,15 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Load version pins
shell: bash
run: |
set -a
source .github/versions.env
set +a
echo "RUST_VERSION=$RUST_VERSION" >> "$GITHUB_ENV"
echo "STELLAR_CLI_VERSION=$STELLAR_CLI_VERSION" >> "$GITHUB_ENV"

- name: Validate confirmation input
run: |
CONFIRM_INPUT="${{ inputs.confirm }}"
Expand All @@ -33,7 +41,7 @@ jobs:
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: "1.95.0"
toolchain: ${{ env.RUST_VERSION }}
targets: wasm32-unknown-unknown

- name: Install stellar-cli build dependencies
Expand Down
17 changes: 2 additions & 15 deletions Cargo.lock

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

95 changes: 28 additions & 67 deletions abis/compliance.json
Original file line number Diff line number Diff line change
@@ -1,70 +1,31 @@
{
"name": "compliance",
"version": "1.0.0",
"functions": [
{
"name": "validate_invoice",
"inputs": ["invoice_id"],
"outputs": ["validation_result"],
"description": "Validates an invoice against business rules"
},
{
"name": "check_compliance",
"inputs": ["invoice_id", "customer_id"],
"outputs": ["compliance_status"],
"description": "Checks if an invoice complies with regulatory requirements"
},
{
"name": "generate_compliance_report",
"inputs": ["period_start", "period_end"],
"outputs": ["report"],
"description": "Generates a compliance report for a period"
},
{
"name": "flag_non_compliant",
"inputs": ["invoice_id"],
"outputs": ["flagged_invoices"],
"description": "Flags invoices that violate compliance rules"
},
{
"name": "audit_log_entry",
"inputs": ["action", "entity_id", "timestamp"],
"outputs": ["audit_record"],
"description": "Creates an audit log entry"
}
"accept_admin",
"address_status",
"allow_address",
"allow_address_until",
"allow_address_with_tier",
"block_address",
"block_address_until",
"bulk_allow_addresses",
"bulk_block_addresses",
"bulk_check_addresses",
"clear_address",
"export_snapshot",
"export_snapshot_page",
"get_address_tier",
"get_allow_expiry",
"get_block_reason",
"get_schema_version",
"initialize",
"is_allowed",
"is_blocked",
"pause",
"revoke_allow",
"set_operator",
"sweep_expired",
"transfer_admin",
"unpause"
],
"events": [
{
"name": "compliance_check_passed",
"payload": {
"invoice_id": "string",
"rules_checked": "array[string]",
"passed": "boolean"
}
},
{
"name": "compliance_check_failed",
"payload": {
"invoice_id": "string",
"violations": "array[string]",
"severity": "string"
}
},
{
"name": "non_compliant_invoice_flagged",
"payload": {
"invoice_id": "string",
"violations": "array[string]",
"action": "flag"
}
},
{
"name": "audit_log_created",
"payload": {
"action": "string",
"entity_id": "string",
"timestamp": "timestamp"
}
}
]
}
"events": []
}
Loading
Loading