Skip to content

Commit

Permalink
feat: static data
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffprestes committed Dec 3, 2024
1 parent 28f515a commit de48e9f
Show file tree
Hide file tree
Showing 7 changed files with 76 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cache/solidity-files-cache.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions cache/test-failures
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
test_mint
Binary file added static/ismeniacoaracy_pico-do-jaragua.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/ismeniacoaracy_pico-do-jaragua_small.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/ismeniacoaracy_profile-picture.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
54 changes: 54 additions & 0 deletions static/nft/1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"title": "Token Metadata",
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Identifies the asset to which this token represents"
},
"decimals": {
"type": "integer",
"description": "The number of decimal places that the token amount should display - e.g. 18, means to divide the token amount by 1000000000000000000 to get its user representation."
},
"description": {
"type": "string",
"description": "Describes the asset to which this token represents"
},
"image": {
"type": "string",
"description": "A URI pointing to a resource with mime type image/* representing the asset to which this token represents. Consider making any images at a width between 320 and 1080 pixels and aspect ratio between 1.91:1 and 4:5 inclusive."
},
"properties": {
"type": "object",
"description": "Arbitrary properties. Values may be strings, numbers, object or arrays."
}
}
}

{
"name": "Caminho ao Pico do Jaraguá",
"description": "Caminho ao Pico do Jaraguá or Path to Jaraguá Hights is an oil in canvas paiting. It is one of first artwork made Ismenia Coaracy. The buyer will receive the physical item and also the rights of the digital version of it.",
"image": "https://novatrixtech.github.io/paredesnft/static/ismeniacoaracy_pico-do-jaragua.jpg",
"image_low": "https://novatrixtech.github.io/paredesnft/static/ismeniacoaracy_pico-do-jaragua_small.jpg",
"external_url": "https://pt.wikipedia.org/wiki/Ism%C3%AAnia_Coaracy",
"seller_fee_basis_points": 100,
"fee_recipient": "0x7dA2547202458D2540d64513D409A1c2bA57bA3A",
"attributes": [
{
"trait_type": "Medium",
"value": "Oil in Canvas"
},
{
"trait_type": "Year",
"value": "1957"
},
{
"trait_type": "Artist",
"value": "Ismenia Coaracy"
},
{
"trait_type": "Dimensions",
"value": "44 cm x 34 cm"
}
]
}
21 changes: 20 additions & 1 deletion test/ParedesNFT.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,28 @@ import {ParedesNFT} from "../src/ParedesNFT.sol";

contract ParedesNFTTest is Test {
ParedesNFT public paredes;
address public owner = 0x1234567890123456789012345678901234567890;

function setUp() public {
paredes = new ParedesNFT(msg.sender);
paredes = new ParedesNFT(owner);
}

function test_mint() public {
uint256 id = 1;
uint256 amount = 1;
bytes memory data = "0x";
vm.prank(owner);
paredes.mint(owner, id, amount, data);
uint256 balance = paredes.balanceOf(owner, id);
assertEq(balance, amount);
}

function test_uri() public {
uint256 id = 1;
string memory uri = "https://example.com";
vm.prank(owner);
paredes.setURI(id, uri);
string memory actual = paredes.uri(id);
assertEq(actual, uri);
}
}

0 comments on commit de48e9f

Please sign in to comment.