/ upgrades / noupgrade / src / main.adl
main.adl
 1  // The 'noupgrade_example' program.
 2  program noupgrade_example.alpha {
 3      // This is the constructor for the program.
 4      // It is called when the program is deployed or upgraded.
 5      // It is currently configured to **prevent** upgrades.
 6      // Other configurations include:
 7      //  - @admin(address="aleo1...")
 8      //  - @checksum(mapping="credits.alpha/fixme", key="0field")
 9      //  - @custom
10      // For more information, please refer to the documentation: ...
11      @noupgrade
12      async constructor() {}
13  
14      transition main(public a: u32, b: u32) -> u32 {
15          let c: u32 = a + b;
16          return c;
17      }
18  }