Skip to main content

alberta-buck-contracts

Compiled ABI and bytecode for the Alberta Buck contracts: the BUCK token (Buck), the insured asset NFT (BuckCredit), the on-chain PID controller (BuckKControllerDirect), the identity accumulator (IdentityRegistry) and the Poseidon hashers it takes, the Notes pool (Notes) with its verifier adapters and Groth16 verifiers, the two baskets, and the simulation helpers.

Unaudited prototype software for a monetary system. These contracts have never been audited. They are published so the research and simulations can be reproduced and built on -- not so they can be deployed with other people's money behind them.

The Groth16 verifiers come from a DEVELOPMENT trusted setup

Until v1.0.0, every Groth16 verifier in this package -- the batch-mint verifiers, the spend verifier, the two folded deposit gates and the B1 membership verifier -- comes from a development trusted setup. The setup scripts contribute fixed entropy that is published in the repository (scripts/snark/setup*.sh), so the toxic waste is public: anyone can forge a proof that these verifiers accept.

That is deliberate, and it is why they are published at all: with the toxic waste in hand, a simulation can model what an attacker holding a forged proof could do, and test the defences around the proof -- the batch signatures, the issuer bindings, the nullifier set -- which a production setup would make impossible to exercise. It also means none of this may guard anything of value. A production release will run a multi-party ceremony, and will say so.

The bundle carries the same warning as data: every verifier's artifact has "trustedSetup": "development", and the compiler record's trustedSetup names the setup and lists the verifiers.

Nothing here has an address

No Alberta Buck contract is deployed at a fixed address, on any chain. Every BUCK world deploys fresh into its own EVM and learns the addresses from the deploy receipts. What this package ships is (abi, bytecode) pairs.

deployments() is therefore empty. It exists so that publishing real addresses later is not a breaking change to the package's shape.

Install

pip install alberta-buck-contracts

Use

from buck_contracts import artifact, compiler, names

abi, bytecode = artifact("Buck")
print(names())                 # every contract this package ships
print(compiler()["solc"])      # the exact compiler that produced them

buck_core.artifacts.load_artifact (in alberta-buck-core) falls back to this package when no repository checkout is reachable, which is what lets an installed alberta-buck deploy a world.

Standing up Notes

Notes takes its verifiers through adapters, so a world deploys the adapters, registers a verifier per batch size, and wires them in:

  • MintVerifierAdapter / MintVerifierA2Adapter -- registerVerifier(n, address) for each MintBatchN{n}Groth16Verifier / MintBatchA2N{n}Groth16Verifier (n = 1, 2, 4, 8, 16, 32); a batch is verified by the verifier registered for its size.
  • SpendVerifierAdapter(SpendGroth16Verifier), then Notes(buck, mintAdapter, spendAdapter, governance).
  • setIdentityRegistry, setA2MintVerifier(a2Adapter), setIdentityMembershipVerifier(IdentityMembershipB1VerifierAdapter()) and setDepositFoldVerifier(DepositFoldVerifierAdapter(registry)). These two adapters deploy their own verifiers in their constructors; the verifier artifacts are shipped too, for direct use and inspection.
  • The registry's accumulator hashes with PoseidonT3 and PoseidonT4 (setIdentityPoseidon, setIdentityPoseidonT4).

alberta_buck/sim/notes_stack.py in the repository is the reference wiring. Every artifact fits EIP-170: the one verifier snarkjs emits too large (MintBatchA2N32Groth16Verifier, 228 public inputs) ships in a table-driven form with the same verification key.

What is not here

A BUCK world also needs Uniswap and WETH. Those are not bundled: they belong to Uniswap, under their own licences, and you should take them from their own published packages. Asking this package for one of them raises a KeyError naming the package to install instead; compiler()["external"] lists the mapping.

Reproducibility

The build is pinned and verified rather than assumed. compiler() records the exact solc version, the optimizer settings, the EVM version, the git commit, and a sha256 over the bundle. The build asserts that every artifact was produced by the pinned compiler, and that only contracts we own are included.

The same bundle is published to npm as alberta-buck-contracts.

Licence

GPL-3.0-or-later, matching the Solidity sources. See LICENSING.md.

Repository: https://github.com/alberta-buck/alberta-buck

Release files for alberta-buck-contracts 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for alberta-buck-contracts 0.2.0
File Size Uploaded
alberta_buck_contracts-0.2.0.tar.gz 296.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for alberta-buck-contracts 0.2.0
File Interpreter ABI Platform
alberta_buck_contracts-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 597.0 kB

Release files / alberta_buck_contracts-0.2.0.tar.gz

Download URL alberta_buck_contracts-0.2.0.tar.gz
Size 296.9 kB
Tags Source
SHA-256 checksum
How to use checksums
c3c3ab2de3d81018bc659734378dc6b2778cdbf650706e56796a45969e64a2e7
BLAKE2b-256 checksum
How to use checksums
b28a21fa54d250560d6f736915bf706568e1a2bd6dfc230f5ece0d72f23a7c2b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 25, 2026.

Transparency log

Release files / alberta_buck_contracts-0.2.0-py3-none-any.whl

Download URL alberta_buck_contracts-0.2.0-py3-none-any.whl
Size 300.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
466346b6159b0d631c00d6bc1ad82189fc0b1a884fb722cfa2c73084f7932c0c
BLAKE2b-256 checksum
How to use checksums
c54bb7ac451a1241ae0e146867510715880a5a09d672da0d8c1aab04a8a6d30b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 25, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page