Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat : upgrade nft traits #138

Merged
merged 3 commits into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Upgrade NFT Traits
  • Loading branch information
PavitraAgarwal21 committed Dec 4, 2024
commit 04a17a175c94b63f66bc6275333c70ddc0101443
11 changes: 6 additions & 5 deletions src/base/token_uris/traits.cairo
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
pub mod head;
pub mod glass;
pub mod head; // 5
pub mod back; //4
pub mod color;
pub mod beard;
pub mod background;
pub mod cloth;
pub mod body; //3
pub mod background; //2
pub mod cloth; //1
pub mod face;
pub mod profile;
pub mod handle;
pub mod follow;
51 changes: 51 additions & 0 deletions src/base/token_uris/traits/back.cairo

Large diffs are not rendered by default.

13 changes: 9 additions & 4 deletions src/base/token_uris/traits/background.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ pub mod background {
BACKGROUND2, // 2
BACKGROUND3, // 3
BACKGROUND4, // 4
BACKGROUND5, // 5
}

pub fn backgroundSvgStart() -> ByteArray {
Expand All @@ -20,19 +21,23 @@ pub mod background {
match backgroundVariant {
BackgroundVariants::BACKGROUND1 => {
decidedbackground =
"<g style=\"fill:orange;fill-opacity:1\"><path style=\"display:inline;fill:#2f5e6e;fill-opacity:1;stroke:#000;stroke-width:1.165;stroke-linecap:round;stroke-dasharray:1.165,1.165;stroke-dashoffset:0;stroke-opacity:1\" d=\"M.145 0h52.952v52.952H.145z\"/></g>"
"<rect style=\"display:inline;fill:#de8174;fill-opacity:1;stroke-width:.02627\" width=\"53.114\" height=\"53.52\" x=\".007\" y=\"-.277\" ry=\"0\"/>"
},
BackgroundVariants::BACKGROUND2 => {
decidedbackground =
"<defs><pattern href=\"#a\" preserveAspectRatio=\"xMidYMid\" id=\"b\" patternTransform=\"matrix(.11 0 0 .11 20.717 451.73)\" x=\"0\" y=\"0\"/><pattern patternUnits=\"userSpaceOnUse\" preserveAspectRatio=\"xMidYMid\" width=\"377.875\" height=\"377.953\" patternTransform=\"matrix(.2 0 0 .2 20.717 452.26)\" id=\"a\"><path style=\"color:#000;fill:#f32500;stroke-width:4.21429;paint-order:markers fill stroke\" d=\"M18.013.003v18.015H0v9.608h13.267L.004 40.89 0 40.885v14.302l.004.004 27.569-27.569h.046v-.043L55.187.009l-.006-.007H40.868l.011.012-13.26 13.26V.003Zm67.818 0L0 85.837v206.27l85.831 85.83-.015.015h206.193l-.02-.022 85.884-85.884.002.002V85.888l-.002.002L291.983 0Zm236.861 0-.007.008 27.567 27.566v.046h.045l27.569 27.57.009-.008V40.883l-.009.008-13.263-13.263h13.272V18.02h-18.008V.005h-9.615v13.271L336.992.016l.01-.012zm-227.62 5.07h187.67l90.072 90.071V282.8l-90.073 90.076H95.076L5.002 282.803V95.143Zm93.836 17.194c-92.01 0-166.703 74.694-166.703 166.703 0 92.01 74.693 166.712 166.703 166.712s166.71-74.702 166.71-166.712-74.7-166.703-166.71-166.703m0 10.116c86.544 0 156.594 70.044 156.594 156.587 0 86.544-70.05 156.597-156.594 156.597S32.312 275.514 32.312 188.97c0-86.543 70.053-156.587 156.596-156.587m0 24.495c-72.894 0-132.092 59.198-132.092 132.092s59.198 132.1 132.092 132.1 132.099-59.205 132.099-132.1S261.803 56.878 188.908 56.878m-5.054 10.225v243.734c-58.475-2.378-106.263-45.806-115.36-102.282h87.654l-.074 67.388c-21.292-8.063-38.776-23.069-49.887-42.43h25.474v13.95h10.115v-24.066H89.38l3.317 7.178c12.795 27.687 37.163 48.88 66.975 57.772l6.495 1.934.115-91.842H67.285a124 124 0 0 1 .248-21.73h98.748l-.115-91.842-6.495 1.936c-29.812 8.892-54.18 30.086-66.975 57.773l-3.317 7.178h52.397v-24.067h-10.115v13.951h-25.468c11.112-19.358 28.591-34.362 49.88-42.423l.075 67.378H68.973c10.195-55.112 57.37-97.151 114.88-99.49m10.107.004c57.51 2.338 104.685 44.377 114.88 99.49h-88.194l.083-67.378c21.288 8.062 38.76 23.065 49.871 42.423h-25.467V127.69H235.02v24.067h52.397l-3.317-7.178c-12.795-27.69-37.163-48.885-66.975-57.777l-6.495-1.936-.115 91.842h99.769a124 124 0 0 1 .246 21.73H210.514l.115 91.842 6.495-1.934c29.812-8.892 54.18-30.085 66.975-57.773l3.317-7.178H235.02v24.067h10.115v-13.95h25.474c-11.11 19.36-28.587 34.366-49.878 42.43l-.083-67.388h88.676c-9.098 56.476-56.887 99.905-115.362 102.282zm183.912 255.649-3.574 3.574-23.992 23.992h-.055v.055l-27.562 27.56.015.015h14.304l-.013-.012 13.256-13.256v13.27h9.615v-18.022h18.008v-9.606h-13.263l13.26-13.26.003.001V322.76ZM0 322.76v14.305l13.271 13.257L0 350.324v9.608l18.013-.002v18.021h9.606v-13.28l13.267 13.267-.013.012h14.295l.02-.023z\"/></pattern></defs><g style=\"fill:orange;fill-opacity:1\"><path style=\"display:inline;fill:#2f5e6e;fill-opacity:1;stroke:#000;stroke-width:1.165;stroke-linecap:round;stroke-dasharray:1.165,1.165;stroke-dashoffset:0;stroke-opacity:1\" d=\"M.145 0h52.952v52.952H.145z\"/><path style=\"display:inline;fill:url(#b);fill-opacity:1;stroke:#0a0805;stroke-width:1.165;stroke-linecap:round;stroke-dasharray:none;stroke-opacity:1\" d=\"M.145 0h52.952v52.952H.145z\"/></g>"
"<rect style=\"display:inline;fill:#db8956;fill-opacity:1;stroke-width:.02627\" width=\"53.114\" height=\"53.52\" x=\".007\" y=\"-.277\" ry=\"0\"/>"
},
BackgroundVariants::BACKGROUND3 => {
decidedbackground =
"<defs><pattern href=\"#a\" preserveAspectRatio=\"xMidYMid\" id=\"b\" patternTransform=\"matrix(.11 0 0 .11 20.717 451.73)\" x=\"0\" y=\"0\"/><pattern patternUnits=\"userSpaceOnUse\" preserveAspectRatio=\"xMidYMid\" width=\"377.875\" height=\"377.953\" patternTransform=\"matrix(.2 0 0 .2 20.717 452.26)\" id=\"a\"><path style=\"color:#000;fill:#f32500;stroke-width:4.21429;paint-order:markers fill stroke\" d=\"M18.013.003v18.015H0v9.608h13.267L.004 40.89 0 40.885v14.302l.004.004 27.569-27.569h.046v-.043L55.187.009l-.006-.007H40.868l.011.012-13.26 13.26V.003Zm67.818 0L0 85.837v206.27l85.831 85.83-.015.015h206.193l-.02-.022 85.884-85.884.002.002V85.888l-.002.002L291.983 0Zm236.861 0-.007.008 27.567 27.566v.046h.045l27.569 27.57.009-.008V40.883l-.009.008-13.263-13.263h13.272V18.02h-18.008V.005h-9.615v13.271L336.992.016l.01-.012zm-227.62 5.07h187.67l90.072 90.071V282.8l-90.073 90.076H95.076L5.002 282.803V95.143Zm93.836 17.194c-92.01 0-166.703 74.694-166.703 166.703 0 92.01 74.693 166.712 166.703 166.712s166.71-74.702 166.71-166.712-74.7-166.703-166.71-166.703m0 10.116c86.544 0 156.594 70.044 156.594 156.587 0 86.544-70.05 156.597-156.594 156.597S32.312 275.514 32.312 188.97c0-86.543 70.053-156.587 156.596-156.587m0 24.495c-72.894 0-132.092 59.198-132.092 132.092s59.198 132.1 132.092 132.1 132.099-59.205 132.099-132.1S261.803 56.878 188.908 56.878m-5.054 10.225v243.734c-58.475-2.378-106.263-45.806-115.36-102.282h87.654l-.074 67.388c-21.292-8.063-38.776-23.069-49.887-42.43h25.474v13.95h10.115v-24.066H89.38l3.317 7.178c12.795 27.687 37.163 48.88 66.975 57.772l6.495 1.934.115-91.842H67.285a124 124 0 0 1 .248-21.73h98.748l-.115-91.842-6.495 1.936c-29.812 8.892-54.18 30.086-66.975 57.773l-3.317 7.178h52.397v-24.067h-10.115v13.951h-25.468c11.112-19.358 28.591-34.362 49.88-42.423l.075 67.378H68.973c10.195-55.112 57.37-97.151 114.88-99.49m10.107.004c57.51 2.338 104.685 44.377 114.88 99.49h-88.194l.083-67.378c21.288 8.062 38.76 23.065 49.871 42.423h-25.467V127.69H235.02v24.067h52.397l-3.317-7.178c-12.795-27.69-37.163-48.885-66.975-57.777l-6.495-1.936-.115 91.842h99.769a124 124 0 0 1 .246 21.73H210.514l.115 91.842 6.495-1.934c29.812-8.892 54.18-30.085 66.975-57.773l3.317-7.178H235.02v24.067h10.115v-13.95h25.474c-11.11 19.36-28.587 34.366-49.878 42.43l-.083-67.388h88.676c-9.098 56.476-56.887 99.905-115.362 102.282zm183.912 255.649-3.574 3.574-23.992 23.992h-.055v.055l-27.562 27.56.015.015h14.304l-.013-.012 13.256-13.256v13.27h9.615v-18.022h18.008v-9.606h-13.263l13.26-13.26.003.001V322.76ZM0 322.76v14.305l13.271 13.257L0 350.324v9.608l18.013-.002v18.021h9.606v-13.28l13.267 13.267-.013.012h14.295l.02-.023z\"/></pattern></defs><g style=\"fill:orange;fill-opacity:1\"><path style=\"display:inline;fill:url(#b);fill-opacity:1;stroke:#0a0805;stroke-width:1.165;stroke-linecap:round;stroke-dasharray:none;stroke-opacity:1\" d=\"M.145 0h52.952v52.952H.145z\"/></g>"
"<rect style=\"display:inline;fill:#eeb100;fill-opacity:1;stroke-width:.02627\" width=\"53.114\" height=\"53.52\" x=\".007\" y=\"-.277\" ry=\"0\"/>"
},
BackgroundVariants::BACKGROUND4 => {
decidedbackground =
"<defs><pattern href=\"#a\" preserveAspectRatio=\"xMidYMid\" id=\"b\" patternTransform=\"matrix(.11 0 0 .11 20.717 451.73)\" x=\"0\" y=\"0\"/><pattern patternUnits=\"userSpaceOnUse\" preserveAspectRatio=\"xMidYMid\" width=\"377.875\" height=\"377.953\" patternTransform=\"matrix(.2 0 0 .2 20.717 452.26)\" id=\"a\"><path style=\"color:#000;fill:#f32500;stroke-width:4.21429;paint-order:markers fill stroke\" d=\"M18.013.003v18.015H0v9.608h13.267L.004 40.89 0 40.885v14.302l.004.004 27.569-27.569h.046v-.043L55.187.009l-.006-.007H40.868l.011.012-13.26 13.26V.003Zm67.818 0L0 85.837v206.27l85.831 85.83-.015.015h206.193l-.02-.022 85.884-85.884.002.002V85.888l-.002.002L291.983 0Zm236.861 0-.007.008 27.567 27.566v.046h.045l27.569 27.57.009-.008V40.883l-.009.008-13.263-13.263h13.272V18.02h-18.008V.005h-9.615v13.271L336.992.016l.01-.012zm-227.62 5.07h187.67l90.072 90.071V282.8l-90.073 90.076H95.076L5.002 282.803V95.143Zm93.836 17.194c-92.01 0-166.703 74.694-166.703 166.703 0 92.01 74.693 166.712 166.703 166.712s166.71-74.702 166.71-166.712-74.7-166.703-166.71-166.703m0 10.116c86.544 0 156.594 70.044 156.594 156.587 0 86.544-70.05 156.597-156.594 156.597S32.312 275.514 32.312 188.97c0-86.543 70.053-156.587 156.596-156.587m0 24.495c-72.894 0-132.092 59.198-132.092 132.092s59.198 132.1 132.092 132.1 132.099-59.205 132.099-132.1S261.803 56.878 188.908 56.878m-5.054 10.225v243.734c-58.475-2.378-106.263-45.806-115.36-102.282h87.654l-.074 67.388c-21.292-8.063-38.776-23.069-49.887-42.43h25.474v13.95h10.115v-24.066H89.38l3.317 7.178c12.795 27.687 37.163 48.88 66.975 57.772l6.495 1.934.115-91.842H67.285a124 124 0 0 1 .248-21.73h98.748l-.115-91.842-6.495 1.936c-29.812 8.892-54.18 30.086-66.975 57.773l-3.317 7.178h52.397v-24.067h-10.115v13.951h-25.468c11.112-19.358 28.591-34.362 49.88-42.423l.075 67.378H68.973c10.195-55.112 57.37-97.151 114.88-99.49m10.107.004c57.51 2.338 104.685 44.377 114.88 99.49h-88.194l.083-67.378c21.288 8.062 38.76 23.065 49.871 42.423h-25.467V127.69H235.02v24.067h52.397l-3.317-7.178c-12.795-27.69-37.163-48.885-66.975-57.777l-6.495-1.936-.115 91.842h99.769a124 124 0 0 1 .246 21.73H210.514l.115 91.842 6.495-1.934c29.812-8.892 54.18-30.085 66.975-57.773l3.317-7.178H235.02v24.067h10.115v-13.95h25.474c-11.11 19.36-28.587 34.366-49.878 42.43l-.083-67.388h88.676c-9.098 56.476-56.887 99.905-115.362 102.282zm183.912 255.649-3.574 3.574-23.992 23.992h-.055v.055l-27.562 27.56.015.015h14.304l-.013-.012 13.256-13.256v13.27h9.615v-18.022h18.008v-9.606h-13.263l13.26-13.26.003.001V322.76ZM0 322.76v14.305l13.271 13.257L0 350.324v9.608l18.013-.002v18.021h9.606v-13.28l13.267 13.267-.013.012h14.295l.02-.023z\"/></pattern></defs><g style=\"fill:orange;fill-opacity:1\"><path style=\"display:inline;fill:#d8ba69;fill-opacity:1;stroke:#000;stroke-width:1.165;stroke-linecap:round;stroke-dasharray:1.165,1.165;stroke-dashoffset:0;stroke-opacity:1\" d=\"M.145 0h52.952v52.952H.145z\"/><path style=\"display:inline;fill:url(#b);fill-opacity:1;stroke:#0a0805;stroke-width:1.165;stroke-linecap:round;stroke-dasharray:none;stroke-opacity:1\" d=\"M.145 0h52.952v52.952H.145z\"/></g>"
"<rect style=\"display:inline;fill:#005d80;fill-opacity:1;stroke-width:.02627\" width=\"53.114\" height=\"53.52\" x=\".007\" y=\"-.277\" ry=\"0\"/>"
},
BackgroundVariants::BACKGROUND5 => {
decidedbackground =
"<rect style=\"display:inline;fill:teal;fill-opacity:1;stroke-width:.02627\" width=\"53.114\" height=\"53.52\" x=\".007\" y=\"-.277\" ry=\"0\"/>"
},
}
decidedbackground
Expand Down
45 changes: 0 additions & 45 deletions src/base/token_uris/traits/beard.cairo

This file was deleted.

883 changes: 883 additions & 0 deletions src/base/token_uris/traits/body.cairo

Large diffs are not rendered by default.

32 changes: 16 additions & 16 deletions src/base/token_uris/traits/cloth.cairo

Large diffs are not rendered by default.

47 changes: 0 additions & 47 deletions src/base/token_uris/traits/eyeacessory.cairo

This file was deleted.

Loading
Loading