-
Notifications
You must be signed in to change notification settings - Fork 241
Sample Tests via Foundry-Anvil #1208
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@rob1997 is this Pull Request Checks / Unity Tests 🧪 / Unity Tests 🧪 (src/UnitySampleProject, PlayMode) (pull_request) Failing after 3m Meant to fail? :D |
eb1fcf9 to
a8562c8
Compare
98b0fe8 to
cd3fc46
Compare
cd3fc46 to
c67b94b
Compare
creeppak
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice job
| object[] args = | ||
| { | ||
| Web3Unity.Web3.Signer.PublicAddress | ||
| Web3Unity.Instance.Address |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd say Address is not descriptive enough as it can mean any address in the context of Web3Unity. Something like PlayerAddress is more suiting imo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm I suppose yeah, this makes me think I don't think Web3Unity supports connecting multiple acoounts @kantagara what do you think of this as a feature?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it should be called PublicAddress.
In regards to multiple accounts -> That is something I think we will have to support for our upcoming partnership with you guys know who, so it will be a nice integration. Wouldn't like to use it by default tho in the main branch so to say :D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The name hasn't changed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep my bad, changed now
c69784d to
74b264e
Compare
8641c9c to
f19d9c2
Compare
|
Unity tests again failing? :D |
They're meant to fail because we're referencing CI on main when Tests are expecting the one on this branch, I've added a test run I did with a push trigger on main in the PRs description, once it's merged it'll get what it's expecting |
3c3cb66 to
7e4a0bb
Compare
juans-chainsafe
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Things working in WebGL and iOS! Just a couple of things:
- Remove Anvil from connection providers
- Balance of fails if we try it without a wallet connected because is getting the balance of the current wallet:
Web3Exception: Can't get player address. No Signer was provided during construction.
ChainSafe.Gaming.Evm.Contracts.BuiltIn.Erc20Contract.EnsureSigner () (at <4e129708b90a4f2a88fe3629bf8dff3a>:0)
ChainSafe.Gaming.Evm.Contracts.BuiltIn.Erc20Contract.GetBalanceOf () (at <4e129708b90a4f2a88fe3629bf8dff3a>:0)
ChainSafe.Gaming.Evm.Contracts.BuiltIn.Erc20Service.GetBalanceOf (System.String contractAddress) (at <4e129708b90a4f2a88fe3629bf8dff3a>:0)
Erc20Sample.BalanceOf () (at Assets/Samples/web3.unity SDK/3.0.5/Web3.Unity Samples/Scripts/Samples/Erc20Sample.cs:57)
Samples.TryExecute (System.Reflection.MethodInfo method, ChainSafe.Gaming.ISample instance) (at /Users/juanmanuelspoleti/Desktop/workspace/web3.unity/Packages/io.chainsafe.web3-unity/Runtime/Scripts/Samples/Samples.cs:92)
System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__7_0 (System.Object state) (at <606c2e0a56af495988c860a4ac613e74>:0)
UnityEngine.UnitySynchronizationContext+WorkRequest.Invoke () (at /Users/bokken/build/output/unity/unity/Runtime/Export/Scripting/UnitySynchronizationContext.cs:153)
UnityEngine.UnitySynchronizationContext.Exec () (at /Users/bokken/build/output/unity/unity/Runtime/Export/Scripting/UnitySynchronizationContext.cs:83)
UnityEngine.UnitySynchronizationContext.ExecuteTasks () (at /Users/bokken/build/output/unity/unity/Runtime/Export/Scripting/UnitySynchronizationContext.cs:107)
f862019 to
74a56b8
Compare
juans-chainsafe
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both issues were fixed!
sneakzttv
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
solid!
* anvil working/integrated but tests still failing * working sample tests * some cleanup and refactor * checkpoint * checkpoint * moved some dependencies down * fixed async issue * Gelato tests * documentation and cleanup * updated workflow to use foundry * submodules update on checkout * trigger on push * log exceptions for initialize * dependencies * 172.17.0.1 * allowing http * dependable dependencies and verbose connection error exception * added --host 0.0.0.0 to anvil * reverted dependencies and push trigger * start and use anvil when in windows * remove pdb meta files * added events service adapter to Web3Unity_Tests.prefab * resolve conflict * merge fixed * small edit * requested changes made * Duplicated Samples [skip ci] * Sync Dependencies - Auto Commit --------- Co-authored-by: rob1997 <rob1997@users.noreply.github.com> Co-authored-by: Nikola Garabandic <kantagara@gmail.com>
* anvil working/integrated but tests still failing * working sample tests * some cleanup and refactor * checkpoint * checkpoint * moved some dependencies down * fixed async issue * Gelato tests * documentation and cleanup * updated workflow to use foundry * submodules update on checkout * trigger on push * log exceptions for initialize * dependencies * 172.17.0.1 * allowing http * dependable dependencies and verbose connection error exception * added --host 0.0.0.0 to anvil * reverted dependencies and push trigger * start and use anvil when in windows * remove pdb meta files * added events service adapter to Web3Unity_Tests.prefab * resolve conflict * merge fixed * small edit * requested changes made * Duplicated Samples [skip ci] * Sync Dependencies - Auto Commit --------- Co-authored-by: rob1997 <rob1997@users.noreply.github.com> Co-authored-by: Nikola Garabandic <kantagara@gmail.com>

We're now testing samples themselves via anvil and reflection.
Removed old tests and a bunch of unused scripts in Samples.
Unity tests will fail because we're referencing workflows on main but here is a successful run for testing https://github.com/ChainSafe/web3.unity/actions/runs/11662595176