Skip to content

Commit c47da65

Browse files
committed
update deploy script
1 parent d36f2b9 commit c47da65

File tree

18 files changed

+55
-52
lines changed

18 files changed

+55
-52
lines changed

app/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"check-packages": "node src/workers/check-packages.mjs"
1818
},
1919
"dependencies": {
20-
"@bundlr-network/client": "^0.11.9",
20+
"@irys/sdk": "^0.1.3",
2121
"@permaweb/payments": "0.0.12",
2222
"@permaweb/stampjs": "0.5.4",
2323
"@types/react-router-dom": "^5.3.3",

app/src/views/Account/AccountHeader/styles.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export const AvatarWrapper = styled.div`
4343
margin: 0 5px 0 0;
4444
background: ${(props) => props.theme.colors.container.primary.background};
4545
border: 1.5px solid ${(props) => props.theme.colors.border.primary};
46-
border-radius: ${STYLING.dimensions.borderRadius};
46+
border-radius: 50%;
4747
svg {
4848
height: 65px;
4949
width: 65px;
@@ -57,15 +57,15 @@ export const AvatarWrapper = styled.div`
5757
export const Avatar = styled.img`
5858
height: 100%;
5959
width: 100%;
60-
border-radius: ${STYLING.dimensions.borderRadiusField};
60+
border-radius: 50%;
6161
`;
6262

6363
export const HeaderContainer = styled.div``;
6464

6565
export const Header = styled.div`
6666
margin: 0 0 20px 0;
6767
h2 {
68-
font-weight: ${(props) => props.theme.typography.weight.mediumß};
68+
font-weight: ${(props) => props.theme.typography.weight.bold};
6969
font-family: ${(props) => props.theme.typography.family.alt1};
7070
color: ${(props) => props.theme.colors.font.primary.alt8};
7171
text-align: left;

app/src/views/Asset/AssetDetail/AssetDetailAction/AssetDetailActionTabs/AssetDetailMarket/AssetDetailMarketAction/AssetBuy/AssetBuy.tsx

+6-1
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,11 @@ export default function AssetBuy(props: IProps) {
261261
);
262262
}
263263

264+
function getTotalSalesPercentage() {
265+
if (totalSalesBalance <= 0 || totalBalance <= 0) return `0%`;
266+
return `${((totalSalesBalance / totalBalance) * 100).toFixed(2)}%`;
267+
}
268+
264269
return (
265270
<>
266271
<S.Wrapper>
@@ -277,7 +282,7 @@ export default function AssetBuy(props: IProps) {
277282
</S.DCLine>
278283
<S.DCLine>
279284
<S.DCLineHeader>{`${language.totalSalesPercentage}:`}</S.DCLineHeader>
280-
<S.DCLineDetail>{`${((totalSalesBalance / totalBalance) * 100).toFixed(2)}%`}</S.DCLineDetail>
285+
<S.DCLineDetail>{getTotalSalesPercentage()}</S.DCLineDetail>
281286
</S.DCLine>
282287
</S.DCWrapper>
283288
) : (

app/src/views/Asset/AssetDetail/AssetDetailAction/AssetDetailActionTabs/AssetDetailMarket/AssetDetailMarketAction/AssetSell/AssetSell.tsx

+12-3
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,11 @@ export default function AssetSell(props: IProps) {
330330
}
331331
}
332332

333+
function getTotalSalesPercentage() {
334+
if (totalSalesBalance <= 0 || totalBalance <= 0) return `0%`;
335+
return `${((totalSalesBalance / totalBalance) * 100).toFixed(2)}%`;
336+
}
337+
333338
return (
334339
<>
335340
<S.Wrapper>
@@ -345,7 +350,7 @@ export default function AssetSell(props: IProps) {
345350
</S.DCLine>
346351
<S.DCLine>
347352
<S.DCLineHeader>{`${language.totalAvailableSalesPercentage}:`}</S.DCLineHeader>
348-
<S.DCLineDetail>{`${((totalSalesBalance / totalBalance) * 100).toFixed(2)}%`}</S.DCLineDetail>
353+
<S.DCLineDetail>{getTotalSalesPercentage()}</S.DCLineDetail>
349354
</S.DCLine>
350355
</S.DCWrapper>
351356
) : (
@@ -401,11 +406,15 @@ export default function AssetSell(props: IProps) {
401406
<S.SpendInfoWrapper>
402407
<S.SpendInfoContainer>
403408
<span>{language.totalListingQuantity}</span>
404-
<p>{isNaN(quantity) || quantity < 0 ? 0 : formatCount(quantity.toString())}</p>
409+
<p>{isNaN(quantity) || quantity <= 0 ? 0 : formatCount(quantity.toString())}</p>
405410
</S.SpendInfoContainer>
406411
<S.SpendInfoContainer>
407412
<span>{language.totalListingPercentage}</span>
408-
<p>{isNaN(quantity) || quantity < 0 ? `0.00%` : `${((quantity / totalBalance) * 100).toFixed(2)}%`}</p>
413+
<p>
414+
{isNaN(quantity) || quantity <= 0 || isNaN(totalBalance) || totalBalance <= 0
415+
? `0.00%`
416+
: `${((quantity / totalBalance) * 100).toFixed(2)}%`}
417+
</p>
409418
</S.SpendInfoContainer>
410419
</S.SpendInfoWrapper>
411420
<S.PriceInfoWrapper>

app/src/views/Asset/AssetDetail/AssetDetailAction/AssetDetailActionTabs/AssetDetailMarket/AssetDetailMarketAction/AssetTransfer/AssetTransfer.tsx

+11-2
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,11 @@ export default function AssetTransfer(props: IProps) {
289289
}
290290
}
291291

292+
function getTotalTransferPercentage() {
293+
if (totalTransferBalance <= 0 || totalBalance <= 0) return `0%`;
294+
return `${((totalTransferBalance / totalBalance) * 100).toFixed(2)}%`;
295+
}
296+
292297
return (
293298
<>
294299
<S.Wrapper>
@@ -304,7 +309,7 @@ export default function AssetTransfer(props: IProps) {
304309
</S.DCLine>
305310
<S.DCLine>
306311
<S.DCLineHeader>{`${language.totalAvailableTransferPercentage}:`}</S.DCLineHeader>
307-
<S.DCLineDetail>{`${((totalTransferBalance / totalBalance) * 100).toFixed(2)}%`}</S.DCLineDetail>
312+
<S.DCLineDetail>{getTotalTransferPercentage()}</S.DCLineDetail>
308313
</S.DCLine>
309314
</S.DCWrapper>
310315
) : (
@@ -368,7 +373,11 @@ export default function AssetTransfer(props: IProps) {
368373
</S.TransferInfoContainer>
369374
<S.TransferInfoContainer>
370375
<span>{language.totalTransferPercentage}</span>
371-
<p>{isNaN(quantity) || quantity < 0 ? `0.00%` : `${((quantity / totalBalance) * 100).toFixed(2)}%`}</p>
376+
<p>
377+
{isNaN(quantity) || quantity <= 0 || isNaN(totalBalance) || totalBalance <= 0
378+
? `0.00%`
379+
: `${((quantity / totalBalance) * 100).toFixed(2)}%`}
380+
</p>
372381
</S.TransferInfoContainer>
373382
</S.TransferInfoWrapper>
374383
</S.TransferWrapper>

app/src/views/Asset/AssetDetail/AssetDetailInfo/AssetDetailInfo.tsx

-2
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@ export default function AssetDetailInfo(props: IAProps) {
4646
collectionCode: props.asset.data.collectionCode,
4747
});
4848
setCollection(collectionFetch);
49-
50-
console.log(props.asset.data);
5149
}
5250
})();
5351
}, [props.asset, orProvider.orderBook]);

app/src/views/Docs/DocsDetail/MD/exploring-bazar/bazar-built-on-ucm.md

-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,3 @@
33
BazAR is the first digital content marketplace built on the Universal Content Marketplace (UCM) protocol.The Universal Content Marketplace (UCM) is a revolutionary protocol built on the permaweb, specifically designed to enable trustless exchange of atomic assets. It empowers creators and users alike to interact, trade, and transact with any form of digital content, from images and music to videos, papers, components, and even applications. You can learn more about UCM [here](https://ucm-wiki.g8way.io/#/en/Introducing-the-Universal-Content-Marketplace-protocol-UCM).
44

55
In this early release, BazAR showcases new possibilities for how to bring value to onchain data on Arweave. Considered an early "beta" release, BazAR continues to evolve, following an iterative development process aimed at establishing the first fully onchain marketplace on the permaweb.
6-
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
# Universal Data License (UDL)?
22

3-
The Universal Data License defines the terms and conditions for using media assets on the permaweb. The UDL establishes a framework for licensing digital media such as images, videos, audio, graphics and more.
3+
The Universal Data License defines the terms and conditions for using media assets on the permaweb. The UDL establishes a framework for licensing digital media such as images, videos, audio, graphics and more.
44

55
Instead of platforms setting the terms and conditions, on the permaweb creators define how their media can be utilized. The following UDL licensing parameters are integrated into BazAR and can be easily set by content creators:
66

77
- **Public use**: Allows anyone to copy and distribute assets.
88
- **Derivation**: Content with a derivation tag indicates that content can be used based on its usage parameters indicated on the asset page.
99
- **Commercial use**: Content owners have the right to employ the content for advertising, marketing, or product sales. Creators might request users of commercial-use assets to make a one-time UDL payment or adhere to a monthly payment, as specified by the license on the asset page.
1010

11-
You can read the full UDL [here](https://udlicense.arweave.dev/).
12-
11+
You can read the full UDL [here](https://udlicense.arweave.dev/).

app/src/views/Docs/DocsDetail/MD/exploring-bazar/upload-content-to-ucm.md

+2-4
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ Content can be uploaded from:
66

77
- [Atomic asset collection uploader](https://atomicasset.arweave.dev/#/collection-create)
88
- [Akord Mint](https://mint.akord.com/login)
9-
- [Fair Protocol AI generated art](https://fair.arweave.dev/)
10-
- [Alex. Archive Artifact sponsorships](https://alex.arweave.dev/#/trade/)
9+
- [Fair Protocol AI generated art](https://fair.arweave.dev/)
10+
- [Alex. Archive Artifact sponsorships](https://alex.arweave.dev/#/trade/)
1111

1212
With the permaweb expanding continuously, this list will be regularly updated as more apps integrate with the UCM.
13-
14-
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
11
# Customize a permaweb profile with ArProfile
22

3-
Your Arweave wallet serves as your identity on the permaweb. Customize your permaweb profile with a @handle, name, bio and social links through [ArProfile](https://arprofile.arweave.dev/). Your profile information will carry over to all permaweb apps that support ArProfile.
4-
5-
6-
7-
3+
Your Arweave wallet serves as your identity on the permaweb. Customize your permaweb profile with a @handle, name, bio and social links through [ArProfile](https://arprofile.arweave.dev/). Your profile information will carry over to all permaweb apps that support ArProfile.
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Creating an Arweave Wallet
2-
To begin your journey on the permaweb, start by creating a secure, non-custodial wallet. You can create an ArConnect wallet [here](https://www.arconnect.io/) or an Arweave.app wallet [here](https://arweave.app/).
32

3+
To begin your journey on the permaweb, start by creating a secure, non-custodial wallet. You can create an ArConnect wallet [here](https://www.arconnect.io/) or an Arweave.app wallet [here](https://arweave.app/).

app/src/views/Docs/DocsDetail/MD/new-to-permaweb/getting-vouched.md

+2-5
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22

33
To ensure a quality permaweb experience, we employ a decentralized verification process. VouchDAO allows individuals to “vouch” for an Arweave address, verifying its identity and humanity. Being vouched grants access to additional permaweb features like receiving $PIXL and $STAMP tokens.
44

5-
Get “vouched” through X [here](https://vouch-twitter.arweave.dev/#/).
6-
7-
Check if your wallet is vouched [here](https://vouch-dao.arweave.dev/).
8-
9-
5+
Get “vouched” through X [here](https://vouch-twitter.arweave.dev/#/).
106

7+
Check if your wallet is vouched [here](https://vouch-dao.arweave.dev/).

app/src/views/Docs/DocsDetail/MD/permaweb-concepts/pixel-token.md

-2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,4 @@ User's reward share weight starts at one, and each additional day of the streak
88

99
Read more about the tokenomics of $PIXL [here](https://ucm-wiki.g8way.io/#/en/PIXL-Token).
1010

11-
1211
**Disclaimer: $PIXL is a fun reward designed to incentivize discovery and interaction with atomic assets, and does not necessarily have financial value.**
13-
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
# What is a profit sharing token (PST)?
22

3-
A profit sharing token (PST) is an atomic asset built using a [smartWeave ](https://arwiki.wiki/#/en/smartweave) contract that allows fractionalized ownership. Profit sharing tokens allow users and creators to trade proportions of future profit from assets by trading the profit sharing token itself.
3+
A profit sharing token (PST) is an atomic asset built using a [smartWeave ](https://arwiki.wiki/#/en/smartweave) contract that allows fractionalized ownership. Profit sharing tokens allow users and creators to trade proportions of future profit from assets by trading the profit sharing token itself.
44

55
As you can see, assets listed on BazAR allow fractional ownership. BazAR is the first fully onchain digital content marketplace that allows for the partial ownership of content. This lowers the barrier of entry into the permaweb for users, and ensures creators are still compensated for their work.
66

7-
Explore further insights into the concept of profit sharing tokens by the Arweave team [here](https://arweave.medium.com/profit-sharing-tokens-a-new-incentivization-mechanism-for-an-open-web-1f2532411d6e)
8-
7+
Explore further insights into the concept of profit sharing tokens by the Arweave team [here](https://arweave.medium.com/profit-sharing-tokens-a-new-incentivization-mechanism-for-an-open-web-1f2532411d6e)
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
21
# What are Stamps and Stamp tokens ($STAMP)?
32

4-
Stamps serve as the universal “like” button on the permaweb. With a vouched wallet, users can support content by stamping it, rewarding both content creators and stampers with $STAMP tokens daily. Essentially, you earn rewards for creating accessible content on the permaweb that the community appreciates and endorses.
3+
Stamps serve as the universal “like” button on the permaweb. With a vouched wallet, users can support content by stamping it, rewarding both content creators and stampers with $STAMP tokens daily. Essentially, you earn rewards for creating accessible content on the permaweb that the community appreciates and endorses.
54

65
Explore how Stamps revolutionize content creation and online incentives in the [Stamps protocol wiki](https://stamps.arweave.dev/#/en/main).
76

8-
Check out how many $STAMP tokens you have [here](https://bazar.arweave.dev/#/asset/TlqASNDLA1Uh8yFiH-BzR_1FDag4s735F3PoUFEv2Mo).
7+
Check out how many $STAMP tokens you have [here](https://bazar.arweave.dev/#/asset/TlqASNDLA1Uh8yFiH-BzR_1FDag4s735F3PoUFEv2Mo).
98

109
You can swap these $STAMP tokens for $AR on [Permaswap](https://app.permaswap.network/STAMP-AR).
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
# $U token
32

43
$U serves as the native currency of the Permaweb, providing a swift and efficient user experience while emphasizing permanence and verification. Within BazAR, $U is the primary currency used for exchanging atomic assets among users.
@@ -8,4 +7,3 @@ How to get $U:
87
- [Burn $AR](https://getu.arweave.dev/#/burn/): Users can burn their $AR tokens (pay the endowment) to receive $U tokens at a 1:1 ratio.
98
- [Upload data](https://u-wiki.g8way.io/#/en/developer-Guide): Users with experience with SmartWeave, can insert specific tags to the transaction to mint $U tokens.
109
- [Permaswap](https://app.permaswap.network/): Swap $AR for $U on Permaswap.
11-

app/src/views/Docs/DocsDetail/order-docs.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export const docsOrder = [
1818
{
1919
name: 'Customize a permaweb profile',
2020
path: 'creating-a-permaweb-profile',
21-
}
21+
},
2222
],
2323
},
2424
{
@@ -44,7 +44,7 @@ export const docsOrder = [
4444
{
4545
name: 'Stamp token ($STAMP)',
4646
path: 'stamp-token',
47-
}
47+
},
4848
],
4949
},
5050
{
@@ -62,7 +62,7 @@ export const docsOrder = [
6262
{
6363
name: 'What is the Universal Data License (UDL)?',
6464
path: 'universal-data-license',
65-
}
65+
},
6666
],
6767
},
6868
];

app/src/workers/deploy.ts

+7-8
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,24 @@
1-
const Bundlr = require('@bundlr-network/client');
21
const Arweave = require('arweave');
2+
const Irys = require('@irys/sdk');
33
const { defaultCacheOptions, WarpFactory } = require('warp-contracts');
44

55
const ANT = 'qsxW8tchN_UVORsCSehUxMNbexsDd7hXpWFQi_jt22M';
66
const DEPLOY_FOLDER = './dist';
7-
const BUNDLR_NODE = 'https://node2.bundlr.network';
7+
const UPLOAD_NODE = 'https://turbo.ardrive.io';
88

99
(async () => {
1010
const jwk = JSON.parse(Buffer.from(process.env.DEPLOY_KEY as any, 'base64').toString('utf-8'));
1111

12+
const irys = new Irys({ url: UPLOAD_NODE, token: 'arweave', key: jwk });
13+
1214
const arweave = Arweave.init({ host: 'arweave.net', port: 443, protocol: 'https' });
13-
const bundlr = new (Bundlr as any).default(BUNDLR_NODE, 'arweave', jwk);
1415
const warp = WarpFactory.custom(arweave, defaultCacheOptions, 'mainnet').useArweaveGateway().build();
15-
1616
const warpContract = warp.contract(ANT).connect(jwk);
1717
const contractState: any = (await warpContract.readState()).cachedValue.state;
18-
console.log(contractState);
1918

2019
try {
2120
console.log(`Deploying ${DEPLOY_FOLDER} folder`);
22-
const bundlrResult = await bundlr.uploadFolder(DEPLOY_FOLDER, {
21+
const txResult = await irys.uploadFolder(DEPLOY_FOLDER, {
2322
indexFile: 'index.html',
2423
});
2524

@@ -29,12 +28,12 @@ const BUNDLR_NODE = 'https://node2.bundlr.network';
2928
{
3029
function: 'setRecord',
3130
subDomain: '@',
32-
transactionId: bundlrResult.id,
31+
transactionId: txResult.id,
3332
},
3433
{ disableBundling: true }
3534
);
3635

37-
console.log(`Deployed [${bundlrResult.id}] to [${contractState.name}]`);
36+
console.log(`Deployed [${txResult.id}] to [${contractState.name}]`);
3837
} catch (e: any) {
3938
console.error(e);
4039
}

0 commit comments

Comments
 (0)