cs-codex-dist-tests/ProjectPlugins/CodexContractsPlugin/Marketplace/Marketplace.cs

626 lines
52 KiB
C#
Raw Normal View History

2023-12-19 14:43:26 +00:00
using Nethereum.ABI.FunctionEncoding.Attributes;
using Nethereum.Contracts;
using System.Numerics;
// Generated code, do not modify.
#pragma warning disable CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable.
namespace CodexContractsPlugin.Marketplace
{
public partial class MarketplaceDeployment : MarketplaceDeploymentBase
{
public MarketplaceDeployment() : base(BYTECODE) { }
public MarketplaceDeployment(string byteCode) : base(byteCode) { }
}
public class MarketplaceDeploymentBase : ContractDeploymentMessage
{
2024-08-26 09:04:23 +00:00
public static string BYTECODE = "0x60c06040523480156200001157600080fd5b5060405162004086380380620040868339810160408190526200003491620004f1565b60208301518051608052816101004311620000965760405162461bcd60e51b815260206004820152601960248201527f496e73756666696369656e7420626c6f636b206865696768740000000000000060448201526064015b60405180910390fd5b81516000908155602083015160015560408301516002805460ff191660ff9092169190911790556060830151839190600390620000d4908262000691565b50608091909101516004909101805460ff191660ff928316179055600580546001600160a01b0319166001600160a01b0393841617905590841660a05284515160649116111590506200016a5760405162461bcd60e51b815260206004820152601560248201527f4d757374206265206c657373207468616e20313030000000000000000000000060448201526064016200008d565b606483600001516060015160ff161115620001c85760405162461bcd60e51b815260206004820152601560248201527f4d757374206265206c657373207468616e20313030000000000000000000000060448201526064016200008d565b82516060810151602090910151606491620001e3916200075d565b60ff161115620002365760405162461bcd60e51b815260206004820152601d60248201527f4d6178696d756d20736c617368696e672065786365656473203130302500000060448201526064016200008d565b82518051600d805460208085015160408087015160609788015160ff9081166401000000000260ff60201b1961ffff90931662010000029290921664ffffff0000199482166101000261ffff1990971698821698909817959095179290921695909517178355808801518051600e90815591810151600f5593840151601080549190931660ff19919091161790915592820151869391929190601190620002de908262000691565b50608091909101516004909101805460ff191660ff909216919091179055506200078f9350505050565b634e487b7160e01b600052604160045260246000fd5b60405160a081016001600160401b038111828210171562000343576200034362000308565b60405290565b604080519081016001600160401b038111828210171562000343576200034362000308565b604051608081016001600160401b038111828210171562000343576200034362000308565b604051601f8201601f191681016001600160401b0381118282101715620003be57620003be62000308565b604052919050565b805160ff81168114620003d857600080fd5b919050565b600060a08284031215620003f057600080fd5b620003fa6200031e565b905081518152602080830151818301526200041860408401620003c6565b604083015260608301516001600160401b03808211156200043857600080fd5b818501915085601f8301126200044d57600080fd5b81518181111562000462576200046262000308565b62000476601f8201601f1916850162000393565b915080825286848285010111156200048d57600080fd5b60005b81811015620004ad57838101850151838201860152840162000490565b50600084828401015250806060850152505050620004ce60808301620003c6565b608082015292915050565b80516001600160a01b0381168114620003d857600080fd5b6000806000606084860312156200050757600080fd5b83516001600160401b03808211156200051f57600080fd5b9085019081870360a08112156200053557600080fd5b6200053f62000349565b60808212156200054e57600080fd5b620005586200036e565b91506200056584620003c6565b82526200057560208501620003c6565b6020830152604084015161ffff811681146200059057600080fd5b6040830152620005a360608501620003c6565b606083015290815260808301519082821115620005bf57600080fd5b620005cd89838601620003dd565b602082015280965050505050620005e760208501620004d9565b9150620005f760408501620004d9565b90509250925092565b600181811c908216806200061557607f821691505b6020821081036200063657634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200068c576000816000526020600020601f850160051c81016020861015620006675750805b601f850160051c820191505b81811015620006885782815560010162000673565b5050505b505050565b81516001600160401b03811115620006ad57620006ad62000308565b620006c581620006be845462000600565b846200063c565b602080601f831160018114620006fd5760008415620006e45750858301515b600019600386901b1c1916600185901b17855562000688565b600085815260208120601f198616915b828110156200072e578886015182559484019460019091019084016200070d565b50858210156200074d5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60ff81811683821602908116908181146200078857634e487b7160e01b600052601160045260246000fd5b5092915050565b60805160a0516138a0620007e6600039600081816104060152818161161301528181611fd101528181612070015281816121e50152818161228401526124a601526000818161295d0152612ad401526138a06000f3fe60806040
public MarketplaceDeploymentBase() : base(BYTECODE) { }
public MarketplaceDeploymentBase(string byteCode) : base(byteCode) { }
[Parameter("tuple", "configuration", 1)]
public virtual MarketplaceConfig Configuration { get; set; }
[Parameter("address", "token_", 2)]
public virtual string Token { get; set; }
[Parameter("address", "verifier", 3)]
public virtual string Verifier { get; set; }
}
2023-12-19 14:43:26 +00:00
public partial class ConfigFunction : ConfigFunctionBase { }
[Function("config", typeof(ConfigOutputDTO))]
public class ConfigFunctionBase : FunctionMessage
{
}
public partial class FillSlotFunction : FillSlotFunctionBase { }
[Function("fillSlot")]
public class FillSlotFunctionBase : FunctionMessage
{
[Parameter("bytes32", "requestId", 1)]
public virtual byte[] RequestId { get; set; }
[Parameter("uint256", "slotIndex", 2)]
public virtual BigInteger SlotIndex { get; set; }
[Parameter("tuple", "proof", 3)]
public virtual Groth16Proof Proof { get; set; }
2023-12-19 14:43:26 +00:00
}
2024-08-20 13:26:19 +00:00
public partial class FreeSlot1Function : FreeSlot1FunctionBase { }
[Function("freeSlot")]
public class FreeSlot1FunctionBase : FunctionMessage
{
[Parameter("bytes32", "slotId", 1)]
public virtual byte[] SlotId { get; set; }
[Parameter("address", "rewardRecipient", 2)]
public virtual string RewardRecipient { get; set; }
[Parameter("address", "collateralRecipient", 3)]
public virtual string CollateralRecipient { get; set; }
}
2023-12-19 14:43:26 +00:00
public partial class FreeSlotFunction : FreeSlotFunctionBase { }
[Function("freeSlot")]
public class FreeSlotFunctionBase : FunctionMessage
{
[Parameter("bytes32", "slotId", 1)]
public virtual byte[] SlotId { get; set; }
}
public partial class GetActiveSlotFunction : GetActiveSlotFunctionBase { }
[Function("getActiveSlot", typeof(GetActiveSlotOutputDTO))]
public class GetActiveSlotFunctionBase : FunctionMessage
{
[Parameter("bytes32", "slotId", 1)]
public virtual byte[] SlotId { get; set; }
}
public partial class GetChallengeFunction : GetChallengeFunctionBase { }
[Function("getChallenge", "bytes32")]
public class GetChallengeFunctionBase : FunctionMessage
{
[Parameter("bytes32", "id", 1)]
public virtual byte[] Id { get; set; }
}
public partial class GetHostFunction : GetHostFunctionBase { }
[Function("getHost", "address")]
public class GetHostFunctionBase : FunctionMessage
{
[Parameter("bytes32", "slotId", 1)]
public virtual byte[] SlotId { get; set; }
}
public partial class GetPointerFunction : GetPointerFunctionBase { }
[Function("getPointer", "uint8")]
public class GetPointerFunctionBase : FunctionMessage
{
[Parameter("bytes32", "id", 1)]
public virtual byte[] Id { get; set; }
}
public partial class GetRequestFunction : GetRequestFunctionBase { }
[Function("getRequest", typeof(GetRequestOutputDTO))]
public class GetRequestFunctionBase : FunctionMessage
{
[Parameter("bytes32", "requestId", 1)]
public virtual byte[] RequestId { get; set; }
}
public partial class IsProofRequiredFunction : IsProofRequiredFunctionBase { }
[Function("isProofRequired", "bool")]
public class IsProofRequiredFunctionBase : FunctionMessage
{
[Parameter("bytes32", "id", 1)]
public virtual byte[] Id { get; set; }
}
public partial class MarkProofAsMissingFunction : MarkProofAsMissingFunctionBase { }
[Function("markProofAsMissing")]
public class MarkProofAsMissingFunctionBase : FunctionMessage
{
[Parameter("bytes32", "slotId", 1)]
public virtual byte[] SlotId { get; set; }
[Parameter("uint256", "period", 2)]
public virtual BigInteger Period { get; set; }
}
public partial class MissingProofsFunction : MissingProofsFunctionBase { }
[Function("missingProofs", "uint256")]
public class MissingProofsFunctionBase : FunctionMessage
{
[Parameter("bytes32", "slotId", 1)]
public virtual byte[] SlotId { get; set; }
}
public partial class MyRequestsFunction : MyRequestsFunctionBase { }
[Function("myRequests", "bytes32[]")]
public class MyRequestsFunctionBase : FunctionMessage
{
}
public partial class MySlotsFunction : MySlotsFunctionBase { }
[Function("mySlots", "bytes32[]")]
public class MySlotsFunctionBase : FunctionMessage
{
}
public partial class RequestEndFunction : RequestEndFunctionBase { }
[Function("requestEnd", "uint256")]
public class RequestEndFunctionBase : FunctionMessage
{
[Parameter("bytes32", "requestId", 1)]
public virtual byte[] RequestId { get; set; }
}
public partial class RequestExpiryFunction : RequestExpiryFunctionBase { }
[Function("requestExpiry", "uint256")]
public class RequestExpiryFunctionBase : FunctionMessage
{
[Parameter("bytes32", "requestId", 1)]
public virtual byte[] RequestId { get; set; }
}
2023-12-19 14:43:26 +00:00
public partial class RequestStateFunction : RequestStateFunctionBase { }
[Function("requestState", "uint8")]
public class RequestStateFunctionBase : FunctionMessage
{
[Parameter("bytes32", "requestId", 1)]
public virtual byte[] RequestId { get; set; }
}
public partial class RequestStorageFunction : RequestStorageFunctionBase { }
[Function("requestStorage")]
public class RequestStorageFunctionBase : FunctionMessage
{
[Parameter("tuple", "request", 1)]
public virtual Request Request { get; set; }
}
public partial class SlotStateFunction : SlotStateFunctionBase { }
[Function("slotState", "uint8")]
public class SlotStateFunctionBase : FunctionMessage
{
[Parameter("bytes32", "slotId", 1)]
public virtual byte[] SlotId { get; set; }
}
public partial class SubmitProofFunction : SubmitProofFunctionBase { }
[Function("submitProof")]
public class SubmitProofFunctionBase : FunctionMessage
{
[Parameter("bytes32", "id", 1)]
public virtual byte[] Id { get; set; }
[Parameter("tuple", "proof", 2)]
public virtual Groth16Proof Proof { get; set; }
2023-12-19 14:43:26 +00:00
}
public partial class TokenFunction : TokenFunctionBase { }
[Function("token", "address")]
public class TokenFunctionBase : FunctionMessage
{
}
public partial class WillProofBeRequiredFunction : WillProofBeRequiredFunctionBase { }
[Function("willProofBeRequired", "bool")]
public class WillProofBeRequiredFunctionBase : FunctionMessage
{
[Parameter("bytes32", "id", 1)]
public virtual byte[] Id { get; set; }
}
public partial class WithdrawFundsFunction : WithdrawFundsFunctionBase { }
[Function("withdrawFunds")]
public class WithdrawFundsFunctionBase : FunctionMessage
{
[Parameter("bytes32", "requestId", 1)]
public virtual byte[] RequestId { get; set; }
}
2024-08-20 13:26:19 +00:00
public partial class WithdrawFunds1Function : WithdrawFunds1FunctionBase { }
[Function("withdrawFunds")]
public class WithdrawFunds1FunctionBase : FunctionMessage
{
[Parameter("bytes32", "requestId", 1)]
public virtual byte[] RequestId { get; set; }
[Parameter("address", "withdrawRecipient", 2)]
public virtual string WithdrawRecipient { get; set; }
}
2023-12-19 14:43:26 +00:00
public partial class ProofSubmittedEventDTO : ProofSubmittedEventDTOBase { }
[Event("ProofSubmitted")]
public class ProofSubmittedEventDTOBase : IEventDTO
{
[Parameter("bytes32", "id", 1, false)]
public virtual byte[] Id { get; set; }
}
public partial class RequestCancelledEventDTO : RequestCancelledEventDTOBase { }
[Event("RequestCancelled")]
public class RequestCancelledEventDTOBase : IEventDTO
{
[Parameter("bytes32", "requestId", 1, true)]
public virtual byte[] RequestId { get; set; }
}
public partial class RequestFailedEventDTO : RequestFailedEventDTOBase { }
[Event("RequestFailed")]
public class RequestFailedEventDTOBase : IEventDTO
{
[Parameter("bytes32", "requestId", 1, true)]
public virtual byte[] RequestId { get; set; }
}
public partial class RequestFulfilledEventDTO : RequestFulfilledEventDTOBase { }
[Event("RequestFulfilled")]
public class RequestFulfilledEventDTOBase : IEventDTO
{
[Parameter("bytes32", "requestId", 1, true)]
public virtual byte[] RequestId { get; set; }
}
public partial class SlotFilledEventDTO : SlotFilledEventDTOBase { }
[Event("SlotFilled")]
public class SlotFilledEventDTOBase : IEventDTO
{
[Parameter("bytes32", "requestId", 1, true)]
public virtual byte[] RequestId { get; set; }
[Parameter("uint256", "slotIndex", 2, false)]
public virtual BigInteger SlotIndex { get; set; }
}
public partial class SlotFreedEventDTO : SlotFreedEventDTOBase { }
[Event("SlotFreed")]
public class SlotFreedEventDTOBase : IEventDTO
{
[Parameter("bytes32", "requestId", 1, true)]
public virtual byte[] RequestId { get; set; }
[Parameter("uint256", "slotIndex", 2, false)]
public virtual BigInteger SlotIndex { get; set; }
}
public partial class StorageRequestedEventDTO : StorageRequestedEventDTOBase { }
[Event("StorageRequested")]
public class StorageRequestedEventDTOBase : IEventDTO
{
[Parameter("bytes32", "requestId", 1, false)]
public virtual byte[] RequestId { get; set; }
[Parameter("tuple", "ask", 2, false)]
public virtual Ask Ask { get; set; }
[Parameter("uint256", "expiry", 3, false)]
public virtual BigInteger Expiry { get; set; }
}
public partial class ConfigOutputDTO : ConfigOutputDTOBase { }
[FunctionOutput]
public class ConfigOutputDTOBase : IFunctionOutputDTO
{
[Parameter("tuple", "", 1)]
public virtual MarketplaceConfig ReturnValue1 { get; set; }
2023-12-19 14:43:26 +00:00
}
2024-08-20 13:26:19 +00:00
2023-12-19 14:43:26 +00:00
public partial class GetActiveSlotOutputDTO : GetActiveSlotOutputDTOBase { }
[FunctionOutput]
public class GetActiveSlotOutputDTOBase : IFunctionOutputDTO
{
[Parameter("tuple", "", 1)]
public virtual ActiveSlot ReturnValue1 { get; set; }
}
public partial class GetChallengeOutputDTO : GetChallengeOutputDTOBase { }
[FunctionOutput]
public class GetChallengeOutputDTOBase : IFunctionOutputDTO
{
[Parameter("bytes32", "", 1)]
public virtual byte[] ReturnValue1 { get; set; }
}
public partial class GetHostOutputDTO : GetHostOutputDTOBase { }
[FunctionOutput]
public class GetHostOutputDTOBase : IFunctionOutputDTO
{
[Parameter("address", "", 1)]
public virtual string ReturnValue1 { get; set; }
}
public partial class GetPointerOutputDTO : GetPointerOutputDTOBase { }
[FunctionOutput]
public class GetPointerOutputDTOBase : IFunctionOutputDTO
{
[Parameter("uint8", "", 1)]
public virtual byte ReturnValue1 { get; set; }
}
public partial class GetRequestOutputDTO : GetRequestOutputDTOBase { }
[FunctionOutput]
public class GetRequestOutputDTOBase : IFunctionOutputDTO
{
[Parameter("tuple", "", 1)]
public virtual Request ReturnValue1 { get; set; }
}
public partial class IsProofRequiredOutputDTO : IsProofRequiredOutputDTOBase { }
[FunctionOutput]
public class IsProofRequiredOutputDTOBase : IFunctionOutputDTO
{
[Parameter("bool", "", 1)]
public virtual bool ReturnValue1 { get; set; }
}
public partial class MissingProofsOutputDTO : MissingProofsOutputDTOBase { }
[FunctionOutput]
public class MissingProofsOutputDTOBase : IFunctionOutputDTO
{
[Parameter("uint256", "", 1)]
public virtual BigInteger ReturnValue1 { get; set; }
}
public partial class MyRequestsOutputDTO : MyRequestsOutputDTOBase { }
[FunctionOutput]
public class MyRequestsOutputDTOBase : IFunctionOutputDTO
{
[Parameter("bytes32[]", "", 1)]
public virtual List<byte[]> ReturnValue1 { get; set; }
}
public partial class MySlotsOutputDTO : MySlotsOutputDTOBase { }
[FunctionOutput]
public class MySlotsOutputDTOBase : IFunctionOutputDTO
{
[Parameter("bytes32[]", "", 1)]
public virtual List<byte[]> ReturnValue1 { get; set; }
}
public partial class RequestEndOutputDTO : RequestEndOutputDTOBase { }
[FunctionOutput]
public class RequestEndOutputDTOBase : IFunctionOutputDTO
{
[Parameter("uint256", "", 1)]
public virtual BigInteger ReturnValue1 { get; set; }
}
public partial class RequestExpiryOutputDTO : RequestExpiryOutputDTOBase { }
[FunctionOutput]
public class RequestExpiryOutputDTOBase : IFunctionOutputDTO
{
[Parameter("uint256", "", 1)]
public virtual BigInteger ReturnValue1 { get; set; }
}
2023-12-19 14:43:26 +00:00
public partial class RequestStateOutputDTO : RequestStateOutputDTOBase { }
[FunctionOutput]
public class RequestStateOutputDTOBase : IFunctionOutputDTO
{
[Parameter("uint8", "", 1)]
public virtual byte ReturnValue1 { get; set; }
}
public partial class SlotStateOutputDTO : SlotStateOutputDTOBase { }
[FunctionOutput]
public class SlotStateOutputDTOBase : IFunctionOutputDTO
{
[Parameter("uint8", "", 1)]
public virtual byte ReturnValue1 { get; set; }
}
public partial class TokenOutputDTO : TokenOutputDTOBase { }
[FunctionOutput]
public class TokenOutputDTOBase : IFunctionOutputDTO
{
[Parameter("address", "", 1)]
public virtual string ReturnValue1 { get; set; }
}
public partial class WillProofBeRequiredOutputDTO : WillProofBeRequiredOutputDTOBase { }
[FunctionOutput]
public class WillProofBeRequiredOutputDTOBase : IFunctionOutputDTO
{
[Parameter("bool", "", 1)]
public virtual bool ReturnValue1 { get; set; }
}
2024-08-20 13:26:19 +00:00
2023-12-19 14:43:26 +00:00
public partial class CollateralConfig : CollateralConfigBase { }
public class CollateralConfigBase
{
[Parameter("uint8", "repairRewardPercentage", 1)]
public virtual byte RepairRewardPercentage { get; set; }
[Parameter("uint8", "maxNumberOfSlashes", 2)]
public virtual byte MaxNumberOfSlashes { get; set; }
[Parameter("uint16", "slashCriterion", 3)]
public virtual ushort SlashCriterion { get; set; }
[Parameter("uint8", "slashPercentage", 4)]
public virtual byte SlashPercentage { get; set; }
}
public partial class ProofConfig : ProofConfigBase { }
public class ProofConfigBase
{
[Parameter("uint256", "period", 1)]
public virtual BigInteger Period { get; set; }
[Parameter("uint256", "timeout", 2)]
public virtual BigInteger Timeout { get; set; }
[Parameter("uint8", "downtime", 3)]
public virtual byte Downtime { get; set; }
[Parameter("string", "zkeyHash", 4)]
public virtual string ZkeyHash { get; set; }
2024-08-20 13:26:19 +00:00
[Parameter("uint8", "downtimeProduct", 5)]
public virtual byte DowntimeProduct { get; set; }
2023-12-19 14:43:26 +00:00
}
public partial class MarketplaceConfig : MarketplaceConfigBase { }
public class MarketplaceConfigBase
{
[Parameter("tuple", "collateral", 1)]
public virtual CollateralConfig Collateral { get; set; }
[Parameter("tuple", "proofs", 2)]
public virtual ProofConfig Proofs { get; set; }
}
public partial class Ask : AskBase { }
public class AskBase
{
[Parameter("uint64", "slots", 1)]
public virtual ulong Slots { get; set; }
[Parameter("uint256", "slotSize", 2)]
public virtual BigInteger SlotSize { get; set; }
[Parameter("uint256", "duration", 3)]
public virtual BigInteger Duration { get; set; }
[Parameter("uint256", "proofProbability", 4)]
public virtual BigInteger ProofProbability { get; set; }
[Parameter("uint256", "reward", 5)]
public virtual BigInteger Reward { get; set; }
[Parameter("uint256", "collateral", 6)]
public virtual BigInteger Collateral { get; set; }
[Parameter("uint64", "maxSlotLoss", 7)]
public virtual ulong MaxSlotLoss { get; set; }
}
public partial class G1Point : G1PointBase { }
public class G1PointBase
{
[Parameter("uint256", "x", 1)]
public virtual BigInteger X { get; set; }
[Parameter("uint256", "y", 2)]
public virtual BigInteger Y { get; set; }
}
public partial class Fp2Element : Fp2ElementBase { }
public class Fp2ElementBase
{
[Parameter("uint256", "real", 1)]
public virtual BigInteger Real { get; set; }
[Parameter("uint256", "imag", 2)]
public virtual BigInteger Imag { get; set; }
}
public partial class G2Point : G2PointBase { }
public class G2PointBase
{
[Parameter("tuple", "x", 1)]
public virtual Fp2Element X { get; set; }
[Parameter("tuple", "y", 2)]
public virtual Fp2Element Y { get; set; }
}
public partial class Groth16Proof : Groth16ProofBase { }
public class Groth16ProofBase
{
[Parameter("tuple", "a", 1)]
public virtual G1Point A { get; set; }
[Parameter("tuple", "b", 2)]
public virtual G2Point B { get; set; }
[Parameter("tuple", "c", 3)]
public virtual G1Point C { get; set; }
}
2023-12-19 14:43:26 +00:00
public partial class Content : ContentBase { }
public class ContentBase
{
[Parameter("string", "cid", 1)]
public virtual string Cid { get; set; }
[Parameter("bytes32", "merkleRoot", 2)]
public virtual byte[] MerkleRoot { get; set; }
}
public partial class Request : RequestBase { }
public class RequestBase
{
[Parameter("address", "client", 1)]
public virtual string Client { get; set; }
[Parameter("tuple", "ask", 2)]
public virtual Ask Ask { get; set; }
[Parameter("tuple", "content", 3)]
public virtual Content Content { get; set; }
[Parameter("uint256", "expiry", 4)]
public virtual BigInteger Expiry { get; set; }
[Parameter("bytes32", "nonce", 5)]
public virtual byte[] Nonce { get; set; }
}
public partial class ActiveSlot : ActiveSlotBase { }
public class ActiveSlotBase
{
[Parameter("tuple", "request", 1)]
public virtual Request Request { get; set; }
[Parameter("uint256", "slotIndex", 2)]
public virtual BigInteger SlotIndex { get; set; }
}
}
2023-12-19 14:43:26 +00:00
#pragma warning restore CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable.