Smart Contracts

Module: bridge-manager
back to overview
bridge-manager
Methods: 13
Instances: 1
Initialization

Parameters
None
Errors
None
Event
{
  "Enum": [
    {
      "TokenMap": [
        {
          "child": {
            "index": "<UInt64>",
            "subindex": "<UInt64>"
          },
          "id": "<UInt64>",
          "root": "<String of size 40 containing lowercase hex characters.>"
        }
      ]
    },
    {
      "Deposit": [
        {
          "amount": "<String of size at most 74 containing an unsigned integer.>",
          "contract": {
            "index": "<UInt64>",
            "subindex": "<UInt64>"
          },
          "id": "<UInt64>",
          "token_id": "<String with lowercase hex>"
        }
      ]
    },
    {
      "Withdraw": [
        {
          "amount": "<String of size at most 74 containing an unsigned integer.>",
          "ccd_address": {
            "Enum": [
              {
                "Account": [
                  "<AccountAddress>"
                ]
              },
              {
                "Contract": [
                  {
                    "index": "<UInt64>",
                    "subindex": "<UInt64>"
                  }
                ]
              }
            ]
          },
          "contract": {
            "index": "<UInt64>",
            "subindex": "<UInt64>"
          },
          "eth_address": "<String of size 40 containing lowercase hex characters.>",
          "id": "<UInt64>",
          "token_id": "<String with lowercase hex>"
        }
      ]
    },
    {
      "GrantRole": [
        {
          "address": {
            "Enum": [
              {
                "Account": [
                  "<AccountAddress>"
                ]
              },
              {
                "Contract": [
                  {
                    "index": "<UInt64>",
                    "subindex": "<UInt64>"
                  }
                ]
              }
            ]
          },
          "role": {
            "Enum": [
              {
                "Admin": []
              },
              {
                "Mapper": []
              },
              {
                "StateSyncer": []
              }
            ]
          }
        }
      ]
    },
    {
      "RevokeRole": [
        {
          "address": {
            "Enum": [
              {
                "Account": [
                  "<AccountAddress>"
                ]
              },
              {
                "Contract": [
                  {
                    "index": "<UInt64>",
                    "subindex": "<UInt64>"
                  }
                ]
              }
            ]
          },
          "role": {
            "Enum": [
              {
                "Admin": []
              },
              {
                "Mapper": []
              },
              {
                "StateSyncer": []
              }
            ]
          }
        }
      ]
    }
  ]
}
Methods

Parameters
"<UInt64>"
Errors
None
Return
"<Bool>"

Parameters
None
Errors
None
Return
{
  "all_roles": [
    [
      {
        "Enum": [
          {
            "Account": [
              "<AccountAddress>"
            ]
          },
          {
            "Contract": [
              {
                "index": "<UInt64>",
                "subindex": "<UInt64>"
              }
            ]
          }
        ]
      },
      {
        "roles": [
          {
            "Enum": [
              {
                "Admin": []
              },
              {
                "Mapper": []
              },
              {
                "StateSyncer": []
              }
            ]
          }
        ]
      }
    ]
  ]
}

Parameters
None
Errors
None
Return
{
  "child_mappings": [
    [
      {
        "index": "<UInt64>",
        "subindex": "<UInt64>"
      },
      "<String of size 40 containing lowercase hex characters.>"
    ]
  ],
  "root_mappings": [
    [
      "<String of size 40 containing lowercase hex characters.>",
      {
        "index": "<UInt64>",
        "subindex": "<UInt64>"
      }
    ]
  ]
}

Parameters
None
Errors
None
Return
{
  "emit_event_index": "<UInt64>",
  "paused": "<Bool>",
  "treasurer_address": "<AccountAddress>",
  "withdraw_fee": "<Amount in microCCD>"
}

Parameters
{
  "address": {
    "Enum": [
      {
        "Account": [
          "<AccountAddress>"
        ]
      },
      {
        "Contract": [
          {
            "index": "<UInt64>",
            "subindex": "<UInt64>"
          }
        ]
      }
    ]
  },
  "role": {
    "Enum": [
      {
        "Admin": []
      },
      {
        "Mapper": []
      },
      {
        "StateSyncer": []
      }
    ]
  }
}
Errors
None
Return
[
  "<Bool>"
]

Parameters
{
  "address": {
    "Enum": [
      {
        "Account": [
          "<AccountAddress>"
        ]
      },
      {
        "Contract": [
          {
            "index": "<UInt64>",
            "subindex": "<UInt64>"
          }
        ]
      }
    ]
  },
  "role": {
    "Enum": [
      {
        "Admin": []
      },
      {
        "Mapper": []
      },
      {
        "StateSyncer": []
      }
    ]
  }
}
Errors
None
Return
None

Parameters
{
  "address": {
    "Enum": [
      {
        "Account": [
          "<AccountAddress>"
        ]
      },
      {
        "Contract": [
          {
            "index": "<UInt64>",
            "subindex": "<UInt64>"
          }
        ]
      }
    ]
  },
  "role": {
    "Enum": [
      {
        "Admin": []
      },
      {
        "Mapper": []
      },
      {
        "StateSyncer": []
      }
    ]
  }
}
Errors
None
Return
None

Parameters
{
  "amount": "<Amount in microCCD>"
}
Errors
None
Return
None

Parameters
{
  "account": "<AccountAddress>"
}
Errors
None
Return
None

Parameters
{
  "migrate": {
    "Enum": [
      {
        "None": []
      },
      {
        "Some": [
          [
            "<String>",
            "<String with lowercase hex>"
          ]
        ]
      }
    ]
  },
  "module": "<String of size 64 containing lowercase hex characters.>"
}
Errors
{
  "Enum": [
    {
      "InvalidTokenId": []
    },
    {
      "InsufficientFunds": []
    },
    {
      "Unauthorized": []
    },
    {
      "Custom": [
        {
          "Enum": [
            {
              "ParseParams": []
            },
            {
              "LogFull": []
            },
            {
              "LogMalformed": []
            },
            {
              "ContractPaused": []
            },
            {
              "InvokeContractError": []
            },
            {
              "InvokeTransferError": []
            },
            {
              "TokenNotMapped": []
            },
            {
              "RoleNotAssigned": []
            },
            {
              "WithdrawFeeTooLow": []
            },
            {
              "OperationAlreadyProcessed": []
            },
            {
              "FailedUpgradeMissingModule": []
            },
            {
              "FailedUpgradeMissingContract": []
            },
            {
              "FailedUpgradeUnsupportedModuleVersion": []
            },
            {
              "OnlyAccountsCanWithdraw": []
            }
          ]
        }
      ]
    }
  ]
}
Return
None

Parameters
{
  "paused": "<Bool>"
}
Errors
{
  "Enum": [
    {
      "InvalidTokenId": []
    },
    {
      "InsufficientFunds": []
    },
    {
      "Unauthorized": []
    },
    {
      "Custom": [
        {
          "Enum": [
            {
              "ParseParams": []
            },
            {
              "LogFull": []
            },
            {
              "LogMalformed": []
            },
            {
              "ContractPaused": []
            },
            {
              "InvokeContractError": []
            },
            {
              "InvokeTransferError": []
            },
            {
              "TokenNotMapped": []
            },
            {
              "RoleNotAssigned": []
            },
            {
              "WithdrawFeeTooLow": []
            },
            {
              "OperationAlreadyProcessed": []
            },
            {
              "FailedUpgradeMissingModule": []
            },
            {
              "FailedUpgradeMissingContract": []
            },
            {
              "FailedUpgradeUnsupportedModuleVersion": []
            },
            {
              "OnlyAccountsCanWithdraw": []
            }
          ]
        }
      ]
    }
  ]
}
Return
None

Parameters
{
  "Enum": [
    {
      "Deposit": [
        {
          "amount": "<String of size at most 74 containing an unsigned integer.>",
          "id": "<UInt64>",
          "root": "<String of size 40 containing lowercase hex characters.>",
          "token_id": "<String with lowercase hex>",
          "user": {
            "Enum": [
              {
                "Account": [
                  "<AccountAddress>"
                ]
              },
              {
                "Contract": [
                  {
                    "index": "<UInt64>",
                    "subindex": "<UInt64>"
                  }
                ]
              }
            ]
          }
        }
      ]
    },
    {
      "TokenMap": [
        {
          "child": {
            "index": "<UInt64>",
            "subindex": "<UInt64>"
          },
          "id": "<UInt64>",
          "root": "<String of size 40 containing lowercase hex characters.>"
        }
      ]
    }
  ]
}
Errors
None
Return
None

Parameters
{
  "amount": "<String of size at most 74 containing an unsigned integer.>",
  "eth_address": "<String of size 40 containing lowercase hex characters.>",
  "token": {
    "index": "<UInt64>",
    "subindex": "<UInt64>"
  },
  "token_id": "<String with lowercase hex>"
}
Errors
None
Return
None
Address
🗎<9337,0>


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