Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
f1ed971
intial commit
devansh2712 Aug 6, 2020
c71b787
New Test Commit
devansh2712 Aug 6, 2020
55ee10f
First Draft DAO Contract (incomplete)
devansh2712 Aug 18, 2020
21eb056
DAO Contract Update
devansh2712 Aug 20, 2020
081ab8a
New Structure update
devansh2712 Aug 21, 2020
636aef2
Build Updates
devansh2712 Aug 22, 2020
3cb8ba1
Build Update
devansh2712 Aug 23, 2020
b0c292b
Added Voting functionality*
devansh2712 Aug 26, 2020
f8aa8b2
Added Voting functionality*
devansh2712 Aug 26, 2020
ec56e23
Update DAO.py
devansh2712 Aug 26, 2020
dbdabbb
Update
devansh2712 Aug 27, 2020
21ba806
Update
devansh2712 Aug 27, 2020
4f67fe7
Update
devansh2712 Aug 27, 2020
6f2ce72
Update
devansh2712 Aug 27, 2020
a4bc406
Updates
devansh2712 Aug 28, 2020
004c55b
syntax correction
devansh2712 Aug 29, 2020
67c63a0
allocation function updated
devansh2712 Aug 29, 2020
3591320
Dispute Functionality added
devansh2712 Aug 29, 2020
e92b399
Syntax Correction
devansh2712 Aug 29, 2020
31fd7cd
Syntax Correction
devansh2712 Aug 29, 2020
e2afd41
Balance Update Solution
devansh2712 Aug 29, 2020
edfcd5a
QV implementation update
devansh2712 Aug 29, 2020
ffb0de1
Added Burn and Balance Update functionality
devansh2712 Aug 30, 2020
a958f86
image update
ap-aryanpandey Aug 30, 2020
8c2b044
Update README.md
ap-aryanpandey Aug 30, 2020
6d9c534
Update README.md
ap-aryanpandey Aug 30, 2020
d2a9a6c
request function updated
devansh2712 Aug 30, 2020
e332802
Request function Updated
devansh2712 Aug 30, 2020
866e36f
Update
devansh2712 Aug 30, 2020
1cc9ae8
Testing initial
devansh2712 Aug 31, 2020
cf4d88b
Tests
devansh2712 Aug 31, 2020
dfd4a12
Test Fixes
devansh2712 Aug 31, 2020
a05ac3d
Test Updates
devansh2712 Sep 1, 2020
02d5da5
Tests
devansh2712 Sep 2, 2020
0de082a
UI Update
devansh2712 Sep 2, 2020
046f4af
UI
devansh2712 Sep 2, 2020
a47ddff
UI update
devansh2712 Sep 2, 2020
ce74d8e
UI update
devansh2712 Sep 2, 2020
b6b91b6
Front UI Update
devansh2712 Sep 3, 2020
2ef9f5e
UI Update
devansh2712 Sep 3, 2020
d5ae1d5
UI Update
devansh2712 Sep 4, 2020
8b52871
Updated UI
devansh2712 Sep 4, 2020
7d347fd
Dao Cards update
devansh2712 Sep 4, 2020
fb55362
New Build
devansh2712 Sep 5, 2020
e00e022
Update
devansh2712 Sep 5, 2020
d8fa147
UI Components
devansh2712 Sep 6, 2020
d966670
Page Update
devansh2712 Sep 6, 2020
35dc134
Home Page
devansh2712 Sep 6, 2020
5797af6
Update
devansh2712 Sep 6, 2020
2f36456
Build Update
devansh2712 Sep 6, 2020
37d6b86
UI
devansh2712 Sep 7, 2020
1ad96ec
New Build
devansh2712 Sep 7, 2020
9d79d8f
Update README.md
ap-aryanpandey Sep 7, 2020
d1bed8c
Update README.md
ap-aryanpandey Sep 7, 2020
af46820
Update README.md
ap-aryanpandey Sep 7, 2020
842afdf
Update README.md
ap-aryanpandey Sep 7, 2020
3a1bc87
Update README.md
ap-aryanpandey Sep 7, 2020
d016928
Merge branch 'UIUX'
devansh2712 Sep 9, 2020
9e5d492
Integration
devansh2712 Sep 14, 2020
78bd4a7
entry point integration
devansh2712 Sep 15, 2020
705f9e3
Component Update
devansh2712 Sep 21, 2020
643a8a5
IPFS
devansh2712 Sep 26, 2020
f90ee78
Update
devansh2712 Sep 26, 2020
85c7582
update
devansh2712 Sep 28, 2020
e0ae4ef
update
devansh2712 Sep 29, 2020
cb5b5fa
Update
devansh2712 Sep 29, 2020
f6ebd17
Update
devansh2712 Sep 30, 2020
05fce72
Update DAO.py
ap-aryanpandey Oct 1, 2020
77fc4aa
Update DAO.py
ap-aryanpandey Oct 1, 2020
acc1d77
Update DAO.py
ap-aryanpandey Oct 1, 2020
8f28bfe
Update DAO.py
ap-aryanpandey Oct 2, 2020
75614b8
Integration
ap-aryanpandey Oct 3, 2020
55d31bf
Merge branch 'master' of https://github.com/devansh2712/Tijori-tezos …
ap-aryanpandey Oct 3, 2020
f1ef284
integration update
ap-aryanpandey Oct 6, 2020
b7c67ab
ui update
ap-aryanpandey Oct 6, 2020
57f13ad
ui update
ap-aryanpandey Oct 6, 2020
272963b
ui update
ap-aryanpandey Oct 6, 2020
e864403
ui update
ap-aryanpandey Oct 7, 2020
e65b4d1
integration
ap-aryanpandey Oct 8, 2020
f113c1e
integration
ap-aryanpandey Oct 8, 2020
5c0fb3a
integration
ap-aryanpandey Oct 8, 2020
64aa393
message Fix
ap-aryanpandey Oct 8, 2020
ec45454
Add files via upload
ap-aryanpandey Oct 13, 2020
5fca4ab
Token distribution
ap-aryanpandey Oct 14, 2020
8ad630e
Merge branch 'master' of https://github.com/devansh2712/Tijori-tezos …
ap-aryanpandey Oct 14, 2020
715a5b2
Final Update
ap-aryanpandey Oct 14, 2020
188f841
DAO form update
ap-aryanpandey Oct 14, 2020
475dc16
Merge branch 'master' of https://github.com/devansh2712/Tijori-tezos …
ap-aryanpandey Oct 14, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
247 changes: 9 additions & 238 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,244 +1,15 @@
# Bundle React

<img src="bundle.png" width="100%">
<p align="center">
<h1 align= "center">TIJORI</h1>
</p>

<div align="center"><strong>Compile SmartPy code locally , Deploy in the Testnet / Local tezos node & interact with your Dapps with a front-end ready environment.</strong></div>

## Improvements :
## Architectural diagram
<img src="images/Tijori_Tezos.png">

- Included local testing environment.

- Entry-Points visualizer with Sample invocation.
## Website:
https://ap-aryanpandey.github.io/tijoriui/

- Added scripts for invocations and get-storage operation.

- Support of SmartPy Dev mode.

## Prerequisites :

- Python 3.x +
- Node v12.x +

> As soon as you clone the repo you are good to go BUILDing your first Dapp in Tezos

## Setup & Run Steps :

1. `npm install` it will install all your dependencies

2. `npm run client-install` it will install all the client dependencies i.e in React

### Now you are ready to write your SmartPy Smart Contract

This is how a Smart Contract in SmartPy looks like :

```python
import smartpy as sp

# A typical SmartPy program has the following form:

# A class of contracts
class MyContract(sp.Contract):
def __init__(self, myParameter1, myParameter2):
self.init(myParameter1 = myParameter1,
myParameter2 = myParameter2)

# An entry point, i.e., a message receiver
# (contracts react to messages)
@sp.entry_point
def myEntryPoint(self, params):
sp.verify(self.data.myParameter1 <= 123)
self.data.myParameter1 += params

# Tests
@sp.add_test(name = "Welcome")
def test():
# We define a test scenario, together with some outputs and checks
scenario = sp.test_scenario()

# We first define a contract and add it to the scenario
c1 = MyContract(12, 123)
scenario += c1

# And call some of its entry points
scenario += c1.myEntryPoint(12)
scenario += c1.myEntryPoint(13)
scenario += c1.myEntryPoint(14)
scenario += c1.myEntryPoint(50)
scenario += c1.myEntryPoint(50)
scenario += c1.myEntryPoint(50).run(valid = False) # this is expected to fail

# Finally, we check its final storage
scenario.verify(c1.data.myParameter1 == 151)

# We can define another contract using the current state of c1
c2 = MyContract(1, c1.data.myParameter1)
scenario += c2
scenario.verify(c2.data.myParameter2 == 151)
```

**Note:** _You don't need to explicitly add the initial storage somewhere just initialize the contract class like a normal python class. We have provided you with a demo.py SmartPy contract._

Once done writing your Smart Contract inside ./contract, You have to configure the compile the config.

## Its time to compile & Deploy

3. `npm run sync` this is a syncing command. Whenever the compile_config is changed in config.json this command must be executed from the terminal. This command helps the bundle to reconfigure the compilation parameters according to the changes you have made.

4) `npm run compile` will build the contracts locally inside the folder ./contract_build.

### Editing compile_config :

You have to mention the contract name "demo.py" inside the contract name section.

Note : You have to be specific about file name, otherwise it will throw an error. We have provided an initial config which compiles the ./contract/demo.py

```json
"compile_config" : {
"contract_name": "demo.py",
"class_name": "MyContract(12, 13)"
},
```

Your code will get compiled and stored in ./contract*build folder and the two files you need to focus on is the *\_compiled.tz & \_\_storage_init.tz

#### contract_build folder will contain the following files :

- demo_compiled.tz : Michelson Code of your Smart Contract.

- demo_compiled.json : Micheline Code of your Smart Contract.

- demo.smlse : an internal expression between SmartPy and SmartML, kept for the record but not directly useful.

- demo_storage_init.tz : Micheline representation of the Storage.

- demo_types.sp : It specifies the types of the params used in the contract.

5. `npm run deploy` will deploy your contract with the params respect to your config.json

#### Configuring Deployment Parameters :

Inside the deploy_config section

- First is the Tezos node you want to use , It can be local or any remote node

* Next You can change the contract_code and contract_storage with the ones you want to deploy

- Set the parameters like amount, gas_limit, derivation_path etc

These are the pre-defined config for deployment:

```json
"deploy_config" : {
"node" : "https://testnet.tezster.tech",
"contract_code" : "demo_compiled.tz",
"contract_storage" : "demo_storage_init.tz",
"key" : "test_key1",
"amount" : 10,
"delegate_address" : "",
"fee" : 10000,
"derivation_path" : "",
"storage_limit" : 10000,
"gas_limit" : 500000
},

```

A Tezos **node** allows you deploy contract, make transaction etc.

Other Tezos Nodes :

- [https://tezos-dev.cryptonomic-infra.tech](https://tezos-dev.cryptonomic-infra.tech/)

* [https://carthagenet.SmartPy.io](https://carthagenet.smartpy.io/)

- [http://carthagenet.tezos.cryptium.ch:8732](http://carthagenet.tezos.cryptium.ch:8732/)

Conseil node is used to access conseil services and you need a API Key for that

- [https://conseil-dev.cryptonomic-infra.tech:443/](https://conseil-dev.cryptonomic-infra.tech/)

Use [https://nautilus.cloud](https://nautilus.cloud/) to access API KEY for Conseil node. Use [https://faucet.tzalpha.net/](https://faucet.tzalpha.net/) to obtain keys for any testing. You can use [http://smartpy.io/dev/faucetImporter.html](http://smartpy.io/dev/faucetImporter.html) to activate the keys obtained from faucet.

**Contract Specifications:**

- **contract_code** : It should refer to the Michelson Contract code you want to deploy.

- **contract_storage** : refers to the Michelson representation of the initial storage used for deployment

**Bundle is provided with 6 Keys in the Keystore :**

- Both test_key1.js & test_key2.js are activated in the Alphanet . One can use that or import your own from the faucet and Activate & Reveal using the ConseilJsUtils.

- 4 bootstrap acoounts are provided which can be directly used with our Tezster Suite which provides a local development Blockchain with unique ease of interaction with the Tezos node !

To deploy your contracts in the local tezos blockchain you first need to Setup [Tezster-CLI](https://docs.tezster.tech/tezster-cli) / [Tezster-GUI](https://docs.tezster.tech/)

Once done just change the deploy_config.node : "http://localhost:18731"

Now when you deploy your contract, your contract will be deployed in the local-network and you can play with tezster tools to interact with the contract. To have a better experience give an alias to your contract with :

```sh
tezster add-contract <contract_alias> <contract_address>
```

And you can use all the funtionalities of Tezster-CLI tool.

**\*Note** : \*By Default the tezos-node runs in 18731 for Tezster.\*\*

**Remaining keys are the contract deployment prams which inchudes :**

- **amount** you want to send to the contract ( in micro Tez ).

* **delegate_address** to whom you want to delegate your contract balance. ( tz1 address )

- **fee** to the baker ( in micro Tez )

* **storage_limit** for the contract ( limits the storage used by the contract )

- **gas_limit** to restrict the actions / operactions to be carried out while deployment.

**And then Run the command `npm run deploy`! Your contract will be Deployed**

6. `npm run dapp` It will spin-up the Dapp front-end and you are ready to use it. This Bundle is packed up with simple create-react-app. Once you run the command the front-end dev server will start up and you will be redirected to your home page in your default browser.

7) `npm run test` It will run the whole template of SmartPy code with their scenario based testing. And the test results will be visualised in the teminal.

**This command will also generate a test_build where your test results will be stored.**

All you need is to change the **config.json** file and add up the contract name.

```json
"test_config": {
"contract_name": "demo.py",
"test_name": "MyContract"
}
```

- `contract_name` : This is the file name of Smart Contract you want to test
- `test_name` : This is the test name that is specified in the SmartPy Code `@sp.add_test(name = "Welcome")`

**`npm run sync` is mandatory whenever your config.json file is changed !**

\*PS: You have to create another file in **_contract_** folder with the Smart-Contract and the tests written in it.\*

8. `npm run get-entry-points` It will extract the entry-points from you recently compiled code and display in the terminal with a sample invocation which you can reference while invoking an entry-point from your dapp.

```
Type: 'unit'
Name : double
Parameters :
Structure : (Left (Right $PARAM))
Sample Invocation : (Left (Right Unit))
```

Package comes with React Ready front-end , and you are ready to use. Use ConseilJs library to interct with the contract.

Build some Awesome Dapps !

## Future Development

We'll be adding some new set of features like **local testing environment** to provide more flexibitity and usability to this Bundle & More bundles are coming soon , stay tuned!

## License

Licensed under the MIT. See the [LICENSE](https://github.com/Tezsure/Bundle-react/blob/master/LICENSE) file for details.
## UI Git:
https://github.com/ap-aryanpandey/tijoriui
2 changes: 2 additions & 0 deletions client/debug.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[1013/225759.500:ERROR:directory_reader_win.cc(43)] FindFirstFile: The system cannot find the path specified. (0x3)
[1014/083908.450:ERROR:directory_reader_win.cc(43)] FindFirstFile: The system cannot find the path specified. (0x3)
Loading