Skip to content
This repository has been archived by the owner on Feb 24, 2025. It is now read-only.

Commit

Permalink
Conflict resolution e3b3468.
Browse files Browse the repository at this point in the history
  • Loading branch information
rkachowski committed Apr 4, 2023
2 parents 10dd1ff + e3b3468 commit 7091f9f
Show file tree
Hide file tree
Showing 113 changed files with 5,561 additions and 1,227 deletions.
5 changes: 5 additions & 0 deletions .dialyzer-ignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ lib/block_scout_web/templates/address_contract/index.html.eex:170
lib/block_scout_web/templates/address_contract/index.html.eex:207
lib/explorer/third_party_integrations/sourcify.ex:159
lib/explorer/third_party_integrations/sourcify.ex:162
lib/explorer/smart_contract/solidity/verifier.ex:317
lib/block_scout_web/templates/address_contract/index.html.eex:158
lib/block_scout_web/templates/address_contract/index.html.eex:195
lib/explorer/third_party_integrations/sourcify.ex:120
lib/explorer/third_party_integrations/sourcify.ex:123
lib/block_scout_web/views/transaction_view.ex:137
lib/block_scout_web/views/transaction_view.ex:152
lib/block_scout_web/views/transaction_view.ex:197
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,7 @@ jobs:
ADMIN_PANEL_ENABLED: "true"
ACCOUNT_ENABLED: "true"
ACCOUNT_REDIS_URL: "redis://localhost:6379"
API_V2_ENABLED: "true"
- name: Upload Unit Test Results
if: always()
uses: actions/upload-artifact@v2
Expand Down
15 changes: 13 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,14 @@

### Features

- [#5561](https://github.com/blockscout/blockscout/pull/5561), [#6523](https://github.com/blockscout/blockscout/pull/6523) - Improve working with contracts implementations
- [#6401](https://github.com/blockscout/blockscout/pull/6401) - Add Sol2Uml contract visualization
- [#6481](https://github.com/blockscout/blockscout/pull/6481) - Smart contract verification improvements
- [#6444](https://github.com/blockscout/blockscout/pull/6444) - Add support for yul verification via rust microservice
- [#6440](https://github.com/blockscout/blockscout/pull/6440) - Add support for base64 encoded NFT metadata
- [#6407](https://github.com/blockscout/blockscout/pull/6407) - Indexed ratio for int txs fetching stage
- [#6324](https://github.com/blockscout/blockscout/pull/6324) - Add verified contracts list page
- [#6379](https://github.com/blockscout/blockscout/pull/6379) - API v2 for frontend
- [#6379](https://github.com/blockscout/blockscout/pull/6379), [#6429](https://github.com/blockscout/blockscout/pull/6429) - API v2 for frontend
- [#6351](https://github.com/blockscout/blockscout/pull/6351) - Enable forum link env var
- [#6316](https://github.com/blockscout/blockscout/pull/6316) - Copy public tags functionality to master
- [#6196](https://github.com/blockscout/blockscout/pull/6196) - INDEXER_CATCHUP_BLOCKS_BATCH_SIZE and INDEXER_CATCHUP_BLOCKS_CONCURRENCY env varaibles
Expand All @@ -18,11 +23,16 @@
- [#6391](https://github.com/blockscout/blockscout/pull/6391), [#6427](https://github.com/blockscout/blockscout/pull/6427) - TokenTransfer token_id -> token_ids migration
- [#6443](https://github.com/blockscout/blockscout/pull/6443) - Drop internal transactions order index
- [#6450](https://github.com/blockscout/blockscout/pull/6450) - INDEXER_INTERNAL_TRANSACTIONS_BATCH_SIZE and INDEXER_INTERNAL_TRANSACTIONS_CONCURRENCY env variables
- [#6454](https://github.com/blockscout/blockscout/pull/6454) - INDEXER_RECEIPTS_BATCH_SIZE, INDEXER_RECEIPTS_CONCURRENCY, INDEXER_COIN_BALANCES_BATCH_SIZE, INDEXER_COIN_BALANCES_CONCURRENCY env variables
- [#6476](https://github.com/blockscout/blockscout/pull/6476), [#6484](https://github.com/blockscout/blockscout/pull/6484) - Update token balances indexes

### Fixes

- [#6532](https://github.com/blockscout/blockscout/pull/6532) - Fix index creation migration
- [#6473](https://github.com/blockscout/blockscout/pull/6473) - Fix state changes for contract creation transactions
- [#6475](https://github.com/blockscout/blockscout/pull/6475) - Fix token name with unicode graphemes shortening
- [#6420](https://github.com/blockscout/blockscout/pull/6420) - Fix address logs search
- [#6390](https://github.com/blockscout/blockscout/pull/6390) - Fix transactions responses in API v2
- [#6390](https://github.com/blockscout/blockscout/pull/6390), [#6502](https://github.com/blockscout/blockscout/pull/6502), [#6511](https://github.com/blockscout/blockscout/pull/6511) - Fix transactions responses in API v2
- [#6357](https://github.com/blockscout/blockscout/pull/6357), [#6409](https://github.com/blockscout/blockscout/pull/6409), [#6428](https://github.com/blockscout/blockscout/pull/6428) - Fix definitions of NETWORK_PATH, API_PATH, SOCKET_ROOT: process trailing slash
- [#6338](https://github.com/blockscout/blockscout/pull/6338) - Fix token search with space
- [#6329](https://github.com/blockscout/blockscout/pull/6329) - Prevent logger from truncating response from rust verifier service in case of an error
Expand All @@ -42,6 +52,7 @@
- [#6336](https://github.com/blockscout/blockscout/pull/6336) - Fix sending request on each key in token search
- [#6327](https://github.com/blockscout/blockscout/pull/6327) - Fix and refactor address logs page and search
- [#6449](https://github.com/blockscout/blockscout/pull/6449) - Search min_missing_block_number from zero
- [#6492](https://github.com/blockscout/blockscout/pull/6492) - Remove token instance owner fetching

### Chore

Expand Down
82 changes: 82 additions & 0 deletions apps/block_scout_web/assets/js/pages/sol2uml.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
import 'viewerjs/dist/viewer.min.css'
import Viewer from 'viewerjs'
import $ from 'jquery'
import { createStore, connectElements } from '../lib/redux_helpers.js'

export const initialState = {
contract_svg: null,
visualize_error: null
}

export function reducer (state = initialState, action) {
switch (action.type) {
case 'SVG_FETCHED': {
return Object.assign({}, state, {
contract_svg: action.contract_svg,
visualize_error: action.error
})
}
default:
return state
}
}

const elements = {
'[data-selector="contract-image"]': {
render ($el, state, oldState) {
if (state.contract_svg) {
$('#spinner').hide()
$('#gallery img').attr('src', 'data:image/svg+xml;base64,' + state.contract_svg)
const gallery = document.getElementById('gallery')
const viewer = new Viewer(gallery, {
inline: false,
toolbar: {
zoomIn: 2,
zoomOut: 4,
oneToOne: 4,
reset: 4,
play: {
show: 4,
size: 'large'
},
rotateLeft: 4,
rotateRight: 4,
flipHorizontal: 4,
flipVertical: 4
}
})
viewer.update()
$el.show()
} else if (state.visualize_error) {
$('#spinner').hide()
$el.empty().text('Cannot visualize contract: ' + state.visualize_error)
$el.show()
} else {
$('#spinner').show()
$el.hide()
}
}
}
}

function loadSvg (store) {
const $element = $('[data-async-contract-svg]')
const path = $element.data().asyncContractSvg

function fetchSvg () {
$.getJSON(path)
.done((response) => {
store.dispatch(Object.assign({ type: 'SVG_FETCHED' }, response))
})
}

fetchSvg()
}

function main () {
const store = createStore(reducer)
connectElements({ store, elements })
loadSvg(store)
}

main()
Loading

0 comments on commit 7091f9f

Please sign in to comment.