This repository has been archived by the owner on Nov 3, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(PTP-404): deploy erc721mintable contract
- Loading branch information
Showing
12 changed files
with
26,197 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import { config as loadEnv } from 'dotenv'; | ||
import Auth from '../lib/Auth/Auth'; | ||
import SDK from '../lib/SDK/sdk'; | ||
import { TEMPLATES } from '../lib/NFT/constants'; | ||
|
||
loadEnv(); | ||
let sdk; | ||
let account; | ||
|
||
describe('E2E Test: Basic NFT (write)', () => { | ||
jest.setTimeout(120 * 1000); | ||
|
||
beforeAll(async () => { | ||
const privateKey = process.env.PRIVATE_KEY; | ||
const rpcUrl = process.env.RPC_URL; | ||
const chainId = 4; | ||
const projectId = process.env.PROJECT_ID; | ||
const secretId = process.env.SECRET_ID; | ||
const IPFS = { IPFSProjectID: '', IPFSProjectSecret: '' }; | ||
|
||
account = new Auth({ | ||
privateKey, | ||
projectId, | ||
secretId, | ||
rpcUrl, | ||
chainId, | ||
IPFS, | ||
}); | ||
|
||
sdk = new SDK(account); | ||
}); | ||
|
||
it('should return deployed contract', async () => { | ||
const contractObject = await sdk.deploy({ | ||
template: TEMPLATES.ERC721Mintable, | ||
params: { | ||
name: 'Cool Contract', | ||
symbol: 'CC', | ||
contractURI: 'URI', | ||
}, | ||
}); | ||
|
||
expect(contractObject).not.toBe(null); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.