Skip to content

Commit

Permalink
Factory: Testnet: Hedera: Update Contracts
Browse files Browse the repository at this point in the history
  • Loading branch information
imsk17 committed Aug 23, 2023
1 parent 34fc39b commit 092dfdf
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 8 deletions.
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
"@hashgraph/hethers": "^1.2.6",
"@hashgraph/sdk": "^2.26.0",
"@json-rpc-tools/utils": "^1.7.6",
"@make-software/ces-js-parser": "^1.3.3",
"@multiversx/sdk-core": "^11.4.1",
"@project-serum/anchor": "^0.25.0-beta.1",
"@randlabs/myalgo-connect": "^1.1.1",
Expand All @@ -68,6 +69,7 @@
"crypto-exchange-rate": "git+https://github.com/xp-network/exchange-rate#master-dist",
"ethers": "^5.5.4",
"js-base64": "^3.6.1",
"js-logger": "^1.6.1",
"near-api-js": "1.0.0",
"secretjs": "=1.4.7",
"socket.io-client": "^4.1.3",
Expand Down
9 changes: 5 additions & 4 deletions src/factory/factories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -406,10 +406,11 @@ export namespace ChainFactoryConfigs {
evmProvider: new ethers.providers.JsonRpcProvider(TestNetRpcUri.HEDERA),
feeMargin,
nonce: Chain.HEDERA,
htcToken: "0x00000000000000000000000000000000003b22a5",
erc721_addr: "0x00000000000000000000000000000000003b2294",
erc1155_addr: "0x00000000000000000000000000000000003b2294",
minter_addr: "0x00000000000000000000000000000000003b229e",
noWhitelist: true,
htcToken: "0xe5EB5757285A4AEF21d33b5d012DB488F983069B",
erc721_addr: "0xe0762A232bE173ACf3c48d9e77215b57B62b1A73",
erc1155_addr: "0xe0762A232bE173ACf3c48d9e77215b57B62b1A73",
minter_addr: "0x5B591E1d9cb81D5842434189F50608FD7cB6Fa04",
erc721Minter: "0x000000000000000000000000000000000037008d",
erc1155Minter: "0x0000000000000000000000000000000000370090",
},
Expand Down
14 changes: 11 additions & 3 deletions src/helpers/evm/web3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,10 @@ export async function baseWeb3HelperFactory(
): Promise<ContractTransaction> {
const erc721 = UserNftMinter__factory.connect(contract!, owner);
const txm = await erc721
.mint(uri, { gasLimit: 1000000 })
.mint(uri, {
gasLimit: 1000000,
gasPrice: await provider.getGasPrice(),
})
.catch(async (e) => {
if (nonce === 33) {
let tx;
Expand Down Expand Up @@ -313,14 +316,16 @@ export const NFT_METHOD_MAP: NftMethodMap = {
forAddr: string,
_tok: string,
txnUp: (tx: PopulatedTransaction) => Promise<void>,
customData: NullableCustomData
customData: NullableCustomData,
gasPrice: ethers.BigNumberish | undefined
) => {
const tx = await umt.populateTransaction.setApprovalForAll(
forAddr,
true,
{
gasLimit: "85000",
customData,
gasPrice,
}
);
await txnUp(tx);
Expand Down Expand Up @@ -352,10 +357,13 @@ export const NFT_METHOD_MAP: NftMethodMap = {
umt: UserNftMinter,
forAddr: string,
tok: string,
txnUp: (tx: PopulatedTransaction) => Promise<void>
txnUp: (tx: PopulatedTransaction) => Promise<void>,
_customData: NullableCustomData,
gasPrice: ethers.BigNumberish | undefined
) => {
const tx = await umt.populateTransaction.approve(forAddr, tok, {
gasLimit: "85000",
gasPrice,
});
await txnUp(tx);
return await umt.signer.sendTransaction(tx);
Expand Down
7 changes: 6 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1213,7 +1213,7 @@
resolved "https://registry.yarnpkg.com/@ledgerhq/logs/-/logs-6.10.1.tgz#5bd16082261d7364eabb511c788f00937dac588d"
integrity sha512-z+ILK8Q3y+nfUl43ctCPuR4Y2bIxk/ooCQFwZxhtci1EhAtMDzMAx2W25qx8G1PPL9UUOdnUax19+F0OjXoj4w==

"@make-software/ces-js-parser@^1.3.1":
"@make-software/ces-js-parser@^1.3.1", "@make-software/ces-js-parser@^1.3.3":
version "1.3.3"
resolved "https://registry.yarnpkg.com/@make-software/ces-js-parser/-/ces-js-parser-1.3.3.tgz#7e50b2824f6189f365662fa81e1a2eb22dfcb214"
integrity sha512-uJ7BgnaVbb1pkGfDCgBqES+f5+RVlVPkAYxOC6Qz9kxzIcu9HYH1eA+8EkjRO2T36uBemTjBRO6R0TdH61PIAA==
Expand Down Expand Up @@ -5788,6 +5788,11 @@ js-base64@^3.6.1, js-base64@^3.7.4:
resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-3.7.5.tgz#21e24cf6b886f76d6f5f165bfcd69cc55b9e3fca"
integrity sha512-3MEt5DTINKqfScXKfJFrRbxkrnk2AxPWGBL/ycjz4dK8iqiSJ06UxD8jh8xuh6p10TX4t2+7FsBYVxxQbMg+qA==

js-logger@^1.6.1:
version "1.6.1"
resolved "https://registry.yarnpkg.com/js-logger/-/js-logger-1.6.1.tgz#8f09671b515e4a6f31dced8fdb8923432e2c60af"
integrity sha512-yTgMCPXVjhmg28CuUH8CKjU+cIKL/G+zTu4Fn4lQxs8mRFH/03QTNvEFngcxfg/gRDiQAOoyCKmMTOm9ayOzXA==

[email protected], js-sha256@^0.9.0:
version "0.9.0"
resolved "https://registry.yarnpkg.com/js-sha256/-/js-sha256-0.9.0.tgz#0b89ac166583e91ef9123644bd3c5334ce9d0966"
Expand Down

0 comments on commit 092dfdf

Please sign in to comment.