bowensanders / smartwed Goto Github PK
View Code? Open in Web Editor NEWA Ethereum / solidity based marriage contract, with guestbook. This repository is for working on the User Interface. Based on the work of Jordi Baylina (@jbaylina)
A Ethereum / solidity based marriage contract, with guestbook. This repository is for working on the User Interface. Based on the work of Jordi Baylina (@jbaylina)
etherscan.io can tell what block a txhash is from, and thereby tell when the contract creation date is. I'm not sure if they are doing that from their own internal databases, but i'm searching for either a web3 function that will show the contract creation date, or an API call to somewhere that can.
so the wedding contract creation date shows, and then contract finalization can be shown as well (in this case, it is in the contrtact data as marriageDate)
This is just a slightly modified template I used to whip this out as quick as possible. I like the grey / blue / white / black color scheme (especially the logo) and I'd like to keep the basic layout.
currently the connection is static to infura:
// connect direct to infura - needs to change to metamask when guestbook entry is created
web3 = new Web3(new Web3.providers.HttpProvider("https://mainnet.infura.io/ySFxqrROS2e1chccEsyS"));
I would like it to default to Metamask first so guestbook signing is possible, but display the info anyway if they don't have metamask (and tell them to install it so they CAN sign)
the date currently shows as:
Date: 14/09/2017 20:58
I would like it to show as:
Date: 14 Sep 2017 20:58 (UTC) - or even better have it auto switch for time zones
donation value is currently displayed in wei, it should be in ETH.
Integrate moment() for easier date/time display and manipulation i.e. unix timestamp to mmddyy
create a simple four field entry form that will submit a guestbook entry to the contract.
The fields are: nameFrom (from), text (message), url (of picture, website, IPFS or whatever), value (ETH donation)
it is submitted to the contract as sendMessage:
function sendMessage(string nameFrom, string text, string url) payable areMarried {
if (msg.value > 0) {
owner.transfer(this.balance);
}
messages.push(Message(now, nameFrom, text, url, msg.value));
MessageSent(nameFrom, text, url, msg.value);
}
donations through the guestbook are automatically forwarded to owner(multisig)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.