aeternity / smart-contract-verifier

Smart Contract Verification and Storage Service consumable through REST API
ISC License
0 stars 0 forks source link

Automatically derive the compiler version #53

Open michele-franchi opened 6 months ago

michele-franchi commented 6 months ago

The compiler version could be automatically derived using aesophia cli, using --compiled_by. Example: aesophia_cli --compiled_by cb_

davidyuk commented 2 months ago

You can also use calldata library

calldata = require('@aeternity/aepp-calldata')
c = new calldata.ContractEncoder()
// https://testnet.aeternity.io/v3/contracts/ct_HzBhnwxXg2zsPAmpX6ppoJNA5q1oojn8ZL2AsWozRxuBFERWD/code
c.decode(
  'cb_+JZGA6ChqMLv4ude/7H99pvMlDnAZQsLIJfYj6/C+eGDo2o9NMC4abP+RNZEHwA3AQc3ABoGggABAz/+boPhzgA3AQcHFiQAggD+rjHQWQA3AQc3ABoGggABAz+xLwMRRNZEHxFpbml0EW6D4c5BbXVsdGlwbHlCeUZhY3RvchGuMdBZJXNldEZhY3RvcoIvAIU3LjQuMAD9z2HE',
).compilerVersion
// '7.4.0'