Exemplo n.º 1
0
 void vote_operation::validate() const
 {
    validate_account_name( voter );
    validate_account_name( author );\
    FC_ASSERT( abs(weight) <= STEEMIT_100_PERCENT, "Weight is not a STEEMIT percentage" );
    validate_permlink( permlink );
 }
Exemplo n.º 2
0
 void comment_options_operation::validate()const
 {
    FC_ASSERT( is_valid_account_name( author ), "Author name invalid" );
    FC_ASSERT( percent_steem_dollars <= STEEMIT_100_PERCENT );
    FC_ASSERT( max_accepted_payout.symbol == SBD_SYMBOL );
    FC_ASSERT( max_accepted_payout.amount.value >= 0 );
    validate_permlink( permlink );
 }
Exemplo n.º 3
0
 void vote_operation::validate() const
 {
    FC_ASSERT( is_valid_account_name( voter ), "Voter account name invalid" );
    FC_ASSERT( is_valid_account_name( author ), "Author account name invalid" );
    validate_permlink( permlink );
    FC_ASSERT( abs(weight) <= STEEMIT_100_PERCENT, "Weight is not a STEEMIT percentage" );
    FC_ASSERT( weight != 0, "Vote weight is 0" );
 }
Exemplo n.º 4
0
   void comment_operation::validate() const
   {
      FC_ASSERT( title.size() < 256, "Title larger than size limit" );
      FC_ASSERT( fc::is_utf8( title ), "Title not formatted in UTF8" );
      FC_ASSERT( body.size() > 0, "Body is empty" );
      FC_ASSERT( fc::is_utf8( body ), "Body not formatted in UTF8" );


      FC_ASSERT( !parent_author.size() || is_valid_account_name( parent_author ), "Parent author name invalid" );
      FC_ASSERT( is_valid_account_name( author ), "Author name invalid" );
      validate_permlink( parent_permlink );
      validate_permlink( permlink );

      if( json_metadata.size() > 0 )
      {
         FC_ASSERT( fc::json::is_valid(json_metadata), "JSON Metadata not valid JSON" );
      }
   }
Exemplo n.º 5
0
 void comment_options_operation::validate()const
 {
    validate_account_name( author );
    FC_ASSERT( percent_steem_dollars <= STEEMIT_100_PERCENT, "Percent cannot exceed 100%" );
    FC_ASSERT( max_accepted_payout.symbol == SBD_SYMBOL, "Max accepted payout must be in SBD" );
    FC_ASSERT( max_accepted_payout.amount.value >= 0, "Cannot accept less than 0 payout" );
    validate_permlink( permlink );
    for( auto& e : extensions )
       e.visit( comment_options_extension_validate_visitor() );
 }
Exemplo n.º 6
0
void create_proposal_operation::validate()const
{
   validate_account_name( creator );
   validate_account_name( receiver );

   FC_ASSERT( end_date > start_date, "end date must be greater than start date" );

   FC_ASSERT( daily_pay.amount >= 0, "Daily pay can't be negative value" );
   FC_ASSERT( daily_pay.symbol.asset_num == STEEM_ASSET_NUM_SBD, "Daily pay should be expressed in SBD");

   FC_ASSERT( !subject.empty(), "subject is required" );
   FC_ASSERT( subject.size() <= STEEM_PROPOSAL_SUBJECT_MAX_LENGTH, "Subject is too long");
   FC_ASSERT( fc::is_utf8( subject ), "Subject is not valid UTF8" );

   FC_ASSERT( !permlink.empty(), "permlink is required" );
   validate_permlink(permlink);
}
Exemplo n.º 7
0
 void delete_comment_operation::validate()const
 {
    validate_permlink( permlink );
    validate_account_name( author );
 }
Exemplo n.º 8
0
 void delete_comment_operation::validate()const
 {
    validate_permlink( permlink );
    FC_ASSERT( is_valid_account_name( author ) );
 }