//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f. pragma solidity >=0.4.0 <0.6.0; contract Average_Dynamic_Price { address MBroker; //_______________________________________________________________________________ // Constructor The Genesis constructor () public { MBroker = 0x1E5Fee96D21f01B5F38261ea81ed303bCCc174b2; // First Broker, Opens the first account } //_____________________________________________________________________________ //Variables for account creation address Address; // User Address address IDBroker; //Addres the Broker (Any Created Account can be a broker for new accounts) uint TotalAccount; //TotalAccountCreated uint Date; // Block Mining (We work with block to avoid errors with timestamp) string Clan; //Play with Friends uint searchIDBroker; //Find Broker uint searchIDAddress; //Find Address uint searchIDProfile; //Find ID Address //________________________________________________ // Array Account uint []ArrayAccountTotalAccount; //List ID account uint [] ArrayAccountDate; //list of blocks that were created the accounts address [] ArrayAccountBroker; //List Broker address [] ArrayAccountAddress; //List of Address string [] ArrayAccountClan; //List Clan //_____________________________________________________________ // Function to save data sing in function SingIn(address Broker) public { // Broker Addres IDBroker = Broker; //Broker cadastred Date = block.number; //Date Sing in Address = msg.sender; //your Adderess //________________________________________________________________ // Check Registered Account for (searchIDAddress = 0; searchIDAddress < TotalAccount ; searchIDAddress ++ ) if (Address == ArrayAccountAddress[searchIDAddress]){ break;} if (searchIDAddress == TotalAccount) { //true for non-existent accounts //________________________________________________________________ //Register Account if(TotalAccount > 0){ for (searchIDBroker = 0; searchIDBroker < TotalAccount ; searchIDBroker ++ ) if (Broker == ArrayAccountAddress[searchIDBroker]){ TotalAccount++; //Total Account Created +1 //_____________________________________________________________________ //Save Array ArrayAccountTotalAccount.push(TotalAccount); //Save Array Total of Account Created ArrayAccountDate.push(Date); //Save Date ArrayAccountBroker.push(Broker); //save broker ArrayAccountAddress.push(Address); //Save Your Address break;}} //_____________________________________________________________________ else { if (Broker == MBroker){ TotalAccount ++; //Total Account Created +1 //_____________________________________________________________________ //Save Array ArrayAccountTotalAccount.push(TotalAccount); //Save Array Total of Account Created ArrayAccountDate.push(Date); //Save Date ArrayAccountBroker.push(Broker); //save broker ArrayAccountAddress.push(Address); //Save Your Address }}}} //________________________________________________________________ //Created eperfils list function Account() public constant returns ( //Creating Variables the perfil List address MainBroker, //Fist Broker uint[] TotalAccount, // ID Accounts uint [] Date, //Creation Block address [] Broker, // Broker the Account address [] Address) { // Broker the Address //Retourn return (MBroker, //the Main Broker ArrayAccountTotalAccount, //ID Account ArrayAccountDate, //Creation Block ArrayAccountBroker, //Broker the Account ArrayAccountAddress);}//Broker the Address //_______________________________________________________________________________ //You Profile (Profile Address call) //variables function YouProfile() public constant returns ( uint IDAccount, //ID account uint DateCreation, //Creation Block address BrokerAccount, //Broker the Account address AddressAccount) {//Broker the Address //Search the ID in List of Profiles for (searchIDProfile = 0; searchIDProfile < TotalAccount ; searchIDProfile ++ ) if (Address == ArrayAccountAddress[searchIDProfile]){ break;} //Retour return ( ArrayAccountTotalAccount [searchIDProfile],//ID account ArrayAccountDate [searchIDProfile], //Creation Block ArrayAccountBroker [searchIDProfile], //Broker the Account ArrayAccountAddress [searchIDProfile]);}//Broker the Address //_____________________________________________________________________ //Creting Clan //the Clan serves to join with other investors and create an average price between friends. Who owns Clan pays a 5% profit tax. //This rate is 100% converted into the clan's internal bonus. which should only be used when the current ETH Price is lower than the average Clan price. }
0.4.25