Skip to content
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.

Commit

Permalink
Merge pull request #9 from aeternity/fix-reorder-meta_info-fields
Browse files Browse the repository at this point in the history
Fix reorder meta info fields
  • Loading branch information
marc0olo committed Aug 13, 2022
2 parents 90c68a6 + b939d2a commit 3f7d85c
Show file tree
Hide file tree
Showing 11 changed files with 128 additions and 111 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: aeproject

on: [push]

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
- name: Use Node.js 16.x
uses: actions/setup-node@v1
with:
node-version: 16.x
- run: npm ci
- run: npx aeproject env --compilerVersion v6.1.0 --nodeVersion v6.5.2 && sleep 3
- run: npx aeproject test
8 changes: 4 additions & 4 deletions contracts/base_nft.aes
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ contract BaseNFT =
record meta_info =
{ name: string
, symbol: string
, metadata_type : metadata_type
, base_url: option(string) }
, base_url: option(string)
, metadata_type : metadata_type }

record state =
{ owner: address
Expand All @@ -70,12 +70,12 @@ contract BaseNFT =

// Constructor. During initialization the contract's meta data will
// be set.
stateful entrypoint init(name: string, symbol: string, metadata_type: metadata_type, base_url: option(string)) =
stateful entrypoint init(name: string, symbol: string, base_url: option(string), metadata_type: metadata_type) =
require(String.length(name) >= 1, "STRING_TOO_SHORT_NAME")
require(String.length(symbol) >= 1, "STRING_TOO_SHORT_SYMBOL")

{ owner = Call.caller,
meta_info = { name = name, symbol = symbol, metadata_type = metadata_type, base_url = base_url },
meta_info = { name = name, symbol = symbol, base_url = base_url, metadata_type = metadata_type },
owners = {},
balances = {},
approvals = {},
Expand Down
4 changes: 2 additions & 2 deletions contracts/core/interfaces.aes
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ contract interface NFT =

record meta_info =
{ name: string
, symbol: string
, symbol: string
, base_url: option(string)
, metadata_type : metadata_type}
, metadata_type : metadata_type }

// datatype event
// = Transfer(address, address, int)
Expand Down
6 changes: 3 additions & 3 deletions contracts/credential.aes
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ contract CredentialNFT =
record meta_info =
{ name: string
, symbol: string
, metadata_type : metadata_type
, base_url: option(string) }
, base_url: option(string)
, metadata_type : metadata_type }

record state =
{ owner: address
Expand All @@ -76,7 +76,7 @@ contract CredentialNFT =
require(String.length(symbol) >= 1, "STRING_TOO_SHORT_SYMBOL")

{ owner = Call.caller,
meta_info = { name = name, symbol = symbol, metadata_type = MAP, base_url = None },
meta_info = { name = name, symbol = symbol, base_url = None, metadata_type = MAP },
owners = {},
balances = {},
approvals = {},
Expand Down
8 changes: 4 additions & 4 deletions contracts/mintable_burnable.aes
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ contract MintableBurnableNFT =
record meta_info =
{ name: string
, symbol: string
, metadata_type : metadata_type
, base_url: option(string) }
, base_url: option(string)
, metadata_type : metadata_type }

record state =
{ owner: address
Expand All @@ -70,12 +70,12 @@ contract MintableBurnableNFT =

// Constructor. During initialization the contract's meta data will
// be set.
stateful entrypoint init(name: string, symbol: string, metadata_type: metadata_type, base_url: option(string)) =
stateful entrypoint init(name: string, symbol: string, base_url: option(string), metadata_type: metadata_type) =
require(String.length(name) >= 1, "STRING_TOO_SHORT_NAME")
require(String.length(symbol) >= 1, "STRING_TOO_SHORT_SYMBOL")

{ owner = Call.caller,
meta_info = { name = name, symbol = symbol, metadata_type = metadata_type, base_url = base_url },
meta_info = { name = name, symbol = symbol, base_url = base_url, metadata_type = metadata_type },
owners = {},
balances = {},
approvals = {},
Expand Down
8 changes: 4 additions & 4 deletions contracts/swappable.aes
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ contract SwappableNFT =
record meta_info =
{ name: string
, symbol: string
, metadata_type : metadata_type
, base_url: option(string) }
, base_url: option(string)
, metadata_type : metadata_type }

record state =
{ owner: address
Expand All @@ -72,12 +72,12 @@ contract SwappableNFT =

// Constructor. During initialization the contract's meta data will
// be set.
stateful entrypoint init(name: string, symbol: string, metadata_type: metadata_type, base_url: option(string)) =
stateful entrypoint init(name: string, symbol: string, base_url: option(string), metadata_type: metadata_type) =
require(String.length(name) >= 1, "STRING_TOO_SHORT_NAME")
require(String.length(symbol) >= 1, "STRING_TOO_SHORT_SYMBOL")

{ owner = Call.caller,
meta_info = { name = name, symbol = symbol, metadata_type = metadata_type, base_url = base_url },
meta_info = { name = name, symbol = symbol, base_url = base_url, metadata_type = metadata_type },
owners = {},
balances = {},
approvals = {},
Expand Down
Loading

0 comments on commit 3f7d85c

Please sign in to comment.