Skip to content

Commit

Permalink
feat(examples/multiple-accounts): show tx.origin (#2126)
Browse files Browse the repository at this point in the history
Co-authored-by: alvarius <alvarius@lattice.xyz>
  • Loading branch information
qbzzt and alvrs committed Jan 30, 2024
1 parent 475e9c0 commit 570456d
Show file tree
Hide file tree
Showing 5 changed files with 152 additions and 29 deletions.
2 changes: 2 additions & 0 deletions examples/multiple-accounts/packages/client/src/App.tsx
Expand Up @@ -72,13 +72,15 @@ export const App = () => {
<tbody>
<tr>
<th>Caller</th>
<th>tx.sender</th>
<th>Time</th>
</tr>
{
// Show all the calls
calls.map((call) => (
<tr key={call.id}>
<td>{call.key.caller}</td>
<td>{call.value.sender}</td>
<td>{timestamp2Str(Number(call.value.callTime))}</td>
</tr>
))
Expand Down
Expand Up @@ -9,6 +9,7 @@ export default mudConfig({
},
valueSchema: {
callTime: "uint256",
sender: "address",
},
},
},
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Expand Up @@ -6,6 +6,6 @@ import { LastCall } from "../codegen/index.sol";

contract LastCallSystem is System {
function newCall() public {
LastCall.set(_msgSender(), block.timestamp);
LastCall.set(_msgSender(), block.timestamp, tx.origin);
}
}

0 comments on commit 570456d

Please sign in to comment.