Uploading a Citizen Through the Contract: Difference between revisions

From Neo Tokyo Citizen Wiki
(Created page with "You can upload using the Citizen contract: 0xb668beB1Fa440F6cF2Da0399f8C28caB993Bdd65 Use function #4. createCitizen. You need to fill in every parameter. So if you don't h...")
 
No edit summary
 
(12 intermediate revisions by the same user not shown)
Line 1: Line 1:
You can upload using the Citizen contract: 0xb668beB1Fa440F6cF2Da0399f8C28caB993Bdd65
'''Note:''' ''this article may be outdated. These instructions apply to the legacy Citizen contract. The Neo Tokyo ecosystem has since [[Migration|migrated]] to a new set of contracts.''


Use function #4. createCitizen.  
If Web3 functionality of the [https://neotokyo.codes official website] is unreachable or disabled,
a [[Citizen]] can be created interacting with the Citizen contract and all the component contracts on [https://etherscan.io/ Etherscan].


You need to fill in every parameter. So if you don't have a vault, put 0. Put 0 for gender too until females are released. And if you don't want a message put "".
== Requirements ==
Creating a Citizen requires:
* Enough ETH for multiple transaction fees (0.02+ to ensure that you can complete the process)
* These component NFTs must be in the ethereum wallet you are connecting to Etherscan:
** An [[Neo_Tokyo_Identities_(NEOTI)|Identity]] or a [[Neo_Tokyo_Bought_Identities_(NEOTBI)| Bought Identity]]
** [[Neo Tokyo Part 3 Item Caches (NTITEM)|Item Cache]]
** [[Neo Tokyo Part 4 Land Deeds (NTLD)|Land Deed]] NFT
** (Optional) a [[Vault]] can be used to increase the [[Bytes | $BYTE]] yield of the resulting Citizen.  
* The token ID for each component


If you're getting an error, make sure you've approved all of the token's contracts. You’ll need to do this before uploading:
'''Note:''' You can reduce costs by uploading a Citizen when gas fees are low.


To approve you need to go into each contract and call "setApprovalForAll".
[[File:S1_Info.jpg|800px|thumb|left]]
Pass in the citizen contract (0xb668beB1Fa440F6cF2Da0399f8C28caB993Bdd65) as the operator, and 1 for approved
<br clear=all>
Bought Identities: https://etherscan.io/address/0x835a60cc60b808e47825daa79a9da6c9ff3a892e#writeContract


Original Identities (you only need one of the identity contracts approved depending on your id): https://etherscan.io/address/0x86357a19e5537a8fba9a004e555713bc943a66c0#writeContract
== Etherscan Instructions ==
{| class="wikitable"
|+ Contracts Used for Uploading a Citizen
|-
! Contract !! Etherscan URL
|-
| Citizen Contract || https://etherscan.io/address/0xb668beb1fa440f6cf2da0399f8c28cab993bdd65#writeContract
|-
| [[Neo_Tokyo_Identities_(NEOTI)|Identity]] or a [[Neo_Tokyo_Bought_Identities_(NEOTBI)| Bought Identity]] (you only need one of the Identity contracts, depending on your ID) || [https://etherscan.io/address/0x86357a19e5537a8fba9a004e555713bc943a66c0#writeContract ID: https://etherscan.io/address/0x86357a19e5537a8fba9a004e555713bc943a66c0#writeContract]<br />--<br />[https://etherscan.io/address/0x835a60cc60b808e47825daa79a9da6c9ff3a892e#writeContract Bought ID: https://etherscan.io/address/0x835a60cc60b808e47825daa79a9da6c9ff3a892e#writeContract]
|-
| [[Neo Tokyo Part 3 Item Caches (NTITEM)|Item Cache]] || https://etherscan.io/address/0x0938e3f7ac6d7f674fed551c93f363109bda3af9#writeContract
|-
| [[Neo Tokyo Part 4 Land Deeds (NTLD)|Land Deed]] || https://etherscan.io/address/0x3c54b798b3aad4f6089533af3bdbd6ce233019bb#writeContract
|-
| [[Vault]] (optional) || https://etherscan.io/address/0xab0b0dd7e4eab0f9e31a539074a03f1c1be80879#writeContract
|}


Items: https://etherscan.io/address/0x0938e3f7ac6d7f674fed551c93f363109bda3af9#writeContract
=== Set approval for all of the component contracts ===
Before interacting with the Citizen contract, you will need to set approvals for the component contracts.
To set approvals,
# Open the contract, click the '''Contract''' tab, and click the '''Write Contract''' tab within that frame.
# Use the '''Connect to Web3''' button to connect your wallet with the required components and ethereum.
# Navigate to the function <code>8. setApprovalForAll</code> function each contract. (It's a different function number on the Identity contracts.)
## For "operator (address)": <code>0xb668beB1Fa440F6cF2Da0399f8C28caB993Bdd65</code> (the Citizen contract address).
## For "approved (bool)": <code>1</code>


Land: https://etherscan.io/address/0x3c54b798b3aad4f6089533af3bdbd6ce233019bb#writeContract
=== Upload via the Citizen contract ===
# Open the Citizen contract, click the '''Contract''' tab, and click the '''Write Contract''' tab within that frame.
# Use the '''Connect to Web3''' button to connect your wallet with the required components and ethereum.
# Expand function 4, <code>4.createCitizen.</code> and fill in every parameter with the correct token ID for each of your component NFTs.
## If you don't have a vault, put <code>0</code>.
## Select <code>0</code> for a male Citizen or <code>1</code> for a female Citizen.
## specialMessage is a custom message associated with your Citizen that will appear on exchanges in the description field. If you want to leave that field empty use <code>""</code>.


Vault (optional): https://etherscan.io/address/0xab0b0dd7e4eab0f9e31a539074a03f1c1be80879#writeContract
If you get an error, make sure you set approval for all in the component contracts.

Latest revision as of 09:16, 2 July 2023

Note: this article may be outdated. These instructions apply to the legacy Citizen contract. The Neo Tokyo ecosystem has since migrated to a new set of contracts.

If Web3 functionality of the official website is unreachable or disabled, a Citizen can be created interacting with the Citizen contract and all the component contracts on Etherscan.

Requirements

Creating a Citizen requires:

  • Enough ETH for multiple transaction fees (0.02+ to ensure that you can complete the process)
  • These component NFTs must be in the ethereum wallet you are connecting to Etherscan:
  • The token ID for each component

Note: You can reduce costs by uploading a Citizen when gas fees are low.

S1 Info.jpg


Etherscan Instructions

Contracts Used for Uploading a Citizen
Contract Etherscan URL
Citizen Contract https://etherscan.io/address/0xb668beb1fa440f6cf2da0399f8c28cab993bdd65#writeContract
Identity or a Bought Identity (you only need one of the Identity contracts, depending on your ID) ID: https://etherscan.io/address/0x86357a19e5537a8fba9a004e555713bc943a66c0#writeContract
--
Bought ID: https://etherscan.io/address/0x835a60cc60b808e47825daa79a9da6c9ff3a892e#writeContract
Item Cache https://etherscan.io/address/0x0938e3f7ac6d7f674fed551c93f363109bda3af9#writeContract
Land Deed https://etherscan.io/address/0x3c54b798b3aad4f6089533af3bdbd6ce233019bb#writeContract
Vault (optional) https://etherscan.io/address/0xab0b0dd7e4eab0f9e31a539074a03f1c1be80879#writeContract

Set approval for all of the component contracts

Before interacting with the Citizen contract, you will need to set approvals for the component contracts. To set approvals,

  1. Open the contract, click the Contract tab, and click the Write Contract tab within that frame.
  2. Use the Connect to Web3 button to connect your wallet with the required components and ethereum.
  3. Navigate to the function 8. setApprovalForAll function each contract. (It's a different function number on the Identity contracts.)
    1. For "operator (address)": 0xb668beB1Fa440F6cF2Da0399f8C28caB993Bdd65 (the Citizen contract address).
    2. For "approved (bool)": 1

Upload via the Citizen contract

  1. Open the Citizen contract, click the Contract tab, and click the Write Contract tab within that frame.
  2. Use the Connect to Web3 button to connect your wallet with the required components and ethereum.
  3. Expand function 4, 4.createCitizen. and fill in every parameter with the correct token ID for each of your component NFTs.
    1. If you don't have a vault, put 0.
    2. Select 0 for a male Citizen or 1 for a female Citizen.
    3. specialMessage is a custom message associated with your Citizen that will appear on exchanges in the description field. If you want to leave that field empty use "".

If you get an error, make sure you set approval for all in the component contracts.