Smart Contracts (Testnet)

Module: ccd_contract
back to overview
ccd_contract
Methods: 6
Instances: 2
Initialization

Parameters
{
  "end": "<Timestamp (e.g. `2000-01-01T12:00:00Z`)>",
  "entry_fee": "<Amount in microCCD>",
  "entry_limit": "<UInt32>",
  "id": "<String>",
  "prize": "<Amount in microCCD>",
  "start": "<Timestamp (e.g. `2000-01-01T12:00:00Z`)>"
}
Errors
{
  "Enum": [
    {
      "ParseParams": []
    },
    {
      "Unauthorized": []
    },
    {
      "ParticipantsAlreadyJoined": []
    },
    {
      "InvokeContractError": []
    },
    {
      "FailedUpgradeMissingModule": []
    },
    {
      "FailedUpgradeMissingContract": []
    },
    {
      "FailedUpgradeUnsupportedModuleVersion": []
    },
    {
      "LogFull": []
    },
    {
      "LogMalformed": []
    },
    {
      "OnlyAccount": []
    },
    {
      "AlreadyJoinedGameRoomError": []
    },
    {
      "MaxEntryReached": []
    },
    {
      "AmountLessThanEntryFee": []
    },
    {
      "ContractOwnerDenied": []
    },
    {
      "JoinBeforeStartError": []
    },
    {
      "JoinAfterEndError": []
    },
    {
      "PayoutAfterWinnerAnnounced": []
    },
    {
      "PayoutBeforeGameRoomEndError": []
    },
    {
      "InvalidWinner": []
    },
    {
      "InvokeTransferError": []
    }
  ]
}
Event
{
  "Enum": [
    {
      "JoinGameRoom": [
        {
          "game_room_id": "<String>",
          "team_id": "<String>",
          "user_id": "<String>",
          "wallet_address": "<AccountAddress>"
        }
      ]
    }
  ]
}
Methods

Parameters
None
Errors
{
  "Enum": [
    {
      "ParseParams": []
    },
    {
      "Unauthorized": []
    },
    {
      "ParticipantsAlreadyJoined": []
    },
    {
      "InvokeContractError": []
    },
    {
      "FailedUpgradeMissingModule": []
    },
    {
      "FailedUpgradeMissingContract": []
    },
    {
      "FailedUpgradeUnsupportedModuleVersion": []
    },
    {
      "LogFull": []
    },
    {
      "LogMalformed": []
    },
    {
      "OnlyAccount": []
    },
    {
      "AlreadyJoinedGameRoomError": []
    },
    {
      "MaxEntryReached": []
    },
    {
      "AmountLessThanEntryFee": []
    },
    {
      "ContractOwnerDenied": []
    },
    {
      "JoinBeforeStartError": []
    },
    {
      "JoinAfterEndError": []
    },
    {
      "PayoutAfterWinnerAnnounced": []
    },
    {
      "PayoutBeforeGameRoomEndError": []
    },
    {
      "InvalidWinner": []
    },
    {
      "InvokeTransferError": []
    }
  ]
}
Return
None

Parameters
{
  "end": {
    "Enum": [
      {
        "None": []
      },
      {
        "Some": [
          "<Timestamp (e.g. `2000-01-01T12:00:00Z`)>"
        ]
      }
    ]
  },
  "entry_fee": {
    "Enum": [
      {
        "None": []
      },
      {
        "Some": [
          "<Amount in microCCD>"
        ]
      }
    ]
  },
  "entry_limit": {
    "Enum": [
      {
        "None": []
      },
      {
        "Some": [
          "<UInt32>"
        ]
      }
    ]
  },
  "id": {
    "Enum": [
      {
        "None": []
      },
      {
        "Some": [
          "<String>"
        ]
      }
    ]
  },
  "prize": {
    "Enum": [
      {
        "None": []
      },
      {
        "Some": [
          "<Amount in microCCD>"
        ]
      }
    ]
  },
  "start": {
    "Enum": [
      {
        "None": []
      },
      {
        "Some": [
          "<Timestamp (e.g. `2000-01-01T12:00:00Z`)>"
        ]
      }
    ]
  }
}
Errors
{
  "Enum": [
    {
      "ParseParams": []
    },
    {
      "Unauthorized": []
    },
    {
      "ParticipantsAlreadyJoined": []
    },
    {
      "InvokeContractError": []
    },
    {
      "FailedUpgradeMissingModule": []
    },
    {
      "FailedUpgradeMissingContract": []
    },
    {
      "FailedUpgradeUnsupportedModuleVersion": []
    },
    {
      "LogFull": []
    },
    {
      "LogMalformed": []
    },
    {
      "OnlyAccount": []
    },
    {
      "AlreadyJoinedGameRoomError": []
    },
    {
      "MaxEntryReached": []
    },
    {
      "AmountLessThanEntryFee": []
    },
    {
      "ContractOwnerDenied": []
    },
    {
      "JoinBeforeStartError": []
    },
    {
      "JoinAfterEndError": []
    },
    {
      "PayoutAfterWinnerAnnounced": []
    },
    {
      "PayoutBeforeGameRoomEndError": []
    },
    {
      "InvalidWinner": []
    },
    {
      "InvokeTransferError": []
    }
  ]
}
Return
None

Parameters
{
  "potential_winner": "<AccountAddress>"
}
Errors
{
  "Enum": [
    {
      "ParseParams": []
    },
    {
      "Unauthorized": []
    },
    {
      "ParticipantsAlreadyJoined": []
    },
    {
      "InvokeContractError": []
    },
    {
      "FailedUpgradeMissingModule": []
    },
    {
      "FailedUpgradeMissingContract": []
    },
    {
      "FailedUpgradeUnsupportedModuleVersion": []
    },
    {
      "LogFull": []
    },
    {
      "LogMalformed": []
    },
    {
      "OnlyAccount": []
    },
    {
      "AlreadyJoinedGameRoomError": []
    },
    {
      "MaxEntryReached": []
    },
    {
      "AmountLessThanEntryFee": []
    },
    {
      "ContractOwnerDenied": []
    },
    {
      "JoinBeforeStartError": []
    },
    {
      "JoinAfterEndError": []
    },
    {
      "PayoutAfterWinnerAnnounced": []
    },
    {
      "PayoutBeforeGameRoomEndError": []
    },
    {
      "InvalidWinner": []
    },
    {
      "InvokeTransferError": []
    }
  ]
}
Return
None

Parameters
None
Errors
{
  "Enum": [
    {
      "ParseParams": []
    },
    {
      "Unauthorized": []
    },
    {
      "ParticipantsAlreadyJoined": []
    },
    {
      "InvokeContractError": []
    },
    {
      "FailedUpgradeMissingModule": []
    },
    {
      "FailedUpgradeMissingContract": []
    },
    {
      "FailedUpgradeUnsupportedModuleVersion": []
    },
    {
      "LogFull": []
    },
    {
      "LogMalformed": []
    },
    {
      "OnlyAccount": []
    },
    {
      "AlreadyJoinedGameRoomError": []
    },
    {
      "MaxEntryReached": []
    },
    {
      "AmountLessThanEntryFee": []
    },
    {
      "ContractOwnerDenied": []
    },
    {
      "JoinBeforeStartError": []
    },
    {
      "JoinAfterEndError": []
    },
    {
      "PayoutAfterWinnerAnnounced": []
    },
    {
      "PayoutBeforeGameRoomEndError": []
    },
    {
      "InvalidWinner": []
    },
    {
      "InvokeTransferError": []
    }
  ]
}
Return
{
  "balance": "<Amount in microCCD>",
  "end": "<Timestamp (e.g. `2000-01-01T12:00:00Z`)>",
  "entry_fee": "<Amount in microCCD>",
  "entry_limit": "<UInt32>",
  "id": "<String>",
  "participants_count": "<UInt32>",
  "prize": "<Amount in microCCD>",
  "start": "<Timestamp (e.g. `2000-01-01T12:00:00Z`)>",
  "winner": {
    "Enum": [
      {
        "None": []
      },
      {
        "Some": [
          "<AccountAddress>"
        ]
      }
    ]
  }
}

Parameters
None
Errors
None
Return
[
  "<AccountAddress>"
]

Parameters
{
  "migrate": {
    "Enum": [
      {
        "None": []
      },
      {
        "Some": [
          [
            "<String>",
            "<String with lowercase hex>"
          ]
        ]
      }
    ]
  },
  "module": "<String of size 64 containing lowercase hex characters.>"
}
Errors
{
  "Enum": [
    {
      "ParseParams": []
    },
    {
      "Unauthorized": []
    },
    {
      "ParticipantsAlreadyJoined": []
    },
    {
      "InvokeContractError": []
    },
    {
      "FailedUpgradeMissingModule": []
    },
    {
      "FailedUpgradeMissingContract": []
    },
    {
      "FailedUpgradeUnsupportedModuleVersion": []
    },
    {
      "LogFull": []
    },
    {
      "LogMalformed": []
    },
    {
      "OnlyAccount": []
    },
    {
      "AlreadyJoinedGameRoomError": []
    },
    {
      "MaxEntryReached": []
    },
    {
      "AmountLessThanEntryFee": []
    },
    {
      "ContractOwnerDenied": []
    },
    {
      "JoinBeforeStartError": []
    },
    {
      "JoinAfterEndError": []
    },
    {
      "PayoutAfterWinnerAnnounced": []
    },
    {
      "PayoutBeforeGameRoomEndError": []
    },
    {
      "InvalidWinner": []
    },
    {
      "InvokeTransferError": []
    }
  ]
}
Return
None


Release: 2024.12
Support CCDExplorer.io Uptime Backend Status CCDExplorer is supported by AesirX - Decentralized Consent & Data Ownership