Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into siliev/upgrade-openze…
Browse files Browse the repository at this point in the history
…ppelin
  • Loading branch information
StefanIliev545 committed Dec 19, 2023
2 parents 2201141 + 98e0913 commit 9f25d9b
Show file tree
Hide file tree
Showing 9 changed files with 76 additions and 29 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/manual-deploy-testnet-l2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ jobs:
name: deploy-l1-artifacts
path: |
deploy-l1-contracts.out
retention-days: 1
retention-days: 7

deploy:
needs: build
Expand Down Expand Up @@ -324,7 +324,7 @@ jobs:
name: deploy-l2-artifacts
path: |
deploy-l2-contracts.out
retention-days: 1
retention-days: 7

deploy-faucet:
name: 'Trigger Faucet deployment for dev- / testnet on a new deployment'
Expand Down
16 changes: 0 additions & 16 deletions go/enclave/enclave.go
Original file line number Diff line number Diff line change
Expand Up @@ -499,10 +499,6 @@ func (e *enclaveImpl) SubmitTx(tx common.EncryptedTx) (*responses.RawTx, common.
if e.crossChainProcessors.Local.IsSyntheticTransaction(*decryptedTx) {
return responses.AsPlaintextError(responses.ToInternalError(fmt.Errorf("synthetic transaction coming from external rpc"))), nil
}
if err = e.checkGas(decryptedTx); err != nil {
e.logger.Info("gas check failed", log.ErrKey, err.Error())
return responses.AsEncryptedError(err, vkHandler), nil
}

if err = e.service.SubmitTransaction(decryptedTx); err != nil {
e.logger.Debug("Could not submit transaction", log.TxKey, decryptedTx.Hash(), log.ErrKey, err)
Expand Down Expand Up @@ -1436,18 +1432,6 @@ func (e *revertError) ErrorData() interface{} {
return e.reason
}

func (e *enclaveImpl) checkGas(tx *types.Transaction) error {
txGasPrice := tx.GasPrice()
if txGasPrice == nil {
return fmt.Errorf("rejected transaction %s. No gas price was set", tx.Hash())
}
minGasPrice := e.config.MinGasPrice
if txGasPrice.Cmp(minGasPrice) == -1 {
return fmt.Errorf("rejected transaction %s. Gas price was only %d, wanted at least %d", tx.Hash(), txGasPrice, minGasPrice)
}
return nil
}

// Returns the params extracted from an eth_getLogs request.
func extractGetLogsParams(paramList []interface{}) (*filters.FilterCriteria, *gethcommon.Address, error) {
// We extract the first param, the filter for the logs.
Expand Down
2 changes: 1 addition & 1 deletion go/enclave/nodetype/sequencer.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ func (s *sequencer) createGenesisBatch(block *common.L1Block) error {

// produce batch #2 which has the message bus and any other system contracts
cb, err := s.produceBatch(
batch.Header.SequencerOrderNo.Add(batch.Header.SequencerOrderNo, big.NewInt(1)),
big.NewInt(0).Add(batch.Header.SequencerOrderNo, big.NewInt(1)),
block.Hash(),
batch.Hash(),
common.L2Transactions{msgBusTx},
Expand Down
23 changes: 23 additions & 0 deletions tools/obscuroscan_v3/frontend/pages/address/[address].tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import Layout from "@/src/components/layouts/default-layout";
import EmptyState from "@/src/components/modules/common/empty-state";
import { Button } from "@/src/components/ui/button";
import { useRouter } from "next/router";
import React from "react";

const AddressDetails = () => {
const { push } = useRouter();

return (
<Layout>
<EmptyState
title="Address Details"
description="Coming soon..."
imageSrc="/assets/images/clock.png"
imageAlt="Clock"
action={<Button onClick={() => push("/")}>Go Home</Button>}
/>
</Layout>
);
};

export default AddressDetails;
23 changes: 23 additions & 0 deletions tools/obscuroscan_v3/frontend/pages/tx/[hash].tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import Layout from "@/src/components/layouts/default-layout";
import EmptyState from "@/src/components/modules/common/empty-state";
import { Button } from "@/src/components/ui/button";
import { useRouter } from "next/router";
import React from "react";

const TransactionDetails = () => {
const { push } = useRouter();

return (
<Layout>
<EmptyState
title="Transaction Details"
description="Coming soon..."
imageSrc="/assets/images/clock.png"
imageAlt="Clock"
action={<Button onClick={() => push("/")}>Go Home</Button>}
/>
</Layout>
);
};

export default TransactionDetails;
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 13 additions & 8 deletions tools/obscuroscan_v3/frontend/src/components/layouts/footer.tsx
Original file line number Diff line number Diff line change
@@ -1,35 +1,43 @@
import { socialLinks, version } from "@/src/lib/constants";
import Link from "next/link";
import { socialLinks, version } from "../../lib/constants";
import {
GitHubLogoIcon,
TwitterLogoIcon,
DiscordLogoIcon,
} from "@radix-ui/react-icons";
import Link from "next/link";

export default function Footer() {
return (
<div className="border-t px-2">
<div className="flex h-16 items-center px-4">
<div className="flex-1 flex items-center space-x-4">
<div className="border-t p-2">
<div className="flex h-16 items-center justify-between px-4 flex-wrap">
<div className="flex items-center space-x-4 pr-2">
<a
href={socialLinks.github}
aria-label="GitHub"
className="text-muted-foreground hover:text-primary transition-colors"
>
<GitHubLogoIcon />
</a>
<a
href={socialLinks.twitter}
aria-label="Twitter"
className="text-muted-foreground hover:text-primary transition-colors"
>
<TwitterLogoIcon />
</a>
<a
href={socialLinks.discord}
aria-label="Discord"
className="text-muted-foreground hover:text-primary transition-colors"
>
<DiscordLogoIcon />
</a>
</div>
<div className="flex items-center justify-center space-x-4 pr-2">
<h3 className="text-xs text-muted-foreground">
Version: {version || "Unknown"}
</h3>
</div>
<div className="flex items-center space-x-4">
<Link
href="/docs/privacy"
Expand All @@ -43,9 +51,6 @@ export default function Footer() {
>
Terms
</Link>
<div className="text-sm font-medium text-muted-foreground">
Version: {version}
</div>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,28 @@ const EmptyState = ({
title,
description,
icon,
imageSrc,
imageAlt,
action,
}: {
title?: string;
description?: string;
icon?: React.ReactNode;
imageSrc?: string;
imageAlt?: string;
action?: React.ReactNode;
}) => {
return (
<div className="flex flex-col items-center justify-center h-full">
<div className="flex flex-col items-center justify-center space-y-4">
{icon && <div className="w-24 h-24">{icon}</div>}
{imageSrc && (
<img
src={imageSrc}
alt={imageAlt || "Empty state"}
className="w-24 h-24 rounded-full"
/>
)}
{title && (
<h3 className="text-2xl font-semibold leading-none tracking-tight">
{title}
Expand Down
5 changes: 3 additions & 2 deletions tools/walletextension/frontend/src/lib/constants.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
export const tenGatewayAddress = process.env.NEXT_PUBLIC_API_GATEWAY_URL || "http://127.0.0.1:3000";
export const tenGatewayAddress =
process.env.NEXT_PUBLIC_API_GATEWAY_URL || "http://127.0.0.1:3000";

export const tenscanLink = "https://testnet.tenscan.com";
export const tenscanLink = "https://testnet.tenscan.io";

export const socialLinks = {
github: "https://github.com/ten-protocol",
Expand Down

0 comments on commit 9f25d9b

Please sign in to comment.