Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release new beta test (ununifi-beta-test-v2) #248

Merged
merged 89 commits into from
Jul 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
89 commits
Select commit Hold shift + click to select a range
a349207
Revert "fix: for release to disable metamask related features"
YasunoriMATSUOKA Jun 20, 2022
97862ad
Revert "fix: for release to disable metamask related features"
YasunoriMATSUOKA Jun 20, 2022
aa5129a
Merge pull request #226 from UnUniFi/feature/fix-for-release-to-disab…
YasunoriMATSUOKA Jun 20, 2022
f84d291
Merge pull request #228 from UnUniFi/feature/fix-for-release-config-j…
YasunoriMATSUOKA Jun 20, 2022
9633264
chore: bump @cosmos-client/core to v0.46.0-rc1 and ununifi-client to …
YasunoriMATSUOKA Jun 21, 2022
deb3753
fix: blocks data type name change
YasunoriMATSUOKA Jun 21, 2022
568ab8d
fix: block related type name
YasunoriMATSUOKA Jun 21, 2022
821ad98
fix: tx response data type name
YasunoriMATSUOKA Jun 21, 2022
a204246
fix: proposal deposit tally vote related data type name
YasunoriMATSUOKA Jun 21, 2022
ef6d122
fix: remove unnecessary types import
YasunoriMATSUOKA Jun 21, 2022
8ecc1b1
fix: validators data type name
YasunoriMATSUOKA Jun 21, 2022
8b3d63d
fix: errors on explorer
YasunoriMATSUOKA Jun 21, 2022
bd3a885
fix: validator related errors
YasunoriMATSUOKA Jun 22, 2022
0107ee3
fix: rewards related data type
YasunoriMATSUOKA Jun 22, 2022
0772200
fix: tx response data type name
YasunoriMATSUOKA Jun 22, 2022
1e12480
fix: tx simulate response type name
YasunoriMATSUOKA Jun 22, 2022
34ae1e7
fix: delegations and validators data type name
YasunoriMATSUOKA Jun 22, 2022
51794f7
fix: node info data type name
YasunoriMATSUOKA Jun 22, 2022
9fcac7d
fix: delegations and validators data type name
YasunoriMATSUOKA Jun 22, 2022
20d30a4
fix: config.js for new alpha-test
YasunoriMATSUOKA Jun 22, 2022
dd92264
fix: error in tx details messages
YasunoriMATSUOKA Jun 22, 2022
9b11b0c
fix: to show chain-id with temporal way in portal home page
YasunoriMATSUOKA Jun 22, 2022
d16d832
chore: bumps @cosmos-client/core and ununifi-client to v0.46.0-rc2
YasunoriMATSUOKA Jun 23, 2022
ee0f205
Merge pull request #233 from UnUniFi/feature/bump-cosmos-client-core-…
YasunoriMATSUOKA Jun 23, 2022
f85a833
feat: disable metamask related feature
YasunoriMATSUOKA Jun 24, 2022
b7620ad
Merge pull request #235 from UnUniFi/feature/disable-metamask-related…
YasunoriMATSUOKA Jun 24, 2022
d3f268e
feat: update cosmos sdk 0.46.0-rc5 only expolorer
Jun 28, 2022
60d1046
feat: update 0.46.0-rc5 portal and so on
Jun 28, 2022
e2954eb
Merge pull request #237 from UnUniFi/feature/update-cosmos-sdk-0.46.0…
taro04 Jun 29, 2022
291a78d
feat: update ununifi-client
Jun 30, 2022
86a9262
fix: refactor separate usecase
uuyu-g Jul 1, 2022
dc0788f
fix: small fix
uuyu-g Jul 1, 2022
9b5e92f
test: add balance usecase test
uuyu-g Jul 1, 2022
569c0c7
fix: refactor separate cosmos rest service
uuyu-g Jul 1, 2022
45afa45
fix: refactor move cosmos sdk in cosmos-rest service
uuyu-g Jul 1, 2022
4ef96d0
fix: refactor throughMap
uuyu-g Jul 1, 2022
1207d31
fix: english comment
uuyu-g Jul 1, 2022
10d3d81
fix: fixed cypress with reference to #239
Jul 1, 2022
e69dae8
feat: fix uppercase number
Jul 1, 2022
e0c40fa
Merge pull request #241 from UnUniFi/feature/search-bar-error
YasunoriMATSUOKA Jul 4, 2022
aeba373
fix: update package.json
uuyu-g Jul 4, 2022
5e3caee
fix: add node type to
uuyu-g Jul 4, 2022
cb05206
Merge pull request #240 from UnUniFi/chore/separate_usecase/portal/ba…
YasunoriMATSUOKA Jul 4, 2022
e0959f2
feat: update
Jul 4, 2022
191258c
feat: fix jest config
Jul 4, 2022
1c378b2
feat: strictly set the ver of the original package
Jul 5, 2022
8c58606
Merge pull request #236 from UnUniFi/feature/update-cosmos-sdk-0.46.0…
YasunoriMATSUOKA Jul 6, 2022
9709354
fix: [shared] nft component spec
uuyu-g Jul 6, 2022
abe0d5d
chore: add jest setting for vscode
uuyu-g Jul 6, 2022
ed8396b
fix: shared tsconfig.spec.json
uuyu-g Jul 6, 2022
41f2566
fix: add test to converter
uuyu-g Jul 6, 2022
7cae9cb
chore: add "jest" to tsconfig.json
uuyu-g Jul 6, 2022
bf35e51
fix: add test to key
uuyu-g Jul 6, 2022
a069865
fix: add test to validation
uuyu-g Jul 6, 2022
a0ff094
fix: import cosmocClient
uuyu-g Jul 6, 2022
f176fe5
fix: add handle error
uuyu-g Jul 6, 2022
aaf22f9
fix: split rest from account.component
uuyu-g Jul 6, 2022
8d44c0d
fix: split rest from txs.component
uuyu-g Jul 6, 2022
6ea70ec
fix: split rest from staking.component
uuyu-g Jul 6, 2022
a175ae7
fix: split rest from distoribution.component
uuyu-g Jul 6, 2022
527b44a
fix: split rest from auction.component
uuyu-g Jul 6, 2022
0840ec9
fix: split rest from auctions.component
uuyu-g Jul 6, 2022
eeffefc
fix: split rest from auction.component
uuyu-g Jul 6, 2022
91abcd5
fix: split rest from place-bid.component
uuyu-g Jul 6, 2022
fffa13d
fix: split rest from send.component
uuyu-g Jul 6, 2022
d0164a6
fix: split rest from validators.component
uuyu-g Jul 6, 2022
788d9a8
fix: split rest from validator.component
uuyu-g Jul 6, 2022
812c735
fix: split rest from delegator.component
uuyu-g Jul 6, 2022
d778895
fix: split rest from validators.component
uuyu-g Jul 6, 2022
e7e8d89
fix: split rest from validator.component
uuyu-g Jul 6, 2022
937ffe0
fix: split rest from vote-form-dialog.component
uuyu-g Jul 6, 2022
0c2d2c7
fix: split rest from deposit-form-dialog.component
uuyu-g Jul 6, 2022
a1a5bc4
fix: split rest from dialogs
uuyu-g Jul 6, 2022
882694b
fix: split rest from home.component
uuyu-g Jul 6, 2022
bdf799d
fix: split rest from home
uuyu-g Jul 6, 2022
45414cd
fix: split rest from keys
uuyu-g Jul 6, 2022
1d00169
fix: split rest from mint
uuyu-g Jul 7, 2022
e19a734
fix: split rest from txs
uuyu-g Jul 7, 2022
f7990e8
fix: split rest from proposals
uuyu-g Jul 7, 2022
0135414
fix: small fix
uuyu-g Jul 7, 2022
6893fdd
fix: rename, coordination of responsibilities
uuyu-g Jul 7, 2022
8e7e8cb
fix: rename
uuyu-g Jul 7, 2022
8b7c516
fix: small fix
uuyu-g Jul 7, 2022
ec00060
fix: change return type (validator)
uuyu-g Jul 7, 2022
4288570
fix: change return type (cdp params)
uuyu-g Jul 7, 2022
245e400
Merge pull request #244 from UnUniFi/chore/split_rest_service
YasunoriMATSUOKA Jul 7, 2022
e0e1065
Merge pull request #242 from UnUniFi/chore/shared/test/utils/converter
YasunoriMATSUOKA Jul 7, 2022
ab78ab2
feat: config.js for new beta test(ununifi-beta-test-v2)
YasunoriMATSUOKA Jul 8, 2022
e59969c
Merge pull request #249 from UnUniFi/feature/config-js-for-new-beta-test
YasunoriMATSUOKA Jul 8, 2022
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
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"ngschematics.schematics": ["./node_modules/angular-firebase-schematics/src/collection.json"]
"ngschematics.schematics": ["./node_modules/angular-firebase-schematics/src/collection.json"],
"jest.jestCommandLine": "ng test"
}
45 changes: 30 additions & 15 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"@angular/platform-browser-dynamic": "~12.2.0",
"@angular/router": "~12.2.0",
"@apollo/client": "^3.0.0",
"@cosmos-client/core": "^0.45.9",
"@cosmos-client/core": "0.46.0-rc7",
"@metamask/detect-provider": "^1.2.0",
"@ngneat/tailwind": "^7.0.3",
"@ngrx/effects": "^12.4.0",
Expand All @@ -78,7 +78,7 @@
"stream-browserify": "^3.0.0",
"stream-http": "^3.2.0",
"tslib": "^2.3.0",
"ununifi-client": "^0.45.1",
"ununifi-client": "0.46.0-rc4",
"zone.js": "~0.11.4"
},
"devDependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ const faucetJpuPort = location.protocol === 'https:' ? 8005 : 8004;
const faucetUethPort = location.protocol === 'https:' ? 8007 : 8006;
const faucetEuuPort = location.protocol === 'https:' ? 8009 : 8008;

const domainCauchyEA = 'ununifi-alpha-test-v1.cauchye.net';
const domainCauchyEA = 'ununifi-alpha-test-v2.cauchye.net';

const chainID = 'ununifi-alpha-test-v1';
const chainID = 'ununifi-alpha-test-v2';
const chainName = 'UnUniFi (alpha-test)';

const bech32Prefix = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ const faucetJpuPort = location.protocol === 'https:' ? 8005 : 8004;
const faucetUethPort = location.protocol === 'https:' ? 8007 : 8006;
const faucetEuuPort = location.protocol === 'https:' ? 8009 : 8008;

const domainCauchyEA = 'ununifi-beta-test-v1.cauchye.net';
const domainCauchyEA = 'ununifi-beta-test-v2.cauchye.net';
// const domainCauchyEB = 'b.private-test.ununifi.cauchye.net';
// const domainCauchyEC = 'c.private-test.ununifi.cauchye.net';
// const domainCauchyED = 'd.private-test.ununifi.cauchye.net';

const chainID = 'ununifi-9-beta-test';
const chainID = 'ununifi-beta-test-v2';
const chainName = 'UnUniFi (beta-test)';

const bech32Prefix = {
Expand Down Expand Up @@ -57,41 +57,42 @@ const configs = [
],
extension: {
faucet: [
{
hasFaucet: false,
faucetURL: `${location.protocol}//${domainCauchyEA}:${faucetUbtcPort}`,
denom: 'ubtc',
creditAmount: 100, // amount to credit in max request
maxCredit: 99, // account has already maxCredit balance cannot claim anymore
},
{
hasFaucet: false,
faucetURL: `${location.protocol}//${domainCauchyEA}:${faucetUguuPort}`,
denom: 'uguu',
creditAmount: 2000000,
maxCredit: 1999999,
},
{
hasFaucet: false,
faucetURL: `${location.protocol}//${domainCauchyEA}:${faucetJpuPort}`,
denom: 'jpu',
creditAmount: 10,
maxCredit: 9,
},
{
hasFaucet: false,
faucetURL: `${location.protocol}//${domainCauchyEA}:${faucetUethPort}`,
denom: 'ueth',
creditAmount: 1000,
maxCredit: 999,
},
{
hasFaucet: false,
faucetURL: `${location.protocol}//${domainCauchyEA}:${faucetEuuPort}`,
denom: 'euu',
creditAmount: 10,
maxCredit: 9,
},
// Todo: After setup faucet, enable the following faucet.
// {
// hasFaucet: false,
// faucetURL: `${location.protocol}//${domainCauchyEA}:${faucetUbtcPort}`,
// denom: 'ubtc',
// creditAmount: 100, // amount to credit in max request
// maxCredit: 99, // account has already maxCredit balance cannot claim anymore
// },
// {
// hasFaucet: false,
// faucetURL: `${location.protocol}//${domainCauchyEA}:${faucetUguuPort}`,
// denom: 'uguu',
// creditAmount: 2000000,
// maxCredit: 1999999,
// },
// {
// hasFaucet: false,
// faucetURL: `${location.protocol}//${domainCauchyEA}:${faucetJpuPort}`,
// denom: 'jpu',
// creditAmount: 10,
// maxCredit: 9,
// },
// {
// hasFaucet: false,
// faucetURL: `${location.protocol}//${domainCauchyEA}:${faucetUethPort}`,
// denom: 'ueth',
// creditAmount: 1000,
// maxCredit: 999,
// },
// {
// hasFaucet: false,
// faucetURL: `${location.protocol}//${domainCauchyEA}:${faucetEuuPort}`,
// denom: 'euu',
// creditAmount: 10,
// maxCredit: 9,
// },
],
monitor: undefined,
navigations: [],
Expand Down
23 changes: 14 additions & 9 deletions projects/explorer/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { CosmosSDKService } from './models/cosmos-sdk.service';
import { SearchResult } from './views/toolbar/toolbar.component';
import { Component, OnInit } from '@angular/core';
import { Router } from '@angular/router';
import { cosmosclient, rest } from '@cosmos-client/core';
import cosmosclient from '@cosmos-client/core';
import { combineLatest, Observable, BehaviorSubject, of } from 'rxjs';
import { mergeMap, map } from 'rxjs/operators';

Expand Down Expand Up @@ -91,12 +91,17 @@ export class AppComponent implements OnInit {
return of(false);
}
try {
return rest.tendermint.getLatestBlock(sdk.rest).then((res) => {
return res.data &&
res.data.block?.header?.height &&
BigInt(res.data.block?.header?.height) > BigInt(searchBoxInputValue)
? BigInt(res.data.block?.header?.height) > BigInt(searchBoxInputValue)
: false;
return cosmosclient.rest.tendermint.getLatestBlock(sdk.rest).then((res) => {
try {
return res.data &&
res.data.block?.header?.height &&
BigInt(res.data.block?.header?.height) > BigInt(searchBoxInputValue)
? BigInt(res.data.block?.header?.height) > BigInt(searchBoxInputValue)
: false;
}
catch (error) {
return false;
}
});
} catch (error) {
return of(false);
Expand Down Expand Up @@ -135,7 +140,7 @@ export class AppComponent implements OnInit {
return of(false);
}
try {
const tx = rest.tx
const tx = cosmosclient.rest.tx
.getTx(sdk.rest, searchBoxInputValue)
.then((res) => {
console.log(res);
Expand Down Expand Up @@ -218,5 +223,5 @@ export class AppComponent implements OnInit {
this.configS.setCurrentConfig(value);
}

ngOnInit() {}
ngOnInit() { }
}
2 changes: 1 addition & 1 deletion projects/explorer/src/app/models/cosmos-sdk.service.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Config, ConfigService } from './config.service';
import { Injectable } from '@angular/core';
import { cosmosclient } from '@cosmos-client/core';
import cosmosclient from '@cosmos-client/core';
import { combineLatest, Observable } from 'rxjs';
import { first, map } from 'rxjs/operators';

Expand Down
12 changes: 6 additions & 6 deletions projects/explorer/src/app/models/cosmos/tx-common.model.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { proto } from '@cosmos-client/core';
import { InlineResponse20074 } from '@cosmos-client/core/esm/openapi';
import cosmosclient from '@cosmos-client/core';
import { InlineResponse20049 } from '@cosmos-client/core/esm/openapi';

export type SimulatedTxResultResponse = {
simulatedResultData: InlineResponse20074;
minimumGasPrice: proto.cosmos.base.v1beta1.ICoin;
estimatedGasUsedWithMargin: proto.cosmos.base.v1beta1.ICoin;
estimatedFeeWithMargin: proto.cosmos.base.v1beta1.ICoin;
simulatedResultData: InlineResponse20049;
minimumGasPrice: cosmosclient.proto.cosmos.base.v1beta1.ICoin;
estimatedGasUsedWithMargin: cosmosclient.proto.cosmos.base.v1beta1.ICoin;
estimatedFeeWithMargin: cosmosclient.proto.cosmos.base.v1beta1.ICoin;
};
20 changes: 10 additions & 10 deletions projects/explorer/src/app/models/cosmos/tx-common.service.ts
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
import { CosmosSDKService } from '../cosmos-sdk.service';
import { SimulatedTxResultResponse } from './tx-common.model';
import { Injectable } from '@angular/core';
import { cosmosclient, proto, rest } from '@cosmos-client/core';
import { InlineResponse20075 } from '@cosmos-client/core/esm/openapi';
import cosmosclient from '@cosmos-client/core';
import { InlineResponse20050 } from '@cosmos-client/core/esm/openapi';

@Injectable({
providedIn: 'root',
})
export class TxCommonService {
constructor(private readonly cosmosSDK: CosmosSDKService) {}
constructor(private readonly cosmosSDK: CosmosSDKService) { }

async simulateTx(
txBuilder: cosmosclient.TxBuilder,
minimumGasPrice: proto.cosmos.base.v1beta1.ICoin,
minimumGasPrice: cosmosclient.proto.cosmos.base.v1beta1.ICoin,
): Promise<SimulatedTxResultResponse> {
const sdk = await this.cosmosSDK.sdk().then((sdk) => sdk.rest);

// restore json from txBuilder
const txForSimulation = JSON.parse(txBuilder.cosmosJSONStringify());
// cosmosclient.rest ore json from txBuilder
const txForSimulation = JSON.parse(txBuilder.protoJSONStringify());

// fix JSONstringify issue
delete txForSimulation.auth_info.signer_infos[0].mode_info.multi;

// simulate
const simulatedResult = await rest.tx.simulate(sdk, {
const simulatedResult = await cosmosclient.rest.tx.simulate(sdk, {
tx: txForSimulation,
tx_bytes: txBuilder.txBytes(),
});
Expand Down Expand Up @@ -62,13 +62,13 @@ export class TxCommonService {
};
}

async announceTx(txBuilder: cosmosclient.TxBuilder): Promise<InlineResponse20075> {
async announceTx(txBuilder: cosmosclient.TxBuilder): Promise<InlineResponse20050> {
const sdk = await this.cosmosSDK.sdk().then((sdk) => sdk.rest);

// broadcast tx
const result = await rest.tx.broadcastTx(sdk, {
const result = await cosmosclient.rest.tx.broadcastTx(sdk, {
tx_bytes: txBuilder.txBytes(),
mode: rest.tx.BroadcastTxMode.Block,
mode: cosmosclient.rest.tx.BroadcastTxMode.Block,
});

window.alert(`Copy the following txHash for AirDrop!\n${result.data.tx_response?.txhash}`);
Expand Down
Loading