Skip to content

Commit

Permalink
v0.5.0 (#84)
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

---------

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 Jul 5, 2024
1 parent 561fd31 commit 10f8762
Show file tree
Hide file tree
Showing 676 changed files with 64,777 additions and 13,322 deletions.
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,11 @@ crashlytics-build.properties
/[Aa]ssets/[Ss]treamingAssets/aa/*

*.DS_Store

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
19 changes: 10 additions & 9 deletions Assets/Helika/HelikaAssetScript.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,19 @@ public class HelikaAssetScript : MonoBehaviour
public string apiKey;
public string gameId;
public HelikaEnvironment helikaEnv = HelikaEnvironment.Localhost;
public bool sendingEvents = false;
public TelemetryLevel telemetry = TelemetryLevel.None;
public bool printEventsToConsole = true;
private EventManager eventManager;
public string playerId;

async Task Start()
void Start()
{
eventManager = EventManager.Instance;
await eventManager.Init(apiKey, gameId, helikaEnv, sendingEvents);
eventManager.Init(apiKey, gameId, helikaEnv, telemetry, printEventsToConsole);
eventManager.SetPlayerID(playerId);
}

// async void Update()
// void Update()
// {
// if (Input.GetKeyDown("space"))
// {
Expand All @@ -35,22 +36,22 @@ async Task Start()
// { "user_id", 10 },
// { "wallet_address", "0x8540507642419A0A8Af94Ba127F175dA090B58B0" }
// };
// await eventManager.SendEvent("connect_wallet", dictionary);
// eventManager.SendEvent("connect_wallet", dictionary);

// // This is an example of sending multiples of a single event
// Dictionary<string, object> evt1 = new Dictionary<string, object>
// {
// { "user_id", 10 },
// { "source", "win" }
// { "source", "win" },
// { "points", 15 }
// };
// Dictionary<string, object> evt2 = new Dictionary<string, object>
// {
// { "user_id", 10 },
// { "source", "top_3_player" }
// { "source", "top_3_player" },
// { "points", 5 }
// };
// await eventManager.SendEvents("add_points", new Dictionary<string, object>[] { evt1, evt2 });
// eventManager.SendEvents("add_points", new Dictionary<string, object>[] { evt1, evt2 });

// // If you'd like to send a whole game events and overwrite automatically added properties like 'game_id',
// // you can use the EventManager.SendCustomEvent() and EventManager.SendCustomEvents().
Expand All @@ -76,7 +77,7 @@ async Task Start()
// ))
// );
// JObject[] uniqueEvents = new JObject[] { startEvent, middleEvent, endEvent };
// await eventManager.SendCustomEvents(uniqueEvents);
// eventManager.SendCustomEvents(uniqueEvents);
// }
// }
}
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions Assets/Helika/Source/Enums/TelemetryLevel.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
namespace Helika
{
// Helika Telemetry Level
public enum TelemetryLevel
{
None = 0,
TelemetryOnly = 100,
All = 200
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 10f8762

Please sign in to comment.