Conversation
…eedback from PR 7
| from: deployer, | ||
| proxy: { | ||
| owner: deployer, | ||
| proxyContract: 'EIP173Proxy', |
There was a problem hiding this comment.
This was a simple proxy used by hardhat-deploy. We have update this now to use ERC1967Proxy.sol which is UUPS compatible and is held under the deployments folder
| } | ||
|
|
||
| console.log('operators:', JSON.stringify(initialOperators)) | ||
| const deployedContract = await deploy('MiniWallet', { |
There was a problem hiding this comment.
Where can we control and store deployed proxy address, storage address, and logic contract address?
| console.log('MiniID Name : ', await miniID.name()) | ||
| console.log('MiniID Symbol : ', await miniID.symbol()) | ||
| // Mint test tokens | ||
| if (chainId !== '1666600000,') { |
There was a problem hiding this comment.
Refactored approach and commit are here
| let contractUri | ||
|
|
||
| console.log(`chainId: ${chainId}`) | ||
| if (chainId === '1666600000,') { |
There was a problem hiding this comment.
Refactored approach and commit are here
| console.log('Mini721 Symbol : ', await mini721.symbol()) | ||
|
|
||
| // Mint test tokens | ||
| if (chainId !== '1666600000,') { |
There was a problem hiding this comment.
Refactored approach and commit are here
|
|
||
| const deployedMini721 = await deploy('Mini721', { | ||
| from: deployer, | ||
| gasLimit: 4000000, |
There was a problem hiding this comment.
Removed 🙏
Was initially put in as was getting unexpected gas limit, but this was due to errors in deploy logic
| let contractUri | ||
|
|
||
| console.log(`chainId: ${chainId}`) | ||
| if (chainId === '1666600000,') { |
There was a problem hiding this comment.
Refactored approach and commit are here
| console.log('Mini1155 Symbol : ', await mini1155.symbol()) | ||
|
|
||
| // Mint test tokens | ||
| if (chainId !== '1666600000,') { |
There was a problem hiding this comment.
Refactored approach and commit are here
| from: deployer, | ||
| proxy: { | ||
| owner: deployer, | ||
| proxyContract: 'EIP173Proxy' |
There was a problem hiding this comment.
same issue here, not sure where eip173proxy is and whether it is safe and how it can be controlled
There was a problem hiding this comment.
This was a simple proxy used by hardhat-deploy. We have update this now to use ERC1967Proxy.sol which is UUPS compatible and is held under the deployments folder
|
Can you gitignore everything under |
|
Can all Mini1155 and 721 related deployment and testing stuff be removed? They are launch templates other developers may use, and have nothing to do with SMS Wallet features. The contract themselves may be moved to separate places as well |
|
Can you move all work-in-progress and MiniID related items to separate PR? Let's make one thing perfectly good, solid for production, and as minimal as possible in code, before moving on to the next. |
|
There is still the issue unresolved, related to recording proxy, logic, and storage addresses for those hardhat deployed contracts, and fine-control on these contract's upgrade process. We can't just use |
| @@ -0,0 +1,489 @@ | |||
| import { expect } from 'chai' | |||
There was a problem hiding this comment.
Is there any way we can continue the review of these files in the other PR where they were originally reviewed? Several hours were spent reviewing the files, so it would be nice to continue from existing reviewing checkpoint, rather than starting from scratch
There was a problem hiding this comment.
I went through the code again this time. Let's keep reviewed PRs open in the future
| }) | ||
| } | ||
|
|
||
| export async function communityMint721 (testEnvironment, owner, numTokens) { |
| @@ -0,0 +1,39 @@ | |||
| import { ethers } from 'hardhat' | |||
|
|
|||
| export const ADDRESS_ZERO = '0x0000000000000000000000000000000000000000' | |||
There was a problem hiding this comment.
this is in server config, it can be moved to a constant in a single place
|
Let's also move development notes to We can polish and move things out to component-root folder after they are ready for production and presentable for external audience |
miniwallet/test/Mini1155.ts
Outdated
| expect(await this.mini1155.balanceOf(owner, c1.s.tokenId)).to.equal(0) | ||
| expect((await this.mini1155.balanceOfBatch([owner, owner], [1, 2])).map(x => x.toString())).to.deep.equal(['0', '0']) | ||
| expect(await this.mini1155.baseUri()).to.equal('ipfs://QmPcY4yVQu4J2z3ztHWziWkoUEugpzdfftbGH8xD49DvRx/') | ||
| expect(await this.mini1155.contractURI()).to.equal('ipfs://QmdKB6d1zT7R8dNmEQzc6N1m5p2LDJZ66Hzu8F4fGhdVrq') |
There was a problem hiding this comment.
these specific project urls all need to be sanitized and removed from tests and default config parameters
|
I have two more files to read: NFTID.md and PROXY.md. I went through other files. Let's break down this PR into multiple parts (each has its own PR):
The PRs can be made in chains (each PR's branch merge into the branch of previous PR) rather than all pointing to the base (main) branch, since each may be dependent on some of the work in previous PR |
|
On a second thought - I think (2) can be merged in after using a better proxy, so we can get it up and running ASAP. We can improve this process in a later PR |
…NFTs and improve deployment and testing configuration
| let config | ||
| if (fs.existsSync(configPath)) { | ||
| configPath = configPath.substring(0, configPath.length - 3) | ||
| const { default: configNetwork } = await import(configPath) |
There was a problem hiding this comment.
could be used to executed malicious script in temporary / mounted / remote folders
| return res.status(StatusCodes.BAD_REQUEST).json({ error: `phone number not registered: ${phoneNumber}` }) | ||
| } | ||
| } | ||
| console.log(`u: ${JSON.stringify(u)}`) |
There was a problem hiding this comment.
need to remove - leaking user info in console
Version 0 work based on #13