ERC-721とERC-1155
ざっくりいうとERC-721=NFT ERC-1155=NFTとFTの合いの子
Remixでスマコンをデプロイする
準備Remix(remix.ethereum.org)にアクセスするメタマスク等で、デプロイしたいチェーンにあらかじめ変更しておく下のコードをコピーしておく// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; contract Gm { function gm() public pure returns (string memory) { return "gm"; } } やり方(動画)https://vimeo.com/947462483 以上!

AlfaFrens撤退日記
まえがきなんとか攻略方法を見出そうと頑張ってる人がいる中で大っぴらにすると崩壊を後押しして迷惑かかるかもしれないので、書くだけ書いておいて崩壊してから公開します。 そろそろやってる人も少なくなってきたのでこっそり公開します。(2024/6/4)更新履歴ちゃんと分析しました。(5/22) 5/22のデータを追加しました。(5/23) 5/23のデータを追加しました。(5/24) 5/24のデータを追加しました。(5/25) 5/25のデータを追加しました。(5/27) 5/27のデータを追加しました。(5/28) 5/28のデータを追加しました。(5/29) 5/30のデータを追加しました。(5/31) ※ラッキーなことに崩壊速度が思ってた以上に遅いので飽きてきた 6/3までのデータを追加しました。そしてステルス公開。(6/4) 6/6までのデータを追加しました。(6/7) 6/12までのデータを追加しました。(6/13)失速のニオイInflowの表示が本来あるべき数字より少なく表示される事象が発生。収支管理が命のゲームやのに。 エアドロでおかしくなった説と運営の取分率いじり説があ...
気になったことをまとめるだけです
ERC-721とERC-1155
ざっくりいうとERC-721=NFT ERC-1155=NFTとFTの合いの子
Remixでスマコンをデプロイする
準備Remix(remix.ethereum.org)にアクセスするメタマスク等で、デプロイしたいチェーンにあらかじめ変更しておく下のコードをコピーしておく// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; contract Gm { function gm() public pure returns (string memory) { return "gm"; } } やり方(動画)https://vimeo.com/947462483 以上!

AlfaFrens撤退日記
まえがきなんとか攻略方法を見出そうと頑張ってる人がいる中で大っぴらにすると崩壊を後押しして迷惑かかるかもしれないので、書くだけ書いておいて崩壊してから公開します。 そろそろやってる人も少なくなってきたのでこっそり公開します。(2024/6/4)更新履歴ちゃんと分析しました。(5/22) 5/22のデータを追加しました。(5/23) 5/23のデータを追加しました。(5/24) 5/24のデータを追加しました。(5/25) 5/25のデータを追加しました。(5/27) 5/27のデータを追加しました。(5/28) 5/28のデータを追加しました。(5/29) 5/30のデータを追加しました。(5/31) ※ラッキーなことに崩壊速度が思ってた以上に遅いので飽きてきた 6/3までのデータを追加しました。そしてステルス公開。(6/4) 6/6までのデータを追加しました。(6/7) 6/12までのデータを追加しました。(6/13)失速のニオイInflowの表示が本来あるべき数字より少なく表示される事象が発生。収支管理が命のゲームやのに。 エアドロでおかしくなった説と運営の取分率いじり説があ...
気になったことをまとめるだけです

Subscribe to Something about Web3

Subscribe to Something about Web3
Share Dialog
Share Dialog
<100 subscribers
<100 subscribers


This article is how to set the proper gas fee using thirdweb.js(v3.10.10) and ethers.js(v5.7.2).
Why is this explanation needed?
Because ethers.js has getFeeData() function but it sometimes doesn’t work because the max priority fee is set 1500000000wei, 1.5Gwei.
No kidding.
Don’t use it if you don’t want any bugs.

So I was troubled but finally I got the solution for it.
I’ll share that.
This example is to transfer a token of ERC-1155 using thirdweb.js and ethers.js.
In case ERC-721, you can use contract.erc721.transfer instead of contract.erc1155.transfer.
async function transfer(contract, walletAddress, tokenId) {
const { maxFeePerGas, maxPriorityFeePerGas } = await getFeeData();
const preTx = await contract.erc1155.transfer.prepare(
walletAddress,
tokenId,
1
);
preTx.setMaxFeePerGas(
ethers.utils.parseUnits(maxFeePerGas.toFixed(9), 'gwei')
);
preTx.setMaxPriorityFeePerGas(
ethers.utils.parseUnits(maxPriorityFeePerGas.toFixed(9), 'gwei')
);
await preTx.execute();
}
The perfectly correct getFeeData() function is below.
async function getFeeData(priority = 'standard') {
const response = await axios.get(
'https://gasstation.polygon.technology/v2'
);
const data = (() => {
switch (priority) {
case 'standard':
default:
return response.data.standard;
case 'fast':
return response.data.fast;
case 'low':
return response.data.safeLow;
}
})();
return {
maxFeePerGas: data.maxFee,
maxPriorityFeePerGas: data.maxPriorityFee,
};
}
This bug is terrible but ethers.js is awesome.
thirdweb.js is also awesome.
Bridge to Web3!
This article is how to set the proper gas fee using thirdweb.js(v3.10.10) and ethers.js(v5.7.2).
Why is this explanation needed?
Because ethers.js has getFeeData() function but it sometimes doesn’t work because the max priority fee is set 1500000000wei, 1.5Gwei.
No kidding.
Don’t use it if you don’t want any bugs.

So I was troubled but finally I got the solution for it.
I’ll share that.
This example is to transfer a token of ERC-1155 using thirdweb.js and ethers.js.
In case ERC-721, you can use contract.erc721.transfer instead of contract.erc1155.transfer.
async function transfer(contract, walletAddress, tokenId) {
const { maxFeePerGas, maxPriorityFeePerGas } = await getFeeData();
const preTx = await contract.erc1155.transfer.prepare(
walletAddress,
tokenId,
1
);
preTx.setMaxFeePerGas(
ethers.utils.parseUnits(maxFeePerGas.toFixed(9), 'gwei')
);
preTx.setMaxPriorityFeePerGas(
ethers.utils.parseUnits(maxPriorityFeePerGas.toFixed(9), 'gwei')
);
await preTx.execute();
}
The perfectly correct getFeeData() function is below.
async function getFeeData(priority = 'standard') {
const response = await axios.get(
'https://gasstation.polygon.technology/v2'
);
const data = (() => {
switch (priority) {
case 'standard':
default:
return response.data.standard;
case 'fast':
return response.data.fast;
case 'low':
return response.data.safeLow;
}
})();
return {
maxFeePerGas: data.maxFee,
maxPriorityFeePerGas: data.maxPriorityFee,
};
}
This bug is terrible but ethers.js is awesome.
thirdweb.js is also awesome.
Bridge to Web3!
No activity yet