-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
34 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,12 +40,13 @@ python /app/src/luce/manage.py migrate | |
# echo "[email protected] | provider" | ||
# echo "[email protected] | requester" | ||
|
||
# python /app/scripts/init_luce_registry.py | ||
|
||
|
||
echo "🚀 Access the LUCE backend API on http://localhost:8000" | ||
|
||
|
||
# Start Django on port 8000 | ||
python /app/src/luce/manage.py runserver 0.0.0.0:8000 | ||
|
||
|
||
|
||
# curl -H "Authorization: XXX" -H "Content-Type: application/json" -X POST http://localhost8000/admin/deployRegistry |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import os | ||
from brownie import accounts | ||
from brownie import project, network | ||
import django | ||
|
||
|
||
|
||
p = project.load("brownie", name="BrownieProject") | ||
p.load_config() | ||
network.connect('luce') | ||
|
||
from brownie.project.BrownieProject import LUCERegistry | ||
|
||
DJANGO_SETTINGS_MODULE = 'lucehome.settings' | ||
os.environ['DJANGO_SETTINGS_MODULE'] = DJANGO_SETTINGS_MODULE | ||
django.setup() | ||
|
||
# account[0] as the administrator | ||
contract = LUCERegistry.deploy({'from': accounts[0]}) | ||
receipt = contract.tx | ||
if receipt.status == 1: | ||
contract_address = receipt.contract_address | ||
print("Deploy LUCERegistry contract succeeded") | ||
else: | ||
print("Deploy LUCERegistry contract failed") | ||
|
||
print(contract_address) | ||
print(receipt.status) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters