Skip to content

Instantly share code, notes, and snippets.

@Philogy
Created January 10, 2024 02:01
Show Gist options
  • Select an option

  • Save Philogy/a7dd9d1663ecec9755cae0d6444fc1c5 to your computer and use it in GitHub Desktop.

Select an option

Save Philogy/a7dd9d1663ecec9755cae0d6444fc1c5 to your computer and use it in GitHub Desktop.

Revisions

  1. Philogy created this gist Jan 10, 2024.
    5 changes: 5 additions & 0 deletions add.dasy
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    (defn _double [:uint256 x] :uint256 [:internal :pure]
    (* x 2))

    (defn add [:uint256 x] :uint256 [:external :pure]
    (if (< x 10) 0 (self/_double x)))