creator-core-solidity's Issues
Why are Manifold contracts upgradable?
This means the creator can remove tokens from holders at will with an upgrade. Why was this choice made?
Creator contracts contain dead code in their runtime bytecode, can be optimized
Hi,
We (Dedaub) recently reported a solc issue which results in the inclusion of functions that are used only during contract construction to the runtime bytecode. We ran some experiments at scale to assess the bug's impact of and found thousands of deployments of contracts extending your Creator proxies.
You can read more details in our medium post. Bottom line is 500 of the 800 bytes of the deployed bytecode of your contracts is dead code, increasing your deployment costs. Alternatively, the --via-ir
pipeline is not affected by that bug and produces a bytecode of 258 bytes.
Typo on documentation
This might not be at all the place to let you guys now about this but didn't find any other place where to share this. Sorry about it!
Found a typo over at the manifold studio docs:
https://docs.manifold.xyz/deploying-contracts/contract-customization
Where it says "but we aware" I'm sensing maybe it's missing ^are:
First paragraph, second line, around character 54
Error - Initializable: contract is already initialized
I first used your contract as a submodule and got this error in my hardhat unit tests:
const ERC1155Impl: ContractFactory = await ethers.getContractFactory(
"ERC1155CreatorImplementation"
);
const implementationContract = await ERC1155Impl.deploy();
await implementationContract.deployTransaction.wait();
await implementationContract.initialize("Name", "Symbol"); // error: Initializable: contract is already initialized
Then just to verify the error, I cloned this repo, deployed ERC1155CreatorImplementation to Goerli and verified the contract using Foundry. I then went to etherscan and tried to initialize the contract, but then I got this error (which I also could double and triple check with Tenderly).
forge create --rpc-url https://eth-goerli.g.alchemy.com/v2/rpc_key --private-key private_key --verify contracts/ERC1155CreatorImplementation.sol:ERC1155CreatorImplementation --etherscan-api-key api_key
In foundry.toml
I added:
solc = "0.8.16"
optimizer = true
optimizer_runs = 1
If I had to guess, it has to do with OpenZeppelin deprecating isContract()
which now instead should be like address(this).code.length == 0
, and perhaps there's a mismatch between versions?
Please let me know if you can reproduce.
Setbasetokenuri not working
See issue in forum. . Writing to the proxy function goes through, but the base url never changes. Also on a separate contract, setTokenUri is not working, and is giving the error "invalid tokenId" when I am using a correct token Id.
Most Gas Efficient Way to Deploy Programmatically (Max Size Exceeded)
Hi, noticing that when I try creating a contract that is an ERC1155Creator
, I run into the problem of max size exceeded
. This was the source code below. I tried use an optimizer with less runs and that seems to work but wondering if I'm missing something:
pragma solidity ^0.8.0;
import "@manifoldxyz/creator-core-solidity/contracts/ERC1155Creator.sol";
contract TestContract is ERC1155Creator {
constructor() ERC1155Creator("TestContract", "MC") {
}
}
If I wanted to programmatically create many contracts like this, how would you suggest doing so? I'm wondering if importing directly from NPM package is more costly than importing the files myself. The context here is I'm trying to create a similar UX to manifold studios, but wondering the best way to go about it.
totalSupply()
I can't find a totalSupply() function like in other contracts, how do you get the totalSupply with Manifold contracts?
Support EIP-4906 Metadata Update event for ERC721
EIP-4906 allows for the following events to be fired to signal to consumers that the JSON metadata for a token or set of tokens has changed.
event MetadataUpdate(uint256 _tokenId);
event BatchMetadataUpdate(uint256 _fromTokenId, uint256 _toTokenId);
It would be great if the creator core interfaces could support this to be triggered either by an extension or an admin. For instance, when the claim is updated for LazyMintable, the extension could call back into the creator contract to trigger a refresh of all tokens in the contract. Additionally, custom extensions or admins who are controlling metadata with other off-chain methods could manually trigger this when metadata is changed.
This functionality is natively supported by OpenSea to trigger a refresh of the metadata for the specified token ids.
`ERC721Creator` is not compilable with latest OpenZeppelin version
It looks like in the latest OpenZeppelin (4.8.x) they have change the signature of a function.
It still works in v4.7.x
The function _beforeTokenTransfer()
has an extra parameter.
So, if I try and compile code using ERC721Creator
I get this compile error:
TypeError: Function has override specified but does not override anything.
--> @manifoldxyz/creator-core-solidity/contracts/ERC721Creator.sol:27:95:
|
27 | function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual override {
| ^^^^^^^^
Versions:
"@openzeppelin/contracts": "^4.8.1",
"@manifoldxyz/creator-core-solidity": "^2.0.2",
max code size exceeded
I'm trying to follow the README
example and I'm getting a deployment error:
ProviderError: max code size exceeded
Here's my contract:
pragma solidity ^0.8.0;
import "@manifoldxyz/creator-core-solidity/contracts/ERC721Creator.sol";
contract Greeter is ERC721Creator {
constructor() ERC721Creator("MyContract", "MC") {}
}
deploy script
async function main() {
const Greeter = await hre.ethers.getContractFactory("Greeter");
const greeter = await Greeter.deploy();
await greeter.deployed();
console.log("Greeter deployed to:", greeter.address);
}
main()
.then(() => process.exit(0))
.catch((error) => {
console.error(error);
process.exit(1);
});
Can you help?
No contract addresses
There are no contract addresses to show where the Manifold Creator contract implementations are deployed.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.