diff --git a/packages/contracts/script/PostDeploy.s.sol b/packages/contracts/script/PostDeploy.s.sol index 11032e61..bb1fca9b 100644 --- a/packages/contracts/script/PostDeploy.s.sol +++ b/packages/contracts/script/PostDeploy.s.sol @@ -19,9 +19,9 @@ contract PostDeploy is Script { console.log(" ========== PostDeploy ========== "); - address muser = 0x663F3ad617193148711d28f5334eE4Ed07016602; - address mloot = 0x2E983A1Ba5e8b38AAAeC4B440B9dDcFBf72E15d1; - address mplugin = 0x8438Ad1C834623CfF278AB6829a248E37C2D7E3f; + address muser = 0xBC9129Dc0487fc2E169941C75aABC539f208fb01; + address mloot = 0x6e989C01a3e3A94C973A62280a72EC335598490e; + address mplugin = 0xF6168876932289D073567f347121A267095f3DD6; bytes32 merkleRoot = 0x5df91eca63323dbb115087ef262075c5bcea99b8eaf95f520efb8d48ff447499; IWorld(worldAddress).Init(muser, mloot, mplugin,merkleRoot); diff --git a/packages/contracts/src/systems/GameSystem.sol b/packages/contracts/src/systems/GameSystem.sol index a0625249..83581276 100644 --- a/packages/contracts/src/systems/GameSystem.sol +++ b/packages/contracts/src/systems/GameSystem.sol @@ -7,12 +7,14 @@ import { GameConfig,Player,PlayerSeason } from "../codegen/index.sol"; import { BattleState, Buff, PlayerState } from "../codegen/common.sol"; import { BattleListData, BattleList, Player, PlayerData, PlayerLocationLock, BoxListData, BoxList, RandomList, RandomListData } from "../codegen/index.sol"; import { Position } from "./Common.sol"; +import { GAME_CONFIG_KEY, BATTLE_CONFIG_KEY } from "../Constants.sol"; contract GameSystem is System { bytes32 constant GAME_KEY = keccak256("Game-Key"); function submitGem() external{ address sender = _msgSender(); + require(Player.getState(sender) == PlayerState.Preparing, "You should in Preparing state"); uint16 gemBalance = Player.getOreBalance(sender); uint16 seasonBalance = PlayerSeason.getOreBalance(sender); PlayerSeason.setOreBalance(sender,seasonBalance+gemBalance); diff --git a/packages/contracts/worlds.json b/packages/contracts/worlds.json index 3af723f3..cc5c571a 100644 --- a/packages/contracts/worlds.json +++ b/packages/contracts/worlds.json @@ -3,8 +3,8 @@ "address": "0xff2c5b47c0e4924fb2917bfbb714db7f616ac000" }, "33784": { - "address": "0xe233198863b75acc6e1af43daff3f5918e35875e", - "blockNumber": 155549 + "address": "0x6e9474e9c83676b9a71133ff96db43e7aa0a4342", + "blockNumber": 273 }, "421613": { "address": "0x2Bc1034975c3df48D6f3026802f372677844b85d",