Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/baking-bad/bcd into BCD-2…
Browse files Browse the repository at this point in the history
…81-call-stack-origination
  • Loading branch information
GusevPM committed Oct 15, 2023
2 parents 9bf17a8 + 4888b0d commit 0f74251
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/components/schema/Schema.vue
Original file line number Diff line number Diff line change
Expand Up @@ -787,7 +787,7 @@ export default {
.codemirror-label {
font-size: 12px;
z-index: 100;
z-index: 7;
position: absolute;
transform: translateY(-12px) translateX(12px);
overflow: hidden;
Expand Down
8 changes: 4 additions & 4 deletions src/utils/codemirror.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ export function create() {
// data
{ regex: /(?:Unit|True|False|Pair|Left|Right|Some|None|Elt)(?=\s|;|\)|$)/, token: "keyword" },
// instruction
{ regex: /(?:CAST|RENAME|DROP|DUP|SWAP|PUSH|SOME|NONE|UNIT|NEVER|IF_NONE|UNPAIR|PAIR|CAR|CDR|LEFT|RIGHT|IF_LEFT|IF_RIGHT|NIL|CONS|IF_CONS|SIZE|EMPTY_SET|EMPTY_MAP|MAP|ITER|MEM|GET|UPDATE|IF|LOOP|LOOP_LEFT|LAMBDA|EXEC|DIP|FAILWITH|CONCAT|SLICE|PACK|UNPACK|ADD|SUB|MUL|EDIV|ABS|NEG|LSL|LSR|OR|AND|XOR|NOT|COMPARE|EQ|NEQ|LT|GT|LE|GE|CHECK_SIGNATURE|BLAKE2B|SHA256|SHA512|SHA3|KECCAK|HASH_KEY|DIG|DUG|EMPTY_BIG_MAP|APPLY|ISNAT|INT|PAIRING_CHECK)(?=\s|;|\}|$)/, token: "keyword" },
{ regex: /(?:SELF_ADDRESS|SELF|CONTRACT|TRANSFER_TOKENS|SET_DELEGATE|CREATE_CONTRACT|IMPLICIT_ACCOUNT|NOW|AMOUNT|BALANCE|STEPS_TO_QUOTA|SOURCE|SENDER|ADDRESS|CHAIN_ID|SAPLING_VERIFY_UPDATE|SAPLING_EMPTY_STATE|TOTAL_VOTING_POWER|VOTING_POWER|LEVEL)(?=\s|;|\}|$)/, token: "atom" },
{ regex: /(?:CAST|RENAME|DROP|DUP|SWAP|PUSH|SOME|NONE|UNIT|NEVER|IF_NONE|UNPAIR|PAIR|CAR|CDR|LEFT|RIGHT|IF_LEFT|IF_RIGHT|NIL|CONS|IF_CONS|SIZE|EMPTY_SET|EMPTY_MAP|MAP|ITER|MEM|GET|UPDATE|IF|LOOP|LOOP_LEFT|LAMBDA|EXEC|DIP|FAILWITH|CONCAT|SLICE|PACK|UNPACK|ADD|SUB|MUL|EDIV|ABS|NEG|LSL|LSR|OR|AND|XOR|NOT|COMPARE|EQ|NEQ|LT|GT|LE|GE|CHECK_SIGNATURE|BLAKE2B|SHA256|SHA512|SHA3|KECCAK|HASH_KEY|DIG|DUG|EMPTY_BIG_MAP|APPLY|ISNAT|INT|PAIRING_CHECK|OPEN_CHEST)(?=\s|;|\}|$)/, token: "keyword" },
{ regex: /(?:SELF_ADDRESS|SELF|CONTRACT|TRANSFER_TOKENS|SET_DELEGATE|CREATE_CONTRACT|IMPLICIT_ACCOUNT|NOW|AMOUNT|BALANCE|STEPS_TO_QUOTA|SOURCE|SENDER|ADDRESS|CHAIN_ID|SAPLING_VERIFY_UPDATE|SAPLING_EMPTY_STATE|TOTAL_VOTING_POWER|VOTING_POWER|LEVEL|TICKET|READ_TICKET|SPLIT_TICKET|JOIN_TICKETS)(?=\s|;|\}|$)/, token: "atom" },
// type
{ regex: /(?:option|list|set|contract|pair|or|lambda|map|big_map)(?=\s|\)|$)/, token: "tag" },
{ regex: /(?:key|unit|never|signature|operation|address|int|nat|string|bytes|mutez|bool|key_hash|baker_hash|timestamp|chain_id|sapling_state|sapling_transaction|bls12_381_fr|bls12_381_g1|bls12_381_g2)(?=\s|\)|\}|;|$)/, token: "variable" },
{ regex: /(?:option|list|set|contract|pair|or|lambda|map|big_map|ticket)(?=\s|\)|$)/, token: "tag" },
{ regex: /(?:key|unit|never|signature|operation|address|int|nat|string|bytes|mutez|bool|key_hash|baker_hash|timestamp|chain_id|sapling_state|sapling_transaction|bls12_381_fr|bls12_381_g1|bls12_381_g2|tx_rollup_l2_address|chest_key|chest)(?=\s|\)|\}|;|$)/, token: "variable" },
// macros
{ regex: /(?:IF_SOME|FAIL|ASSERT|ASSERT_NONE|ASSERT_SOME|ASSERT_LEFT|ASSERT_RIGHT|(?:SET|MAP)_C[AD]+R)(?=\s|;|\}|$)/, token: "string-2" },
{ regex: /(?:DII+P|C[AD]{2,}R|DUU+P|P[PAI]{3,}R|UNP[PAI]{3,}R)(?=\s|;|\}|$)/, token: "string-2" },
Expand Down
15 changes: 11 additions & 4 deletions src/views/contract/InfoSection/ContractInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
</v-list-item-title>
</v-list-item-content>
</v-list-item>
<v-list-item v-if="balance">
<v-list-item>
<v-list-item-content>
<v-list-item-subtitle class="overline"
>Balance</v-list-item-subtitle
Expand All @@ -49,13 +49,15 @@
<AccountBox
v-if="contract.manager"
title="Deployed by"
:key="contract.address"
:address="contract.manager"
:network="contract.network"
gutters
/>
<AccountBox
v-if="contract.delegate"
title="Delegated to"
:key="contract.address"
:address="contract.delegate"
:network="contract.network"
gutters
Expand Down Expand Up @@ -104,9 +106,6 @@ export default {
isPaidUsedLoading: true,
paidUsed: null,
}),
mounted() {
this.getInfo();
},
computed: {
isLoading() {
return this.isUsedBytesLoading || this.isPaidUsedLoading
Expand Down Expand Up @@ -134,5 +133,13 @@ export default {
.finally(() => (this.isPaidUsedLoading = false))
},
},
watch: {
address: {
immediate: true,
handler() {
this.getInfo();
},
},
},
};
</script>
16 changes: 16 additions & 0 deletions src/views/contract/MenuToolbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,22 @@ export default {
})
}
if (this.contract.ticket_updates_count > 0) {
tabs.push({
to: this.pushTo({ name: 'ticket_updates' }),
icon: 'mdi-ticket-outline',
text: 'Tickets',
})
}
if (this.metadata) {
tabs.push({
to: this.pushTo({ name: 'metadata' }),
icon: 'mdi-puzzle-outline',
text: 'Metadata',
})
}
tabs.push({
to: this.pushTo({ name: 'fork' }),
icon: 'mdi-source-fork',
Expand Down

0 comments on commit 0f74251

Please sign in to comment.