ERC20 토큰

토큰 ERC20 API는 HTTP 프로토콜을 지원합니다. erc20_ 네임을 사용합니다..

erc20_create

ERC20 토큰 생성

Parameters

NameTypeDescription

sender

String

발신인 주소

name

String

토큰명 Max length : 30

symbol

String

토큰 기호. 영숫자 문자로만 구성되며 최대 4자를 포함할 수 있습니다.. Max length : 4

initialSupply

BigInteger

토큰의 초기 공급량입니다. 최대 자릿수는 11자리입니다.

decimals

Integer

소수점 이하 최소 0 ~ 최대 18.

tempKey

String

tempKey for "create"

hashKey

String

해쉬(tempKey | secretKey)

signature

String

서명( hash( sender | name | symbol | initialSupply | decimals | tempKey | hashKey ) ) by sender's privateKey using signData API

거래를 수행하려면 소유자가 가스 비용에 대해 최소 4 GFEI의 잔액을 가지고 있어야 합니다..

Return Value

NameTypeDescription

transactionId

String

트렌젝션 Id

contractAddress

String

토큰 계약 주소

트랜잭션 ID가 반환되지만 아직 블록에 추가되지 않았습니다. net_getTransactionStatus를 사용하여 상태가 1인지 확인해야 합니다.

Example

{
    "jsonrpc": "2.0",
    "id": "00456",
    "result": {
        "resultCode": "200",
        "resultMessage": "Success",
        "resultData": {
            "transactionId": "0xf7d37be47ce8b563b07aa5e81e17e9722bab2e71374d970a558b45c0ed51df7b"
        }
    }
}

erc20_mint

Add token issuance. Only the token owner can do this.

Parameters

NameTypeDescription

contractAddress

String

토큰의 계약 주소

sender

String

보낸 사람 주소 (It's must be owner)

amount

BigDecimal

Mint 토큰 양 .

comment

String

Comment Max length : 200

tempKey

String

tempKey for "mint"

hashKey

String

해쉬값 (tempKey | secretKey)

signature

String

서명값 ( hash( contractAddress | owner | amount | tempKey | hashKey ) ) by sender's privateKey using signData API

거래를 수행하기 위해서는 소유자가 가스 비용에 대해 적어도 100,000,000 PEI의 잔액을 가지고 있어야 합니다..

Return Value

NameTypeDescription

transactionId

String

Transaction Id

트랜잭션 ID가 반환되지만 아직 블록에 추가되지 않았습니다. 다음을 사용하여 상태가 1인지 확인해야 합니다. net_getTransactionStatus.

Example

{
    "jsonrpc": "2.0",
    "id": "00456",
    "result": {
        "resultCode": "200",
        "resultMessage": "Success",
        "resultData": {
            "transactionId": "0xf7d37be47ce8b563b07aa5e81e17e9722bab2e71374d970a558b45c0ed51df7b"
        }
    }
}

erc20_burn

토큰의 초기 공급을 태웁니다. 토큰 소유자만 이 작업을 수행할 수 있습니다.

Parameters

NameTypeDescription

contractAddress

String

토큰의 계약 주소

sender

String

보낸 사람 주소 (It's must be owner)

amount

BigDecimal

Burn 토큰 양.

comment

String

Comment Max length : 200

tempKey

String

tempKey for "burn"

hashKey

String

해쉬값 (tempKey | secretKey)

signature

String

서명값 ( hash( contractAddress | owner | amount | tempKey | hashKey ) ) by sender's privateKey using signData API

거래를 수행하기 위해서는 소유자가 가스 비용에 대한 100 MFEI 이상의 잔액을 가지고 있어야 합니다.

Return Value

NameTypeDescription

transactionId

String

Transaction Id

트랜잭션 ID가 반환되지만 아직 블록에 추가되지 않았습니다. net_getTransactionStatus를 사용하여 상태가 1인지 확인해야 합니다.

Example

{
    "jsonrpc": "2.0",
    "id": "00456",
    "result": {
        "resultCode": "200",
        "resultMessage": "Success",
        "resultData": {
            "transactionId": "0xf7d37be47ce8b563b07aa5e81e17e9722bab2e71374d970a558b45c0ed51df7b"
        }
    }
}

erc20_getBalance

주소 토큰 잔액을 반환합니다.

Parameters

NameTypeDescription

contractAddress

String

토큰의 계약 주소.

address

String

주소

Return Value

NameTypeDescription

balance

BigDecimal

토큰 잔액.

Example

{
    "jsonrpc": "2.0",
    "id": "00456",
    "result": {
        "resultCode": "200",
        "resultMessage": "Success",
        "resultData": {
            "balance": "100.12"
        }
    }
}

erc20_transfer

Transfer Token from from-address to to-address.

Parameters

NameTypeDescription

contractAddress

String

토큰의 계약 주소

sender

String

보낸 사람 주소

toAddress

String

받는 주소

amount

BigDecimal

전송 수량.

comment

String

Comment Max length : 200

tempKey

String

tempKey for "transfer"

hashKey

String

해쉬값 (tempKey | fromAddress' secretKey)

signature

String

서명값 ( hash( contractAddress | sender | toAddress | amount | tempKey | hashKey ) ) by sender's privateKey using signData API

In order to perform a transaction, the from address must have a balance of at least 100 MFEI for gas cost.

Return Value

NameTypeDescription

transactionId

String

Transaction Id

트랜잭션 ID가 반환되지만 아직 블록에 추가되지 않았습니다. net_getTransactionStatus를 사용하여 상태가 1인지 확인해야 합니다.

Example

{
    "jsonrpc": "2.0",
    "id": "00456",
    "result": {
        "resultCode": "200",
        "resultMessage": "Success",
        "resultData": {
            "transactionId": "0xf7d37be47ce8b563b07aa5e81e17e9722bab2e71374d970a558b45c0ed51df7b"
        }
    }
}

erc20_transferFrom

Transfer Token from from-address to to-address by spender.

Parameters

NameTypeDescription

contractAddress

String

토큰의 계약 주소

sender

String

보낸 사람 주소 (spender)

fromAddress

String

보낸 주소

toAddress

String

받는 주소

amount

BigDecimal

전송 수량.

comment

String

Comment Max length : 200

tempKey

String

tempKey for "transfer"

hashKey

String

해쉬값 (tempKey | fromAddress' secretKey)

signature

String

서명값 ( hash( contractAddress | sender | fromAddress | toAddress | amount | tempKey | hashKey ) ) by sender's privateKey using signData API

In order to perform a transaction, the spender address must have a balance of at least 100 MFEI for gas cost.

Return Value

NameTypeDescription

transactionId

String

Transaction Id

A transactionId is returned, but that doesn't mean it has been added to the Block yet. You should check that the status is 1 by using net_getTransactionStatus.

Example

{
    "jsonrpc": "2.0",
    "id": "00456",
    "result": {
        "resultCode": "200",
        "resultMessage": "Success",
        "resultData": {
            "transactionId": "0xf7d37be47ce8b563b07aa5e81e17e9722bab2e71374d970a558b45c0ed51df7b"
        }
    }
}

erc20_approve

Approve Token from owner-address to spender-address.

Parameters

NameTypeDescription

contractAddress

String

토큰의 계약 주소

sender

String

보낸 사람 주소

spender

String

발송인 주소

amount

BigDecimal

전송 수량..

comment

String

Comment Max length : 200

tempKey

String

tempKey for "approve"

hashKey

String

해쉬값 (tempKey | fromAddress' secretKey)

signature

String

서명값 ( hash ( contractAddress | sender | spender | amount | tempKey | hashKey ) ) by sender's privateKey using signData API

거래를 수행하기 위해서는 from address가 가스 비용에 대해 적어도 100 MFEI의 잔액을 가져야 한다.

Return Value

NameTypeDescription

transactionId

String

Transaction Id

트랜잭션 ID가 반환되지만 아직 블록에 추가되지 않았습니다. net_getTransactionStatus를 사용하여 상태가 1인지 확인해야 합니다.

Example

{
    "jsonrpc": "2.0",
    "id": "00456",
    "result": {
        "resultCode": "200",
        "resultMessage": "Success",
        "resultData": {
            "transactionId": "0xf7d37be47ce8b563b07aa5e81e17e9722bab2e71374d970a558b45c0ed51df7b"
        }
    }
}

erc20_getAllowance

Returns an allowed Token amount from owner address to to spender address.

Parameters

NameTypeDescription

contractAddress

String

토큰의 계약 주소.

address

String

주소 허용

spender

String

발송인 주소

Return Value

NameTypeDescription

amount

BigDecimal

허용된 토큰 수량

Example

{
    "jsonrpc": "2.0",
    "id": "00456",
    "result": {
        "resultCode": "200",
        "resultMessage": "Success",
        "resultData": {
            "amount": "100.12"
        }
    }
}

Last updated