Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ Constants and various helper code used by tests and data processing scripts.

## Deployment Overview

### Migration (Rinkeby example)
### Migration (Goerli example)
```
truffle console --network rinkeby
truffle(rinkeby)> migrate --reset
truffle console --network goerli
truffle(goerli)> migrate --reset

Compiling your contracts...
===========================
Expand All @@ -63,8 +63,8 @@ Compiling your contracts...

Starting migrations...
======================
> Network name: 'rinkeby'
> Network id: 4
> Network name: 'goerli'
> Network id: 5
> Block gas limit: 0x98705c


Expand Down Expand Up @@ -178,24 +178,24 @@ Summary
> Final cost: 0.018533242 ETH
```

### Setup - [Artist Attribution](https://github.com/nft42/Avastars-Contracts/tree/master/data#set-artist-attribution) (Rinkeby example)
### Setup - [Artist Attribution](https://github.com/nft42/Avastars-Contracts/tree/master/data#set-artist-attribution) (Goerli example)
#### Must edit data/attribution/set-attribution.js, set artist info first!
```
truffle(rinkeby)> exec data/set-attribution.js
Using network 'rinkeby'.
truffle(goerli)> exec data/set-attribution.js
Using network 'goerli'.

Adding artist attribution for Generation 1...
Gas used: 114231
```

### Setup - [Create Traits](https://github.com/nft42/Avastars-Contracts/tree/master/data#create-traits) (Rinkeby example)
### Setup - [Create Traits](https://github.com/nft42/Avastars-Contracts/tree/master/data#create-traits) (Goerli example)
#### Must edit data/traits/create-traits.js, set NETWORK constant, and comment out safety catch first!
```
truffle(rinkeby)> exec data/create-traits.js
Using network 'rinkeby'.
truffle(goerli)> exec data/create-traits.js
Using network 'goerli'.

Environment / network...
TEST rinkeby
TEST goerli
Fetching accounts...
Start from scratch with new log.
Processing raw database dump...
Expand All @@ -206,13 +206,13 @@ Adding traits to contract...
.
```

### Setup - [Create Promos](https://github.com/nft42/Avastars-Contracts/tree/master/data#create-promos) (Rinkeby example)
### Setup - [Create Promos](https://github.com/nft42/Avastars-Contracts/tree/master/data#create-promos) (Goerli example)
#### Must edit data/promos/create-promos.js, set NETWORK constant, and comment out safety catch first!
```
truffle(rinkeby)> exec data/create-promos.js
truffle(goerli)> exec data/create-promos.js

Environment / network...
TEST rinkeby
TEST goerli
Fetching accounts...
{ admins: [ '0x603158d642682E0D59b0Ab9d7e0c305EeA9C947a' ],
owners: [ '0x0C3b27Fd4195E4C3849b96fDb8D1fB4846f7c198' ],
Expand All @@ -238,4 +238,4 @@ Adding promos to contract...
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
* Neither the name of nft42, Avastars, nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
22 changes: 20 additions & 2 deletions contracts/AvastarMetadata.sol
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,15 @@ contract AvastarMetadata is AvastarBase, AvastarTypes, AccessControl {
}

// Description: Gender
metadata = strConcat(metadata, (gender == Gender.MALE) ? ' Male ' : ' Female ');
if (gender == Gender.MALE) {
metadata = strConcat(metadata, ' Male ');
}
else if (gender == Gender.FEMALE) {
metadata = strConcat(metadata, ' Female ');
}
else {
metadata = strConcat(metadata, ' Non-Binary ');
}

// Description: Founder, Exclusive, Prime, or Replicant
if (wave == Wave.PRIME && series == Series.PROMO) {
Expand Down Expand Up @@ -255,7 +263,17 @@ contract AvastarMetadata is AvastarBase, AvastarTypes, AccessControl {
metadata = strConcat(metadata, ' {\n');
metadata = strConcat(metadata, ' "trait_type": "gender",\n');
metadata = strConcat(metadata, ' "value": "');
metadata = strConcat(metadata, (gender == Gender.MALE) ? 'male"' : 'female"');

if (gender == Gender.MALE) {
metadata = strConcat(metadata, 'male"');
}
else if (gender == Gender.FEMALE) {
metadata = strConcat(metadata, 'female"');
}
else {
metadata = strConcat(metadata, 'non-binary"');
}

metadata = strConcat(metadata, '\n },\n');

// Wave
Expand Down
4 changes: 2 additions & 2 deletions data/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ to manually set the network at the top of the file before executing the script:
//--------------------------{SET ME FIRST}---------------------
const NETWORK = 'development';
//const NETWORK = 'ropsten';
//const NETWORK = 'rinkeby';
//const NETWORK = 'goerli';
//const NETWORK = 'mainnet';
//--------------------------{SET ME FIRST}---------------------
```
Expand Down Expand Up @@ -118,7 +118,7 @@ to manually set the network at the top of the file before executing the script:
//--------------------------{SET ME FIRST}---------------------
const NETWORK = 'development';
//const NETWORK = 'ropsten';
//const NETWORK = 'rinkeby';
//const NETWORK = 'goerli';
//const NETWORK = 'mainnet';
//--------------------------{SET ME FIRST}---------------------
```
Expand Down
Loading