콘솔 Cypress 에서 KIP-7 Contract 생성시 1134420 에러코드가 발생합니다.

Contract Alias : hdc

Token Symbol : hdc

Token Name : hdc

Total Supply : 1000000000

Decimals : 0

Contract 생성시 위와같이 입력 하고

Fee-payer Pool을 Y : 대납계정 2 KLAY 보유

Global Fee-payer 기능 : N

Billing 내지갑 : 5 KLAY

으로 하고 배포시 1134420 오류가 발생 합니다.

원인을 알수 있을까요?

안녕하세요 https://support.klaytnapi.com/hc/en-us/articles/4405194867855-How-Do-I-Mint-KIP-7-Tokens-
를 참고하셔서 다시한번 해보시고, 그래도 안되실경우 KAS Forum 으로 문의해주시기 바랍니다.

KAS Forum에 문의를 한상태 인데 답변이 없네요 ^^;
콘솔 말고 api 실행시

  • 요청 :
    {
    “alias”: “hatdogcoin”,
    “name”: “hatdogcoin”,
    “symbol”: “HDC”,
    “decimals”: 16,
    “initialSupply”: “0x3b9aca00”,
    “options”: {
    “enableGlobalFeePayer”: false,
    “userFeePayer”: {
    “krn”: “krn:8217:wallet:2fda4072-4a20-493b-9503-9959f9dbd22f:feepayer-pool:HatDogFee”,
    “address”: “0x550164c07FcEB4a4fE02512956039fFDD9dC885F”
    }
    }
    }

-응답 :
400 Bad Request
{
“code”: 1134420,
“message”: “failed to send a raw transaction to klaytn node; insufficient funds of the fee payer for gas * price”,
“requestId”: “82c4d589-7602-461a-942c-d5d8d847b6a9”
}

이렇게 나오는데 대납 계정에 2KLAY가 있는데 배포시 몇KLAY가 있어야 하는지 아시나요?

transaction전송하실때 설정하신 gas에 250스톤을 곱한값 이상으로는 있어야하구요, 실제 컨트랙트 실행할때 gas가 더 소모되어 실행이 안될 수 있습니다.

하지만 우선 위의 에러는 evm에서 실행하기 전에 충분한 balance를 갖고있는지 체크하는 부분에서 발생한 에러이므로 한번 계산해 보시고 실행해보시겠어요?

Baobab 넷에서 확인 해보니 대납 계정에 KLAY가 부족 하면 발생하는 오류 같습니다.
Baobab 넷에서는 토큰 발행시 대략 0.8KLAY정도 드는데
Cypress 넷에서는 대납계정에 2KLAY 있는데 비용이 더 드는거 같네요.
답변 감사합니다.

현재 baobab, cypress가 모두 기본 gasprice는 250ston으로 동일한데요, 제생각에 cypress에서 트랜젝션의 gas를 높게 설정하신게 아닌가 생각이 듭니다. 어차피 수행에 필요한 가스비만 소모가 되니 조금 넉넉하게 가지고 테스트해보셔도 괜찮을거 같습니다.

트랜젝션 가스비를 설정을 어디서 하는지 아시나요?
답변을 보고 찾아 보려고 하는데 콘솔페이지에서 작업중인데 항목을 못찾겠습니다 ㅠ_ㅠ.

아래는 caver 예제내용인데요, 아래와같이 설정하실 수 있습니다. IDE에서는 gasLimit이라는 필드를 이용해서 설정할수 있도록 되어있는거 같아요

// This example uses the FeeDelegatedValueTransfer transaction.
> const transaction = caver.transaction.feeDelegatedValueTransfer.create({
    from: '0x6fddbcb99d31b8755c2b840a367f53eea4b4f45c',
    to: '0x3424b91026bdc5ec55df4548e6ebf0f28b60abd7',
    value: 1,
    gas: 30000,
})

> const customHasher = () => { ... }

// Sign a transaction with the address of RoleBasedKeyring which use two private keys for roleFeePayerKey
> transaction.signAsFeePayer(roleBasedKeyring).then(console.log)
FeeDelegatedValueTransfer {
    _type: 'TxTypeFeeDelegatedValueTransfer',
    _from: '0x6fddbcb99d31b8755c2b840a367f53eea4b4f45c',
    _gas: '0x7530',
    _signatures: [ SignatureData { _v: '0x01', _r: '0x', _s: '0x' } ],
    _feePayer: '0xe7e9184c125020af5d34eab7848bab799a1dcba9',
    _feePayerSignatures: [
        SignatureData { _v: '0x4e44', _r: '0x7010e...', _s: '0x65d6b...' },
        SignatureData { _v: '0x4e43', _r: '0x96ef2...', _s: '0x77f34...' }
    ],
    _to: '0x3424b91026bdc5ec55df4548e6ebf0f28b60abd7',
    _value: '0x1',
    _chainId: '0x2710',
    _gasPrice: '0x5d21dba00',
    _nonce: '0x0'
}

// Sign a transaction with the address of RoleBasedKeyring which use two private keys for roleFeePayerKey and index
> transaction.signAsFeePayer(roleBasedKeyring, 1).then(console.log)
FeeDelegatedValueTransfer {
    _type: 'TxTypeFeeDelegatedValueTransfer',
    _from: '0x6fddbcb99d31b8755c2b840a367f53eea4b4f45c',
    _gas: '0x7530',
    _signatures: [ SignatureData { _v: '0x01', _r: '0x', _s: '0x' } ],
    _feePayer: '0xe7e9184c125020af5d34eab7848bab799a1dcba9',
    _feePayerSignatures: [
        SignatureData { _v: '0x4e43', _r: '0x96ef2...', _s: '0x77f34...' }
    ],
    _to: '0x3424b91026bdc5ec55df4548e6ebf0f28b60abd7',
    _value: '0x1',
    _chainId: '0x2710',
    _gasPrice: '0x5d21dba00',
    _nonce: '0x0'
}

// Sign a transaction with the address of RoleBasedKeyring which use two private keys for roleFeePayerKey and hasher
> transaction.signAsFeePayer(roleBasedKeyring, customHasher).then(console.log)
FeeDelegatedValueTransfer {
    _type: 'TxTypeFeeDelegatedValueTransfer',
    _from: '0x6fddbcb99d31b8755c2b840a367f53eea4b4f45c',
    _gas: '0x7530',
    _signatures: [ SignatureData { _v: '0x01', _r: '0x', _s: '0x' } ],
    _feePayer: '0xe7e9184c125020af5d34eab7848bab799a1dcba9',
    _feePayerSignatures: [
        SignatureData { _v: '0x4e43', _r: '0xe48bf...', _s: '0x1cf36...' },
        SignatureData { _v: '0x4e43', _r: '0x82976...', _s: '0x3c5e0...' }
    ],
    _to: '0x3424b91026bdc5ec55df4548e6ebf0f28b60abd7',
    _value: '0x1',
    _chainId: '0x2710',
    _gasPrice: '0x5d21dba00',
    _nonce: '0x0'
}

// Sign a transaction with the address of RoleBasedKeyring which use two private keys for roleFeePayerKey, index and hasher
> transaction.signAsFeePayer(roleBasedKeyring, 1, customHasher).then(console.log)
FeeDelegatedValueTransfer {
    _type: 'TxTypeFeeDelegatedValueTransfer',
    _from: '0x6fddbcb99d31b8755c2b840a367f53eea4b4f45c',
    _gas: '0x7530',
    _signatures: [ SignatureData { _v: '0x01', _r: '0x', _s: '0x' } ],
    _feePayer: '0xe7e9184c125020af5d34eab7848bab799a1dcba9',
    _feePayerSignatures: [
        SignatureData { _v: '0x4e43', _r: '0x82976...', _s: '0x3c5e0...' }
    ],
    _to: '0x3424b91026bdc5ec55df4548e6ebf0f28b60abd7',
    _value: '0x1',
    _chainId: '0x2710',
    _gasPrice: '0x5d21dba00',
    _nonce: '0x0'
}

도움 감사 드립니다.
메인넷 Cypress 에서 대답 지갑에 2KLAY 있을때는 배포가 안됐는데
10KLAY 충전하니 배포가 됐습니다.
실제 사용된 KLAY는 0.9KLAY정도 되는데
뭔가 더 여유분의 KLAY가 있어야 배포가 되는거 같습니다.
해당 원인 파악에 도움 주셔서 감사합니다. ^^

2개의 좋아요