Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
bb0b87b
Restructure loan and bridge examples and add shared utils
ohyung1287 Aug 26, 2026
3c996a4
Reduce tutorial friction
ohyung1287 Aug 26, 2026
3e41b2b
Add verification tooling, contract tests, and CI hardening.
ohyung1287 Aug 27, 2026
e81fbc5
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Aug 27, 2026
969ef0c
Fix CI: resolve @gluwa/usc-contracts from npm package.
ohyung1287 Aug 27, 2026
dd68c1c
fix package path for CI error
ohyung1287 Aug 27, 2026
67cbf59
Fix outstanding issues
ohyung1287 Aug 28, 2026
3fcd471
Use PAT to access private repo for CI
ohyung1287 Aug 28, 2026
b913dc2
Fix CI by installing asc-contracts from GitHub main with read PAT
ohyung1287 Aug 31, 2026
bec471d
Fix CI install of private asc-contracts via actions/checkout
ohyung1287 Aug 31, 2026
6f74487
Fix example CI: enable via-IR for ASCMinter deploy
ohyung1287 Aug 31, 2026
3586bc1
Ignore vendor/asc-contracts in eslint and typecheck
ohyung1287 Aug 31, 2026
a9d57f3
Use npm package and remove PAT to access asc-contracts github repo di…
ohyung1287 Aug 31, 2026
c82ed8c
fix linter ignore path with correct package
ohyung1287 Aug 31, 2026
7866316
Renaming md file to make it standardized
ohyung1287 Aug 31, 2026
32aa966
Ignore bot-blocked npm and Google faucet URLs in lychee.
ohyung1287 Sep 1, 2026
b7ff961
Overlap fixes from #103, #104, #105
ohyung1287 Sep 1, 2026
c6720ed
Regenerate ASCMinter ABI with solc output format expected by CI.
ohyung1287 Sep 1, 2026
5c88f09
Fix CI E2E race and lychee excludes for bot-blocked URLs.
ohyung1287 Sep 1, 2026
a2e364b
Fix MegaLinter lychee failures caused by exclude patterns in YAML.
ohyung1287 Sep 1, 2026
887ce52
Enable loan-flow in examples-devnet CI and install forge-std.
ohyung1287 Sep 1, 2026
cd097c9
First round changes
BradleyOlson64 Sep 1, 2026
3731b20
Fix loan-flow Sepolia deploy funding and payer wallet.
ohyung1287 Sep 1, 2026
de01645
Done with bridge, started loan
BradleyOlson64 Sep 1, 2026
78630f7
Fixes CI log-range limits and attestation waits limit
ohyung1287 Sep 1, 2026
bbadf26
Loan flow complete
BradleyOlson64 Sep 1, 2026
cbc5a7e
Merge branch 'feature/SMC-1796' of github.com:gluwa/attestcoin-protoc…
BradleyOlson64 Sep 1, 2026
d113b56
Fix readme links
BradleyOlson64 Sep 1, 2026
6fd4b11
Fixed more readme links
BradleyOlson64 Sep 1, 2026
bf5ad30
Proof submission without Sepolia eth_getLogs polling to avoid timeout…
ohyung1287 Sep 1, 2026
f3d5dd9
Avoid duplicate fund proof race between worker and fund_loan script i…
ohyung1287 Sep 1, 2026
66889b3
Stabilize loan-flow CI: drop worker, verify on-chain status
ohyung1287 Sep 1, 2026
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
38 changes: 0 additions & 38 deletions .env.devnet.example

This file was deleted.

38 changes: 0 additions & 38 deletions .env.example

This file was deleted.

1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ module.exports = {
// "eslint-plugin-react",
'@typescript-eslint',
],
ignorePatterns: ['vendor/**', 'node_modules/**', 'dist/**', 'lib/**', 'out/**'],
rules: {
'@typescript-eslint/adjacent-overload-signatures': 'error',
'@typescript-eslint/array-type': [
Expand Down
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
bridge/contracts/abi/*.json text eol=lf
loan/contracts/abi/*.json text eol=lf
shared/contracts/abi/*.json text eol=lf
2 changes: 1 addition & 1 deletion .github/install-solidity-compiler.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@

set -euo pipefail

curl -L https://github.com/ethereum/solidity/releases/download/v0.8.29/solc-static-linux > /usr/bin/solc
curl -L https://github.com/ethereum/solidity/releases/download/v0.8.30/solc-static-linux > /usr/bin/solc

chmod a+x /usr/bin/solc
24 changes: 17 additions & 7 deletions .github/workflows/bridge-offchain-worker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,14 @@ jobs:
cache: 'yarn'
- run: npm install -g yarn

- name: Install dependencies
run: yarn install --ignore-engines

- name: Setup
id: setup
env:
FOUNDRY_VIA_IR: "true"
run: |
yarn install

SOURCE_CHAIN_RPC_URL="${{ steps.env.outputs.source_chain_rpc_url }}"

echo "INFO: generate a new wallet"
Expand Down Expand Up @@ -198,7 +201,7 @@ jobs:
--broadcast \
--rpc-url "$SOURCE_CHAIN_RPC_URL" \
--private-key "$WALLET_PK" \
contracts/sol/TestERC20.sol:TestERC20 2>&1)
shared/contracts/sol/TestERC20.sol:TestERC20 2>&1)
echo "$OUTPUT"
SOURCE_CHAIN_CONTRACT_ADDRESS=$(echo "$OUTPUT" | grep "Deployed to:" | cut -f2 -d: | tr -d " ")
echo "source_chain_contract_address=$SOURCE_CHAIN_CONTRACT_ADDRESS" >> "$GITHUB_OUTPUT"
Expand All @@ -208,18 +211,25 @@ jobs:
--broadcast \
--rpc-url "$CREDITCOIN_RPC_URL" \
--private-key "$WALLET_PK" \
node_modules/@gluwa/usc-contracts/contracts/decoding/EvmV1Decoder.sol:EvmV1Decoder 2>&1)
node_modules/@gluwa/asc-contracts/contracts/common/EvmV1Decoder.sol:EvmV1Decoder 2>&1)
echo "$OUTPUT"
DECODER_CONTRACT_ADDRESS=$(echo "$OUTPUT" | grep "Deployed to:" | cut -f2 -d: | tr -d " ")

echo "INFO: deploy ASCMinter.sol to Creditcoin chain"
set +e
OUTPUT=$(~/.foundry/bin/forge create \
--broadcast \
--rpc-url "$CREDITCOIN_RPC_URL" \
--private-key "$WALLET_PK" \
--libraries "node_modules/@gluwa/usc-contracts/contracts/decoding/EvmV1Decoder.sol:EvmV1Decoder:$DECODER_CONTRACT_ADDRESS" \
contracts/sol/ASCMinter.sol:ASCMinter 2>&1)
--libraries "node_modules/@gluwa/asc-contracts/contracts/common/EvmV1Decoder.sol:EvmV1Decoder:$DECODER_CONTRACT_ADDRESS" \
bridge/contracts/sol/ASCMinter.sol:ASCMinter 2>&1)
STATUS=$?
set -e
echo "$OUTPUT"
if [ "$STATUS" -ne 0 ]; then
echo "ERROR: ASCMinter forge create failed (exit $STATUS)"
exit "$STATUS"
fi
ASC_MINTER_CONTRACT_ADDRESS=$(echo "$OUTPUT" | grep "Deployed to:" | cut -f2 -d: | tr -d " ")
echo "asc_minter_contract_address=$ASC_MINTER_CONTRACT_ADDRESS" >> "$GITHUB_OUTPUT"

Expand All @@ -228,7 +238,7 @@ jobs:
--broadcast \
--rpc-url "$CREDITCOIN_RPC_URL" \
--private-key "$WALLET_PK" \
contracts/sol/BridgeTestToken.sol:BridgeTestToken \
bridge/contracts/sol/BridgeTestToken.sol:BridgeTestToken \
--constructor-args "$ASC_MINTER_CONTRACT_ADDRESS" 2>&1)
echo "$OUTPUT"
ASC_MINTABLE_TOKEN=$(echo "$OUTPUT" | grep "Deployed to:" | cut -f2 -d: | tr -d " ")
Expand Down
26 changes: 18 additions & 8 deletions .github/workflows/custom-contracts-bridging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,14 @@ jobs:
cache: 'yarn'
- run: npm install -g yarn

- name: Install dependencies
run: yarn install --ignore-engines

- name: Setup
id: setup
env:
FOUNDRY_VIA_IR: "true"
run: |
yarn install

SOURCE_CHAIN_RPC_URL="${{ steps.env.outputs.source_chain_rpc_url }}"

echo "INFO: generate a new wallet"
Expand Down Expand Up @@ -198,7 +201,7 @@ jobs:
--broadcast \
--rpc-url "$SOURCE_CHAIN_RPC_URL" \
--private-key "$WALLET_PK" \
contracts/sol/TestERC20.sol:TestERC20 2>&1)
shared/contracts/sol/TestERC20.sol:TestERC20 2>&1)
echo "$OUTPUT"
SOURCE_CHAIN_CONTRACT_ADDRESS=$(echo "$OUTPUT" | grep "Deployed to:" | cut -f2 -d: | tr -d " ")
echo "source_chain_contract_address=$SOURCE_CHAIN_CONTRACT_ADDRESS" >> "$GITHUB_OUTPUT"
Expand All @@ -208,22 +211,29 @@ jobs:
--broadcast \
--rpc-url "$CREDITCOIN_RPC_URL" \
--private-key "$WALLET_PK" \
node_modules/@gluwa/usc-contracts/contracts/decoding/EvmV1Decoder.sol:EvmV1Decoder 2>&1)
node_modules/@gluwa/asc-contracts/contracts/common/EvmV1Decoder.sol:EvmV1Decoder 2>&1)
echo "$OUTPUT"
DECODER_CONTRACT_ADDRESS=$(echo "$OUTPUT" | grep "Deployed to:" | cut -f2 -d: | tr -d " ")

echo "INFO: Modify ASCMinter.sol to mint 2x"
sed -i "s/ASCMintableToken(wrappedTokenAddress).mint(burntFrom, burntValue);/ASCMintableToken(wrappedTokenAddress).mint(burntFrom, burntValue * 2);/" contracts/sol/ASCMinter.sol
sed -i "s/ASCMintableToken(wrappedTokenAddress).mint(burntFrom, burntValue);/ASCMintableToken(wrappedTokenAddress).mint(burntFrom, burntValue * 2);/" bridge/contracts/sol/ASCMinter.sol
git diff

echo "INFO: deploy ASCMinter.sol to Creditcoin chain"
set +e
OUTPUT=$(~/.foundry/bin/forge create \
--broadcast \
--rpc-url "$CREDITCOIN_RPC_URL" \
--private-key "$WALLET_PK" \
--libraries "node_modules/@gluwa/usc-contracts/contracts/decoding/EvmV1Decoder.sol:EvmV1Decoder:$DECODER_CONTRACT_ADDRESS" \
contracts/sol/ASCMinter.sol:ASCMinter 2>&1)
--libraries "node_modules/@gluwa/asc-contracts/contracts/common/EvmV1Decoder.sol:EvmV1Decoder:$DECODER_CONTRACT_ADDRESS" \
bridge/contracts/sol/ASCMinter.sol:ASCMinter 2>&1)
STATUS=$?
set -e
echo "$OUTPUT"
if [ "$STATUS" -ne 0 ]; then
echo "ERROR: ASCMinter forge create failed (exit $STATUS)"
exit "$STATUS"
fi
ASC_MINTER_CONTRACT_ADDRESS=$(echo "$OUTPUT" | grep "Deployed to:" | cut -f2 -d: | tr -d " ")
echo "asc_minter_contract_address=$ASC_MINTER_CONTRACT_ADDRESS" >> "$GITHUB_OUTPUT"

Expand All @@ -232,7 +242,7 @@ jobs:
--broadcast \
--rpc-url "$CREDITCOIN_RPC_URL" \
--private-key "$WALLET_PK" \
contracts/sol/BridgeTestToken.sol:BridgeTestToken \
bridge/contracts/sol/BridgeTestToken.sol:BridgeTestToken \
--constructor-args "$ASC_MINTER_CONTRACT_ADDRESS" 2>&1)
echo "$OUTPUT"
ASC_MINTABLE_TOKEN=$(echo "$OUTPUT" | grep "Deployed to:" | cut -f2 -d: | tr -d " ")
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/examples-devnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,7 @@ jobs:
secrets: inherit

loan-flow:
if: false
# chain examples b/c they use the same wallet and we get
# replacement transaction underpriced and/or nonce errors
# Run after other devnet examples (shared wallet) to avoid nonce collisions.
needs: bridge-offchain-worker
uses: ./.github/workflows/loan-flow.yml
with:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,24 +25,28 @@ jobs:
with:
source_chain_kind: "anvil"
asc_kind: "local"
secrets: inherit

custom-contracts-bridging:
needs: build
uses: ./.github/workflows/custom-contracts-bridging.yml
with:
source_chain_kind: "anvil"
asc_kind: "local"
secrets: inherit

bridge-offchain-worker:
needs: build
uses: ./.github/workflows/bridge-offchain-worker.yml
with:
source_chain_kind: "anvil"
asc_kind: "local"
secrets: inherit

loan-flow:
needs: build
uses: ./.github/workflows/loan-flow.yml
with:
source_chain_kind: "anvil"
asc_kind: "local"
secrets: inherit
25 changes: 18 additions & 7 deletions .github/workflows/hello-bridge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,15 @@ jobs:
cache: 'yarn'
- run: npm install -g yarn

- name: Install dependencies
run: yarn install --ignore-engines

- name: Setup
id: setup
env:
# ASCMinter + package ASCBase need via-IR (stack too deep otherwise).
FOUNDRY_VIA_IR: "true"
run: |
yarn install

SOURCE_CHAIN_RPC_URL="${{ steps.env.outputs.source_chain_rpc_url }}"

echo "INFO: generate a new wallet"
Expand Down Expand Up @@ -198,7 +202,7 @@ jobs:
--broadcast \
--rpc-url "$SOURCE_CHAIN_RPC_URL" \
--private-key ${{ steps.env.outputs.source_chain_private_key }} \
contracts/sol/TestERC20.sol:TestERC20 2>&1)
shared/contracts/sol/TestERC20.sol:TestERC20 2>&1)
echo "$OUTPUT"
SOURCE_CHAIN_CONTRACT_ADDRESS=$(echo "$OUTPUT" | grep "Deployed to:" | cut -f2 -d: | tr -d " ")
echo "source_chain_contract_address=$SOURCE_CHAIN_CONTRACT_ADDRESS" >> "$GITHUB_OUTPUT"
Expand All @@ -208,18 +212,25 @@ jobs:
--broadcast \
--rpc-url "$CREDITCOIN_RPC_URL" \
--private-key ${{ steps.env.outputs.execution_chain_private_key }} \
node_modules/@gluwa/usc-contracts/contracts/decoding/EvmV1Decoder.sol:EvmV1Decoder 2>&1)
node_modules/@gluwa/asc-contracts/contracts/common/EvmV1Decoder.sol:EvmV1Decoder 2>&1)
echo "$OUTPUT"
DECODER_CONTRACT_ADDRESS=$(echo "$OUTPUT" | grep "Deployed to:" | cut -f2 -d: | tr -d " ")

echo "INFO: deploy ASCMinter.sol to Creditcoin chain"
set +e
OUTPUT=$(~/.foundry/bin/forge create \
--broadcast \
--rpc-url "$CREDITCOIN_RPC_URL" \
--private-key ${{ steps.env.outputs.execution_chain_private_key }} \
--libraries "node_modules/@gluwa/usc-contracts/contracts/decoding/EvmV1Decoder.sol:EvmV1Decoder:$DECODER_CONTRACT_ADDRESS" \
contracts/sol/ASCMinter.sol:ASCMinter 2>&1)
--libraries "node_modules/@gluwa/asc-contracts/contracts/common/EvmV1Decoder.sol:EvmV1Decoder:$DECODER_CONTRACT_ADDRESS" \
bridge/contracts/sol/ASCMinter.sol:ASCMinter 2>&1)
STATUS=$?
set -e
echo "$OUTPUT"
if [ "$STATUS" -ne 0 ]; then
echo "ERROR: ASCMinter forge create failed (exit $STATUS)"
exit "$STATUS"
fi
ASC_MINTER_CONTRACT_ADDRESS=$(echo "$OUTPUT" | grep "Deployed to:" | cut -f2 -d: | tr -d " ")
echo "minter_contract_address=$ASC_MINTER_CONTRACT_ADDRESS" >> "$GITHUB_OUTPUT"

Expand All @@ -228,7 +239,7 @@ jobs:
--broadcast \
--rpc-url "$CREDITCOIN_RPC_URL" \
--private-key "$WALLET_PK" \
contracts/sol/BridgeTestToken.sol:BridgeTestToken \
bridge/contracts/sol/BridgeTestToken.sol:BridgeTestToken \
--constructor-args "$ASC_MINTER_CONTRACT_ADDRESS" 2>&1)
echo "$OUTPUT"
ASC_MINTABLE_TOKEN=$(echo "$OUTPUT" | grep "Deployed to:" | cut -f2 -d: | tr -d " ")
Expand Down
10 changes: 4 additions & 6 deletions .github/workflows/javascript-checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,11 @@ jobs:

echo "$HOME/.foundry/bin" >> "$GITHUB_PATH"

- name: Install forge-std
run: git clone --depth 1 https://github.com/foundry-rs/forge-std lib/forge-std

- name: Install dependencies
run: |
if [ -f yarn.lock ]; then
yarn install
else
npm clean-install
fi
run: yarn install --ignore-engines

- name: Execute command ${{ matrix.command }}
run: |
Expand Down
Loading
Loading