Skip to content

Commit

Permalink
chore: add global config init
Browse files Browse the repository at this point in the history
  • Loading branch information
lewis committed Oct 18, 2023
1 parent 3fdbf0d commit 61544e2
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions packages/contracts/script/GlobalConfigInit.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;

import {console} from "forge-std/console.sol";
import {IWorld} from "../src/codegen/world/IWorld.sol";
import {GlobalConfig} from "../src/codegen/Tables.sol";
import { GLOBAL_CONFIG_KEY } from "../src/Constants.sol";

library GlobalConfigInit {
function initGlobalConfig(IWorld _world) internal {
address userContract = 0x09aDeA780C664D100374fcdE48dF82290270f4D2;
GlobalConfig.setUserContract(
_world,
GLOBAL_CONFIG_KEY, //key
userContract
);
}
}

0 comments on commit 61544e2

Please sign in to comment.