Skip to content

Commit

Permalink
Add gas price and amount
Browse files Browse the repository at this point in the history
  • Loading branch information
dangershony committed Feb 28, 2022
1 parent d97841c commit 3bf908a
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,14 @@ <h3><i class="fas fa-receipt"></i>&nbsp;&nbsp;Smart Contract Details</h3>
<span>Gas Used</span>
<span>{{transaction.gasUsed }}</span>
</div>
<div>
<span>Gas Price</span>
<span>{{transaction.gasPrice }}</span>
</div>
<div>
<span>Amount</span>
<span>{{transaction.amount | amount}}</span>
</div>
<div>
<span>From Address</span>
<span>{{transaction.fromAddress}}</span>
Expand Down Expand Up @@ -96,7 +104,7 @@ <h3>Transactions ({{total}})</h3>
<span class="left">{{item.methodName}}</span>
<span class="left"> <a class="number" [routerLink]="['../../block', item.blockIndex]">{{item.blockIndex}}</a></span>
<span class="address left" tippy tippyType="address">{{item.fromAddress}}</span>
<span class="number left">{{item.gasUsed | amount}} {{setup.Chain.Symbol}}</span>
<span class="number left">{{item.amount | amount}} {{setup.Chain.Symbol}}</span>
</div>
<br>
<app-progress class="centered" *ngIf="loading">Loading more transactions...</app-progress>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,14 @@ <h3><i class="fas fa-receipt"></i>&nbsp;&nbsp;Smart Contract Transaction Details
<span>Gas Used</span>
<span>{{transaction.gasUsed }}</span>
</div>
<div>
<span>Gas Price</span>
<span>{{transaction.gasPrice }}</span>
</div>
<div>
<span>Amount</span>
<span>{{transaction.amount | amount}}</span>
</div>
<div>
<span>From Address</span>
<span>{{transaction.fromAddress}}</span>
Expand All @@ -64,7 +72,7 @@ <h3><i class="fas fa-receipt"></i>&nbsp;&nbsp;Smart Contract Transaction Details
<span><a [routerLink]="['../../','transaction', transaction.transactionId]">{{transaction.transactionId | slice:0:20}}</a></span>
</div>


<div *ngIf="transaction.error">
<span>Error</span>
<span>{{transaction.error}}</span>
Expand Down
54 changes: 29 additions & 25 deletions src/Blockcore.Explorer/ClientApp/src/chain.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
{
"Chain": {
"Name": "Your Custom Blockchain",
"Symbol": "COIN",
"Description": "Blockcore Custom Blockchain",
"Url": "https://www.blockcore.net/",
"Logo": "https://www.blockcore.net/assets/blockcore-256x256.png",
"Icon": "https://www.blockcore.net/assets/blockcore-256x256.png",
"Color": "#f3b623"
"Name": "Cirrus",
"Symbol": "CRS",
"Description": "Cirrus - a Stratis sidechain scaling protocol",
"Url": "https://stratisplatform.com/",
"Logo": "https://chainz.cryptoid.info/logo/cirrus.png",
"Icon": "https://chainz.cryptoid.info/logo/fav/?cirrus.png",
"Color": "#3bb0ba"
},
"Network": {
"NetworkConsensusFactoryType": "NBitcoin.PosConsensusFactory, Blockcore.NBitcoin",
"NetworkPubkeyAddressPrefix": 0,
"NetworkScriptAddressPrefix": 5,
"NetworkWitnessPrefix": "coin",
"P2PPort": 8333,
"RPCPort": 8332,
"APIPort": 37220
"NetworkConsensusFactoryType": "Cirrus.SmartContractConsensusFactory, Cirrus",
"NetworkPubkeyAddressPrefix": 28,
"NetworkScriptAddressPrefix": 88,
"NetworkWitnessPrefix": "CRS",
"P2PPort": 16179,
"RPCPort": 16175,
"APIPort": 37223
},
"Indexer": {
"StoreRawTransactions": true
Expand All @@ -30,25 +30,29 @@
"AutoConvert": false
},
"Ticker": {
"WebUrl": "https://coinpaprika.com/coin/btc-bitcoin/",
"ApiUrl": "https://api.coinpaprika.com/v1/tickers/btc-bitcoin?quotes=USD,BTC",
"PricePath": "quotes.BTC.price",
"PricePathBTC": "quotes.BTC.price",
"PricePathUSD": "quotes.USD.price",
"PercentagePath": "quotes.BTC.percent_change_1h",
"WebUrl": "https://www.coingecko.com/en/coins/cirrus",
"ApiUrl": "https://api.coingecko.com/api/v3/coins/cirrus/tickers",
"PricePath": "tickers.0.last",
"PricePathBTC": "tickers.0.last",
"PricePathUSD": "tickers.0.converted_last.usd",
"PercentagePath": "",
"IsBitcoinPrice": true
},
"Setup": {
"Title": "Your Blockchain Explorer",
"Footer": "Blockchain for Blockcore. Empowering developers to make custom blockchains.",
"Title": "Cirrus Explorer",
"Footer": "Stratis Sidechain Network",
"Links": [
{
"icon": "fas fa-link",
"url": "https://stratisplatform.com/"
},
{
"icon": "fab fa-github",
"url": "https://github.com/block-core"
"url": "https://github.com/stratisproject"
},
{
"icon": "fas fa-link",
"url": "https://www.blockcore.net/"
"icon": "fab fa-discord",
"url": "https://discordapp.com/invite/9tDyfZs"
}
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

export const environment = {
production: false,
useLocalIndexer: false,
local: false // Set this to true to load your local "chain.json".
useLocalIndexer: true,
local: false //true // Set this to true to load your local "chain.json".
};

/*
Expand Down

0 comments on commit 3bf908a

Please sign in to comment.