This repository has been archived by the owner on May 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make browser examples 95% more beautiful
- Loading branch information
Showing
12 changed files
with
394 additions
and
170 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
import '@picocss/pico'; | ||
|
||
import { ColonyRpcEndpoint } from '../../../src'; | ||
|
||
const addColonyRPC = () => { | ||
|
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 |
---|---|---|
@@ -1,19 +1,34 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<body> | ||
|
||
<head> | ||
<link href="index.css" rel="stylesheet"> | ||
</head> | ||
|
||
<body> | ||
<main class="container"> | ||
<h1>Colony SDK browser demo - create a team, move funds and make a payment</h1> | ||
</body> | ||
<p><b>1) Let's connect to the Colony first</b> <i style="color:red">Make sure you have the FUNDING and ADMINISTRATION permissions in the Root domain of that Colony</i></p> | ||
<input type="text" id="address" placeholder="Colony address" /> | ||
<button type="button" id="button_connect">Connect</button> | ||
<p><b>2) Next we create a team</b></p> | ||
<button type="button" id="button_team">Add team</button> | ||
<p><b>3) We need to move some funds to the new team.</b> <i style="color:red">Make sure the root colony has at least about 1 unit of the Colony's native token (see message below after connecting)</i></p> | ||
<button type="button" id="button_fund">Fund new team with 0.66 tokens</button> | ||
<p><b>4) Then, within that team, send someone some of the Colony's native tokens</b></p> | ||
<input type="text" id="recipient" placeholder="Recipient" /> | ||
<button type="button" id="button_pay">Pay 0.42 tokens</button> | ||
<p style="color:red" id="error"></p> | ||
<p style="color:blue" id="result"></p> | ||
<script src="advanced.js"></script> | ||
<p><b>1) Let's connect to the Colony first</b> <i style="color:red">Make sure you have the FUNDING and | ||
ADMINISTRATION permissions in the Root domain of that Colony</i></p> | ||
<input type="text" id="address" placeholder="Colony address" /> | ||
<button type="button" id="button_connect">Connect</button> | ||
<p><b>2) Next we create a team</b></p> | ||
<button type="button" id="button_team">Add team</button> | ||
<p><b>3) We need to move some funds to the new team.</b> <i style="color:red">Make sure the root colony has at least | ||
about 1 unit of the Colony's native token (see message below after connecting)</i></p> | ||
<button type="button" id="button_fund">Fund new team with 0.66 tokens</button> | ||
<p><b>4) Then, within that team, send someone some of the Colony's native tokens</b></p> | ||
<input type="text" id="recipient" placeholder="Recipient" /> | ||
<button type="button" id="button_pay">Pay 0.42 tokens</button> | ||
<article> | ||
<header> | ||
<b>Message</b> | ||
</header> | ||
<p style="color:red" id="error"></p> | ||
<p id="result"></p> | ||
</article> | ||
<script src="advanced.js"></script> | ||
</main> | ||
</body> | ||
|
||
</html> |
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 |
---|---|---|
@@ -1,13 +1,27 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<body> | ||
|
||
<head> | ||
<link href="index.css" rel="stylesheet"> | ||
</head> | ||
|
||
<body> | ||
<main class="container"> | ||
<h1>Colony SDK browser demo - basic</h1> | ||
</body> | ||
<p>Let's check the CLNY funding for a Colony</p> | ||
<label for="address">Colony address:</label> | ||
<input type="text" id="address" /> | ||
<button type="button" id="button">Check</button> | ||
<p style="color:red" id="error"></p> | ||
<p style="color:blue" id="result"></p> | ||
<p>Let's check the CLNY funding for a Colony</p> | ||
<label for="address">Colony address: | ||
<input type="text" id="address" /> | ||
</label> | ||
<button type="button" id="button">Check</button> | ||
<article> | ||
<header> | ||
<b>Message</b> | ||
</header> | ||
<p style="color:red" id="error"></p> | ||
<p id="result"></p> | ||
</article> | ||
</main> | ||
<script src="basic.js"></script> | ||
</body> | ||
|
||
</html> |
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 |
---|---|---|
@@ -1,13 +1,26 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<body> | ||
|
||
<head> | ||
<link href="index.css" rel="stylesheet"> | ||
</head> | ||
|
||
<body> | ||
<main class="container"> | ||
<h1>Colony SDK browser demo - events</h1> | ||
</body> | ||
<p>Listen to Colony Events as they unfold...</p> | ||
<label for="address">Colony address:</label> | ||
<input type="text" id="address" /> | ||
<button type="button" id="button">Listen</button> | ||
<p style="color:red" id="error"></p> | ||
<p style="color:blue" id="result"></p> | ||
<p>Listen to Colony Events as they unfold...</p> | ||
<label for="address">Colony address:</label> | ||
<input type="text" id="address" /> | ||
<button type="button" id="button">Listen</button> | ||
<article> | ||
<header> | ||
<b>Message</b> | ||
</header> | ||
<p style="color:red" id="error"></p> | ||
<p id="result"></p> | ||
</article> | ||
</main> | ||
<script src="events.js"></script> | ||
</body> | ||
|
||
</html> |
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 |
---|---|---|
@@ -1,39 +1,52 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<body> | ||
|
||
<head> | ||
<link href="index.css" rel="stylesheet"> | ||
</head> | ||
|
||
<body> | ||
<main class="container"> | ||
<h1>Colony SDK browser demos</h1> | ||
</body> | ||
<p>See <a href="https://github.com/JoinColony/colonySDK">colonySDK</a> and <a href="https://github.com/JoinColony/colonyStarter">colonyStarter</a> for more information.</p> | ||
<p>Check out the source code for the examples <a href="https://github.com/JoinColony/colonySDK/tree/main/examples/browser/src">here</a>.</p> | ||
<p>These demos interact with LIVE Colonies on Gnosis chain. We recommend to use the <a href="#" id="add_rpc">Colony RPC endpoint</a> directly.</p> | ||
<ul> | ||
<li> | ||
<a href="basic.html">Basic example (fetching funds from a Colony)</a> | ||
</li> | ||
<li> | ||
<a href="metamask.html">MetaMask example (connecting to MetaMask)</a> | ||
</li> | ||
<li> | ||
<a href="advanced.html">Advanced example (creating a domain within a Colony)</a> | ||
</li> | ||
<li> | ||
<a href="events.html">Events example (listening to Colony events)</a> | ||
</li> | ||
<li> | ||
<a href="motions.html">Motion workflow (connecting to a Demo Colony)</a> | ||
</li> | ||
</ul> | ||
<p>These demos interact with a local development RPC endpoint (see <a href="https://colony.gitbook.io/colony-network/deploying-colony-locally" target="_blank">here</a> on how to set it up). MetaMask is not needed, the examples provide a wallet account.</p> | ||
<ul> | ||
<li> | ||
<a href="local-basic.html">Basic example for local setup</a> | ||
</li> | ||
<li> | ||
<a href="local-reputation.html">Reputation example (get reputation for a user)</a> | ||
</li> | ||
<li> | ||
<a href="local-motions.html">Motion workflow</a> | ||
</li> | ||
</ul> | ||
<p>See <a href="https://github.com/JoinColony/colonySDK">colonySDK</a> and <a | ||
href="https://github.com/JoinColony/colonyStarter">colonyStarter</a> for more information.</p> | ||
<p>Check out the source code for the examples <a | ||
href="https://github.com/JoinColony/colonySDK/tree/main/examples/browser/src">here</a>.</p> | ||
<p>These demos interact with LIVE Colonies on Gnosis chain. We recommend to use the <a href="#" id="add_rpc">Colony | ||
RPC endpoint</a> directly.</p> | ||
<ul> | ||
<li> | ||
<a href="basic.html">Basic example (fetching funds from a Colony)</a> | ||
</li> | ||
<li> | ||
<a href="metamask.html">MetaMask example (connecting to MetaMask)</a> | ||
</li> | ||
<li> | ||
<a href="advanced.html">Advanced example (creating a domain within a Colony)</a> | ||
</li> | ||
<li> | ||
<a href="events.html">Events example (listening to Colony events)</a> | ||
</li> | ||
<li> | ||
<a href="motions.html">Motion workflow (connecting to a Demo Colony)</a> | ||
</li> | ||
</ul> | ||
<p>These demos interact with a local development RPC endpoint (see <a | ||
href="https://colony.gitbook.io/colony-network/deploying-colony-locally" target="_blank">here</a> on how to set | ||
it up). MetaMask is not needed, the examples provide a wallet account.</p> | ||
<ul> | ||
<li> | ||
<a href="local-basic.html">Basic example for local setup</a> | ||
</li> | ||
<li> | ||
<a href="local-reputation.html">Reputation example (get reputation for a user)</a> | ||
</li> | ||
<li> | ||
<a href="local-motions.html">Motion workflow</a> | ||
</li> | ||
</ul> | ||
</main> | ||
<script src="index.js"></script> | ||
</body> | ||
|
||
</html> |
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 |
---|---|---|
@@ -1,15 +1,36 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<body> | ||
|
||
<head> | ||
<link href="index.css" rel="stylesheet"> | ||
</head> | ||
|
||
<body> | ||
<main class="container"> | ||
<h1>Colony SDK browser demo - local deployment - check the MetaColony's funding</h1> | ||
</body> | ||
<p><b>First make sure that the Colony contracts are deployed locally and the Reputation Oracle is set up. See <a href="https://colony.gitbook.io/colony-network/guides/deploying-colony-locally" target="_blank">here</a> for more information</b></p> | ||
<p>We'll be using wallet address 0xb77D57F4959eAfA0339424b83FcFaf9c15407461 to connect to the <b>locally deployed MetaColony</b>. Any transaction will automatically be signed as we have the private key hardcoded. No connection to MetaMask is needed.</p> | ||
<p>Let's check the CLNY funding for the local <b>MetaColony</b>. <i style="color:red">Make sure to provide the correct address given in the `etherrouter-address.json` in the `colonyNetwork` directory.</i></p> | ||
<label for="address">EtherRouter address:</label> | ||
<input type="text" id="address" /> | ||
<button type="button" id="button">Check</button> | ||
<p style="color:red" id="error"></p> | ||
<p style="color:blue" id="result"></p> | ||
<p><b>First make sure that the Colony contracts are deployed locally and the Reputation Oracle is set up. See <a | ||
href="https://colony.gitbook.io/colony-network/guides/deploying-colony-locally" target="_blank">here</a> for | ||
more | ||
information</b></p> | ||
<p>We'll be using wallet address 0xb77D57F4959eAfA0339424b83FcFaf9c15407461 to connect to the <b>locally deployed | ||
MetaColony</b>. Any transaction will automatically be signed as we have the private key hardcoded. No connection | ||
to | ||
MetaMask is needed.</p> | ||
<p>Let's check the CLNY funding for the local <b>MetaColony</b>. <i style="color:red">Make sure to provide the | ||
correct | ||
address given in the `etherrouter-address.json` in the `colonyNetwork` directory.</i></p> | ||
<label for="address">EtherRouter address:</label> | ||
<input type="text" id="address" /> | ||
<button type="button" id="button">Check</button> | ||
<article> | ||
<header> | ||
<b>Message</b> | ||
</header> | ||
<p style="color:red" id="error"></p> | ||
<p id="result"></p> | ||
</article> | ||
</main> | ||
<script src="local-basic.js"></script> | ||
</body> | ||
|
||
</html> |
Oops, something went wrong.