I've been able to replicate the SimpleERC721 code example from above with Remix, therefore I will try to keep it as close to that as possible while trying to get that contract to complie with ZepplinOS and Embark.
I'm using solc 0.5.13
ZeppelinOS:
I change the code to import from @openzeppelin/contracts
oz push
gives the following error:
- Contract SimpleERC721 has an explicit constructor. Change it to an initializer function. See https://docs.openzeppelin.com/sdk/2.5/writing_contracts.html#initializers.
One or more contracts have validation errors. Please review the items listed above and fix them, or run this command again with the --force option.
oz push --force
works and I can compile and submit to ganache cli
Proper way to handle this with upgradeable contracts, thanks @abcoathup:
Embark:
Using the exact same code that ran on Remix, pulling the same repo From Github, this is the error from the Embark console:
change: contracts/SimpleERC721.sol
embark-solc:
assuming Context to be an interface
assuming MinterRole to be an interface
assuming ERC165 to be an interface
assuming IERC165 to be an interface
assuming ERC721MetadataMintable to be an interface
assuming IERC721 to be an interface
assuming IERC721Enumerable to be an interface
assuming IERC721Metadata to be an interface
assuming IERC721Receiver to be an interface
To get more details on interface Smart contracts, go here: https://embark.status.im/docs/troubleshooting.html#Assuming-Contract-to-be-an-interface
deploying contracts
Executing pre-deploy actions...
Pre-deploy actions done. Deploying contracts
[ERC721Full]: Error: attempted to deploy ERC721Full without specifying parameters. check if there are any params defined for this contract in this environment in the contracts configuration file
[ERC721Metadata]: Error: attempted to deploy ERC721Metadata without specifying parameters. check if there are any params defined for this contract in this environment in the contracts configuration file
[SimpleERC721]: Failing call, this could be because of invalid inputs or function guards that may have been triggered, or an unknown error.
deploying SafeMath with 82470 gas at the price of 1 Wei, estimated cost: 82470 Wei (txHash: 0x0c42958f6240833872d389d1c2644a20530399fc3ce8731d2c0ca963e3e54719)
deploying Counters with 81887 gas at the price of 1 Wei, estimated cost: 81887 Wei (txHash: 0x3e3066dc0eb095a044591410a599a297ebe9729d705b33a99aad2966031f0769)
deploying Roles with 78968 gas at the price of 1 Wei, estimated cost: 78968 Wei (txHash: 0x6197f331403e84deba9aeec1087c077c5bf0ec0b625b4de502bfe5620b7f0fc8)
deploying Address with 84189 gas at the price of 1 Wei, estimated cost: 84189 Wei (txHash: 0x17e79b6fc897b91371f2fbb9ad865ed2264fa674aa0ca1f7d00b987d6331808b)
[ERC721]: Failing call, this could be because of invalid inputs or function guards that may have been triggered, or an unknown error.
[ERC721Enumerable]: Failing call, this could be because of invalid inputs or function guards that may have been triggered, or an unknown error.
SafeMath deployed at 0x5Ab333bdE4378939eCE590705D5524e436956a69 using 76654 gas (txHash: 0x0c42958f6240833872d389d1c2644a20530399fc3ce8731d2c0ca963e3e54719)
Roles deployed at 0x229C4CB3071DC0458fA87eEa31AC73Ad5257Bf3a using 76590 gas (txHash: 0x6197f331403e84deba9aeec1087c077c5bf0ec0b625b4de502bfe5620b7f0fc8)
Counters deployed at 0x1EC4B2Bc96FB8C24De8b73719A7E982B7EF2fd7b using 76654 gas (txHash: 0x3e3066dc0eb095a044591410a599a297ebe9729d705b33a99aad2966031f0769)
Address deployed at 0x34B645744Fd871CeBE2a3bA0493528F5F83c1abe using 76654 gas (txHash: 0x17e79b6fc897b91371f2fbb9ad865ed2264fa674aa0ca1f7d00b987d6331808b)
Error deploying contracts. Please fix errors to continue.
Error deploying contracts. Please fix errors to continue.