@moltium/world-core 0.1.11 → 0.1.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moltium/world-core",
3
- "version": "0.1.11",
3
+ "version": "0.1.13",
4
4
  "description": "World runtime for creating agent simulation environments with A2A-based admission and blockchain validation",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -0,0 +1,50 @@
1
+ // SPDX-License-Identifier: MIT
2
+ pragma solidity ^0.8.24;
3
+
4
+ import {Script, console} from "forge-std/Script.sol";
5
+ import {WorldToken} from "../contracts/WorldToken.sol";
6
+
7
+ /**
8
+ * Standalone token deployment script
9
+ *
10
+ * Usage:
11
+ * forge script script/DeployToken.s.sol:DeployTokenScript --rpc-url monad --broadcast -vvv
12
+ *
13
+ * Required env vars:
14
+ * DEPLOYER_PRIVATE_KEY - Private key for deployment
15
+ * TOKEN_NAME - Token name
16
+ * TOKEN_SYMBOL - Token symbol
17
+ * TOKEN_INITIAL_SUPPLY - Initial supply (in whole tokens)
18
+ *
19
+ * Optional env vars:
20
+ * TOKEN_DECIMALS - Decimals (default: 18)
21
+ * TOKEN_MAX_SUPPLY - Max supply (unused, reserved for future)
22
+ */
23
+ contract DeployTokenScript is Script {
24
+ function run() external {
25
+ // Load environment variables
26
+ uint256 deployerPrivateKey = vm.envUint("DEPLOYER_PRIVATE_KEY");
27
+ string memory tokenName = vm.envOr("TOKEN_NAME", string("World Token"));
28
+ string memory tokenSymbol = vm.envOr("TOKEN_SYMBOL", string("WORLD"));
29
+ uint256 initialSupply = vm.envOr("TOKEN_INITIAL_SUPPLY", uint256(1000000));
30
+ uint8 tokenDecimals = uint8(vm.envOr("TOKEN_DECIMALS", uint256(18)));
31
+
32
+ console.log("Deploying WorldToken...");
33
+ console.log(" Name:", tokenName);
34
+ console.log(" Symbol:", tokenSymbol);
35
+ console.log(" Initial Supply:", initialSupply);
36
+ console.log(" Decimals:", tokenDecimals);
37
+
38
+ vm.startBroadcast(deployerPrivateKey);
39
+
40
+ WorldToken token = new WorldToken(tokenName, tokenSymbol, initialSupply, tokenDecimals);
41
+
42
+ vm.stopBroadcast();
43
+
44
+ console.log("\n=====================================");
45
+ console.log("Token deployed:", address(token));
46
+ console.log("=====================================");
47
+ console.log("\nAdd to your .env file:");
48
+ console.log("WORLD_TOKEN_ADDRESS=", address(token));
49
+ }
50
+ }