{"id":21188740,"url":"https://github.com/calcuis/container-smart-contract","last_synced_at":"2025-03-14T20:26:36.315Z","repository":{"id":225584875,"uuid":"766345550","full_name":"calcuis/container-smart-contract","owner":"calcuis","description":"content changeable token serves as container (backend)","archived":false,"fork":false,"pushed_at":"2024-03-05T20:15:28.000Z","size":39,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-21T13:11:39.983Z","etag":null,"topics":["backend","container","smart-contract"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/gguf-container","language":"Solidity","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/calcuis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-03T02:05:27.000Z","updated_at":"2024-03-05T01:08:25.000Z","dependencies_parsed_at":"2024-03-03T03:21:05.242Z","dependency_job_id":"cfd94c11-44a9-4bd1-9251-db68ecd25a6e","html_url":"https://github.com/calcuis/container-smart-contract","commit_stats":null,"previous_names":["calcuis/container-smart-contract"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/calcuis%2Fcontainer-smart-contract","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/calcuis%2Fcontainer-smart-contract/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/calcuis%2Fcontainer-smart-contract/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/calcuis%2Fcontainer-smart-contract/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/calcuis","download_url":"https://codeload.github.com/calcuis/container-smart-contract/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243641145,"owners_count":20323797,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["backend","container","smart-contract"],"created_at":"2024-11-20T18:47:35.935Z","updated_at":"2025-03-14T20:26:36.290Z","avatar_url":"https://github.com/calcuis.png","language":"Solidity","funding_links":[],"categories":[],"sub_categories":[],"readme":"This smart contract is written in Solidity.\n\nState Variables:\n- `owner`: Stores the address of the contract owner.\n- `admin`: Stores the address of the administrator.\n- `maxSupply`: Tracks the maximum number of pigs that can be created.\n- `totalSupply`: Tracks the total number of pigs that have been minted.\n- `isClosed`: Indicates whether the shop is closed or not.\n- `pigs`: A mapping that stores info about each pig, identified by a unique id.\n\nStruct:\n- `Pig`: Defines the structure of a pig, containing fields such as id, name, cost, image, and ownership status.\n\nModifiers:\n- `ownerOnly`: Restricts access to functions to only the contract owner.\n- `adminOnly`: Restricts access to functions to only the administrator.\n- `Constructor`: Sets the owner of the contract to the deployer's address (once only).\n\nFunctions:\n- `changeOwner`: Allows the current owner to transfer ownership to a new address.\n- `assignAdmin`: Allows the owner to assign an administrator.\n- `modifyCost`: Allows the owner to modify the cost of a pig.\n- `redeem`: Allows the owner to withdraw funds from the contract.\n- `closeShop`: Allows the owner to close or reopen the shop.\n- `list`: Allows the administrator to list a new pig for sale.\n- `editPig`: Allows the administrator to edit the details of a pig before it's owned by someone else.\n- `getBalance`: Returns the balance of the contract.\n- `getPig`: Returns information about a specific pig.\n- `modifyPig`: Allows the owner of a pig to modify its details.\n- `mint`: Allows users to mint a pig by paying its cost.\n- `tokenURI`: Overrides the tokenURI function from ERC721 to generate metadata (JSON) for a pig, including its name and image.\n\n*this contract (backend) and the [frontend code](https://github.com/calcuis/container-frontend) are for education/demonstration purpose(s); don't pay anything silly for mainnet; since buggie (for the whole evm) still; learn it from testnet(s) is recommended.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcalcuis%2Fcontainer-smart-contract","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcalcuis%2Fcontainer-smart-contract","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcalcuis%2Fcontainer-smart-contract/lists"}