Skip to content

Commit

Permalink
Upgrade MUD
Browse files Browse the repository at this point in the history
  • Loading branch information
TiyoSheng committed Dec 6, 2023
1 parent c4a7ac3 commit 2edc6f1
Show file tree
Hide file tree
Showing 20 changed files with 2,096 additions and 3,041 deletions.
8 changes: 3 additions & 5 deletions packages/contracts/mud.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,9 @@ export default mudConfig({
name: "move",
openAccess: true,
},
TempSystem: {
name: "temp",
openAccess: false,
accessList:['0xd5d9aad645671a285d2cadf8e68aef7d74a8a7d1']
InitSystem: {
name: "init",
openAccess: true,
}
},
enums: {
Expand Down Expand Up @@ -121,7 +120,6 @@ export default mudConfig({
maxTimeLimit: "uint256",
maxUserLocationLockTime: "uint256",
maxBoxBindTime: "uint256",
battlefieldPlayers: "address[]",
}
},
Board: {
Expand Down
5 changes: 5 additions & 0 deletions packages/contracts/out/IWorld.sol/IWorld.abi.json
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,11 @@
"internalType": "address",
"name": "_pluginContract",
"type": "address"
},
{
"internalType": "bytes32",
"name": "_merkleRoot",
"type": "bytes32"
}
],
"name": "Init",
Expand Down
5 changes: 5 additions & 0 deletions packages/contracts/out/IWorld.sol/IWorld.abi.json.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,11 @@ declare const abi: [
"internalType": "address",
"name": "_pluginContract",
"type": "address"
},
{
"internalType": "bytes32",
"name": "_merkleRoot",
"type": "bytes32"
}
],
"name": "Init",
Expand Down
512 changes: 261 additions & 251 deletions packages/contracts/out/IWorld.sol/IWorld.json

Large diffs are not rendered by default.

56 changes: 28 additions & 28 deletions packages/contracts/out/Loot.sol/MLoot.json

Large diffs are not rendered by default.

3,462 changes: 1,731 additions & 1,731 deletions packages/contracts/out/User.sol/MUser.json

Large diffs are not rendered by default.

13 changes: 0 additions & 13 deletions packages/contracts/script/BattleConfigInit.sol

This file was deleted.

24 changes: 0 additions & 24 deletions packages/contracts/script/GlobalConfigInit.sol

This file was deleted.

32 changes: 7 additions & 25 deletions packages/contracts/script/PostDeploy.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,12 @@ pragma solidity >=0.8.0;

import { Script } from "forge-std/Script.sol";
import { console } from "forge-std/console.sol";
import { IWorld } from "../src/codegen/world/IWorld.sol";
import { IWorld } from "@codegen/world/IWorld.sol";
import { GameConfigInit } from "./GameConfigInit.sol";
import { BattleConfigInit } from "./BattleConfigInit.sol";
import { GlobalConfigInit } from "./GlobalConfigInit.sol";
import { console } from "forge-std/console.sol";

import { GameConfig, GameConfigData } from "../src/codegen/index.sol";



// import "../src/other/User.sol";
// import "../src/other/Loot.sol";
// import '../src/other/Plugin.sol';

contract PostDeploy is Script {
function run(address worldAddress) external {
// Load the private key from the `PRIVATE_KEY` environment variable (in .env)
Expand All @@ -26,25 +18,15 @@ contract PostDeploy is Script {
vm.startBroadcast(deployerPrivateKey);

console.log(" ========== PostDeploy ========== ");
// MUser muser = new MUser(2, "MUser", "MUser", "", "");
// MLoot mloot = new MLoot("", "MLOOT", "MLOOT", "", 2);
// MPlugin mplugin = new MPlugin(address(mloot),address(muser));
address muser = 0x870526b7973b56163a6997bB7C886F5E4EA53638;
address mloot = 0xD49a0e9A4CD5979aE36840f542D2d7f02C4817Be;
address mplugin = 0xe1Fd27F4390DcBE165f4D60DBF821e4B9Bb02dEd;
IWorld(worldAddress).Init(muser,mloot,mplugin);
//

address muser = 0x09EC9819B6c3777c5C28C9Eebf5fb62cd0DbA479;
address mloot = 0x1e2d1f94c944490D9151724D1809Ba5BF95D4dae;
address mplugin = 0x89bEceA0d28b8b12314CC0b676cb2252639eC88f;
bytes32 merkleRoot = 0x5df91eca63323dbb115087ef262075c5bcea99b8eaf95f520efb8d48ff447499;


// GameConfigInit.initGameConfig(IWorld(worldAddress));
// BattleConfigInit.initBattleConfig(IWorld(worldAddress));
// GlobalConfigInit.initGlobalConfig(IWorld(worldAddress), muser,mloot,mplugin);

IWorld(worldAddress).Init(muser, mloot, mplugin,merkleRoot);

vm.stopBroadcast();
// ------------------ INIT ------------------


// ------------------ INIT ------------------
}
}
29 changes: 0 additions & 29 deletions packages/contracts/script/TempRun.s.sol

This file was deleted.

62 changes: 0 additions & 62 deletions packages/contracts/src/other/Base64.sol

This file was deleted.

Loading

0 comments on commit 2edc6f1

Please sign in to comment.