Access Rider Corp (from a Smart Contract)

You can access the corporation that a rider belongs to with the following code:

import { CharactersTable } from "../../../codegen/tables/CharactersTable.sol"; uint256 

.
. <snip>
.

uint256 playerCorp = CharactersTable.getCorpId(characterId);
uint256 smartGateOwner = CharactersByAddressTable.get(IERC721(DeployableTokenTable.getErc721Address()).ownerOf(sourceGateId));
uint256 smartGateOwnerCorp = CharactersTable.getCorpId(smartGateOwner);
Important

In the future World v2 will remove the IERC721 interface from DeployableTokenTable and, we can however simply call {table_name}.get(sourceGateId) without using IERC721.