Filecoin.sol
This page covers the built-in actors Filecoin.sol API.
For conceptual information on built-in actors, including their purposes, how they work and more, see the conceptual guide.
Prerequisites
Before you can call a built-in actor using the API, you must import filecoin.solidity using one of the available methods.
Call a built-in actor
For available actors and methods see Available actors and methods.
Once you’ve either imported particular contracts manually or simply installed filecoin-solidity using npm, create a callable method to access the built-in actor methods the way you normally would in a Solidity smart contract. Working examples of smart contracts that call built-in actor methods are available below.
For conceptual information on built-in actors, including their purposes, how they work and available types, see the conceptual guide.
Call the account actor
The following example imports the Account actor library and creates a callable method for each of the available actor methods. For the full code, see the GitHub repository.
Call the DataCap actor
The following example imports the DataCap actor library and creates a callable method for each of the available actor methods. For the full code, see the GitHub repository.
Call the storage market actor
The following example imports the Storage market actor library and creates a callable method for each of the available actor methods. For the full code, see the GitHub repository.
Call the miner actor
The following example imports the Account actor library and creates a callable method for each of the available actor methods. For the full code, see the GitHub repository.
Call the storage power actor
The following example imports the Storage power actor library and creates a callable method for each of the available actor methods. For the full code, see the GitHub repository.
Call the verified registry actor
The following example imports the verified registry actor library and creates a callable method for each of the available actor methods. For the full code, see the GitHub repository.
Last updated
Was this helpful?