Skip to content
This repository has been archived by the owner on Feb 3, 2023. It is now read-only.

Commit

Permalink
change event to indexed
Browse files Browse the repository at this point in the history
  • Loading branch information
hmzdot committed Dec 4, 2021
1 parent 4e48e38 commit 5805465
Show file tree
Hide file tree
Showing 15 changed files with 39 additions and 20 deletions.
2 changes: 1 addition & 1 deletion artifacts/contracts/Clash.sol/Clash.dbg.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../build-info/6f41801786319899e0cb8acfd1eb9986.json"
"buildInfo": "../../build-info/e7c93b25f47472ba6ed2067969d455f1.json"
}
2 changes: 1 addition & 1 deletion artifacts/contracts/Marketplace.sol/Marketplace.dbg.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../build-info/6f41801786319899e0cb8acfd1eb9986.json"
"buildInfo": "../../build-info/e7c93b25f47472ba6ed2067969d455f1.json"
}
2 changes: 1 addition & 1 deletion artifacts/contracts/MatchMaker.sol/MatchMaker.dbg.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../build-info/6f41801786319899e0cb8acfd1eb9986.json"
"buildInfo": "../../build-info/e7c93b25f47472ba6ed2067969d455f1.json"
}
6 changes: 3 additions & 3 deletions artifacts/contracts/MatchMaker.sol/MatchMaker.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion artifacts/contracts/tokens/ARENA.sol/ARENA.dbg.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../build-info/6f41801786319899e0cb8acfd1eb9986.json"
"buildInfo": "../../../build-info/e7c93b25f47472ba6ed2067969d455f1.json"
}
2 changes: 1 addition & 1 deletion artifacts/contracts/tokens/BILIRA.sol/BILIRA.dbg.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../build-info/6f41801786319899e0cb8acfd1eb9986.json"
"buildInfo": "../../../build-info/e7c93b25f47472ba6ed2067969d455f1.json"
}
2 changes: 1 addition & 1 deletion artifacts/contracts/tokens/GOD.sol/GOD.dbg.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../build-info/6f41801786319899e0cb8acfd1eb9986.json"
"buildInfo": "../../../build-info/e7c93b25f47472ba6ed2067969d455f1.json"
}
2 changes: 1 addition & 1 deletion artifacts/contracts/tokens/SONS.sol/SONS.dbg.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../build-info/6f41801786319899e0cb8acfd1eb9986.json"
"buildInfo": "../../../build-info/e7c93b25f47472ba6ed2067969d455f1.json"
}
2 changes: 1 addition & 1 deletion artifacts/contracts/tokens/XP.sol/XP.dbg.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../build-info/6f41801786319899e0cb8acfd1eb9986.json"
"buildInfo": "../../../build-info/e7c93b25f47472ba6ed2067969d455f1.json"
}
2 changes: 1 addition & 1 deletion contracts/MatchMaker.sol
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ contract MatchMaker is Ownable {
mapping(uint256 => WaitingPlayer) public arenaToPlayer;
mapping(address => bool) public inGame;

event GameStarted(uint256 gameId, address instance);
event GameStarted(uint256 indexed gameId, address instance);
event GameRegistered(uint256 gameId);
event WaitingLeave(uint256 gameId);

Expand Down
14 changes: 7 additions & 7 deletions deployment/addresses.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
module.exports = {
God: "0x53a129BfA6eb5d4e4AbE93E2AC685a5c6ab568Ec",
Arena: "0x0AC222E30846EfB98942545E595dfe1190046901",
Sons: "0xc0d13b075cFe80e5eEc2B67E1A50DcC174ddb3A2",
XP: "0x7123660C49Ea63364992167b309055271101b209",
Bilira: "0xb8405e04C54550e1204260957E80929C481001f7",
MatchMaker: "0x509Dd9D637664CDFA3c3c644E20a75b333C9AC16",
Marketplace: "0x98f7e99CEeb4889575Fe025D22A353f164B291A0",
God: '0xc88b2F273b1d7a039Cb1ab008Aa3537F025E16Cd',
Arena: '0xfC49E2DEaEB6ce6A61CA82E02B2173De8ACa9780',
Sons: '0x82C8589248A09C37eA68f92703021996125BB265',
XP: '0x1Deb7ad2923E609E3c65dFD3a7744e899a1f6f04',
Bilira: '0xDd22285F175835B33693C47713904662896Fa748',
MatchMaker: '0xa45b449aB59A270f86e8Fa736E86Ca938836c229',
Marketplace: '0xFD3A07C93ABE61c52553Ac1Dc2a65D85747CeDF8'
}
9 changes: 9 additions & 0 deletions deployment/addresses.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const contractAddresses = {
GodContract: "0xc88b2F273b1d7a039Cb1ab008Aa3537F025E16Cd",
ArenaContract: "0xfC49E2DEaEB6ce6A61CA82E02B2173De8ACa9780",
SonsContract: "0x82C8589248A09C37eA68f92703021996125BB265",
XpContract: "0x1Deb7ad2923E609E3c65dFD3a7744e899a1f6f04",
BiliraContract: "0xDd22285F175835B33693C47713904662896Fa748",
MatchMakerContract: "0xa45b449aB59A270f86e8Fa736E86Ca938836c229",
MarketplaceContract: "0xFD3A07C93ABE61c52553Ac1Dc2a65D85747CeDF8",
};
9 changes: 9 additions & 0 deletions deployment/deployContracts.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,16 @@ async function main() {
"MatchMaker: '" + MatchMaker.address + "',\n" +
"Marketplace: '" + Marketplace.address + "'\n}";

const addressesForTS = "{\n\tGodContract: '" + God.address + "',\n" +
"ArenaContract: '" + Arena.address + "',\n" +
"SonsContract: '" + Sons.address + "',\n" +
"XpContract: '" + XP.address + "',\n" +
"BiliraContract: '" + Bilira.address + "',\n" +
"MatchMakerContract: '" + MatchMaker.address + "',\n" +
"MarketplaceContract: '" + Marketplace.address + "'\n}";

console.log(addresses);
console.log(addressesForTS);
}

main().then(() => {
Expand Down
Empty file added deployment/runEverything.js
Empty file.
3 changes: 2 additions & 1 deletion tests/game.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const ethers = hardhat.ethers;
describe("Game Utility", () => {
const contractNames = ["Marketplace", "MatchMaker", "ARENA", "BILIRA", "GOD", "SONS", "XP"];
let contracts = {}
let [signer, p1, p2];
let signer, p1, p2;

const deploy = async (factory, ...args) => {
return await factory.deploy(...args);
Expand Down Expand Up @@ -47,6 +47,7 @@ describe("Game Utility", () => {

it("Plays a game", async () => {
const { arena, bilira, god, sons, xp, marketplace, matchMaker } = contracts;
console.log(contracts);

const Warrior = [true, 0, 1, 1, 1, 4, 2]
const Archer = [true, 0, 3, 3, 1, 2, 1]
Expand Down

0 comments on commit 5805465

Please sign in to comment.