11

合约的读方法,带有管理员权限才能请求

 2 years ago
source link: https://learnblockchain.cn/question/2940
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

合约的读方法,带有管理员权限才能请求

//ONLY OWNER VIEWS
function getBaseURI() public view onlyOwner returns (string memory) {
	return baseURI;
}

我要怎么才能正常请求,有什么方法模拟我是owner

我记得之前好像看过一个关于NFT的分析文章,里面提到了这个,如果能找到文章更好

最佳答案 1天前

用js,或者其他外部访问的, getBaseURI().call({from: ownerAddress})

zen
采纳率 30% | 回答于 1天前

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK