Skip to content

Commit

Permalink
Update contract
Browse files Browse the repository at this point in the history
  • Loading branch information
php1301 committed May 6, 2022
1 parent a433338 commit 00e72f4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion build/contracts/Campaign.json
Original file line number Diff line number Diff line change
Expand Up @@ -14678,7 +14678,7 @@
},
"networks": {},
"schemaVersion": "3.4.7",
"updatedAt": "2022-05-05T15:58:53.499Z",
"updatedAt": "2022-05-06T14:06:16.752Z",
"devdoc": {
"kind": "dev",
"methods": {},
Expand Down
6 changes: 3 additions & 3 deletions build/contracts/CampaignFactory.json
Original file line number Diff line number Diff line change
Expand Up @@ -11289,12 +11289,12 @@
"4": {
"events": {},
"links": {},
"address": "0x10f18A66D13E35cB6E8679bf5FC6Bb9eF0eAE3Ed",
"transactionHash": "0x8cabe1a374e5c73c6ae3781926af2269ee9797363391472d7c528c28d58a5da9"
"address": "0xD8585878Eab7236588987Ef89153fa25b331dd31",
"transactionHash": "0x25c9bca2ffa62ec75ccadd1051265c0be13cff2dd2512ce7de53206fe2901c70"
}
},
"schemaVersion": "3.4.7",
"updatedAt": "2022-05-05T15:59:49.085Z",
"updatedAt": "2022-05-06T14:07:16.893Z",
"networkType": "ethereum",
"devdoc": {
"kind": "dev",
Expand Down
9 changes: 5 additions & 4 deletions handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const web3Provider = "https://rinkeby.infura.io/v3/c32c3560feee48ee9a922e27e6c30
let web3 = new Web3(new Web3.providers.HttpProvider(web3Provider))
// const contractAddress = '0x18A5C415da30cd97485a7d13D90FE702249F4936'
// const contractAddress = '0x9c2Ff4d3FD42b75555AE11D44cCd4354812Df7C6'
const contractAddress = '0x10f18A66D13E35cB6E8679bf5FC6Bb9eF0eAE3Ed'
const contractAddress = '0xE124cEE21A6DE685D24AaC6487CC9AAB07350A38'
const LMS = contract(factory)
const Campaign = contract(campaign)
LMS.setProvider(web3.currentProvider)
Expand Down Expand Up @@ -312,7 +312,7 @@ const getCampaignSummary = async (req, res) => {
summary['2'] = summary['2'].toString()
summary['3'] = summary['3'].toString()
summary['10'] = summary['10'].toString()
summary.push(roadmap)
summary['11'] = roadmap
return res.status(200).json({ summary })
}
catch (e) {
Expand Down Expand Up @@ -363,7 +363,7 @@ const createCampaign = async (req, res) => {

const createCampaignFirebase = async (req, res) => {
try {
const { minimumContribution, campaignName, description, imageUrl, target, walletAddr, campaignId, txHash, date, roadmap } = req.body
const { minimumContribution, campaignName, description, imageUrl, target, walletAddr, campaignId, txHash, date, roadmap, timestamp } = req.body
const docs = await admin.firestore().collection("campaigns").doc(campaignId).set({
minimumContribution,
campaignName,
Expand All @@ -381,7 +381,8 @@ const createCampaignFirebase = async (req, res) => {
approversCount: 0,
hidden: false,
done: false,
roadmap
roadmap: roadmap || [],
timestamp,
})
return res.status(200).json({ docs })
}
Expand Down

0 comments on commit 00e72f4

Please sign in to comment.