Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
2b16baa
chore: updated deployment scripts
Jul 13, 2026
e523c17
chore: document manual admin handoff checklist for mainnet deployment
AK-APRIORIT Jul 14, 2026
bc77b3b
chore: deployer config steps in README
AK-APRIORIT Jul 14, 2026
50ebb73
chore: removed unused scripts
AK-APRIORIT Jul 14, 2026
a72c9ac
fix: verify deploy manifest before reusing contract addresses
AK-APRIORIT Jul 14, 2026
6ac3b82
fix: make PriceOracle configuration reproducible for deploy
AK-APRIORIT Jul 14, 2026
62569e4
fix: separate Previewnet and Mainnet deployment profiles
AK-APRIORIT Jul 14, 2026
8ca647d
chore: assert each market compile target uses its own IRM
AK-APRIORIT Jul 14, 2026
ecab879
chore: add CI coverage for deployment pipeline safety guards
AK-APRIORIT Jul 14, 2026
96715dc
fix: install deploy_script deps before running pipeline wiring test
AK-APRIORIT Jul 14, 2026
26bae20
fix: mainnet deployment verification for V3.1
AK-APRIORIT Jul 16, 2026
9191bdd
fix: restore Previewnet deployment compatibility
AK-APRIORIT Jul 16, 2026
6b098d5
chore: decode Micheline address bytes for safe resume
AK-APRIORIT Jul 17, 2026
bb984a0
feat: mainnet preflight and oracle validation
AK-APRIORIT Jul 20, 2026
c0c2702
feat: harden oracle, market controls, and release builds
AK-APRIORIT Jul 21, 2026
a189f33
feat: harden market caps, oracle updates, and mainnet deployment
AK-APRIORIT Jul 23, 2026
70f1201
feat: pin Node.js 22.16.0 across environments
AK-APRIORIT Jul 23, 2026
d91db5f
chore: batch comptroller price updates into a single self-call
AK-APRIORIT Jul 24, 2026
404d72e
fix: shrink Comptroller opSize and gate CI on forged origination enve…
AK-APRIORIT Jul 30, 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
80 changes: 69 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,86 @@ on:
pull_request:
branches: ['*']

permissions:
contents: read

env:
NODE_VERSION: '22.16.0'
PYTHON_VERSION: '3.11.11'

jobs:
build_and_test_smart_contracts:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/setup-python@v2
- name: "Install SmartPy"
run: |
bash <(curl -s https://legacy.smartpy.io/cli/install.sh) --yes
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: ${{ env.NODE_VERSION }}
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: "Install verified SmartPy 0.16.0"
run: tools/install-smartpy.sh
- name: "Audit SmartPy runtime dependencies"
run: npm audit --omit=dev --prefix tools/smartpy
- name: "Version Check"
run: |
~/smartpy-cli/SmartPy.sh --version
test "$(~/smartpy-cli/SmartPy.sh --version)" = "SmartPy Version: 0.16.0"
- name: "Run tests"
run: |
bash contracts/tests/run_tests.sh ~/smartpy-cli/SmartPy.sh
- name: "Check per-market IRM wiring"
run: |
python3 deploy/compile_targets/tests/test_irm_wiring.py
- name: "Install deploy script dependencies (needed by test_deploy_pipeline_wiring.py, which requires deploy_script/util.js, and by test_operation_size.py, which forges originations with @taquito/local-forging)"
working-directory: deploy/deploy_script
run: |
npm ci
- name: "Check deploy pipeline wiring (compile targets, IRM config source, manifest path parity)"
run: |
python3 deploy/compile_targets/tests/test_deploy_pipeline_wiring.py
- name: "Check mainnet governance payload"
run: |
python3 deploy/compile_targets/tests/test_mainnet_governance_payload.py
- name: "Check contract origination sizes stay within safety threshold"
run: |
python3 deploy/compile_targets/tests/test_operation_size.py ~/smartpy-cli/SmartPy.sh
- name: "Verify reproducible contract compilation"
env:
COMPILED_HASHES_OUTPUT: compiled-contract-hashes.json
run: |
python3 deploy/compile_targets/tests/test_reproducible_build.py ~/smartpy-cli/SmartPy.sh
- name: "Publish compiled contract hashes"
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: compiled-contract-hashes
path: compiled-contract-hashes.json
if-no-files-found: error
retention-days: 30

build_and_test_deploy_scripts:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: "Install deploy script dependencies"
working-directory: deploy/deploy_script
run: |
npm ci
- name: "Run deploy script guard unit tests (offline, no network access)"
working-directory: deploy/deploy_script
run: |
npm test

build_and_test_typescript:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: "Build and test utility package"
working-directory: src/util
run: |
Expand Down
1 change: 1 addition & 0 deletions .node-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
22.16.0
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
22.16.0
277 changes: 269 additions & 8 deletions README.md

Large diffs are not rendered by default.

33 changes: 17 additions & 16 deletions TezFinBuild/deploy_result/deploy.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
{
"OriginatorAddress": "tz1RESHvJAfmQCXCAD3ubNmVtac788pnN1oL",
"Governance": "KT1NF6DKX5giazRTzPtEuNX1npkVcaoQkvK2",
"PriceOracle": "KT1B74ywpG3nX2F3ZgpYi4MnsyuoYyQtQTAn",
"USDTPriceOracle": "KT1B74ywpG3nX2F3ZgpYi4MnsyuoYyQtQTAn",
"TezFinOracle": "KT1LDtNKDnpziwSrmSfx3xCbs7nBMg7VFp4m",
"Comptroller": "KT1DiWBT6RBC97iWrvLHRzKL7AWQKorBiuRG",
"CFA12_IRM": "KT1Vzf3fXVBry4TDxWAfYzsn6ZPyMroMKUdW",
"CXTZ_IRM": "KT1B7zvU7EXmPBHazHhtajHaw5swFFxWCEfd",
"CFA2_IRM": "KT1Q2BBtfT9obGMAZ32L6esSjm8FG9NWiBb9",
"USDtz": "KT1LN4LPSqTMS7Sd2CJw4bbDGRkMv2t68Fy9",
"USDt": "KT1XnTn74bUtxHfDtBmm2bGZAQfhPbvKWR8o",
"tzBTC": "KT1PWx2mnDueood7fEmfbBDKx1D9BAnnXitn",
"CUSDt": "KT1HCRJhfqmWKRJtZXzvTkY4iisfuR4w6pkB",
"CUSDtz": "KT1WQM7wj64GHCndwV8REccQ6N4tqZ3uRNqs",
"CXTZ": "KT1MCXxbtS62tk4CUxv29BHnqTBtvsFFGzBm",
"CtzBTC": "KT19gZac3vqV3ZeMJbhMX7Xy8kcocKK4Tbz1"
"OriginatorAddress": "tz1XTWbfhyWK9xmPAa6TyQUSv437JFgZDzgA",
"chainId": "NetXY2oPPzkxUW1",
"network": "https://michelson.previewnet.tezosx.nomadic-labs.com",
"PriceOracle": "KT1SyeZTavgHjmk1zBBJZ1aVx5F5NH27shJG",
"USDt": "KT1WWKLMc2aAanNxvYR3GcLpArTnYG6sbzzp",
"USDtz": "KT1NyMkX6ddVdZJmQgM826EApDLQanvuJ4LG",
"tzBTC": "KT1N8UrMt8bwJTphb5NSpFhB7GDFiYbzJFLz",
"TezFinOracle": "KT1V4ArruDLGTjGYC5Xgd9habQ2SpDtrmkDF",
"Governance": "KT1Wq7uJeiXXociunW4LqQZzdNvM7QYbtVEN",
"Comptroller": "KT1N8XU2pe51z22aMbRQya9YhPmCytyX2Met",
"CFA12_IRM": "KT1BntKHTG4So6RCT4CHHSXP1xNGLVj6krXE",
"CFA2_IRM": "KT1QT1P8rHnoirQquBV1cmTaWivgGXFxhYax",
"CXTZ_IRM": "KT1LEGHhjvLyun3E5zwBNsJRmTtCzCjVpUk6",
"CtzBTC_IRM": "KT1XkH9xQQnjGheHJ5eHzzVBTj4A119iR8yC",
"CUSDt": "KT1Cugpw5mGTQydYt2dCw2CUxsPsnGSdt7R9",
"CXTZ": "KT1DKYqH3v6AnQ9YTnCyJ44CnCvSG2pUogHH",
"CtzBTC": "KT1A45Vx1fwxwjBBfxzXBWmTkqEvnB2udq7J"
}
8 changes: 8 additions & 0 deletions TezFinBuild/deploy_result/deploy.mainnet.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"OriginatorAddress": "tz1XTWbfhyWK9xmPAa6TyQUSv437JFgZDzgA",
"chainId": "NetXdQprcVkpaWU",
"network": "https://rpc.tzkt.io/mainnet",
"PriceOracle": null,
"USDt": "KT1XnTn74bUtxHfDtBmm2bGZAQfhPbvKWR8o",
"tzBTC": "KT1PWx2mnDueood7fEmfbBDKx1D9BAnnXitn"
}
7 changes: 7 additions & 0 deletions contracts/CToken.py
Original file line number Diff line number Diff line change
Expand Up @@ -546,6 +546,13 @@ def getTotalSupply(self, params):
sp.set_type(params, sp.TUnit)
sp.result(self.data.totalSupply)

@sp.onchain_view()
def marketTotals(self, params):
sp.set_type(params, sp.TUnit)
suppliedUnderlying = self.mulScalarTruncate(
self.makeExp(self.exchangeRateStoredImpl()), self.data.totalSupply)
sp.result(sp.pair(suppliedUnderlying, self.data.totalBorrows))

"""
Get the current allowance from `owner` for `spender`

Expand Down
Loading
Loading