Skip to content

parulkanani29/DirectAid-Contract

Repository files navigation

DirectAid Smart Contract

Overview

The Direct Aid contract makes the relief process easy, fast, and transparent. It helps the government to transfer aid to the needy people during this Covid-19 pandemic. It stores application status on blockchain as well as transferring funds from the smart contract to the user's wallet.

Create the Contract

Hash

66754091b0ca3062d15a6a37a38d9470caddd939d51f18df30367be6bc17ad54

ByteCode

4D5A90000300000004000000FFFF0000B800000000000000400000000000000000000000000000000000000000000000000000000000000000000000800000000E1FBA0E00B409CD21B8014CCD21546869732070726F6772616D2063616E6E6F742062652072756E20696E20444F53206D6F64652E0D0D0A2400000000000000504500004C010200561B6AFA0000000000000000E00022200B01300000140000000200000000000076330000002000000040000000000010002000000002000004000000000000000400000000000000006000000002000000000000030040850000100000100000000010000010000000000000100000000000000000000000243300004F000000000000000000000000000000000000000000000000000000004000000C000000083300001C0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000080000000000000000000000082000004800000000000000000000002E746578740000007C130000002000000014000000020000000000000000000000000000200000602E72656C6F6300000C0000000040000000020000001600000000000000000000000000004000004200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005833000000000000480000000200050048250000C00D000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009E0203280600000A0202280700000A6F0800000A280300000602042805000006020528070000062A4602280900000A72010000706F0A00000A2A4A02280900000A7201000070036F0B00000A2A4602280900000A720D0000706F0C00000A2A4A02280900000A720D000070036F0D00000A2A4602280900000A72210000706F0C00000A2A4A02280900000A7221000070036F0D00000A2A7602280900000A7231000070038C0F000001280E00000A046F0D00000A2A7202280900000A7231000070038C0F000001280E00000A6F0C00000A2A6202280900000A724B00007003280E00000A046F0F00000A2A5E02280900000A724B00007003280E00000A6F1000000A2A6202280900000A726100007003280E00000A046F0B00000A2A5E02280900000A726100007003280E00000A6F0A00000A2A5E02280900000A726900007003280E00000A6F1100000A2A6202280900000A726900007003280E00000A046F1200000A2A7602280900000A7283000070038C08000001280E00000A046F1300000A2A7202280900000A7283000070038C08000001280E00000A6F1400000A2A1330030095000000010000110202280700000A6F0800000A022802000006281500000A7299000070281600000A0202280700000A6F1700000A166AFE037299000070281600000A0202281800000A02280700000A6F1700000A281900000A26021200FE1505000002120002280700000A6F0800000A7D0E000004120002281800000A7D0F000004120002280700000A6F1700000A7D1000000406280100002B172A0000001330030058000000020000110202280700000A6F0800000A022802000006281500000A7299000070281600000A0204166AFE037299000070281600000A042000E1F5056AD90A0202281B00000A06FE037299000070281600000A0203062808000006172A13300300DB000000030000110202280700000A6F0800000A022802000006281500000A7299000070281600000A0203280D0000060A020203280E00000628090000060B0207166AFE037299000070281600000A0202281B00000A07FE0372B7000070281600000A020607281900000A0C02086F1C00000A72D9000070281600000A020372FD000070280A000006021203FE1505000002120302281800000A7D0E0000041203067D0F0000041203077D1000000409280100002B021204FE15040000021204037D0B0000041204067D0C000004120472FD0000707D0D0000041104280200002B172A00133003006A000000040000110202280700000A6F0800000A022802000006281500000A7299000070281600000A0203720F010070280A0000060203280D0000060A0206162810000006021201FE15040000021201037D0B0000041201067D0C0000041201720F0100707D0D00000407280200002B172A000013300400BD000000050000110202280700000A6F0800000A022802000006281D00000A7221010070281600000A0203280B000006281E00000A16FE012C02162A0205022804000006360B05022806000006FE052B01167299000070281600000A020202280700000A6F0800000A281100000616FE017251010070281600000A020302280700000A6F0800000A042817000006021200FE15040000021200037D0B000004120002280700000A6F0800000A7D0C000004120072750100707D0D00000406280200002B172A960204172810000006020304280C00000602037275010070280A000006020305280F0000062A0042534A4201000100000000000C00000076342E302E33303331390000000005006C00000020050000237E00008C050000F804000023537472696E677300000000840A000088010000235553000C0C00001000000023475549440000001C0C0000A401000023426C6F620000000000000002000001571DA201090A000000FA01330016000001000000110000000500000010000000170000001F0000001E000000090000000800000005000000010000000300000006000000010000000200000003000000020000000000190201000000000006005C01DB0206009B01DB0206004801C8020F00FB0200000A008B0185030A00100485030A00FC0085030A00750385030A002C04850306004E0242020600E50042020A007C0185030A007E0085030A002301850306000D0042020600F901420206001E04420200000000270000000000010001000100100068000000190001000100020100009C0400002900040018000A0110000F0200002D000B0018000A011000000200002D000E0018005180AB03110151809C0311015180E30311010606300014015680160317015680240317015680A702170156805302170156809A02170156808A02170106005A00110106003C041B010600E9031101060049021B01060073021B0106006D041F015020000000008618C202220101007820000000008608AE021B0004008A20000000008108B8022A0104009D20000000008608BF0077000500AF20000000008108CD0030010500C220000000008608930077000600D4200000000081089F0030010600E720000000008100620435010700052100000000810050043B0109002221000000008100CE0343000A003B21000000008600B90349000C00532100000000810069032B000D006C21000000008100550325000F00842100000000810082044E0010009C21000000008100990440011100B5210000000081002B0247011300D3210000000086005D004E011500F021000000008600FE039F0016009422000000008600B00454011600F822000000008600E4015F001800E02300000000860025045F001900582400000000860061025A011A002125000000008100B90161011D0000000100100100000200DB0000000300AB0000000100DE0100000100DE0100000100DE0100000100EF0000000200740400000100EF00000001004F0000000200F003000001004F00000001006F00000002007D03000001006F00000001006F00000001006F0000000200C504000001007D0300000200DE01000001007D0300000100EF00000002007404000001004F00000001004F00000001004F0000000200C50400000300B300000001004F0000000200460400000300C5040900C20201001100C20206001900C2020A002900C20206006100C20206003100C2021000310087001600690076021B0031003401200071003F03250071004A032B0071001300320071001D0037008100F7033D007100F60143007100EC014900710001004E0071000A00530071003A025900710032025F004100CE04690031007B0471006900D4017700310033031B00310081027B0031001502830031007200770049000A039F004100DA0469008100E804B4000E000400C2000E000800D1000E000C00E20008001400F30008001800F80008001C00FD00080020000201080024000701080028000C012E000B0072012E0013007B012E001B009A0143002300F30061012B00F30081012B00F300C1012B00F300E1012B00F30064008F009300A800AF00020001000000BC0269010000D1006E010000A3006E0102000200030001000300030002000400050001000500050002000600070001000700070004800000000000000000000000000000000010040000040000000000000000000000B900380000000000010002000100000000000000000085030000000003000200040002000500020035008A003500A300000000476574496E74333200536574496E7433320047657455496E7436340053657455496E743634003C4D6F64756C653E0076616C75655F5F0053797374656D2E507269766174652E436F72654C6962006170706C69636174696F6E4964004973456E726F6C6C656400446972656374416964006765745F42616C616E636500494D657373616765006765745F4D657373616765006765745F456E6454696D65007365745F456E6454696D6500656E6454696D650063757272656E7454696D65006765745F537461727454696D65007365745F537461727454696D6500737461727454696D650056616C7565547970650063617465676F7279547970650049536D617274436F6E7472616374537461746500736D617274436F6E74726163745374617465004950657273697374656E745374617465006765745F50657273697374656E7453746174650044656275676761626C6541747472696275746500436F6D70696C6174696F6E52656C61786174696F6E7341747472696275746500496E646578417474726962757465004465706C6F794174747269627574650052756E74696D65436F6D7061746962696C6974794174747269627574650052656769737465724170706C69636174696F6E45786563757465006765745F56616C75650076616C756500417070726F766500476574537472696E6700536574537472696E67005472616E73616374696F6E4C6F67005374617475734C6F6700536D617274436F6E74726163742E646C6C00456E726F6C6C00476574426F6F6C00536574426F6F6C0053797374656D0046726F6D00456E756D0053656E696F72436974697A656E005375626D69744170706C69636174696F6E00546F006765745F53656E646572005472616E73666572004461696C7957616765576F726B6572004865616C7468576F726B6572004661726D6572006765745F4F776E6572007365745F4F776E6572002E63746F720053797374656D2E446961676E6F73746963730053797374656D2E52756E74696D652E436F6D70696C6572536572766963657300446562756767696E674D6F646573006765745F5375636365737300536D616C6C427573696E657373004D656469756D427573696E657373006765745F4164647265737300476574416464726573730053657441646472657373004765744170706C6963616E7441646472657373005365744170706C6963616E7441646472657373006164647265737300537472617469732E536D617274436F6E74726163747300417070726F7665645374617475730050656E64696E67537461747573004765744170706C69636174696F6E537461747573005365744170706C69636174696F6E5374617475730052656A6563745374617475730073746174757300466F726D61740041646446756E64546F436F6E747261637400536D617274436F6E7472616374004F626A6563740052656A65637400495472616E73666572526573756C74004170706C6963616E74006170706C6963616E740047657443617465676F7279416D6F756E740053657443617465676F7279416D6F756E7400616D6F756E7400417373657274004765744170706C69636174696F6E43617465676F7279005365744170706C69636174696F6E43617465676F727900536574416D6F756E74466F7243617465676F72790063617465676F7279006F705F457175616C697479006F705F496E657175616C6974790049734E756C6C4F72456D707479000000000B4F0077006E0065007200001353007400610072007400540069006D006500000F45006E006400540069006D0065000019430061007400650067006F00720079003A007B0030007D0000155300740061007400750073003A007B0030007D0000077B0030007D0000197B0030007D003A00430061007400650067006F007200790000157B0030007D003A0045006E0072006F006C006C00001D41007300730065007200740020006600610069006C00650064002E0000214E006F007400200065006E006F007500670068002000660075006E006400730000235400720061006E00730066006500720020006600610069006C007500720065002E00001141005000500052004F005600450044000011520045004A0045004300540045004400002F530065006E006400650072002000630061006E006E006F00740020006200650020006F0077006E00650072002E00002341006C0072006500610064007900200065006E0072006F006C006C00650064002E00000F500045004E00440049004E0047000000000030B566F8479D744981443F84194112B40004200101080320000105200101111105200101121D04200012350420001121042000123905200111210E062002010E11210420010B0E052002010E0B0500020E0E1C052002010E0E0420010E0E042001080E052002010E08052002010E02042001020E0407011114070002021121112105200201020E0320000B072002122511210B06300101011E00040A0111140307010B0B070511210B12251114111003200002040A011110060702112111100407011110040001020E087CEC85D7BEA7798E0E500045004E00440049004E0047001041005000500052004F0056004500440010520045004A004500430054004500440004010000000402000000040300000004040000000405000000040600000002060E0206080306110C0306112102060B07200301121D0B0B052001011121042001010B05200201080B0420010B08062002010E110C0620020111210205200102112105200202080B062003020E080B072003010E11210804280011210328000B0801000800000000001E01000100540216577261704E6F6E457863657074696F6E5468726F77730108010002000000000000000000000000000000000000100000000000000000000000000000004C33000000000000000000006633000000200000000000000000000000000000000000000000000058330000000000000000000000005F436F72446C6C4D61696E006D73636F7265652E646C6C0000000000FF2500200010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003000000C000000783300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

User Roles

  1. Admin (Owner of the contract)
  2. Applicant

The admin user can set amount for a category, add fund to the contract, review the application submitted by an applicant, and can take action on it.

An applicant user is one who need economical help to survive during the pandemic. An applicant user can apply to receive aid by providing basic information. An applicant user could be a small business owner, healthcare worker, farmer, daily wage worker, etc.

Deployment

During deployment, the owner has to pass the startTime and endTime in unix timestamp format. In between these times, applicants are allowed to submit their applications.

Methods

AddFundToContract

Using this method, the owner of the contract can transfer the total amount that needs to distribute to the people. The smart contract will then hold that amount.

SetAmountForCategory

The owner can set different amounts for the categories with passing categoryType and amount. For example, the owner set the amount 100CRS for category type 5 (i.e. HealthWorker). meaning that, whenever any application gets approved of the HealthWorker category, the applicant will receive 100CRS.

SubmitApplication

An applicant can apply for aid with parameters applicationId, category, and the currentTime. The methods stores various data like applicant wallet address, application id, and category, etc. to the smart contract state. Initially, application status would be PENDING.

Approve

The owner of the contract can review applications, if they find information correct, the owner will execute this method, and the amount will be transferred to the applicant's wallet.

This method will change the application status from PENDING to APPROVED.

Reject

If the application information would found incorrect, the owner can reject the application using this method. This method will change the application status from PENDING to REJECTED.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages