-
Notifications
You must be signed in to change notification settings - Fork 0
feat: dedicated-ai-and-template-section #263
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
Conversation
Reviewer's Guide by SourceryThis pull request introduces several new features and documentation updates, including a dedicated AI and template section. It adds documentation for connecting to Besu nodes, consensus mechanisms, and Javascript APIs. It also includes new smart contract templates for Land Registry, Health Records, CBDC Chaincode, State Machine, ERC20, and ERC721, as well as documentation for AI code assistant and Open AI nodes with pgvector. Typos and link styles were also corrected. Updated class diagram for LandRegistry smart contractclassDiagram
class LandRegistry {
-Counters.Counter _parcelIdCounter
-Counters.Counter _buildingIdCounter
-mapping(uint256 => LandParcel) _parcels
-mapping(uint256 => Building) _buildings
-mapping(string => bool) _usedNationalIds
-mapping(bytes32 => bool) _usedSignatures
-mapping(uint256 => SplitMergeRequest) _splitMergeRequests
-mapping(uint256 => uint256) _parcelToRequest
+uint256 baseTaxRate
+uint256 foreignTransferSurcharge
+uint256 lateTaxPenalty
+uint256 governanceApprovalThreshold
+event ParcelRegistered(uint256 indexed id, address owner)
+event ParcelTransferred(uint256 indexed id, address from, address to, uint256 taxPaid)
+event BuildingAdded(uint256 indexed parcelId, uint256 buildingId)
+event TaxPaid(uint256 indexed parcelId, uint256 amount, string currency)
+event DisputeFiled(uint256 indexed parcelId, string details)
+event DisputeResolved(uint256 indexed parcelId)
+event SplitRequested(uint256 indexed requestId, uint256 indexed originalParcelId)
+event MergeRequested(uint256 indexed requestId, uint256[] sourceParcelIds)
+event SplitCompleted(uint256 indexed requestId, uint256[] newParcelIds)
+event MergeCompleted(uint256 indexed requestId, uint256 newParcelId)
+registerParcel(address owner, string parcelNumber, uint256 area, string gpsPolygon, string jurisdiction, string landUseType, uint256 landRate, string nationalId, string ipfsHash, bytes kycSignature) uint256
+transferParcel(uint256 parcelId, address buyer, string buyerNationalId, PaymentDetail payment)
+addBuilding(uint256 parcelId, string name, uint256 stories, uint256 builtArea, string constructionType) uint256
+requestSplit(uint256 parcelId, uint256[] newAreas, string[] newParcelNumbers, string[] newGpsPolygons)
+requestMerge(uint256[] parcelIds, string newParcelNumber)
+approveRequest(uint256 requestId, bytes signature)
+fileDispute(uint256 parcelId, string details)
+resolveDispute(uint256 parcelId)
+setTaxRate(uint256 newRate)
+collectDelayedTax(uint256 parcelId, uint256 monthsDelayed)
+getParcelDetails(uint256 parcelId) (LandParcel parcel, Building[] buildings, PaymentDetail[] payments)
+getRequestDetails(uint256 requestId) (SplitMergeRequest request, LandParcel[] parcels)
}
class LandParcel {
uint256 id
string parcelNumber
address owner
uint256 area
string gpsPolygon
string jurisdiction
string landUseType
uint256 landRate
bool hasDispute
uint256[] buildingIds
uint256[] parentParcels
PaymentDetail[] paymentHistory
uint256 lastTaxPaid
string ipfsHash
}
class Building {
uint256 id
string name
uint256 stories
uint256 builtArea
string constructionType
}
class PaymentDetail {
string paymentReference
string currency
uint256 amount
bool isForeign
string sourceBank
string proofOfPayment
uint256 timestamp
}
class SplitMergeRequest {
uint256[] parcelIds
uint256[] newAreas
string[] newParcelNumbers
string[] newGpsPolygons
bool isMerge
bool approved
bytes[] approvalSignatures
}
LandRegistry -- LandParcel : contains
LandRegistry -- Building : contains
LandRegistry -- PaymentDetail : contains
LandRegistry -- SplitMergeRequest : contains
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @gyan-sharma - I've reviewed your changes and found some issues that need to be addressed.
Blocking issues:
- The private key is hardcoded in the documentation. (link)
- The private key is hardcoded in the documentation. (link)
- The private key is hardcoded in the documentation. (link)
- The private key is hardcoded in the documentation. (link)
- The private key is hardcoded in the documentation. (link)
- The private key is hardcoded in the documentation. (link)
Overall Comments:
- The addition of the Javascript API section could benefit from a brief explanation of its purpose and how it relates to the other APIs.
Here's what I looked at during the review
- 🟡 General issues: 2 issues found
- 🔴 Security: 6 blocking issues
- 🟢 Review instructions: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
const EAS = new EAS(config.easAddress); | ||
eas.connect(signer); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
issue: Variable renaming inconsistency in the attestation indexer.
As with the EVM chains guide, the instance is declared as 'EAS' but later methods are still called on 'eas'. Ensuring consistent naming across all attestation indexer flows will prevent potential runtime issues.
your own setup. | ||
- If you don't have Docker installed, you can find the installation | ||
instructions [here](https://docs.docker.com/get-docker/). | ||
- If you don't have Docker Composer installed, you can find the installation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick (typo): Typo in Docker Compose reference
It appears that 'Docker Composer' is used instead of 'Docker Compose'. Correcting this will avoid potential confusion.
- If you don't have Docker Composer installed, you can find the installation | |
- If you don't have Docker Compose installed, you can find the installation |
@@ -303,7 +303,7 @@ const config = { | |||
// Connect to the blockchain | |||
const provider = new ethers.JsonRpcProvider(config.rpcUrl); | |||
const signer = new ethers.Wallet(config.privateKey, provider); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚨 issue (security): The private key is hardcoded in the documentation.
@@ -638,7 +638,7 @@ | |||
"id": "setup_inject", | |||
"type": "inject", | |||
"z": "eas_flow", | |||
"name": "Inputs: RpcUrl, registry address, eas address, private key", | |||
"name": "Inputs: RpcUrl, registry address, EAS address, private key", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚨 issue (security): The private key is hardcoded in the documentation.
@@ -302,7 +302,7 @@ | |||
// Connect to the blockchain | |||
const provider = new ethers.JsonRpcProvider(config.rpcUrl); | |||
const signer = new ethers.Wallet(config.privateKey, provider); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚨 issue (security): The private key is hardcoded in the documentation.
@@ -637,7 +637,7 @@ | |||
"id": "setup_inject", | |||
"type": "inject", | |||
"z": "eas_flow", | |||
"name": "Inputs: RpcUrl, registry address, eas address, private key", | |||
"name": "Inputs: RpcUrl, registry address, EAS address, private key", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚨 issue (security): The private key is hardcoded in the documentation.
@@ -281,7 +281,7 @@ const config = { | |||
// Connect to the blockchain | |||
const provider = new ethers.JsonRpcProvider(config.rpcUrl); | |||
const signer = new ethers.Wallet(config.privateKey, provider); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚨 issue (security): The private key is hardcoded in the documentation.
@@ -281,7 +281,7 @@ const config = { | |||
// Connect to the blockchain | |||
const provider = new ethers.JsonRpcProvider(config.rpcUrl); | |||
const signer = new ethers.Wallet(config.privateKey, provider); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚨 issue (security): The private key is hardcoded in the documentation.
added dedicated-ai-and-template-section
Summary by Sourcery
Add dedicated AI and template sections to the documentation, introducing new content for blockchain and AI integration, smart contract templates, and AI-powered development tools
New Features:
Documentation:
Chores: