alberta-buck-contracts 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,72 @@
1
+ # alberta-buck-contracts
2
+
3
+ Compiled ABI and bytecode for the Alberta Buck contracts: the BUCK token
4
+ (`Buck`), the insured asset NFT (`BuckCredit`), the on-chain PID controller
5
+ (`BuckKControllerDirect`), the identity accumulator (`IdentityRegistry`), the
6
+ two baskets, and the simulation helpers.
7
+
8
+ **Unaudited prototype software for a monetary system.** These contracts have
9
+ never been audited. They are published so the research and simulations can be
10
+ reproduced and built on -- not so they can be deployed with other people's
11
+ money behind them.
12
+
13
+ ## Nothing here has an address
14
+
15
+ No Alberta Buck contract is deployed at a fixed address, on any chain. Every
16
+ BUCK world -- the Python simulation, the JavaScript simulation, the browser
17
+ demos, the test suites -- deploys fresh into its own EVM and learns the
18
+ addresses from the deploy receipts. What this package ships is `(abi,
19
+ bytecode)` pairs.
20
+
21
+ `deployments` is therefore empty. It exists so that publishing real addresses
22
+ later is not a breaking change to the package's shape.
23
+
24
+ ## Install
25
+
26
+ ```sh
27
+ npm install alberta-buck-contracts
28
+ ```
29
+
30
+ ```sh
31
+ pip install alberta-buck-contracts
32
+ ```
33
+
34
+ ## Use
35
+
36
+ ```js
37
+ import { artifact, compiler } from "alberta-buck-contracts";
38
+
39
+ const { abi, bytecode } = artifact("Buck");
40
+ console.log(compiler.solc); // the exact compiler that produced it
41
+ ```
42
+
43
+ ```python
44
+ from buck_contracts import artifact, compiler
45
+
46
+ abi, bytecode = artifact("Buck")
47
+ print(compiler()["solc"])
48
+ ```
49
+
50
+ ## What is not here
51
+
52
+ A BUCK world also needs Uniswap and WETH. Those are **not** bundled: they
53
+ belong to Uniswap, under their own licences, and you should take them from
54
+ their own published packages -- `@uniswap/v3-core`, `@uniswap/v2-periphery`,
55
+ `@uniswap/universal-router`. Asking this package for one of them raises an
56
+ error naming the package to install instead. `compiler.external` lists the
57
+ mapping.
58
+
59
+ ## Reproducibility
60
+
61
+ The build is pinned and verified rather than assumed. `compiler.json` records
62
+ the exact solc version, the optimizer settings, the EVM version, the git
63
+ commit, and a sha256 over the bundle. The build asserts that every artifact
64
+ was produced by the pinned compiler, and that only contracts we own are
65
+ included.
66
+
67
+ ## Licence
68
+
69
+ GPL-3.0-or-later, matching the Solidity sources. See
70
+ [LICENSING.md](https://github.com/alberta-buck/alberta-buck/blob/master/LICENSING.md).
71
+
72
+ Repository: <https://github.com/alberta-buck/alberta-buck>
package/compiler.json ADDED
@@ -0,0 +1,17 @@
1
+ {
2
+ "solc": "0.8.28+commit.7893614a",
3
+ "viaIR": true,
4
+ "optimizer": {
5
+ "enabled": true,
6
+ "runs": 200
7
+ },
8
+ "evmVersion": "cancun",
9
+ "commit": "98aba89c6b7f60f3183e66658eb598cfa70dde9c-dirty",
10
+ "sha256": "f164ab2dce5165cebb6a07cf6eef59b3d3650e8ada5306169b0a44a3da2a30f8",
11
+ "external": {
12
+ "UniswapV3Factory": "@uniswap/v3-core",
13
+ "UniswapV3Pool": "@uniswap/v3-core",
14
+ "WETH9": "@uniswap/v2-periphery",
15
+ "UniversalRouter": "@uniswap/universal-router"
16
+ }
17
+ }