mirror of
https://github.com/darkrenaissance/darkfi.git
synced 2026-01-10 07:08:05 -05:00
18 lines
276 B
Plaintext
18 lines
276 B
Plaintext
constant "Arith" {}
|
|
|
|
contract "Arith" {
|
|
Base a,
|
|
Base b,
|
|
}
|
|
|
|
circuit "Arith" {
|
|
sum = base_add(a, b);
|
|
constrain_instance(sum);
|
|
|
|
product = base_mul(a, b);
|
|
constrain_instance(product);
|
|
|
|
difference = base_sub(a, b);
|
|
constrain_instance(difference);
|
|
}
|