-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bef5098
commit 9326811
Showing
2 changed files
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.20; | ||
|
||
import { Script, console } from "forge-std/Script.sol"; | ||
import { Points } from "../../src/points/Points.sol"; | ||
import { IPointsView } from "../../src/points/interfaces/IPointsView.sol"; | ||
|
||
contract PointsViewScript is Script { | ||
function run() public { | ||
// Get the points address from environment variable | ||
address pointsAddress = vm.envAddress("POINTS_ADDRESS"); | ||
// Get the user address from environment variable | ||
address userAddress = vm.envAddress("USER_ADDRESS"); | ||
|
||
console.log("Reading Points View for:"); | ||
console.log("Points:", pointsAddress); | ||
console.log("User:", userAddress); | ||
|
||
// Create interface instance | ||
Points points = Points(pointsAddress); | ||
|
||
points.getPointsView(userAddress); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.20; | ||
|
||
import { Script, console } from "forge-std/Script.sol"; | ||
import { Space } from "../../src/spaces/Space.sol"; | ||
import { ISpaceView } from "../../src/spaces/interfaces/ISpaceView.sol"; | ||
|
||
contract SpaceViewScript is Script { | ||
function run() public { | ||
// Get the space address from environment variable | ||
address spaceAddress = vm.envAddress("SPACE_ADDRESS"); | ||
// Get the user address from environment variable | ||
address userAddress = vm.envAddress("USER_ADDRESS"); | ||
|
||
console.log("Reading Space View for:"); | ||
console.log("Space:", spaceAddress); | ||
console.log("User:", userAddress); | ||
|
||
// Create interface instance | ||
Space space = Space(spaceAddress); | ||
|
||
space.getSpaceView(userAddress); | ||
} | ||
} |