import json import random from grant.proposal.models import CATEGORIES message = { "sig": "0x4355c47d63924e8a72e509b65029052eb6c299d53a04e167c5775fd466751c9d07299936d304c153f6443dfa05f40ff007d72911b6f72307f996231605b915621c", "data": { "types": { "EIP712Domain": [ {"name": "name", "type": "string"}, {"name": "version", "type": "string"}, {"name": "chainId", "type": "uint256"}, {"name": "verifyingContract", "type": "address"} ], "Person": [ {"name": "name", "type": "string"}, {"name": "wallet", "type": "address"} ], "Mail": [ {"name": "from", "type": "Person"}, {"name": "to", "type": "Person"}, {"name": "contents", "type": "string"} ] }, "primaryType": "Mail", "domain": { "name": "Ether Mail", "version": "1", "chainId": 1, "verifyingContract": "0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC" }, "message": { "from": { "name": "Cow", "wallet": "0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826" }, "to": { "name": "Bob", "wallet": "0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB" }, "contents": "Hello, Bob!" } } } test_user = { "accountAddress": '0xcd2a3d9f938e13cd947ec05abc7fe734df8dd826', "displayName": 'Groot', "emailAddress": 'iam@groot.com', "title": 'I am Groot!', "avatar": { "link": 'https://avatars2.githubusercontent.com/u/1393943?s=400&v=4' }, "socialMedias": [ { "link": 'https://github.com/groot' } ], "signedMessage": message["sig"], "rawTypedData": json.dumps(message["data"]) } test_team = [test_user] milestones = [ { "title": "All the money straightaway", "description": "cool stuff with it", "date": "June 2019", "payoutPercent": "100", "immediatePayout": False } ] test_proposal = { "team": test_team, "crowdFundContractAddress": "0x20000", "content": "## My Proposal", "title": "Give Me Money", "milestones": milestones, "category": random.choice(CATEGORIES) } milestones = [ { "title": "All the money straightaway", "description": "cool stuff with it", "date": "June 2019", "payoutPercent": "100", "immediatePayout": False } ]