Skip to content

Commit

Permalink
Updated Namespaces and Project Names (ChainSafe#621)
Browse files Browse the repository at this point in the history
* Moved packages from src/UnityPackages into Packages - Tracked in git

* updated package path in unity_tests.yml

* Changed Library path

* fixed more paths for tests

* Added ignored Samples~ and TestPackage~ files

* Updated scripts

* Updated permissions

* Fixed pathing

* modified packages gitIgnore

* added release bash scripts

* added push to the release scripts

* Renamed files according to the specs

* Chainsafe->ChainSafe

* Fixing the issue of Debug folder not being present

* Fixing broken stuff on Mac

* Lint fix

* Removed triplicated scene imports

* Auto-duplicate Package Samples

* small cleanup

* fix project file

* consistenet workflow triggers

---------

Co-authored-by: robGG1997 <[email protected]>
Co-authored-by: Ryan Noble <[email protected]>
Co-authored-by: Peter Kalambet <[email protected]>
Co-authored-by: kalambet <[email protected]>
  • Loading branch information
5 people authored Sep 18, 2023
1 parent ac652b2 commit a7ef45b
Show file tree
Hide file tree
Showing 264 changed files with 1,157 additions and 1,052 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/activation.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Acquire activation file
name: Acquire Activation File Workflow
on:
workflow_dispatch: {}
jobs:
activation:
name: Request manual activation file 🔑
name: Request manual activation file job 🔑
runs-on: ubuntu-latest
steps:
# Request manual activation file.
Expand Down
53 changes: 6 additions & 47 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -1,73 +1,32 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"
name: CodeQL Workflow

on:
push:
branches: [ "main" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "main" ]
schedule:
- cron: '38 5 * * 4'
branches: [main]

jobs:
analyze:
name: Analyze
# Runner size impacts CodeQL analysis time. To learn more, please see:
# - https://gh.io/recommended-hardware-resources-for-running-codeql
# - https://gh.io/supported-runners-and-hardware-resources
# - https://gh.io/using-larger-runners
# Consider using larger runners for possible analysis time improvements.
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
name: Analyze 🧐
runs-on: ${{ 'ubuntu-latest' }}
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
fail-fast: true
matrix:
language: [ 'csharp' ]
dotnet-version: [ '6.0.x' ]

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality


# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
# If this step fails, then you should remove it and run the build manually (see below)
# - name: Autobuild
# uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.

- name: Setup .NET Core SDK ${{ matrix.dotnet-version }}
uses: actions/setup-dotnet@v3
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/discord.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# This workflow is used to automate the release of notifications to discord

name: Notification on push
name: Notification on Push Workflow

on:
release:
Expand All @@ -10,7 +9,7 @@ jobs:
sending:
runs-on: ubuntu-latest
steps:
- name: Discord notification
- name: Discord notification job
uses: LeGitHubDeTai/github-to-discord@main
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_SECRET }}
Expand Down
15 changes: 9 additions & 6 deletions .github/workflows/duplicate_sample.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,26 @@
name: Duplicate Package Sample
name: Duplicate Package Sample Workflow

on:
pull_request:
branches:
- main
branches: [main]

jobs:
duplicate:
name: duplicate package sample
name: Duplicate samples job 👯
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}

- name: Run duplicate script file
run: bash ${GITHUB_WORKSPACE}/duplicate_package_sample.sh
run: |
export SOURCE_DIRECTORY="${GITHUB_WORKSPACE}/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0-pre001/Web3.Unity Samples/"
export DESTINATION_DIRECTORY="${GITHUB_WORKSPACE}/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/"
rm -r "$DESTINATION_DIRECTORY"
cp -r "$SOURCE_DIRECTORY" "$DESTINATION_DIRECTORY"
- name: Commit and Push
run: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
name: NUnit Tests
name: NUnit Tests Workflow

on:
pull_request:
branches: [main]

jobs:
check:
name: Web3 Tests
name: Web3 tests job 🕸️
runs-on: ubuntu-latest
strategy:
matrix:
dotnet-version: [ '6.0.x' ]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install dependencies
Expand Down
21 changes: 10 additions & 11 deletions .github/workflows/unity_tests.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,27 @@
name: Test Package
name: Test Unity Package Workflow

on:
pull_request:
branches:
- main
branches: [main]

jobs:
testAllModes:
name: Test in ${{ matrix.testMode }}
name: Test Job for Unity Package in ${{ matrix.testMode }} 🕹️
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
projectPath:
- Packages/io.chainsafe.web3-unity
publishPath:
- ${GITHUB_WORKSPACE}/src/ChainSafe.GamingSdk.EVM.Unity/bin/Release/netstandard2.1/publish
- ${GITHUB_WORKSPACE}/src/ChainSafe.Gaming.Unity/bin/Release/netstandard2.1/publish
packageLibraryPath:
- ${GITHUB_WORKSPACE}/Packages/io.chainsafe.web3-unity/Runtime/Libraries
testMode:
- playmode
- editmode
- PlayMode
- EditMode
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
lfs: true
- name: update submodules
Expand All @@ -38,7 +37,7 @@ jobs:
run: dotnet restore
- name: Publish
run: |
dotnet publish --no-restore src/ChainSafe.GamingSdk.EVM.Unity/ChainSafe.GamingSdk.EVM.Unity.csproj -c Release /property:Unity=true
dotnet publish --no-restore src/ChainSafe.Gaming.Unity/ChainSafe.Gaming.Unity.csproj -c Release /property:Unity=true
echo Generated DLLs
ls ${{ matrix.publishPath }}
- name: Publish to Unity Package
Expand All @@ -64,12 +63,12 @@ jobs:
checkName: ${{ matrix.testMode }} Test Results
coverageOptions: 'generateAdditionalMetrics;generateHtmlReport;generateBadgeReport;'
packageMode: true
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
if: always()
with:
name: Test results for ${{ matrix.testMode }}
path: ${{ steps.tests.outputs.artifactsPath }}
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
if: always()
with:
name: Coverage results for ${{ matrix.testMode }}
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -398,3 +398,5 @@ FodyWeavers.xsd

# VS Code files
.vscode/

!/src/ChainSafe.Gaming/Web3/Core/Debug/
20 changes: 11 additions & 9 deletions ChainSafe.Gaming.sln
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,33 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.5.33414.496
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ChainSafe.GamingSDK.EVM", "src\ChainSafe.GamingSDK.EVM\ChainSafe.GamingSDK.EVM.csproj", "{E6CC674F-C552-412E-8272-692CE182AB7A}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ChainSafe.Gaming", "src\ChainSafe.Gaming\ChainSafe.Gaming.csproj", "{E6CC674F-C552-412E-8272-692CE182AB7A}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ChainSafe.GamingSDK.EVM.Tests", "src\ChainSafe.GamingSDK.EVM.Tests\ChainSafe.GamingSDK.EVM.Tests.csproj", "{D63ACB2E-71E2-49C1-AE55-92DFA723391E}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ChainSafe.Gaming.Tests", "src\ChainSafe.Gaming.Tests\ChainSafe.Gaming.Tests.csproj", "{D63ACB2E-71E2-49C1-AE55-92DFA723391E}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ChainSafe.GamingSdk.EVM.Unity", "src\ChainSafe.GamingSdk.EVM.Unity\ChainSafe.GamingSdk.EVM.Unity.csproj", "{14C3ACCB-285C-493C-AD59-73853386095E}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ChainSafe.Gaming.Unity", "src\ChainSafe.Gaming.Unity\ChainSafe.Gaming.Unity.csproj", "{14C3ACCB-285C-493C-AD59-73853386095E}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ChainSafe.GamingSdk.EVM.NetCore", "src\ChainSafe.GamingSdk.EVM.NetCore\ChainSafe.GamingSdk.EVM.NetCore.csproj", "{C1FA80C9-64F5-4213-9938-2CB5323A4823}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ChainSafe.Gaming.NetCore", "src\ChainSafe.Gaming.NetCore\ChainSafe.Gaming.NetCore.csproj", "{C1FA80C9-64F5-4213-9938-2CB5323A4823}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{3F500611-617F-413F-8607-2393B7493585}"
ProjectSection(SolutionItems) = preProject
global.ruleset = global.ruleset
README.md = README.md
setup.bat = setup.bat
setup.sh = setup.sh
release-web3-auth.sh = release-web3-auth.sh
release-web3-unity.sh = release-web3-unity.sh
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ChainSafe.GamingSdk.EVM.Unity.ThirdParty", "src\ChainSafe.GamingSdk.EVM.Unity.ThirdParty\ChainSafe.GamingSdk.EVM.Unity.ThirdParty.csproj", "{9EC71CB4-9401-4E02-AC63-FC13B3D1AA53}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ChainSafe.Gaming.Unity.ThirdParty", "src\ChainSafe.Gaming.Unity.ThirdParty\ChainSafe.Gaming.Unity.ThirdParty.csproj", "{9EC71CB4-9401-4E02-AC63-FC13B3D1AA53}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ChainSafe.GamingSDK.EVM.WebPageWallet", "src\ChainSafe.GamingSDK.EVM.WebPageWallet\ChainSafe.GamingSDK.EVM.WebPageWallet.csproj", "{99E7A645-CAC5-441B-848D-1253405D6400}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ChainSafe.Gaming.WebPageWallet", "src\ChainSafe.Gaming.WebPageWallet\ChainSafe.Gaming.WebPageWallet.csproj", "{99E7A645-CAC5-441B-848D-1253405D6400}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ChainSafe.GamingSdk.EVM.InProcessSigner", "src\ChainSafe.GamingSdk.EVM.InProcessSigner\ChainSafe.GamingSdk.EVM.InProcessSigner.csproj", "{3C01FD36-4D44-4886-A971-4786D99CBFCC}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ChainSafe.Gaming.InProcessSigner", "src\ChainSafe.Gaming.InProcessSigner\ChainSafe.Gaming.InProcessSigner.csproj", "{3C01FD36-4D44-4886-A971-4786D99CBFCC}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ChainSafe.GamingSdk.EVM.InProcessTransactionExecutor", "src\ChainSafe.GamingSdk.EVM.InProcessTransactionExecutor\ChainSafe.GamingSdk.EVM.InProcessTransactionExecutor.csproj", "{457E4582-4CC5-4D42-A0CB-5F48204328FE}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ChainSafe.Gaming.InProcessTransactionExecutor", "src\ChainSafe.Gaming.InProcessTransactionExecutor\ChainSafe.Gaming.InProcessTransactionExecutor.csproj", "{457E4582-4CC5-4D42-A0CB-5F48204328FE}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ChainSafe.GamingSdk.Gelato", "src\ChainSafe.GamingSdk.Gelato\ChainSafe.GamingSdk.Gelato.csproj", "{205BA2B5-B8B0-4860-B8D0-1AFA148D882E}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ChainSafe.Gaming.Gelato", "src\ChainSafe.Gaming.Gelato\ChainSafe.Gaming.Gelato.csproj", "{205BA2B5-B8B0-4860-B8D0-1AFA148D882E}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
20 changes: 10 additions & 10 deletions Packages/io.chainsafe.web3-unity.web3auth/Runtime/Web3AuthWallet.cs
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
using System;
using ChainSafe.GamingSdk.EVM.InProcessSigner;
using ChainSafe.GamingSdk.EVM.InProcessTransactionExecutor;
using ChainSafe.GamingSDK.EVM.Web3.Core;
using ChainSafe.GamingSDK.EVM.Web3.Core.Evm;
using ChainSafe.GamingWeb3;

using Nethereum.ABI.EIP712;
using Nethereum.Signer;
using System.Collections.Generic;
using System.Threading.Tasks;
using Org.BouncyCastle.Utilities.Encoders;
using ChainSafe.Gaming.Evm.Providers;
using ChainSafe.Gaming.Evm.Signers;
using ChainSafe.Gaming.Evm.Transactions;
using ChainSafe.Gaming.InProcessSigner;
using ChainSafe.Gaming.InProcessTransactionExecutor;
using ChainSafe.Gaming.Web3;
using ChainSafe.Gaming.Web3.Core;
using ChainSafe.Gaming.Web3.Core.Evm;
using UnityEngine;
using Web3Unity.Scripts.Library.Ethers.Providers;
using Web3Unity.Scripts.Library.Ethers.Signers;
using Web3Unity.Scripts.Library.Ethers.Transactions;

using Object = UnityEngine.Object;
using TWeb3Auth = Web3Auth;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
using ChainSafe.Gaming.Evm.Signers;
using ChainSafe.Gaming.Web3.Build;
using ChainSafe.Gaming.Web3.Core;
using ChainSafe.Gaming.Web3.Core.Evm;
using ChainSafe.GamingSdk.Web3Auth;
using ChainSafe.GamingSDK.EVM.Web3.Core;
using ChainSafe.GamingSDK.EVM.Web3.Core.Evm;
using ChainSafe.GamingWeb3.Build;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using Web3Unity.Scripts.Library.Ethers.Signers;


public static class Web3AuthWalletExtensions
{
Expand Down
1 change: 1 addition & 0 deletions Packages/io.chainsafe.web3-unity/Editor/ServerSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using ChainSafe.GamingSdk.Editor;
using System.IO;
using System.Text;
using ChainSafe.Gaming.UnityPackage;

public class ChainSafeServerSettings : EditorWindow
{
Expand Down
1 change: 1 addition & 0 deletions Packages/io.chainsafe.web3-unity/Editor/Startup.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using UnityEngine;
using UnityEditor;
using System;
using ChainSafe.Gaming.UnityPackage;
using PlasticPipe.PlasticProtocol.Messages;

namespace ChainSafe.GamingSdk.Editor
Expand Down
Loading

0 comments on commit a7ef45b

Please sign in to comment.