Skip to content

Commit

Permalink
Multi-operations support: add_private, add_public, mul_public.
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre-André Long committed Jul 15, 2024
1 parent de33c2a commit 9ed9779
Show file tree
Hide file tree
Showing 51 changed files with 4,483 additions and 3,911 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ For a program to custody private data, it must import **`data_custody_protocol.a
1. To custody data, it can:
- Call `data_custody_protocol.aleo/custody_data_as_program((data_view_key as field), threshold, ...)`
- Send any records to `(data_view_key * 522678458525321116977504528531602186870683848189190546523208313015552693483group) as address`
2. It can then call `data_custody_protocol.aleo/request_data_as_program` to initiate a data request.
2. It can then call `data_custody_protocol.aleo/request_open_as_program` to initiate a data request.
3. Validator bots automatically call `dcp_core_protocol.aleo/process_request_as_validator` to accept the data request.
4. `data_custody_protocol.aleo/assert_completed_as_program` can then be used by the program to check if data was effectively transmitted.

Expand Down
37 changes: 11 additions & 26 deletions development/build.sh
Original file line number Diff line number Diff line change
@@ -1,52 +1,37 @@
cd ./programs/dcp_withdraw_requests
leo build
cd ./programs/dcp_open_requests
leo build --network testnet --endpoint "https://api.explorer.aleo.org/v1"
cd ../..

cd ./programs/dcp_validator_shares
leo build
leo build --network testnet --endpoint "https://api.explorer.aleo.org/v1"
cd ../..

cd ./programs/data_custody_protocol
leo build
leo build --network testnet --endpoint "https://api.explorer.aleo.org/v1"
cd ../..

cd ./programs/dcp_reconstruct_secret
leo build
leo build --network testnet --endpoint "https://api.explorer.aleo.org/v1"
cd ../..

cd ./programs/dcp_reconstruct_secret_offchain
leo build
leo build --network testnet --endpoint "https://api.explorer.aleo.org/v1"
cd ../..

cd ./programs/dcp_hash_custody_offchain
leo build
cd ../../../..
leo build --network testnet --endpoint "https://api.explorer.aleo.org/v1"
cd ../..

cd examples/nft_marketplace/programs/arc721_example
leo build
leo build --network testnet --endpoint "https://api.explorer.aleo.org/v1"
cd ../../../..

cd examples/nft_marketplace/programs/marketplace_example
leo build
leo build --network testnet --endpoint "https://api.explorer.aleo.org/v1"
cd ../../../..


# In './programs/dcp_core_protocol/src/main.leo' Uncomment transition :
# transition process_request_as_validator(
# This is due to: https://github.com/ProvableHQ/leo/issues/28192

while true; do
read -p "In './programs/dcp_core_protocol/src/main.leo', uncomment transition 'process_request_as_validator'. Is it done (yes/no)?" yn
case $yn in
[Yy]* ) make install; break;;
[Nn]* ) exit;;
* ) echo "Please answer yes or no.";;
esac
done


cd programs/dcp_core_protocol
leo build --non-recursive
leo build --network testnet --endpoint "https://api.explorer.aleo.org/v1"
cd ../..

cd ./utils/snarkvm-scalar-to-viewkey
Expand Down
2 changes: 1 addition & 1 deletion development/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ deploy_program () {
sleep $SLEEP_BETWEEN_TX;
}

deploy_program "dcp_withdraw_requests";
deploy_program "dcp_open_requests";
deploy_program "dcp_validator_shares";
deploy_program "dcp_fee_management";
deploy_program "dcp_core_protocol";
Expand Down
Loading

0 comments on commit 9ed9779

Please sign in to comment.