1"use strict";(self["webpackChunkping_wallet"]=self["webpackChunkping_wallet"]||[]).push([[3965],{23965:function(t,s,e){e.r(s),e.d(s,{default:function(){return $}});var a=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"container-md"},[e("b-card",[e("b-row",[e("b-col",[e("b-input-group",[e("b-form-input",{attrs:{placeholder:"Button on both side"},model:{value:t.rpc,callback:function(s){t.rpc=s},expression:"rpc"}}),e("b-input-group-append",[e("b-button",{attrs:{variant:"outline-primary"},on:{click:function(s){return t.onchange()}}},[t._v(" Monitor ")])],1)],1)],1)],1),200!==t.httpstatus?e("div",{staticClass:"text-danger"},[t._v(" "+t._s(t.httpstatus)+": "+t._s(t.httpStatusText)+" ")]):t._e()],1),t.roundState["height/round/step"]?e("b-row",[e("b-col",{attrs:{lg:"3",sm:"6"}},[e("dashboard-card-horizontal",{attrs:{icon:"ArrowUpCircleIcon",color:"danger",statistic:t.rate,"statistic-title":"Onboard Rate"}})],1),e("b-col",{attrs:{lg:"3",sm:"6"}},[e("dashboard-card-horizontal",{attrs:{icon:"HashIcon",color:"success",statistic:t.height,"statistic-title":"Height"}})],1),e("b-col",{attrs:{lg:"3",sm:"6"}},[e("dashboard-card-horizontal",{attrs:{icon:"RepeatIcon",statistic:t.round,"statistic-title":"Round"}})],1),e("b-col",{attrs:{lg:"3",sm:"6"}},[e("dashboard-card-horizontal",{attrs:{icon:"CodeIcon",color:"info",statistic:t.step,"statistic-title":"Step"}})],1)],1):t._e(),t.roundState["height/round/step"]?e("b-card",[e("b-card-title",{staticClass:"d-flex justify-content-between"},[e("small",{staticClass:"text-danger"},[t._v("Updated at "+t._s(t.format(t.updatetime)))])]),t._l(t.roundState.height_vote_set,(function(s){return e("div",{key:s.round},[e("small",[t._v("Round: "+t._s(s.round)+" "+t._s(s.prevotes_bit_array))]),e("b-card-body",{staticClass:"px-0"},t._l(s.prevotes,(function(s,a){return e("b-badge",{key:a,staticStyle:{margin:"2px"},attrs:{size:"sm",variant:t.color(a,s)}},[e("small",{staticClass:"small"},[t._v(t._s(t.showName(a,s)))])])})),1)],1)})),e("b-card-footer",[e("b-button",{attrs:{variant:"primary",size:"sm"}}),t._v(" Proposer Signed "),e("b-button",{attrs:{variant:"dark",size:"sm"}}),t._v(" Proposer Not Signed "),e("b-button",{attrs:{variant:"success",size:"sm"}}),t._v(" Signed "),e("b-button",{attrs:{variant:"secondary",size:"sm"}}),t._v(" Not Signed ")],1)],2):t._e(),e("b-alert",{attrs:{variant:"info",show:""}},[e("h4",{staticClass:"alert-heading"},[t._v(" Tips ")]),e("div",{staticClass:"alert-body"},[e("ul",[e("li",[t._v("This tool is useful for validators to monitor who is onboard during an upgrade")]),e("li",[t._v('If you want to change the default rpc endpoint. make sure that "https" and "CORS" are enabled on your server.')])])])])],1)},i=[],r=e(73106),o=e(26034),n=e(26253),c=e(50725),l=e(8775),h=e(40670),d=e(37674),u=e(4060),p=e(22183),v=e(22418),b=e(15193),g=e(47389),_=e(49379),m=e(83300),f=e.n(m),y=e(54333),S=e(19938),x=e.n(S),C=e(14392),w={components:{BAlert:r.F,BBadge:o.k,BRow:n.T,BCol:c.l,BCard:l._,BCardBody:h.O,BCardFooter:d.F,BInputGroup:u.w,BFormInput:p.e,BInputGroupAppend:v.B,BButton:b.T,BAvatar:g.SH,BCardTitle:_._,vSelect:x(),DashboardCardHorizontal:C.Z},data(){const t=(0,y.getLocalChains)();return{showPrevote:!1,httpstatus:200,httpStatusText:"",roundState:{},chains:t,vals:[],positions:[],updatetime:new Date,rpc:"",height:"-",round:"-",step:"-",rate:"-"}},computed:{selected(){return this.$store.state.chains.selected.chain_name}},created(){this.validators(),this.rpc=`${this.chains[this.selected].rpc[0]}/consensus_state`,this.fetchPosition(),this.update(),this.timer=setInterval(this.update,6e3)},beforeDestroy(){clearInterval(this.timer)},methods:{format:t=>(0,y.toDay)(t,"time"),color(t,s){return t===this.roundState.proposer.index?"nil-Vote"===s?"dark":"primary":"nil-Vote"===s?"secondary":"success"},fetchPosition(){const t=this.rpc.replace("consensus_state","dump_consensus_state");f()(t).then((t=>(this.httpstatus=t.status,this.httpStatusText=t.httpStatusText,t.json()))).then((t=>{this.positions=t.result.round_state.validators.validators}))},update(){this.rate="0%",this.updatetime=new Date,200===this.httpstatus&&f()(this.rpc).then((t=>(this.httpstatus=t.status,this.httpStatusText=t.httpStatusText,t.json()))).then((t=>{this.roundState=t.result.round_state;const s=this.roundState["height/round/step"].split("/");this.height=s[0],this.round=s[1],this.step=s[2],this.roundState.height_vote_set.forEach((t=>{const s=Number(t.prevotes_bit_array.substring(t.prevotes_bit_array.length-4));s>0&&(this.rate=`${(100*s).toFixed()}%`)}))})).catch((t=>{this.httpstatus=500,this.httpStatusText=t}))},validators(){const t=this.chains[this.selected];let s=[];this.$http.getValidatorList(t).then((t=>{s=t})).catch((()=>{s=(0,y.getCachedValidators)(this.selected.chain_name)||[]})).finally((()=>{this.vals=s.map((t=>{const s=t;return s.hex=(0,y.consensusPubkeyToHexAddress)(t.consensus_pubkey),s}))}))},onchange(){this.httpstatus=200,this.httpStatusText="",this.roundState={}},showName(t,s){if("nil-Vote"===s){if(this.positions[t]){const s=this.vals.find((s=>s.hex===this.positions[t].address));return s?.description?.moniker||t}return t}const e=s.substring(s.indexOf(":")+1,s.indexOf(" ")),a=s.split(" "),i=this.vals.find((t=>t.hex.startsWith(e)));return`${i?.description?.moniker||e} - ${a[2]}`}}},B=w,T=e(1001),k=(0,T.Z)(B,a,i,!1,null,null,null),$=k.exports},14392:function(t,s,e){e.d(s,{Z:function(){return v}});var a=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("b-card",{attrs:{"no-body":""}},[e("b-card-body",{staticClass:"d-flex justify-content-between align-items-center"},[e("div",{staticClass:"truncate"},[e("h4",{staticClass:"mb-25 font-weight-bolder"},[t._v(" "+t._s(t.statistic||"-")+" ")]),t.statistic&&"-"!==t.statistic?0===t.changes?e("span",[t._v(" "+t._s(t.showPrice(t.statistic,t.statisticTitle))+" ")]):t.changes<0?e("span",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover.v-danger",modifiers:{hover:!0,"v-danger":!0}}],staticClass:"text-danger",attrs:{title:t.changes.toFixed(1)+"%"}},[t._v(" "+t._s(t.showPrice(t.statistic,t.statisticTitle))+" ")]):e("span",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover.v-success",modifiers:{hover:!0,"v-success":!0}}],staticClass:"text-success",attrs:{title:"+"+t.changes.toFixed(1)+"%"}},[t._v(" "+t._s(t.showPrice(t.statistic,t.statisticTitle))+" ")]):e("span",[t._v(t._s(t.statisticTitle))])]),e("b-avatar",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],attrs:{variant:"light-"+t.color,size:"45",text:t.statisticTitle.substring(0,1),title:t.statisticTitle}}
1)],1)],1)},i=[],r=e(8775),o=e(40670),n=e(47389),c=e(5870),l=e(54333),h={components:{BCard:r._,BCardBody:o.O,BAvatar:n.SH,VBTooltip:c.o},directives:{"b-tooltip":c.o},props:{icon:{type:String,required:!0},statistic:{type:[Number,String],required:!0},statisticTitle:{type:String,default:""},color:{type:String,default:"primary"}},data(){return{changes:0}},methods:{showPrice(t,s){const e=String(t).split(" ");if(e.length>=2){const t=this.$store.state.chains.quotes[e[1]];if(t){const s=t[(0,l.getUserCurrency)()];return this.changes=t[`${(0,l.getUserCurrency)()}_24h_change`],`${(0,l.getUserCurrencySign)()}${(Number(e[0].replaceAll(",",""))*s).toFixed(2)}`}}return s}}},d=h,u=e(1001),p=(0,u.Z)(d,a,i,!1,null,null,null),v=p.exports}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.