diff --git a/src/app/canvas/canvas.component.ts b/src/app/canvas/canvas.component.ts
index 7833acda..46c648a8 100644
--- a/src/app/canvas/canvas.component.ts
+++ b/src/app/canvas/canvas.component.ts
@@ -75,6 +75,7 @@ export class CanvasComponent implements OnInit, OnDestroy {
// Wallet Variables
address;
+ dickButtId;
niftyId;
niftyWealth;
niftyHealth;
@@ -130,6 +131,17 @@ export class CanvasComponent implements OnInit, OnDestroy {
}
});
+ this.sharedService.dickButtId$.subscribe(id => {
+ this.dickButtId = id
+ if (id == null) {
+ this.vitalikSmile.src = '../../assets/Images/vitalikSmile_Transparent.png';
+ this.vitalikOpenMouth.src = '../../assets/Images/vitalikOpenMouth_Transparent.png';;
+ } else {
+ this.vitalikSmile.src = '../../assets/Images/dickbutts/160.png';
+ this.vitalikOpenMouth.src = '../../assets/Images/dickbutts/160.png';
+ }
+ });
+
this.sharedService.vitalikId$.subscribe(id => {
this.niftyId = id
if (id == null) {
diff --git a/src/app/menu/menu.component.html b/src/app/menu/menu.component.html
index 8d012b48..d96b4bda 100644
--- a/src/app/menu/menu.component.html
+++ b/src/app/menu/menu.component.html
@@ -85,6 +85,10 @@
Support
+
diff --git a/src/app/menu/menu.component.scss b/src/app/menu/menu.component.scss
index 815da269..a8bfff7d 100644
--- a/src/app/menu/menu.component.scss
+++ b/src/app/menu/menu.component.scss
@@ -30,6 +30,11 @@
margin-left: 0px;
}
+.dickbuttImg {
+ width: 128px;
+ height: 128px;
+}
+
.niftyImg {
width: 62px;
height: 124px;
@@ -74,3 +79,4 @@
#storeTab {
height: 85vh;
}
+
diff --git a/src/app/menu/menu.component.ts b/src/app/menu/menu.component.ts
index ad408538..8c1ea7b5 100644
--- a/src/app/menu/menu.component.ts
+++ b/src/app/menu/menu.component.ts
@@ -18,6 +18,7 @@ export class MenuComponent {
background;
address
niftyIds = []
+ dickButtIds = []
displayAddress;
unisocksHolder = false;
niftyWealth;
@@ -82,6 +83,7 @@ export class MenuComponent {
this.getNiftyDudesBalance();
this.getUnisocksBalance();
this.getFeedVitalikBalance();
+ this.getDickButtBalance();
}
});
}
@@ -142,6 +144,17 @@ export class MenuComponent {
})
}
+ getDickButtBalance(){
+ this.web3.getDickButts(this.address).then((ids) => {
+ this.dickButtIds = ids;
+ console.log("DICKBUTT IDS: ", this.dickButtIds);
+ if(this.dickButtIds.length > 0) {
+ this.myModal.nativeElement.click();
+ this.char.nativeElement.click();
+ }
+ })
+ }
+
getUnisocksBalance() {
// Unisocks test address
// 0xb3bD6999Bf4B87Cc9E3fEb6eF06A45B356FbfE37
@@ -269,10 +282,12 @@ export class MenuComponent {
if (id === null) {
this.sharedService.vitalikId$.next(id)
this.sharedService.niftyDudeId$.next(id)
+ this.sharedService.dickButtId$.next(id)
} else if (vitalik){
this.sharedService.vitalikId$.next(id)
} else {
- this.sharedService.niftyDudeId$.next(id)
+ // this.sharedService.niftyDudeId$.next(id)
+ this.sharedService.dickButtId$.next(id)
}
}
diff --git a/src/app/services/shared.service.ts b/src/app/services/shared.service.ts
index 692dc0f3..943748c5 100644
--- a/src/app/services/shared.service.ts
+++ b/src/app/services/shared.service.ts
@@ -5,6 +5,7 @@ import { BehaviorSubject } from 'rxjs/internal/BehaviorSubject';
providedIn: 'root'
})
export class SharedDataService {
+ dickButtId$ = new BehaviorSubject(null);
niftyDudeId$ = new BehaviorSubject(null);
vitalikId$ = new BehaviorSubject(null);
health$ = new BehaviorSubject(null);
diff --git a/src/app/services/web3.service.ts b/src/app/services/web3.service.ts
index eccfc97b..fbaec0d7 100644
--- a/src/app/services/web3.service.ts
+++ b/src/app/services/web3.service.ts
@@ -21,6 +21,9 @@ export class Web3Service {
unisocks_contract = "0x23B608675a2B2fB1890d3ABBd85c5775c51691d5"
unisocks_abi = [{"name":"Transfer","inputs":[{"type":"address","name":"_from","indexed":true},{"type":"address","name":"_to","indexed":true},{"type":"uint256","name":"_value","indexed":false}],"anonymous":false,"type":"event"},{"name":"Approval","inputs":[{"type":"address","name":"_owner","indexed":true},{"type":"address","name":"_spender","indexed":true},{"type":"uint256","name":"_value","indexed":false}],"anonymous":false,"type":"event"},{"outputs":[],"inputs":[],"constant":false,"payable":false,"type":"constructor"},{"name":"allowance","outputs":[{"type":"uint256","name":"out"}],"inputs":[{"type":"address","name":"_owner"},{"type":"address","name":"_spender"}],"constant":true,"payable":false,"type":"function","gas":815},{"name":"transfer","outputs":[{"type":"bool","name":"out"}],"inputs":[{"type":"address","name":"_to"},{"type":"uint256","name":"_value"}],"constant":false,"payable":false,"type":"function","gas":74044},{"name":"transferFrom","outputs":[{"type":"bool","name":"out"}],"inputs":[{"type":"address","name":"_from"},{"type":"address","name":"_to"},{"type":"uint256","name":"_value"}],"constant":false,"payable":false,"type":"function","gas":110401},{"name":"approve","outputs":[{"type":"bool","name":"out"}],"inputs":[{"type":"address","name":"_spender"},{"type":"uint256","name":"_value"}],"constant":false,"payable":false,"type":"function","gas":37779},{"name":"burn","outputs":[{"type":"bool","name":"out"}],"inputs":[{"type":"uint256","name":"_value"}],"constant":false,"payable":false,"type":"function","gas":73765},{"name":"burnFrom","outputs":[{"type":"bool","name":"out"}],"inputs":[{"type":"address","name":"_from"},{"type":"uint256","name":"_value"}],"constant":false,"payable":false,"type":"function","gas":110122},{"name":"name","outputs":[{"type":"string","name":"out"}],"inputs":[],"constant":true,"payable":false,"type":"function","gas":6462},{"name":"symbol","outputs":[{"type":"string","name":"out"}],"inputs":[],"constant":true,"payable":false,"type":"function","gas":6492},{"name":"decimals","outputs":[{"type":"uint256","name":"out"}],"inputs":[],"constant":true,"payable":false,"type":"function","gas":723},{"name":"totalSupply","outputs":[{"type":"uint256","name":"out"}],"inputs":[],"constant":true,"payable":false,"type":"function","gas":753},{"name":"balanceOf","outputs":[{"type":"uint256","name":"out"}],"inputs":[{"type":"address","name":"arg0"}],"constant":true,"payable":false,"type":"function","gas":955}]
+ dickbutts_contract = "0x42069ABFE407C60cf4ae4112bEDEaD391dBa1cdB"
+ dickbutts_abi = [{"inputs":[{"internalType":"address payable","name":"_teamMember","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"_claimant","type":"address"}],"name":"addressEligibleForDiscount","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address payable[]","name":"recipients","type":"address[]"},{"internalType":"uint256[]","name":"quantity","type":"uint256[]"}],"name":"devMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"freezeMetadata","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_claimant","type":"address"}],"name":"hasAddressClaimedDiscount","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"hasClaimedDiscount","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_claimant","type":"address"}],"name":"holdsPartnerProject","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"liveSale","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxMintsPerTx","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxTokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"metaDataFrozen","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"metadataURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"metadataURIrange","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"mintWithPartnerDiscount","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nextTokenId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"partnerProjects","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"provenance","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"contractURI_","type":"string"}],"name":"setContractURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_initialMetadataURI","type":"string"}],"name":"setInitialMetadataURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"group","type":"uint256"},{"internalType":"string","name":"_metadataURI","type":"string"}],"name":"setMetadataURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_partnerToken","type":"address"}],"name":"setPartnerProjects","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_provenance","type":"string"}],"name":"setProvenance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"newAddress","type":"address"}],"name":"setTeamMember","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startingId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"teamMember","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"toggleSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
+
private accountStatusSource = new Subject();
accountStatus$ = this.accountStatusSource.asObservable();
@@ -82,6 +85,19 @@ export class Web3Service {
return niftyIds
}
+ async getDickButts(address) {
+ const dickbuttsContract = new this.web3js.eth.Contract(this.dickbutts_abi, this.dickbutts_contract)
+ // Get the number of dickbutts owned
+ const balance = await dickbuttsContract.methods.balanceOf(address).call()
+
+ // Iterate through number owned to get actual ids
+ let dickbuttIds = []
+ for(let i=0; i