Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

assignment of struct in solidity

struct Account {
    uint balance;
    uint dailylimit;
}

// Option 1: Assign to an initialised struct
Account my_account = Account(0, 10);

// Option 2: Assign to individual fields as required
my_account.balance = 0;
my_account.dailylimit = 10;
Source by jeancvllr.medium.com #
 
PREVIOUS NEXT
Tagged: #assignment #struct #solidity
ADD COMMENT
Topic
Name
6+2 =