Skip to content

Commit

Permalink
filecoin
Browse files Browse the repository at this point in the history
  • Loading branch information
avcdsld committed Jun 2, 2024
1 parent 989fa36 commit 476a64d
Show file tree
Hide file tree
Showing 23 changed files with 2,080 additions and 104 deletions.
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
"source.fixAll.eslint": "explicit"
},
"solidity.packageDefaultDependenciesContractsDirectory": "",
"solidity.packageDefaultDependenciesDirectory": "node_modules"
Expand Down
4 changes: 4 additions & 0 deletions packages/contracts/evm-compatible/README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
```sh
direnv allow
npx hardhat deploy --network [network]
```
4 changes: 2 additions & 2 deletions packages/contracts/evm-compatible/contracts/SakutaroPoem.sol
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ contract SakutaroPoem is ERC721 {
}

function tokenURI(uint256 tokenId) public view override(ERC721) returns (string memory) {
uint256 id = (uint160(ownerOf[tokenId]) + seed) % uint256(39);
uint256 id = (uint160(ownerOf(tokenId)) + seed) % uint256(39);
return ITokenURI(tokenURIContractAddress).tokenURI(id);
}

Expand All @@ -68,7 +68,7 @@ contract SakutaroPoem is ERC721 {

// ERC-2981
function royaltyInfo(
uint256, /* _tokenId */
uint256 /* _tokenId */,
uint256 _value
) external view returns (address _receiver, uint256 _royaltyAmount) {
_receiver = royaltyReceiver;
Expand Down
7 changes: 7 additions & 0 deletions packages/contracts/evm-compatible/deploy/00_SakutaroPoem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,21 @@ const func = async (hre: any) => {
const { deployments, getNamedAccounts } = hre;
const { deploy } = deployments;
const { deployer } = await getNamedAccounts();
const feeData = await hre.ethers.provider.getFeeData();
const tokenURIContract = await deploy("TokenURI", {
from: deployer,
log: true,
maxPriorityFeePerGas: feeData.maxPriorityFeePerGas,
maxFeePerGas: feeData.maxFeePerGas,
type: "0x2",
});
await deploy("SakutaroPoem", {
from: deployer,
args: [tokenURIContract.address],
log: true,
maxPriorityFeePerGas: feeData.maxPriorityFeePerGas,
maxFeePerGas: feeData.maxFeePerGas,
type: "0x2",
});
};

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
314
Loading

0 comments on commit 476a64d

Please sign in to comment.