Files
solana/explorer/src/components/instruction/system/AssignWithSeedDetailsCard.tsx
Josh 413dfb01d5 explorer: Update instruction details cards to handle parsed instructions for system, stake, and bpf-loader (#13247)
* update instruction cards to support system, stake, and bpf-loader parsed instructions
2020-10-28 15:28:12 -07:00

65 lines
1.5 KiB
TypeScript

import React from "react";
import {
SystemProgram,
SignatureResult,
ParsedInstruction,
} from "@solana/web3.js";
import { InstructionCard } from "../InstructionCard";
import { Copyable } from "components/common/Copyable";
import { Address } from "components/common/Address";
export function AssignWithSeedDetailsCard(props: {
ix: ParsedInstruction;
index: number;
result: SignatureResult;
info: any;
}) {
const { ix, index, result, info } = props;
return (
<InstructionCard
ix={ix}
index={index}
result={result}
title="Assign Account w/ Seed"
>
<tr>
<td>Program</td>
<td className="text-lg-right">
<Address pubkey={SystemProgram.programId} alignRight link />
</td>
</tr>
<tr>
<td>Account Address</td>
<td className="text-lg-right">
<Address pubkey={info.account} alignRight link />
</td>
</tr>
<tr>
<td>Base Address</td>
<td className="text-lg-right">
<Address pubkey={info.base} alignRight link />
</td>
</tr>
<tr>
<td>Seed</td>
<td className="text-lg-right">
<Copyable right text={info.seed}>
<code>{info.seed}</code>
</Copyable>
</td>
</tr>
<tr>
<td>Assigned Owner</td>
<td className="text-lg-right">
<Address pubkey={info.owner} alignRight link />
</td>
</tr>
</InstructionCard>
);
}