- 
                Notifications
    You must be signed in to change notification settings 
- Fork 6
added new contract examples & tests #24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
          
     Open
      
      
            Jovonni
  wants to merge
  13
  commits into
  main
  
    
      
        
          
  
    
      Choose a base branch
      
     
    
      
        
      
      
        
          
          
        
        
          
            
              
              
              
  
           
        
        
          
            
              
              
           
        
       
     
  
        
          
            
          
            
          
        
       
    
      
from
dev/new-contract-examples
  
      
      
   
  
    
  
  
  
 
  
      
    base: main
Could not load branches
            
              
  
    Branch not found: {{ refName }}
  
            
                
      Loading
              
            Could not load tags
            
            
              Nothing to show
            
              
  
            
                
      Loading
              
            Are you sure you want to change the base?
            Some commits from the old base branch may be removed from the timeline,
            and old review comments may become outdated.
          
          
                
     Open
            
            
          Conversation
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
    c77806b    to
    20eb2a6      
    Compare
  
    | Starship tests resultsstarship tests now pass for  hyperweb % yarn clean; yarn build; yarn test                                                                                                                            
  dist/contracts/hello.js      235b 
  dist/contracts/hello.js.map  516b 
⚡ Done in 6ms
Build completed successfully! Output: projects/create-hyperweb-app/templates/hyperweb/dist/contracts/hello.js
  dist/contracts/simple-state.js      694b 
  dist/contracts/simple-state.js.map  1.3kb
⚡ Done in 0ms
Build completed successfully! Output: projects/create-hyperweb-app/templates/hyperweb/dist/contracts/simple-state.js
  dist/contracts/bank.js      565b 
  dist/contracts/bank.js.map  1.2kb
⚡ Done in 1ms
Build completed successfully! Output: projects/create-hyperweb-app/templates/hyperweb/dist/contracts/bank.js
  dist/contracts/token-factory.js      1.1kb
  dist/contracts/token-factory.js.map  2.2kb
⚡ Done in 0ms
Build completed successfully! Output: projects/create-hyperweb-app/templates/hyperweb/dist/contracts/token-factory.js
 PASS  __tests__/setup.test.ts
  Test clients
    ✓ check chain height (4 ms)
  console.log
    contract creator address: hyper1y2ndq6mandlv93jl63aa2xujm0nq25tcha2m4f
      at Object.<anonymous> (__tests__/bank.test.ts:33:17)
  console.log
    Contract creator address: hyper1gq89x73sfy0j7pgjlqxmqkkwtestqjtvvp9vtc
      at Object.<anonymous> (__tests__/simple-state.test.ts:33:13)
  console.log
    Contract creator address: hyper1qyrhhkkuhjrplxfx5hu7guprvq84782m32czrh
      at Object.<anonymous> (__tests__/hello.test.ts:32:13)
  console.log
    contract creator address: hyper1v84cl7ulm5n0kzj27zm0sdwssx9es76z64u8rl
      at Object.<anonymous> (__tests__/token-factory.test.ts:34:17)
  console.log
    recipient address: hyper1gdhh0hn9rd8g6w6yf8y76xzs9973sqhncyp96p
      at Object.<anonymous> (__tests__/bank.test.ts:39:17)
  console.log
    contract instantiated at index: 118 and address hyper1m9hl7sr9rvkcxve9mxrysmkkn3xzfnzvra2hy5
      at Object.<anonymous> (__tests__/hello.test.ts:75:13)
  console.log
    Contract instantiated at index: 119 and address hyper1agnre8tmlulfzcklry2ck2ka8uxp67ng7kh6er
      at Object.<anonymous> (__tests__/simple-state.test.ts:80:13)
  console.log
    contract instantiated at index: 120 and address hyper1fy27sla2dnevljradhzgnrf9zzk732sczgum9a
      at Object.<anonymous> (__tests__/bank.test.ts:82:17)
  console.log
    contract instantiated at index: 121 and address hyper15aylqxjgmw2vqduelrg80fzmg2wqs3crjr34kp
      at Object.<anonymous> (__tests__/token-factory.test.ts:77:17)
 PASS  __tests__/hello.test.ts (20.224 s)
  Test clients
    ✓ check chain height (4 ms)
  Hello Contract Tests
    ✓ Check initial balance (18 ms)
    ✓ Instantiate hello contract (3259 ms)
    ✓ Invoke hello function (3234 ms)
  console.log
    created fullDenom: factory/hyper1v84cl7ulm5n0kzj27zm0sdwssx9es76z64u8rl/testdenom
      at Object.<anonymous> (__tests__/token-factory.test.ts:94:17)
 PASS  __tests__/simple-state.test.ts (23.637 s)
  Test clients
    ✓ check chain height (5 ms)
  State Contract Tests
    ✓ Check initial balance (11 ms)
    ✓ Instantiate state contract (3250 ms)
    ✓ Perform init function (3226 ms)
    ✓ Perform increment evaluation (3244 ms)
  console.log
    recipient balance: 1000
      at Object.<anonymous> (__tests__/bank.test.ts:130:17)
 PASS  __tests__/bank.test.ts (26.927 s)
  Test clients
    ✓ check chain height (4 ms)
  Bank Contract Tests
    ✓ Check initial balance (13 ms)
    ✓ Instantiate Bank contract (3231 ms)
    ✓ Call balance function (3212 ms)
    ✓ Transfer funds to another address and check balance (6455 ms)
 PASS  __tests__/token-factory.test.ts (26.938 s)
  Test clients
    ✓ check chain height (4 ms)
  Token Factory Contract Tests
    ✓ Check initial balance (13 ms)
    ✓ Instantiate Token Factory contract (3236 ms)
    ✓ Create new denom (3223 ms)
    ✓ Mint tokens using fullDenom (3221 ms)
    ✓ Check balance of minted tokens (3235 ms)
Test Suites: 5 passed, 5 total
Tests:       21 passed, 21 total
Snapshots:   0 total
Time:        27.061 s, estimated 28 s
Ran all test suites. | 
| We need to also commit  | 
              
                    Anmol1696
  
              
              approved these changes
              
                  
                    Mar 25, 2025 
                  
              
              
            
            
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
      
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
added updated contract examples:
simple-state+ testshello+ testsbank+ teststoken-factory+ tests