-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #28 from 0xsequence/Feature/WaaSIntegration
Feature/waas integration
- Loading branch information
Showing
184 changed files
with
2,657 additions
and
287 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
using System.Collections; | ||
using System.Collections.Generic; | ||
using UnityEngine; | ||
using Sequence.Extensions; | ||
|
||
namespace Sequence.Core | ||
{ | ||
public class Hash | ||
{ | ||
public static readonly int HashLength = 32; | ||
public byte[] Bytes { get; private set; } | ||
|
||
public Hash() | ||
{ | ||
Bytes = new byte[HashLength]; | ||
} | ||
|
||
public Hash(byte[] b) | ||
{ | ||
int length = Mathf.Min(HashLength, b.Length); | ||
Bytes = new byte[HashLength]; | ||
for (int i = 0; i < length; i++) | ||
{ | ||
Bytes[i] = b[i]; | ||
} | ||
} | ||
|
||
public static implicit operator byte[](Hash hash) | ||
{ | ||
return hash.Bytes; | ||
} | ||
|
||
public static implicit operator string(Hash hash) | ||
{ | ||
return hash.ToString(); | ||
} | ||
|
||
public override string ToString() | ||
{ | ||
return Bytes.ByteArrayToHexStringWithPrefix(); | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using System; | ||
using System.Numerics; | ||
|
||
namespace Sequence.Core | ||
{ | ||
public class NetworkConfig | ||
{ | ||
public string Name { get; set; } | ||
public BigInteger ChainID { get; set; } | ||
public string ENSAddress { get; set; } | ||
|
||
public string RpcURL { get; set; } | ||
public RPCProvider Provider; | ||
|
||
public string RelayerURL { get; set; } // optional, one of the these should be set | ||
public Relayer Relayer { get; set; } | ||
|
||
public string IndexerURL { get; set; } | ||
|
||
public bool IsDefaultChain { get; set; } | ||
public bool IsAuthChain { get; set; } | ||
|
||
public string SequenceAPIURL { get; set; } | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
using System; | ||
using Sequence.Transactions; | ||
using Sequence.Core.Wallet; | ||
using System.Numerics; | ||
|
||
namespace Sequence.Core | ||
{ | ||
public interface Relayer | ||
{ | ||
RPCProvider GetProvider(); | ||
|
||
EthTransaction[] EstimateGasLimits(IWalletConfig walletConfig, WalletContext walletContext, params EthTransaction[] transactions); | ||
|
||
BigInteger GetNonce(IWalletConfig walletConfig, WalletContext walletContext, BigInteger space, BigInteger blockNumber); | ||
|
||
//(string, EthTransaction, TransactionReceipt) Relay(SignedTransactions signedTransactions); | ||
|
||
TransactionReceipt Wait(string transactionID, float maxWaitTime = -1); | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
using System; | ||
|
||
namespace Sequence.Core.Signature | ||
{ | ||
public enum SignatureType : UInt32 | ||
{ | ||
Legacy = 0, | ||
Regular = 1, | ||
NoChainID = 2, | ||
Chained = 3 | ||
} | ||
|
||
public static class SignatureTypeExtensions | ||
{ | ||
public static byte[] ToByteArray(this SignatureType value) | ||
{ | ||
return new byte[] { (byte)value }; | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.