Skip to content

Commit

Permalink
v2.0.0 release (#120)
Browse files Browse the repository at this point in the history
* update logic for active signer check (#65)

* upgrade to thirdweb sdk v4.15.0 (#66)

* upgrade to thirdweb sdk v4.15.0

* remove obsolete thirdweb assets

* update code to work with new sdk

* deprecate ThirdwebManager usage in favour of ThirdwebSDK (#67)

* deprecate ThirdwebManager usage in favour of ThirdwebSDK

* remove test harness config

* remove config assets

* break out supported chains to separate var for consistency

* gitignore configs

* pull supported chains from constants; revert newtonsoft imports

---------

Co-authored-by: Alec Ananian <[email protected]>

* support desktop target in helika config (#68)

* Marco/profile logo (#69)

* make header logo scale with image

* add public GetProject method

* download image from url

* remove player prefs

---------

Co-authored-by: Alec Ananian <[email protected]>

* add abi param to write transaction request

* [WIP] Remove Unity API usage from Analytics (#63)

* swap UnityWebRequest for HttpClient

* remove unity api dependency for analytics

* minor var name changes

* further renaming

* dispatch TKDLogger callbacks from main thread

* added additional tracking ui/methods

* rudimentary pass at engine api isolation

* formatting

* tweaks to abstracted engine api

* added player prefs to TDKAbstractedEngineApi

* implemented local settings for persisted even batches

* clarified highPriority condition and failover

* only print num persisted batches if there are any

* add public FlushCache method

* add code for deleting stale batch files (30 days old) - commented

* typo

* change scripting define to TREASURE_ANALYTICS; add highPriority var to event tracking

* use higher-level tasks for analytics cache

* flush disc cache on startup

* workaround for webgl event tracking

- track immediate with no caching

* Update Assets/Treasure/TDK/Runtime/Utils/LocalSettings.cs

Co-authored-by: lefarchi <[email protected]>

* Update Assets/Treasure/TDK/Runtime/Utils/LocalSettings.cs

Co-authored-by: lefarchi <[email protected]>

* Add test setup and analytics test (WIP) (#70)

* Add test setup and analytics test (WIP)

* Allow mocking httpClient for tests + improve analytics test

* Test batch events (WIP)

* Fix infinite retries when uploading disk event cache

* Properly log errors when flushing events. Roll back changes to TDK initializer

* Use PostAsync instead of SendAsync

* Improve error handling

---------

Co-authored-by: lefarchi <[email protected]>

* Update dev server URL (#71)

* upgrade to Thirdweb SDK v4.16.4; fix session start and social login (#72)

* Update dev server URL

* Update thirdweb SDK to v4.16.4

* Set smart wallet config defaults (fixes Start User Session)

* Properly pass clientId when connecting (fixes socials login)

---------

Co-authored-by: Alec Ananian <[email protected]>

* update thirdweb version (#73)

* Dispaly error message when user dont have internet connection.

* Invert internet connection condition for clarity

* Run disk flush independently every 60 seconds to ensure there is no overlap

* Remove unnecessary Task.Run nesting. Remove redundant FlushDiskCache call.

* Add internet connection check to abstracted engine api

* Skip disk flush when no internet available

* Change tabs to spaces

* Avoid unnecessary log when there is no connection

* Fix/opt click out error (#76)

* Fix issues with email + otp login
- Fix object reference error when clicking out of otp screen and connecting again
- Fix infinite spinner when submitting otp a second time

* Request OTP again if user manually hits disconnect button

* Remove unity editor reference from otp submit logic

* Use EndUserSession when user disconnects

* Suggested changes

* fix bridgeworld deposit magic helper (#77)

* fix server time url (#78)

* fix server time url (#79)

* v0.5.0 Prep (#81)

* change default logo and game name

* bumped version to 0.5.0

* upgrade helika sdk to 0.2.0

* upgrade thirdweb sdk to 4.16.6

* Print a warning when config for a service is missing (#82)

---------

Co-authored-by: lefarchi <[email protected]>

* comment method decorators for individual config creation (#83)

* clear out readme and point to docs portal

* Add Magicswap submodule with first 3 endpoints (+ harness test screen) (#85)

* Add Magicswap submodule with first 3 endpoints (+ harness test screen)

* Move api calls to TDK.API class

* Integration tests, logger levels, magicswap tweaks, chain switching improvements (#86)

* Add integration test for connect flow

* Add loggerLevel and autoInitialize properties to TDKConfig

* Fix Magicswap type (priceUSD). Improve error handling on UI

* Refactor TDKLogger

* Use LogDebug to log event payload. Allow config of different log level for prod

* Tweak MagicswapUI responsiveness

* Use debug logger in tests. Update integration tests

* Skip unnecessarily re-initializing thirdweb sdk when switching to same chain

* Tests for IdentityUI

* Properly reconnect when switching chains after socials login

* Refactor reconnect methods. Expose Reconnect(email) method

* Rename methods for clarity

* add swap functionality to Magicswap service (#87)

* Swap endpoint (WIP)

* Add swap method to magicswap module

* Misc improvements

* Show relevant metadata for magicswap

* Remove hardcoded treasure id

* Use magic contract address. Clean up TODOs

* Use AppSettingsData for project info. Remove references to Project (#88)

* Use AppSettingsData for project info. Remove references to Project

* rename vars for clarity

* Add Edit Settings item under Treasure menu

* New JSON shape and unify config files
- Merge AppSettingsData into TDKConfig
- Merge TDKThirdwebConfig into TDKConfig
- Update json parser for new format
- Remove LoginSettings config

* add nativeTokenLimitPerTransaction parsing from config

---------

Co-authored-by: Alec Ananian <[email protected]>

* Add API key header to HTTP requests (#89)

* add api key handling to tdk config

* added x-api-key header additions to darkmatter ingest

* add x-api-key header to timekeeper request

* fix webgl ref

* Add api key to TDK.API requests. Remove api key from timekeeper requests

---------

Co-authored-by: lefarchi <[email protected]>

* Create classes for TDK config sections so they are grouped in inspector (#90)

* Add tdk props to Helika tracking (#91)

* add tdk props to helika tracking

* track to correct service

* upgrade thirdweb sdk to v4.19.0 (#92)

* Switch to explicit disable vs enable scripting define for Treasure analytics (#93)

* switch to explicit disable vs enable scripting define for treasure analytics

* remove TDK_THIRDWEB scripting define usage

* bumped tdk version to v1.0.0

* fix chain_id event prop addition for helika

* brought in thirdweb sdk 4.20.0

* Change TREASURE_ANALYTICS to !DISABLE_TREASURE_ANALTYICS in test asmdef constraints

* bypass kochava error

---------

Co-authored-by: lefarchi <[email protected]>

* Add magicswap liquidity endpoints (#94)

* Implement "add liquidity" in harness
- Button to approve treasures for magicswap
- Show treasures approval status in label
- Pass proper args to AddLiquidity

* Properly send backendWallet in magicswap endpoints

* Default swapLeftover to true

* Magicswap remove liquidity (#95)

* Refactor magicswapUI add liquidity for clarity

* Set isExactOut to true on test swap

* Implement RemoveLiquidity. Add button to approve LP

* update session validation logic (#97)

* Skip custom logging logic when app is shutting down (#96)

* Skip custom logging logic when app is shutting down

* Remove unused  statements from TDKLogger

* added/moved to appIsQuitting in main tdk instance

* added appIsQuitting to base service

* don't attempt event transmission on app quit (only persist - will be sent on next launch)

* lifted analytics flush frequency settings to config

* remove connect settings from packager

---------

Co-authored-by: Yuri Visser <[email protected]>

* changed meta files

* updated helika sdk to v0.2.1 (#99)

* bumped helika sdk version in versions.txt; bumped tdk version to 1.0.1

* Swap out facebook login with discord (#100)

* Make AppConfig static. Tweak singleton handling (#101)

- Avoid recreating instance of TDK on quit
- Explicitly initialize TDKMainThreadDispatcher
- Pass isAppQuitting flag from TerminateCacheFlushing

* V1 cleanup (#102)

* Remove outdated TODO comment

* Remove old unit test files

* Remove outdated comment

* Remove OnEmailOTPVerificationSuccess event

* Test tweaks

* Catch errors on analytics tracking to avoid disrupting caller flow

* Rollback Task.Delay usage

* Hide discord login option on webgl

* Fix metadata fetching on harness scene for webgl

* Remove merge markers. Remove duplicate code in analytics service. Remove old code (#104)

* re-added helika props

* update to latest MagicswapV2Router contract address (#105)

* bump to version 1.0.2

* add api util for sending raw transactions (#107)

* add api util for sending raw transactions

* move transaction buttons to their own row

* Thirdweb v5 (#109)

* import thirdweb v5.0.0

* ThirdwebClient initialization in TDKThirdwebService (WIP)

* Thirdweb changes on import

* Several tweaks to work with v5
- Make GetChainId sync instead of reading from wallet
- Make several methods that used GetChainId to be sync
- Replace references to ThirdwebService.SDK
- Update auth User.Signer typings
- Update ConfirmLoginModal to handle new OTP flow
- Delete TDKEmbeddedWalletUI.cs (commented out for now)
- Update TDK.Connect.cs to use new Thirdweb api
- Move wallet logic from TDK.Connect.cs to TDKThirdwebService

* add ecosystemId and ecosystemPartnerId to config

* Change InAppWallet to EcosystemWallet

* Remove unused _lastWalletOptions prop

* Delete legacy TDKEmbeddedWalletUI script

* Improve handling of connection cancellation

* Reimplement silent reconnection

* Update wording

* Updates after develop merge

* upgraded thirdweb sdk to v5.1.0

* Fetch admin metadata on Identity.GetActiveSigners

* Resolve several TODOs

* Fetch activeSigners and allAdmins in parallel

* Add flag to start user session after switching chain

* bumped tdk version to 2.0.0

* Use treasure launcher token for identity when available (#110)

* Use treasure launcher token for identity when available
- When using the launcher prevent connecting, disconnecting, switching chains and ending session
- Add function to start user session via local launcher api
- Hide disconnect button from account modal when using launcher
- Get wallet address from jwt if session not available

* Add x socials login (#111)

* Update thirdweb to 5.1.1 (fixes android build)

* Social login with X (WIP)

* Update project settings to match thirdweb SDK specs

* Lowercase bundleId

* Show all social login options in webgl

* Bump Thirdweb SDK to 5.2.1

* Set webgl template to unity default

* upgrade to thirdweb v5.2.2 (#112)

---------

Co-authored-by: Yuri Visser <[email protected]>

---------

Co-authored-by: Yuri Visser <[email protected]>
Co-authored-by: Yuri Visser <[email protected]>

* remove factory address from config; use address from constants (#113)

* add options to WaitForTransaction (#115)

* add options to WaitForTransaction

* update to wait on initial try

* remove bridgeworld functionality (#114)

* clean up exposed interfaces; add helpers for common contract reads (#116)

* Thirdweb v5.4.0 (#118)

* update thirdweb sdk to 5.4.0

* google dep manager bump output

* thirdwebclient create no longer takes headers

* Helika removal (#119)

* remove tdk helika service

* remove helika sdk; move AsyncAwaitUtil

* remove straggler WalletConenctUnity

* update packager

* remove legacy WebGLTemplates/Thirdweb

* Remove remaining helika references

* Fix tests

* Simplify app start event

---------

Co-authored-by: lefarchi <[email protected]>

* Unitypackage release workflow [ENG-580] (#117)

* Workflow test

* Remove conflict markers from meta file

* Finalize workflow

* Remove unnecessary thirdweb webgl template

* Update release workflow to select specified folders

* Hardcode commit hash for 3rd party github actions

* Add csc.rsp to release

* remove helika, add treasure plugins (for unitypackage action)

* change release artifact file name

---------

Co-authored-by: Alec Ananian <[email protected]>
Co-authored-by: Marco Zakaria <[email protected]>
Co-authored-by: lefarchi <[email protected]>
Co-authored-by: lefarchi <[email protected]>
  • Loading branch information
5 people authored Oct 5, 2024
1 parent 453597c commit 71fe046
Show file tree
Hide file tree
Showing 2,561 changed files with 153,528 additions and 752,853 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Create Unity Package

on:
push:
branches:
- main
workflow_dispatch:

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get version
id: version
run: |
echo "TAG_NAME=v$(sed -n 's/.*version = "\([^"]*\)".*/\1/p' Assets/Treasure/TDK/Runtime/TDKVersion.cs)" >> $GITHUB_OUTPUT
- name: Get existing release
id: existing-release
env:
GH_TOKEN: ${{ github.token }}
run: |
echo "STATUS=$(gh release view ${{steps.version.outputs.TAG_NAME}} --json isDraft)" >> $GITHUB_OUTPUT
- name: Select files
run: |
for folder in "Plugins" "Thirdweb" "Treasure/Example" "Treasure/Plugins" "Treasure/TDK"
do
echo "Assets/$folder.meta" >> metaList
find "Assets/$folder" -name \*.meta >> metaList
done
for file in "link.xml" "csc.rsp"
do
echo "Assets/$file.meta" >> metaList
done
- name: Make output folder
run: mkdir out
- name: Create unitypackage
uses: pCYSl5EDgo/create-unitypackage@b5c57408698b1fab8b3a84d4b67f767b8b7c0be9 # v1.2.3
with:
package-path: 'out/tdk-unity_${{steps.version.outputs.TAG_NAME}}_Full.unitypackage'
include-files: metaList
- name: Upload unitypackage artifact
uses: actions/upload-artifact@v4
with:
path: out
name: package
- name: Release
uses: softprops/action-gh-release@c062e08bd532815e2082a85e87e3ef29c3e6d191 # v2.0.8
# do not override an exising release if its already published
if: ${{ !contains(steps.existing-release.outputs.STATUS, '"isDraft":false')}}
with:
draft: true
tag_name: ${{ steps.version.outputs.TAG_NAME }}
files: |
out/tdk-unity_${{steps.version.outputs.TAG_NAME}}_Full.unitypackage
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,5 @@ crashlytics-build.properties
ignore config resource files
Assets/Treasure/TDK/Resources/TDKConfig.asset
Assets/Treasure/TDK/Resources/TDKConfig.asset.meta
Assets/Treasure/TDK/Resources/TDKHelikaConfig.asset
Assets/Treasure/TDK/Resources/TDKHelikaConfig.asset.meta
Assets/Treasure/TDK/Resources/TDKThirdwebConfig.asset
Assets/Treasure/TDK/Resources/TDKThirdwebConfig.asset.meta
8 changes: 0 additions & 8 deletions Assets/Helika.meta

This file was deleted.

8 changes: 0 additions & 8 deletions Assets/Helika/Editor.meta

This file was deleted.

43 changes: 0 additions & 43 deletions Assets/Helika/Editor/HelikaDependencies

This file was deleted.

7 changes: 0 additions & 7 deletions Assets/Helika/Editor/HelikaDependencies.meta

This file was deleted.

23 changes: 0 additions & 23 deletions Assets/Helika/Helika.asmdef

This file was deleted.

7 changes: 0 additions & 7 deletions Assets/Helika/Helika.asmdef.meta

This file was deleted.

84 changes: 0 additions & 84 deletions Assets/Helika/HelikaAssetScript.cs

This file was deleted.

11 changes: 0 additions & 11 deletions Assets/Helika/HelikaAssetScript.cs.meta

This file was deleted.

8 changes: 0 additions & 8 deletions Assets/Helika/Packages.meta

This file was deleted.

8 changes: 0 additions & 8 deletions Assets/Helika/Packages/ExternalDependencyManager.meta

This file was deleted.

8 changes: 0 additions & 8 deletions Assets/Helika/Packages/ExternalDependencyManager/Editor.meta

This file was deleted.

This file was deleted.

Binary file not shown.

This file was deleted.

Binary file not shown.

This file was deleted.

Binary file not shown.
Loading

0 comments on commit 71fe046

Please sign in to comment.