Skip to content

Commit

Permalink
feat: added dev folder for compilation the project
Browse files Browse the repository at this point in the history
  • Loading branch information
RutvikGhaskataEalf committed Nov 22, 2024
1 parent 1328573 commit 3238091
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 2 deletions.
13 changes: 13 additions & 0 deletions packages/aelf-smartcontract-viewer/dev/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!-- dev/index.html -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Dev Test</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="./index.tsx"></script>
</body>
</html>
22 changes: 22 additions & 0 deletions packages/aelf-smartcontract-viewer/dev/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// dev/index.tsx
import React from "react";
import ReactDOM from "react-dom";
import { ContractView } from "../src/component/contract-view";
import AElf from "aelf-sdk";

const App = () => {
const aelfWallet = AElf.wallet.getWalletByPrivateKey("395644ebc31ef9e7f266a1cf23023beb66f7a298509f251e819d540a540cb89a");

return (
<main>
<ContractView
wallet={aelfWallet}
address={"2vojXfVXL3iaKTwJue4sEa5fpbhcdrscDHw81SnCtCdWLu4JFs"}
rpcUrl="https://tdvw-test-node.aelf.io"
contractName={"contractViewerAddress"}
/>
</main>
);
};

ReactDOM.render(<App />, document.getElementById("root"));
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,7 @@ export const ContractView = ({
setAelfWallet(wallet);
}
}, [address, wallet]);
const defaultContent =
"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.";

return (
<NextUIProvider>
<div className={`contract-view-container ${theme}`}>
Expand Down

0 comments on commit 3238091

Please sign in to comment.