Skip to content

Commit 2bcef8f

Browse files
Merge commit '254d6b76c77ed212d30ac5482f8c913996369f5f'
2 parents 8622626 + 254d6b7 commit 2bcef8f

File tree

30 files changed

+290
-204
lines changed

30 files changed

+290
-204
lines changed

CHANGELOG.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ Features, Bug Fixes, API Breaking, Deprecated, Infrastructure, Template Updates
1414

1515
## Unreleased
1616

17+
### Bug Fixes
18+
19+
- Fix `txn AssetSender` should return zero address by default.
20+
1721
## v5.0.1 2022-07-11
1822

1923
### Bug Fixes
@@ -57,11 +61,30 @@ Features, Bug Fixes, API Breaking, Deprecated, Infrastructure, Template Updates
5761

5862
### Breaking Changes
5963

60-
- Renamed `optIntoAsa` to `optInToAsa` bringing naming convention consistency across the project.
64+
#### @algo-builder/algob
65+
66+
- `ensureCompiled` is deprecated and removed and `compileASC` should be used.
67+
- `loadLogicFromCache` is deprecated and removed and `getLsigFromCache` should be used.
68+
- `executeTransaction` is deprecated and removed and `executeTx` should be used.
69+
70+
#### @algo-builder/runtime
71+
72+
- `addAsset` is deprecated and removed and `deployASA` should be used.
73+
- `addApp` is deprecated and removed and `deployAdd` should be used.
74+
- `addASADef` is deprecated and removed and `deployASADef` should be used.
75+
- Renamed `optIntoAsa` to `optInToAsa` to remain naming convention consistency across the project.
76+
77+
#### @algo-builder/web
78+
79+
- `executeTransaction` is deprecated and removed and `executeTx` should be used.
6180
- Renamed `sendTransaction` to `sendAndWait` in WebMode and parameter is updated to accept `string` to bring consistency with other wallets class.
6281

6382
### Deprecated
6483

84+
### Infrastructure
85+
86+
- Updated indexer version to `2.12.4` in `infrastructure/makefile`
87+
6588
### Template Updates
6689

6790
DAO template:

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,13 @@ We use **yarn workspaces** to manage all sub packages. here is a list of command
5858

5959
You have to utilize yarn workspaces’ `noHoist` feature to use otherwise incompatible 3rd party dependencies working in the Mono-Repo environment.
6060

61+
### Creating a local project using algob from source
62+
63+
If you want to test the latest algob version from the `develop` branch, you can:
64+
65+
- `cd <path to algo-builder repo>/packages/algob` and run `./project-dev-script.sh`
66+
- create a new node project and use link (`npm link` or `yarn link`) to link dependencies
67+
6168
### Testing
6269

6370
Each package has rich test suites. Whenever you add something new make sure you provide a test.

docs/_layouts/landingpage.html

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,6 @@
4747
<div class="row">
4848
<div class="col-12 text-center">
4949
<ul class="list-inline">
50-
<li class="list-inline-item">
51-
<a href="https://github.com/scale-it/algo-builder/issues">Contact Us</a>
52-
</li>
5350
<li class="list-inline-item"><a href="./api/algob/index.html">API Docs</a></li>
5451
<li class="list-inline-item">
5552
<a href="https://github.com/scale-it/algo-builder">GitHub repository</a>

docs/auditing.html

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,14 @@
2929
</p>
3030

3131
<p>
32-
<a href="https://zaremba.ch/contact.html">Contact us</a> if you would like to consult
32+
<SCRIPT TYPE="text/javascript">
33+
contact='@'
34+
contact+='algobuilder.dev'
35+
contact=('contact' + contact)
36+
document.write('<A href="mailto:' + contact + '">' + 'Contact us (' + contact+')</a>')
37+
</script>
38+
39+
if you would like to consult
3340
your project, have smart contracts done by professionals, write automated tests or
3441
audit your existing project.
3542
</p>
@@ -40,3 +47,4 @@
4047
</div>
4148
</div>
4249
</section>
50+

docs/index.html

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -313,13 +313,24 @@ <h2 class="text-center text-md-left">
313313
<div class="row">
314314
<div class="col-md-9 mx-auto">
315315
<h2 class="text-center text-md-left">
316-
We are waiting on your feedback, contact us using algo-builder
316+
We are waiting for your feedback, create a
317317
<a
318318
style="text-decoration: underline"
319-
href="https://github.com/scale-it/algo-builder/issues"
320-
>
321-
<span class="text-secondary">GitHub Issues</span></a
319+
href="https://github.com/scale-it/algo-builder/issues/new/choose"
322320
>
321+
<span class="text-secondary">GitHub Issue</span></a
322+
>.
323+
324+
<p style="margin-top: 20px;">
325+
Do you need a help with writing a smart contracts or to audit your code? Contact us:
326+
327+
<SCRIPT TYPE="text/javascript">
328+
contact='@'
329+
contact+='algobuilder.dev'
330+
contact=('contact' + contact)
331+
document.write('<A href="mailto:' + contact + '">' + contact + '</a>')
332+
</script>
333+
</p>
323334
</h2>
324335
</div>
325336
</div>

docs/tutorials/t-wallet.md

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
# Algo Builder Wallet Widget
2+
3+
The purpose of this tutorial is a demonstration of the Algo Builder Wallet Widget integrated with the [@algo-builder/web](https://github.com/scale-it/algo-builder/tree/master/packages/web) package, written in Vue JS. The widget connects to major Algorand wallets (Algo Signer, Wallet Connect, MyAlgoWallet), sign and send transactions constructed with Algo SDK or Algo Builder framework.
4+
5+
### Requirements
6+
7+
- [Vue CLI](https://cli.vuejs.org/guide/installation.html)<br/>
8+
- [NodeJS](https://nodejs.org/en/download/) > v14.11.0<br/>
9+
- JavaScript package manager - either [YARN](https://classic.yarnpkg.com/en/docs/install) > v3.1.0 or NPM which comes with NodeJS.<br/>
10+
- IDE, e.g. [VSCode](https://code.visualstudio.com/download)<br/>
11+
- Other dependencies are listed in [package.json](https://github.com/scale-it/algo-builder-templates/blob/master/wallet/package.json). Install them with yarn install or npm install.<br/>
12+
13+
### Background
14+
15+
Algorand ecosystem lacks a maintained Vue JS component connected to main Algorand web wallets.
16+
17+
[Algo Builder](https://algobuilder.dev/) is one of the major frameworks for smart contract development and integrations. We took a responsibility to provide the community a Vue JS wallet widget, well integrated with the Algo Builder framework and Algo SDK.
18+
19+
In this tutorial we will create a basic Vue JS web application which connects web wallets and perform a simple transaction (for eg: send Algo or call application). With the wallet widget a user can:
20+
21+
- select a network (such as MainNet, TestNet, BetaNet),
22+
- switch an account,
23+
- interact with the web wallet.
24+
25+
### Steps
26+
27+
#### 1. Setup
28+
29+
The source code for this tutorial can be found on GitHub. Start by cloning the repository
30+
31+
git clone https://github.com/scale-it/algo-builder-templates.git
32+
cd algo-builder-templates/wallet
33+
34+
The repository contains the following templates:<br/>
35+
**htlc** : a descriptive example explaining how HTLC contracts work with Algo-Builder.<br/>
36+
**monitor-payments**: a nodejs app which monitors payment transactions to a particular address.<br/>
37+
**shop**: demonstrates a payment widget connected to different web wallets.<br/>
38+
**wallet**: (this tutorial) Algo Builder Wallet Wideget tutorial.<br/>
39+
**warcraft**: a descriptive example explaining how to create an escrow account with Algo Builder.<br/>
40+
41+
#### 2. Environment Setup
42+
43+
Install all dependencies in your environment:<br/>
44+
` yarn install` or `npm install`
45+
46+
Now, run the app for local development. It will automatically rebuild the app when the code is updated.<br/>
47+
`yarn run dev` or `npm run dev`
48+
49+
App should pop up in your browser, it will look similar to this:
50+
<img src="./t-wallet/assets/homescreen.png" height="200" title="Home Page" />
51+
52+
#### 3. Using the Wallet Widget
53+
54+
Now you can select your preferred network and connect to a web wallet:
55+
<img src="./t-wallet/assets/address_selected.png" height="200" title="Account Selected" />
56+
57+
You can now interact with the algorand blockchain (send algos, or call an application):
58+
<img src="./t-wallet/assets/algo_transaction.png" height="200" title="Send Transaction" />
59+
60+
We present an example of Algo transfer and an application call, with parameters set in `src/constants`.
61+
62+
```ts
63+
export const toAddress = "WK73JQQGCRQCZ5GLQHCXXB6OXIGF6SD22F5P7HPXF5PNH23YUUALUMKOZ4";
64+
export const amount: number = 10e6;
65+
export const applicationId: number = 189;
66+
```
67+
68+
And finally you can disconnect your chosen wallet.
69+
70+
#### 3. Style the Wallet Widget
71+
72+
You can also style your wallet widget using your own custom styles or using an external library by editing the `App.vue` file:
73+
74+
```ts
75+
<div>
76+
<select @change="handleNetworkChange">
77+
<option :value="0" :key="0">Select a network</option>
78+
<option
79+
v-for="option in networkAvailable"
80+
:value="option.value"
81+
:key="option.id"
82+
>
83+
{{ option.value }}
84+
</option>
85+
</select>
86+
<div class="header" v-if="walletStore.network">
87+
<select @change="connectWallet">
88+
<option :value="0" :key="0">Select a wallet</option>
89+
<option
90+
v-for="option in walletsAvailable"
91+
:value="option.value"
92+
:key="option.id"
93+
>
94+
{{ option.value }}
95+
</option>
96+
</select>
97+
</div>
98+
<div class="header" v-if="currentAddress">
99+
<select @change="setCurrentAddress">
100+
<option :value="0" :key="0">Select a account</option>
101+
<option v-for="addr in walletAddresses" :value="addr" :key="addr">
102+
{{ addr }}
103+
</option>
104+
</select>
105+
</div>
106+
</div>
107+
```
108+
109+
For eg: [Sigma Wallet](https://github.com/scale-it/algobuilder-msig) has a styled wallet widget using [Antd](https://www.antdv.com/) library.
110+
<img src="./t-wallet/assets/select_network.png" height="100" title="Select Network" />
111+
<img src="./t-wallet/assets/styled_wallet.png" height="200" title="Styled Wallet Widget" />
112+
113+
The wallet component above and the whole web page can easily be customized to fulfil your UX design requirements along with providing the required functionality.
23.8 KB
Loading
34.6 KB
Loading
5.74 KB
Loading
3.21 KB
Loading

0 commit comments

Comments
 (0)