-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #58 from MVPWorkshop/gh-actions
[M4] GitHub Actions
- Loading branch information
Showing
9 changed files
with
350 additions
and
1,131 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
node_modules | ||
.env | ||
|
||
# Hardhat files | ||
/cache | ||
/artifacts | ||
|
||
# TypeChain files | ||
/typechain | ||
/typechain-types | ||
|
||
# solidity-coverage files | ||
/coverage | ||
/coverage.json | ||
|
||
# Hardhat Ignition default folder for deployments against a local node | ||
ignition/deployments/chain-31337 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Hardhat project example | ||
|
||
Used for testing the API install and imports. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
// SPDX-License-Identifier: UNLICENSED | ||
pragma solidity ^0.8.18; | ||
|
||
import {FilAddresses} from "filecoin-solidity-api/contracts/v0.8/utils/FilAddresses.sol"; | ||
import {CommonTypes} from "filecoin-solidity-api/contracts/v0.8/types/CommonTypes.sol"; | ||
|
||
import {AccountTypes} from "filecoin-solidity-api/contracts/v0.8/types/AccountTypes.sol"; | ||
import {DataCapTypes} from "filecoin-solidity-api/contracts/v0.8/types/DataCapTypes.sol"; | ||
import {MarketTypes} from "filecoin-solidity-api/contracts/v0.8/types/MarketTypes.sol"; | ||
import {MinerTypes} from "filecoin-solidity-api/contracts/v0.8/types/MinerTypes.sol"; | ||
import {PowerTypes} from "filecoin-solidity-api/contracts/v0.8/types/PowerTypes.sol"; | ||
import {VerifRegTypes} from "filecoin-solidity-api/contracts/v0.8/types/VerifRegTypes.sol"; | ||
|
||
import {AccountAPI} from "filecoin-solidity-api/contracts/v0.8/AccountAPI.sol"; | ||
import {DataCapAPI} from "filecoin-solidity-api/contracts/v0.8/DataCapAPI.sol"; | ||
import {MarketAPI} from "filecoin-solidity-api/contracts/v0.8/MarketAPI.sol"; | ||
import {MinerAPI} from "filecoin-solidity-api/contracts/v0.8/MinerAPI.sol"; | ||
import {PowerAPI} from "filecoin-solidity-api/contracts/v0.8/PowerAPI.sol"; | ||
import {PrecompilesAPI} from "filecoin-solidity-api/contracts/v0.8/PrecompilesAPI.sol"; | ||
import {SendAPI} from "filecoin-solidity-api/contracts/v0.8/SendAPI.sol"; | ||
import {VerifRegAPI} from "filecoin-solidity-api/contracts/v0.8/VerifRegAPI.sol"; | ||
|
||
contract API_Inclusion { | ||
//AccountAPI | ||
function account_authenticate_message(CommonTypes.FilActorId target, AccountTypes.AuthenticateMessageParams memory params) public view { | ||
AccountAPI.authenticateMessage(target, params); | ||
} | ||
|
||
//AddressAPI | ||
function actorid_conversion() public pure { | ||
uint64 actorID = 1; | ||
CommonTypes.FilAddress memory result = FilAddresses.fromActorID(actorID); | ||
} | ||
//DatacapAPI | ||
function bundle(DataCapTypes.TransferParams memory params) internal returns (int256, DataCapTypes.TransferReturn memory) { | ||
DataCapAPI.name(); | ||
DataCapAPI.symbol(); | ||
} | ||
|
||
//MarketAPI | ||
function withdraw_balance(MarketTypes.WithdrawBalanceParams memory params) public returns (CommonTypes.BigInt memory) { | ||
(int256 exit_code, CommonTypes.BigInt memory result) = MarketAPI.withdrawBalance(params); | ||
|
||
return result; | ||
} | ||
|
||
//MinerAPI | ||
function get_owner(CommonTypes.FilActorId target) external view returns (int256, MinerTypes.GetOwnerReturn memory) { | ||
MinerAPI.getOwner(target); | ||
} | ||
|
||
//PowerAPI | ||
function create_miner(PowerTypes.CreateMinerParams memory params, uint256 value) internal returns (int256, PowerTypes.CreateMinerReturn memory) { | ||
PowerAPI.createMiner(params, value); | ||
} | ||
|
||
//PrecompilesAPI | ||
function resolve_address(CommonTypes.FilAddress memory addr) internal view returns (uint64) { | ||
PrecompilesAPI.resolveAddress(addr); | ||
} | ||
|
||
//SendAPI | ||
function send(CommonTypes.FilAddress memory target, uint256 value) internal returns (int256) { | ||
SendAPI.send(target, value); | ||
} | ||
|
||
//VerifregAPI | ||
function remove_expired_claims( | ||
VerifRegTypes.RemoveExpiredClaimsParams memory params | ||
) public returns (int256, VerifRegTypes.RemoveExpiredClaimsReturn memory) { | ||
VerifRegAPI.removeExpiredClaims(params); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
require("@nomicfoundation/hardhat-toolbox") | ||
|
||
/** @type import('hardhat/config').HardhatUserConfig */ | ||
module.exports = { | ||
solidity: "0.8.18", | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"name": "fil-sol-use", | ||
"version": "1.0.0", | ||
"description": "", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"keywords": [], | ||
"author": "", | ||
"license": "ISC", | ||
"dependencies": { | ||
"@nomicfoundation/hardhat-chai-matchers": "^2.0.0", | ||
"@nomicfoundation/hardhat-ethers": "^3.0.0", | ||
"@nomicfoundation/hardhat-ignition": "^0.15.4", | ||
"@nomicfoundation/hardhat-ignition-ethers": "^0.15.0", | ||
"@nomicfoundation/hardhat-network-helpers": "^1.0.0", | ||
"@nomicfoundation/hardhat-verify": "^2.0.0", | ||
"@typechain/ethers-v6": "^0.5.0", | ||
"@typechain/hardhat": "^9.0.0", | ||
"@types/mocha": ">=9.1.0", | ||
"chai": "^4.2.0", | ||
"hardhat": "^2.22.4", | ||
"hardhat-gas-reporter": "^1.0.8", | ||
"solidity-coverage": "^0.8.1", | ||
"ts-node": ">=8.0.0", | ||
"typechain": "^8.3.0", | ||
"typescript": ">=4.5.0" | ||
}, | ||
"devDependencies": { | ||
"@nomicfoundation/hardhat-toolbox": "^5.0.0" | ||
} | ||
} |
Oops, something went wrong.