Open Mine77 opened 3 years ago
Some more updates
UniTask
throws an exception in a request that fails, which I'd rather avoid. It's not difficult to just write my own TaskCompletionSource that doesn't throw an exception. I'm going to do that tomorrow.@jasonboukheir Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!
Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days
Updates:
I tried writing my own TaskCompletionSource
to avoid the exception handling. Instead I'm gonna keep it simple and shim over the dependent APIs. Specifically, I'm writing wrappers around UnityWebRequest
and UniTask
. In the future, it will be good to provide optional support for UniTask
if users would like to download it. In Unity 2021, UnityWebRequest
has a NativeArray
API that should be used instead. Using an adapter over both makes it easier to pick and choose features from either.
Updates:
AlgoApiRequest
and AlgoApiResponse
I realized I was missing a lot of valuable, in-depth documentation from https://github.com/algorandfoundation/specs/blob/master/dev/ledger.md, so I'm referencing that regarding the models. It's good to know the max sizes of integers, bytes, strings, and arrays.
A lot of the models have nested arrays and storage, which are difficult to keep safely unmanaged (even with Unity's Native Collections). I'm using the reference above to see what can be stack allocated. If there are nested heap allocated arrays, I will prefer to use regular, managed C# objects until I can write out my own NativeContainer.
More updates:
I've gone through the specs and the ledger models are too large to be stack allocated. I don't want to force users to manage the memory of native collections if they don't want to, so from now on the Algo API models will be using managed C# objects.
I was spending some time trying to get the sandbox running in a github action as a service, but it failed miserably. I've disabled the tests that require the sandbox in the cloud.
Hey there, got some more updates (I don't think the bot is asking anymore??)
I'm almost finished with the AlgodClient Issue. I'm trying to debug why I'm getting a signing error when I try to test out a transaction.
There are 2 other areas that I still need to verify:
Thanks for the updating.
On Mon, Aug 30, 2021 at 8:38 AM Jason Elie Bou Kheir < @.***> wrote:
Hey there, got some more updates (I don't think the bot is asking anymore??)
I'm almost finished with the AlgodClient Issue https://github.com/CareBoo/unity-algorand-sdk/issues/10. I'm trying to debug why I'm getting a signing error when I try to test out a transaction.
There are 2 other areas that I still need to verify:
- block format
- teal compilation
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/algorandfoundation/grow-algorand/issues/52#issuecomment-907915564, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACZ4HJY52BDUVEHQNQBD7I3T7LHJRANCNFSM46WQK7SA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
One more update this evening:
🎉 I figured out what was wrong with my signing error and got a payment transaction verified on a sandbox network!
I'm thinking of putting the block and teal compilation endpoints on the back burner so I can start fleshing out the demo game, but I'll let y'all know tomorrow :)
sounds exciting! Keep it going :)
On Mon, Aug 30, 2021 at 12:52 PM Jason Elie Bou Kheir < @.***> wrote:
One more update this evening:
🎉 I figured out what was wrong with my signing error and got a payment transaction verified on a sandbox network!
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/algorandfoundation/grow-algorand/issues/52#issuecomment-908027274, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACZ4HJYTRZHAZ2HZZF64LITT7MFB7ANCNFSM46WQK7SA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
Small update for today,
I got the GetBlock
implemented and working at a high level. I couldn't find the documentation that outlines the total response for the block header data, and so I just used the fields that were returned. I likely missed out on some optional fields.
I have the TealCompile
and models written out, but I don't know how to write a TEAL program, so it hasn't been tested. I also probably have some things wrong here.
I'm adding the above 2 as new issues to the project. I updated the exp
branch, and here's the latest experimental release (with very rough algodclient support hehe): https://github.com/CareBoo/unity-algorand-sdk/releases/tag/v1.0.0-exp.14
I've been working on removing the requirement to use .NET Framework 4.x, and instead allow users to use .NET Standard 2.0. I should have some more updates this weekend.
Hey there,
I've made some good progress on removing the dependency for .NET Framework 4.x. I've got a simple JsonReader implemented and tested with valid Json.
Hey there, quick update.
I'm still working on fixing the code to be .NET Standard.
I should have it more updated tomorrow
I have implemented a simple JsonWriter
, and I started working on a codegen to help make implementing the algo-api models easier.
Unity has a very useful API in the editor called TypeCache
that lets me grab all the types / fields / methods defined with a c# attribute. It's not too difficult then to generate some code in the editor using System.CodeDom
based on attributes.
Right now, when I add a new algo-api model, I have to
IEqualityComparer<>
if the field does not implement IEquatable<>
With the codegen, I will just have to
I have the System.CodeDom
code generator working. It generates the json mappings based on attributes I set on the models. I still need to do the following:
MessagePackReader
and MessagePackWriter
[AlgoApiFormatter]
attribute formattersUPDATE: These are now all completed
I'm still working on implementing out MessagePackReader
and MessagePackWriter
that the models can use.
MessagePackReader
is almost ready to test with the formatters. I expect I'll have that one tested and finished tomorrow.
I have all the formatters I'm using from MessagePakc working with the new readers/writers and the json readers/writers.
I'm still working on adding the [AlgoApiFormatter]
codegen stuff, but I should be done this evening. Then I'm going to rerun the tests I ahve to make sure everything is still serializing/deserializing properly.
Okay, the latest experimental release has a big refactor to remove the .NET 4.8 dependency. There are also some refactors to fix some big developer pain points when adding new API models:
AlgoApiKey
attributeAlgoApiFormatter
attributeAnd the lines of code were reduced by 30,000... yup
hey there. I've added a few transaction models. I started working on the server client networking for the demo.
@Mine77 I'm not familiar with how the transfer of assets can produce royalties for the creator. I saw a demo that used the clawback address and smart contracts to create royalties. I'm going to go through that demo again, but I was wondering if there were any other resources you recommend I read to see how that could work.
The Algorand blockchain does not provide such a feature on the protocol layer. So mostly this will be realized with a smart contract.
I think it's ok if you are going to offer this to users as an application layer feature. However in that case, since it involves a contract, a code audit will be necessary.
I would suggest let's keep it to the base layer utilization for the time being. I.e. having all on-chain features accessible from Unity with this SDK.
Best, Haichao
On Tue, Sep 21, 2021 at 10:19 AM Jason Elie Bou Kheir < @.***> wrote:
hey there. I've added a few transaction models. I started working on the server client networking for the demo.
@Mine77 https://github.com/Mine77 I'm not familiar with how the transfer of assets can produce royalties for the creator. I saw a demo that used the clawback address and smart contracts to create royalties. I'm going to go through that demo again, but I was wondering if there were any other resources you recommend I read to see how that could work.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/algorandfoundation/grow-algorand/issues/52#issuecomment-923536543, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACZ4HJ35NXBO3CXVNM2JPETUC7TS7ANCNFSM46WQK7SA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
Thanks @Mine77 !
I'm still working on the networking layer, but in the meantime I've added LogicSig support.
I realized that I should avoid using Activator.CreateInstance
so that all of the AlgoApiFormatter
s could be AOT compiled if need-be. So now, all of the used formatters will be explicitly added to the Formatter Lookup tables. Fixed a couple bugs around the LogicSig
serialization.
One small update:
For the networking, I went ahead and added this project as a template to go off: https://docs-multiplayer.unity3d.com/docs/learn/bossroom
I started working on this issue: https://github.com/CareBoo/unity-algorand-sdk/issues/30 last night. I should have it finished this weekend since the framework is pretty much all there. The KMD client will be next and should be quick as well.
updates:
indexer
and algod
can be reused. For example, the Transaction
models share many of the same fields, but some of them are read only when reading from the indexer
.AlgoApiObject
struct that represents unserialized data from the AlgoApi (object
fields in the documentation)RawTransaction
and RawSignedTransaction
into a Transaction
model outlined by indexer
New experimental release with IndexerClient
is out:
https://github.com/CareBoo/unity-algorand-sdk/releases/tag/v1.0.0-exp.23
New exp
release with a basic implementation of KmdClient
is out:
https://github.com/CareBoo/unity-algorand-sdk/releases/tag/v1.0.0-exp.24
currently writing tests for the indexer client and working out some bugs I've found -- my goal the end of this weekend is to have all of the API smoke-tested with the sandbox server.
I added some tests to the IndexerClient
, and fixed a number of bugs. Can view the release to see the changes.
I've been working on adding integration tests for different clients.
PlayMode
testsalgod
integration tests when run all at once because the same pending transaction would be made before the previous one was finished. Now, on the TearDown
, the tests will wait for any pending transactions to finish.AlgoApiRequest
to explicitly build the request then send it.Excited to have more of the tests built out for the KMD client and bugs fixed tomorrow.
I've got the keys endpoints of the kmd
client working in integration tests. I'm working through the multisig parts rn.
@jasonboukheir Looking forward to a demo. How much time do you think you need to have a version ready that can be used by game developers? We would like to launch a gaming hackathon by the first of November if that's feasible for you? Let us know!
@michielmulders That is very exciting! I'd love to have it ready by then. How long does the review process take? i.e. when should I submit the demo to have it ready for the hackathon? I'm going to do a planning session tonight to track in detail and prioritize what I need to tackle to have it "complete", I can have a better time estimate then.
After looking at what's left, I think that's totally feasible if I prioritize certain things.
There are some stretch goals I'd love to add after I get the demo ready.
FYI here's the current project board and issue tracking: https://github.com/CareBoo/unity-algorand-sdk/projects/1
@jasonboukheir the docs and examples are important to really help devs. Board looks good, let's hope we can finish it by Nov 1. Also, the integration with WalletConnect/AlgoSigner would be very helpful to have that in as well. Thanks for doing all this work!
@jasonboukheir Can you share your Discord handle so I can contact you there? :) Thanks!
I'm aiming to have this completed by 1 week before Nov 1st. Most of the issues on the project board are the remaining items before this will be considered complete.
Updates since last time:
SignedTransaction
by about 1KB using information from the docs.Signed<T>
generic that represents a signed transaction of a particular type. For example, Signed<PaymentTxn>
represents a signed payment transaction. These take up much less stack space than SignedTransaction
because they do not include the fields of the other transactions. Generally, users will use these when building transactions, and they'll use the generic type when retrieving transactions.KmdClient
endpoints tested (including multisig 📶 )KmdClient
endpoints to have mandatory arguments instead of default arguments where appropriate.AlgodClient.TealCompile
.AlgodClient
.AssetConfigTxn
by specifying functions like Transaction.AssetCreate
and Transaction.AssetDelete
.quick update since last time:
I'm currently working on adding XML docs to the public API and cleaning up some code. After that, I'll be working on the demo.
Perfect, looking forward! @jasonboukheir
I've been pretty busy at work this past week, so I haven't had a chance to get much done during the week.
Today, I've done a first pass through the code and added XML C# documentation where appropriate. I've also added DocFX
support -- you can view the documentation website at
https://careboo.github.io/unity-algorand-sdk/
which is pretty exciting.
I'll be working on the game demo and the Getting Started
guide tomorrow.
I finished the quickstart guide, but I'm still working on the game demo at the moment. I'm also finishing up some of the work required to publish to the unity store.
Perfect, ping me once ready :)
quick update,
I've got some basic token rewards in the demo working if the player completes their objective. Working on a Weapons store that shows off atomic transfers. It will just be a simple single-weapon store, where the player can buy a rifle asset to use in the game.
Since it's a demo, the accounts aren't stored safely and securely. I added a way to generate accounts and assets to the editor if that wants to be updated.
I've also submitted the application to review for the AssetStore. Unfortunately, there's a 20-30 day time period before they even begin looking at the asset for approval. However, it's available on OpenUPM currently as a workaround. It's straightforward to download it from there or as a github package.
Hey there, here's an update from last time:
Version 1.1.0 has been released. There are 2 main parts to this release:
I'm currently working on adding logos and images that are different than the Algorand ones so I don't confuse anyone 😅
Thanks @jasonboukheir We've started to check your work. We will let you know once we've done that or if we have any questions. :)
Issue Status: 1. Open 2. Started 3. Submitted 4. Done
Work for 7000.0041 ALGO (13580.0 USD @ $1.94/ALGO) has been submitted by:
Hi @Mine77 ,
There's been a recent update, and the asset is on the Unity Asset Store. Could you please verify?
Hi,
My Name is Gabriel. I am working with Jason and Russ on this project. I have been working with Unity for more than eight years, and have been a professional Unity developer for almost five years. I am proficient in C#, JSON, NodeJS / JavaScript, PHP, HTML, PHP, and C++. Also have experience with Maya, Blender, and I am an Indie game developer on the side.
I have already made some contributions to the project, and I I have several tasks planned out to work both on the front and back end.
Some of the contributions I have already made and/or are in progress:
Some of the other tasks that are on my roadmap are:
Thanks,
Gabriel
Overview
Description
What's the goal for this task?
Create a Unity3D Asset (SDK) in the Unity Asset Store. Utilize the Unity Runtime API function to facilitate large-scale automation and scalability of blockchain asset creation, minting, trading, and sending, as well as other blockchain-related features like wallet integration, smart contracts, and atomic transfers.
Benefits:
How it works (features)
What is this task
With the Algorand Blockchain SDK, you can easily and rapidly build next-generation blockchain games in Unity—without writing a single line of blockchain code.
Why does this task need to be done
Over 50 percent of the games in the app stores are created with Unity. What are the benefits to the Algorand ecosystem? We can extend the application use cases to include gaming with a Unity plugin. I.e., more solutions are possible by using this plugin.
The Algorand Unity SDK would be similar in functionality to an Ethereum-based blockchain SDK by Enjin.
What are the requirements for the bounty taker?
To provide a platform that enables users to explore and take advantage of four key features:
What are the deliverables?
Create a package and publish it to the Asset Unity Store. In the tools and utilities section.
Judging Criteria and Metrics
Step by step document of how to use the SDK Asset plugin with a simple sample game as well, using this asset.
Submission Procedure
Other Requirements
For questions, reach out to Algorand on Discord.